@rqmii_immersive/agent-react-sdk 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-react-sdk.css +1 -1
- package/dist/ui/RqmiiAgentChat.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-avatar.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-content.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-shared.d.ts +1 -1
- package/dist/ui/chat/chat-box-shared.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-text-and-voice.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-text.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-types.d.ts +1 -0
- package/dist/ui/chat/chat-box-types.d.ts.map +1 -1
- package/dist/ui/chat/chat-box-voice.d.ts.map +1 -1
- package/dist/ui.cjs +26 -26
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +1430 -1421
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.cjs
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2010-2026 Three.js Authors
|
|
109
109
|
* SPDX-License-Identifier: MIT
|
|
110
|
-
*/const Tx="185",WD={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},jD={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},n3=0,Pw=1,i3=2,XD=3,r3=0,wm=1,ZA=2,If=3,kc=0,Ts=1,Cl=2,kl=0,Uf=1,kw=2,Dw=3,Lw=4,s3=5,qD=6,Vu=100,a3=101,o3=102,l3=103,c3=104,u3=200,d3=201,f3=202,h3=203,Rb=204,Pb=205,p3=206,m3=207,g3=208,A3=209,v3=210,y3=211,b3=212,x3=213,S3=214,kb=0,Db=1,Lb=2,Vf=3,Ib=4,Nb=5,zb=6,Bb=7,wv=0,M3=1,w3=2,so=0,a1=1,o1=2,l1=3,Ex=4,c1=5,u1=6,d1=7,Iw="attached",T3="detached",Cx=300,Dl=301,qu=302,KA=303,_A=304,Bm=306,Dc=1e3,Zs=1001,lv=1002,Ji=1003,f1=1004,YD=1004,xm=1005,JD=1005,mi=1006,$A=1007,QD=1007,Rl=1008,ZD=1008,Ss=1009,h1=1010,p1=1011,Em=1012,Rx=1013,oo=1014,ws=1015,Ll=1016,Px=1017,kx=1018,Cm=1020,m1=35902,g1=35899,A1=1021,v1=1022,as=1023,Il=1026,Gu=1027,Dx=1028,Tv=1029,Yu=1030,Lx=1031,KD=1032,Ix=1033,ev=33776,tv=33777,nv=33778,iv=33779,Ub=35840,Fb=35841,Ob=35842,Vb=35843,Hb=36196,Gb=37492,Wb=37496,jb=37488,Xb=37489,cv=37490,qb=37491,Yb=37808,Jb=37809,Qb=37810,Zb=37811,Kb=37812,_b=37813,$b=37814,ex=37815,tx=37816,nx=37817,ix=37818,rx=37819,sx=37820,ax=37821,ox=36492,lx=36494,cx=36495,ux=36283,dx=36284,uv=36285,fx=36286,E3=2200,C3=2201,R3=2202,dv=2300,hx=2301,Sb=2302,Nw=2303,Nf=2400,zf=2401,fv=2402,Nx=2500,y1=2501,_D=0,$D=1,eL=2,P3=3200,tL=3201,nL=3202,iL=3203,Lc=0,k3=1,Cc="",ss="srgb",Rm="srgb-linear",hv="linear",_n="srgb",rL="",sL="rg",aL="ga",oL=0,Df=7680,lL=7681,cL=7682,uL=7683,dL=34055,fL=34056,hL=5386,pL=512,mL=513,gL=514,AL=515,vL=516,yL=517,bL=518,zw=519,D3=512,L3=513,I3=514,zx=515,N3=516,z3=517,Bx=518,B3=519,pv=35044,xL=35048,SL=35040,ML=35045,wL=35049,TL=35041,EL=35046,CL=35050,RL=35042,PL="100",Bw="300 es",Ea=2e3,Hf=2001,kL={COMPUTE:"compute",RENDER:"render"},DL={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},LL={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},IL={TEXTURE_COMPARE:"depthTextureCompare"};function NL(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}const zL={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sm(s,e){return new zL[s](e)}function U3(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function mv(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function F3(){const s=mv("canvas");return s.style.display="block",s}const qE={};let Ju=null;function BL(s){Ju=s}function UL(){return Ju}function gv(...s){const e="THREE."+s.shift();Ju?Ju("log",e,...s):console.log(e,...s)}function O3(s){const e=s[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=s[1];t&&t.isStackTrace?s[0]+=" "+t.getLocation():s[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return s}function ot(...s){s=O3(s);const e="THREE."+s.shift();if(Ju)Ju("warn",e,...s);else{const t=s[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...s)}}function kt(...s){s=O3(s);const e="THREE."+s.shift();if(Ju)Ju("error",e,...s);else{const t=s[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...s)}}function Xu(...s){const e=s.join(" ");e in qE||(qE[e]=!0,ot(...s))}function FL(s,e,t){return new Promise(function(i,a){function c(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:a();break;case s.TIMEOUT_EXPIRED:setTimeout(c,t);break;default:i()}}setTimeout(c,t)})}const OL={[kb]:Db,[Lb]:zb,[Ib]:Bb,[Vf]:Nb,[Db]:kb,[zb]:Lb,[Bb]:Ib,[Nb]:Vf};class Xo{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const a=i[e];if(a!==void 0){const c=a.indexOf(t);c!==-1&&a.splice(c,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const a=i.slice(0);for(let c=0,d=a.length;c<d;c++)a[c].call(this,e);e.target=null}}}const ns=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let YE=1234567;const Ff=Math.PI/180,Pm=180/Math.PI;function Ca(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ns[s&255]+ns[s>>8&255]+ns[s>>16&255]+ns[s>>24&255]+"-"+ns[e&255]+ns[e>>8&255]+"-"+ns[e>>16&15|64]+ns[e>>24&255]+"-"+ns[t&63|128]+ns[t>>8&255]+"-"+ns[t>>16&255]+ns[t>>24&255]+ns[i&255]+ns[i>>8&255]+ns[i>>16&255]+ns[i>>24&255]).toLowerCase()}function Yt(s,e,t){return Math.max(e,Math.min(t,s))}function b1(s,e){return(s%e+e)%e}function VL(s,e,t,i,a){return i+(s-e)*(a-i)/(t-e)}function HL(s,e,t){return s!==e?(t-s)/(e-s):0}function rv(s,e,t){return(1-t)*s+t*e}function GL(s,e,t,i){return rv(s,e,1-Math.exp(-t*i))}function WL(s,e=1){return e-Math.abs(b1(s,e*2)-e)}function jL(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function XL(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function qL(s,e){return s+Math.floor(Math.random()*(e-s+1))}function YL(s,e){return s+Math.random()*(e-s)}function JL(s){return s*(.5-Math.random())}function QL(s){s!==void 0&&(YE=s);let e=YE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function ZL(s){return s*Ff}function KL(s){return s*Pm}function _L(s){return(s&s-1)===0&&s!==0}function $L(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function eI(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function tI(s,e,t,i,a){const c=Math.cos,d=Math.sin,f=c(t/2),m=d(t/2),g=c((e+i)/2),v=d((e+i)/2),M=c((e-i)/2),x=d((e-i)/2),S=c((i-e)/2),w=d((i-e)/2);switch(a){case"XYX":s.set(f*v,m*M,m*x,f*g);break;case"YZY":s.set(m*x,f*v,m*M,f*g);break;case"ZXZ":s.set(m*M,m*x,f*v,f*g);break;case"XZX":s.set(f*v,m*w,m*S,f*g);break;case"YXY":s.set(m*S,f*v,m*w,f*g);break;case"ZYZ":s.set(m*w,m*S,f*v,f*g);break;default:ot("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+a)}}function Ms(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("THREE.MathUtils: Invalid component type.")}}function un(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("THREE.MathUtils: Invalid component type.")}}const nI={DEG2RAD:Ff,RAD2DEG:Pm,generateUUID:Ca,clamp:Yt,euclideanModulo:b1,mapLinear:VL,inverseLerp:HL,lerp:rv,damp:GL,pingpong:WL,smoothstep:jL,smootherstep:XL,randInt:qL,randFloat:YL,randFloatSpread:JL,seededRandom:QL,degToRad:ZL,radToDeg:KL,isPowerOfTwo:_L,ceilPowerOfTwo:$L,floorPowerOfTwo:eI,setQuaternionFromProperEuler:tI,normalize:un,denormalize:Ms};class Oe{static{Oe.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("THREE.Vector2: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("THREE.Vector2: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Yt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),a=Math.sin(t),c=this.x-e.x,d=this.y-e.y;return this.x=c*i-d*a+e.x,this.y=c*a+d*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Es{constructor(e=0,t=0,i=0,a=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=a}static slerpFlat(e,t,i,a,c,d,f){let m=i[a+0],g=i[a+1],v=i[a+2],M=i[a+3],x=c[d+0],S=c[d+1],w=c[d+2],k=c[d+3];if(M!==k||m!==x||g!==S||v!==w){let C=m*x+g*S+v*w+M*k;C<0&&(x=-x,S=-S,w=-w,k=-k,C=-C);let T=1-f;if(C<.9995){const D=Math.acos(C),z=Math.sin(D);T=Math.sin(T*D)/z,f=Math.sin(f*D)/z,m=m*T+x*f,g=g*T+S*f,v=v*T+w*f,M=M*T+k*f}else{m=m*T+x*f,g=g*T+S*f,v=v*T+w*f,M=M*T+k*f;const D=1/Math.sqrt(m*m+g*g+v*v+M*M);m*=D,g*=D,v*=D,M*=D}}e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=M}static multiplyQuaternionsFlat(e,t,i,a,c,d){const f=i[a],m=i[a+1],g=i[a+2],v=i[a+3],M=c[d],x=c[d+1],S=c[d+2],w=c[d+3];return e[t]=f*w+v*M+m*S-g*x,e[t+1]=m*w+v*x+g*M-f*S,e[t+2]=g*w+v*S+f*x-m*M,e[t+3]=v*w-f*M-m*x-g*S,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,a=e._y,c=e._z,d=e._order,f=Math.cos,m=Math.sin,g=f(i/2),v=f(a/2),M=f(c/2),x=m(i/2),S=m(a/2),w=m(c/2);switch(d){case"XYZ":this._x=x*v*M+g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M-x*S*w;break;case"YXZ":this._x=x*v*M+g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M+x*S*w;break;case"ZXY":this._x=x*v*M-g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M-x*S*w;break;case"ZYX":this._x=x*v*M-g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M+x*S*w;break;case"YZX":this._x=x*v*M+g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M-x*S*w;break;case"XZY":this._x=x*v*M-g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M+x*S*w;break;default:ot("Quaternion: .setFromEuler() encountered an unknown order: "+d)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],a=t[4],c=t[8],d=t[1],f=t[5],m=t[9],g=t[2],v=t[6],M=t[10],x=i+f+M;if(x>0){const S=.5/Math.sqrt(x+1);this._w=.25/S,this._x=(v-m)*S,this._y=(c-g)*S,this._z=(d-a)*S}else if(i>f&&i>M){const S=2*Math.sqrt(1+i-f-M);this._w=(v-m)/S,this._x=.25*S,this._y=(a+d)/S,this._z=(c+g)/S}else if(f>M){const S=2*Math.sqrt(1+f-i-M);this._w=(c-g)/S,this._x=(a+d)/S,this._y=.25*S,this._z=(m+v)/S}else{const S=2*Math.sqrt(1+M-i-f);this._w=(d-a)/S,this._x=(c+g)/S,this._y=(m+v)/S,this._z=.25*S}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Yt(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,a=e._y,c=e._z,d=e._w,f=t._x,m=t._y,g=t._z,v=t._w;return this._x=i*v+d*f+a*g-c*m,this._y=a*v+d*m+c*f-i*g,this._z=c*v+d*g+i*m-a*f,this._w=d*v-i*f-a*m-c*g,this._onChangeCallback(),this}slerp(e,t){let i=e._x,a=e._y,c=e._z,d=e._w,f=this.dot(e);f<0&&(i=-i,a=-a,c=-c,d=-d,f=-f);let m=1-t;if(f<.9995){const g=Math.acos(f),v=Math.sin(g);m=Math.sin(m*g)/v,t=Math.sin(t*g)/v,this._x=this._x*m+i*t,this._y=this._y*m+a*t,this._z=this._z*m+c*t,this._w=this._w*m+d*t,this._onChangeCallback()}else this._x=this._x*m+i*t,this._y=this._y*m+a*t,this._z=this._z*m+c*t,this._w=this._w*m+d*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),a=Math.sqrt(1-i),c=Math.sqrt(i);return this.set(a*Math.sin(e),a*Math.cos(e),c*Math.sin(t),c*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class J{static{J.prototype.isVector3=!0}constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("THREE.Vector3: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("THREE.Vector3: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(JE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(JE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,a=this.z,c=e.elements;return this.x=c[0]*t+c[3]*i+c[6]*a,this.y=c[1]*t+c[4]*i+c[7]*a,this.z=c[2]*t+c[5]*i+c[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,a=this.z,c=e.elements,d=1/(c[3]*t+c[7]*i+c[11]*a+c[15]);return this.x=(c[0]*t+c[4]*i+c[8]*a+c[12])*d,this.y=(c[1]*t+c[5]*i+c[9]*a+c[13])*d,this.z=(c[2]*t+c[6]*i+c[10]*a+c[14])*d,this}applyQuaternion(e){const t=this.x,i=this.y,a=this.z,c=e.x,d=e.y,f=e.z,m=e.w,g=2*(d*a-f*i),v=2*(f*t-c*a),M=2*(c*i-d*t);return this.x=t+m*g+d*M-f*v,this.y=i+m*v+f*g-c*M,this.z=a+m*M+c*v-d*g,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,a=this.z,c=e.elements;return this.x=c[0]*t+c[4]*i+c[8]*a,this.y=c[1]*t+c[5]*i+c[9]*a,this.z=c[2]*t+c[6]*i+c[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this.z=Yt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this.z=Yt(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,a=e.y,c=e.z,d=t.x,f=t.y,m=t.z;return this.x=a*m-c*f,this.y=c*d-i*m,this.z=i*f-a*d,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return SM.copy(this).projectOnVector(e),this.sub(SM)}reflect(e){return this.sub(SM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Yt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const SM=new J,JE=new Es;class _t{static{_t.prototype.isMatrix3=!0}constructor(e,t,i,a,c,d,f,m,g){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,a,c,d,f,m,g)}set(e,t,i,a,c,d,f,m,g){const v=this.elements;return v[0]=e,v[1]=a,v[2]=f,v[3]=t,v[4]=c,v[5]=m,v[6]=i,v[7]=d,v[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,a=t.elements,c=this.elements,d=i[0],f=i[3],m=i[6],g=i[1],v=i[4],M=i[7],x=i[2],S=i[5],w=i[8],k=a[0],C=a[3],T=a[6],D=a[1],z=a[4],L=a[7],O=a[2],U=a[5],H=a[8];return c[0]=d*k+f*D+m*O,c[3]=d*C+f*z+m*U,c[6]=d*T+f*L+m*H,c[1]=g*k+v*D+M*O,c[4]=g*C+v*z+M*U,c[7]=g*T+v*L+M*H,c[2]=x*k+S*D+w*O,c[5]=x*C+S*z+w*U,c[8]=x*T+S*L+w*H,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8];return t*d*v-t*f*g-i*c*v+i*f*m+a*c*g-a*d*m}invert(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8],M=v*d-f*g,x=f*m-v*c,S=g*c-d*m,w=t*M+i*x+a*S;if(w===0)return this.set(0,0,0,0,0,0,0,0,0);const k=1/w;return e[0]=M*k,e[1]=(a*g-v*i)*k,e[2]=(f*i-a*d)*k,e[3]=x*k,e[4]=(v*t-a*m)*k,e[5]=(a*c-f*t)*k,e[6]=S*k,e[7]=(i*m-g*t)*k,e[8]=(d*t-i*c)*k,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,c,d,f){const m=Math.cos(c),g=Math.sin(c);return this.set(i*m,i*g,-i*(m*d+g*f)+d+e,-a*g,a*m,-a*(-g*d+m*f)+f+t,0,0,1),this}scale(e,t){return Xu("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(MM.makeScale(e,t)),this}rotate(e){return Xu("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(MM.makeRotation(-e)),this}translate(e,t){return Xu("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(MM.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const MM=new _t,QE=new _t().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ZE=new _t().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function iI(){const s={enabled:!0,workingColorSpace:Rm,spaces:{},convert:function(a,c,d){return this.enabled===!1||c===d||!c||!d||(this.spaces[c].transfer===_n&&(a.r=Pc(a.r),a.g=Pc(a.g),a.b=Pc(a.b)),this.spaces[c].primaries!==this.spaces[d].primaries&&(a.applyMatrix3(this.spaces[c].toXYZ),a.applyMatrix3(this.spaces[d].fromXYZ)),this.spaces[d].transfer===_n&&(a.r=Tm(a.r),a.g=Tm(a.g),a.b=Tm(a.b))),a},workingToColorSpace:function(a,c){return this.convert(a,this.workingColorSpace,c)},colorSpaceToWorking:function(a,c){return this.convert(a,c,this.workingColorSpace)},getPrimaries:function(a){return this.spaces[a].primaries},getTransfer:function(a){return a===Cc?hv:this.spaces[a].transfer},getToneMappingMode:function(a){return this.spaces[a].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(a,c=this.workingColorSpace){return a.fromArray(this.spaces[c].luminanceCoefficients)},define:function(a){Object.assign(this.spaces,a)},_getMatrix:function(a,c,d){return a.copy(this.spaces[c].toXYZ).multiply(this.spaces[d].fromXYZ)},_getDrawingBufferColorSpace:function(a){return this.spaces[a].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(a=this.workingColorSpace){return this.spaces[a].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(a,c){return Xu("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(a,c)},toWorkingColorSpace:function(a,c){return Xu("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(a,c)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return s.define({[Rm]:{primaries:e,whitePoint:i,transfer:hv,toXYZ:QE,fromXYZ:ZE,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:ss},outputColorSpaceConfig:{drawingBufferColorSpace:ss}},[ss]:{primaries:e,whitePoint:i,transfer:_n,toXYZ:QE,fromXYZ:ZE,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:ss}}}),s}const wn=iI();function Pc(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function Tm(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let Kp;class V3{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Kp===void 0&&(Kp=mv("canvas")),Kp.width=e.width,Kp.height=e.height;const a=Kp.getContext("2d");e instanceof ImageData?a.putImageData(e,0,0):a.drawImage(e,0,0,e.width,e.height),i=Kp}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=mv("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const a=i.getImageData(0,0,e.width,e.height),c=a.data;for(let d=0;d<c.length;d++)c[d]=Pc(c[d]/255)*255;return i.putImageData(a,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Pc(t[i]/255)*255):t[i]=Pc(t[i]);return{data:t,width:e.width,height:e.height}}else return ot("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let rI=0;class Wu{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:rI++}),this.uuid=Ca(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},a=this.data;if(a!==null){let c;if(Array.isArray(a)){c=[];for(let d=0,f=a.length;d<f;d++)a[d].isDataTexture?c.push(wM(a[d].image)):c.push(wM(a[d]))}else c=wM(a);i.url=c}return t||(e.images[this.uuid]=i),i}}function wM(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?V3.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(ot("Texture: Unable to serialize Texture."),{})}let sI=0;const TM=new J;class Di extends Xo{constructor(e=Di.DEFAULT_IMAGE,t=Di.DEFAULT_MAPPING,i=Zs,a=Zs,c=mi,d=Rl,f=as,m=Ss,g=Di.DEFAULT_ANISOTROPY,v=Cc){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:sI++}),this.uuid=Ca(),this.name="",this.source=new Wu(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=a,this.magFilter=c,this.minFilter=d,this.anisotropy=g,this.format=f,this.internalFormat=null,this.type=m,this.offset=new Oe(0,0),this.repeat=new Oe(1,1),this.center=new Oe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _t,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=v,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(TM).x}get height(){return this.source.getSize(TM).y}get depth(){return this.source.getSize(TM).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){ot(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){ot(`Texture.setValues(): property '${t}' does not exist.`);continue}a&&i&&a.isVector2&&i.isVector2||a&&i&&a.isVector3&&i.isVector3||a&&i&&a.isMatrix3&&i.isMatrix3?a.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Cx)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Dc:e.x=e.x-Math.floor(e.x);break;case Zs:e.x=e.x<0?0:1;break;case lv:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Dc:e.y=e.y-Math.floor(e.y);break;case Zs:e.y=e.y<0?0:1;break;case lv:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Di.DEFAULT_IMAGE=null;Di.DEFAULT_MAPPING=Cx;Di.DEFAULT_ANISOTROPY=1;class ni{static{ni.prototype.isVector4=!0}constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("THREE.Vector4: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("THREE.Vector4: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,a=this.z,c=this.w,d=e.elements;return this.x=d[0]*t+d[4]*i+d[8]*a+d[12]*c,this.y=d[1]*t+d[5]*i+d[9]*a+d[13]*c,this.z=d[2]*t+d[6]*i+d[10]*a+d[14]*c,this.w=d[3]*t+d[7]*i+d[11]*a+d[15]*c,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,c;const m=e.elements,g=m[0],v=m[4],M=m[8],x=m[1],S=m[5],w=m[9],k=m[2],C=m[6],T=m[10];if(Math.abs(v-x)<.01&&Math.abs(M-k)<.01&&Math.abs(w-C)<.01){if(Math.abs(v+x)<.1&&Math.abs(M+k)<.1&&Math.abs(w+C)<.1&&Math.abs(g+S+T-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const z=(g+1)/2,L=(S+1)/2,O=(T+1)/2,U=(v+x)/4,H=(M+k)/4,I=(w+C)/4;return z>L&&z>O?z<.01?(i=0,a=.707106781,c=.707106781):(i=Math.sqrt(z),a=U/i,c=H/i):L>O?L<.01?(i=.707106781,a=0,c=.707106781):(a=Math.sqrt(L),i=U/a,c=I/a):O<.01?(i=.707106781,a=.707106781,c=0):(c=Math.sqrt(O),i=H/c,a=I/c),this.set(i,a,c,t),this}let D=Math.sqrt((C-w)*(C-w)+(M-k)*(M-k)+(x-v)*(x-v));return Math.abs(D)<.001&&(D=1),this.x=(C-w)/D,this.y=(M-k)/D,this.z=(x-v)/D,this.w=Math.acos((g+S+T-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this.z=Yt(this.z,e.z,t.z),this.w=Yt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this.z=Yt(this.z,e,t),this.w=Yt(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class x1 extends Xo{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1,useArrayDepthTexture:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new ni(0,0,e,t),this.scissorTest=!1,this.viewport=new ni(0,0,e,t),this.textures=[];const a={width:e,height:t,depth:i.depth},c=new Di(a),d=i.count;for(let f=0;f<d;f++)this.textures[f]=c.clone(),this.textures[f].isRenderTargetTexture=!0,this.textures[f].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview,this.useArrayDepthTexture=i.useArrayDepthTexture}_setTextureOptions(e={}){const t={minFilter:mi,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let a=0,c=this.textures.length;a<c;a++)this.textures[a].image.width=e,this.textures[a].image.height=t,this.textures[a].image.depth=i,this.textures[a].isData3DTexture!==!0&&(this.textures[a].isArrayTexture=this.textures[a].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const a=Object.assign({},e.textures[t].image);this.textures[t].source=new Wu(a)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this.useArrayDepthTexture=e.useArrayDepthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Ra extends x1{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class Ux extends Di{constructor(e=null,t=1,i=1,a=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:a},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=Zs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class aI extends Ra{constructor(e=1,t=1,i=1,a={}){super(e,t,a),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Ux(null,e,t,i),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class Fx extends Di{constructor(e=null,t=1,i=1,a=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:a},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=Zs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class oI extends Ra{constructor(e=1,t=1,i=1,a={}){super(e,t,a),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new Fx(null,e,t,i),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class Zt{static{Zt.prototype.isMatrix4=!0}constructor(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C)}set(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C){const T=this.elements;return T[0]=e,T[4]=t,T[8]=i,T[12]=a,T[1]=c,T[5]=d,T[9]=f,T[13]=m,T[2]=g,T[6]=v,T[10]=M,T[14]=x,T[3]=S,T[7]=w,T[11]=k,T[15]=C,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Zt().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinantAffine()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinantAffine()===0)return this.identity();const t=this.elements,i=e.elements,a=1/_p.setFromMatrixColumn(e,0).length(),c=1/_p.setFromMatrixColumn(e,1).length(),d=1/_p.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*c,t[5]=i[5]*c,t[6]=i[6]*c,t[7]=0,t[8]=i[8]*d,t[9]=i[9]*d,t[10]=i[10]*d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,a=e.y,c=e.z,d=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a),v=Math.cos(c),M=Math.sin(c);if(e.order==="XYZ"){const x=d*v,S=d*M,w=f*v,k=f*M;t[0]=m*v,t[4]=-m*M,t[8]=g,t[1]=S+w*g,t[5]=x-k*g,t[9]=-f*m,t[2]=k-x*g,t[6]=w+S*g,t[10]=d*m}else if(e.order==="YXZ"){const x=m*v,S=m*M,w=g*v,k=g*M;t[0]=x+k*f,t[4]=w*f-S,t[8]=d*g,t[1]=d*M,t[5]=d*v,t[9]=-f,t[2]=S*f-w,t[6]=k+x*f,t[10]=d*m}else if(e.order==="ZXY"){const x=m*v,S=m*M,w=g*v,k=g*M;t[0]=x-k*f,t[4]=-d*M,t[8]=w+S*f,t[1]=S+w*f,t[5]=d*v,t[9]=k-x*f,t[2]=-d*g,t[6]=f,t[10]=d*m}else if(e.order==="ZYX"){const x=d*v,S=d*M,w=f*v,k=f*M;t[0]=m*v,t[4]=w*g-S,t[8]=x*g+k,t[1]=m*M,t[5]=k*g+x,t[9]=S*g-w,t[2]=-g,t[6]=f*m,t[10]=d*m}else if(e.order==="YZX"){const x=d*m,S=d*g,w=f*m,k=f*g;t[0]=m*v,t[4]=k-x*M,t[8]=w*M+S,t[1]=M,t[5]=d*v,t[9]=-f*v,t[2]=-g*v,t[6]=S*M+w,t[10]=x-k*M}else if(e.order==="XZY"){const x=d*m,S=d*g,w=f*m,k=f*g;t[0]=m*v,t[4]=-M,t[8]=g*v,t[1]=x*M+k,t[5]=d*v,t[9]=S*M-w,t[2]=w*M-S,t[6]=f*v,t[10]=k*M+x}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(lI,e,cI)}lookAt(e,t,i){const a=this.elements;return Ma.subVectors(e,t),Ma.lengthSq()===0&&(Ma.z=1),Ma.normalize(),Lu.crossVectors(i,Ma),Lu.lengthSq()===0&&(Math.abs(i.z)===1?Ma.x+=1e-4:Ma.z+=1e-4,Ma.normalize(),Lu.crossVectors(i,Ma)),Lu.normalize(),Ey.crossVectors(Ma,Lu),a[0]=Lu.x,a[4]=Ey.x,a[8]=Ma.x,a[1]=Lu.y,a[5]=Ey.y,a[9]=Ma.y,a[2]=Lu.z,a[6]=Ey.z,a[10]=Ma.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,a=t.elements,c=this.elements,d=i[0],f=i[4],m=i[8],g=i[12],v=i[1],M=i[5],x=i[9],S=i[13],w=i[2],k=i[6],C=i[10],T=i[14],D=i[3],z=i[7],L=i[11],O=i[15],U=a[0],H=a[4],I=a[8],F=a[12],V=a[1],X=a[5],_=a[9],K=a[13],le=a[2],$=a[6],j=a[10],Q=a[14],ne=a[3],ce=a[7],ye=a[11],Te=a[15];return c[0]=d*U+f*V+m*le+g*ne,c[4]=d*H+f*X+m*$+g*ce,c[8]=d*I+f*_+m*j+g*ye,c[12]=d*F+f*K+m*Q+g*Te,c[1]=v*U+M*V+x*le+S*ne,c[5]=v*H+M*X+x*$+S*ce,c[9]=v*I+M*_+x*j+S*ye,c[13]=v*F+M*K+x*Q+S*Te,c[2]=w*U+k*V+C*le+T*ne,c[6]=w*H+k*X+C*$+T*ce,c[10]=w*I+k*_+C*j+T*ye,c[14]=w*F+k*K+C*Q+T*Te,c[3]=D*U+z*V+L*le+O*ne,c[7]=D*H+z*X+L*$+O*ce,c[11]=D*I+z*_+L*j+O*ye,c[15]=D*F+z*K+L*Q+O*Te,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],a=e[8],c=e[12],d=e[1],f=e[5],m=e[9],g=e[13],v=e[2],M=e[6],x=e[10],S=e[14],w=e[3],k=e[7],C=e[11],T=e[15],D=m*S-g*x,z=f*S-g*M,L=f*x-m*M,O=d*S-g*v,U=d*x-m*v,H=d*M-f*v;return t*(k*D-C*z+T*L)-i*(w*D-C*O+T*U)+a*(w*z-k*O+T*H)-c*(w*L-k*U+C*H)}determinantAffine(){const e=this.elements,t=e[0],i=e[4],a=e[8],c=e[1],d=e[5],f=e[9],m=e[2],g=e[6],v=e[10];return t*(d*v-f*g)-i*(c*v-f*m)+a*(c*g-d*m)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8],M=e[9],x=e[10],S=e[11],w=e[12],k=e[13],C=e[14],T=e[15],D=t*f-i*d,z=t*m-a*d,L=t*g-c*d,O=i*m-a*f,U=i*g-c*f,H=a*g-c*m,I=v*k-M*w,F=v*C-x*w,V=v*T-S*w,X=M*C-x*k,_=M*T-S*k,K=x*T-S*C,le=D*K-z*_+L*X+O*V-U*F+H*I;if(le===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const $=1/le;return e[0]=(f*K-m*_+g*X)*$,e[1]=(a*_-i*K-c*X)*$,e[2]=(k*H-C*U+T*O)*$,e[3]=(x*U-M*H-S*O)*$,e[4]=(m*V-d*K-g*F)*$,e[5]=(t*K-a*V+c*F)*$,e[6]=(C*L-w*H-T*z)*$,e[7]=(v*H-x*L+S*z)*$,e[8]=(d*_-f*V+g*I)*$,e[9]=(i*V-t*_-c*I)*$,e[10]=(w*U-k*L+T*D)*$,e[11]=(M*L-v*U-S*D)*$,e[12]=(f*F-d*X-m*I)*$,e[13]=(t*X-i*F+a*I)*$,e[14]=(k*z-w*O-C*D)*$,e[15]=(v*O-M*z+x*D)*$,this}scale(e){const t=this.elements,i=e.x,a=e.y,c=e.z;return t[0]*=i,t[4]*=a,t[8]*=c,t[1]*=i,t[5]*=a,t[9]*=c,t[2]*=i,t[6]*=a,t[10]*=c,t[3]*=i,t[7]*=a,t[11]*=c,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),a=Math.sin(t),c=1-i,d=e.x,f=e.y,m=e.z,g=c*d,v=c*f;return this.set(g*d+i,g*f-a*m,g*m+a*f,0,g*f+a*m,v*f+i,v*m-a*d,0,g*m-a*f,v*m+a*d,c*m*m+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,c,d){return this.set(1,i,c,0,e,1,d,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){const a=this.elements,c=t._x,d=t._y,f=t._z,m=t._w,g=c+c,v=d+d,M=f+f,x=c*g,S=c*v,w=c*M,k=d*v,C=d*M,T=f*M,D=m*g,z=m*v,L=m*M,O=i.x,U=i.y,H=i.z;return a[0]=(1-(k+T))*O,a[1]=(S+L)*O,a[2]=(w-z)*O,a[3]=0,a[4]=(S-L)*U,a[5]=(1-(x+T))*U,a[6]=(C+D)*U,a[7]=0,a[8]=(w+z)*H,a[9]=(C-D)*H,a[10]=(1-(x+k))*H,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){const a=this.elements;e.x=a[12],e.y=a[13],e.z=a[14];const c=this.determinantAffine();if(c===0)return i.set(1,1,1),t.identity(),this;let d=_p.set(a[0],a[1],a[2]).length();const f=_p.set(a[4],a[5],a[6]).length(),m=_p.set(a[8],a[9],a[10]).length();c<0&&(d=-d),Oo.copy(this);const g=1/d,v=1/f,M=1/m;return Oo.elements[0]*=g,Oo.elements[1]*=g,Oo.elements[2]*=g,Oo.elements[4]*=v,Oo.elements[5]*=v,Oo.elements[6]*=v,Oo.elements[8]*=M,Oo.elements[9]*=M,Oo.elements[10]*=M,t.setFromRotationMatrix(Oo),i.x=d,i.y=f,i.z=m,this}makePerspective(e,t,i,a,c,d,f=Ea,m=!1){const g=this.elements,v=2*c/(t-e),M=2*c/(i-a),x=(t+e)/(t-e),S=(i+a)/(i-a);let w,k;if(m)w=c/(d-c),k=d*c/(d-c);else if(f===Ea)w=-(d+c)/(d-c),k=-2*d*c/(d-c);else if(f===Hf)w=-d/(d-c),k=-d*c/(d-c);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+f);return g[0]=v,g[4]=0,g[8]=x,g[12]=0,g[1]=0,g[5]=M,g[9]=S,g[13]=0,g[2]=0,g[6]=0,g[10]=w,g[14]=k,g[3]=0,g[7]=0,g[11]=-1,g[15]=0,this}makeOrthographic(e,t,i,a,c,d,f=Ea,m=!1){const g=this.elements,v=2/(t-e),M=2/(i-a),x=-(t+e)/(t-e),S=-(i+a)/(i-a);let w,k;if(m)w=1/(d-c),k=d/(d-c);else if(f===Ea)w=-2/(d-c),k=-(d+c)/(d-c);else if(f===Hf)w=-1/(d-c),k=-c/(d-c);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+f);return g[0]=v,g[4]=0,g[8]=0,g[12]=x,g[1]=0,g[5]=M,g[9]=0,g[13]=S,g[2]=0,g[6]=0,g[10]=w,g[14]=k,g[3]=0,g[7]=0,g[11]=0,g[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const _p=new J,Oo=new Zt,lI=new J(0,0,0),cI=new J(1,1,1),Lu=new J,Ey=new J,Ma=new J,KE=new Zt,_E=new Es;class jo{constructor(e=0,t=0,i=0,a=jo.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const a=e.elements,c=a[0],d=a[4],f=a[8],m=a[1],g=a[5],v=a[9],M=a[2],x=a[6],S=a[10];switch(t){case"XYZ":this._y=Math.asin(Yt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(-v,S),this._z=Math.atan2(-d,c)):(this._x=Math.atan2(x,g),this._z=0);break;case"YXZ":this._x=Math.asin(-Yt(v,-1,1)),Math.abs(v)<.9999999?(this._y=Math.atan2(f,S),this._z=Math.atan2(m,g)):(this._y=Math.atan2(-M,c),this._z=0);break;case"ZXY":this._x=Math.asin(Yt(x,-1,1)),Math.abs(x)<.9999999?(this._y=Math.atan2(-M,S),this._z=Math.atan2(-d,g)):(this._y=0,this._z=Math.atan2(m,c));break;case"ZYX":this._y=Math.asin(-Yt(M,-1,1)),Math.abs(M)<.9999999?(this._x=Math.atan2(x,S),this._z=Math.atan2(m,c)):(this._x=0,this._z=Math.atan2(-d,g));break;case"YZX":this._z=Math.asin(Yt(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(-v,g),this._y=Math.atan2(-M,c)):(this._x=0,this._y=Math.atan2(f,S));break;case"XZY":this._z=Math.asin(-Yt(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(x,g),this._y=Math.atan2(f,c)):(this._x=Math.atan2(-v,S),this._y=0);break;default:ot("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return KE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(KE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _E.setFromEuler(this),this.setFromQuaternion(_E,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}jo.DEFAULT_ORDER="XYZ";class km{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let uI=0;const $E=new J,$p=new Es,bc=new Zt,Cy=new J,DA=new J,dI=new J,fI=new Es,eC=new J(1,0,0),tC=new J(0,1,0),nC=new J(0,0,1),iC={type:"added"},hI={type:"removed"},em={type:"childadded",child:null},EM={type:"childremoved",child:null};class Hn extends Xo{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:uI++}),this.uuid=Ca(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Hn.DEFAULT_UP.clone();const e=new J,t=new jo,i=new Es,a=new J(1,1,1);function c(){i.setFromEuler(t,!1)}function d(){t.setFromQuaternion(i,void 0,!1)}t._onChange(c),i._onChange(d),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new Zt},normalMatrix:{value:new _t}}),this.matrix=new Zt,this.matrixWorld=new Zt,this.matrixAutoUpdate=Hn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Hn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new km,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return $p.setFromAxisAngle(e,t),this.quaternion.multiply($p),this}rotateOnWorldAxis(e,t){return $p.setFromAxisAngle(e,t),this.quaternion.premultiply($p),this}rotateX(e){return this.rotateOnAxis(eC,e)}rotateY(e){return this.rotateOnAxis(tC,e)}rotateZ(e){return this.rotateOnAxis(nC,e)}translateOnAxis(e,t){return $E.copy(e).applyQuaternion(this.quaternion),this.position.add($E.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(eC,e)}translateY(e){return this.translateOnAxis(tC,e)}translateZ(e){return this.translateOnAxis(nC,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(bc.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?Cy.copy(e):Cy.set(e,t,i);const a=this.parent;this.updateWorldMatrix(!0,!1),DA.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?bc.lookAt(DA,Cy,this.up):bc.lookAt(Cy,DA,this.up),this.quaternion.setFromRotationMatrix(bc),a&&(bc.extractRotation(a.matrixWorld),$p.setFromRotationMatrix(bc),this.quaternion.premultiply($p.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(kt("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(iC),em.child=e,this.dispatchEvent(em),em.child=null):kt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(hI),EM.child=e,this.dispatchEvent(EM),EM.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),bc.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),bc.multiply(e.parent.matrixWorld)),e.applyMatrix4(bc),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(iC),em.child=e,this.dispatchEvent(em),em.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,a=this.children.length;i<a;i++){const d=this.children[i].getObjectByProperty(e,t);if(d!==void 0)return d}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const a=this.children;for(let c=0,d=a.length;c<d;c++)a[c].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(DA,e,dI),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(DA,fI,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(e!==null){const t=e.x,i=e.y,a=e.z,c=this.matrix.elements;c[12]+=t-c[0]*t-c[4]*i-c[8]*a,c[13]+=i-c[1]*t-c[5]*i-c[9]*a,c[14]+=a-c[2]*t-c[6]*i-c[10]*a}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t,i=!1){const a=this.parent;if(e===!0&&a!==null&&a.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||i)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,i=!0),t===!0){const c=this.children;for(let d=0,f=c.length;d<f;d++)c[d].updateWorldMatrix(!1,!0,i)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const a={};a.uuid=this.uuid,a.type=this.type,this.name!==""&&(a.name=this.name),this.castShadow===!0&&(a.castShadow=!0),this.receiveShadow===!0&&(a.receiveShadow=!0),this.visible===!1&&(a.visible=!1),this.frustumCulled===!1&&(a.frustumCulled=!1),this.renderOrder!==0&&(a.renderOrder=this.renderOrder),this.static!==!1&&(a.static=this.static),Object.keys(this.userData).length>0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.pivot!==null&&(a.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(a.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(a.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.geometryInfo=this._geometryInfo.map(f=>({...f,boundingBox:f.boundingBox?f.boundingBox.toJSON():void 0,boundingSphere:f.boundingSphere?f.boundingSphere.toJSON():void 0})),a.instanceInfo=this._instanceInfo.map(f=>({...f})),a.availableInstanceIds=this._availableInstanceIds.slice(),a.availableGeometryIds=this._availableGeometryIds.slice(),a.nextIndexStart=this._nextIndexStart,a.nextVertexStart=this._nextVertexStart,a.geometryCount=this._geometryCount,a.maxInstanceCount=this._maxInstanceCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.matricesTexture=this._matricesTexture.toJSON(e),a.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(a.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(a.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(a.boundingBox=this.boundingBox.toJSON()));function c(f,m){return f[m.uuid]===void 0&&(f[m.uuid]=m.toJSON(e)),m.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=c(e.geometries,this.geometry);const f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0){const m=f.shapes;if(Array.isArray(m))for(let g=0,v=m.length;g<v;g++){const M=m[g];c(e.shapes,M)}else c(e.shapes,m)}}if(this.isSkinnedMesh&&(a.bindMode=this.bindMode,a.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(c(e.skeletons,this.skeleton),a.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const f=[];for(let m=0,g=this.material.length;m<g;m++)f.push(c(e.materials,this.material[m]));a.material=f}else a.material=c(e.materials,this.material);if(this.children.length>0){a.children=[];for(let f=0;f<this.children.length;f++)a.children.push(this.children[f].toJSON(e).object)}if(this.animations.length>0){a.animations=[];for(let f=0;f<this.animations.length;f++){const m=this.animations[f];a.animations.push(c(e.animations,m))}}if(t){const f=d(e.geometries),m=d(e.materials),g=d(e.textures),v=d(e.images),M=d(e.shapes),x=d(e.skeletons),S=d(e.animations),w=d(e.nodes);f.length>0&&(i.geometries=f),m.length>0&&(i.materials=m),g.length>0&&(i.textures=g),v.length>0&&(i.images=v),M.length>0&&(i.shapes=M),x.length>0&&(i.skeletons=x),S.length>0&&(i.animations=S),w.length>0&&(i.nodes=w)}return i.object=a,i;function d(f){const m=[];for(const g in f){const v=f[g];delete v.metadata,m.push(v)}return m}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const a=e.children[i];this.add(a.clone())}return this}}Hn.DEFAULT_UP=new J(0,1,0);Hn.DEFAULT_MATRIX_AUTO_UPDATE=!0;Hn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class Mm extends Hn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const pI={type:"move"};class Mb{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Mm,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Mm,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new J,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new J),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Mm,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new J,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new J,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let a=null,c=null,d=null;const f=this._targetRay,m=this._grip,g=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(g&&e.hand){d=!0;for(const k of e.hand.values()){const C=t.getJointPose(k,i),T=this._getHandJoint(g,k);C!==null&&(T.matrix.fromArray(C.transform.matrix),T.matrix.decompose(T.position,T.rotation,T.scale),T.matrixWorldNeedsUpdate=!0,T.jointRadius=C.radius),T.visible=C!==null}const v=g.joints["index-finger-tip"],M=g.joints["thumb-tip"],x=v.position.distanceTo(M.position),S=.02,w=.005;g.inputState.pinching&&x>S+w?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!g.inputState.pinching&&x<=S-w&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else m!==null&&e.gripSpace&&(c=t.getPose(e.gripSpace,i),c!==null&&(m.matrix.fromArray(c.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,c.linearVelocity?(m.hasLinearVelocity=!0,m.linearVelocity.copy(c.linearVelocity)):m.hasLinearVelocity=!1,c.angularVelocity?(m.hasAngularVelocity=!0,m.angularVelocity.copy(c.angularVelocity)):m.hasAngularVelocity=!1,m.eventsEnabled&&m.dispatchEvent({type:"gripUpdated",data:e,target:this})));f!==null&&(a=t.getPose(e.targetRaySpace,i),a===null&&c!==null&&(a=c),a!==null&&(f.matrix.fromArray(a.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,a.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(a.linearVelocity)):f.hasLinearVelocity=!1,a.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(a.angularVelocity)):f.hasAngularVelocity=!1,this.dispatchEvent(pI)))}return f!==null&&(f.visible=a!==null),m!==null&&(m.visible=c!==null),g!==null&&(g.visible=d!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Mm;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const H3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Iu={h:0,s:0,l:0},Ry={h:0,s:0,l:0};function CM(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class ut{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const a=e;a&&a.isColor?this.copy(a):typeof a=="number"?this.setHex(a):typeof a=="string"&&this.setStyle(a)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ss){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,wn.colorSpaceToWorking(this,t),this}setRGB(e,t,i,a=wn.workingColorSpace){return this.r=e,this.g=t,this.b=i,wn.colorSpaceToWorking(this,a),this}setHSL(e,t,i,a=wn.workingColorSpace){if(e=b1(e,1),t=Yt(t,0,1),i=Yt(i,0,1),t===0)this.r=this.g=this.b=i;else{const c=i<=.5?i*(1+t):i+t-i*t,d=2*i-c;this.r=CM(d,c,e+1/3),this.g=CM(d,c,e),this.b=CM(d,c,e-1/3)}return wn.colorSpaceToWorking(this,a),this}setStyle(e,t=ss){function i(c){c!==void 0&&parseFloat(c)<1&&ot("Color: Alpha component of "+e+" will be ignored.")}let a;if(a=/^(\w+)\(([^\)]*)\)/.exec(e)){let c;const d=a[1],f=a[2];switch(d){case"rgb":case"rgba":if(c=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setRGB(Math.min(255,parseInt(c[1],10))/255,Math.min(255,parseInt(c[2],10))/255,Math.min(255,parseInt(c[3],10))/255,t);if(c=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setRGB(Math.min(100,parseInt(c[1],10))/100,Math.min(100,parseInt(c[2],10))/100,Math.min(100,parseInt(c[3],10))/100,t);break;case"hsl":case"hsla":if(c=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setHSL(parseFloat(c[1])/360,parseFloat(c[2])/100,parseFloat(c[3])/100,t);break;default:ot("Color: Unknown color model "+e)}}else if(a=/^\#([A-Fa-f\d]+)$/.exec(e)){const c=a[1],d=c.length;if(d===3)return this.setRGB(parseInt(c.charAt(0),16)/15,parseInt(c.charAt(1),16)/15,parseInt(c.charAt(2),16)/15,t);if(d===6)return this.setHex(parseInt(c,16),t);ot("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ss){const i=H3[e.toLowerCase()];return i!==void 0?this.setHex(i,t):ot("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Pc(e.r),this.g=Pc(e.g),this.b=Pc(e.b),this}copyLinearToSRGB(e){return this.r=Tm(e.r),this.g=Tm(e.g),this.b=Tm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ss){return wn.workingToColorSpace(is.copy(this),e),Math.round(Yt(is.r*255,0,255))*65536+Math.round(Yt(is.g*255,0,255))*256+Math.round(Yt(is.b*255,0,255))}getHexString(e=ss){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=wn.workingColorSpace){wn.workingToColorSpace(is.copy(this),t);const i=is.r,a=is.g,c=is.b,d=Math.max(i,a,c),f=Math.min(i,a,c);let m,g;const v=(f+d)/2;if(f===d)m=0,g=0;else{const M=d-f;switch(g=v<=.5?M/(d+f):M/(2-d-f),d){case i:m=(a-c)/M+(a<c?6:0);break;case a:m=(c-i)/M+2;break;case c:m=(i-a)/M+4;break}m/=6}return e.h=m,e.s=g,e.l=v,e}getRGB(e,t=wn.workingColorSpace){return wn.workingToColorSpace(is.copy(this),t),e.r=is.r,e.g=is.g,e.b=is.b,e}getStyle(e=ss){wn.workingToColorSpace(is.copy(this),e);const t=is.r,i=is.g,a=is.b;return e!==ss?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${a.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(a*255)})`}offsetHSL(e,t,i){return this.getHSL(Iu),this.setHSL(Iu.h+e,Iu.s+t,Iu.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(Iu),e.getHSL(Ry);const i=rv(Iu.h,Ry.h,t),a=rv(Iu.s,Ry.s,t),c=rv(Iu.l,Ry.l,t);return this.setHSL(i,a,c),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,a=this.b,c=e.elements;return this.r=c[0]*t+c[3]*i+c[6]*a,this.g=c[1]*t+c[4]*i+c[7]*a,this.b=c[2]*t+c[5]*i+c[8]*a,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const is=new ut;ut.NAMES=H3;class Ox{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new ut(e),this.density=t}clone(){return new Ox(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Vx{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new ut(e),this.near=t,this.far=i}clone(){return new Vx(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}let S1=class extends Hn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new jo,this.environmentIntensity=1,this.environmentRotation=new jo,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}};const Vo=new J,xc=new J,RM=new J,Sc=new J,tm=new J,nm=new J,rC=new J,PM=new J,kM=new J,DM=new J,LM=new ni,IM=new ni,NM=new ni;class Qs{constructor(e=new J,t=new J,i=new J){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),Vo.subVectors(e,t),a.cross(Vo);const c=a.lengthSq();return c>0?a.multiplyScalar(1/Math.sqrt(c)):a.set(0,0,0)}static getBarycoord(e,t,i,a,c){Vo.subVectors(a,t),xc.subVectors(i,t),RM.subVectors(e,t);const d=Vo.dot(Vo),f=Vo.dot(xc),m=Vo.dot(RM),g=xc.dot(xc),v=xc.dot(RM),M=d*g-f*f;if(M===0)return c.set(0,0,0),null;const x=1/M,S=(g*m-f*v)*x,w=(d*v-f*m)*x;return c.set(1-S-w,w,S)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,Sc)===null?!1:Sc.x>=0&&Sc.y>=0&&Sc.x+Sc.y<=1}static getInterpolation(e,t,i,a,c,d,f,m){return this.getBarycoord(e,t,i,a,Sc)===null?(m.x=0,m.y=0,"z"in m&&(m.z=0),"w"in m&&(m.w=0),null):(m.setScalar(0),m.addScaledVector(c,Sc.x),m.addScaledVector(d,Sc.y),m.addScaledVector(f,Sc.z),m)}static getInterpolatedAttribute(e,t,i,a,c,d){return LM.setScalar(0),IM.setScalar(0),NM.setScalar(0),LM.fromBufferAttribute(e,t),IM.fromBufferAttribute(e,i),NM.fromBufferAttribute(e,a),d.setScalar(0),d.addScaledVector(LM,c.x),d.addScaledVector(IM,c.y),d.addScaledVector(NM,c.z),d}static isFrontFacing(e,t,i,a){return Vo.subVectors(i,t),xc.subVectors(e,t),Vo.cross(xc).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Vo.subVectors(this.c,this.b),xc.subVectors(this.a,this.b),Vo.cross(xc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Qs.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Qs.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,a,c){return Qs.getInterpolation(e,this.a,this.b,this.c,t,i,a,c)}containsPoint(e){return Qs.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Qs.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,a=this.b,c=this.c;let d,f;tm.subVectors(a,i),nm.subVectors(c,i),PM.subVectors(e,i);const m=tm.dot(PM),g=nm.dot(PM);if(m<=0&&g<=0)return t.copy(i);kM.subVectors(e,a);const v=tm.dot(kM),M=nm.dot(kM);if(v>=0&&M<=v)return t.copy(a);const x=m*M-v*g;if(x<=0&&m>=0&&v<=0)return d=m/(m-v),t.copy(i).addScaledVector(tm,d);DM.subVectors(e,c);const S=tm.dot(DM),w=nm.dot(DM);if(w>=0&&S<=w)return t.copy(c);const k=S*g-m*w;if(k<=0&&g>=0&&w<=0)return f=g/(g-w),t.copy(i).addScaledVector(nm,f);const C=v*w-S*M;if(C<=0&&M-v>=0&&S-w>=0)return rC.subVectors(c,a),f=(M-v)/(M-v+(S-w)),t.copy(a).addScaledVector(rC,f);const T=1/(C+k+x);return d=k*T,f=x*T,t.copy(i).addScaledVector(tm,d).addScaledVector(nm,f)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class os{constructor(e=new J(1/0,1/0,1/0),t=new J(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Ho.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Ho.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=Ho.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const c=i.getAttribute("position");if(t===!0&&c!==void 0&&e.isInstancedMesh!==!0)for(let d=0,f=c.count;d<f;d++)e.isMesh===!0?e.getVertexPosition(d,Ho):Ho.fromBufferAttribute(c,d),Ho.applyMatrix4(e.matrixWorld),this.expandByPoint(Ho);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Py.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Py.copy(i.boundingBox)),Py.applyMatrix4(e.matrixWorld),this.union(Py)}const a=e.children;for(let c=0,d=a.length;c<d;c++)this.expandByObject(a[c],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ho),Ho.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(LA),ky.subVectors(this.max,LA),im.subVectors(e.a,LA),rm.subVectors(e.b,LA),sm.subVectors(e.c,LA),Nu.subVectors(rm,im),zu.subVectors(sm,rm),vf.subVectors(im,sm);let t=[0,-Nu.z,Nu.y,0,-zu.z,zu.y,0,-vf.z,vf.y,Nu.z,0,-Nu.x,zu.z,0,-zu.x,vf.z,0,-vf.x,-Nu.y,Nu.x,0,-zu.y,zu.x,0,-vf.y,vf.x,0];return!zM(t,im,rm,sm,ky)||(t=[1,0,0,0,1,0,0,0,1],!zM(t,im,rm,sm,ky))?!1:(Dy.crossVectors(Nu,zu),t=[Dy.x,Dy.y,Dy.z],zM(t,im,rm,sm,ky))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ho).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ho).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Mc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Mc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Mc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Mc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Mc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Mc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Mc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Mc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Mc),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Mc=[new J,new J,new J,new J,new J,new J,new J,new J],Ho=new J,Py=new os,im=new J,rm=new J,sm=new J,Nu=new J,zu=new J,vf=new J,LA=new J,ky=new J,Dy=new J,yf=new J;function zM(s,e,t,i,a){for(let c=0,d=s.length-3;c<=d;c+=3){yf.fromArray(s,c);const f=a.x*Math.abs(yf.x)+a.y*Math.abs(yf.y)+a.z*Math.abs(yf.z),m=e.dot(yf),g=t.dot(yf),v=i.dot(yf);if(Math.max(-Math.max(m,g,v),Math.min(m,g,v))>f)return!1}return!0}const Rc=mI();function mI(){const s=new ArrayBuffer(4),e=new Float32Array(s),t=new Uint32Array(s),i=new Uint32Array(512),a=new Uint32Array(512);for(let m=0;m<256;++m){const g=m-127;g<-27?(i[m]=0,i[m|256]=32768,a[m]=24,a[m|256]=24):g<-14?(i[m]=1024>>-g-14,i[m|256]=1024>>-g-14|32768,a[m]=-g-1,a[m|256]=-g-1):g<=15?(i[m]=g+15<<10,i[m|256]=g+15<<10|32768,a[m]=13,a[m|256]=13):g<128?(i[m]=31744,i[m|256]=64512,a[m]=24,a[m|256]=24):(i[m]=31744,i[m|256]=64512,a[m]=13,a[m|256]=13)}const c=new Uint32Array(2048),d=new Uint32Array(64),f=new Uint32Array(64);for(let m=1;m<1024;++m){let g=m<<13,v=0;for(;(g&8388608)===0;)g<<=1,v-=8388608;g&=-8388609,v+=947912704,c[m]=g|v}for(let m=1024;m<2048;++m)c[m]=939524096+(m-1024<<13);for(let m=1;m<31;++m)d[m]=m<<23;d[31]=1199570944,d[32]=2147483648;for(let m=33;m<63;++m)d[m]=2147483648+(m-32<<23);d[63]=3347054592;for(let m=1;m<64;++m)m!==32&&(f[m]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:a,mantissaTable:c,exponentTable:d,offsetTable:f}}function Ys(s){Math.abs(s)>65504&&ot("DataUtils.toHalfFloat(): Value out of range."),s=Yt(s,-65504,65504),Rc.floatView[0]=s;const e=Rc.uint32View[0],t=e>>23&511;return Rc.baseTable[t]+((e&8388607)>>Rc.shiftTable[t])}function XA(s){const e=s>>10;return Rc.uint32View[0]=Rc.mantissaTable[Rc.offsetTable[e]+(s&1023)]+Rc.exponentTable[e],Rc.floatView[0]}class gI{static toHalfFloat(e){return Ys(e)}static fromHalfFloat(e){return XA(e)}}const ar=new J,Ly=new Oe;let AI=0;class si extends Xo{constructor(e,t,i=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:AI++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=pv,this.updateRanges=[],this.gpuType=ws,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let a=0,c=this.itemSize;a<c;a++)this.array[e+a]=t.array[i+a];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)Ly.fromBufferAttribute(this,t),Ly.applyMatrix3(e),this.setXY(t,Ly.x,Ly.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix3(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix4(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyNormalMatrix(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.transformDirection(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=Ms(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=un(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,a){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=a,this}setXYZW(e,t,i,a,c){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=a,this.array[e+3]=c,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==pv&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class vI extends si{constructor(e,t,i){super(new Int8Array(e),t,i)}}class yI extends si{constructor(e,t,i){super(new Uint8Array(e),t,i)}}class bI extends si{constructor(e,t,i){super(new Uint8ClampedArray(e),t,i)}}class xI extends si{constructor(e,t,i){super(new Int16Array(e),t,i)}}class M1 extends si{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class SI extends si{constructor(e,t,i){super(new Int32Array(e),t,i)}}class w1 extends si{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class MI extends si{constructor(e,t,i){super(new Uint16Array(e),t,i),this.isFloat16BufferAttribute=!0}getX(e){let t=XA(this.array[e*this.itemSize]);return this.normalized&&(t=Ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize]=Ys(t),this}getY(e){let t=XA(this.array[e*this.itemSize+1]);return this.normalized&&(t=Ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+1]=Ys(t),this}getZ(e){let t=XA(this.array[e*this.itemSize+2]);return this.normalized&&(t=Ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+2]=Ys(t),this}getW(e){let t=XA(this.array[e*this.itemSize+3]);return this.normalized&&(t=Ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+3]=Ys(t),this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this}setXYZ(e,t,i,a){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this.array[e+2]=Ys(a),this}setXYZW(e,t,i,a,c){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this.array[e+2]=Ys(a),this.array[e+3]=Ys(c),this}}class wt extends si{constructor(e,t,i){super(new Float32Array(e),t,i)}}const wI=new os,IA=new J,BM=new J;class Vr{constructor(e=new J,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):wI.setFromPoints(e).getCenter(i);let a=0;for(let c=0,d=e.length;c<d;c++)a=Math.max(a,i.distanceToSquared(e[c]));return this.radius=Math.sqrt(a),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;IA.subVectors(e,this.center);const t=IA.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.addScaledVector(IA,a/i),this.radius+=a}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(BM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(IA.copy(e.center).add(BM)),this.expandByPoint(IA.copy(e.center).sub(BM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let TI=0;const ro=new Zt,UM=new Hn,am=new J,wa=new os,NA=new os,Pr=new J;class rn extends Xo{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:TI++}),this.uuid=Ca(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(NL(e)?w1:M1)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const c=new _t().getNormalMatrix(e);i.applyNormalMatrix(c),i.needsUpdate=!0}const a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(e){return ro.makeRotationFromQuaternion(e),this.applyMatrix4(ro),this}rotateX(e){return ro.makeRotationX(e),this.applyMatrix4(ro),this}rotateY(e){return ro.makeRotationY(e),this.applyMatrix4(ro),this}rotateZ(e){return ro.makeRotationZ(e),this.applyMatrix4(ro),this}translate(e,t,i){return ro.makeTranslation(e,t,i),this.applyMatrix4(ro),this}scale(e,t,i){return ro.makeScale(e,t,i),this.applyMatrix4(ro),this}lookAt(e){return UM.lookAt(e),UM.updateMatrix(),this.applyMatrix4(UM.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(am).negate(),this.translate(am.x,am.y,am.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const i=[];for(let a=0,c=e.length;a<c;a++){const d=e[a];i.push(d.x,d.y,d.z||0)}this.setAttribute("position",new wt(i,3))}else{const i=Math.min(e.length,t.count);for(let a=0;a<i;a++){const c=e[a];t.setXYZ(a,c.x,c.y,c.z||0)}e.length>t.count&&ot("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new os);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new J(-1/0,-1/0,-1/0),new J(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,a=t.length;i<a;i++){const c=t[i];wa.setFromBufferAttribute(c),this.morphTargetsRelative?(Pr.addVectors(this.boundingBox.min,wa.min),this.boundingBox.expandByPoint(Pr),Pr.addVectors(this.boundingBox.max,wa.max),this.boundingBox.expandByPoint(Pr)):(this.boundingBox.expandByPoint(wa.min),this.boundingBox.expandByPoint(wa.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&kt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new J,1/0);return}if(e){const i=this.boundingSphere.center;if(wa.setFromBufferAttribute(e),t)for(let c=0,d=t.length;c<d;c++){const f=t[c];NA.setFromBufferAttribute(f),this.morphTargetsRelative?(Pr.addVectors(wa.min,NA.min),wa.expandByPoint(Pr),Pr.addVectors(wa.max,NA.max),wa.expandByPoint(Pr)):(wa.expandByPoint(NA.min),wa.expandByPoint(NA.max))}wa.getCenter(i);let a=0;for(let c=0,d=e.count;c<d;c++)Pr.fromBufferAttribute(e,c),a=Math.max(a,i.distanceToSquared(Pr));if(t)for(let c=0,d=t.length;c<d;c++){const f=t[c],m=this.morphTargetsRelative;for(let g=0,v=f.count;g<v;g++)Pr.fromBufferAttribute(f,g),m&&(am.fromBufferAttribute(e,g),Pr.add(am)),a=Math.max(a,i.distanceToSquared(Pr))}this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&kt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){kt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,a=t.normal,c=t.uv;let d=this.getAttribute("tangent");(d===void 0||d.count!==i.count)&&(d=new si(new Float32Array(4*i.count),4),this.setAttribute("tangent",d));const f=[],m=[];for(let I=0;I<i.count;I++)f[I]=new J,m[I]=new J;const g=new J,v=new J,M=new J,x=new Oe,S=new Oe,w=new Oe,k=new J,C=new J;function T(I,F,V){g.fromBufferAttribute(i,I),v.fromBufferAttribute(i,F),M.fromBufferAttribute(i,V),x.fromBufferAttribute(c,I),S.fromBufferAttribute(c,F),w.fromBufferAttribute(c,V),v.sub(g),M.sub(g),S.sub(x),w.sub(x);const X=1/(S.x*w.y-w.x*S.y);isFinite(X)&&(k.copy(v).multiplyScalar(w.y).addScaledVector(M,-S.y).multiplyScalar(X),C.copy(M).multiplyScalar(S.x).addScaledVector(v,-w.x).multiplyScalar(X),f[I].add(k),f[F].add(k),f[V].add(k),m[I].add(C),m[F].add(C),m[V].add(C))}let D=this.groups;D.length===0&&(D=[{start:0,count:e.count}]);for(let I=0,F=D.length;I<F;++I){const V=D[I],X=V.start,_=V.count;for(let K=X,le=X+_;K<le;K+=3)T(e.getX(K+0),e.getX(K+1),e.getX(K+2))}const z=new J,L=new J,O=new J,U=new J;function H(I){O.fromBufferAttribute(a,I),U.copy(O);const F=f[I];z.copy(F),z.sub(O.multiplyScalar(O.dot(F))).normalize(),L.crossVectors(U,F);const X=L.dot(m[I])<0?-1:1;d.setXYZW(I,z.x,z.y,z.z,X)}for(let I=0,F=D.length;I<F;++I){const V=D[I],X=V.start,_=V.count;for(let K=X,le=X+_;K<le;K+=3)H(e.getX(K+0)),H(e.getX(K+1)),H(e.getX(K+2))}this._transformed=!0}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0||i.count!==t.count)i=new si(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let x=0,S=i.count;x<S;x++)i.setXYZ(x,0,0,0);const a=new J,c=new J,d=new J,f=new J,m=new J,g=new J,v=new J,M=new J;if(e)for(let x=0,S=e.count;x<S;x+=3){const w=e.getX(x+0),k=e.getX(x+1),C=e.getX(x+2);a.fromBufferAttribute(t,w),c.fromBufferAttribute(t,k),d.fromBufferAttribute(t,C),v.subVectors(d,c),M.subVectors(a,c),v.cross(M),f.fromBufferAttribute(i,w),m.fromBufferAttribute(i,k),g.fromBufferAttribute(i,C),f.add(v),m.add(v),g.add(v),i.setXYZ(w,f.x,f.y,f.z),i.setXYZ(k,m.x,m.y,m.z),i.setXYZ(C,g.x,g.y,g.z)}else for(let x=0,S=t.count;x<S;x+=3)a.fromBufferAttribute(t,x+0),c.fromBufferAttribute(t,x+1),d.fromBufferAttribute(t,x+2),v.subVectors(d,c),M.subVectors(a,c),v.cross(M),i.setXYZ(x+0,v.x,v.y,v.z),i.setXYZ(x+1,v.x,v.y,v.z),i.setXYZ(x+2,v.x,v.y,v.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)Pr.fromBufferAttribute(e,t),Pr.normalize(),e.setXYZ(t,Pr.x,Pr.y,Pr.z)}toNonIndexed(){function e(f,m){const g=f.array,v=f.itemSize,M=f.normalized,x=new g.constructor(m.length*v);let S=0,w=0;for(let k=0,C=m.length;k<C;k++){f.isInterleavedBufferAttribute?S=m[k]*f.data.stride+f.offset:S=m[k]*v;for(let T=0;T<v;T++)x[w++]=g[S++]}return new si(x,v,M)}if(this.index===null)return ot("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new rn,i=this.index.array,a=this.attributes;for(const f in a){const m=a[f],g=e(m,i);t.setAttribute(f,g)}const c=this.morphAttributes;for(const f in c){const m=[],g=c[f];for(let v=0,M=g.length;v<M;v++){const x=g[v],S=e(x,i);m.push(S)}t.morphAttributes[f]=m}t.morphTargetsRelative=this.morphTargetsRelative;const d=this.groups;for(let f=0,m=d.length;f<m;f++){const g=d[f];t.addGroup(g.start,g.count,g.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.parameters!==void 0&&this._transformed===!0?"BufferGeometry":this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){const m=this.parameters;for(const g in m)m[g]!==void 0&&(e[g]=m[g]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const m in i){const g=i[m];e.data.attributes[m]=g.toJSON(e.data)}const a={};let c=!1;for(const m in this.morphAttributes){const g=this.morphAttributes[m],v=[];for(let M=0,x=g.length;M<x;M++){const S=g[M];v.push(S.toJSON(e.data))}v.length>0&&(a[m]=v,c=!0)}c&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);const d=this.groups;d.length>0&&(e.data.groups=JSON.parse(JSON.stringify(d)));const f=this.boundingSphere;return f!==null&&(e.data.boundingSphere=f.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const a=e.attributes;for(const g in a){const v=a[g];this.setAttribute(g,v.clone(t))}const c=e.morphAttributes;for(const g in c){const v=[],M=c[g];for(let x=0,S=M.length;x<S;x++)v.push(M[x].clone(t));this.morphAttributes[g]=v}this.morphTargetsRelative=e.morphTargetsRelative;const d=e.groups;for(let g=0,v=d.length;g<v;g++){const M=d[g];this.addGroup(M.start,M.count,M.materialIndex)}const f=e.boundingBox;f!==null&&(this.boundingBox=f.clone());const m=e.boundingSphere;return m!==null&&(this.boundingSphere=m.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this._transformed=e._transformed,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Hx{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=pv,this.updateRanges=[],this.version=0,this.uuid=Ca()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let a=0,c=this.stride;a<c;a++)this.array[e+a]=t.array[i+a];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ca()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ca()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const bs=new J;class Gf{constructor(e,t,i,a=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=a}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,i=this.data.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.applyMatrix4(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.applyNormalMatrix(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.transformDirection(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=Ms(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=un(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Ms(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Ms(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Ms(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Ms(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,a){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=a,this}setXYZW(e,t,i,a,c){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=a,this.data.array[e+3]=c,this}clone(e){if(e===void 0){gv("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const a=i*this.data.stride+this.offset;for(let c=0;c<this.itemSize;c++)t.push(this.data.array[a+c])}return new si(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Gf(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){gv("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const a=i*this.data.stride+this.offset;for(let c=0;c<this.itemSize;c++)t.push(this.data.array[a+c])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let EI=0;class Hr extends Xo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:EI++}),this.uuid=Ca(),this.name="",this.type="Material",this.blending=Uf,this.side=kc,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Rb,this.blendDst=Pb,this.blendEquation=Vu,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ut(0,0,0),this.blendAlpha=0,this.depthFunc=Vf,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=zw,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Df,this.stencilZFail=Df,this.stencilZPass=Df,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){ot(`Material: parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){ot(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}a&&a.isColor?a.set(i):a&&a.isVector2&&i&&i.isVector2||a&&a.isEuler&&i&&i.isEuler||a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Uf&&(i.blending=this.blending),this.side!==kc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Rb&&(i.blendSrc=this.blendSrc),this.blendDst!==Pb&&(i.blendDst=this.blendDst),this.blendEquation!==Vu&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Vf&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==zw&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Df&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Df&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Df&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function a(c){const d=[];for(const f in c){const m=c[f];delete m.metadata,d.push(m)}return d}if(t){const c=a(e.textures),d=a(e.images);c.length>0&&(i.textures=c),d.length>0&&(i.images=d)}return i}fromJSON(e,t){if(e.uuid!==void 0&&(this.uuid=e.uuid),e.name!==void 0&&(this.name=e.name),e.color!==void 0&&this.color!==void 0&&this.color.setHex(e.color),e.roughness!==void 0&&(this.roughness=e.roughness),e.metalness!==void 0&&(this.metalness=e.metalness),e.sheen!==void 0&&(this.sheen=e.sheen),e.sheenColor!==void 0&&(this.sheenColor=new ut().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(this.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(e.emissive),e.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(e.specular),e.specularIntensity!==void 0&&(this.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(this.shininess=e.shininess),e.clearcoat!==void 0&&(this.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(this.dispersion=e.dispersion),e.iridescence!==void 0&&(this.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(this.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(this.transmission=e.transmission),e.thickness!==void 0&&(this.thickness=e.thickness),e.attenuationDistance!==void 0&&(this.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(this.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(this.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(this.fog=e.fog),e.flatShading!==void 0&&(this.flatShading=e.flatShading),e.blending!==void 0&&(this.blending=e.blending),e.combine!==void 0&&(this.combine=e.combine),e.side!==void 0&&(this.side=e.side),e.shadowSide!==void 0&&(this.shadowSide=e.shadowSide),e.opacity!==void 0&&(this.opacity=e.opacity),e.transparent!==void 0&&(this.transparent=e.transparent),e.alphaTest!==void 0&&(this.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(this.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(this.depthFunc=e.depthFunc),e.depthTest!==void 0&&(this.depthTest=e.depthTest),e.depthWrite!==void 0&&(this.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(this.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(this.blendSrc=e.blendSrc),e.blendDst!==void 0&&(this.blendDst=e.blendDst),e.blendEquation!==void 0&&(this.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(this.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(this.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(this.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(this.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(this.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(this.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(this.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(this.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(this.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(this.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(this.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(this.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(this.rotation=e.rotation),e.linewidth!==void 0&&(this.linewidth=e.linewidth),e.dashSize!==void 0&&(this.dashSize=e.dashSize),e.gapSize!==void 0&&(this.gapSize=e.gapSize),e.scale!==void 0&&(this.scale=e.scale),e.polygonOffset!==void 0&&(this.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(this.dithering=e.dithering),e.alphaToCoverage!==void 0&&(this.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(this.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(this.allowOverride=e.allowOverride),e.visible!==void 0&&(this.visible=e.visible),e.toneMapped!==void 0&&(this.toneMapped=e.toneMapped),e.userData!==void 0&&(this.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?this.vertexColors=e.vertexColors>0:this.vertexColors=e.vertexColors),e.size!==void 0&&(this.size=e.size),e.sizeAttenuation!==void 0&&(this.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(this.map=t[e.map]||null),e.matcap!==void 0&&(this.matcap=t[e.matcap]||null),e.alphaMap!==void 0&&(this.alphaMap=t[e.alphaMap]||null),e.bumpMap!==void 0&&(this.bumpMap=t[e.bumpMap]||null),e.bumpScale!==void 0&&(this.bumpScale=e.bumpScale),e.normalMap!==void 0&&(this.normalMap=t[e.normalMap]||null),e.normalMapType!==void 0&&(this.normalMapType=e.normalMapType),e.normalScale!==void 0){let i=e.normalScale;Array.isArray(i)===!1&&(i=[i,i]),this.normalScale=new Oe().fromArray(i)}return e.displacementMap!==void 0&&(this.displacementMap=t[e.displacementMap]||null),e.displacementScale!==void 0&&(this.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(this.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(this.roughnessMap=t[e.roughnessMap]||null),e.metalnessMap!==void 0&&(this.metalnessMap=t[e.metalnessMap]||null),e.emissiveMap!==void 0&&(this.emissiveMap=t[e.emissiveMap]||null),e.emissiveIntensity!==void 0&&(this.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(this.specularMap=t[e.specularMap]||null),e.specularIntensityMap!==void 0&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),e.specularColorMap!==void 0&&(this.specularColorMap=t[e.specularColorMap]||null),e.envMap!==void 0&&(this.envMap=t[e.envMap]||null),e.envMapRotation!==void 0&&this.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(this.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(this.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(this.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(this.lightMap=t[e.lightMap]||null),e.lightMapIntensity!==void 0&&(this.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(this.aoMap=t[e.aoMap]||null),e.aoMapIntensity!==void 0&&(this.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(this.gradientMap=t[e.gradientMap]||null),e.clearcoatMap!==void 0&&(this.clearcoatMap=t[e.clearcoatMap]||null),e.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),e.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),e.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new Oe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(this.iridescenceMap=t[e.iridescenceMap]||null),e.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),e.transmissionMap!==void 0&&(this.transmissionMap=t[e.transmissionMap]||null),e.thicknessMap!==void 0&&(this.thicknessMap=t[e.thicknessMap]||null),e.anisotropyMap!==void 0&&(this.anisotropyMap=t[e.anisotropyMap]||null),e.sheenColorMap!==void 0&&(this.sheenColorMap=t[e.sheenColorMap]||null),e.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const a=t.length;i=new Array(a);for(let c=0;c!==a;++c)i[c]=t[c].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class T1 extends Hr{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new ut(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let om;const zA=new J,lm=new J,cm=new J,um=new Oe,BA=new Oe,G3=new Zt,Iy=new J,UA=new J,Ny=new J,sC=new Oe,FM=new Oe,aC=new Oe;class W3 extends Hn{constructor(e=new T1){if(super(),this.isSprite=!0,this.type="Sprite",om===void 0){om=new rn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new Hx(t,5);om.setIndex([0,1,2,0,2,3]),om.setAttribute("position",new Gf(i,3,0,!1)),om.setAttribute("uv",new Gf(i,2,3,!1))}this.geometry=om,this.material=e,this.center=new Oe(.5,.5),this.count=1}raycast(e,t){e.camera===null&&kt('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),lm.setFromMatrixScale(this.matrixWorld),G3.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),cm.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&lm.multiplyScalar(-cm.z);const i=this.material.rotation;let a,c;i!==0&&(c=Math.cos(i),a=Math.sin(i));const d=this.center;zy(Iy.set(-.5,-.5,0),cm,d,lm,a,c),zy(UA.set(.5,-.5,0),cm,d,lm,a,c),zy(Ny.set(.5,.5,0),cm,d,lm,a,c),sC.set(0,0),FM.set(1,0),aC.set(1,1);let f=e.ray.intersectTriangle(Iy,UA,Ny,!1,zA);if(f===null&&(zy(UA.set(-.5,.5,0),cm,d,lm,a,c),FM.set(0,1),f=e.ray.intersectTriangle(Iy,Ny,UA,!1,zA),f===null))return;const m=e.ray.origin.distanceTo(zA);m<e.near||m>e.far||t.push({distance:m,point:zA.clone(),uv:Qs.getInterpolation(zA,Iy,UA,Ny,sC,FM,aC,new Oe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function zy(s,e,t,i,a,c){um.subVectors(s,t).addScalar(.5).multiply(i),a!==void 0?(BA.x=c*um.x-a*um.y,BA.y=a*um.x+c*um.y):BA.copy(um),s.copy(e),s.x+=BA.x,s.y+=BA.y,s.applyMatrix4(G3)}const By=new J,oC=new J;class j3 extends Hn{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,a=t.length;i<a;i++){const c=t[i];this.addLevel(c.object.clone(),c.distance,c.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,i=0){t=Math.abs(t);const a=this.levels;let c;for(c=0;c<a.length&&!(t<a[c].distance);c++);return a.splice(c,0,{distance:t,hysteresis:i,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let i=0;i<t.length;i++)if(t[i].distance===e){const a=t.splice(i,1);return this.remove(a[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let i,a;for(i=1,a=t.length;i<a;i++){let c=t[i].distance;if(t[i].object.visible&&(c-=c*t[i].hysteresis),e<c)break}return t[i-1].object}return null}raycast(e,t){if(this.levels.length>0){By.setFromMatrixPosition(this.matrixWorld);const a=e.ray.origin.distanceTo(By);this.getObjectForDistance(a).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){By.setFromMatrixPosition(e.matrixWorld),oC.setFromMatrixPosition(this.matrixWorld);const i=By.distanceTo(oC)/e.zoom;t[0].object.visible=!0;let a,c;for(a=1,c=t.length;a<c;a++){let d=t[a].distance;if(t[a].object.visible&&(d-=d*t[a].hysteresis),i>=d)t[a-1].object.visible=!1,t[a].object.visible=!0;else break}for(this._currentLevel=a-1;a<c;a++)t[a].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const i=this.levels;for(let a=0,c=i.length;a<c;a++){const d=i[a];t.object.levels.push({object:d.object.uuid,distance:d.distance,hysteresis:d.hysteresis})}return t}}const wc=new J,OM=new J,Uy=new J,Bu=new J,VM=new J,Fy=new J,HM=new J;class Um{constructor(e=new J,t=new J(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,wc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=wc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(wc.copy(this.origin).addScaledVector(this.direction,t),wc.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){OM.copy(e).add(t).multiplyScalar(.5),Uy.copy(t).sub(e).normalize(),Bu.copy(this.origin).sub(OM);const c=e.distanceTo(t)*.5,d=-this.direction.dot(Uy),f=Bu.dot(this.direction),m=-Bu.dot(Uy),g=Bu.lengthSq(),v=Math.abs(1-d*d);let M,x,S,w;if(v>0)if(M=d*m-f,x=d*f-m,w=c*v,M>=0)if(x>=-w)if(x<=w){const k=1/v;M*=k,x*=k,S=M*(M+d*x+2*f)+x*(d*M+x+2*m)+g}else x=c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;else x=-c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;else x<=-w?(M=Math.max(0,-(-d*c+f)),x=M>0?-c:Math.min(Math.max(-c,-m),c),S=-M*M+x*(x+2*m)+g):x<=w?(M=0,x=Math.min(Math.max(-c,-m),c),S=x*(x+2*m)+g):(M=Math.max(0,-(d*c+f)),x=M>0?c:Math.min(Math.max(-c,-m),c),S=-M*M+x*(x+2*m)+g);else x=d>0?-c:c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;return i&&i.copy(this.origin).addScaledVector(this.direction,M),a&&a.copy(OM).addScaledVector(Uy,x),S}intersectSphere(e,t){wc.subVectors(e.center,this.origin);const i=wc.dot(this.direction),a=wc.dot(wc)-i*i,c=e.radius*e.radius;if(a>c)return null;const d=Math.sqrt(c-a),f=i-d,m=i+d;return m<0?null:f<0?this.at(m,t):this.at(f,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,c,d,f,m;const g=1/this.direction.x,v=1/this.direction.y,M=1/this.direction.z,x=this.origin;return g>=0?(i=(e.min.x-x.x)*g,a=(e.max.x-x.x)*g):(i=(e.max.x-x.x)*g,a=(e.min.x-x.x)*g),v>=0?(c=(e.min.y-x.y)*v,d=(e.max.y-x.y)*v):(c=(e.max.y-x.y)*v,d=(e.min.y-x.y)*v),i>d||c>a||((c>i||isNaN(i))&&(i=c),(d<a||isNaN(a))&&(a=d),M>=0?(f=(e.min.z-x.z)*M,m=(e.max.z-x.z)*M):(f=(e.max.z-x.z)*M,m=(e.min.z-x.z)*M),i>m||f>a)||((f>i||i!==i)&&(i=f),(m<a||a!==a)&&(a=m),a<0)?null:this.at(i>=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,wc)!==null}intersectTriangle(e,t,i,a,c){VM.subVectors(t,e),Fy.subVectors(i,e),HM.crossVectors(VM,Fy);let d=this.direction.dot(HM),f;if(d>0){if(a)return null;f=1}else if(d<0)f=-1,d=-d;else return null;Bu.subVectors(this.origin,e);const m=f*this.direction.dot(Fy.crossVectors(Bu,Fy));if(m<0)return null;const g=f*this.direction.dot(VM.cross(Bu));if(g<0||m+g>d)return null;const v=-f*Bu.dot(HM);return v<0?null:this.at(v/d,c)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ku extends Hr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new jo,this.combine=wv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const lC=new Zt,bf=new Um,Oy=new Vr,cC=new J,Vy=new J,Hy=new J,Gy=new J,GM=new J,Wy=new J,uC=new J,jy=new J;class or extends Hn{constructor(e=new rn,t=new Ku){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}getVertexPosition(e,t){const i=this.geometry,a=i.attributes.position,c=i.morphAttributes.position,d=i.morphTargetsRelative;t.fromBufferAttribute(a,e);const f=this.morphTargetInfluences;if(c&&f){Wy.set(0,0,0);for(let m=0,g=c.length;m<g;m++){const v=f[m],M=c[m];v!==0&&(GM.fromBufferAttribute(M,e),d?Wy.addScaledVector(GM,v):Wy.addScaledVector(GM.sub(t),v))}t.add(Wy)}return t}raycast(e,t){const i=this.geometry,a=this.material,c=this.matrixWorld;a!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Oy.copy(i.boundingSphere),Oy.applyMatrix4(c),bf.copy(e.ray).recast(e.near),!(Oy.containsPoint(bf.origin)===!1&&(bf.intersectSphere(Oy,cC)===null||bf.origin.distanceToSquared(cC)>(e.far-e.near)**2))&&(lC.copy(c).invert(),bf.copy(e.ray).applyMatrix4(lC),!(i.boundingBox!==null&&bf.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,bf)))}_computeIntersections(e,t,i){let a;const c=this.geometry,d=this.material,f=c.index,m=c.attributes.position,g=c.attributes.uv,v=c.attributes.uv1,M=c.attributes.normal,x=c.groups,S=c.drawRange;if(f!==null)if(Array.isArray(d))for(let w=0,k=x.length;w<k;w++){const C=x[w],T=d[C.materialIndex],D=Math.max(C.start,S.start),z=Math.min(f.count,Math.min(C.start+C.count,S.start+S.count));for(let L=D,O=z;L<O;L+=3){const U=f.getX(L),H=f.getX(L+1),I=f.getX(L+2);a=Xy(this,T,e,i,g,v,M,U,H,I),a&&(a.faceIndex=Math.floor(L/3),a.face.materialIndex=C.materialIndex,t.push(a))}}else{const w=Math.max(0,S.start),k=Math.min(f.count,S.start+S.count);for(let C=w,T=k;C<T;C+=3){const D=f.getX(C),z=f.getX(C+1),L=f.getX(C+2);a=Xy(this,d,e,i,g,v,M,D,z,L),a&&(a.faceIndex=Math.floor(C/3),t.push(a))}}else if(m!==void 0)if(Array.isArray(d))for(let w=0,k=x.length;w<k;w++){const C=x[w],T=d[C.materialIndex],D=Math.max(C.start,S.start),z=Math.min(m.count,Math.min(C.start+C.count,S.start+S.count));for(let L=D,O=z;L<O;L+=3){const U=L,H=L+1,I=L+2;a=Xy(this,T,e,i,g,v,M,U,H,I),a&&(a.faceIndex=Math.floor(L/3),a.face.materialIndex=C.materialIndex,t.push(a))}}else{const w=Math.max(0,S.start),k=Math.min(m.count,S.start+S.count);for(let C=w,T=k;C<T;C+=3){const D=C,z=C+1,L=C+2;a=Xy(this,d,e,i,g,v,M,D,z,L),a&&(a.faceIndex=Math.floor(C/3),t.push(a))}}}}function CI(s,e,t,i,a,c,d,f){let m;if(e.side===Ts?m=i.intersectTriangle(d,c,a,!0,f):m=i.intersectTriangle(a,c,d,e.side===kc,f),m===null)return null;jy.copy(f),jy.applyMatrix4(s.matrixWorld);const g=t.ray.origin.distanceTo(jy);return g<t.near||g>t.far?null:{distance:g,point:jy.clone(),object:s}}function Xy(s,e,t,i,a,c,d,f,m,g){s.getVertexPosition(f,Vy),s.getVertexPosition(m,Hy),s.getVertexPosition(g,Gy);const v=CI(s,e,t,i,Vy,Hy,Gy,uC);if(v){const M=new J;Qs.getBarycoord(uC,Vy,Hy,Gy,M),a&&(v.uv=Qs.getInterpolatedAttribute(a,f,m,g,M,new Oe)),c&&(v.uv1=Qs.getInterpolatedAttribute(c,f,m,g,M,new Oe)),d&&(v.normal=Qs.getInterpolatedAttribute(d,f,m,g,M,new J),v.normal.dot(i.direction)>0&&v.normal.multiplyScalar(-1));const x={a:f,b:m,c:g,normal:new J,materialIndex:0};Qs.getNormal(Vy,Hy,Gy,x.normal),v.face=x,v.barycoord=M}return v}const FA=new ni,dC=new ni,fC=new ni,RI=new ni,hC=new Zt,qy=new J,WM=new Vr,pC=new Zt,jM=new Um;class X3 extends or{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Iw,this.bindMatrix=new Zt,this.bindMatrixInverse=new Zt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new os),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,qy),this.boundingBox.expandByPoint(qy)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Vr),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,qy),this.boundingSphere.expandByPoint(qy)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const i=this.material,a=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),WM.copy(this.boundingSphere),WM.applyMatrix4(a),e.ray.intersectsSphere(WM)!==!1&&(pC.copy(a).invert(),jM.copy(e.ray).applyMatrix4(pC),!(this.boundingBox!==null&&jM.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,jM)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ni,t=this.geometry.attributes.skinWeight;for(let i=0,a=t.count;i<a;i++){e.fromBufferAttribute(t,i);const c=1/e.manhattanLength();c!==1/0?e.multiplyScalar(c):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Iw?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===T3?this.bindMatrixInverse.copy(this.bindMatrix).invert():ot("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,a=this.geometry;dC.fromBufferAttribute(a.attributes.skinIndex,e),fC.fromBufferAttribute(a.attributes.skinWeight,e),t.isVector4?(FA.copy(t),t.set(0,0,0,0)):(FA.set(...t,1),t.set(0,0,0)),FA.applyMatrix4(this.bindMatrix);for(let c=0;c<4;c++){const d=fC.getComponent(c);if(d!==0){const f=dC.getComponent(c);hC.multiplyMatrices(i.bones[f].matrixWorld,i.boneInverses[f]),t.addScaledVector(RI.copy(FA).applyMatrix4(hC),d)}}return t.isVector4&&(t.w=FA.w),t.applyMatrix4(this.bindMatrixInverse)}}class E1 extends Hn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ao extends Di{constructor(e=null,t=1,i=1,a,c,d,f,m,g=Ji,v=Ji,M,x){super(null,d,f,m,g,v,a,c,M,x),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const mC=new Zt,PI=new Zt;class Gx{constructor(e=[],t=[]){this.uuid=Ca(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){ot("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,a=this.bones.length;i<a;i++)this.boneInverses.push(new Zt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new Zt;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,a=this.boneTexture;for(let c=0,d=e.length;c<d;c++){const f=e[c]?e[c].matrixWorld:PI;mC.multiplyMatrices(f,t[c]),mC.toArray(i,c*16)}a!==null&&(a.needsUpdate=!0)}clone(){return new Gx(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const i=new ao(t,e,e,as,ws);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const a=this.bones[t];if(a.name===e)return a}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,a=e.bones.length;i<a;i++){const c=e.bones[i];let d=t[c];d===void 0&&(ot("Skeleton: No bone found with UUID:",c),d=new E1),this.bones.push(d),this.boneInverses.push(new Zt().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let a=0,c=t.length;a<c;a++){const d=t[a];e.bones.push(d.uuid);const f=i[a];e.boneInverses.push(f.toArray())}return e}}class Dm extends si{constructor(e,t,i,a=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=a}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const dm=new Zt,gC=new Zt,Yy=[],AC=new os,kI=new Zt,OA=new or,VA=new Vr;class q3 extends or{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Dm(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let a=0;a<i;a++)this.setMatrixAt(a,kI)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new os),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,dm),AC.copy(e.boundingBox).applyMatrix4(dm),this.boundingBox.union(AC)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Vr),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,dm),VA.copy(e.boundingSphere).applyMatrix4(dm),this.boundingSphere.union(VA)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const i=t.morphTargetInfluences,a=this.morphTexture.source.data.data,c=i.length+1,d=e*c+1;for(let f=0;f<i.length;f++)i[f]=a[d+f]}raycast(e,t){const i=this.matrixWorld,a=this.count;if(OA.geometry=this.geometry,OA.material=this.material,OA.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),VA.copy(this.boundingSphere),VA.applyMatrix4(i),e.ray.intersectsSphere(VA)!==!1))for(let c=0;c<a;c++){this.getMatrixAt(c,dm),gC.multiplyMatrices(i,dm),OA.matrixWorld=gC,OA.raycast(e,Yy);for(let d=0,f=Yy.length;d<f;d++){const m=Yy[d];m.instanceId=c,m.object=this,t.push(m)}Yy.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new Dm(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){const i=t.morphTargetInfluences,a=i.length+1;this.morphTexture===null&&(this.morphTexture=new ao(new Float32Array(a*this.count),a,this.count,Dx,ws));const c=this.morphTexture.source.data.data;let d=0;for(let g=0;g<i.length;g++)d+=i[g];const f=this.geometry.morphTargetsRelative?1:1-d,m=a*e;return c[m]=f,c.set(i,m+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const XM=new J,DI=new J,LI=new _t;class Ou{constructor(e=new J(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const a=XM.subVectors(i,t).cross(DI.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,i=!0){const a=e.delta(XM),c=this.normal.dot(a);if(c===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const d=-(e.start.dot(this.normal)+this.constant)/c;return i===!0&&(d<0||d>1)?null:t.copy(e.start).addScaledVector(a,d)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||LI.getNormalMatrix(e),a=this.coplanarPoint(XM).applyMatrix4(e),c=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(c),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const xf=new Vr,II=new Oe(.5,.5),Jy=new J;class Wf{constructor(e=new Ou,t=new Ou,i=new Ou,a=new Ou,c=new Ou,d=new Ou){this.planes=[e,t,i,a,c,d]}set(e,t,i,a,c,d){const f=this.planes;return f[0].copy(e),f[1].copy(t),f[2].copy(i),f[3].copy(a),f[4].copy(c),f[5].copy(d),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Ea,i=!1){const a=this.planes,c=e.elements,d=c[0],f=c[1],m=c[2],g=c[3],v=c[4],M=c[5],x=c[6],S=c[7],w=c[8],k=c[9],C=c[10],T=c[11],D=c[12],z=c[13],L=c[14],O=c[15];if(a[0].setComponents(g-d,S-v,T-w,O-D).normalize(),a[1].setComponents(g+d,S+v,T+w,O+D).normalize(),a[2].setComponents(g+f,S+M,T+k,O+z).normalize(),a[3].setComponents(g-f,S-M,T-k,O-z).normalize(),i)a[4].setComponents(m,x,C,L).normalize(),a[5].setComponents(g-m,S-x,T-C,O-L).normalize();else if(a[4].setComponents(g-m,S-x,T-C,O-L).normalize(),t===Ea)a[5].setComponents(g+m,S+x,T+C,O+L).normalize();else if(t===Hf)a[5].setComponents(m,x,C,L).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),xf.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),xf.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(xf)}intersectsSprite(e){xf.center.set(0,0,0);const t=II.distanceTo(e.center);return xf.radius=.7071067811865476+t,xf.applyMatrix4(e.matrixWorld),this.intersectsSphere(xf)}intersectsSphere(e){const t=this.planes,i=e.center,a=-e.radius;for(let c=0;c<6;c++)if(t[c].distanceToPoint(i)<a)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const a=t[i];if(Jy.x=a.normal.x>0?e.max.x:e.min.x,Jy.y=a.normal.y>0?e.max.y:e.min.y,Jy.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(Jy)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const vC=new Zt;class Wx{constructor(){this.coordinateSystem=Ea,this._frustums=[],this._count=0}setFromArrayCamera(e){const t=e.cameras,i=this._frustums;for(let a=0;a<t.length;a++){const c=t[a];vC.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),i[a]===void 0&&(i[a]=new Wf),i[a].setFromProjectionMatrix(vC,c.coordinateSystem,c.reversedDepth)}return this._count=t.length,this}intersectsObject(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsObject(e))return!0;return!1}intersectsSprite(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsSprite(e))return!0;return!1}intersectsSphere(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsSphere(e))return!0;return!1}intersectsBox(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsBox(e))return!0;return!1}containsPoint(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].containsPoint(e))return!0;return!1}copy(e){this.coordinateSystem=e.coordinateSystem;const t=this._frustums,i=e._frustums;for(let a=0;a<e._count;a++)t[a]===void 0&&(t[a]=new Wf),t[a].copy(i[a]);return this._count=e._count,this}clone(){return new Wx().copy(this)}}function qM(s,e){return s-e}function NI(s,e){return s.z-e.z}function zI(s,e){return e.z-s.z}class BI{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,a){const c=this.pool,d=this.list;this.index>=c.length&&c.push({start:-1,count:-1,z:-1,index:-1});const f=c[this.index];d.push(f),this.index++,f.start=e,f.count=t,f.z=i,f.index=a}reset(){this.list.length=0,this.index=0}}const qs=new Zt,UI=new ut(1,1,1),FI=new Wf,OI=new Wx,Qy=new os,Sf=new Vr,HA=new J,yC=new J,VI=new J,YM=new BI,rs=new or,Zy=[];function HI(s,e,t=0){const i=e.itemSize;if(s.isInterleavedBufferAttribute||s.array.constructor!==e.array.constructor){const a=s.count;for(let c=0;c<a;c++)for(let d=0;d<i;d++)e.setComponent(c+t,d,s.getComponent(c,d))}else e.array.set(s.array,t*i);e.needsUpdate=!0}function Mf(s,e){if(s.constructor!==e.constructor){const t=Math.min(s.length,e.length);for(let i=0;i<t;i++)e[i]=s[i]}else{const t=Math.min(s.length,e.length);e.set(new s.constructor(s.buffer,0,t))}}class Y3 extends or{constructor(e,t,i=t*2,a){super(new rn,a),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),i=new ao(t,e,e,as,ws);this._matricesTexture=i}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),i=new ao(t,e,e,Tv,oo);this._indirectTexture=i}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),i=new ao(t,e,e,as,ws);i.colorSpace=wn.workingColorSpace,this._colorsTexture=i}_initializeGeometry(e){const t=this.geometry,i=this._maxVertexCount,a=this._maxIndexCount;if(this._geometryInitialized===!1){for(const c in e.attributes){const d=e.getAttribute(c),{array:f,itemSize:m,normalized:g}=d,v=new f.constructor(i*m),M=new si(v,m,g);t.setAttribute(c,M)}if(e.getIndex()!==null){const c=i>65535?new Uint32Array(a):new Uint16Array(a);t.setIndex(new si(c,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const a=e.getAttribute(i),c=t.getAttribute(i);if(a.itemSize!==c.itemSize||a.normalized!==c.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new os);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,a=t.length;i<a;i++){if(t[i].active===!1)continue;const c=t[i].geometryIndex;this.getMatrixAt(i,qs),this.getBoundingBoxAt(c,Qy).applyMatrix4(qs),e.union(Qy)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vr);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let i=0,a=t.length;i<a;i++){if(t[i].active===!1)continue;const c=t[i].geometryIndex;this.getMatrixAt(i,qs),this.getBoundingSphereAt(c,Sf).applyMatrix4(qs),e.union(Sf)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let a=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(qM),a=this._availableInstanceIds.shift(),this._instanceInfo[a]=i):(a=this._instanceInfo.length,this._instanceInfo.push(i));const c=this._matricesTexture;qs.identity().toArray(c.image.data,a*16),c.needsUpdate=!0;const d=this._colorsTexture;return d&&(UI.toArray(d.image.data,a*4),d.needsUpdate=!0),this._visibilityChanged=!0,a}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const a={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},c=this._geometryInfo;a.vertexStart=this._nextVertexStart,a.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const d=e.getIndex();if(d!==null&&(a.indexStart=this._nextIndexStart,a.reservedIndexCount=i===-1?d.count:i),a.indexStart!==-1&&a.indexStart+a.reservedIndexCount>this._maxIndexCount||a.vertexStart+a.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let m;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(qM),m=this._availableGeometryIds.shift(),c[m]=a):(m=this._geometryCount,this._geometryCount++,c.push(a)),this.setGeometryAt(m,e),this._nextIndexStart=a.indexStart+a.reservedIndexCount,this._nextVertexStart=a.vertexStart+a.reservedVertexCount,m}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,a=i.getIndex()!==null,c=i.getIndex(),d=t.getIndex(),f=this._geometryInfo[e];if(a&&d.count>f.reservedIndexCount||t.attributes.position.count>f.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const m=f.vertexStart,g=f.reservedVertexCount;f.vertexCount=t.getAttribute("position").count;for(const v in i.attributes){const M=t.getAttribute(v),x=i.getAttribute(v);HI(M,x,m);const S=M.itemSize;for(let w=M.count,k=g;w<k;w++){const C=m+w;for(let T=0;T<S;T++)x.setComponent(C,T,0)}x.needsUpdate=!0,x.addUpdateRange(m*S,g*S)}if(a){const v=f.indexStart,M=f.reservedIndexCount;f.indexCount=t.getIndex().count;for(let x=0;x<d.count;x++)c.setX(v+x,m+d.getX(x));for(let x=d.count,S=M;x<S;x++)c.setX(v+x,m);c.needsUpdate=!0,c.addUpdateRange(v,f.reservedIndexCount)}return f.start=a?f.indexStart:f.vertexStart,f.count=a?f.indexCount:f.vertexCount,f.boundingBox=null,t.boundingBox!==null&&(f.boundingBox=t.boundingBox.clone()),f.boundingSphere=null,t.boundingSphere!==null&&(f.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let a=0,c=i.length;a<c;a++)i[a].active&&i[a].geometryIndex===e&&this.deleteInstance(a);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const i=this._geometryInfo,a=i.map((d,f)=>f).sort((d,f)=>i[d].vertexStart-i[f].vertexStart),c=this.geometry;for(let d=0,f=i.length;d<f;d++){const m=a[d],g=i[m];if(g.active!==!1){if(c.index!==null){if(g.indexStart!==t){const{indexStart:v,vertexStart:M,reservedIndexCount:x}=g,S=c.index,w=S.array,k=e-M;for(let C=v;C<v+x;C++)w[C]=w[C]+k;S.array.copyWithin(t,v,v+x),S.addUpdateRange(t,x),S.needsUpdate=!0,g.indexStart=t}t+=g.reservedIndexCount}if(g.vertexStart!==e){const{vertexStart:v,reservedVertexCount:M}=g,x=c.attributes;for(const S in x){const w=x[S],{array:k,itemSize:C}=w;k.copyWithin(e*C,v*C,(v+M)*C),w.addUpdateRange(e*C,M*C),w.needsUpdate=!0}g.vertexStart=e}e+=g.reservedVertexCount,g.start=c.index?g.indexStart:g.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,a=this._geometryInfo[e];if(a.boundingBox===null){const c=new os,d=i.index,f=i.attributes.position;for(let m=a.start,g=a.start+a.count;m<g;m++){let v=m;d&&(v=d.getX(v)),c.expandByPoint(HA.fromBufferAttribute(f,v))}a.boundingBox=c}return t.copy(a.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,a=this._geometryInfo[e];if(a.boundingSphere===null){const c=new Vr;this.getBoundingBoxAt(e,Qy),Qy.getCenter(c.center);const d=i.index,f=i.attributes.position;let m=0;for(let g=a.start,v=a.start+a.count;g<v;g++){let M=g;d&&(M=d.getX(M)),HA.fromBufferAttribute(f,M),m=Math.max(m,c.center.distanceToSquared(HA))}c.radius=Math.sqrt(m),a.boundingSphere=c}return t.copy(a.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const i=this._matricesTexture,a=this._matricesTexture.image.data;return t.toArray(a,e*16),i.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const i=this._geometryInfo[e];return t.vertexStart=i.vertexStart,t.vertexCount=i.vertexCount,t.reservedVertexCount=i.reservedVertexCount,t.indexStart=i.indexStart,t.indexCount=i.indexCount,t.reservedIndexCount=i.reservedIndexCount,t.start=i.start,t.count=i.count,t}setInstanceCount(e){const t=this._availableInstanceIds,i=this._instanceInfo;for(t.sort(qM);t[t.length-1]===i.length-1;)i.pop(),t.pop();if(e<i.length)throw new Error(`THREE.BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const a=new Int32Array(e),c=new Int32Array(e);Mf(this._multiDrawCounts,a),Mf(this._multiDrawStarts,c),this._multiDrawCounts=a,this._multiDrawStarts=c,this._maxInstanceCount=e;const d=this._indirectTexture,f=this._matricesTexture,m=this._colorsTexture;d.dispose(),this._initIndirectTexture(),Mf(d.image.data,this._indirectTexture.image.data),f.dispose(),this._initMatricesTexture(),Mf(f.image.data,this._matricesTexture.image.data),m&&(m.dispose(),this._initColorsTexture(),Mf(m.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const i=[...this._geometryInfo].filter(f=>f.active);if(Math.max(...i.map(f=>f.vertexStart+f.reservedVertexCount))>e)throw new Error(`THREE.BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(m=>m.indexStart+m.reservedIndexCount))>t)throw new Error(`THREE.BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const c=this.geometry;c.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rn,this._initializeGeometry(c));const d=this.geometry;c.index&&Mf(c.index.array,d.index.array);for(const f in c.attributes)Mf(c.attributes[f].array,d.attributes[f].array)}raycast(e,t){const i=this._instanceInfo,a=this._geometryInfo,c=this.matrixWorld,d=this.geometry;rs.material=this.material,rs.geometry.index=d.index,rs.geometry.attributes=d.attributes,rs.geometry.boundingBox===null&&(rs.geometry.boundingBox=new os),rs.geometry.boundingSphere===null&&(rs.geometry.boundingSphere=new Vr);for(let f=0,m=i.length;f<m;f++){if(!i[f].visible||!i[f].active)continue;const g=i[f].geometryIndex,v=a[g];rs.geometry.setDrawRange(v.start,v.count),this.getMatrixAt(f,rs.matrixWorld).premultiply(c),this.getBoundingBoxAt(g,rs.geometry.boundingBox),this.getBoundingSphereAt(g,rs.geometry.boundingSphere),rs.raycast(e,Zy);for(let M=0,x=Zy.length;M<x;M++){const S=Zy[M];S.object=this,S.batchId=f,t.push(S)}Zy.length=0}rs.material=null,rs.geometry.index=null,rs.geometry.attributes={},rs.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,a,c){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const d=a.getIndex();let f=d===null?1:d.array.BYTES_PER_ELEMENT,m=1;c.wireframe&&(m=2,f=a.attributes.position.count>65535?4:2);const g=this._instanceInfo,v=this._multiDrawStarts,M=this._multiDrawCounts,x=this._geometryInfo,S=this.perObjectFrustumCulled,w=this._indirectTexture,k=w.image.data,C=i.isArrayCamera?OI:FI;S&&(i.isArrayCamera?C.setFromArrayCamera(i):(qs.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),C.setFromProjectionMatrix(qs,i.coordinateSystem,i.reversedDepth)));let T=0;if(this.sortObjects){qs.copy(this.matrixWorld).invert(),HA.setFromMatrixPosition(i.matrixWorld).applyMatrix4(qs),yC.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(qs);for(let L=0,O=g.length;L<O;L++)if(g[L].visible&&g[L].active){const U=g[L].geometryIndex;this.getMatrixAt(L,qs),this.getBoundingSphereAt(U,Sf).applyMatrix4(qs);let H=!1;if(S&&(H=!C.intersectsSphere(Sf)),!H){const I=x[U],F=VI.subVectors(Sf.center,HA).dot(yC);YM.push(I.start,I.count,F,L)}}const D=YM.list,z=this.customSort;z===null?D.sort(c.transparent?zI:NI):z.call(this,D,i);for(let L=0,O=D.length;L<O;L++){const U=D[L];v[T]=U.start*f*m,M[T]=U.count*m,k[T]=U.index,T++}YM.reset()}else for(let D=0,z=g.length;D<z;D++)if(g[D].visible&&g[D].active){const L=g[D].geometryIndex;let O=!1;if(S&&(this.getMatrixAt(D,qs),this.getBoundingSphereAt(L,Sf).applyMatrix4(qs),O=!C.intersectsSphere(Sf)),!O){const U=x[L];v[T]=U.start*f*m,M[T]=U.count*m,k[T]=D,T++}}w.needsUpdate=!0,this._multiDrawCount=T,this._visibilityChanged=!1}onBeforeShadow(e,t,i,a,c,d){this.onBeforeRender(e,null,a,c,d)}}class Cs extends Hr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ut(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const px=new J,mx=new J,bC=new Zt,GA=new Um,Ky=new Vr,JM=new J,xC=new J;class Qu extends Hn{constructor(e=new rn,t=new Cs){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[0];for(let a=1,c=t.count;a<c;a++)px.fromBufferAttribute(t,a-1),mx.fromBufferAttribute(t,a),i[a]=i[a-1],i[a]+=px.distanceTo(mx);e.setAttribute("lineDistance",new wt(i,1))}else ot("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,a=this.matrixWorld,c=e.params.Line.threshold,d=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Ky.copy(i.boundingSphere),Ky.applyMatrix4(a),Ky.radius+=c,e.ray.intersectsSphere(Ky)===!1)return;bC.copy(a).invert(),GA.copy(e.ray).applyMatrix4(bC);const f=c/((this.scale.x+this.scale.y+this.scale.z)/3),m=f*f,g=this.isLineSegments?2:1,v=i.index,x=i.attributes.position;if(v!==null){const S=Math.max(0,d.start),w=Math.min(v.count,d.start+d.count);for(let k=S,C=w-1;k<C;k+=g){const T=v.getX(k),D=v.getX(k+1),z=_y(this,e,GA,m,T,D,k);z&&t.push(z)}if(this.isLineLoop){const k=v.getX(w-1),C=v.getX(S),T=_y(this,e,GA,m,k,C,w-1);T&&t.push(T)}}else{const S=Math.max(0,d.start),w=Math.min(x.count,d.start+d.count);for(let k=S,C=w-1;k<C;k+=g){const T=_y(this,e,GA,m,k,k+1,k);T&&t.push(T)}if(this.isLineLoop){const k=_y(this,e,GA,m,w-1,S,w-1);k&&t.push(k)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}}function _y(s,e,t,i,a,c,d){const f=s.geometry.attributes.position;if(px.fromBufferAttribute(f,a),mx.fromBufferAttribute(f,c),t.distanceSqToSegment(px,mx,JM,xC)>i)return;JM.applyMatrix4(s.matrixWorld);const g=e.ray.origin.distanceTo(JM);if(!(g<e.near||g>e.far))return{distance:g,point:xC.clone().applyMatrix4(s.matrixWorld),index:d,face:null,faceIndex:null,barycoord:null,object:s}}const SC=new J,MC=new J;class Nl extends Qu{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let a=0,c=t.count;a<c;a+=2)SC.fromBufferAttribute(t,a),MC.fromBufferAttribute(t,a+1),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+SC.distanceTo(MC);e.setAttribute("lineDistance",new wt(i,1))}else ot("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class J3 extends Qu{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class C1 extends Hr{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new ut(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const wC=new Zt,Uw=new Um,$y=new Vr,eb=new J;class Q3 extends Hn{constructor(e=new rn,t=new C1){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const i=this.geometry,a=this.matrixWorld,c=e.params.Points.threshold,d=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),$y.copy(i.boundingSphere),$y.applyMatrix4(a),$y.radius+=c,e.ray.intersectsSphere($y)===!1)return;wC.copy(a).invert(),Uw.copy(e.ray).applyMatrix4(wC);const f=c/((this.scale.x+this.scale.y+this.scale.z)/3),m=f*f,g=i.index,M=i.attributes.position;if(g!==null){const x=Math.max(0,d.start),S=Math.min(g.count,d.start+d.count);for(let w=x,k=S;w<k;w++){const C=g.getX(w);eb.fromBufferAttribute(M,C),TC(eb,C,m,a,e,t,this)}}else{const x=Math.max(0,d.start),S=Math.min(M.count,d.start+d.count);for(let w=x,k=S;w<k;w++)eb.fromBufferAttribute(M,w),TC(eb,w,m,a,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}}function TC(s,e,t,i,a,c,d){const f=Uw.distanceSqToPoint(s);if(f<t){const m=new J;Uw.closestPointToPoint(s,m),m.applyMatrix4(i);const g=a.ray.origin.distanceTo(m);if(g<a.near||g>a.far)return;c.push({distance:g,distanceToRay:Math.sqrt(f),point:m,index:e,face:null,faceIndex:null,barycoord:null,object:d})}}class Z3 extends Di{constructor(e,t,i,a,c=mi,d=mi,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const v=this;function M(){v.needsUpdate=!0,v._requestVideoFrameCallbackId=e.requestVideoFrameCallback(M)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(M))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class GI extends Z3{constructor(e,t,i,a,c,d,f,m){super({},e,t,i,a,c,d,f,m),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class WI extends Di{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Ji,this.minFilter=Ji,this.generateMipmaps=!1,this.needsUpdate=!0}}class jx extends Di{constructor(e,t,i,a,c,d,f,m,g,v,M,x){super(null,d,f,m,g,v,a,c,M,x),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class jI extends jx{constructor(e,t,i,a,c,d){super(e,t,i,c,d),this.isCompressedArrayTexture=!0,this.image.depth=a,this.wrapR=Zs,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class XI extends jx{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Dl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Ev extends Di{constructor(e=[],t=Dl,i,a,c,d,f,m,g,v){super(e,t,i,a,c,d,f,m,g,v),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class qI extends Di{constructor(e,t,i,a,c,d,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class YI extends Di{constructor(e,t,i,a,c,d,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const v=e?e.parentNode:null;v!==null&&"requestPaint"in v&&(v.onpaint=()=>{this.needsUpdate=!0},v.requestPaint())}dispose(){const e=this.image?this.image.parentNode:null;e!==null&&"onpaint"in e&&(e.onpaint=null),super.dispose()}}class jf extends Di{constructor(e,t,i=oo,a,c,d,f=Ji,m=Ji,g,v=Il,M=1){if(v!==Il&&v!==Gu)throw new Error("THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const x={width:e,height:t,depth:M};super(x,a,c,d,f,m,v,i,g),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Wu(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class K3 extends jf{constructor(e,t=oo,i=Dl,a,c,d=Ji,f=Ji,m,g=Il){const v={width:e,height:e,depth:1},M=[v,v,v,v,v,v];super(e,e,t,i,a,c,d,f,m,g),this.image=M,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class R1 extends Di{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Yf extends rn{constructor(e=1,t=1,i=1,a=1,c=1,d=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:a,heightSegments:c,depthSegments:d};const f=this;a=Math.floor(a),c=Math.floor(c),d=Math.floor(d);const m=[],g=[],v=[],M=[];let x=0,S=0;w("z","y","x",-1,-1,i,t,e,d,c,0),w("z","y","x",1,-1,i,t,-e,d,c,1),w("x","z","y",1,1,e,i,t,a,d,2),w("x","z","y",1,-1,e,i,-t,a,d,3),w("x","y","z",1,-1,e,t,i,a,c,4),w("x","y","z",-1,-1,e,t,-i,a,c,5),this.setIndex(m),this.setAttribute("position",new wt(g,3)),this.setAttribute("normal",new wt(v,3)),this.setAttribute("uv",new wt(M,2));function w(k,C,T,D,z,L,O,U,H,I,F){const V=L/H,X=O/I,_=L/2,K=O/2,le=U/2,$=H+1,j=I+1;let Q=0,ne=0;const ce=new J;for(let ye=0;ye<j;ye++){const Te=ye*X-K;for(let Fe=0;Fe<$;Fe++){const lt=Fe*V-_;ce[k]=lt*D,ce[C]=Te*z,ce[T]=le,g.push(ce.x,ce.y,ce.z),ce[k]=0,ce[C]=0,ce[T]=U>0?1:-1,v.push(ce.x,ce.y,ce.z),M.push(Fe/H),M.push(1-ye/I),Q+=1}}for(let ye=0;ye<I;ye++)for(let Te=0;Te<H;Te++){const Fe=x+Te+$*ye,lt=x+Te+$*(ye+1),ht=x+(Te+1)+$*(ye+1),ct=x+(Te+1)+$*ye;m.push(Fe,lt,ct),m.push(lt,ht,ct),ne+=6}f.addGroup(S,ne,F),S+=ne,x+=Q}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yf(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class Xx extends rn{constructor(e=1,t=1,i=4,a=8,c=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:a,heightSegments:c},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),a=Math.max(3,Math.floor(a)),c=Math.max(1,Math.floor(c));const d=[],f=[],m=[],g=[],v=t/2,M=Math.PI/2*e,x=t,S=2*M+x,w=i*2+c,k=a+1,C=new J,T=new J;for(let D=0;D<=w;D++){let z=0,L=0,O=0,U=0;if(D<=i){const F=D/i,V=F*Math.PI/2;L=-v-e*Math.cos(V),O=e*Math.sin(V),U=-e*Math.cos(V),z=F*M}else if(D<=i+c){const F=(D-i)/c;L=-v+F*t,O=e,U=0,z=M+F*x}else{const F=(D-i-c)/i,V=F*Math.PI/2;L=v+e*Math.sin(V),O=e*Math.cos(V),U=e*Math.sin(V),z=M+x+F*M}const H=Math.max(0,Math.min(1,z/S));let I=0;D===0?I=.5/a:D===w&&(I=-.5/a);for(let F=0;F<=a;F++){const V=F/a,X=V*Math.PI*2,_=Math.sin(X),K=Math.cos(X);T.x=-O*K,T.y=L,T.z=O*_,f.push(T.x,T.y,T.z),C.set(-O*K,U,O*_),C.normalize(),m.push(C.x,C.y,C.z),g.push(V+I,H)}if(D>0){const F=(D-1)*k;for(let V=0;V<a;V++){const X=F+V,_=F+V+1,K=D*k+V,le=D*k+V+1;d.push(X,_,K),d.push(_,le,K)}}}this.setIndex(d),this.setAttribute("position",new wt(f,3)),this.setAttribute("normal",new wt(m,3)),this.setAttribute("uv",new wt(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Xx(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class qx extends rn{constructor(e=1,t=32,i=0,a=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:a},t=Math.max(3,t);const c=[],d=[],f=[],m=[],g=new J,v=new Oe;d.push(0,0,0),f.push(0,0,1),m.push(.5,.5);for(let M=0,x=3;M<=t;M++,x+=3){const S=i+M/t*a;g.x=e*Math.cos(S),g.y=e*Math.sin(S),d.push(g.x,g.y,g.z),f.push(0,0,1),v.x=(d[x]/e+1)/2,v.y=(d[x+1]/e+1)/2,m.push(v.x,v.y)}for(let M=1;M<=t;M++)c.push(M,M+1,0);this.setIndex(c),this.setAttribute("position",new wt(d,3)),this.setAttribute("normal",new wt(f,3)),this.setAttribute("uv",new wt(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qx(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Cv extends rn{constructor(e=1,t=1,i=1,a=32,c=1,d=!1,f=0,m=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:a,heightSegments:c,openEnded:d,thetaStart:f,thetaLength:m};const g=this;a=Math.floor(a),c=Math.floor(c);const v=[],M=[],x=[],S=[];let w=0;const k=[],C=i/2;let T=0;D(),d===!1&&(e>0&&z(!0),t>0&&z(!1)),this.setIndex(v),this.setAttribute("position",new wt(M,3)),this.setAttribute("normal",new wt(x,3)),this.setAttribute("uv",new wt(S,2));function D(){const L=new J,O=new J;let U=0;const H=(t-e)/i;for(let I=0;I<=c;I++){const F=[],V=I/c,X=V*(t-e)+e;for(let _=0;_<=a;_++){const K=_/a,le=K*m+f,$=Math.sin(le),j=Math.cos(le);O.x=X*$,O.y=-V*i+C,O.z=X*j,M.push(O.x,O.y,O.z),L.set($,H,j).normalize(),x.push(L.x,L.y,L.z),S.push(K,1-V),F.push(w++)}k.push(F)}for(let I=0;I<a;I++)for(let F=0;F<c;F++){const V=k[F][I],X=k[F+1][I],_=k[F+1][I+1],K=k[F][I+1];(e>0||F!==0)&&(v.push(V,X,K),U+=3),(t>0||F!==c-1)&&(v.push(X,_,K),U+=3)}g.addGroup(T,U,0),T+=U}function z(L){const O=w,U=new Oe,H=new J;let I=0;const F=L===!0?e:t,V=L===!0?1:-1;for(let _=1;_<=a;_++)M.push(0,C*V,0),x.push(0,V,0),S.push(.5,.5),w++;const X=w;for(let _=0;_<=a;_++){const le=_/a*m+f,$=Math.cos(le),j=Math.sin(le);H.x=F*j,H.y=C*V,H.z=F*$,M.push(H.x,H.y,H.z),x.push(0,V,0),U.x=$*.5+.5,U.y=j*.5*V+.5,S.push(U.x,U.y),w++}for(let _=0;_<a;_++){const K=O+_,le=X+_;L===!0?v.push(le,le+1,K):v.push(le+1,le,K),I+=3}g.addGroup(T,I,L===!0?1:2),T+=I}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cv(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Rv extends Cv{constructor(e=1,t=1,i=32,a=1,c=!1,d=0,f=Math.PI*2){super(0,e,t,i,a,c,d,f),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:a,openEnded:c,thetaStart:d,thetaLength:f}}static fromJSON(e){return new Rv(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class _u extends rn{constructor(e=[],t=[],i=1,a=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:a};const c=[],d=[];f(a),g(i),v(),this.setAttribute("position",new wt(c,3)),this.setAttribute("normal",new wt(c.slice(),3)),this.setAttribute("uv",new wt(d,2)),a===0?this.computeVertexNormals():this.normalizeNormals();function f(D){const z=new J,L=new J,O=new J;for(let U=0;U<t.length;U+=3)S(t[U+0],z),S(t[U+1],L),S(t[U+2],O),m(z,L,O,D)}function m(D,z,L,O){const U=O+1,H=[];for(let I=0;I<=U;I++){H[I]=[];const F=D.clone().lerp(L,I/U),V=z.clone().lerp(L,I/U),X=U-I;for(let _=0;_<=X;_++)_===0&&I===U?H[I][_]=F:H[I][_]=F.clone().lerp(V,_/X)}for(let I=0;I<U;I++)for(let F=0;F<2*(U-I)-1;F++){const V=Math.floor(F/2);F%2===0?(x(H[I][V+1]),x(H[I+1][V]),x(H[I][V])):(x(H[I][V+1]),x(H[I+1][V+1]),x(H[I+1][V]))}}function g(D){const z=new J;for(let L=0;L<c.length;L+=3)z.x=c[L+0],z.y=c[L+1],z.z=c[L+2],z.normalize().multiplyScalar(D),c[L+0]=z.x,c[L+1]=z.y,c[L+2]=z.z}function v(){const D=new J;for(let z=0;z<c.length;z+=3){D.x=c[z+0],D.y=c[z+1],D.z=c[z+2];const L=C(D)/2/Math.PI+.5,O=T(D)/Math.PI+.5;d.push(L,1-O)}w(),M()}function M(){for(let D=0;D<d.length;D+=6){const z=d[D+0],L=d[D+2],O=d[D+4],U=Math.max(z,L,O),H=Math.min(z,L,O);U>.9&&H<.1&&(z<.2&&(d[D+0]+=1),L<.2&&(d[D+2]+=1),O<.2&&(d[D+4]+=1))}}function x(D){c.push(D.x,D.y,D.z)}function S(D,z){const L=D*3;z.x=e[L+0],z.y=e[L+1],z.z=e[L+2]}function w(){const D=new J,z=new J,L=new J,O=new J,U=new Oe,H=new Oe,I=new Oe;for(let F=0,V=0;F<c.length;F+=9,V+=6){D.set(c[F+0],c[F+1],c[F+2]),z.set(c[F+3],c[F+4],c[F+5]),L.set(c[F+6],c[F+7],c[F+8]),U.set(d[V+0],d[V+1]),H.set(d[V+2],d[V+3]),I.set(d[V+4],d[V+5]),O.copy(D).add(z).add(L).divideScalar(3);const X=C(O);k(U,V+0,D,X),k(H,V+2,z,X),k(I,V+4,L,X)}}function k(D,z,L,O){O<0&&D.x===1&&(d[z]=D.x-1),L.x===0&&L.z===0&&(d[z]=O/2/Math.PI+.5)}function C(D){return Math.atan2(D.z,-D.x)}function T(D){return Math.atan2(-D.y,Math.sqrt(D.x*D.x+D.z*D.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _u(e.vertices,e.indices,e.radius,e.detail)}}class Yx extends _u{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,a=1/i,c=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-a,-i,0,-a,i,0,a,-i,0,a,i,-a,-i,0,-a,i,0,a,-i,0,a,i,0,-i,0,-a,i,0,-a,-i,0,a,i,0,a],d=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(c,d,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Yx(e.radius,e.detail)}}const tb=new J,nb=new J,QM=new J,ib=new Qs;class _3 extends rn{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const a=Math.pow(10,4),c=Math.cos(Ff*t),d=e.getIndex(),f=e.getAttribute("position"),m=d?d.count:f.count,g=[0,0,0],v=["a","b","c"],M=new Array(3),x={},S=[];for(let w=0;w<m;w+=3){d?(g[0]=d.getX(w),g[1]=d.getX(w+1),g[2]=d.getX(w+2)):(g[0]=w,g[1]=w+1,g[2]=w+2);const{a:k,b:C,c:T}=ib;if(k.fromBufferAttribute(f,g[0]),C.fromBufferAttribute(f,g[1]),T.fromBufferAttribute(f,g[2]),ib.getNormal(QM),M[0]=`${Math.round(k.x*a)},${Math.round(k.y*a)},${Math.round(k.z*a)}`,M[1]=`${Math.round(C.x*a)},${Math.round(C.y*a)},${Math.round(C.z*a)}`,M[2]=`${Math.round(T.x*a)},${Math.round(T.y*a)},${Math.round(T.z*a)}`,!(M[0]===M[1]||M[1]===M[2]||M[2]===M[0]))for(let D=0;D<3;D++){const z=(D+1)%3,L=M[D],O=M[z],U=ib[v[D]],H=ib[v[z]],I=`${L}_${O}`,F=`${O}_${L}`;F in x&&x[F]?(QM.dot(x[F].normal)<=c&&(S.push(U.x,U.y,U.z),S.push(H.x,H.y,H.z)),x[F]=null):I in x||(x[I]={index0:g[D],index1:g[z],normal:QM.clone()})}}for(const w in x)if(x[w]){const{index0:k,index1:C}=x[w];tb.fromBufferAttribute(f,k),nb.fromBufferAttribute(f,C),S.push(tb.x,tb.y,tb.z),S.push(nb.x,nb.y,nb.z)}this.setAttribute("position",new wt(S,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class qo{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){ot("Curve: .getPoint() not implemented.")}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,a=this.getPoint(0),c=0;t.push(0);for(let d=1;d<=e;d++)i=this.getPoint(d/e),c+=i.distanceTo(a),t.push(c),a=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const i=this.getLengths();let a=0;const c=i.length;let d;t?d=t:d=e*i[c-1];let f=0,m=c-1,g;for(;f<=m;)if(a=Math.floor(f+(m-f)/2),g=i[a]-d,g<0)f=a+1;else if(g>0)m=a-1;else{m=a;break}if(a=m,i[a]===d)return a/(c-1);const v=i[a],x=i[a+1]-v,S=(d-v)/x;return(a+S)/(c-1)}getTangent(e,t){let a=e-1e-4,c=e+1e-4;a<0&&(a=0),c>1&&(c=1);const d=this.getPoint(a),f=this.getPoint(c),m=t||(d.isVector2?new Oe:new J);return m.copy(f).sub(d).normalize(),m}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new J,a=[],c=[],d=[],f=new J,m=new Zt;for(let S=0;S<=e;S++){const w=S/e;a[S]=this.getTangentAt(w,new J)}c[0]=new J,d[0]=new J;let g=Number.MAX_VALUE;const v=Math.abs(a[0].x),M=Math.abs(a[0].y),x=Math.abs(a[0].z);v<=g&&(g=v,i.set(1,0,0)),M<=g&&(g=M,i.set(0,1,0)),x<=g&&i.set(0,0,1),f.crossVectors(a[0],i).normalize(),c[0].crossVectors(a[0],f),d[0].crossVectors(a[0],c[0]);for(let S=1;S<=e;S++){if(c[S]=c[S-1].clone(),d[S]=d[S-1].clone(),f.crossVectors(a[S-1],a[S]),f.length()>Number.EPSILON){f.normalize();const w=Math.acos(Yt(a[S-1].dot(a[S]),-1,1));c[S].applyMatrix4(m.makeRotationAxis(f,w))}d[S].crossVectors(a[S],c[S])}if(t===!0){let S=Math.acos(Yt(c[0].dot(c[e]),-1,1));S/=e,a[0].dot(f.crossVectors(c[0],c[e]))>0&&(S=-S);for(let w=1;w<=e;w++)c[w].applyMatrix4(m.makeRotationAxis(a[w],S*w)),d[w].crossVectors(a[w],c[w])}return{tangents:a,normals:c,binormals:d}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Jx extends qo{constructor(e=0,t=0,i=1,a=1,c=0,d=Math.PI*2,f=!1,m=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=a,this.aStartAngle=c,this.aEndAngle=d,this.aClockwise=f,this.aRotation=m}getPoint(e,t=new Oe){const i=t,a=Math.PI*2;let c=this.aEndAngle-this.aStartAngle;const d=Math.abs(c)<Number.EPSILON;for(;c<0;)c+=a;for(;c>a;)c-=a;c<Number.EPSILON&&(d?c=0:c=a),this.aClockwise===!0&&!d&&(c===a?c=-a:c=c-a);const f=this.aStartAngle+e*c;let m=this.aX+this.xRadius*Math.cos(f),g=this.aY+this.yRadius*Math.sin(f);if(this.aRotation!==0){const v=Math.cos(this.aRotation),M=Math.sin(this.aRotation),x=m-this.aX,S=g-this.aY;m=x*v-S*M+this.aX,g=x*M+S*v+this.aY}return i.set(m,g)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class $3 extends Jx{constructor(e,t,i,a,c,d){super(e,t,i,i,a,c,d),this.isArcCurve=!0,this.type="ArcCurve"}}function P1(){let s=0,e=0,t=0,i=0;function a(c,d,f,m){s=c,e=f,t=-3*c+3*d-2*f-m,i=2*c-2*d+f+m}return{initCatmullRom:function(c,d,f,m,g){a(d,f,g*(f-c),g*(m-d))},initNonuniformCatmullRom:function(c,d,f,m,g,v,M){let x=(d-c)/g-(f-c)/(g+v)+(f-d)/v,S=(f-d)/v-(m-d)/(v+M)+(m-f)/M;x*=v,S*=v,a(d,f,x,S)},calc:function(c){const d=c*c,f=d*c;return s+e*c+t*d+i*f}}}const EC=new J,CC=new J,ZM=new P1,KM=new P1,_M=new P1;class eR extends qo{constructor(e=[],t=!1,i="centripetal",a=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=a}getPoint(e,t=new J){const i=t,a=this.points,c=a.length,d=(c-(this.closed?0:1))*e;let f=Math.floor(d),m=d-f;this.closed?f+=f>0?0:(Math.floor(Math.abs(f)/c)+1)*c:m===0&&f===c-1&&(f=c-2,m=1);let g,v;this.closed||f>0?g=a[(f-1)%c]:(CC.subVectors(a[0],a[1]).add(a[0]),g=CC);const M=a[f%c],x=a[(f+1)%c];if(this.closed||f+2<c?v=a[(f+2)%c]:(EC.subVectors(a[c-1],a[c-2]).add(a[c-1]),v=EC),this.curveType==="centripetal"||this.curveType==="chordal"){const S=this.curveType==="chordal"?.5:.25;let w=Math.pow(g.distanceToSquared(M),S),k=Math.pow(M.distanceToSquared(x),S),C=Math.pow(x.distanceToSquared(v),S);k<1e-4&&(k=1),w<1e-4&&(w=k),C<1e-4&&(C=k),ZM.initNonuniformCatmullRom(g.x,M.x,x.x,v.x,w,k,C),KM.initNonuniformCatmullRom(g.y,M.y,x.y,v.y,w,k,C),_M.initNonuniformCatmullRom(g.z,M.z,x.z,v.z,w,k,C)}else this.curveType==="catmullrom"&&(ZM.initCatmullRom(g.x,M.x,x.x,v.x,this.tension),KM.initCatmullRom(g.y,M.y,x.y,v.y,this.tension),_M.initCatmullRom(g.z,M.z,x.z,v.z,this.tension));return i.set(ZM.calc(m),KM.calc(m),_M.calc(m)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(a.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const a=this.points[t];e.points.push(a.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(new J().fromArray(a))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function RC(s,e,t,i,a){const c=(i-e)*.5,d=(a-t)*.5,f=s*s,m=s*f;return(2*t-2*i+c+d)*m+(-3*t+3*i-2*c-d)*f+c*s+t}function JI(s,e){const t=1-s;return t*t*e}function QI(s,e){return 2*(1-s)*s*e}function ZI(s,e){return s*s*e}function sv(s,e,t,i){return JI(s,e)+QI(s,t)+ZI(s,i)}function KI(s,e){const t=1-s;return t*t*t*e}function _I(s,e){const t=1-s;return 3*t*t*s*e}function $I(s,e){return 3*(1-s)*s*s*e}function eN(s,e){return s*s*s*e}function av(s,e,t,i,a){return KI(s,e)+_I(s,t)+$I(s,i)+eN(s,a)}class k1 extends qo{constructor(e=new Oe,t=new Oe,i=new Oe,a=new Oe){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=a}getPoint(e,t=new Oe){const i=t,a=this.v0,c=this.v1,d=this.v2,f=this.v3;return i.set(av(e,a.x,c.x,d.x,f.x),av(e,a.y,c.y,d.y,f.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class tR extends qo{constructor(e=new J,t=new J,i=new J,a=new J){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=a}getPoint(e,t=new J){const i=t,a=this.v0,c=this.v1,d=this.v2,f=this.v3;return i.set(av(e,a.x,c.x,d.x,f.x),av(e,a.y,c.y,d.y,f.y),av(e,a.z,c.z,d.z,f.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class D1 extends qo{constructor(e=new Oe,t=new Oe){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Oe){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Oe){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class nR extends qo{constructor(e=new J,t=new J){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new J){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new J){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class L1 extends qo{constructor(e=new Oe,t=new Oe,i=new Oe){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new Oe){const i=t,a=this.v0,c=this.v1,d=this.v2;return i.set(sv(e,a.x,c.x,d.x),sv(e,a.y,c.y,d.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class I1 extends qo{constructor(e=new J,t=new J,i=new J){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new J){const i=t,a=this.v0,c=this.v1,d=this.v2;return i.set(sv(e,a.x,c.x,d.x),sv(e,a.y,c.y,d.y),sv(e,a.z,c.z,d.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class N1 extends qo{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Oe){const i=t,a=this.points,c=(a.length-1)*e,d=Math.floor(c),f=c-d,m=a[d===0?d:d-1],g=a[d],v=a[d>a.length-2?a.length-1:d+1],M=a[d>a.length-3?a.length-1:d+2];return i.set(RC(f,m.x,g.x,v.x,M.x),RC(f,m.y,g.y,v.y,M.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const a=this.points[t];e.points.push(a.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(new Oe().fromArray(a))}return this}}var gx=Object.freeze({__proto__:null,ArcCurve:$3,CatmullRomCurve3:eR,CubicBezierCurve:k1,CubicBezierCurve3:tR,EllipseCurve:Jx,LineCurve:D1,LineCurve3:nR,QuadraticBezierCurve:L1,QuadraticBezierCurve3:I1,SplineCurve:N1});class iR extends qo{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new gx[i](t,e))}return this}getPoint(e,t){const i=e*this.getLength(),a=this.getCurveLengths();let c=0;for(;c<a.length;){if(a[c]>=i){const d=a[c]-i,f=this.curves[c],m=f.getLength(),g=m===0?0:1-d/m;return f.getPointAt(g,t)}c++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,a=this.curves.length;i<a;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let i;for(let a=0,c=this.curves;a<c.length;a++){const d=c[a],f=d.isEllipseCurve?e*2:d.isLineCurve||d.isLineCurve3?1:d.isSplineCurve?e*d.points.length:e,m=d.getPoints(f);for(let g=0;g<m.length;g++){const v=m[g];i&&i.equals(v)||(t.push(v),i=v)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const a=e.curves[t];this.curves.push(a.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){const a=this.curves[t];e.curves.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const a=e.curves[t];this.curves.push(new gx[a.type]().fromJSON(a))}return this}}class Av extends iR{constructor(e){super(),this.type="Path",this.currentPoint=new Oe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const i=new D1(this.currentPoint.clone(),new Oe(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,a){const c=new L1(this.currentPoint.clone(),new Oe(e,t),new Oe(i,a));return this.curves.push(c),this.currentPoint.set(i,a),this}bezierCurveTo(e,t,i,a,c,d){const f=new k1(this.currentPoint.clone(),new Oe(e,t),new Oe(i,a),new Oe(c,d));return this.curves.push(f),this.currentPoint.set(c,d),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),i=new N1(t);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,a,c,d){const f=this.currentPoint.x,m=this.currentPoint.y;return this.absarc(e+f,t+m,i,a,c,d),this}absarc(e,t,i,a,c,d){return this.absellipse(e,t,i,i,a,c,d),this}ellipse(e,t,i,a,c,d,f,m){const g=this.currentPoint.x,v=this.currentPoint.y;return this.absellipse(e+g,t+v,i,a,c,d,f,m),this}absellipse(e,t,i,a,c,d,f,m){const g=new Jx(e,t,i,a,c,d,f,m);if(this.curves.length>0){const M=g.getPoint(0);M.equals(this.currentPoint)||this.lineTo(M.x,M.y)}this.curves.push(g);const v=g.getPoint(1);return this.currentPoint.copy(v),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Pv extends Av{constructor(e){super(e),this.uuid=Ca(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,a=this.holes.length;i<a;i++)t[i]=this.holes[i].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const a=e.holes[t];this.holes.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){const a=this.holes[t];e.holes.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const a=e.holes[t];this.holes.push(new Av().fromJSON(a))}return this}}function tN(s,e,t=2){const i=e&&e.length,a=i?e[0]*t:s.length;let c=rR(s,0,a,t,!0);const d=[];if(!c||c.next===c.prev)return d;let f,m,g;if(i&&(c=aN(s,e,c,t)),s.length>80*t){f=s[0],m=s[1];let v=f,M=m;for(let x=t;x<a;x+=t){const S=s[x],w=s[x+1];S<f&&(f=S),w<m&&(m=w),S>v&&(v=S),w>M&&(M=w)}g=Math.max(v-f,M-m),g=g!==0?32767/g:0}return vv(c,d,t,f,m,g,0),d}function rR(s,e,t,i,a){let c;if(a===AN(s,e,t,i)>0)for(let d=e;d<t;d+=i)c=PC(d/i|0,s[d],s[d+1],c);else for(let d=t-i;d>=e;d-=i)c=PC(d/i|0,s[d],s[d+1],c);return c&&Lm(c,c.next)&&(bv(c),c=c.next),c}function Xf(s,e){if(!s)return s;e||(e=s);let t=s,i;do if(i=!1,!t.steiner&&(Lm(t,t.next)||ki(t.prev,t,t.next)===0)){if(bv(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function vv(s,e,t,i,a,c,d){if(!s)return;!d&&c&&dN(s,i,a,c);let f=s;for(;s.prev!==s.next;){const m=s.prev,g=s.next;if(c?iN(s,i,a,c):nN(s)){e.push(m.i,s.i,g.i),bv(s),s=g.next,f=g.next;continue}if(s=g,s===f){d?d===1?(s=rN(Xf(s),e),vv(s,e,t,i,a,c,2)):d===2&&sN(s,e,t,i,a,c):vv(Xf(s),e,t,i,a,c,1);break}}}function nN(s){const e=s.prev,t=s,i=s.next;if(ki(e,t,i)>=0)return!1;const a=e.x,c=t.x,d=i.x,f=e.y,m=t.y,g=i.y,v=Math.min(a,c,d),M=Math.min(f,m,g),x=Math.max(a,c,d),S=Math.max(f,m,g);let w=i.next;for(;w!==e;){if(w.x>=v&&w.x<=x&&w.y>=M&&w.y<=S&&qA(a,f,c,m,d,g,w.x,w.y)&&ki(w.prev,w,w.next)>=0)return!1;w=w.next}return!0}function iN(s,e,t,i){const a=s.prev,c=s,d=s.next;if(ki(a,c,d)>=0)return!1;const f=a.x,m=c.x,g=d.x,v=a.y,M=c.y,x=d.y,S=Math.min(f,m,g),w=Math.min(v,M,x),k=Math.max(f,m,g),C=Math.max(v,M,x),T=Fw(S,w,e,t,i),D=Fw(k,C,e,t,i);let z=s.prevZ,L=s.nextZ;for(;z&&z.z>=T&&L&&L.z<=D;){if(z.x>=S&&z.x<=k&&z.y>=w&&z.y<=C&&z!==a&&z!==d&&qA(f,v,m,M,g,x,z.x,z.y)&&ki(z.prev,z,z.next)>=0||(z=z.prevZ,L.x>=S&&L.x<=k&&L.y>=w&&L.y<=C&&L!==a&&L!==d&&qA(f,v,m,M,g,x,L.x,L.y)&&ki(L.prev,L,L.next)>=0))return!1;L=L.nextZ}for(;z&&z.z>=T;){if(z.x>=S&&z.x<=k&&z.y>=w&&z.y<=C&&z!==a&&z!==d&&qA(f,v,m,M,g,x,z.x,z.y)&&ki(z.prev,z,z.next)>=0)return!1;z=z.prevZ}for(;L&&L.z<=D;){if(L.x>=S&&L.x<=k&&L.y>=w&&L.y<=C&&L!==a&&L!==d&&qA(f,v,m,M,g,x,L.x,L.y)&&ki(L.prev,L,L.next)>=0)return!1;L=L.nextZ}return!0}function rN(s,e){let t=s;do{const i=t.prev,a=t.next.next;!Lm(i,a)&&aR(i,t,t.next,a)&&yv(i,a)&&yv(a,i)&&(e.push(i.i,t.i,a.i),bv(t),bv(t.next),t=s=a),t=t.next}while(t!==s);return Xf(t)}function sN(s,e,t,i,a,c){let d=s;do{let f=d.next.next;for(;f!==d.prev;){if(d.i!==f.i&&pN(d,f)){let m=oR(d,f);d=Xf(d,d.next),m=Xf(m,m.next),vv(d,e,t,i,a,c,0),vv(m,e,t,i,a,c,0);return}f=f.next}d=d.next}while(d!==s)}function aN(s,e,t,i){const a=[];for(let c=0,d=e.length;c<d;c++){const f=e[c]*i,m=c<d-1?e[c+1]*i:s.length,g=rR(s,f,m,i,!1);g===g.next&&(g.steiner=!0),a.push(hN(g))}a.sort(oN);for(let c=0;c<a.length;c++)t=lN(a[c],t);return t}function oN(s,e){let t=s.x-e.x;if(t===0&&(t=s.y-e.y,t===0)){const i=(s.next.y-s.y)/(s.next.x-s.x),a=(e.next.y-e.y)/(e.next.x-e.x);t=i-a}return t}function lN(s,e){const t=cN(s,e);if(!t)return e;const i=oR(t,s);return Xf(i,i.next),Xf(t,t.next)}function cN(s,e){let t=e;const i=s.x,a=s.y;let c=-1/0,d;if(Lm(s,t))return t;do{if(Lm(s,t.next))return t.next;if(a<=t.y&&a>=t.next.y&&t.next.y!==t.y){const M=t.x+(a-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(M<=i&&M>c&&(c=M,d=t.x<t.next.x?t:t.next,M===i))return d}t=t.next}while(t!==e);if(!d)return null;const f=d,m=d.x,g=d.y;let v=1/0;t=d;do{if(i>=t.x&&t.x>=m&&i!==t.x&&sR(a<g?i:c,a,m,g,a<g?c:i,a,t.x,t.y)){const M=Math.abs(a-t.y)/(i-t.x);yv(t,s)&&(M<v||M===v&&(t.x>d.x||t.x===d.x&&uN(d,t)))&&(d=t,v=M)}t=t.next}while(t!==f);return d}function uN(s,e){return ki(s.prev,s,e.prev)<0&&ki(e.next,s,s.next)<0}function dN(s,e,t,i){let a=s;do a.z===0&&(a.z=Fw(a.x,a.y,e,t,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==s);a.prevZ.nextZ=null,a.prevZ=null,fN(a)}function fN(s){let e,t=1;do{let i=s,a;s=null;let c=null;for(e=0;i;){e++;let d=i,f=0;for(let g=0;g<t&&(f++,d=d.nextZ,!!d);g++);let m=t;for(;f>0||m>0&&d;)f!==0&&(m===0||!d||i.z<=d.z)?(a=i,i=i.nextZ,f--):(a=d,d=d.nextZ,m--),c?c.nextZ=a:s=a,a.prevZ=c,c=a;i=d}c.nextZ=null,t*=2}while(e>1);return s}function Fw(s,e,t,i,a){return s=(s-t)*a|0,e=(e-i)*a|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function hN(s){let e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function sR(s,e,t,i,a,c,d,f){return(a-d)*(e-f)>=(s-d)*(c-f)&&(s-d)*(i-f)>=(t-d)*(e-f)&&(t-d)*(c-f)>=(a-d)*(i-f)}function qA(s,e,t,i,a,c,d,f){return!(s===d&&e===f)&&sR(s,e,t,i,a,c,d,f)}function pN(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!mN(s,e)&&(yv(s,e)&&yv(e,s)&&gN(s,e)&&(ki(s.prev,s,e.prev)||ki(s,e.prev,e))||Lm(s,e)&&ki(s.prev,s,s.next)>0&&ki(e.prev,e,e.next)>0)}function ki(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function Lm(s,e){return s.x===e.x&&s.y===e.y}function aR(s,e,t,i){const a=sb(ki(s,e,t)),c=sb(ki(s,e,i)),d=sb(ki(t,i,s)),f=sb(ki(t,i,e));return!!(a!==c&&d!==f||a===0&&rb(s,t,e)||c===0&&rb(s,i,e)||d===0&&rb(t,s,i)||f===0&&rb(t,e,i))}function rb(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function sb(s){return s>0?1:s<0?-1:0}function mN(s,e){let t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&aR(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function yv(s,e){return ki(s.prev,s,s.next)<0?ki(s,e,s.next)>=0&&ki(s,s.prev,e)>=0:ki(s,e,s.prev)<0||ki(s,s.next,e)<0}function gN(s,e){let t=s,i=!1;const a=(s.x+e.x)/2,c=(s.y+e.y)/2;do t.y>c!=t.next.y>c&&t.next.y!==t.y&&a<(t.next.x-t.x)*(c-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function oR(s,e){const t=Ow(s.i,s.x,s.y),i=Ow(e.i,e.x,e.y),a=s.next,c=e.prev;return s.next=e,e.prev=s,t.next=a,a.prev=t,i.next=t,t.prev=i,c.next=i,i.prev=c,i}function PC(s,e,t,i){const a=Ow(s,e,t);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function bv(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function Ow(s,e,t){return{i:s,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function AN(s,e,t,i){let a=0;for(let c=e,d=t-i;c<t;c+=i)a+=(s[d]-s[c])*(s[c+1]+s[d+1]),d=c;return a}class vN{static triangulate(e,t,i=2){return tN(e,t,i)}}class Wo{static area(e){const t=e.length;let i=0;for(let a=t-1,c=0;c<t;a=c++)i+=e[a].x*e[c].y-e[c].x*e[a].y;return i*.5}static isClockWise(e){return Wo.area(e)<0}static triangulateShape(e,t){const i=[],a=[],c=[];kC(e),DC(i,e);let d=e.length;t.forEach(kC);for(let m=0;m<t.length;m++)a.push(d),d+=t[m].length,DC(i,t[m]);const f=vN.triangulate(i,a);for(let m=0;m<f.length;m+=3)c.push(f.slice(m,m+3));return c}}function kC(s){const e=s.length;e>2&&s[e-1].equals(s[0])&&s.pop()}function DC(s,e){for(let t=0;t<e.length;t++)s.push(e[t].x),s.push(e[t].y)}class Qx extends rn{constructor(e=new Pv([new Oe(.5,.5),new Oe(-.5,.5),new Oe(-.5,-.5),new Oe(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,a=[],c=[];for(let f=0,m=e.length;f<m;f++){const g=e[f];d(g)}this.setAttribute("position",new wt(a,3)),this.setAttribute("uv",new wt(c,2)),this.computeVertexNormals();function d(f){const m=[],g=t.curveSegments!==void 0?t.curveSegments:12,v=t.steps!==void 0?t.steps:1,M=t.depth!==void 0?t.depth:1;let x=t.bevelEnabled!==void 0?t.bevelEnabled:!0,S=t.bevelThickness!==void 0?t.bevelThickness:.2,w=t.bevelSize!==void 0?t.bevelSize:S-.1,k=t.bevelOffset!==void 0?t.bevelOffset:0,C=t.bevelSegments!==void 0?t.bevelSegments:3;const T=t.extrudePath,D=t.UVGenerator!==void 0?t.UVGenerator:yN;let z,L=!1,O,U,H,I;if(T){z=T.getSpacedPoints(v),L=!0,x=!1;const Be=T.isCatmullRomCurve3?T.closed:!1;O=T.computeFrenetFrames(v,Be),U=new J,H=new J,I=new J}x||(C=0,S=0,w=0,k=0);const F=f.extractPoints(g);let V=F.shape;const X=F.holes;if(!Wo.isClockWise(V)){V=V.reverse();for(let Be=0,xe=X.length;Be<xe;Be++){const Ue=X[Be];Wo.isClockWise(Ue)&&(X[Be]=Ue.reverse())}}function K(Be){const Ue=10000000000000001e-36;let qe=Be[0];for(let Ze=1;Ze<=Be.length;Ze++){const Pt=Ze%Be.length,bt=Be[Pt],zt=bt.x-qe.x,Et=bt.y-qe.y,ee=zt*zt+Et*Et,Cn=Math.max(Math.abs(bt.x),Math.abs(bt.y),Math.abs(qe.x),Math.abs(qe.y)),an=Ue*Cn*Cn;if(ee<=an){Be.splice(Pt,1),Ze--;continue}qe=bt}}K(V),X.forEach(K);const le=X.length,$=V;for(let Be=0;Be<le;Be++){const xe=X[Be];V=V.concat(xe)}function j(Be,xe,Ue){return xe||kt("ExtrudeGeometry: vec does not exist"),Be.clone().addScaledVector(xe,Ue)}const Q=V.length;function ne(Be,xe,Ue){let qe,Ze,Pt;const bt=Be.x-xe.x,zt=Be.y-xe.y,Et=Ue.x-Be.x,ee=Ue.y-Be.y,Cn=bt*bt+zt*zt,an=bt*ee-zt*Et;if(Math.abs(an)>Number.EPSILON){const Y=Math.sqrt(Cn),B=Math.sqrt(Et*Et+ee*ee),de=xe.x-zt/Y,me=xe.y+bt/Y,Ce=Ue.x-ee/B,Qe=Ue.y+Et/B,Ke=((Ce-de)*ee-(Qe-me)*Et)/(bt*ee-zt*Et);qe=de+bt*Ke-Be.x,Ze=me+zt*Ke-Be.y;const ke=qe*qe+Ze*Ze;if(ke<=2)return new Oe(qe,Ze);Pt=Math.sqrt(ke/2)}else{let Y=!1;bt>Number.EPSILON?Et>Number.EPSILON&&(Y=!0):bt<-Number.EPSILON?Et<-Number.EPSILON&&(Y=!0):Math.sign(zt)===Math.sign(ee)&&(Y=!0),Y?(qe=-zt,Ze=bt,Pt=Math.sqrt(Cn)):(qe=bt,Ze=zt,Pt=Math.sqrt(Cn/2))}return new Oe(qe/Pt,Ze/Pt)}const ce=[];for(let Be=0,xe=$.length,Ue=xe-1,qe=Be+1;Be<xe;Be++,Ue++,qe++)Ue===xe&&(Ue=0),qe===xe&&(qe=0),ce[Be]=ne($[Be],$[Ue],$[qe]);const ye=[];let Te,Fe=ce.concat();for(let Be=0,xe=le;Be<xe;Be++){const Ue=X[Be];Te=[];for(let qe=0,Ze=Ue.length,Pt=Ze-1,bt=qe+1;qe<Ze;qe++,Pt++,bt++)Pt===Ze&&(Pt=0),bt===Ze&&(bt=0),Te[qe]=ne(Ue[qe],Ue[Pt],Ue[bt]);ye.push(Te),Fe=Fe.concat(Te)}let lt;if(C===0)lt=Wo.triangulateShape($,X);else{const Be=[],xe=[];for(let Ue=0;Ue<C;Ue++){const qe=Ue/C,Ze=S*Math.cos(qe*Math.PI/2),Pt=w*Math.sin(qe*Math.PI/2)+k;for(let bt=0,zt=$.length;bt<zt;bt++){const Et=j($[bt],ce[bt],Pt);pt(Et.x,Et.y,-Ze),qe===0&&Be.push(Et)}for(let bt=0,zt=le;bt<zt;bt++){const Et=X[bt];Te=ye[bt];const ee=[];for(let Cn=0,an=Et.length;Cn<an;Cn++){const Y=j(Et[Cn],Te[Cn],Pt);pt(Y.x,Y.y,-Ze),qe===0&&ee.push(Y)}qe===0&&xe.push(ee)}}lt=Wo.triangulateShape(Be,xe)}const ht=lt.length,ct=w+k;for(let Be=0;Be<Q;Be++){const xe=x?j(V[Be],Fe[Be],ct):V[Be];L?(H.copy(O.normals[0]).multiplyScalar(xe.x),U.copy(O.binormals[0]).multiplyScalar(xe.y),I.copy(z[0]).add(H).add(U),pt(I.x,I.y,I.z)):pt(xe.x,xe.y,0)}for(let Be=1;Be<=v;Be++)for(let xe=0;xe<Q;xe++){const Ue=x?j(V[xe],Fe[xe],ct):V[xe];L?(H.copy(O.normals[Be]).multiplyScalar(Ue.x),U.copy(O.binormals[Be]).multiplyScalar(Ue.y),I.copy(z[Be]).add(H).add(U),pt(I.x,I.y,I.z)):pt(Ue.x,Ue.y,M/v*Be)}for(let Be=C-1;Be>=0;Be--){const xe=Be/C,Ue=S*Math.cos(xe*Math.PI/2),qe=w*Math.sin(xe*Math.PI/2)+k;for(let Ze=0,Pt=$.length;Ze<Pt;Ze++){const bt=j($[Ze],ce[Ze],qe);pt(bt.x,bt.y,M+Ue)}for(let Ze=0,Pt=X.length;Ze<Pt;Ze++){const bt=X[Ze];Te=ye[Ze];for(let zt=0,Et=bt.length;zt<Et;zt++){const ee=j(bt[zt],Te[zt],qe);L?pt(ee.x,ee.y+z[v-1].y,z[v-1].x+Ue):pt(ee.x,ee.y,M+Ue)}}}Pe(),Xe();function Pe(){const Be=a.length/3;if(x){let xe=0,Ue=Q*xe;for(let qe=0;qe<ht;qe++){const Ze=lt[qe];Nt(Ze[2]+Ue,Ze[1]+Ue,Ze[0]+Ue)}xe=v+C*2,Ue=Q*xe;for(let qe=0;qe<ht;qe++){const Ze=lt[qe];Nt(Ze[0]+Ue,Ze[1]+Ue,Ze[2]+Ue)}}else{for(let xe=0;xe<ht;xe++){const Ue=lt[xe];Nt(Ue[2],Ue[1],Ue[0])}for(let xe=0;xe<ht;xe++){const Ue=lt[xe];Nt(Ue[0]+Q*v,Ue[1]+Q*v,Ue[2]+Q*v)}}i.addGroup(Be,a.length/3-Be,0)}function Xe(){const Be=a.length/3;let xe=0;He($,xe),xe+=$.length;for(let Ue=0,qe=X.length;Ue<qe;Ue++){const Ze=X[Ue];He(Ze,xe),xe+=Ze.length}i.addGroup(Be,a.length/3-Be,1)}function He(Be,xe){let Ue=Be.length;for(;--Ue>=0;){const qe=Ue;let Ze=Ue-1;Ze<0&&(Ze=Be.length-1);for(let Pt=0,bt=v+C*2;Pt<bt;Pt++){const zt=Q*Pt,Et=Q*(Pt+1),ee=xe+qe+zt,Cn=xe+Ze+zt,an=xe+Ze+Et,Y=xe+qe+Et;nt(ee,Cn,an,Y)}}}function pt(Be,xe,Ue){m.push(Be),m.push(xe),m.push(Ue)}function Nt(Be,xe,Ue){sn(Be),sn(xe),sn(Ue);const qe=a.length/3,Ze=D.generateTopUV(i,a,qe-3,qe-2,qe-1);Dt(Ze[0]),Dt(Ze[1]),Dt(Ze[2])}function nt(Be,xe,Ue,qe){sn(Be),sn(xe),sn(qe),sn(xe),sn(Ue),sn(qe);const Ze=a.length/3,Pt=D.generateSideWallUV(i,a,Ze-6,Ze-3,Ze-2,Ze-1);Dt(Pt[0]),Dt(Pt[1]),Dt(Pt[3]),Dt(Pt[1]),Dt(Pt[2]),Dt(Pt[3])}function sn(Be){a.push(m[Be*3+0]),a.push(m[Be*3+1]),a.push(m[Be*3+2])}function Dt(Be){c.push(Be.x),c.push(Be.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return bN(t,i,e)}static fromJSON(e,t){const i=[];for(let c=0,d=e.shapes.length;c<d;c++){const f=t[e.shapes[c]];i.push(f)}const a=e.options.extrudePath;return a!==void 0&&(e.options.extrudePath=new gx[a.type]().fromJSON(a)),new Qx(i,e.options)}}const yN={generateTopUV:function(s,e,t,i,a){const c=e[t*3],d=e[t*3+1],f=e[i*3],m=e[i*3+1],g=e[a*3],v=e[a*3+1];return[new Oe(c,d),new Oe(f,m),new Oe(g,v)]},generateSideWallUV:function(s,e,t,i,a,c){const d=e[t*3],f=e[t*3+1],m=e[t*3+2],g=e[i*3],v=e[i*3+1],M=e[i*3+2],x=e[a*3],S=e[a*3+1],w=e[a*3+2],k=e[c*3],C=e[c*3+1],T=e[c*3+2];return Math.abs(f-v)<Math.abs(d-g)?[new Oe(d,1-m),new Oe(g,1-M),new Oe(x,1-w),new Oe(k,1-T)]:[new Oe(f,1-m),new Oe(v,1-M),new Oe(S,1-w),new Oe(C,1-T)]}};function bN(s,e,t){if(t.shapes=[],Array.isArray(s))for(let i=0,a=s.length;i<a;i++){const c=s[i];t.shapes.push(c.uuid)}else t.shapes.push(s.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class Zx extends _u{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,a=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],c=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(a,c,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zx(e.radius,e.detail)}}class Kx extends rn{constructor(e=[new Oe(0,-.5),new Oe(.5,0),new Oe(0,.5)],t=12,i=0,a=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:a},t=Math.floor(t),a=Yt(a,0,Math.PI*2);const c=[],d=[],f=[],m=[],g=[],v=1/t,M=new J,x=new Oe,S=new J,w=new J,k=new J;let C=0,T=0;for(let D=0;D<=e.length-1;D++)switch(D){case 0:C=e[D+1].x-e[D].x,T=e[D+1].y-e[D].y,S.x=T*1,S.y=-C,S.z=T*0,k.copy(S),S.normalize(),m.push(S.x,S.y,S.z);break;case e.length-1:m.push(k.x,k.y,k.z);break;default:C=e[D+1].x-e[D].x,T=e[D+1].y-e[D].y,S.x=T*1,S.y=-C,S.z=T*0,w.copy(S),S.x+=k.x,S.y+=k.y,S.z+=k.z,S.normalize(),m.push(S.x,S.y,S.z),k.copy(w)}for(let D=0;D<=t;D++){const z=i+D*v*a,L=Math.sin(z),O=Math.cos(z);for(let U=0;U<=e.length-1;U++){M.x=e[U].x*L,M.y=e[U].y,M.z=e[U].x*O,d.push(M.x,M.y,M.z),x.x=D/t,x.y=U/(e.length-1),f.push(x.x,x.y);const H=m[3*U+0]*L,I=m[3*U+1],F=m[3*U+0]*O;g.push(H,I,F)}}for(let D=0;D<t;D++)for(let z=0;z<e.length-1;z++){const L=z+D*e.length,O=L,U=L+e.length,H=L+e.length+1,I=L+1;c.push(O,U,I),c.push(H,I,U)}this.setIndex(c),this.setAttribute("position",new wt(d,3)),this.setAttribute("uv",new wt(f,2)),this.setAttribute("normal",new wt(g,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Kx(e.points,e.segments,e.phiStart,e.phiLength)}}class kv extends _u{constructor(e=1,t=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],a=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,a,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new kv(e.radius,e.detail)}}class Fm extends rn{constructor(e=1,t=1,i=1,a=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:a};const c=e/2,d=t/2,f=Math.floor(i),m=Math.floor(a),g=f+1,v=m+1,M=e/f,x=t/m,S=[],w=[],k=[],C=[];for(let T=0;T<v;T++){const D=T*x-d;for(let z=0;z<g;z++){const L=z*M-c;w.push(L,-D,0),k.push(0,0,1),C.push(z/f),C.push(1-T/m)}}for(let T=0;T<m;T++)for(let D=0;D<f;D++){const z=D+g*T,L=D+g*(T+1),O=D+1+g*(T+1),U=D+1+g*T;S.push(z,L,U),S.push(L,O,U)}this.setIndex(S),this.setAttribute("position",new wt(w,3)),this.setAttribute("normal",new wt(k,3)),this.setAttribute("uv",new wt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Fm(e.width,e.height,e.widthSegments,e.heightSegments)}}class _x extends rn{constructor(e=.5,t=1,i=32,a=1,c=0,d=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:a,thetaStart:c,thetaLength:d},i=Math.max(3,i),a=Math.max(1,a);const f=[],m=[],g=[],v=[];let M=e;const x=(t-e)/a,S=new J,w=new Oe;for(let k=0;k<=a;k++){for(let C=0;C<=i;C++){const T=c+C/i*d;S.x=M*Math.cos(T),S.y=M*Math.sin(T),m.push(S.x,S.y,S.z),g.push(0,0,1),w.x=(S.x/t+1)/2,w.y=(S.y/t+1)/2,v.push(w.x,w.y)}M+=x}for(let k=0;k<a;k++){const C=k*(i+1);for(let T=0;T<i;T++){const D=T+C,z=D,L=D+i+1,O=D+i+2,U=D+1;f.push(z,L,U),f.push(L,O,U)}}this.setIndex(f),this.setAttribute("position",new wt(m,3)),this.setAttribute("normal",new wt(g,3)),this.setAttribute("uv",new wt(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _x(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class $x extends rn{constructor(e=new Pv([new Oe(0,.5),new Oe(-.5,-.5),new Oe(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],a=[],c=[],d=[];let f=0,m=0;if(Array.isArray(e)===!1)g(e);else for(let v=0;v<e.length;v++)g(e[v]),this.addGroup(f,m,v),f+=m,m=0;this.setIndex(i),this.setAttribute("position",new wt(a,3)),this.setAttribute("normal",new wt(c,3)),this.setAttribute("uv",new wt(d,2));function g(v){const M=a.length/3,x=v.extractPoints(t);let S=x.shape;const w=x.holes;Wo.isClockWise(S)===!1&&(S=S.reverse());for(let C=0,T=w.length;C<T;C++){const D=w[C];Wo.isClockWise(D)===!0&&(w[C]=D.reverse())}const k=Wo.triangulateShape(S,w);for(let C=0,T=w.length;C<T;C++){const D=w[C];S=S.concat(D)}for(let C=0,T=S.length;C<T;C++){const D=S[C];a.push(D.x,D.y,0),c.push(0,0,1),d.push(D.x,D.y)}for(let C=0,T=k.length;C<T;C++){const D=k[C],z=D[0]+M,L=D[1]+M,O=D[2]+M;i.push(z,L,O),m+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return xN(t,e)}static fromJSON(e,t){const i=[];for(let a=0,c=e.shapes.length;a<c;a++){const d=t[e.shapes[a]];i.push(d)}return new $x(i,e.curveSegments)}}function xN(s,e){if(e.shapes=[],Array.isArray(s))for(let t=0,i=s.length;t<i;t++){const a=s[t];e.shapes.push(a.uuid)}else e.shapes.push(s.uuid);return e}class Dv extends rn{constructor(e=1,t=32,i=16,a=0,c=Math.PI*2,d=0,f=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:a,phiLength:c,thetaStart:d,thetaLength:f},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const m=Math.min(d+f,Math.PI);let g=0;const v=[],M=new J,x=new J,S=[],w=[],k=[],C=[];for(let T=0;T<=i;T++){const D=[],z=T/i,L=d+z*f,O=e*Math.cos(L),U=Math.sqrt(e*e-O*O);let H=0;T===0&&d===0?H=.5/t:T===i&&m===Math.PI&&(H=-.5/t);for(let I=0;I<=t;I++){const F=I/t,V=a+F*c;M.x=-U*Math.cos(V),M.y=O,M.z=U*Math.sin(V),w.push(M.x,M.y,M.z),x.copy(M).normalize(),k.push(x.x,x.y,x.z),C.push(F+H,1-z),D.push(g++)}v.push(D)}for(let T=0;T<i;T++)for(let D=0;D<t;D++){const z=v[T][D+1],L=v[T][D],O=v[T+1][D],U=v[T+1][D+1];(T!==0||d>0)&&S.push(z,L,U),(T!==i-1||m<Math.PI)&&S.push(L,O,U)}this.setIndex(S),this.setAttribute("position",new wt(w,3)),this.setAttribute("normal",new wt(k,3)),this.setAttribute("uv",new wt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Dv(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class eS extends _u{constructor(e=1,t=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],a=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,a,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new eS(e.radius,e.detail)}}class tS extends rn{constructor(e=1,t=.4,i=12,a=48,c=Math.PI*2,d=0,f=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:a,arc:c,thetaStart:d,thetaLength:f},i=Math.floor(i),a=Math.floor(a);const m=[],g=[],v=[],M=[],x=new J,S=new J,w=new J;for(let k=0;k<=i;k++){const C=d+k/i*f;for(let T=0;T<=a;T++){const D=T/a*c;S.x=(e+t*Math.cos(C))*Math.cos(D),S.y=(e+t*Math.cos(C))*Math.sin(D),S.z=t*Math.sin(C),g.push(S.x,S.y,S.z),x.x=e*Math.cos(D),x.y=e*Math.sin(D),w.subVectors(S,x).normalize(),v.push(w.x,w.y,w.z),M.push(T/a),M.push(k/i)}}for(let k=1;k<=i;k++)for(let C=1;C<=a;C++){const T=(a+1)*k+C-1,D=(a+1)*(k-1)+C-1,z=(a+1)*(k-1)+C,L=(a+1)*k+C;m.push(T,D,L),m.push(D,z,L)}this.setIndex(m),this.setAttribute("position",new wt(g,3)),this.setAttribute("normal",new wt(v,3)),this.setAttribute("uv",new wt(M,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tS(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class nS extends rn{constructor(e=1,t=.4,i=64,a=8,c=2,d=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:a,p:c,q:d},i=Math.floor(i),a=Math.floor(a);const f=[],m=[],g=[],v=[],M=new J,x=new J,S=new J,w=new J,k=new J,C=new J,T=new J;for(let z=0;z<=i;++z){const L=z/i*c*Math.PI*2;D(L,c,d,e,S),D(L+.01,c,d,e,w),C.subVectors(w,S),T.addVectors(w,S),k.crossVectors(C,T),T.crossVectors(k,C),k.normalize(),T.normalize();for(let O=0;O<=a;++O){const U=O/a*Math.PI*2,H=-t*Math.cos(U),I=t*Math.sin(U);M.x=S.x+(H*T.x+I*k.x),M.y=S.y+(H*T.y+I*k.y),M.z=S.z+(H*T.z+I*k.z),m.push(M.x,M.y,M.z),x.subVectors(M,S).normalize(),g.push(x.x,x.y,x.z),v.push(z/i),v.push(O/a)}}for(let z=1;z<=i;z++)for(let L=1;L<=a;L++){const O=(a+1)*(z-1)+(L-1),U=(a+1)*z+(L-1),H=(a+1)*z+L,I=(a+1)*(z-1)+L;f.push(O,U,I),f.push(U,H,I)}this.setIndex(f),this.setAttribute("position",new wt(m,3)),this.setAttribute("normal",new wt(g,3)),this.setAttribute("uv",new wt(v,2));function D(z,L,O,U,H){const I=Math.cos(z),F=Math.sin(z),V=O/L*z,X=Math.cos(V);H.x=U*(2+X)*.5*I,H.y=U*(2+X)*F*.5,H.z=U*Math.sin(V)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nS(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class iS extends rn{constructor(e=new I1(new J(-1,-1,0),new J(-1,1,0),new J(1,1,0)),t=64,i=1,a=8,c=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:a,closed:c};const d=e.computeFrenetFrames(t,c);this.tangents=d.tangents,this.normals=d.normals,this.binormals=d.binormals;const f=new J,m=new J,g=new Oe;let v=new J;const M=[],x=[],S=[],w=[];k(),this.setIndex(w),this.setAttribute("position",new wt(M,3)),this.setAttribute("normal",new wt(x,3)),this.setAttribute("uv",new wt(S,2));function k(){for(let z=0;z<t;z++)C(z);C(c===!1?t:0),D(),T()}function C(z){v=e.getPointAt(z/t,v);const L=d.normals[z],O=d.binormals[z];for(let U=0;U<=a;U++){const H=U/a*Math.PI*2,I=Math.sin(H),F=-Math.cos(H);m.x=F*L.x+I*O.x,m.y=F*L.y+I*O.y,m.z=F*L.z+I*O.z,m.normalize(),x.push(m.x,m.y,m.z),f.x=v.x+i*m.x,f.y=v.y+i*m.y,f.z=v.z+i*m.z,M.push(f.x,f.y,f.z)}}function T(){for(let z=1;z<=t;z++)for(let L=1;L<=a;L++){const O=(a+1)*(z-1)+(L-1),U=(a+1)*z+(L-1),H=(a+1)*z+L,I=(a+1)*(z-1)+L;w.push(O,U,I),w.push(U,H,I)}}function D(){for(let z=0;z<=t;z++)for(let L=0;L<=a;L++)g.x=z/t,g.y=L/a,S.push(g.x,g.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new iS(new gx[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class lR extends rn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],i=new Set,a=new J,c=new J;if(e.index!==null){const d=e.attributes.position,f=e.index;let m=e.groups;m.length===0&&(m=[{start:0,count:f.count,materialIndex:0}]);for(let g=0,v=m.length;g<v;++g){const M=m[g],x=M.start,S=M.count;for(let w=x,k=x+S;w<k;w+=3)for(let C=0;C<3;C++){const T=f.getX(w+C),D=f.getX(w+(C+1)%3);a.fromBufferAttribute(d,T),c.fromBufferAttribute(d,D),LC(a,c,i)===!0&&(t.push(a.x,a.y,a.z),t.push(c.x,c.y,c.z))}}}else{const d=e.attributes.position;for(let f=0,m=d.count/3;f<m;f++)for(let g=0;g<3;g++){const v=3*f+g,M=3*f+(g+1)%3;a.fromBufferAttribute(d,v),c.fromBufferAttribute(d,M),LC(a,c,i)===!0&&(t.push(a.x,a.y,a.z),t.push(c.x,c.y,c.z))}}this.setAttribute("position",new wt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function LC(s,e,t){const i=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,a=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(i)===!0||t.has(a)===!0?!1:(t.add(i),t.add(a),!0)}var IC=Object.freeze({__proto__:null,BoxGeometry:Yf,CapsuleGeometry:Xx,CircleGeometry:qx,ConeGeometry:Rv,CylinderGeometry:Cv,DodecahedronGeometry:Yx,EdgesGeometry:_3,ExtrudeGeometry:Qx,IcosahedronGeometry:Zx,LatheGeometry:Kx,OctahedronGeometry:kv,PlaneGeometry:Fm,PolyhedronGeometry:_u,RingGeometry:_x,ShapeGeometry:$x,SphereGeometry:Dv,TetrahedronGeometry:eS,TorusGeometry:tS,TorusKnotGeometry:nS,TubeGeometry:iS,WireframeGeometry:lR});class cR extends Hr{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new ut(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function Im(s){const e={};for(const t in s){e[t]={};for(const i in s[t]){const a=s[t][i];if(NC(a))a.isRenderTargetTexture?(ot("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=a.clone();else if(Array.isArray(a))if(NC(a[0])){const c=[];for(let d=0,f=a.length;d<f;d++)c[d]=a[d].clone();e[t][i]=c}else e[t][i]=a.slice();else e[t][i]=a}}return e}function xs(s){const e={};for(let t=0;t<s.length;t++){const i=Im(s[t]);for(const a in i)e[a]=i[a]}return e}function NC(s){return s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)}function SN(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function uR(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:wn.workingColorSpace}const dR={clone:Im,merge:xs};var MN=`void main() {
|
|
110
|
+
*/const Tx="185",WD={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},jD={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},n3=0,Pw=1,i3=2,XD=3,r3=0,wm=1,ZA=2,If=3,kc=0,Ts=1,Cl=2,kl=0,Uf=1,kw=2,Dw=3,Lw=4,s3=5,qD=6,Vu=100,a3=101,o3=102,l3=103,c3=104,u3=200,d3=201,f3=202,h3=203,Rb=204,Pb=205,p3=206,m3=207,g3=208,A3=209,v3=210,y3=211,b3=212,x3=213,S3=214,kb=0,Db=1,Lb=2,Vf=3,Ib=4,Nb=5,zb=6,Bb=7,wv=0,M3=1,w3=2,so=0,a1=1,o1=2,l1=3,Ex=4,c1=5,u1=6,d1=7,Iw="attached",T3="detached",Cx=300,Dl=301,qu=302,KA=303,_A=304,Bm=306,Dc=1e3,Zs=1001,lv=1002,Ji=1003,f1=1004,YD=1004,xm=1005,JD=1005,mi=1006,$A=1007,QD=1007,Rl=1008,ZD=1008,Ss=1009,h1=1010,p1=1011,Em=1012,Rx=1013,oo=1014,ws=1015,Ll=1016,Px=1017,kx=1018,Cm=1020,m1=35902,g1=35899,A1=1021,v1=1022,as=1023,Il=1026,Gu=1027,Dx=1028,Tv=1029,Yu=1030,Lx=1031,KD=1032,Ix=1033,ev=33776,tv=33777,nv=33778,iv=33779,Ub=35840,Fb=35841,Ob=35842,Vb=35843,Hb=36196,Gb=37492,Wb=37496,jb=37488,Xb=37489,cv=37490,qb=37491,Yb=37808,Jb=37809,Qb=37810,Zb=37811,Kb=37812,_b=37813,$b=37814,ex=37815,tx=37816,nx=37817,ix=37818,rx=37819,sx=37820,ax=37821,ox=36492,lx=36494,cx=36495,ux=36283,dx=36284,uv=36285,fx=36286,E3=2200,C3=2201,R3=2202,dv=2300,hx=2301,Sb=2302,Nw=2303,Nf=2400,zf=2401,fv=2402,Nx=2500,y1=2501,_D=0,$D=1,eL=2,P3=3200,tL=3201,nL=3202,iL=3203,Lc=0,k3=1,Cc="",ss="srgb",Rm="srgb-linear",hv="linear",_n="srgb",rL="",sL="rg",aL="ga",oL=0,Df=7680,lL=7681,cL=7682,uL=7683,dL=34055,fL=34056,hL=5386,pL=512,mL=513,gL=514,AL=515,vL=516,yL=517,bL=518,zw=519,D3=512,L3=513,I3=514,zx=515,N3=516,z3=517,Bx=518,B3=519,pv=35044,xL=35048,SL=35040,ML=35045,wL=35049,TL=35041,EL=35046,CL=35050,RL=35042,PL="100",Bw="300 es",Ea=2e3,Hf=2001,kL={COMPUTE:"compute",RENDER:"render"},DL={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},LL={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},IL={TEXTURE_COMPARE:"depthTextureCompare"};function NL(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}const zL={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sm(s,e){return new zL[s](e)}function U3(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function mv(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function F3(){const s=mv("canvas");return s.style.display="block",s}const qE={};let Ju=null;function BL(s){Ju=s}function UL(){return Ju}function gv(...s){const e="THREE."+s.shift();Ju?Ju("log",e,...s):console.log(e,...s)}function O3(s){const e=s[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=s[1];t&&t.isStackTrace?s[0]+=" "+t.getLocation():s[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return s}function ot(...s){s=O3(s);const e="THREE."+s.shift();if(Ju)Ju("warn",e,...s);else{const t=s[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...s)}}function kt(...s){s=O3(s);const e="THREE."+s.shift();if(Ju)Ju("error",e,...s);else{const t=s[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...s)}}function Xu(...s){const e=s.join(" ");e in qE||(qE[e]=!0,ot(...s))}function FL(s,e,t){return new Promise(function(i,a){function c(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:a();break;case s.TIMEOUT_EXPIRED:setTimeout(c,t);break;default:i()}}setTimeout(c,t)})}const OL={[kb]:Db,[Lb]:zb,[Ib]:Bb,[Vf]:Nb,[Db]:kb,[zb]:Lb,[Bb]:Ib,[Nb]:Vf};class Xo{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const a=i[e];if(a!==void 0){const c=a.indexOf(t);c!==-1&&a.splice(c,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const a=i.slice(0);for(let c=0,d=a.length;c<d;c++)a[c].call(this,e);e.target=null}}}const ns=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let YE=1234567;const Ff=Math.PI/180,Pm=180/Math.PI;function Ca(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ns[s&255]+ns[s>>8&255]+ns[s>>16&255]+ns[s>>24&255]+"-"+ns[e&255]+ns[e>>8&255]+"-"+ns[e>>16&15|64]+ns[e>>24&255]+"-"+ns[t&63|128]+ns[t>>8&255]+"-"+ns[t>>16&255]+ns[t>>24&255]+ns[i&255]+ns[i>>8&255]+ns[i>>16&255]+ns[i>>24&255]).toLowerCase()}function Yt(s,e,t){return Math.max(e,Math.min(t,s))}function b1(s,e){return(s%e+e)%e}function VL(s,e,t,i,a){return i+(s-e)*(a-i)/(t-e)}function HL(s,e,t){return s!==e?(t-s)/(e-s):0}function rv(s,e,t){return(1-t)*s+t*e}function GL(s,e,t,i){return rv(s,e,1-Math.exp(-t*i))}function WL(s,e=1){return e-Math.abs(b1(s,e*2)-e)}function jL(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function XL(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function qL(s,e){return s+Math.floor(Math.random()*(e-s+1))}function YL(s,e){return s+Math.random()*(e-s)}function JL(s){return s*(.5-Math.random())}function QL(s){s!==void 0&&(YE=s);let e=YE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function ZL(s){return s*Ff}function KL(s){return s*Pm}function _L(s){return(s&s-1)===0&&s!==0}function $L(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function eI(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function tI(s,e,t,i,a){const c=Math.cos,d=Math.sin,f=c(t/2),m=d(t/2),g=c((e+i)/2),v=d((e+i)/2),M=c((e-i)/2),x=d((e-i)/2),S=c((i-e)/2),w=d((i-e)/2);switch(a){case"XYX":s.set(f*v,m*M,m*x,f*g);break;case"YZY":s.set(m*x,f*v,m*M,f*g);break;case"ZXZ":s.set(m*M,m*x,f*v,f*g);break;case"XZX":s.set(f*v,m*w,m*S,f*g);break;case"YXY":s.set(m*S,f*v,m*w,f*g);break;case"ZYZ":s.set(m*w,m*S,f*v,f*g);break;default:ot("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+a)}}function Ms(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("THREE.MathUtils: Invalid component type.")}}function un(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("THREE.MathUtils: Invalid component type.")}}const nI={DEG2RAD:Ff,RAD2DEG:Pm,generateUUID:Ca,clamp:Yt,euclideanModulo:b1,mapLinear:VL,inverseLerp:HL,lerp:rv,damp:GL,pingpong:WL,smoothstep:jL,smootherstep:XL,randInt:qL,randFloat:YL,randFloatSpread:JL,seededRandom:QL,degToRad:ZL,radToDeg:KL,isPowerOfTwo:_L,ceilPowerOfTwo:$L,floorPowerOfTwo:eI,setQuaternionFromProperEuler:tI,normalize:un,denormalize:Ms};class Oe{static{Oe.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("THREE.Vector2: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("THREE.Vector2: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Yt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),a=Math.sin(t),c=this.x-e.x,d=this.y-e.y;return this.x=c*i-d*a+e.x,this.y=c*a+d*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Es{constructor(e=0,t=0,i=0,a=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=a}static slerpFlat(e,t,i,a,c,d,f){let m=i[a+0],g=i[a+1],v=i[a+2],M=i[a+3],x=c[d+0],S=c[d+1],w=c[d+2],k=c[d+3];if(M!==k||m!==x||g!==S||v!==w){let C=m*x+g*S+v*w+M*k;C<0&&(x=-x,S=-S,w=-w,k=-k,C=-C);let T=1-f;if(C<.9995){const D=Math.acos(C),z=Math.sin(D);T=Math.sin(T*D)/z,f=Math.sin(f*D)/z,m=m*T+x*f,g=g*T+S*f,v=v*T+w*f,M=M*T+k*f}else{m=m*T+x*f,g=g*T+S*f,v=v*T+w*f,M=M*T+k*f;const D=1/Math.sqrt(m*m+g*g+v*v+M*M);m*=D,g*=D,v*=D,M*=D}}e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=M}static multiplyQuaternionsFlat(e,t,i,a,c,d){const f=i[a],m=i[a+1],g=i[a+2],v=i[a+3],M=c[d],x=c[d+1],S=c[d+2],w=c[d+3];return e[t]=f*w+v*M+m*S-g*x,e[t+1]=m*w+v*x+g*M-f*S,e[t+2]=g*w+v*S+f*x-m*M,e[t+3]=v*w-f*M-m*x-g*S,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,a=e._y,c=e._z,d=e._order,f=Math.cos,m=Math.sin,g=f(i/2),v=f(a/2),M=f(c/2),x=m(i/2),S=m(a/2),w=m(c/2);switch(d){case"XYZ":this._x=x*v*M+g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M-x*S*w;break;case"YXZ":this._x=x*v*M+g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M+x*S*w;break;case"ZXY":this._x=x*v*M-g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M-x*S*w;break;case"ZYX":this._x=x*v*M-g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M+x*S*w;break;case"YZX":this._x=x*v*M+g*S*w,this._y=g*S*M+x*v*w,this._z=g*v*w-x*S*M,this._w=g*v*M-x*S*w;break;case"XZY":this._x=x*v*M-g*S*w,this._y=g*S*M-x*v*w,this._z=g*v*w+x*S*M,this._w=g*v*M+x*S*w;break;default:ot("Quaternion: .setFromEuler() encountered an unknown order: "+d)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],a=t[4],c=t[8],d=t[1],f=t[5],m=t[9],g=t[2],v=t[6],M=t[10],x=i+f+M;if(x>0){const S=.5/Math.sqrt(x+1);this._w=.25/S,this._x=(v-m)*S,this._y=(c-g)*S,this._z=(d-a)*S}else if(i>f&&i>M){const S=2*Math.sqrt(1+i-f-M);this._w=(v-m)/S,this._x=.25*S,this._y=(a+d)/S,this._z=(c+g)/S}else if(f>M){const S=2*Math.sqrt(1+f-i-M);this._w=(c-g)/S,this._x=(a+d)/S,this._y=.25*S,this._z=(m+v)/S}else{const S=2*Math.sqrt(1+M-i-f);this._w=(d-a)/S,this._x=(c+g)/S,this._y=(m+v)/S,this._z=.25*S}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Yt(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,a=e._y,c=e._z,d=e._w,f=t._x,m=t._y,g=t._z,v=t._w;return this._x=i*v+d*f+a*g-c*m,this._y=a*v+d*m+c*f-i*g,this._z=c*v+d*g+i*m-a*f,this._w=d*v-i*f-a*m-c*g,this._onChangeCallback(),this}slerp(e,t){let i=e._x,a=e._y,c=e._z,d=e._w,f=this.dot(e);f<0&&(i=-i,a=-a,c=-c,d=-d,f=-f);let m=1-t;if(f<.9995){const g=Math.acos(f),v=Math.sin(g);m=Math.sin(m*g)/v,t=Math.sin(t*g)/v,this._x=this._x*m+i*t,this._y=this._y*m+a*t,this._z=this._z*m+c*t,this._w=this._w*m+d*t,this._onChangeCallback()}else this._x=this._x*m+i*t,this._y=this._y*m+a*t,this._z=this._z*m+c*t,this._w=this._w*m+d*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),a=Math.sqrt(1-i),c=Math.sqrt(i);return this.set(a*Math.sin(e),a*Math.cos(e),c*Math.sin(t),c*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class J{static{J.prototype.isVector3=!0}constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("THREE.Vector3: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("THREE.Vector3: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(JE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(JE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,a=this.z,c=e.elements;return this.x=c[0]*t+c[3]*i+c[6]*a,this.y=c[1]*t+c[4]*i+c[7]*a,this.z=c[2]*t+c[5]*i+c[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,a=this.z,c=e.elements,d=1/(c[3]*t+c[7]*i+c[11]*a+c[15]);return this.x=(c[0]*t+c[4]*i+c[8]*a+c[12])*d,this.y=(c[1]*t+c[5]*i+c[9]*a+c[13])*d,this.z=(c[2]*t+c[6]*i+c[10]*a+c[14])*d,this}applyQuaternion(e){const t=this.x,i=this.y,a=this.z,c=e.x,d=e.y,f=e.z,m=e.w,g=2*(d*a-f*i),v=2*(f*t-c*a),M=2*(c*i-d*t);return this.x=t+m*g+d*M-f*v,this.y=i+m*v+f*g-c*M,this.z=a+m*M+c*v-d*g,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,a=this.z,c=e.elements;return this.x=c[0]*t+c[4]*i+c[8]*a,this.y=c[1]*t+c[5]*i+c[9]*a,this.z=c[2]*t+c[6]*i+c[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this.z=Yt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this.z=Yt(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,a=e.y,c=e.z,d=t.x,f=t.y,m=t.z;return this.x=a*m-c*f,this.y=c*d-i*m,this.z=i*f-a*d,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return SM.copy(this).projectOnVector(e),this.sub(SM)}reflect(e){return this.sub(SM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Yt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const SM=new J,JE=new Es;class _t{static{_t.prototype.isMatrix3=!0}constructor(e,t,i,a,c,d,f,m,g){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,a,c,d,f,m,g)}set(e,t,i,a,c,d,f,m,g){const v=this.elements;return v[0]=e,v[1]=a,v[2]=f,v[3]=t,v[4]=c,v[5]=m,v[6]=i,v[7]=d,v[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,a=t.elements,c=this.elements,d=i[0],f=i[3],m=i[6],g=i[1],v=i[4],M=i[7],x=i[2],S=i[5],w=i[8],k=a[0],C=a[3],T=a[6],D=a[1],z=a[4],L=a[7],O=a[2],U=a[5],H=a[8];return c[0]=d*k+f*D+m*O,c[3]=d*C+f*z+m*U,c[6]=d*T+f*L+m*H,c[1]=g*k+v*D+M*O,c[4]=g*C+v*z+M*U,c[7]=g*T+v*L+M*H,c[2]=x*k+S*D+w*O,c[5]=x*C+S*z+w*U,c[8]=x*T+S*L+w*H,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8];return t*d*v-t*f*g-i*c*v+i*f*m+a*c*g-a*d*m}invert(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8],M=v*d-f*g,x=f*m-v*c,S=g*c-d*m,w=t*M+i*x+a*S;if(w===0)return this.set(0,0,0,0,0,0,0,0,0);const k=1/w;return e[0]=M*k,e[1]=(a*g-v*i)*k,e[2]=(f*i-a*d)*k,e[3]=x*k,e[4]=(v*t-a*m)*k,e[5]=(a*c-f*t)*k,e[6]=S*k,e[7]=(i*m-g*t)*k,e[8]=(d*t-i*c)*k,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,c,d,f){const m=Math.cos(c),g=Math.sin(c);return this.set(i*m,i*g,-i*(m*d+g*f)+d+e,-a*g,a*m,-a*(-g*d+m*f)+f+t,0,0,1),this}scale(e,t){return Xu("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(MM.makeScale(e,t)),this}rotate(e){return Xu("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(MM.makeRotation(-e)),this}translate(e,t){return Xu("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(MM.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const MM=new _t,QE=new _t().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ZE=new _t().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function iI(){const s={enabled:!0,workingColorSpace:Rm,spaces:{},convert:function(a,c,d){return this.enabled===!1||c===d||!c||!d||(this.spaces[c].transfer===_n&&(a.r=Pc(a.r),a.g=Pc(a.g),a.b=Pc(a.b)),this.spaces[c].primaries!==this.spaces[d].primaries&&(a.applyMatrix3(this.spaces[c].toXYZ),a.applyMatrix3(this.spaces[d].fromXYZ)),this.spaces[d].transfer===_n&&(a.r=Tm(a.r),a.g=Tm(a.g),a.b=Tm(a.b))),a},workingToColorSpace:function(a,c){return this.convert(a,this.workingColorSpace,c)},colorSpaceToWorking:function(a,c){return this.convert(a,c,this.workingColorSpace)},getPrimaries:function(a){return this.spaces[a].primaries},getTransfer:function(a){return a===Cc?hv:this.spaces[a].transfer},getToneMappingMode:function(a){return this.spaces[a].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(a,c=this.workingColorSpace){return a.fromArray(this.spaces[c].luminanceCoefficients)},define:function(a){Object.assign(this.spaces,a)},_getMatrix:function(a,c,d){return a.copy(this.spaces[c].toXYZ).multiply(this.spaces[d].fromXYZ)},_getDrawingBufferColorSpace:function(a){return this.spaces[a].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(a=this.workingColorSpace){return this.spaces[a].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(a,c){return Xu("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(a,c)},toWorkingColorSpace:function(a,c){return Xu("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(a,c)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return s.define({[Rm]:{primaries:e,whitePoint:i,transfer:hv,toXYZ:QE,fromXYZ:ZE,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:ss},outputColorSpaceConfig:{drawingBufferColorSpace:ss}},[ss]:{primaries:e,whitePoint:i,transfer:_n,toXYZ:QE,fromXYZ:ZE,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:ss}}}),s}const wn=iI();function Pc(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function Tm(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let Kp;class V3{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Kp===void 0&&(Kp=mv("canvas")),Kp.width=e.width,Kp.height=e.height;const a=Kp.getContext("2d");e instanceof ImageData?a.putImageData(e,0,0):a.drawImage(e,0,0,e.width,e.height),i=Kp}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=mv("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const a=i.getImageData(0,0,e.width,e.height),c=a.data;for(let d=0;d<c.length;d++)c[d]=Pc(c[d]/255)*255;return i.putImageData(a,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Pc(t[i]/255)*255):t[i]=Pc(t[i]);return{data:t,width:e.width,height:e.height}}else return ot("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let rI=0;class Wu{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:rI++}),this.uuid=Ca(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},a=this.data;if(a!==null){let c;if(Array.isArray(a)){c=[];for(let d=0,f=a.length;d<f;d++)a[d].isDataTexture?c.push(wM(a[d].image)):c.push(wM(a[d]))}else c=wM(a);i.url=c}return t||(e.images[this.uuid]=i),i}}function wM(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?V3.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(ot("Texture: Unable to serialize Texture."),{})}let sI=0;const TM=new J;class Di extends Xo{constructor(e=Di.DEFAULT_IMAGE,t=Di.DEFAULT_MAPPING,i=Zs,a=Zs,c=mi,d=Rl,f=as,m=Ss,g=Di.DEFAULT_ANISOTROPY,v=Cc){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:sI++}),this.uuid=Ca(),this.name="",this.source=new Wu(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=a,this.magFilter=c,this.minFilter=d,this.anisotropy=g,this.format=f,this.internalFormat=null,this.type=m,this.offset=new Oe(0,0),this.repeat=new Oe(1,1),this.center=new Oe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _t,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=v,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(TM).x}get height(){return this.source.getSize(TM).y}get depth(){return this.source.getSize(TM).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){ot(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){ot(`Texture.setValues(): property '${t}' does not exist.`);continue}a&&i&&a.isVector2&&i.isVector2||a&&i&&a.isVector3&&i.isVector3||a&&i&&a.isMatrix3&&i.isMatrix3?a.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Cx)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Dc:e.x=e.x-Math.floor(e.x);break;case Zs:e.x=e.x<0?0:1;break;case lv:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Dc:e.y=e.y-Math.floor(e.y);break;case Zs:e.y=e.y<0?0:1;break;case lv:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Di.DEFAULT_IMAGE=null;Di.DEFAULT_MAPPING=Cx;Di.DEFAULT_ANISOTROPY=1;class ni{static{ni.prototype.isVector4=!0}constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("THREE.Vector4: index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("THREE.Vector4: index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,a=this.z,c=this.w,d=e.elements;return this.x=d[0]*t+d[4]*i+d[8]*a+d[12]*c,this.y=d[1]*t+d[5]*i+d[9]*a+d[13]*c,this.z=d[2]*t+d[6]*i+d[10]*a+d[14]*c,this.w=d[3]*t+d[7]*i+d[11]*a+d[15]*c,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,c;const m=e.elements,g=m[0],v=m[4],M=m[8],x=m[1],S=m[5],w=m[9],k=m[2],C=m[6],T=m[10];if(Math.abs(v-x)<.01&&Math.abs(M-k)<.01&&Math.abs(w-C)<.01){if(Math.abs(v+x)<.1&&Math.abs(M+k)<.1&&Math.abs(w+C)<.1&&Math.abs(g+S+T-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const z=(g+1)/2,L=(S+1)/2,O=(T+1)/2,U=(v+x)/4,H=(M+k)/4,I=(w+C)/4;return z>L&&z>O?z<.01?(i=0,a=.707106781,c=.707106781):(i=Math.sqrt(z),a=U/i,c=H/i):L>O?L<.01?(i=.707106781,a=0,c=.707106781):(a=Math.sqrt(L),i=U/a,c=I/a):O<.01?(i=.707106781,a=.707106781,c=0):(c=Math.sqrt(O),i=H/c,a=I/c),this.set(i,a,c,t),this}let D=Math.sqrt((C-w)*(C-w)+(M-k)*(M-k)+(x-v)*(x-v));return Math.abs(D)<.001&&(D=1),this.x=(C-w)/D,this.y=(M-k)/D,this.z=(x-v)/D,this.w=Math.acos((g+S+T-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Yt(this.x,e.x,t.x),this.y=Yt(this.y,e.y,t.y),this.z=Yt(this.z,e.z,t.z),this.w=Yt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Yt(this.x,e,t),this.y=Yt(this.y,e,t),this.z=Yt(this.z,e,t),this.w=Yt(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Yt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class x1 extends Xo{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1,useArrayDepthTexture:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new ni(0,0,e,t),this.scissorTest=!1,this.viewport=new ni(0,0,e,t),this.textures=[];const a={width:e,height:t,depth:i.depth},c=new Di(a),d=i.count;for(let f=0;f<d;f++)this.textures[f]=c.clone(),this.textures[f].isRenderTargetTexture=!0,this.textures[f].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview,this.useArrayDepthTexture=i.useArrayDepthTexture}_setTextureOptions(e={}){const t={minFilter:mi,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let a=0,c=this.textures.length;a<c;a++)this.textures[a].image.width=e,this.textures[a].image.height=t,this.textures[a].image.depth=i,this.textures[a].isData3DTexture!==!0&&(this.textures[a].isArrayTexture=this.textures[a].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const a=Object.assign({},e.textures[t].image);this.textures[t].source=new Wu(a)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this.useArrayDepthTexture=e.useArrayDepthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Ra extends x1{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class Ux extends Di{constructor(e=null,t=1,i=1,a=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:a},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=Zs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class aI extends Ra{constructor(e=1,t=1,i=1,a={}){super(e,t,a),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Ux(null,e,t,i),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class Fx extends Di{constructor(e=null,t=1,i=1,a=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:a},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=Zs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class oI extends Ra{constructor(e=1,t=1,i=1,a={}){super(e,t,a),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new Fx(null,e,t,i),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class Zt{static{Zt.prototype.isMatrix4=!0}constructor(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C)}set(e,t,i,a,c,d,f,m,g,v,M,x,S,w,k,C){const T=this.elements;return T[0]=e,T[4]=t,T[8]=i,T[12]=a,T[1]=c,T[5]=d,T[9]=f,T[13]=m,T[2]=g,T[6]=v,T[10]=M,T[14]=x,T[3]=S,T[7]=w,T[11]=k,T[15]=C,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Zt().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinantAffine()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinantAffine()===0)return this.identity();const t=this.elements,i=e.elements,a=1/_p.setFromMatrixColumn(e,0).length(),c=1/_p.setFromMatrixColumn(e,1).length(),d=1/_p.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*c,t[5]=i[5]*c,t[6]=i[6]*c,t[7]=0,t[8]=i[8]*d,t[9]=i[9]*d,t[10]=i[10]*d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,a=e.y,c=e.z,d=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a),v=Math.cos(c),M=Math.sin(c);if(e.order==="XYZ"){const x=d*v,S=d*M,w=f*v,k=f*M;t[0]=m*v,t[4]=-m*M,t[8]=g,t[1]=S+w*g,t[5]=x-k*g,t[9]=-f*m,t[2]=k-x*g,t[6]=w+S*g,t[10]=d*m}else if(e.order==="YXZ"){const x=m*v,S=m*M,w=g*v,k=g*M;t[0]=x+k*f,t[4]=w*f-S,t[8]=d*g,t[1]=d*M,t[5]=d*v,t[9]=-f,t[2]=S*f-w,t[6]=k+x*f,t[10]=d*m}else if(e.order==="ZXY"){const x=m*v,S=m*M,w=g*v,k=g*M;t[0]=x-k*f,t[4]=-d*M,t[8]=w+S*f,t[1]=S+w*f,t[5]=d*v,t[9]=k-x*f,t[2]=-d*g,t[6]=f,t[10]=d*m}else if(e.order==="ZYX"){const x=d*v,S=d*M,w=f*v,k=f*M;t[0]=m*v,t[4]=w*g-S,t[8]=x*g+k,t[1]=m*M,t[5]=k*g+x,t[9]=S*g-w,t[2]=-g,t[6]=f*m,t[10]=d*m}else if(e.order==="YZX"){const x=d*m,S=d*g,w=f*m,k=f*g;t[0]=m*v,t[4]=k-x*M,t[8]=w*M+S,t[1]=M,t[5]=d*v,t[9]=-f*v,t[2]=-g*v,t[6]=S*M+w,t[10]=x-k*M}else if(e.order==="XZY"){const x=d*m,S=d*g,w=f*m,k=f*g;t[0]=m*v,t[4]=-M,t[8]=g*v,t[1]=x*M+k,t[5]=d*v,t[9]=S*M-w,t[2]=w*M-S,t[6]=f*v,t[10]=k*M+x}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(lI,e,cI)}lookAt(e,t,i){const a=this.elements;return Ma.subVectors(e,t),Ma.lengthSq()===0&&(Ma.z=1),Ma.normalize(),Lu.crossVectors(i,Ma),Lu.lengthSq()===0&&(Math.abs(i.z)===1?Ma.x+=1e-4:Ma.z+=1e-4,Ma.normalize(),Lu.crossVectors(i,Ma)),Lu.normalize(),Ey.crossVectors(Ma,Lu),a[0]=Lu.x,a[4]=Ey.x,a[8]=Ma.x,a[1]=Lu.y,a[5]=Ey.y,a[9]=Ma.y,a[2]=Lu.z,a[6]=Ey.z,a[10]=Ma.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,a=t.elements,c=this.elements,d=i[0],f=i[4],m=i[8],g=i[12],v=i[1],M=i[5],x=i[9],S=i[13],w=i[2],k=i[6],C=i[10],T=i[14],D=i[3],z=i[7],L=i[11],O=i[15],U=a[0],H=a[4],I=a[8],F=a[12],V=a[1],X=a[5],_=a[9],K=a[13],le=a[2],$=a[6],j=a[10],Q=a[14],ne=a[3],ce=a[7],ye=a[11],Te=a[15];return c[0]=d*U+f*V+m*le+g*ne,c[4]=d*H+f*X+m*$+g*ce,c[8]=d*I+f*_+m*j+g*ye,c[12]=d*F+f*K+m*Q+g*Te,c[1]=v*U+M*V+x*le+S*ne,c[5]=v*H+M*X+x*$+S*ce,c[9]=v*I+M*_+x*j+S*ye,c[13]=v*F+M*K+x*Q+S*Te,c[2]=w*U+k*V+C*le+T*ne,c[6]=w*H+k*X+C*$+T*ce,c[10]=w*I+k*_+C*j+T*ye,c[14]=w*F+k*K+C*Q+T*Te,c[3]=D*U+z*V+L*le+O*ne,c[7]=D*H+z*X+L*$+O*ce,c[11]=D*I+z*_+L*j+O*ye,c[15]=D*F+z*K+L*Q+O*Te,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],a=e[8],c=e[12],d=e[1],f=e[5],m=e[9],g=e[13],v=e[2],M=e[6],x=e[10],S=e[14],w=e[3],k=e[7],C=e[11],T=e[15],D=m*S-g*x,z=f*S-g*M,L=f*x-m*M,O=d*S-g*v,U=d*x-m*v,H=d*M-f*v;return t*(k*D-C*z+T*L)-i*(w*D-C*O+T*U)+a*(w*z-k*O+T*H)-c*(w*L-k*U+C*H)}determinantAffine(){const e=this.elements,t=e[0],i=e[4],a=e[8],c=e[1],d=e[5],f=e[9],m=e[2],g=e[6],v=e[10];return t*(d*v-f*g)-i*(c*v-f*m)+a*(c*g-d*m)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],a=e[2],c=e[3],d=e[4],f=e[5],m=e[6],g=e[7],v=e[8],M=e[9],x=e[10],S=e[11],w=e[12],k=e[13],C=e[14],T=e[15],D=t*f-i*d,z=t*m-a*d,L=t*g-c*d,O=i*m-a*f,U=i*g-c*f,H=a*g-c*m,I=v*k-M*w,F=v*C-x*w,V=v*T-S*w,X=M*C-x*k,_=M*T-S*k,K=x*T-S*C,le=D*K-z*_+L*X+O*V-U*F+H*I;if(le===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const $=1/le;return e[0]=(f*K-m*_+g*X)*$,e[1]=(a*_-i*K-c*X)*$,e[2]=(k*H-C*U+T*O)*$,e[3]=(x*U-M*H-S*O)*$,e[4]=(m*V-d*K-g*F)*$,e[5]=(t*K-a*V+c*F)*$,e[6]=(C*L-w*H-T*z)*$,e[7]=(v*H-x*L+S*z)*$,e[8]=(d*_-f*V+g*I)*$,e[9]=(i*V-t*_-c*I)*$,e[10]=(w*U-k*L+T*D)*$,e[11]=(M*L-v*U-S*D)*$,e[12]=(f*F-d*X-m*I)*$,e[13]=(t*X-i*F+a*I)*$,e[14]=(k*z-w*O-C*D)*$,e[15]=(v*O-M*z+x*D)*$,this}scale(e){const t=this.elements,i=e.x,a=e.y,c=e.z;return t[0]*=i,t[4]*=a,t[8]*=c,t[1]*=i,t[5]*=a,t[9]*=c,t[2]*=i,t[6]*=a,t[10]*=c,t[3]*=i,t[7]*=a,t[11]*=c,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),a=Math.sin(t),c=1-i,d=e.x,f=e.y,m=e.z,g=c*d,v=c*f;return this.set(g*d+i,g*f-a*m,g*m+a*f,0,g*f+a*m,v*f+i,v*m-a*d,0,g*m-a*f,v*m+a*d,c*m*m+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,c,d){return this.set(1,i,c,0,e,1,d,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){const a=this.elements,c=t._x,d=t._y,f=t._z,m=t._w,g=c+c,v=d+d,M=f+f,x=c*g,S=c*v,w=c*M,k=d*v,C=d*M,T=f*M,D=m*g,z=m*v,L=m*M,O=i.x,U=i.y,H=i.z;return a[0]=(1-(k+T))*O,a[1]=(S+L)*O,a[2]=(w-z)*O,a[3]=0,a[4]=(S-L)*U,a[5]=(1-(x+T))*U,a[6]=(C+D)*U,a[7]=0,a[8]=(w+z)*H,a[9]=(C-D)*H,a[10]=(1-(x+k))*H,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){const a=this.elements;e.x=a[12],e.y=a[13],e.z=a[14];const c=this.determinantAffine();if(c===0)return i.set(1,1,1),t.identity(),this;let d=_p.set(a[0],a[1],a[2]).length();const f=_p.set(a[4],a[5],a[6]).length(),m=_p.set(a[8],a[9],a[10]).length();c<0&&(d=-d),Oo.copy(this);const g=1/d,v=1/f,M=1/m;return Oo.elements[0]*=g,Oo.elements[1]*=g,Oo.elements[2]*=g,Oo.elements[4]*=v,Oo.elements[5]*=v,Oo.elements[6]*=v,Oo.elements[8]*=M,Oo.elements[9]*=M,Oo.elements[10]*=M,t.setFromRotationMatrix(Oo),i.x=d,i.y=f,i.z=m,this}makePerspective(e,t,i,a,c,d,f=Ea,m=!1){const g=this.elements,v=2*c/(t-e),M=2*c/(i-a),x=(t+e)/(t-e),S=(i+a)/(i-a);let w,k;if(m)w=c/(d-c),k=d*c/(d-c);else if(f===Ea)w=-(d+c)/(d-c),k=-2*d*c/(d-c);else if(f===Hf)w=-d/(d-c),k=-d*c/(d-c);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+f);return g[0]=v,g[4]=0,g[8]=x,g[12]=0,g[1]=0,g[5]=M,g[9]=S,g[13]=0,g[2]=0,g[6]=0,g[10]=w,g[14]=k,g[3]=0,g[7]=0,g[11]=-1,g[15]=0,this}makeOrthographic(e,t,i,a,c,d,f=Ea,m=!1){const g=this.elements,v=2/(t-e),M=2/(i-a),x=-(t+e)/(t-e),S=-(i+a)/(i-a);let w,k;if(m)w=1/(d-c),k=d/(d-c);else if(f===Ea)w=-2/(d-c),k=-(d+c)/(d-c);else if(f===Hf)w=-1/(d-c),k=-c/(d-c);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+f);return g[0]=v,g[4]=0,g[8]=0,g[12]=x,g[1]=0,g[5]=M,g[9]=0,g[13]=S,g[2]=0,g[6]=0,g[10]=w,g[14]=k,g[3]=0,g[7]=0,g[11]=0,g[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const _p=new J,Oo=new Zt,lI=new J(0,0,0),cI=new J(1,1,1),Lu=new J,Ey=new J,Ma=new J,KE=new Zt,_E=new Es;class jo{constructor(e=0,t=0,i=0,a=jo.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const a=e.elements,c=a[0],d=a[4],f=a[8],m=a[1],g=a[5],v=a[9],M=a[2],x=a[6],S=a[10];switch(t){case"XYZ":this._y=Math.asin(Yt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(-v,S),this._z=Math.atan2(-d,c)):(this._x=Math.atan2(x,g),this._z=0);break;case"YXZ":this._x=Math.asin(-Yt(v,-1,1)),Math.abs(v)<.9999999?(this._y=Math.atan2(f,S),this._z=Math.atan2(m,g)):(this._y=Math.atan2(-M,c),this._z=0);break;case"ZXY":this._x=Math.asin(Yt(x,-1,1)),Math.abs(x)<.9999999?(this._y=Math.atan2(-M,S),this._z=Math.atan2(-d,g)):(this._y=0,this._z=Math.atan2(m,c));break;case"ZYX":this._y=Math.asin(-Yt(M,-1,1)),Math.abs(M)<.9999999?(this._x=Math.atan2(x,S),this._z=Math.atan2(m,c)):(this._x=0,this._z=Math.atan2(-d,g));break;case"YZX":this._z=Math.asin(Yt(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(-v,g),this._y=Math.atan2(-M,c)):(this._x=0,this._y=Math.atan2(f,S));break;case"XZY":this._z=Math.asin(-Yt(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(x,g),this._y=Math.atan2(f,c)):(this._x=Math.atan2(-v,S),this._y=0);break;default:ot("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return KE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(KE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _E.setFromEuler(this),this.setFromQuaternion(_E,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}jo.DEFAULT_ORDER="XYZ";class km{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let uI=0;const $E=new J,$p=new Es,bc=new Zt,Cy=new J,DA=new J,dI=new J,fI=new Es,eC=new J(1,0,0),tC=new J(0,1,0),nC=new J(0,0,1),iC={type:"added"},hI={type:"removed"},em={type:"childadded",child:null},EM={type:"childremoved",child:null};class Hn extends Xo{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:uI++}),this.uuid=Ca(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Hn.DEFAULT_UP.clone();const e=new J,t=new jo,i=new Es,a=new J(1,1,1);function c(){i.setFromEuler(t,!1)}function d(){t.setFromQuaternion(i,void 0,!1)}t._onChange(c),i._onChange(d),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new Zt},normalMatrix:{value:new _t}}),this.matrix=new Zt,this.matrixWorld=new Zt,this.matrixAutoUpdate=Hn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Hn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new km,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return $p.setFromAxisAngle(e,t),this.quaternion.multiply($p),this}rotateOnWorldAxis(e,t){return $p.setFromAxisAngle(e,t),this.quaternion.premultiply($p),this}rotateX(e){return this.rotateOnAxis(eC,e)}rotateY(e){return this.rotateOnAxis(tC,e)}rotateZ(e){return this.rotateOnAxis(nC,e)}translateOnAxis(e,t){return $E.copy(e).applyQuaternion(this.quaternion),this.position.add($E.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(eC,e)}translateY(e){return this.translateOnAxis(tC,e)}translateZ(e){return this.translateOnAxis(nC,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(bc.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?Cy.copy(e):Cy.set(e,t,i);const a=this.parent;this.updateWorldMatrix(!0,!1),DA.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?bc.lookAt(DA,Cy,this.up):bc.lookAt(Cy,DA,this.up),this.quaternion.setFromRotationMatrix(bc),a&&(bc.extractRotation(a.matrixWorld),$p.setFromRotationMatrix(bc),this.quaternion.premultiply($p.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(kt("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(iC),em.child=e,this.dispatchEvent(em),em.child=null):kt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(hI),EM.child=e,this.dispatchEvent(EM),EM.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),bc.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),bc.multiply(e.parent.matrixWorld)),e.applyMatrix4(bc),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(iC),em.child=e,this.dispatchEvent(em),em.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,a=this.children.length;i<a;i++){const d=this.children[i].getObjectByProperty(e,t);if(d!==void 0)return d}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const a=this.children;for(let c=0,d=a.length;c<d;c++)a[c].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(DA,e,dI),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(DA,fI,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(e!==null){const t=e.x,i=e.y,a=e.z,c=this.matrix.elements;c[12]+=t-c[0]*t-c[4]*i-c[8]*a,c[13]+=i-c[1]*t-c[5]*i-c[9]*a,c[14]+=a-c[2]*t-c[6]*i-c[10]*a}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,a=t.length;i<a;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t,i=!1){const a=this.parent;if(e===!0&&a!==null&&a.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||i)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,i=!0),t===!0){const c=this.children;for(let d=0,f=c.length;d<f;d++)c[d].updateWorldMatrix(!1,!0,i)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const a={};a.uuid=this.uuid,a.type=this.type,this.name!==""&&(a.name=this.name),this.castShadow===!0&&(a.castShadow=!0),this.receiveShadow===!0&&(a.receiveShadow=!0),this.visible===!1&&(a.visible=!1),this.frustumCulled===!1&&(a.frustumCulled=!1),this.renderOrder!==0&&(a.renderOrder=this.renderOrder),this.static!==!1&&(a.static=this.static),Object.keys(this.userData).length>0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.pivot!==null&&(a.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(a.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(a.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.geometryInfo=this._geometryInfo.map(f=>({...f,boundingBox:f.boundingBox?f.boundingBox.toJSON():void 0,boundingSphere:f.boundingSphere?f.boundingSphere.toJSON():void 0})),a.instanceInfo=this._instanceInfo.map(f=>({...f})),a.availableInstanceIds=this._availableInstanceIds.slice(),a.availableGeometryIds=this._availableGeometryIds.slice(),a.nextIndexStart=this._nextIndexStart,a.nextVertexStart=this._nextVertexStart,a.geometryCount=this._geometryCount,a.maxInstanceCount=this._maxInstanceCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.matricesTexture=this._matricesTexture.toJSON(e),a.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(a.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(a.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(a.boundingBox=this.boundingBox.toJSON()));function c(f,m){return f[m.uuid]===void 0&&(f[m.uuid]=m.toJSON(e)),m.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=c(e.geometries,this.geometry);const f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0){const m=f.shapes;if(Array.isArray(m))for(let g=0,v=m.length;g<v;g++){const M=m[g];c(e.shapes,M)}else c(e.shapes,m)}}if(this.isSkinnedMesh&&(a.bindMode=this.bindMode,a.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(c(e.skeletons,this.skeleton),a.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const f=[];for(let m=0,g=this.material.length;m<g;m++)f.push(c(e.materials,this.material[m]));a.material=f}else a.material=c(e.materials,this.material);if(this.children.length>0){a.children=[];for(let f=0;f<this.children.length;f++)a.children.push(this.children[f].toJSON(e).object)}if(this.animations.length>0){a.animations=[];for(let f=0;f<this.animations.length;f++){const m=this.animations[f];a.animations.push(c(e.animations,m))}}if(t){const f=d(e.geometries),m=d(e.materials),g=d(e.textures),v=d(e.images),M=d(e.shapes),x=d(e.skeletons),S=d(e.animations),w=d(e.nodes);f.length>0&&(i.geometries=f),m.length>0&&(i.materials=m),g.length>0&&(i.textures=g),v.length>0&&(i.images=v),M.length>0&&(i.shapes=M),x.length>0&&(i.skeletons=x),S.length>0&&(i.animations=S),w.length>0&&(i.nodes=w)}return i.object=a,i;function d(f){const m=[];for(const g in f){const v=f[g];delete v.metadata,m.push(v)}return m}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const a=e.children[i];this.add(a.clone())}return this}}Hn.DEFAULT_UP=new J(0,1,0);Hn.DEFAULT_MATRIX_AUTO_UPDATE=!0;Hn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class Mm extends Hn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const pI={type:"move"};class Mb{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Mm,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Mm,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new J,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new J),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Mm,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new J,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new J,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let a=null,c=null,d=null;const f=this._targetRay,m=this._grip,g=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(g&&e.hand){d=!0;for(const k of e.hand.values()){const C=t.getJointPose(k,i),T=this._getHandJoint(g,k);C!==null&&(T.matrix.fromArray(C.transform.matrix),T.matrix.decompose(T.position,T.rotation,T.scale),T.matrixWorldNeedsUpdate=!0,T.jointRadius=C.radius),T.visible=C!==null}const v=g.joints["index-finger-tip"],M=g.joints["thumb-tip"],x=v.position.distanceTo(M.position),S=.02,w=.005;g.inputState.pinching&&x>S+w?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!g.inputState.pinching&&x<=S-w&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else m!==null&&e.gripSpace&&(c=t.getPose(e.gripSpace,i),c!==null&&(m.matrix.fromArray(c.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,c.linearVelocity?(m.hasLinearVelocity=!0,m.linearVelocity.copy(c.linearVelocity)):m.hasLinearVelocity=!1,c.angularVelocity?(m.hasAngularVelocity=!0,m.angularVelocity.copy(c.angularVelocity)):m.hasAngularVelocity=!1,m.eventsEnabled&&m.dispatchEvent({type:"gripUpdated",data:e,target:this})));f!==null&&(a=t.getPose(e.targetRaySpace,i),a===null&&c!==null&&(a=c),a!==null&&(f.matrix.fromArray(a.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,a.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(a.linearVelocity)):f.hasLinearVelocity=!1,a.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(a.angularVelocity)):f.hasAngularVelocity=!1,this.dispatchEvent(pI)))}return f!==null&&(f.visible=a!==null),m!==null&&(m.visible=c!==null),g!==null&&(g.visible=d!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Mm;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const H3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Iu={h:0,s:0,l:0},Ry={h:0,s:0,l:0};function CM(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class ut{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const a=e;a&&a.isColor?this.copy(a):typeof a=="number"?this.setHex(a):typeof a=="string"&&this.setStyle(a)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ss){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,wn.colorSpaceToWorking(this,t),this}setRGB(e,t,i,a=wn.workingColorSpace){return this.r=e,this.g=t,this.b=i,wn.colorSpaceToWorking(this,a),this}setHSL(e,t,i,a=wn.workingColorSpace){if(e=b1(e,1),t=Yt(t,0,1),i=Yt(i,0,1),t===0)this.r=this.g=this.b=i;else{const c=i<=.5?i*(1+t):i+t-i*t,d=2*i-c;this.r=CM(d,c,e+1/3),this.g=CM(d,c,e),this.b=CM(d,c,e-1/3)}return wn.colorSpaceToWorking(this,a),this}setStyle(e,t=ss){function i(c){c!==void 0&&parseFloat(c)<1&&ot("Color: Alpha component of "+e+" will be ignored.")}let a;if(a=/^(\w+)\(([^\)]*)\)/.exec(e)){let c;const d=a[1],f=a[2];switch(d){case"rgb":case"rgba":if(c=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setRGB(Math.min(255,parseInt(c[1],10))/255,Math.min(255,parseInt(c[2],10))/255,Math.min(255,parseInt(c[3],10))/255,t);if(c=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setRGB(Math.min(100,parseInt(c[1],10))/100,Math.min(100,parseInt(c[2],10))/100,Math.min(100,parseInt(c[3],10))/100,t);break;case"hsl":case"hsla":if(c=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return i(c[4]),this.setHSL(parseFloat(c[1])/360,parseFloat(c[2])/100,parseFloat(c[3])/100,t);break;default:ot("Color: Unknown color model "+e)}}else if(a=/^\#([A-Fa-f\d]+)$/.exec(e)){const c=a[1],d=c.length;if(d===3)return this.setRGB(parseInt(c.charAt(0),16)/15,parseInt(c.charAt(1),16)/15,parseInt(c.charAt(2),16)/15,t);if(d===6)return this.setHex(parseInt(c,16),t);ot("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ss){const i=H3[e.toLowerCase()];return i!==void 0?this.setHex(i,t):ot("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Pc(e.r),this.g=Pc(e.g),this.b=Pc(e.b),this}copyLinearToSRGB(e){return this.r=Tm(e.r),this.g=Tm(e.g),this.b=Tm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ss){return wn.workingToColorSpace(is.copy(this),e),Math.round(Yt(is.r*255,0,255))*65536+Math.round(Yt(is.g*255,0,255))*256+Math.round(Yt(is.b*255,0,255))}getHexString(e=ss){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=wn.workingColorSpace){wn.workingToColorSpace(is.copy(this),t);const i=is.r,a=is.g,c=is.b,d=Math.max(i,a,c),f=Math.min(i,a,c);let m,g;const v=(f+d)/2;if(f===d)m=0,g=0;else{const M=d-f;switch(g=v<=.5?M/(d+f):M/(2-d-f),d){case i:m=(a-c)/M+(a<c?6:0);break;case a:m=(c-i)/M+2;break;case c:m=(i-a)/M+4;break}m/=6}return e.h=m,e.s=g,e.l=v,e}getRGB(e,t=wn.workingColorSpace){return wn.workingToColorSpace(is.copy(this),t),e.r=is.r,e.g=is.g,e.b=is.b,e}getStyle(e=ss){wn.workingToColorSpace(is.copy(this),e);const t=is.r,i=is.g,a=is.b;return e!==ss?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${a.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(a*255)})`}offsetHSL(e,t,i){return this.getHSL(Iu),this.setHSL(Iu.h+e,Iu.s+t,Iu.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(Iu),e.getHSL(Ry);const i=rv(Iu.h,Ry.h,t),a=rv(Iu.s,Ry.s,t),c=rv(Iu.l,Ry.l,t);return this.setHSL(i,a,c),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,a=this.b,c=e.elements;return this.r=c[0]*t+c[3]*i+c[6]*a,this.g=c[1]*t+c[4]*i+c[7]*a,this.b=c[2]*t+c[5]*i+c[8]*a,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const is=new ut;ut.NAMES=H3;class Ox{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new ut(e),this.density=t}clone(){return new Ox(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Vx{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new ut(e),this.near=t,this.far=i}clone(){return new Vx(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}let S1=class extends Hn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new jo,this.environmentIntensity=1,this.environmentRotation=new jo,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}};const Vo=new J,xc=new J,RM=new J,Sc=new J,tm=new J,nm=new J,rC=new J,PM=new J,kM=new J,DM=new J,LM=new ni,IM=new ni,NM=new ni;class Qs{constructor(e=new J,t=new J,i=new J){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),Vo.subVectors(e,t),a.cross(Vo);const c=a.lengthSq();return c>0?a.multiplyScalar(1/Math.sqrt(c)):a.set(0,0,0)}static getBarycoord(e,t,i,a,c){Vo.subVectors(a,t),xc.subVectors(i,t),RM.subVectors(e,t);const d=Vo.dot(Vo),f=Vo.dot(xc),m=Vo.dot(RM),g=xc.dot(xc),v=xc.dot(RM),M=d*g-f*f;if(M===0)return c.set(0,0,0),null;const x=1/M,S=(g*m-f*v)*x,w=(d*v-f*m)*x;return c.set(1-S-w,w,S)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,Sc)===null?!1:Sc.x>=0&&Sc.y>=0&&Sc.x+Sc.y<=1}static getInterpolation(e,t,i,a,c,d,f,m){return this.getBarycoord(e,t,i,a,Sc)===null?(m.x=0,m.y=0,"z"in m&&(m.z=0),"w"in m&&(m.w=0),null):(m.setScalar(0),m.addScaledVector(c,Sc.x),m.addScaledVector(d,Sc.y),m.addScaledVector(f,Sc.z),m)}static getInterpolatedAttribute(e,t,i,a,c,d){return LM.setScalar(0),IM.setScalar(0),NM.setScalar(0),LM.fromBufferAttribute(e,t),IM.fromBufferAttribute(e,i),NM.fromBufferAttribute(e,a),d.setScalar(0),d.addScaledVector(LM,c.x),d.addScaledVector(IM,c.y),d.addScaledVector(NM,c.z),d}static isFrontFacing(e,t,i,a){return Vo.subVectors(i,t),xc.subVectors(e,t),Vo.cross(xc).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Vo.subVectors(this.c,this.b),xc.subVectors(this.a,this.b),Vo.cross(xc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Qs.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Qs.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,a,c){return Qs.getInterpolation(e,this.a,this.b,this.c,t,i,a,c)}containsPoint(e){return Qs.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Qs.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,a=this.b,c=this.c;let d,f;tm.subVectors(a,i),nm.subVectors(c,i),PM.subVectors(e,i);const m=tm.dot(PM),g=nm.dot(PM);if(m<=0&&g<=0)return t.copy(i);kM.subVectors(e,a);const v=tm.dot(kM),M=nm.dot(kM);if(v>=0&&M<=v)return t.copy(a);const x=m*M-v*g;if(x<=0&&m>=0&&v<=0)return d=m/(m-v),t.copy(i).addScaledVector(tm,d);DM.subVectors(e,c);const S=tm.dot(DM),w=nm.dot(DM);if(w>=0&&S<=w)return t.copy(c);const k=S*g-m*w;if(k<=0&&g>=0&&w<=0)return f=g/(g-w),t.copy(i).addScaledVector(nm,f);const C=v*w-S*M;if(C<=0&&M-v>=0&&S-w>=0)return rC.subVectors(c,a),f=(M-v)/(M-v+(S-w)),t.copy(a).addScaledVector(rC,f);const T=1/(C+k+x);return d=k*T,f=x*T,t.copy(i).addScaledVector(tm,d).addScaledVector(nm,f)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class os{constructor(e=new J(1/0,1/0,1/0),t=new J(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Ho.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Ho.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=Ho.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const c=i.getAttribute("position");if(t===!0&&c!==void 0&&e.isInstancedMesh!==!0)for(let d=0,f=c.count;d<f;d++)e.isMesh===!0?e.getVertexPosition(d,Ho):Ho.fromBufferAttribute(c,d),Ho.applyMatrix4(e.matrixWorld),this.expandByPoint(Ho);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Py.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Py.copy(i.boundingBox)),Py.applyMatrix4(e.matrixWorld),this.union(Py)}const a=e.children;for(let c=0,d=a.length;c<d;c++)this.expandByObject(a[c],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ho),Ho.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(LA),ky.subVectors(this.max,LA),im.subVectors(e.a,LA),rm.subVectors(e.b,LA),sm.subVectors(e.c,LA),Nu.subVectors(rm,im),zu.subVectors(sm,rm),vf.subVectors(im,sm);let t=[0,-Nu.z,Nu.y,0,-zu.z,zu.y,0,-vf.z,vf.y,Nu.z,0,-Nu.x,zu.z,0,-zu.x,vf.z,0,-vf.x,-Nu.y,Nu.x,0,-zu.y,zu.x,0,-vf.y,vf.x,0];return!zM(t,im,rm,sm,ky)||(t=[1,0,0,0,1,0,0,0,1],!zM(t,im,rm,sm,ky))?!1:(Dy.crossVectors(Nu,zu),t=[Dy.x,Dy.y,Dy.z],zM(t,im,rm,sm,ky))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ho).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ho).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Mc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Mc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Mc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Mc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Mc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Mc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Mc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Mc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Mc),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Mc=[new J,new J,new J,new J,new J,new J,new J,new J],Ho=new J,Py=new os,im=new J,rm=new J,sm=new J,Nu=new J,zu=new J,vf=new J,LA=new J,ky=new J,Dy=new J,yf=new J;function zM(s,e,t,i,a){for(let c=0,d=s.length-3;c<=d;c+=3){yf.fromArray(s,c);const f=a.x*Math.abs(yf.x)+a.y*Math.abs(yf.y)+a.z*Math.abs(yf.z),m=e.dot(yf),g=t.dot(yf),v=i.dot(yf);if(Math.max(-Math.max(m,g,v),Math.min(m,g,v))>f)return!1}return!0}const Rc=mI();function mI(){const s=new ArrayBuffer(4),e=new Float32Array(s),t=new Uint32Array(s),i=new Uint32Array(512),a=new Uint32Array(512);for(let m=0;m<256;++m){const g=m-127;g<-27?(i[m]=0,i[m|256]=32768,a[m]=24,a[m|256]=24):g<-14?(i[m]=1024>>-g-14,i[m|256]=1024>>-g-14|32768,a[m]=-g-1,a[m|256]=-g-1):g<=15?(i[m]=g+15<<10,i[m|256]=g+15<<10|32768,a[m]=13,a[m|256]=13):g<128?(i[m]=31744,i[m|256]=64512,a[m]=24,a[m|256]=24):(i[m]=31744,i[m|256]=64512,a[m]=13,a[m|256]=13)}const c=new Uint32Array(2048),d=new Uint32Array(64),f=new Uint32Array(64);for(let m=1;m<1024;++m){let g=m<<13,v=0;for(;(g&8388608)===0;)g<<=1,v-=8388608;g&=-8388609,v+=947912704,c[m]=g|v}for(let m=1024;m<2048;++m)c[m]=939524096+(m-1024<<13);for(let m=1;m<31;++m)d[m]=m<<23;d[31]=1199570944,d[32]=2147483648;for(let m=33;m<63;++m)d[m]=2147483648+(m-32<<23);d[63]=3347054592;for(let m=1;m<64;++m)m!==32&&(f[m]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:a,mantissaTable:c,exponentTable:d,offsetTable:f}}function Ys(s){Math.abs(s)>65504&&ot("DataUtils.toHalfFloat(): Value out of range."),s=Yt(s,-65504,65504),Rc.floatView[0]=s;const e=Rc.uint32View[0],t=e>>23&511;return Rc.baseTable[t]+((e&8388607)>>Rc.shiftTable[t])}function XA(s){const e=s>>10;return Rc.uint32View[0]=Rc.mantissaTable[Rc.offsetTable[e]+(s&1023)]+Rc.exponentTable[e],Rc.floatView[0]}class gI{static toHalfFloat(e){return Ys(e)}static fromHalfFloat(e){return XA(e)}}const ar=new J,Ly=new Oe;let AI=0;class si extends Xo{constructor(e,t,i=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:AI++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=pv,this.updateRanges=[],this.gpuType=ws,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let a=0,c=this.itemSize;a<c;a++)this.array[e+a]=t.array[i+a];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)Ly.fromBufferAttribute(this,t),Ly.applyMatrix3(e),this.setXY(t,Ly.x,Ly.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix3(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix4(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.applyNormalMatrix(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)ar.fromBufferAttribute(this,t),ar.transformDirection(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=Ms(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=un(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,a){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=a,this}setXYZW(e,t,i,a,c){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=a,this.array[e+3]=c,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==pv&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class vI extends si{constructor(e,t,i){super(new Int8Array(e),t,i)}}class yI extends si{constructor(e,t,i){super(new Uint8Array(e),t,i)}}class bI extends si{constructor(e,t,i){super(new Uint8ClampedArray(e),t,i)}}class xI extends si{constructor(e,t,i){super(new Int16Array(e),t,i)}}class M1 extends si{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class SI extends si{constructor(e,t,i){super(new Int32Array(e),t,i)}}class w1 extends si{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class MI extends si{constructor(e,t,i){super(new Uint16Array(e),t,i),this.isFloat16BufferAttribute=!0}getX(e){let t=XA(this.array[e*this.itemSize]);return this.normalized&&(t=Ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize]=Ys(t),this}getY(e){let t=XA(this.array[e*this.itemSize+1]);return this.normalized&&(t=Ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+1]=Ys(t),this}getZ(e){let t=XA(this.array[e*this.itemSize+2]);return this.normalized&&(t=Ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+2]=Ys(t),this}getW(e){let t=XA(this.array[e*this.itemSize+3]);return this.normalized&&(t=Ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.array[e*this.itemSize+3]=Ys(t),this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this}setXYZ(e,t,i,a){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this.array[e+2]=Ys(a),this}setXYZW(e,t,i,a,c){return e*=this.itemSize,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.array[e+0]=Ys(t),this.array[e+1]=Ys(i),this.array[e+2]=Ys(a),this.array[e+3]=Ys(c),this}}class wt extends si{constructor(e,t,i){super(new Float32Array(e),t,i)}}const wI=new os,IA=new J,BM=new J;class Vr{constructor(e=new J,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):wI.setFromPoints(e).getCenter(i);let a=0;for(let c=0,d=e.length;c<d;c++)a=Math.max(a,i.distanceToSquared(e[c]));return this.radius=Math.sqrt(a),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;IA.subVectors(e,this.center);const t=IA.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.addScaledVector(IA,a/i),this.radius+=a}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(BM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(IA.copy(e.center).add(BM)),this.expandByPoint(IA.copy(e.center).sub(BM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let TI=0;const ro=new Zt,UM=new Hn,am=new J,wa=new os,NA=new os,Pr=new J;class rn extends Xo{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:TI++}),this.uuid=Ca(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(NL(e)?w1:M1)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const c=new _t().getNormalMatrix(e);i.applyNormalMatrix(c),i.needsUpdate=!0}const a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(e){return ro.makeRotationFromQuaternion(e),this.applyMatrix4(ro),this}rotateX(e){return ro.makeRotationX(e),this.applyMatrix4(ro),this}rotateY(e){return ro.makeRotationY(e),this.applyMatrix4(ro),this}rotateZ(e){return ro.makeRotationZ(e),this.applyMatrix4(ro),this}translate(e,t,i){return ro.makeTranslation(e,t,i),this.applyMatrix4(ro),this}scale(e,t,i){return ro.makeScale(e,t,i),this.applyMatrix4(ro),this}lookAt(e){return UM.lookAt(e),UM.updateMatrix(),this.applyMatrix4(UM.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(am).negate(),this.translate(am.x,am.y,am.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const i=[];for(let a=0,c=e.length;a<c;a++){const d=e[a];i.push(d.x,d.y,d.z||0)}this.setAttribute("position",new wt(i,3))}else{const i=Math.min(e.length,t.count);for(let a=0;a<i;a++){const c=e[a];t.setXYZ(a,c.x,c.y,c.z||0)}e.length>t.count&&ot("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new os);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new J(-1/0,-1/0,-1/0),new J(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,a=t.length;i<a;i++){const c=t[i];wa.setFromBufferAttribute(c),this.morphTargetsRelative?(Pr.addVectors(this.boundingBox.min,wa.min),this.boundingBox.expandByPoint(Pr),Pr.addVectors(this.boundingBox.max,wa.max),this.boundingBox.expandByPoint(Pr)):(this.boundingBox.expandByPoint(wa.min),this.boundingBox.expandByPoint(wa.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&kt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new J,1/0);return}if(e){const i=this.boundingSphere.center;if(wa.setFromBufferAttribute(e),t)for(let c=0,d=t.length;c<d;c++){const f=t[c];NA.setFromBufferAttribute(f),this.morphTargetsRelative?(Pr.addVectors(wa.min,NA.min),wa.expandByPoint(Pr),Pr.addVectors(wa.max,NA.max),wa.expandByPoint(Pr)):(wa.expandByPoint(NA.min),wa.expandByPoint(NA.max))}wa.getCenter(i);let a=0;for(let c=0,d=e.count;c<d;c++)Pr.fromBufferAttribute(e,c),a=Math.max(a,i.distanceToSquared(Pr));if(t)for(let c=0,d=t.length;c<d;c++){const f=t[c],m=this.morphTargetsRelative;for(let g=0,v=f.count;g<v;g++)Pr.fromBufferAttribute(f,g),m&&(am.fromBufferAttribute(e,g),Pr.add(am)),a=Math.max(a,i.distanceToSquared(Pr))}this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&kt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){kt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,a=t.normal,c=t.uv;let d=this.getAttribute("tangent");(d===void 0||d.count!==i.count)&&(d=new si(new Float32Array(4*i.count),4),this.setAttribute("tangent",d));const f=[],m=[];for(let I=0;I<i.count;I++)f[I]=new J,m[I]=new J;const g=new J,v=new J,M=new J,x=new Oe,S=new Oe,w=new Oe,k=new J,C=new J;function T(I,F,V){g.fromBufferAttribute(i,I),v.fromBufferAttribute(i,F),M.fromBufferAttribute(i,V),x.fromBufferAttribute(c,I),S.fromBufferAttribute(c,F),w.fromBufferAttribute(c,V),v.sub(g),M.sub(g),S.sub(x),w.sub(x);const X=1/(S.x*w.y-w.x*S.y);isFinite(X)&&(k.copy(v).multiplyScalar(w.y).addScaledVector(M,-S.y).multiplyScalar(X),C.copy(M).multiplyScalar(S.x).addScaledVector(v,-w.x).multiplyScalar(X),f[I].add(k),f[F].add(k),f[V].add(k),m[I].add(C),m[F].add(C),m[V].add(C))}let D=this.groups;D.length===0&&(D=[{start:0,count:e.count}]);for(let I=0,F=D.length;I<F;++I){const V=D[I],X=V.start,_=V.count;for(let K=X,le=X+_;K<le;K+=3)T(e.getX(K+0),e.getX(K+1),e.getX(K+2))}const z=new J,L=new J,O=new J,U=new J;function H(I){O.fromBufferAttribute(a,I),U.copy(O);const F=f[I];z.copy(F),z.sub(O.multiplyScalar(O.dot(F))).normalize(),L.crossVectors(U,F);const X=L.dot(m[I])<0?-1:1;d.setXYZW(I,z.x,z.y,z.z,X)}for(let I=0,F=D.length;I<F;++I){const V=D[I],X=V.start,_=V.count;for(let K=X,le=X+_;K<le;K+=3)H(e.getX(K+0)),H(e.getX(K+1)),H(e.getX(K+2))}this._transformed=!0}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0||i.count!==t.count)i=new si(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let x=0,S=i.count;x<S;x++)i.setXYZ(x,0,0,0);const a=new J,c=new J,d=new J,f=new J,m=new J,g=new J,v=new J,M=new J;if(e)for(let x=0,S=e.count;x<S;x+=3){const w=e.getX(x+0),k=e.getX(x+1),C=e.getX(x+2);a.fromBufferAttribute(t,w),c.fromBufferAttribute(t,k),d.fromBufferAttribute(t,C),v.subVectors(d,c),M.subVectors(a,c),v.cross(M),f.fromBufferAttribute(i,w),m.fromBufferAttribute(i,k),g.fromBufferAttribute(i,C),f.add(v),m.add(v),g.add(v),i.setXYZ(w,f.x,f.y,f.z),i.setXYZ(k,m.x,m.y,m.z),i.setXYZ(C,g.x,g.y,g.z)}else for(let x=0,S=t.count;x<S;x+=3)a.fromBufferAttribute(t,x+0),c.fromBufferAttribute(t,x+1),d.fromBufferAttribute(t,x+2),v.subVectors(d,c),M.subVectors(a,c),v.cross(M),i.setXYZ(x+0,v.x,v.y,v.z),i.setXYZ(x+1,v.x,v.y,v.z),i.setXYZ(x+2,v.x,v.y,v.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)Pr.fromBufferAttribute(e,t),Pr.normalize(),e.setXYZ(t,Pr.x,Pr.y,Pr.z)}toNonIndexed(){function e(f,m){const g=f.array,v=f.itemSize,M=f.normalized,x=new g.constructor(m.length*v);let S=0,w=0;for(let k=0,C=m.length;k<C;k++){f.isInterleavedBufferAttribute?S=m[k]*f.data.stride+f.offset:S=m[k]*v;for(let T=0;T<v;T++)x[w++]=g[S++]}return new si(x,v,M)}if(this.index===null)return ot("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new rn,i=this.index.array,a=this.attributes;for(const f in a){const m=a[f],g=e(m,i);t.setAttribute(f,g)}const c=this.morphAttributes;for(const f in c){const m=[],g=c[f];for(let v=0,M=g.length;v<M;v++){const x=g[v],S=e(x,i);m.push(S)}t.morphAttributes[f]=m}t.morphTargetsRelative=this.morphTargetsRelative;const d=this.groups;for(let f=0,m=d.length;f<m;f++){const g=d[f];t.addGroup(g.start,g.count,g.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.parameters!==void 0&&this._transformed===!0?"BufferGeometry":this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){const m=this.parameters;for(const g in m)m[g]!==void 0&&(e[g]=m[g]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const m in i){const g=i[m];e.data.attributes[m]=g.toJSON(e.data)}const a={};let c=!1;for(const m in this.morphAttributes){const g=this.morphAttributes[m],v=[];for(let M=0,x=g.length;M<x;M++){const S=g[M];v.push(S.toJSON(e.data))}v.length>0&&(a[m]=v,c=!0)}c&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);const d=this.groups;d.length>0&&(e.data.groups=JSON.parse(JSON.stringify(d)));const f=this.boundingSphere;return f!==null&&(e.data.boundingSphere=f.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const a=e.attributes;for(const g in a){const v=a[g];this.setAttribute(g,v.clone(t))}const c=e.morphAttributes;for(const g in c){const v=[],M=c[g];for(let x=0,S=M.length;x<S;x++)v.push(M[x].clone(t));this.morphAttributes[g]=v}this.morphTargetsRelative=e.morphTargetsRelative;const d=e.groups;for(let g=0,v=d.length;g<v;g++){const M=d[g];this.addGroup(M.start,M.count,M.materialIndex)}const f=e.boundingBox;f!==null&&(this.boundingBox=f.clone());const m=e.boundingSphere;return m!==null&&(this.boundingSphere=m.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this._transformed=e._transformed,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Hx{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=pv,this.updateRanges=[],this.version=0,this.uuid=Ca()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let a=0,c=this.stride;a<c;a++)this.array[e+a]=t.array[i+a];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ca()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ca()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const bs=new J;class Gf{constructor(e,t,i,a=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=a}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,i=this.data.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.applyMatrix4(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.applyNormalMatrix(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)bs.fromBufferAttribute(this,t),bs.transformDirection(e),this.setXYZ(t,bs.x,bs.y,bs.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=Ms(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=un(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=un(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Ms(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Ms(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Ms(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Ms(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,a){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=a,this}setXYZW(e,t,i,a,c){return e=e*this.data.stride+this.offset,this.normalized&&(t=un(t,this.array),i=un(i,this.array),a=un(a,this.array),c=un(c,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=a,this.data.array[e+3]=c,this}clone(e){if(e===void 0){gv("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const a=i*this.data.stride+this.offset;for(let c=0;c<this.itemSize;c++)t.push(this.data.array[a+c])}return new si(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Gf(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){gv("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const a=i*this.data.stride+this.offset;for(let c=0;c<this.itemSize;c++)t.push(this.data.array[a+c])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let EI=0;class Hr extends Xo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:EI++}),this.uuid=Ca(),this.name="",this.type="Material",this.blending=Uf,this.side=kc,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Rb,this.blendDst=Pb,this.blendEquation=Vu,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ut(0,0,0),this.blendAlpha=0,this.depthFunc=Vf,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=zw,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Df,this.stencilZFail=Df,this.stencilZPass=Df,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){ot(`Material: parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){ot(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}a&&a.isColor?a.set(i):a&&a.isVector2&&i&&i.isVector2||a&&a.isEuler&&i&&i.isEuler||a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Uf&&(i.blending=this.blending),this.side!==kc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Rb&&(i.blendSrc=this.blendSrc),this.blendDst!==Pb&&(i.blendDst=this.blendDst),this.blendEquation!==Vu&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Vf&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==zw&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Df&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Df&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Df&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function a(c){const d=[];for(const f in c){const m=c[f];delete m.metadata,d.push(m)}return d}if(t){const c=a(e.textures),d=a(e.images);c.length>0&&(i.textures=c),d.length>0&&(i.images=d)}return i}fromJSON(e,t){if(e.uuid!==void 0&&(this.uuid=e.uuid),e.name!==void 0&&(this.name=e.name),e.color!==void 0&&this.color!==void 0&&this.color.setHex(e.color),e.roughness!==void 0&&(this.roughness=e.roughness),e.metalness!==void 0&&(this.metalness=e.metalness),e.sheen!==void 0&&(this.sheen=e.sheen),e.sheenColor!==void 0&&(this.sheenColor=new ut().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(this.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(e.emissive),e.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(e.specular),e.specularIntensity!==void 0&&(this.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(this.shininess=e.shininess),e.clearcoat!==void 0&&(this.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(this.dispersion=e.dispersion),e.iridescence!==void 0&&(this.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(this.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(this.transmission=e.transmission),e.thickness!==void 0&&(this.thickness=e.thickness),e.attenuationDistance!==void 0&&(this.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(this.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(this.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(this.fog=e.fog),e.flatShading!==void 0&&(this.flatShading=e.flatShading),e.blending!==void 0&&(this.blending=e.blending),e.combine!==void 0&&(this.combine=e.combine),e.side!==void 0&&(this.side=e.side),e.shadowSide!==void 0&&(this.shadowSide=e.shadowSide),e.opacity!==void 0&&(this.opacity=e.opacity),e.transparent!==void 0&&(this.transparent=e.transparent),e.alphaTest!==void 0&&(this.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(this.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(this.depthFunc=e.depthFunc),e.depthTest!==void 0&&(this.depthTest=e.depthTest),e.depthWrite!==void 0&&(this.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(this.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(this.blendSrc=e.blendSrc),e.blendDst!==void 0&&(this.blendDst=e.blendDst),e.blendEquation!==void 0&&(this.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(this.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(this.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(this.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(this.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(this.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(this.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(this.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(this.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(this.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(this.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(this.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(this.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(this.rotation=e.rotation),e.linewidth!==void 0&&(this.linewidth=e.linewidth),e.dashSize!==void 0&&(this.dashSize=e.dashSize),e.gapSize!==void 0&&(this.gapSize=e.gapSize),e.scale!==void 0&&(this.scale=e.scale),e.polygonOffset!==void 0&&(this.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(this.dithering=e.dithering),e.alphaToCoverage!==void 0&&(this.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(this.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(this.allowOverride=e.allowOverride),e.visible!==void 0&&(this.visible=e.visible),e.toneMapped!==void 0&&(this.toneMapped=e.toneMapped),e.userData!==void 0&&(this.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?this.vertexColors=e.vertexColors>0:this.vertexColors=e.vertexColors),e.size!==void 0&&(this.size=e.size),e.sizeAttenuation!==void 0&&(this.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(this.map=t[e.map]||null),e.matcap!==void 0&&(this.matcap=t[e.matcap]||null),e.alphaMap!==void 0&&(this.alphaMap=t[e.alphaMap]||null),e.bumpMap!==void 0&&(this.bumpMap=t[e.bumpMap]||null),e.bumpScale!==void 0&&(this.bumpScale=e.bumpScale),e.normalMap!==void 0&&(this.normalMap=t[e.normalMap]||null),e.normalMapType!==void 0&&(this.normalMapType=e.normalMapType),e.normalScale!==void 0){let i=e.normalScale;Array.isArray(i)===!1&&(i=[i,i]),this.normalScale=new Oe().fromArray(i)}return e.displacementMap!==void 0&&(this.displacementMap=t[e.displacementMap]||null),e.displacementScale!==void 0&&(this.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(this.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(this.roughnessMap=t[e.roughnessMap]||null),e.metalnessMap!==void 0&&(this.metalnessMap=t[e.metalnessMap]||null),e.emissiveMap!==void 0&&(this.emissiveMap=t[e.emissiveMap]||null),e.emissiveIntensity!==void 0&&(this.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(this.specularMap=t[e.specularMap]||null),e.specularIntensityMap!==void 0&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),e.specularColorMap!==void 0&&(this.specularColorMap=t[e.specularColorMap]||null),e.envMap!==void 0&&(this.envMap=t[e.envMap]||null),e.envMapRotation!==void 0&&this.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(this.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(this.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(this.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(this.lightMap=t[e.lightMap]||null),e.lightMapIntensity!==void 0&&(this.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(this.aoMap=t[e.aoMap]||null),e.aoMapIntensity!==void 0&&(this.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(this.gradientMap=t[e.gradientMap]||null),e.clearcoatMap!==void 0&&(this.clearcoatMap=t[e.clearcoatMap]||null),e.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),e.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),e.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new Oe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(this.iridescenceMap=t[e.iridescenceMap]||null),e.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),e.transmissionMap!==void 0&&(this.transmissionMap=t[e.transmissionMap]||null),e.thicknessMap!==void 0&&(this.thicknessMap=t[e.thicknessMap]||null),e.anisotropyMap!==void 0&&(this.anisotropyMap=t[e.anisotropyMap]||null),e.sheenColorMap!==void 0&&(this.sheenColorMap=t[e.sheenColorMap]||null),e.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const a=t.length;i=new Array(a);for(let c=0;c!==a;++c)i[c]=t[c].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class T1 extends Hr{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new ut(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let om;const zA=new J,lm=new J,cm=new J,um=new Oe,BA=new Oe,G3=new Zt,Iy=new J,UA=new J,Ny=new J,sC=new Oe,FM=new Oe,aC=new Oe;class W3 extends Hn{constructor(e=new T1){if(super(),this.isSprite=!0,this.type="Sprite",om===void 0){om=new rn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new Hx(t,5);om.setIndex([0,1,2,0,2,3]),om.setAttribute("position",new Gf(i,3,0,!1)),om.setAttribute("uv",new Gf(i,2,3,!1))}this.geometry=om,this.material=e,this.center=new Oe(.5,.5),this.count=1}raycast(e,t){e.camera===null&&kt('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),lm.setFromMatrixScale(this.matrixWorld),G3.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),cm.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&lm.multiplyScalar(-cm.z);const i=this.material.rotation;let a,c;i!==0&&(c=Math.cos(i),a=Math.sin(i));const d=this.center;zy(Iy.set(-.5,-.5,0),cm,d,lm,a,c),zy(UA.set(.5,-.5,0),cm,d,lm,a,c),zy(Ny.set(.5,.5,0),cm,d,lm,a,c),sC.set(0,0),FM.set(1,0),aC.set(1,1);let f=e.ray.intersectTriangle(Iy,UA,Ny,!1,zA);if(f===null&&(zy(UA.set(-.5,.5,0),cm,d,lm,a,c),FM.set(0,1),f=e.ray.intersectTriangle(Iy,Ny,UA,!1,zA),f===null))return;const m=e.ray.origin.distanceTo(zA);m<e.near||m>e.far||t.push({distance:m,point:zA.clone(),uv:Qs.getInterpolation(zA,Iy,UA,Ny,sC,FM,aC,new Oe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function zy(s,e,t,i,a,c){um.subVectors(s,t).addScalar(.5).multiply(i),a!==void 0?(BA.x=c*um.x-a*um.y,BA.y=a*um.x+c*um.y):BA.copy(um),s.copy(e),s.x+=BA.x,s.y+=BA.y,s.applyMatrix4(G3)}const By=new J,oC=new J;class j3 extends Hn{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,a=t.length;i<a;i++){const c=t[i];this.addLevel(c.object.clone(),c.distance,c.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,i=0){t=Math.abs(t);const a=this.levels;let c;for(c=0;c<a.length&&!(t<a[c].distance);c++);return a.splice(c,0,{distance:t,hysteresis:i,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let i=0;i<t.length;i++)if(t[i].distance===e){const a=t.splice(i,1);return this.remove(a[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let i,a;for(i=1,a=t.length;i<a;i++){let c=t[i].distance;if(t[i].object.visible&&(c-=c*t[i].hysteresis),e<c)break}return t[i-1].object}return null}raycast(e,t){if(this.levels.length>0){By.setFromMatrixPosition(this.matrixWorld);const a=e.ray.origin.distanceTo(By);this.getObjectForDistance(a).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){By.setFromMatrixPosition(e.matrixWorld),oC.setFromMatrixPosition(this.matrixWorld);const i=By.distanceTo(oC)/e.zoom;t[0].object.visible=!0;let a,c;for(a=1,c=t.length;a<c;a++){let d=t[a].distance;if(t[a].object.visible&&(d-=d*t[a].hysteresis),i>=d)t[a-1].object.visible=!1,t[a].object.visible=!0;else break}for(this._currentLevel=a-1;a<c;a++)t[a].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const i=this.levels;for(let a=0,c=i.length;a<c;a++){const d=i[a];t.object.levels.push({object:d.object.uuid,distance:d.distance,hysteresis:d.hysteresis})}return t}}const wc=new J,OM=new J,Uy=new J,Bu=new J,VM=new J,Fy=new J,HM=new J;class Um{constructor(e=new J,t=new J(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,wc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=wc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(wc.copy(this.origin).addScaledVector(this.direction,t),wc.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){OM.copy(e).add(t).multiplyScalar(.5),Uy.copy(t).sub(e).normalize(),Bu.copy(this.origin).sub(OM);const c=e.distanceTo(t)*.5,d=-this.direction.dot(Uy),f=Bu.dot(this.direction),m=-Bu.dot(Uy),g=Bu.lengthSq(),v=Math.abs(1-d*d);let M,x,S,w;if(v>0)if(M=d*m-f,x=d*f-m,w=c*v,M>=0)if(x>=-w)if(x<=w){const k=1/v;M*=k,x*=k,S=M*(M+d*x+2*f)+x*(d*M+x+2*m)+g}else x=c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;else x=-c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;else x<=-w?(M=Math.max(0,-(-d*c+f)),x=M>0?-c:Math.min(Math.max(-c,-m),c),S=-M*M+x*(x+2*m)+g):x<=w?(M=0,x=Math.min(Math.max(-c,-m),c),S=x*(x+2*m)+g):(M=Math.max(0,-(d*c+f)),x=M>0?c:Math.min(Math.max(-c,-m),c),S=-M*M+x*(x+2*m)+g);else x=d>0?-c:c,M=Math.max(0,-(d*x+f)),S=-M*M+x*(x+2*m)+g;return i&&i.copy(this.origin).addScaledVector(this.direction,M),a&&a.copy(OM).addScaledVector(Uy,x),S}intersectSphere(e,t){wc.subVectors(e.center,this.origin);const i=wc.dot(this.direction),a=wc.dot(wc)-i*i,c=e.radius*e.radius;if(a>c)return null;const d=Math.sqrt(c-a),f=i-d,m=i+d;return m<0?null:f<0?this.at(m,t):this.at(f,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,c,d,f,m;const g=1/this.direction.x,v=1/this.direction.y,M=1/this.direction.z,x=this.origin;return g>=0?(i=(e.min.x-x.x)*g,a=(e.max.x-x.x)*g):(i=(e.max.x-x.x)*g,a=(e.min.x-x.x)*g),v>=0?(c=(e.min.y-x.y)*v,d=(e.max.y-x.y)*v):(c=(e.max.y-x.y)*v,d=(e.min.y-x.y)*v),i>d||c>a||((c>i||isNaN(i))&&(i=c),(d<a||isNaN(a))&&(a=d),M>=0?(f=(e.min.z-x.z)*M,m=(e.max.z-x.z)*M):(f=(e.max.z-x.z)*M,m=(e.min.z-x.z)*M),i>m||f>a)||((f>i||i!==i)&&(i=f),(m<a||a!==a)&&(a=m),a<0)?null:this.at(i>=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,wc)!==null}intersectTriangle(e,t,i,a,c){VM.subVectors(t,e),Fy.subVectors(i,e),HM.crossVectors(VM,Fy);let d=this.direction.dot(HM),f;if(d>0){if(a)return null;f=1}else if(d<0)f=-1,d=-d;else return null;Bu.subVectors(this.origin,e);const m=f*this.direction.dot(Fy.crossVectors(Bu,Fy));if(m<0)return null;const g=f*this.direction.dot(VM.cross(Bu));if(g<0||m+g>d)return null;const v=-f*Bu.dot(HM);return v<0?null:this.at(v/d,c)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ku extends Hr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new jo,this.combine=wv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const lC=new Zt,bf=new Um,Oy=new Vr,cC=new J,Vy=new J,Hy=new J,Gy=new J,GM=new J,Wy=new J,uC=new J,jy=new J;class or extends Hn{constructor(e=new rn,t=new Ku){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}getVertexPosition(e,t){const i=this.geometry,a=i.attributes.position,c=i.morphAttributes.position,d=i.morphTargetsRelative;t.fromBufferAttribute(a,e);const f=this.morphTargetInfluences;if(c&&f){Wy.set(0,0,0);for(let m=0,g=c.length;m<g;m++){const v=f[m],M=c[m];v!==0&&(GM.fromBufferAttribute(M,e),d?Wy.addScaledVector(GM,v):Wy.addScaledVector(GM.sub(t),v))}t.add(Wy)}return t}raycast(e,t){const i=this.geometry,a=this.material,c=this.matrixWorld;a!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Oy.copy(i.boundingSphere),Oy.applyMatrix4(c),bf.copy(e.ray).recast(e.near),!(Oy.containsPoint(bf.origin)===!1&&(bf.intersectSphere(Oy,cC)===null||bf.origin.distanceToSquared(cC)>(e.far-e.near)**2))&&(lC.copy(c).invert(),bf.copy(e.ray).applyMatrix4(lC),!(i.boundingBox!==null&&bf.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,bf)))}_computeIntersections(e,t,i){let a;const c=this.geometry,d=this.material,f=c.index,m=c.attributes.position,g=c.attributes.uv,v=c.attributes.uv1,M=c.attributes.normal,x=c.groups,S=c.drawRange;if(f!==null)if(Array.isArray(d))for(let w=0,k=x.length;w<k;w++){const C=x[w],T=d[C.materialIndex],D=Math.max(C.start,S.start),z=Math.min(f.count,Math.min(C.start+C.count,S.start+S.count));for(let L=D,O=z;L<O;L+=3){const U=f.getX(L),H=f.getX(L+1),I=f.getX(L+2);a=Xy(this,T,e,i,g,v,M,U,H,I),a&&(a.faceIndex=Math.floor(L/3),a.face.materialIndex=C.materialIndex,t.push(a))}}else{const w=Math.max(0,S.start),k=Math.min(f.count,S.start+S.count);for(let C=w,T=k;C<T;C+=3){const D=f.getX(C),z=f.getX(C+1),L=f.getX(C+2);a=Xy(this,d,e,i,g,v,M,D,z,L),a&&(a.faceIndex=Math.floor(C/3),t.push(a))}}else if(m!==void 0)if(Array.isArray(d))for(let w=0,k=x.length;w<k;w++){const C=x[w],T=d[C.materialIndex],D=Math.max(C.start,S.start),z=Math.min(m.count,Math.min(C.start+C.count,S.start+S.count));for(let L=D,O=z;L<O;L+=3){const U=L,H=L+1,I=L+2;a=Xy(this,T,e,i,g,v,M,U,H,I),a&&(a.faceIndex=Math.floor(L/3),a.face.materialIndex=C.materialIndex,t.push(a))}}else{const w=Math.max(0,S.start),k=Math.min(m.count,S.start+S.count);for(let C=w,T=k;C<T;C+=3){const D=C,z=C+1,L=C+2;a=Xy(this,d,e,i,g,v,M,D,z,L),a&&(a.faceIndex=Math.floor(C/3),t.push(a))}}}}function CI(s,e,t,i,a,c,d,f){let m;if(e.side===Ts?m=i.intersectTriangle(d,c,a,!0,f):m=i.intersectTriangle(a,c,d,e.side===kc,f),m===null)return null;jy.copy(f),jy.applyMatrix4(s.matrixWorld);const g=t.ray.origin.distanceTo(jy);return g<t.near||g>t.far?null:{distance:g,point:jy.clone(),object:s}}function Xy(s,e,t,i,a,c,d,f,m,g){s.getVertexPosition(f,Vy),s.getVertexPosition(m,Hy),s.getVertexPosition(g,Gy);const v=CI(s,e,t,i,Vy,Hy,Gy,uC);if(v){const M=new J;Qs.getBarycoord(uC,Vy,Hy,Gy,M),a&&(v.uv=Qs.getInterpolatedAttribute(a,f,m,g,M,new Oe)),c&&(v.uv1=Qs.getInterpolatedAttribute(c,f,m,g,M,new Oe)),d&&(v.normal=Qs.getInterpolatedAttribute(d,f,m,g,M,new J),v.normal.dot(i.direction)>0&&v.normal.multiplyScalar(-1));const x={a:f,b:m,c:g,normal:new J,materialIndex:0};Qs.getNormal(Vy,Hy,Gy,x.normal),v.face=x,v.barycoord=M}return v}const FA=new ni,dC=new ni,fC=new ni,RI=new ni,hC=new Zt,qy=new J,WM=new Vr,pC=new Zt,jM=new Um;class X3 extends or{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Iw,this.bindMatrix=new Zt,this.bindMatrixInverse=new Zt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new os),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,qy),this.boundingBox.expandByPoint(qy)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Vr),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,qy),this.boundingSphere.expandByPoint(qy)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const i=this.material,a=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),WM.copy(this.boundingSphere),WM.applyMatrix4(a),e.ray.intersectsSphere(WM)!==!1&&(pC.copy(a).invert(),jM.copy(e.ray).applyMatrix4(pC),!(this.boundingBox!==null&&jM.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,jM)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ni,t=this.geometry.attributes.skinWeight;for(let i=0,a=t.count;i<a;i++){e.fromBufferAttribute(t,i);const c=1/e.manhattanLength();c!==1/0?e.multiplyScalar(c):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Iw?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===T3?this.bindMatrixInverse.copy(this.bindMatrix).invert():ot("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,a=this.geometry;dC.fromBufferAttribute(a.attributes.skinIndex,e),fC.fromBufferAttribute(a.attributes.skinWeight,e),t.isVector4?(FA.copy(t),t.set(0,0,0,0)):(FA.set(...t,1),t.set(0,0,0)),FA.applyMatrix4(this.bindMatrix);for(let c=0;c<4;c++){const d=fC.getComponent(c);if(d!==0){const f=dC.getComponent(c);hC.multiplyMatrices(i.bones[f].matrixWorld,i.boneInverses[f]),t.addScaledVector(RI.copy(FA).applyMatrix4(hC),d)}}return t.isVector4&&(t.w=FA.w),t.applyMatrix4(this.bindMatrixInverse)}}class E1 extends Hn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ao extends Di{constructor(e=null,t=1,i=1,a,c,d,f,m,g=Ji,v=Ji,M,x){super(null,d,f,m,g,v,a,c,M,x),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const mC=new Zt,PI=new Zt;class Gx{constructor(e=[],t=[]){this.uuid=Ca(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){ot("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,a=this.bones.length;i<a;i++)this.boneInverses.push(new Zt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new Zt;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,a=this.boneTexture;for(let c=0,d=e.length;c<d;c++){const f=e[c]?e[c].matrixWorld:PI;mC.multiplyMatrices(f,t[c]),mC.toArray(i,c*16)}a!==null&&(a.needsUpdate=!0)}clone(){return new Gx(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const i=new ao(t,e,e,as,ws);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const a=this.bones[t];if(a.name===e)return a}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,a=e.bones.length;i<a;i++){const c=e.bones[i];let d=t[c];d===void 0&&(ot("Skeleton: No bone found with UUID:",c),d=new E1),this.bones.push(d),this.boneInverses.push(new Zt().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let a=0,c=t.length;a<c;a++){const d=t[a];e.bones.push(d.uuid);const f=i[a];e.boneInverses.push(f.toArray())}return e}}class Dm extends si{constructor(e,t,i,a=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=a}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const dm=new Zt,gC=new Zt,Yy=[],AC=new os,kI=new Zt,OA=new or,VA=new Vr;class q3 extends or{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Dm(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let a=0;a<i;a++)this.setMatrixAt(a,kI)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new os),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,dm),AC.copy(e.boundingBox).applyMatrix4(dm),this.boundingBox.union(AC)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Vr),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,dm),VA.copy(e.boundingSphere).applyMatrix4(dm),this.boundingSphere.union(VA)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const i=t.morphTargetInfluences,a=this.morphTexture.source.data.data,c=i.length+1,d=e*c+1;for(let f=0;f<i.length;f++)i[f]=a[d+f]}raycast(e,t){const i=this.matrixWorld,a=this.count;if(OA.geometry=this.geometry,OA.material=this.material,OA.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),VA.copy(this.boundingSphere),VA.applyMatrix4(i),e.ray.intersectsSphere(VA)!==!1))for(let c=0;c<a;c++){this.getMatrixAt(c,dm),gC.multiplyMatrices(i,dm),OA.matrixWorld=gC,OA.raycast(e,Yy);for(let d=0,f=Yy.length;d<f;d++){const m=Yy[d];m.instanceId=c,m.object=this,t.push(m)}Yy.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new Dm(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){const i=t.morphTargetInfluences,a=i.length+1;this.morphTexture===null&&(this.morphTexture=new ao(new Float32Array(a*this.count),a,this.count,Dx,ws));const c=this.morphTexture.source.data.data;let d=0;for(let g=0;g<i.length;g++)d+=i[g];const f=this.geometry.morphTargetsRelative?1:1-d,m=a*e;return c[m]=f,c.set(i,m+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const XM=new J,DI=new J,LI=new _t;class Ou{constructor(e=new J(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const a=XM.subVectors(i,t).cross(DI.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,i=!0){const a=e.delta(XM),c=this.normal.dot(a);if(c===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const d=-(e.start.dot(this.normal)+this.constant)/c;return i===!0&&(d<0||d>1)?null:t.copy(e.start).addScaledVector(a,d)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||LI.getNormalMatrix(e),a=this.coplanarPoint(XM).applyMatrix4(e),c=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(c),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const xf=new Vr,II=new Oe(.5,.5),Jy=new J;class Wf{constructor(e=new Ou,t=new Ou,i=new Ou,a=new Ou,c=new Ou,d=new Ou){this.planes=[e,t,i,a,c,d]}set(e,t,i,a,c,d){const f=this.planes;return f[0].copy(e),f[1].copy(t),f[2].copy(i),f[3].copy(a),f[4].copy(c),f[5].copy(d),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Ea,i=!1){const a=this.planes,c=e.elements,d=c[0],f=c[1],m=c[2],g=c[3],v=c[4],M=c[5],x=c[6],S=c[7],w=c[8],k=c[9],C=c[10],T=c[11],D=c[12],z=c[13],L=c[14],O=c[15];if(a[0].setComponents(g-d,S-v,T-w,O-D).normalize(),a[1].setComponents(g+d,S+v,T+w,O+D).normalize(),a[2].setComponents(g+f,S+M,T+k,O+z).normalize(),a[3].setComponents(g-f,S-M,T-k,O-z).normalize(),i)a[4].setComponents(m,x,C,L).normalize(),a[5].setComponents(g-m,S-x,T-C,O-L).normalize();else if(a[4].setComponents(g-m,S-x,T-C,O-L).normalize(),t===Ea)a[5].setComponents(g+m,S+x,T+C,O+L).normalize();else if(t===Hf)a[5].setComponents(m,x,C,L).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),xf.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),xf.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(xf)}intersectsSprite(e){xf.center.set(0,0,0);const t=II.distanceTo(e.center);return xf.radius=.7071067811865476+t,xf.applyMatrix4(e.matrixWorld),this.intersectsSphere(xf)}intersectsSphere(e){const t=this.planes,i=e.center,a=-e.radius;for(let c=0;c<6;c++)if(t[c].distanceToPoint(i)<a)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const a=t[i];if(Jy.x=a.normal.x>0?e.max.x:e.min.x,Jy.y=a.normal.y>0?e.max.y:e.min.y,Jy.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(Jy)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const vC=new Zt;class Wx{constructor(){this.coordinateSystem=Ea,this._frustums=[],this._count=0}setFromArrayCamera(e){const t=e.cameras,i=this._frustums;for(let a=0;a<t.length;a++){const c=t[a];vC.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),i[a]===void 0&&(i[a]=new Wf),i[a].setFromProjectionMatrix(vC,c.coordinateSystem,c.reversedDepth)}return this._count=t.length,this}intersectsObject(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsObject(e))return!0;return!1}intersectsSprite(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsSprite(e))return!0;return!1}intersectsSphere(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsSphere(e))return!0;return!1}intersectsBox(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].intersectsBox(e))return!0;return!1}containsPoint(e){const t=this._frustums;for(let i=0;i<this._count;i++)if(t[i].containsPoint(e))return!0;return!1}copy(e){this.coordinateSystem=e.coordinateSystem;const t=this._frustums,i=e._frustums;for(let a=0;a<e._count;a++)t[a]===void 0&&(t[a]=new Wf),t[a].copy(i[a]);return this._count=e._count,this}clone(){return new Wx().copy(this)}}function qM(s,e){return s-e}function NI(s,e){return s.z-e.z}function zI(s,e){return e.z-s.z}class BI{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,a){const c=this.pool,d=this.list;this.index>=c.length&&c.push({start:-1,count:-1,z:-1,index:-1});const f=c[this.index];d.push(f),this.index++,f.start=e,f.count=t,f.z=i,f.index=a}reset(){this.list.length=0,this.index=0}}const qs=new Zt,UI=new ut(1,1,1),FI=new Wf,OI=new Wx,Qy=new os,Sf=new Vr,HA=new J,yC=new J,VI=new J,YM=new BI,rs=new or,Zy=[];function HI(s,e,t=0){const i=e.itemSize;if(s.isInterleavedBufferAttribute||s.array.constructor!==e.array.constructor){const a=s.count;for(let c=0;c<a;c++)for(let d=0;d<i;d++)e.setComponent(c+t,d,s.getComponent(c,d))}else e.array.set(s.array,t*i);e.needsUpdate=!0}function Mf(s,e){if(s.constructor!==e.constructor){const t=Math.min(s.length,e.length);for(let i=0;i<t;i++)e[i]=s[i]}else{const t=Math.min(s.length,e.length);e.set(new s.constructor(s.buffer,0,t))}}class Y3 extends or{constructor(e,t,i=t*2,a){super(new rn,a),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),i=new ao(t,e,e,as,ws);this._matricesTexture=i}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),i=new ao(t,e,e,Tv,oo);this._indirectTexture=i}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),i=new ao(t,e,e,as,ws);i.colorSpace=wn.workingColorSpace,this._colorsTexture=i}_initializeGeometry(e){const t=this.geometry,i=this._maxVertexCount,a=this._maxIndexCount;if(this._geometryInitialized===!1){for(const c in e.attributes){const d=e.getAttribute(c),{array:f,itemSize:m,normalized:g}=d,v=new f.constructor(i*m),M=new si(v,m,g);t.setAttribute(c,M)}if(e.getIndex()!==null){const c=i>65535?new Uint32Array(a):new Uint16Array(a);t.setIndex(new si(c,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const a=e.getAttribute(i),c=t.getAttribute(i);if(a.itemSize!==c.itemSize||a.normalized!==c.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new os);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,a=t.length;i<a;i++){if(t[i].active===!1)continue;const c=t[i].geometryIndex;this.getMatrixAt(i,qs),this.getBoundingBoxAt(c,Qy).applyMatrix4(qs),e.union(Qy)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vr);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let i=0,a=t.length;i<a;i++){if(t[i].active===!1)continue;const c=t[i].geometryIndex;this.getMatrixAt(i,qs),this.getBoundingSphereAt(c,Sf).applyMatrix4(qs),e.union(Sf)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let a=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(qM),a=this._availableInstanceIds.shift(),this._instanceInfo[a]=i):(a=this._instanceInfo.length,this._instanceInfo.push(i));const c=this._matricesTexture;qs.identity().toArray(c.image.data,a*16),c.needsUpdate=!0;const d=this._colorsTexture;return d&&(UI.toArray(d.image.data,a*4),d.needsUpdate=!0),this._visibilityChanged=!0,a}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const a={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},c=this._geometryInfo;a.vertexStart=this._nextVertexStart,a.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const d=e.getIndex();if(d!==null&&(a.indexStart=this._nextIndexStart,a.reservedIndexCount=i===-1?d.count:i),a.indexStart!==-1&&a.indexStart+a.reservedIndexCount>this._maxIndexCount||a.vertexStart+a.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let m;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(qM),m=this._availableGeometryIds.shift(),c[m]=a):(m=this._geometryCount,this._geometryCount++,c.push(a)),this.setGeometryAt(m,e),this._nextIndexStart=a.indexStart+a.reservedIndexCount,this._nextVertexStart=a.vertexStart+a.reservedVertexCount,m}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,a=i.getIndex()!==null,c=i.getIndex(),d=t.getIndex(),f=this._geometryInfo[e];if(a&&d.count>f.reservedIndexCount||t.attributes.position.count>f.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const m=f.vertexStart,g=f.reservedVertexCount;f.vertexCount=t.getAttribute("position").count;for(const v in i.attributes){const M=t.getAttribute(v),x=i.getAttribute(v);HI(M,x,m);const S=M.itemSize;for(let w=M.count,k=g;w<k;w++){const C=m+w;for(let T=0;T<S;T++)x.setComponent(C,T,0)}x.needsUpdate=!0,x.addUpdateRange(m*S,g*S)}if(a){const v=f.indexStart,M=f.reservedIndexCount;f.indexCount=t.getIndex().count;for(let x=0;x<d.count;x++)c.setX(v+x,m+d.getX(x));for(let x=d.count,S=M;x<S;x++)c.setX(v+x,m);c.needsUpdate=!0,c.addUpdateRange(v,f.reservedIndexCount)}return f.start=a?f.indexStart:f.vertexStart,f.count=a?f.indexCount:f.vertexCount,f.boundingBox=null,t.boundingBox!==null&&(f.boundingBox=t.boundingBox.clone()),f.boundingSphere=null,t.boundingSphere!==null&&(f.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let a=0,c=i.length;a<c;a++)i[a].active&&i[a].geometryIndex===e&&this.deleteInstance(a);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const i=this._geometryInfo,a=i.map((d,f)=>f).sort((d,f)=>i[d].vertexStart-i[f].vertexStart),c=this.geometry;for(let d=0,f=i.length;d<f;d++){const m=a[d],g=i[m];if(g.active!==!1){if(c.index!==null){if(g.indexStart!==t){const{indexStart:v,vertexStart:M,reservedIndexCount:x}=g,S=c.index,w=S.array,k=e-M;for(let C=v;C<v+x;C++)w[C]=w[C]+k;S.array.copyWithin(t,v,v+x),S.addUpdateRange(t,x),S.needsUpdate=!0,g.indexStart=t}t+=g.reservedIndexCount}if(g.vertexStart!==e){const{vertexStart:v,reservedVertexCount:M}=g,x=c.attributes;for(const S in x){const w=x[S],{array:k,itemSize:C}=w;k.copyWithin(e*C,v*C,(v+M)*C),w.addUpdateRange(e*C,M*C),w.needsUpdate=!0}g.vertexStart=e}e+=g.reservedVertexCount,g.start=c.index?g.indexStart:g.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,a=this._geometryInfo[e];if(a.boundingBox===null){const c=new os,d=i.index,f=i.attributes.position;for(let m=a.start,g=a.start+a.count;m<g;m++){let v=m;d&&(v=d.getX(v)),c.expandByPoint(HA.fromBufferAttribute(f,v))}a.boundingBox=c}return t.copy(a.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,a=this._geometryInfo[e];if(a.boundingSphere===null){const c=new Vr;this.getBoundingBoxAt(e,Qy),Qy.getCenter(c.center);const d=i.index,f=i.attributes.position;let m=0;for(let g=a.start,v=a.start+a.count;g<v;g++){let M=g;d&&(M=d.getX(M)),HA.fromBufferAttribute(f,M),m=Math.max(m,c.center.distanceToSquared(HA))}c.radius=Math.sqrt(m),a.boundingSphere=c}return t.copy(a.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const i=this._matricesTexture,a=this._matricesTexture.image.data;return t.toArray(a,e*16),i.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const i=this._geometryInfo[e];return t.vertexStart=i.vertexStart,t.vertexCount=i.vertexCount,t.reservedVertexCount=i.reservedVertexCount,t.indexStart=i.indexStart,t.indexCount=i.indexCount,t.reservedIndexCount=i.reservedIndexCount,t.start=i.start,t.count=i.count,t}setInstanceCount(e){const t=this._availableInstanceIds,i=this._instanceInfo;for(t.sort(qM);t[t.length-1]===i.length-1;)i.pop(),t.pop();if(e<i.length)throw new Error(`THREE.BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const a=new Int32Array(e),c=new Int32Array(e);Mf(this._multiDrawCounts,a),Mf(this._multiDrawStarts,c),this._multiDrawCounts=a,this._multiDrawStarts=c,this._maxInstanceCount=e;const d=this._indirectTexture,f=this._matricesTexture,m=this._colorsTexture;d.dispose(),this._initIndirectTexture(),Mf(d.image.data,this._indirectTexture.image.data),f.dispose(),this._initMatricesTexture(),Mf(f.image.data,this._matricesTexture.image.data),m&&(m.dispose(),this._initColorsTexture(),Mf(m.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const i=[...this._geometryInfo].filter(f=>f.active);if(Math.max(...i.map(f=>f.vertexStart+f.reservedVertexCount))>e)throw new Error(`THREE.BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(m=>m.indexStart+m.reservedIndexCount))>t)throw new Error(`THREE.BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const c=this.geometry;c.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rn,this._initializeGeometry(c));const d=this.geometry;c.index&&Mf(c.index.array,d.index.array);for(const f in c.attributes)Mf(c.attributes[f].array,d.attributes[f].array)}raycast(e,t){const i=this._instanceInfo,a=this._geometryInfo,c=this.matrixWorld,d=this.geometry;rs.material=this.material,rs.geometry.index=d.index,rs.geometry.attributes=d.attributes,rs.geometry.boundingBox===null&&(rs.geometry.boundingBox=new os),rs.geometry.boundingSphere===null&&(rs.geometry.boundingSphere=new Vr);for(let f=0,m=i.length;f<m;f++){if(!i[f].visible||!i[f].active)continue;const g=i[f].geometryIndex,v=a[g];rs.geometry.setDrawRange(v.start,v.count),this.getMatrixAt(f,rs.matrixWorld).premultiply(c),this.getBoundingBoxAt(g,rs.geometry.boundingBox),this.getBoundingSphereAt(g,rs.geometry.boundingSphere),rs.raycast(e,Zy);for(let M=0,x=Zy.length;M<x;M++){const S=Zy[M];S.object=this,S.batchId=f,t.push(S)}Zy.length=0}rs.material=null,rs.geometry.index=null,rs.geometry.attributes={},rs.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,a,c){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const d=a.getIndex();let f=d===null?1:d.array.BYTES_PER_ELEMENT,m=1;c.wireframe&&(m=2,f=a.attributes.position.count>65535?4:2);const g=this._instanceInfo,v=this._multiDrawStarts,M=this._multiDrawCounts,x=this._geometryInfo,S=this.perObjectFrustumCulled,w=this._indirectTexture,k=w.image.data,C=i.isArrayCamera?OI:FI;S&&(i.isArrayCamera?C.setFromArrayCamera(i):(qs.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),C.setFromProjectionMatrix(qs,i.coordinateSystem,i.reversedDepth)));let T=0;if(this.sortObjects){qs.copy(this.matrixWorld).invert(),HA.setFromMatrixPosition(i.matrixWorld).applyMatrix4(qs),yC.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(qs);for(let L=0,O=g.length;L<O;L++)if(g[L].visible&&g[L].active){const U=g[L].geometryIndex;this.getMatrixAt(L,qs),this.getBoundingSphereAt(U,Sf).applyMatrix4(qs);let H=!1;if(S&&(H=!C.intersectsSphere(Sf)),!H){const I=x[U],F=VI.subVectors(Sf.center,HA).dot(yC);YM.push(I.start,I.count,F,L)}}const D=YM.list,z=this.customSort;z===null?D.sort(c.transparent?zI:NI):z.call(this,D,i);for(let L=0,O=D.length;L<O;L++){const U=D[L];v[T]=U.start*f*m,M[T]=U.count*m,k[T]=U.index,T++}YM.reset()}else for(let D=0,z=g.length;D<z;D++)if(g[D].visible&&g[D].active){const L=g[D].geometryIndex;let O=!1;if(S&&(this.getMatrixAt(D,qs),this.getBoundingSphereAt(L,Sf).applyMatrix4(qs),O=!C.intersectsSphere(Sf)),!O){const U=x[L];v[T]=U.start*f*m,M[T]=U.count*m,k[T]=D,T++}}w.needsUpdate=!0,this._multiDrawCount=T,this._visibilityChanged=!1}onBeforeShadow(e,t,i,a,c,d){this.onBeforeRender(e,null,a,c,d)}}class Cs extends Hr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ut(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const px=new J,mx=new J,bC=new Zt,GA=new Um,Ky=new Vr,JM=new J,xC=new J;class Qu extends Hn{constructor(e=new rn,t=new Cs){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[0];for(let a=1,c=t.count;a<c;a++)px.fromBufferAttribute(t,a-1),mx.fromBufferAttribute(t,a),i[a]=i[a-1],i[a]+=px.distanceTo(mx);e.setAttribute("lineDistance",new wt(i,1))}else ot("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,a=this.matrixWorld,c=e.params.Line.threshold,d=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Ky.copy(i.boundingSphere),Ky.applyMatrix4(a),Ky.radius+=c,e.ray.intersectsSphere(Ky)===!1)return;bC.copy(a).invert(),GA.copy(e.ray).applyMatrix4(bC);const f=c/((this.scale.x+this.scale.y+this.scale.z)/3),m=f*f,g=this.isLineSegments?2:1,v=i.index,x=i.attributes.position;if(v!==null){const S=Math.max(0,d.start),w=Math.min(v.count,d.start+d.count);for(let k=S,C=w-1;k<C;k+=g){const T=v.getX(k),D=v.getX(k+1),z=_y(this,e,GA,m,T,D,k);z&&t.push(z)}if(this.isLineLoop){const k=v.getX(w-1),C=v.getX(S),T=_y(this,e,GA,m,k,C,w-1);T&&t.push(T)}}else{const S=Math.max(0,d.start),w=Math.min(x.count,d.start+d.count);for(let k=S,C=w-1;k<C;k+=g){const T=_y(this,e,GA,m,k,k+1,k);T&&t.push(T)}if(this.isLineLoop){const k=_y(this,e,GA,m,w-1,S,w-1);k&&t.push(k)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}}function _y(s,e,t,i,a,c,d){const f=s.geometry.attributes.position;if(px.fromBufferAttribute(f,a),mx.fromBufferAttribute(f,c),t.distanceSqToSegment(px,mx,JM,xC)>i)return;JM.applyMatrix4(s.matrixWorld);const g=e.ray.origin.distanceTo(JM);if(!(g<e.near||g>e.far))return{distance:g,point:xC.clone().applyMatrix4(s.matrixWorld),index:d,face:null,faceIndex:null,barycoord:null,object:s}}const SC=new J,MC=new J;class Nl extends Qu{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let a=0,c=t.count;a<c;a+=2)SC.fromBufferAttribute(t,a),MC.fromBufferAttribute(t,a+1),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+SC.distanceTo(MC);e.setAttribute("lineDistance",new wt(i,1))}else ot("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class J3 extends Qu{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class C1 extends Hr{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new ut(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const wC=new Zt,Uw=new Um,$y=new Vr,eb=new J;class Q3 extends Hn{constructor(e=new rn,t=new C1){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const i=this.geometry,a=this.matrixWorld,c=e.params.Points.threshold,d=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),$y.copy(i.boundingSphere),$y.applyMatrix4(a),$y.radius+=c,e.ray.intersectsSphere($y)===!1)return;wC.copy(a).invert(),Uw.copy(e.ray).applyMatrix4(wC);const f=c/((this.scale.x+this.scale.y+this.scale.z)/3),m=f*f,g=i.index,M=i.attributes.position;if(g!==null){const x=Math.max(0,d.start),S=Math.min(g.count,d.start+d.count);for(let w=x,k=S;w<k;w++){const C=g.getX(w);eb.fromBufferAttribute(M,C),TC(eb,C,m,a,e,t,this)}}else{const x=Math.max(0,d.start),S=Math.min(M.count,d.start+d.count);for(let w=x,k=S;w<k;w++)eb.fromBufferAttribute(M,w),TC(eb,w,m,a,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let c=0,d=a.length;c<d;c++){const f=a[c].name||String(c);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=c}}}}}function TC(s,e,t,i,a,c,d){const f=Uw.distanceSqToPoint(s);if(f<t){const m=new J;Uw.closestPointToPoint(s,m),m.applyMatrix4(i);const g=a.ray.origin.distanceTo(m);if(g<a.near||g>a.far)return;c.push({distance:g,distanceToRay:Math.sqrt(f),point:m,index:e,face:null,faceIndex:null,barycoord:null,object:d})}}class Z3 extends Di{constructor(e,t,i,a,c=mi,d=mi,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const v=this;function M(){v.needsUpdate=!0,v._requestVideoFrameCallbackId=e.requestVideoFrameCallback(M)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(M))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class GI extends Z3{constructor(e,t,i,a,c,d,f,m){super({},e,t,i,a,c,d,f,m),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class WI extends Di{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Ji,this.minFilter=Ji,this.generateMipmaps=!1,this.needsUpdate=!0}}class jx extends Di{constructor(e,t,i,a,c,d,f,m,g,v,M,x){super(null,d,f,m,g,v,a,c,M,x),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class jI extends jx{constructor(e,t,i,a,c,d){super(e,t,i,c,d),this.isCompressedArrayTexture=!0,this.image.depth=a,this.wrapR=Zs,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class XI extends jx{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Dl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Ev extends Di{constructor(e=[],t=Dl,i,a,c,d,f,m,g,v){super(e,t,i,a,c,d,f,m,g,v),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class qI extends Di{constructor(e,t,i,a,c,d,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class YI extends Di{constructor(e,t,i,a,c,d,f,m,g){super(e,t,i,a,c,d,f,m,g),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const v=e?e.parentNode:null;v!==null&&"requestPaint"in v&&(v.onpaint=()=>{this.needsUpdate=!0},v.requestPaint())}dispose(){const e=this.image?this.image.parentNode:null;e!==null&&"onpaint"in e&&(e.onpaint=null),super.dispose()}}class jf extends Di{constructor(e,t,i=oo,a,c,d,f=Ji,m=Ji,g,v=Il,M=1){if(v!==Il&&v!==Gu)throw new Error("THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const x={width:e,height:t,depth:M};super(x,a,c,d,f,m,v,i,g),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Wu(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class K3 extends jf{constructor(e,t=oo,i=Dl,a,c,d=Ji,f=Ji,m,g=Il){const v={width:e,height:e,depth:1},M=[v,v,v,v,v,v];super(e,e,t,i,a,c,d,f,m,g),this.image=M,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class R1 extends Di{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Yf extends rn{constructor(e=1,t=1,i=1,a=1,c=1,d=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:a,heightSegments:c,depthSegments:d};const f=this;a=Math.floor(a),c=Math.floor(c),d=Math.floor(d);const m=[],g=[],v=[],M=[];let x=0,S=0;w("z","y","x",-1,-1,i,t,e,d,c,0),w("z","y","x",1,-1,i,t,-e,d,c,1),w("x","z","y",1,1,e,i,t,a,d,2),w("x","z","y",1,-1,e,i,-t,a,d,3),w("x","y","z",1,-1,e,t,i,a,c,4),w("x","y","z",-1,-1,e,t,-i,a,c,5),this.setIndex(m),this.setAttribute("position",new wt(g,3)),this.setAttribute("normal",new wt(v,3)),this.setAttribute("uv",new wt(M,2));function w(k,C,T,D,z,L,O,U,H,I,F){const V=L/H,X=O/I,_=L/2,K=O/2,le=U/2,$=H+1,j=I+1;let Q=0,ne=0;const ce=new J;for(let ye=0;ye<j;ye++){const Te=ye*X-K;for(let Fe=0;Fe<$;Fe++){const ft=Fe*V-_;ce[k]=ft*D,ce[C]=Te*z,ce[T]=le,g.push(ce.x,ce.y,ce.z),ce[k]=0,ce[C]=0,ce[T]=U>0?1:-1,v.push(ce.x,ce.y,ce.z),M.push(Fe/H),M.push(1-ye/I),Q+=1}}for(let ye=0;ye<I;ye++)for(let Te=0;Te<H;Te++){const Fe=x+Te+$*ye,ft=x+Te+$*(ye+1),lt=x+(Te+1)+$*(ye+1),ct=x+(Te+1)+$*ye;m.push(Fe,ft,ct),m.push(ft,lt,ct),ne+=6}f.addGroup(S,ne,F),S+=ne,x+=Q}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yf(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class Xx extends rn{constructor(e=1,t=1,i=4,a=8,c=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:a,heightSegments:c},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),a=Math.max(3,Math.floor(a)),c=Math.max(1,Math.floor(c));const d=[],f=[],m=[],g=[],v=t/2,M=Math.PI/2*e,x=t,S=2*M+x,w=i*2+c,k=a+1,C=new J,T=new J;for(let D=0;D<=w;D++){let z=0,L=0,O=0,U=0;if(D<=i){const F=D/i,V=F*Math.PI/2;L=-v-e*Math.cos(V),O=e*Math.sin(V),U=-e*Math.cos(V),z=F*M}else if(D<=i+c){const F=(D-i)/c;L=-v+F*t,O=e,U=0,z=M+F*x}else{const F=(D-i-c)/i,V=F*Math.PI/2;L=v+e*Math.sin(V),O=e*Math.cos(V),U=e*Math.sin(V),z=M+x+F*M}const H=Math.max(0,Math.min(1,z/S));let I=0;D===0?I=.5/a:D===w&&(I=-.5/a);for(let F=0;F<=a;F++){const V=F/a,X=V*Math.PI*2,_=Math.sin(X),K=Math.cos(X);T.x=-O*K,T.y=L,T.z=O*_,f.push(T.x,T.y,T.z),C.set(-O*K,U,O*_),C.normalize(),m.push(C.x,C.y,C.z),g.push(V+I,H)}if(D>0){const F=(D-1)*k;for(let V=0;V<a;V++){const X=F+V,_=F+V+1,K=D*k+V,le=D*k+V+1;d.push(X,_,K),d.push(_,le,K)}}}this.setIndex(d),this.setAttribute("position",new wt(f,3)),this.setAttribute("normal",new wt(m,3)),this.setAttribute("uv",new wt(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Xx(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class qx extends rn{constructor(e=1,t=32,i=0,a=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:a},t=Math.max(3,t);const c=[],d=[],f=[],m=[],g=new J,v=new Oe;d.push(0,0,0),f.push(0,0,1),m.push(.5,.5);for(let M=0,x=3;M<=t;M++,x+=3){const S=i+M/t*a;g.x=e*Math.cos(S),g.y=e*Math.sin(S),d.push(g.x,g.y,g.z),f.push(0,0,1),v.x=(d[x]/e+1)/2,v.y=(d[x+1]/e+1)/2,m.push(v.x,v.y)}for(let M=1;M<=t;M++)c.push(M,M+1,0);this.setIndex(c),this.setAttribute("position",new wt(d,3)),this.setAttribute("normal",new wt(f,3)),this.setAttribute("uv",new wt(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qx(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Cv extends rn{constructor(e=1,t=1,i=1,a=32,c=1,d=!1,f=0,m=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:a,heightSegments:c,openEnded:d,thetaStart:f,thetaLength:m};const g=this;a=Math.floor(a),c=Math.floor(c);const v=[],M=[],x=[],S=[];let w=0;const k=[],C=i/2;let T=0;D(),d===!1&&(e>0&&z(!0),t>0&&z(!1)),this.setIndex(v),this.setAttribute("position",new wt(M,3)),this.setAttribute("normal",new wt(x,3)),this.setAttribute("uv",new wt(S,2));function D(){const L=new J,O=new J;let U=0;const H=(t-e)/i;for(let I=0;I<=c;I++){const F=[],V=I/c,X=V*(t-e)+e;for(let _=0;_<=a;_++){const K=_/a,le=K*m+f,$=Math.sin(le),j=Math.cos(le);O.x=X*$,O.y=-V*i+C,O.z=X*j,M.push(O.x,O.y,O.z),L.set($,H,j).normalize(),x.push(L.x,L.y,L.z),S.push(K,1-V),F.push(w++)}k.push(F)}for(let I=0;I<a;I++)for(let F=0;F<c;F++){const V=k[F][I],X=k[F+1][I],_=k[F+1][I+1],K=k[F][I+1];(e>0||F!==0)&&(v.push(V,X,K),U+=3),(t>0||F!==c-1)&&(v.push(X,_,K),U+=3)}g.addGroup(T,U,0),T+=U}function z(L){const O=w,U=new Oe,H=new J;let I=0;const F=L===!0?e:t,V=L===!0?1:-1;for(let _=1;_<=a;_++)M.push(0,C*V,0),x.push(0,V,0),S.push(.5,.5),w++;const X=w;for(let _=0;_<=a;_++){const le=_/a*m+f,$=Math.cos(le),j=Math.sin(le);H.x=F*j,H.y=C*V,H.z=F*$,M.push(H.x,H.y,H.z),x.push(0,V,0),U.x=$*.5+.5,U.y=j*.5*V+.5,S.push(U.x,U.y),w++}for(let _=0;_<a;_++){const K=O+_,le=X+_;L===!0?v.push(le,le+1,K):v.push(le+1,le,K),I+=3}g.addGroup(T,I,L===!0?1:2),T+=I}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cv(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Rv extends Cv{constructor(e=1,t=1,i=32,a=1,c=!1,d=0,f=Math.PI*2){super(0,e,t,i,a,c,d,f),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:a,openEnded:c,thetaStart:d,thetaLength:f}}static fromJSON(e){return new Rv(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class _u extends rn{constructor(e=[],t=[],i=1,a=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:a};const c=[],d=[];f(a),g(i),v(),this.setAttribute("position",new wt(c,3)),this.setAttribute("normal",new wt(c.slice(),3)),this.setAttribute("uv",new wt(d,2)),a===0?this.computeVertexNormals():this.normalizeNormals();function f(D){const z=new J,L=new J,O=new J;for(let U=0;U<t.length;U+=3)S(t[U+0],z),S(t[U+1],L),S(t[U+2],O),m(z,L,O,D)}function m(D,z,L,O){const U=O+1,H=[];for(let I=0;I<=U;I++){H[I]=[];const F=D.clone().lerp(L,I/U),V=z.clone().lerp(L,I/U),X=U-I;for(let _=0;_<=X;_++)_===0&&I===U?H[I][_]=F:H[I][_]=F.clone().lerp(V,_/X)}for(let I=0;I<U;I++)for(let F=0;F<2*(U-I)-1;F++){const V=Math.floor(F/2);F%2===0?(x(H[I][V+1]),x(H[I+1][V]),x(H[I][V])):(x(H[I][V+1]),x(H[I+1][V+1]),x(H[I+1][V]))}}function g(D){const z=new J;for(let L=0;L<c.length;L+=3)z.x=c[L+0],z.y=c[L+1],z.z=c[L+2],z.normalize().multiplyScalar(D),c[L+0]=z.x,c[L+1]=z.y,c[L+2]=z.z}function v(){const D=new J;for(let z=0;z<c.length;z+=3){D.x=c[z+0],D.y=c[z+1],D.z=c[z+2];const L=C(D)/2/Math.PI+.5,O=T(D)/Math.PI+.5;d.push(L,1-O)}w(),M()}function M(){for(let D=0;D<d.length;D+=6){const z=d[D+0],L=d[D+2],O=d[D+4],U=Math.max(z,L,O),H=Math.min(z,L,O);U>.9&&H<.1&&(z<.2&&(d[D+0]+=1),L<.2&&(d[D+2]+=1),O<.2&&(d[D+4]+=1))}}function x(D){c.push(D.x,D.y,D.z)}function S(D,z){const L=D*3;z.x=e[L+0],z.y=e[L+1],z.z=e[L+2]}function w(){const D=new J,z=new J,L=new J,O=new J,U=new Oe,H=new Oe,I=new Oe;for(let F=0,V=0;F<c.length;F+=9,V+=6){D.set(c[F+0],c[F+1],c[F+2]),z.set(c[F+3],c[F+4],c[F+5]),L.set(c[F+6],c[F+7],c[F+8]),U.set(d[V+0],d[V+1]),H.set(d[V+2],d[V+3]),I.set(d[V+4],d[V+5]),O.copy(D).add(z).add(L).divideScalar(3);const X=C(O);k(U,V+0,D,X),k(H,V+2,z,X),k(I,V+4,L,X)}}function k(D,z,L,O){O<0&&D.x===1&&(d[z]=D.x-1),L.x===0&&L.z===0&&(d[z]=O/2/Math.PI+.5)}function C(D){return Math.atan2(D.z,-D.x)}function T(D){return Math.atan2(-D.y,Math.sqrt(D.x*D.x+D.z*D.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _u(e.vertices,e.indices,e.radius,e.detail)}}class Yx extends _u{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,a=1/i,c=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-a,-i,0,-a,i,0,a,-i,0,a,i,-a,-i,0,-a,i,0,a,-i,0,a,i,0,-i,0,-a,i,0,-a,-i,0,a,i,0,a],d=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(c,d,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Yx(e.radius,e.detail)}}const tb=new J,nb=new J,QM=new J,ib=new Qs;class _3 extends rn{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const a=Math.pow(10,4),c=Math.cos(Ff*t),d=e.getIndex(),f=e.getAttribute("position"),m=d?d.count:f.count,g=[0,0,0],v=["a","b","c"],M=new Array(3),x={},S=[];for(let w=0;w<m;w+=3){d?(g[0]=d.getX(w),g[1]=d.getX(w+1),g[2]=d.getX(w+2)):(g[0]=w,g[1]=w+1,g[2]=w+2);const{a:k,b:C,c:T}=ib;if(k.fromBufferAttribute(f,g[0]),C.fromBufferAttribute(f,g[1]),T.fromBufferAttribute(f,g[2]),ib.getNormal(QM),M[0]=`${Math.round(k.x*a)},${Math.round(k.y*a)},${Math.round(k.z*a)}`,M[1]=`${Math.round(C.x*a)},${Math.round(C.y*a)},${Math.round(C.z*a)}`,M[2]=`${Math.round(T.x*a)},${Math.round(T.y*a)},${Math.round(T.z*a)}`,!(M[0]===M[1]||M[1]===M[2]||M[2]===M[0]))for(let D=0;D<3;D++){const z=(D+1)%3,L=M[D],O=M[z],U=ib[v[D]],H=ib[v[z]],I=`${L}_${O}`,F=`${O}_${L}`;F in x&&x[F]?(QM.dot(x[F].normal)<=c&&(S.push(U.x,U.y,U.z),S.push(H.x,H.y,H.z)),x[F]=null):I in x||(x[I]={index0:g[D],index1:g[z],normal:QM.clone()})}}for(const w in x)if(x[w]){const{index0:k,index1:C}=x[w];tb.fromBufferAttribute(f,k),nb.fromBufferAttribute(f,C),S.push(tb.x,tb.y,tb.z),S.push(nb.x,nb.y,nb.z)}this.setAttribute("position",new wt(S,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class qo{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){ot("Curve: .getPoint() not implemented.")}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,a=this.getPoint(0),c=0;t.push(0);for(let d=1;d<=e;d++)i=this.getPoint(d/e),c+=i.distanceTo(a),t.push(c),a=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const i=this.getLengths();let a=0;const c=i.length;let d;t?d=t:d=e*i[c-1];let f=0,m=c-1,g;for(;f<=m;)if(a=Math.floor(f+(m-f)/2),g=i[a]-d,g<0)f=a+1;else if(g>0)m=a-1;else{m=a;break}if(a=m,i[a]===d)return a/(c-1);const v=i[a],x=i[a+1]-v,S=(d-v)/x;return(a+S)/(c-1)}getTangent(e,t){let a=e-1e-4,c=e+1e-4;a<0&&(a=0),c>1&&(c=1);const d=this.getPoint(a),f=this.getPoint(c),m=t||(d.isVector2?new Oe:new J);return m.copy(f).sub(d).normalize(),m}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new J,a=[],c=[],d=[],f=new J,m=new Zt;for(let S=0;S<=e;S++){const w=S/e;a[S]=this.getTangentAt(w,new J)}c[0]=new J,d[0]=new J;let g=Number.MAX_VALUE;const v=Math.abs(a[0].x),M=Math.abs(a[0].y),x=Math.abs(a[0].z);v<=g&&(g=v,i.set(1,0,0)),M<=g&&(g=M,i.set(0,1,0)),x<=g&&i.set(0,0,1),f.crossVectors(a[0],i).normalize(),c[0].crossVectors(a[0],f),d[0].crossVectors(a[0],c[0]);for(let S=1;S<=e;S++){if(c[S]=c[S-1].clone(),d[S]=d[S-1].clone(),f.crossVectors(a[S-1],a[S]),f.length()>Number.EPSILON){f.normalize();const w=Math.acos(Yt(a[S-1].dot(a[S]),-1,1));c[S].applyMatrix4(m.makeRotationAxis(f,w))}d[S].crossVectors(a[S],c[S])}if(t===!0){let S=Math.acos(Yt(c[0].dot(c[e]),-1,1));S/=e,a[0].dot(f.crossVectors(c[0],c[e]))>0&&(S=-S);for(let w=1;w<=e;w++)c[w].applyMatrix4(m.makeRotationAxis(a[w],S*w)),d[w].crossVectors(a[w],c[w])}return{tangents:a,normals:c,binormals:d}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Jx extends qo{constructor(e=0,t=0,i=1,a=1,c=0,d=Math.PI*2,f=!1,m=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=a,this.aStartAngle=c,this.aEndAngle=d,this.aClockwise=f,this.aRotation=m}getPoint(e,t=new Oe){const i=t,a=Math.PI*2;let c=this.aEndAngle-this.aStartAngle;const d=Math.abs(c)<Number.EPSILON;for(;c<0;)c+=a;for(;c>a;)c-=a;c<Number.EPSILON&&(d?c=0:c=a),this.aClockwise===!0&&!d&&(c===a?c=-a:c=c-a);const f=this.aStartAngle+e*c;let m=this.aX+this.xRadius*Math.cos(f),g=this.aY+this.yRadius*Math.sin(f);if(this.aRotation!==0){const v=Math.cos(this.aRotation),M=Math.sin(this.aRotation),x=m-this.aX,S=g-this.aY;m=x*v-S*M+this.aX,g=x*M+S*v+this.aY}return i.set(m,g)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class $3 extends Jx{constructor(e,t,i,a,c,d){super(e,t,i,i,a,c,d),this.isArcCurve=!0,this.type="ArcCurve"}}function P1(){let s=0,e=0,t=0,i=0;function a(c,d,f,m){s=c,e=f,t=-3*c+3*d-2*f-m,i=2*c-2*d+f+m}return{initCatmullRom:function(c,d,f,m,g){a(d,f,g*(f-c),g*(m-d))},initNonuniformCatmullRom:function(c,d,f,m,g,v,M){let x=(d-c)/g-(f-c)/(g+v)+(f-d)/v,S=(f-d)/v-(m-d)/(v+M)+(m-f)/M;x*=v,S*=v,a(d,f,x,S)},calc:function(c){const d=c*c,f=d*c;return s+e*c+t*d+i*f}}}const EC=new J,CC=new J,ZM=new P1,KM=new P1,_M=new P1;class eR extends qo{constructor(e=[],t=!1,i="centripetal",a=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=a}getPoint(e,t=new J){const i=t,a=this.points,c=a.length,d=(c-(this.closed?0:1))*e;let f=Math.floor(d),m=d-f;this.closed?f+=f>0?0:(Math.floor(Math.abs(f)/c)+1)*c:m===0&&f===c-1&&(f=c-2,m=1);let g,v;this.closed||f>0?g=a[(f-1)%c]:(CC.subVectors(a[0],a[1]).add(a[0]),g=CC);const M=a[f%c],x=a[(f+1)%c];if(this.closed||f+2<c?v=a[(f+2)%c]:(EC.subVectors(a[c-1],a[c-2]).add(a[c-1]),v=EC),this.curveType==="centripetal"||this.curveType==="chordal"){const S=this.curveType==="chordal"?.5:.25;let w=Math.pow(g.distanceToSquared(M),S),k=Math.pow(M.distanceToSquared(x),S),C=Math.pow(x.distanceToSquared(v),S);k<1e-4&&(k=1),w<1e-4&&(w=k),C<1e-4&&(C=k),ZM.initNonuniformCatmullRom(g.x,M.x,x.x,v.x,w,k,C),KM.initNonuniformCatmullRom(g.y,M.y,x.y,v.y,w,k,C),_M.initNonuniformCatmullRom(g.z,M.z,x.z,v.z,w,k,C)}else this.curveType==="catmullrom"&&(ZM.initCatmullRom(g.x,M.x,x.x,v.x,this.tension),KM.initCatmullRom(g.y,M.y,x.y,v.y,this.tension),_M.initCatmullRom(g.z,M.z,x.z,v.z,this.tension));return i.set(ZM.calc(m),KM.calc(m),_M.calc(m)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(a.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const a=this.points[t];e.points.push(a.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(new J().fromArray(a))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function RC(s,e,t,i,a){const c=(i-e)*.5,d=(a-t)*.5,f=s*s,m=s*f;return(2*t-2*i+c+d)*m+(-3*t+3*i-2*c-d)*f+c*s+t}function JI(s,e){const t=1-s;return t*t*e}function QI(s,e){return 2*(1-s)*s*e}function ZI(s,e){return s*s*e}function sv(s,e,t,i){return JI(s,e)+QI(s,t)+ZI(s,i)}function KI(s,e){const t=1-s;return t*t*t*e}function _I(s,e){const t=1-s;return 3*t*t*s*e}function $I(s,e){return 3*(1-s)*s*s*e}function eN(s,e){return s*s*s*e}function av(s,e,t,i,a){return KI(s,e)+_I(s,t)+$I(s,i)+eN(s,a)}class k1 extends qo{constructor(e=new Oe,t=new Oe,i=new Oe,a=new Oe){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=a}getPoint(e,t=new Oe){const i=t,a=this.v0,c=this.v1,d=this.v2,f=this.v3;return i.set(av(e,a.x,c.x,d.x,f.x),av(e,a.y,c.y,d.y,f.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class tR extends qo{constructor(e=new J,t=new J,i=new J,a=new J){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=a}getPoint(e,t=new J){const i=t,a=this.v0,c=this.v1,d=this.v2,f=this.v3;return i.set(av(e,a.x,c.x,d.x,f.x),av(e,a.y,c.y,d.y,f.y),av(e,a.z,c.z,d.z,f.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class D1 extends qo{constructor(e=new Oe,t=new Oe){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Oe){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Oe){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class nR extends qo{constructor(e=new J,t=new J){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new J){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new J){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class L1 extends qo{constructor(e=new Oe,t=new Oe,i=new Oe){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new Oe){const i=t,a=this.v0,c=this.v1,d=this.v2;return i.set(sv(e,a.x,c.x,d.x),sv(e,a.y,c.y,d.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class I1 extends qo{constructor(e=new J,t=new J,i=new J){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new J){const i=t,a=this.v0,c=this.v1,d=this.v2;return i.set(sv(e,a.x,c.x,d.x),sv(e,a.y,c.y,d.y),sv(e,a.z,c.z,d.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class N1 extends qo{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Oe){const i=t,a=this.points,c=(a.length-1)*e,d=Math.floor(c),f=c-d,m=a[d===0?d:d-1],g=a[d],v=a[d>a.length-2?a.length-1:d+1],M=a[d>a.length-3?a.length-1:d+2];return i.set(RC(f,m.x,g.x,v.x,M.x),RC(f,m.y,g.y,v.y,M.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const a=this.points[t];e.points.push(a.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const a=e.points[t];this.points.push(new Oe().fromArray(a))}return this}}var gx=Object.freeze({__proto__:null,ArcCurve:$3,CatmullRomCurve3:eR,CubicBezierCurve:k1,CubicBezierCurve3:tR,EllipseCurve:Jx,LineCurve:D1,LineCurve3:nR,QuadraticBezierCurve:L1,QuadraticBezierCurve3:I1,SplineCurve:N1});class iR extends qo{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new gx[i](t,e))}return this}getPoint(e,t){const i=e*this.getLength(),a=this.getCurveLengths();let c=0;for(;c<a.length;){if(a[c]>=i){const d=a[c]-i,f=this.curves[c],m=f.getLength(),g=m===0?0:1-d/m;return f.getPointAt(g,t)}c++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,a=this.curves.length;i<a;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let i;for(let a=0,c=this.curves;a<c.length;a++){const d=c[a],f=d.isEllipseCurve?e*2:d.isLineCurve||d.isLineCurve3?1:d.isSplineCurve?e*d.points.length:e,m=d.getPoints(f);for(let g=0;g<m.length;g++){const v=m[g];i&&i.equals(v)||(t.push(v),i=v)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const a=e.curves[t];this.curves.push(a.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){const a=this.curves[t];e.curves.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const a=e.curves[t];this.curves.push(new gx[a.type]().fromJSON(a))}return this}}class Av extends iR{constructor(e){super(),this.type="Path",this.currentPoint=new Oe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const i=new D1(this.currentPoint.clone(),new Oe(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,a){const c=new L1(this.currentPoint.clone(),new Oe(e,t),new Oe(i,a));return this.curves.push(c),this.currentPoint.set(i,a),this}bezierCurveTo(e,t,i,a,c,d){const f=new k1(this.currentPoint.clone(),new Oe(e,t),new Oe(i,a),new Oe(c,d));return this.curves.push(f),this.currentPoint.set(c,d),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),i=new N1(t);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,a,c,d){const f=this.currentPoint.x,m=this.currentPoint.y;return this.absarc(e+f,t+m,i,a,c,d),this}absarc(e,t,i,a,c,d){return this.absellipse(e,t,i,i,a,c,d),this}ellipse(e,t,i,a,c,d,f,m){const g=this.currentPoint.x,v=this.currentPoint.y;return this.absellipse(e+g,t+v,i,a,c,d,f,m),this}absellipse(e,t,i,a,c,d,f,m){const g=new Jx(e,t,i,a,c,d,f,m);if(this.curves.length>0){const M=g.getPoint(0);M.equals(this.currentPoint)||this.lineTo(M.x,M.y)}this.curves.push(g);const v=g.getPoint(1);return this.currentPoint.copy(v),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Pv extends Av{constructor(e){super(e),this.uuid=Ca(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,a=this.holes.length;i<a;i++)t[i]=this.holes[i].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const a=e.holes[t];this.holes.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){const a=this.holes[t];e.holes.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const a=e.holes[t];this.holes.push(new Av().fromJSON(a))}return this}}function tN(s,e,t=2){const i=e&&e.length,a=i?e[0]*t:s.length;let c=rR(s,0,a,t,!0);const d=[];if(!c||c.next===c.prev)return d;let f,m,g;if(i&&(c=aN(s,e,c,t)),s.length>80*t){f=s[0],m=s[1];let v=f,M=m;for(let x=t;x<a;x+=t){const S=s[x],w=s[x+1];S<f&&(f=S),w<m&&(m=w),S>v&&(v=S),w>M&&(M=w)}g=Math.max(v-f,M-m),g=g!==0?32767/g:0}return vv(c,d,t,f,m,g,0),d}function rR(s,e,t,i,a){let c;if(a===AN(s,e,t,i)>0)for(let d=e;d<t;d+=i)c=PC(d/i|0,s[d],s[d+1],c);else for(let d=t-i;d>=e;d-=i)c=PC(d/i|0,s[d],s[d+1],c);return c&&Lm(c,c.next)&&(bv(c),c=c.next),c}function Xf(s,e){if(!s)return s;e||(e=s);let t=s,i;do if(i=!1,!t.steiner&&(Lm(t,t.next)||ki(t.prev,t,t.next)===0)){if(bv(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function vv(s,e,t,i,a,c,d){if(!s)return;!d&&c&&dN(s,i,a,c);let f=s;for(;s.prev!==s.next;){const m=s.prev,g=s.next;if(c?iN(s,i,a,c):nN(s)){e.push(m.i,s.i,g.i),bv(s),s=g.next,f=g.next;continue}if(s=g,s===f){d?d===1?(s=rN(Xf(s),e),vv(s,e,t,i,a,c,2)):d===2&&sN(s,e,t,i,a,c):vv(Xf(s),e,t,i,a,c,1);break}}}function nN(s){const e=s.prev,t=s,i=s.next;if(ki(e,t,i)>=0)return!1;const a=e.x,c=t.x,d=i.x,f=e.y,m=t.y,g=i.y,v=Math.min(a,c,d),M=Math.min(f,m,g),x=Math.max(a,c,d),S=Math.max(f,m,g);let w=i.next;for(;w!==e;){if(w.x>=v&&w.x<=x&&w.y>=M&&w.y<=S&&qA(a,f,c,m,d,g,w.x,w.y)&&ki(w.prev,w,w.next)>=0)return!1;w=w.next}return!0}function iN(s,e,t,i){const a=s.prev,c=s,d=s.next;if(ki(a,c,d)>=0)return!1;const f=a.x,m=c.x,g=d.x,v=a.y,M=c.y,x=d.y,S=Math.min(f,m,g),w=Math.min(v,M,x),k=Math.max(f,m,g),C=Math.max(v,M,x),T=Fw(S,w,e,t,i),D=Fw(k,C,e,t,i);let z=s.prevZ,L=s.nextZ;for(;z&&z.z>=T&&L&&L.z<=D;){if(z.x>=S&&z.x<=k&&z.y>=w&&z.y<=C&&z!==a&&z!==d&&qA(f,v,m,M,g,x,z.x,z.y)&&ki(z.prev,z,z.next)>=0||(z=z.prevZ,L.x>=S&&L.x<=k&&L.y>=w&&L.y<=C&&L!==a&&L!==d&&qA(f,v,m,M,g,x,L.x,L.y)&&ki(L.prev,L,L.next)>=0))return!1;L=L.nextZ}for(;z&&z.z>=T;){if(z.x>=S&&z.x<=k&&z.y>=w&&z.y<=C&&z!==a&&z!==d&&qA(f,v,m,M,g,x,z.x,z.y)&&ki(z.prev,z,z.next)>=0)return!1;z=z.prevZ}for(;L&&L.z<=D;){if(L.x>=S&&L.x<=k&&L.y>=w&&L.y<=C&&L!==a&&L!==d&&qA(f,v,m,M,g,x,L.x,L.y)&&ki(L.prev,L,L.next)>=0)return!1;L=L.nextZ}return!0}function rN(s,e){let t=s;do{const i=t.prev,a=t.next.next;!Lm(i,a)&&aR(i,t,t.next,a)&&yv(i,a)&&yv(a,i)&&(e.push(i.i,t.i,a.i),bv(t),bv(t.next),t=s=a),t=t.next}while(t!==s);return Xf(t)}function sN(s,e,t,i,a,c){let d=s;do{let f=d.next.next;for(;f!==d.prev;){if(d.i!==f.i&&pN(d,f)){let m=oR(d,f);d=Xf(d,d.next),m=Xf(m,m.next),vv(d,e,t,i,a,c,0),vv(m,e,t,i,a,c,0);return}f=f.next}d=d.next}while(d!==s)}function aN(s,e,t,i){const a=[];for(let c=0,d=e.length;c<d;c++){const f=e[c]*i,m=c<d-1?e[c+1]*i:s.length,g=rR(s,f,m,i,!1);g===g.next&&(g.steiner=!0),a.push(hN(g))}a.sort(oN);for(let c=0;c<a.length;c++)t=lN(a[c],t);return t}function oN(s,e){let t=s.x-e.x;if(t===0&&(t=s.y-e.y,t===0)){const i=(s.next.y-s.y)/(s.next.x-s.x),a=(e.next.y-e.y)/(e.next.x-e.x);t=i-a}return t}function lN(s,e){const t=cN(s,e);if(!t)return e;const i=oR(t,s);return Xf(i,i.next),Xf(t,t.next)}function cN(s,e){let t=e;const i=s.x,a=s.y;let c=-1/0,d;if(Lm(s,t))return t;do{if(Lm(s,t.next))return t.next;if(a<=t.y&&a>=t.next.y&&t.next.y!==t.y){const M=t.x+(a-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(M<=i&&M>c&&(c=M,d=t.x<t.next.x?t:t.next,M===i))return d}t=t.next}while(t!==e);if(!d)return null;const f=d,m=d.x,g=d.y;let v=1/0;t=d;do{if(i>=t.x&&t.x>=m&&i!==t.x&&sR(a<g?i:c,a,m,g,a<g?c:i,a,t.x,t.y)){const M=Math.abs(a-t.y)/(i-t.x);yv(t,s)&&(M<v||M===v&&(t.x>d.x||t.x===d.x&&uN(d,t)))&&(d=t,v=M)}t=t.next}while(t!==f);return d}function uN(s,e){return ki(s.prev,s,e.prev)<0&&ki(e.next,s,s.next)<0}function dN(s,e,t,i){let a=s;do a.z===0&&(a.z=Fw(a.x,a.y,e,t,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==s);a.prevZ.nextZ=null,a.prevZ=null,fN(a)}function fN(s){let e,t=1;do{let i=s,a;s=null;let c=null;for(e=0;i;){e++;let d=i,f=0;for(let g=0;g<t&&(f++,d=d.nextZ,!!d);g++);let m=t;for(;f>0||m>0&&d;)f!==0&&(m===0||!d||i.z<=d.z)?(a=i,i=i.nextZ,f--):(a=d,d=d.nextZ,m--),c?c.nextZ=a:s=a,a.prevZ=c,c=a;i=d}c.nextZ=null,t*=2}while(e>1);return s}function Fw(s,e,t,i,a){return s=(s-t)*a|0,e=(e-i)*a|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function hN(s){let e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function sR(s,e,t,i,a,c,d,f){return(a-d)*(e-f)>=(s-d)*(c-f)&&(s-d)*(i-f)>=(t-d)*(e-f)&&(t-d)*(c-f)>=(a-d)*(i-f)}function qA(s,e,t,i,a,c,d,f){return!(s===d&&e===f)&&sR(s,e,t,i,a,c,d,f)}function pN(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!mN(s,e)&&(yv(s,e)&&yv(e,s)&&gN(s,e)&&(ki(s.prev,s,e.prev)||ki(s,e.prev,e))||Lm(s,e)&&ki(s.prev,s,s.next)>0&&ki(e.prev,e,e.next)>0)}function ki(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function Lm(s,e){return s.x===e.x&&s.y===e.y}function aR(s,e,t,i){const a=sb(ki(s,e,t)),c=sb(ki(s,e,i)),d=sb(ki(t,i,s)),f=sb(ki(t,i,e));return!!(a!==c&&d!==f||a===0&&rb(s,t,e)||c===0&&rb(s,i,e)||d===0&&rb(t,s,i)||f===0&&rb(t,e,i))}function rb(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function sb(s){return s>0?1:s<0?-1:0}function mN(s,e){let t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&aR(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function yv(s,e){return ki(s.prev,s,s.next)<0?ki(s,e,s.next)>=0&&ki(s,s.prev,e)>=0:ki(s,e,s.prev)<0||ki(s,s.next,e)<0}function gN(s,e){let t=s,i=!1;const a=(s.x+e.x)/2,c=(s.y+e.y)/2;do t.y>c!=t.next.y>c&&t.next.y!==t.y&&a<(t.next.x-t.x)*(c-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function oR(s,e){const t=Ow(s.i,s.x,s.y),i=Ow(e.i,e.x,e.y),a=s.next,c=e.prev;return s.next=e,e.prev=s,t.next=a,a.prev=t,i.next=t,t.prev=i,c.next=i,i.prev=c,i}function PC(s,e,t,i){const a=Ow(s,e,t);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function bv(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function Ow(s,e,t){return{i:s,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function AN(s,e,t,i){let a=0;for(let c=e,d=t-i;c<t;c+=i)a+=(s[d]-s[c])*(s[c+1]+s[d+1]),d=c;return a}class vN{static triangulate(e,t,i=2){return tN(e,t,i)}}class Wo{static area(e){const t=e.length;let i=0;for(let a=t-1,c=0;c<t;a=c++)i+=e[a].x*e[c].y-e[c].x*e[a].y;return i*.5}static isClockWise(e){return Wo.area(e)<0}static triangulateShape(e,t){const i=[],a=[],c=[];kC(e),DC(i,e);let d=e.length;t.forEach(kC);for(let m=0;m<t.length;m++)a.push(d),d+=t[m].length,DC(i,t[m]);const f=vN.triangulate(i,a);for(let m=0;m<f.length;m+=3)c.push(f.slice(m,m+3));return c}}function kC(s){const e=s.length;e>2&&s[e-1].equals(s[0])&&s.pop()}function DC(s,e){for(let t=0;t<e.length;t++)s.push(e[t].x),s.push(e[t].y)}class Qx extends rn{constructor(e=new Pv([new Oe(.5,.5),new Oe(-.5,.5),new Oe(-.5,-.5),new Oe(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,a=[],c=[];for(let f=0,m=e.length;f<m;f++){const g=e[f];d(g)}this.setAttribute("position",new wt(a,3)),this.setAttribute("uv",new wt(c,2)),this.computeVertexNormals();function d(f){const m=[],g=t.curveSegments!==void 0?t.curveSegments:12,v=t.steps!==void 0?t.steps:1,M=t.depth!==void 0?t.depth:1;let x=t.bevelEnabled!==void 0?t.bevelEnabled:!0,S=t.bevelThickness!==void 0?t.bevelThickness:.2,w=t.bevelSize!==void 0?t.bevelSize:S-.1,k=t.bevelOffset!==void 0?t.bevelOffset:0,C=t.bevelSegments!==void 0?t.bevelSegments:3;const T=t.extrudePath,D=t.UVGenerator!==void 0?t.UVGenerator:yN;let z,L=!1,O,U,H,I;if(T){z=T.getSpacedPoints(v),L=!0,x=!1;const Ue=T.isCatmullRomCurve3?T.closed:!1;O=T.computeFrenetFrames(v,Ue),U=new J,H=new J,I=new J}x||(C=0,S=0,w=0,k=0);const F=f.extractPoints(g);let V=F.shape;const X=F.holes;if(!Wo.isClockWise(V)){V=V.reverse();for(let Ue=0,xe=X.length;Ue<xe;Ue++){const ze=X[Ue];Wo.isClockWise(ze)&&(X[Ue]=ze.reverse())}}function K(Ue){const ze=10000000000000001e-36;let je=Ue[0];for(let Ze=1;Ze<=Ue.length;Ze++){const Pt=Ze%Ue.length,bt=Ue[Pt],zt=bt.x-je.x,Et=bt.y-je.y,ee=zt*zt+Et*Et,Cn=Math.max(Math.abs(bt.x),Math.abs(bt.y),Math.abs(je.x),Math.abs(je.y)),an=ze*Cn*Cn;if(ee<=an){Ue.splice(Pt,1),Ze--;continue}je=bt}}K(V),X.forEach(K);const le=X.length,$=V;for(let Ue=0;Ue<le;Ue++){const xe=X[Ue];V=V.concat(xe)}function j(Ue,xe,ze){return xe||kt("ExtrudeGeometry: vec does not exist"),Ue.clone().addScaledVector(xe,ze)}const Q=V.length;function ne(Ue,xe,ze){let je,Ze,Pt;const bt=Ue.x-xe.x,zt=Ue.y-xe.y,Et=ze.x-Ue.x,ee=ze.y-Ue.y,Cn=bt*bt+zt*zt,an=bt*ee-zt*Et;if(Math.abs(an)>Number.EPSILON){const Y=Math.sqrt(Cn),B=Math.sqrt(Et*Et+ee*ee),de=xe.x-zt/Y,me=xe.y+bt/Y,Ce=ze.x-ee/B,Qe=ze.y+Et/B,Ke=((Ce-de)*ee-(Qe-me)*Et)/(bt*ee-zt*Et);je=de+bt*Ke-Ue.x,Ze=me+zt*Ke-Ue.y;const ke=je*je+Ze*Ze;if(ke<=2)return new Oe(je,Ze);Pt=Math.sqrt(ke/2)}else{let Y=!1;bt>Number.EPSILON?Et>Number.EPSILON&&(Y=!0):bt<-Number.EPSILON?Et<-Number.EPSILON&&(Y=!0):Math.sign(zt)===Math.sign(ee)&&(Y=!0),Y?(je=-zt,Ze=bt,Pt=Math.sqrt(Cn)):(je=bt,Ze=zt,Pt=Math.sqrt(Cn/2))}return new Oe(je/Pt,Ze/Pt)}const ce=[];for(let Ue=0,xe=$.length,ze=xe-1,je=Ue+1;Ue<xe;Ue++,ze++,je++)ze===xe&&(ze=0),je===xe&&(je=0),ce[Ue]=ne($[Ue],$[ze],$[je]);const ye=[];let Te,Fe=ce.concat();for(let Ue=0,xe=le;Ue<xe;Ue++){const ze=X[Ue];Te=[];for(let je=0,Ze=ze.length,Pt=Ze-1,bt=je+1;je<Ze;je++,Pt++,bt++)Pt===Ze&&(Pt=0),bt===Ze&&(bt=0),Te[je]=ne(ze[je],ze[Pt],ze[bt]);ye.push(Te),Fe=Fe.concat(Te)}let ft;if(C===0)ft=Wo.triangulateShape($,X);else{const Ue=[],xe=[];for(let ze=0;ze<C;ze++){const je=ze/C,Ze=S*Math.cos(je*Math.PI/2),Pt=w*Math.sin(je*Math.PI/2)+k;for(let bt=0,zt=$.length;bt<zt;bt++){const Et=j($[bt],ce[bt],Pt);pt(Et.x,Et.y,-Ze),je===0&&Ue.push(Et)}for(let bt=0,zt=le;bt<zt;bt++){const Et=X[bt];Te=ye[bt];const ee=[];for(let Cn=0,an=Et.length;Cn<an;Cn++){const Y=j(Et[Cn],Te[Cn],Pt);pt(Y.x,Y.y,-Ze),je===0&&ee.push(Y)}je===0&&xe.push(ee)}}ft=Wo.triangulateShape(Ue,xe)}const lt=ft.length,ct=w+k;for(let Ue=0;Ue<Q;Ue++){const xe=x?j(V[Ue],Fe[Ue],ct):V[Ue];L?(H.copy(O.normals[0]).multiplyScalar(xe.x),U.copy(O.binormals[0]).multiplyScalar(xe.y),I.copy(z[0]).add(H).add(U),pt(I.x,I.y,I.z)):pt(xe.x,xe.y,0)}for(let Ue=1;Ue<=v;Ue++)for(let xe=0;xe<Q;xe++){const ze=x?j(V[xe],Fe[xe],ct):V[xe];L?(H.copy(O.normals[Ue]).multiplyScalar(ze.x),U.copy(O.binormals[Ue]).multiplyScalar(ze.y),I.copy(z[Ue]).add(H).add(U),pt(I.x,I.y,I.z)):pt(ze.x,ze.y,M/v*Ue)}for(let Ue=C-1;Ue>=0;Ue--){const xe=Ue/C,ze=S*Math.cos(xe*Math.PI/2),je=w*Math.sin(xe*Math.PI/2)+k;for(let Ze=0,Pt=$.length;Ze<Pt;Ze++){const bt=j($[Ze],ce[Ze],je);pt(bt.x,bt.y,M+ze)}for(let Ze=0,Pt=X.length;Ze<Pt;Ze++){const bt=X[Ze];Te=ye[Ze];for(let zt=0,Et=bt.length;zt<Et;zt++){const ee=j(bt[zt],Te[zt],je);L?pt(ee.x,ee.y+z[v-1].y,z[v-1].x+ze):pt(ee.x,ee.y,M+ze)}}}Pe(),qe();function Pe(){const Ue=a.length/3;if(x){let xe=0,ze=Q*xe;for(let je=0;je<lt;je++){const Ze=ft[je];Nt(Ze[2]+ze,Ze[1]+ze,Ze[0]+ze)}xe=v+C*2,ze=Q*xe;for(let je=0;je<lt;je++){const Ze=ft[je];Nt(Ze[0]+ze,Ze[1]+ze,Ze[2]+ze)}}else{for(let xe=0;xe<lt;xe++){const ze=ft[xe];Nt(ze[2],ze[1],ze[0])}for(let xe=0;xe<lt;xe++){const ze=ft[xe];Nt(ze[0]+Q*v,ze[1]+Q*v,ze[2]+Q*v)}}i.addGroup(Ue,a.length/3-Ue,0)}function qe(){const Ue=a.length/3;let xe=0;He($,xe),xe+=$.length;for(let ze=0,je=X.length;ze<je;ze++){const Ze=X[ze];He(Ze,xe),xe+=Ze.length}i.addGroup(Ue,a.length/3-Ue,1)}function He(Ue,xe){let ze=Ue.length;for(;--ze>=0;){const je=ze;let Ze=ze-1;Ze<0&&(Ze=Ue.length-1);for(let Pt=0,bt=v+C*2;Pt<bt;Pt++){const zt=Q*Pt,Et=Q*(Pt+1),ee=xe+je+zt,Cn=xe+Ze+zt,an=xe+Ze+Et,Y=xe+je+Et;nt(ee,Cn,an,Y)}}}function pt(Ue,xe,ze){m.push(Ue),m.push(xe),m.push(ze)}function Nt(Ue,xe,ze){sn(Ue),sn(xe),sn(ze);const je=a.length/3,Ze=D.generateTopUV(i,a,je-3,je-2,je-1);Dt(Ze[0]),Dt(Ze[1]),Dt(Ze[2])}function nt(Ue,xe,ze,je){sn(Ue),sn(xe),sn(je),sn(xe),sn(ze),sn(je);const Ze=a.length/3,Pt=D.generateSideWallUV(i,a,Ze-6,Ze-3,Ze-2,Ze-1);Dt(Pt[0]),Dt(Pt[1]),Dt(Pt[3]),Dt(Pt[1]),Dt(Pt[2]),Dt(Pt[3])}function sn(Ue){a.push(m[Ue*3+0]),a.push(m[Ue*3+1]),a.push(m[Ue*3+2])}function Dt(Ue){c.push(Ue.x),c.push(Ue.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return bN(t,i,e)}static fromJSON(e,t){const i=[];for(let c=0,d=e.shapes.length;c<d;c++){const f=t[e.shapes[c]];i.push(f)}const a=e.options.extrudePath;return a!==void 0&&(e.options.extrudePath=new gx[a.type]().fromJSON(a)),new Qx(i,e.options)}}const yN={generateTopUV:function(s,e,t,i,a){const c=e[t*3],d=e[t*3+1],f=e[i*3],m=e[i*3+1],g=e[a*3],v=e[a*3+1];return[new Oe(c,d),new Oe(f,m),new Oe(g,v)]},generateSideWallUV:function(s,e,t,i,a,c){const d=e[t*3],f=e[t*3+1],m=e[t*3+2],g=e[i*3],v=e[i*3+1],M=e[i*3+2],x=e[a*3],S=e[a*3+1],w=e[a*3+2],k=e[c*3],C=e[c*3+1],T=e[c*3+2];return Math.abs(f-v)<Math.abs(d-g)?[new Oe(d,1-m),new Oe(g,1-M),new Oe(x,1-w),new Oe(k,1-T)]:[new Oe(f,1-m),new Oe(v,1-M),new Oe(S,1-w),new Oe(C,1-T)]}};function bN(s,e,t){if(t.shapes=[],Array.isArray(s))for(let i=0,a=s.length;i<a;i++){const c=s[i];t.shapes.push(c.uuid)}else t.shapes.push(s.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class Zx extends _u{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,a=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],c=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(a,c,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zx(e.radius,e.detail)}}class Kx extends rn{constructor(e=[new Oe(0,-.5),new Oe(.5,0),new Oe(0,.5)],t=12,i=0,a=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:a},t=Math.floor(t),a=Yt(a,0,Math.PI*2);const c=[],d=[],f=[],m=[],g=[],v=1/t,M=new J,x=new Oe,S=new J,w=new J,k=new J;let C=0,T=0;for(let D=0;D<=e.length-1;D++)switch(D){case 0:C=e[D+1].x-e[D].x,T=e[D+1].y-e[D].y,S.x=T*1,S.y=-C,S.z=T*0,k.copy(S),S.normalize(),m.push(S.x,S.y,S.z);break;case e.length-1:m.push(k.x,k.y,k.z);break;default:C=e[D+1].x-e[D].x,T=e[D+1].y-e[D].y,S.x=T*1,S.y=-C,S.z=T*0,w.copy(S),S.x+=k.x,S.y+=k.y,S.z+=k.z,S.normalize(),m.push(S.x,S.y,S.z),k.copy(w)}for(let D=0;D<=t;D++){const z=i+D*v*a,L=Math.sin(z),O=Math.cos(z);for(let U=0;U<=e.length-1;U++){M.x=e[U].x*L,M.y=e[U].y,M.z=e[U].x*O,d.push(M.x,M.y,M.z),x.x=D/t,x.y=U/(e.length-1),f.push(x.x,x.y);const H=m[3*U+0]*L,I=m[3*U+1],F=m[3*U+0]*O;g.push(H,I,F)}}for(let D=0;D<t;D++)for(let z=0;z<e.length-1;z++){const L=z+D*e.length,O=L,U=L+e.length,H=L+e.length+1,I=L+1;c.push(O,U,I),c.push(H,I,U)}this.setIndex(c),this.setAttribute("position",new wt(d,3)),this.setAttribute("uv",new wt(f,2)),this.setAttribute("normal",new wt(g,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Kx(e.points,e.segments,e.phiStart,e.phiLength)}}class kv extends _u{constructor(e=1,t=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],a=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,a,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new kv(e.radius,e.detail)}}class Fm extends rn{constructor(e=1,t=1,i=1,a=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:a};const c=e/2,d=t/2,f=Math.floor(i),m=Math.floor(a),g=f+1,v=m+1,M=e/f,x=t/m,S=[],w=[],k=[],C=[];for(let T=0;T<v;T++){const D=T*x-d;for(let z=0;z<g;z++){const L=z*M-c;w.push(L,-D,0),k.push(0,0,1),C.push(z/f),C.push(1-T/m)}}for(let T=0;T<m;T++)for(let D=0;D<f;D++){const z=D+g*T,L=D+g*(T+1),O=D+1+g*(T+1),U=D+1+g*T;S.push(z,L,U),S.push(L,O,U)}this.setIndex(S),this.setAttribute("position",new wt(w,3)),this.setAttribute("normal",new wt(k,3)),this.setAttribute("uv",new wt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Fm(e.width,e.height,e.widthSegments,e.heightSegments)}}class _x extends rn{constructor(e=.5,t=1,i=32,a=1,c=0,d=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:a,thetaStart:c,thetaLength:d},i=Math.max(3,i),a=Math.max(1,a);const f=[],m=[],g=[],v=[];let M=e;const x=(t-e)/a,S=new J,w=new Oe;for(let k=0;k<=a;k++){for(let C=0;C<=i;C++){const T=c+C/i*d;S.x=M*Math.cos(T),S.y=M*Math.sin(T),m.push(S.x,S.y,S.z),g.push(0,0,1),w.x=(S.x/t+1)/2,w.y=(S.y/t+1)/2,v.push(w.x,w.y)}M+=x}for(let k=0;k<a;k++){const C=k*(i+1);for(let T=0;T<i;T++){const D=T+C,z=D,L=D+i+1,O=D+i+2,U=D+1;f.push(z,L,U),f.push(L,O,U)}}this.setIndex(f),this.setAttribute("position",new wt(m,3)),this.setAttribute("normal",new wt(g,3)),this.setAttribute("uv",new wt(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _x(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class $x extends rn{constructor(e=new Pv([new Oe(0,.5),new Oe(-.5,-.5),new Oe(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],a=[],c=[],d=[];let f=0,m=0;if(Array.isArray(e)===!1)g(e);else for(let v=0;v<e.length;v++)g(e[v]),this.addGroup(f,m,v),f+=m,m=0;this.setIndex(i),this.setAttribute("position",new wt(a,3)),this.setAttribute("normal",new wt(c,3)),this.setAttribute("uv",new wt(d,2));function g(v){const M=a.length/3,x=v.extractPoints(t);let S=x.shape;const w=x.holes;Wo.isClockWise(S)===!1&&(S=S.reverse());for(let C=0,T=w.length;C<T;C++){const D=w[C];Wo.isClockWise(D)===!0&&(w[C]=D.reverse())}const k=Wo.triangulateShape(S,w);for(let C=0,T=w.length;C<T;C++){const D=w[C];S=S.concat(D)}for(let C=0,T=S.length;C<T;C++){const D=S[C];a.push(D.x,D.y,0),c.push(0,0,1),d.push(D.x,D.y)}for(let C=0,T=k.length;C<T;C++){const D=k[C],z=D[0]+M,L=D[1]+M,O=D[2]+M;i.push(z,L,O),m+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return xN(t,e)}static fromJSON(e,t){const i=[];for(let a=0,c=e.shapes.length;a<c;a++){const d=t[e.shapes[a]];i.push(d)}return new $x(i,e.curveSegments)}}function xN(s,e){if(e.shapes=[],Array.isArray(s))for(let t=0,i=s.length;t<i;t++){const a=s[t];e.shapes.push(a.uuid)}else e.shapes.push(s.uuid);return e}class Dv extends rn{constructor(e=1,t=32,i=16,a=0,c=Math.PI*2,d=0,f=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:a,phiLength:c,thetaStart:d,thetaLength:f},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const m=Math.min(d+f,Math.PI);let g=0;const v=[],M=new J,x=new J,S=[],w=[],k=[],C=[];for(let T=0;T<=i;T++){const D=[],z=T/i,L=d+z*f,O=e*Math.cos(L),U=Math.sqrt(e*e-O*O);let H=0;T===0&&d===0?H=.5/t:T===i&&m===Math.PI&&(H=-.5/t);for(let I=0;I<=t;I++){const F=I/t,V=a+F*c;M.x=-U*Math.cos(V),M.y=O,M.z=U*Math.sin(V),w.push(M.x,M.y,M.z),x.copy(M).normalize(),k.push(x.x,x.y,x.z),C.push(F+H,1-z),D.push(g++)}v.push(D)}for(let T=0;T<i;T++)for(let D=0;D<t;D++){const z=v[T][D+1],L=v[T][D],O=v[T+1][D],U=v[T+1][D+1];(T!==0||d>0)&&S.push(z,L,U),(T!==i-1||m<Math.PI)&&S.push(L,O,U)}this.setIndex(S),this.setAttribute("position",new wt(w,3)),this.setAttribute("normal",new wt(k,3)),this.setAttribute("uv",new wt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Dv(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class eS extends _u{constructor(e=1,t=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],a=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,a,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new eS(e.radius,e.detail)}}class tS extends rn{constructor(e=1,t=.4,i=12,a=48,c=Math.PI*2,d=0,f=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:a,arc:c,thetaStart:d,thetaLength:f},i=Math.floor(i),a=Math.floor(a);const m=[],g=[],v=[],M=[],x=new J,S=new J,w=new J;for(let k=0;k<=i;k++){const C=d+k/i*f;for(let T=0;T<=a;T++){const D=T/a*c;S.x=(e+t*Math.cos(C))*Math.cos(D),S.y=(e+t*Math.cos(C))*Math.sin(D),S.z=t*Math.sin(C),g.push(S.x,S.y,S.z),x.x=e*Math.cos(D),x.y=e*Math.sin(D),w.subVectors(S,x).normalize(),v.push(w.x,w.y,w.z),M.push(T/a),M.push(k/i)}}for(let k=1;k<=i;k++)for(let C=1;C<=a;C++){const T=(a+1)*k+C-1,D=(a+1)*(k-1)+C-1,z=(a+1)*(k-1)+C,L=(a+1)*k+C;m.push(T,D,L),m.push(D,z,L)}this.setIndex(m),this.setAttribute("position",new wt(g,3)),this.setAttribute("normal",new wt(v,3)),this.setAttribute("uv",new wt(M,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tS(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class nS extends rn{constructor(e=1,t=.4,i=64,a=8,c=2,d=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:a,p:c,q:d},i=Math.floor(i),a=Math.floor(a);const f=[],m=[],g=[],v=[],M=new J,x=new J,S=new J,w=new J,k=new J,C=new J,T=new J;for(let z=0;z<=i;++z){const L=z/i*c*Math.PI*2;D(L,c,d,e,S),D(L+.01,c,d,e,w),C.subVectors(w,S),T.addVectors(w,S),k.crossVectors(C,T),T.crossVectors(k,C),k.normalize(),T.normalize();for(let O=0;O<=a;++O){const U=O/a*Math.PI*2,H=-t*Math.cos(U),I=t*Math.sin(U);M.x=S.x+(H*T.x+I*k.x),M.y=S.y+(H*T.y+I*k.y),M.z=S.z+(H*T.z+I*k.z),m.push(M.x,M.y,M.z),x.subVectors(M,S).normalize(),g.push(x.x,x.y,x.z),v.push(z/i),v.push(O/a)}}for(let z=1;z<=i;z++)for(let L=1;L<=a;L++){const O=(a+1)*(z-1)+(L-1),U=(a+1)*z+(L-1),H=(a+1)*z+L,I=(a+1)*(z-1)+L;f.push(O,U,I),f.push(U,H,I)}this.setIndex(f),this.setAttribute("position",new wt(m,3)),this.setAttribute("normal",new wt(g,3)),this.setAttribute("uv",new wt(v,2));function D(z,L,O,U,H){const I=Math.cos(z),F=Math.sin(z),V=O/L*z,X=Math.cos(V);H.x=U*(2+X)*.5*I,H.y=U*(2+X)*F*.5,H.z=U*Math.sin(V)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nS(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class iS extends rn{constructor(e=new I1(new J(-1,-1,0),new J(-1,1,0),new J(1,1,0)),t=64,i=1,a=8,c=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:a,closed:c};const d=e.computeFrenetFrames(t,c);this.tangents=d.tangents,this.normals=d.normals,this.binormals=d.binormals;const f=new J,m=new J,g=new Oe;let v=new J;const M=[],x=[],S=[],w=[];k(),this.setIndex(w),this.setAttribute("position",new wt(M,3)),this.setAttribute("normal",new wt(x,3)),this.setAttribute("uv",new wt(S,2));function k(){for(let z=0;z<t;z++)C(z);C(c===!1?t:0),D(),T()}function C(z){v=e.getPointAt(z/t,v);const L=d.normals[z],O=d.binormals[z];for(let U=0;U<=a;U++){const H=U/a*Math.PI*2,I=Math.sin(H),F=-Math.cos(H);m.x=F*L.x+I*O.x,m.y=F*L.y+I*O.y,m.z=F*L.z+I*O.z,m.normalize(),x.push(m.x,m.y,m.z),f.x=v.x+i*m.x,f.y=v.y+i*m.y,f.z=v.z+i*m.z,M.push(f.x,f.y,f.z)}}function T(){for(let z=1;z<=t;z++)for(let L=1;L<=a;L++){const O=(a+1)*(z-1)+(L-1),U=(a+1)*z+(L-1),H=(a+1)*z+L,I=(a+1)*(z-1)+L;w.push(O,U,I),w.push(U,H,I)}}function D(){for(let z=0;z<=t;z++)for(let L=0;L<=a;L++)g.x=z/t,g.y=L/a,S.push(g.x,g.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new iS(new gx[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class lR extends rn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],i=new Set,a=new J,c=new J;if(e.index!==null){const d=e.attributes.position,f=e.index;let m=e.groups;m.length===0&&(m=[{start:0,count:f.count,materialIndex:0}]);for(let g=0,v=m.length;g<v;++g){const M=m[g],x=M.start,S=M.count;for(let w=x,k=x+S;w<k;w+=3)for(let C=0;C<3;C++){const T=f.getX(w+C),D=f.getX(w+(C+1)%3);a.fromBufferAttribute(d,T),c.fromBufferAttribute(d,D),LC(a,c,i)===!0&&(t.push(a.x,a.y,a.z),t.push(c.x,c.y,c.z))}}}else{const d=e.attributes.position;for(let f=0,m=d.count/3;f<m;f++)for(let g=0;g<3;g++){const v=3*f+g,M=3*f+(g+1)%3;a.fromBufferAttribute(d,v),c.fromBufferAttribute(d,M),LC(a,c,i)===!0&&(t.push(a.x,a.y,a.z),t.push(c.x,c.y,c.z))}}this.setAttribute("position",new wt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function LC(s,e,t){const i=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,a=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(i)===!0||t.has(a)===!0?!1:(t.add(i),t.add(a),!0)}var IC=Object.freeze({__proto__:null,BoxGeometry:Yf,CapsuleGeometry:Xx,CircleGeometry:qx,ConeGeometry:Rv,CylinderGeometry:Cv,DodecahedronGeometry:Yx,EdgesGeometry:_3,ExtrudeGeometry:Qx,IcosahedronGeometry:Zx,LatheGeometry:Kx,OctahedronGeometry:kv,PlaneGeometry:Fm,PolyhedronGeometry:_u,RingGeometry:_x,ShapeGeometry:$x,SphereGeometry:Dv,TetrahedronGeometry:eS,TorusGeometry:tS,TorusKnotGeometry:nS,TubeGeometry:iS,WireframeGeometry:lR});class cR extends Hr{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new ut(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function Im(s){const e={};for(const t in s){e[t]={};for(const i in s[t]){const a=s[t][i];if(NC(a))a.isRenderTargetTexture?(ot("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=a.clone();else if(Array.isArray(a))if(NC(a[0])){const c=[];for(let d=0,f=a.length;d<f;d++)c[d]=a[d].clone();e[t][i]=c}else e[t][i]=a.slice();else e[t][i]=a}}return e}function xs(s){const e={};for(let t=0;t<s.length;t++){const i=Im(s[t]);for(const a in i)e[a]=i[a]}return e}function NC(s){return s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)}function SN(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function uR(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:wn.workingColorSpace}const dR={clone:Im,merge:xs};var MN=`void main() {
|
|
111
111
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
112
112
|
}`,wN=`void main() {
|
|
113
113
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -3781,7 +3781,7 @@ void main() {
|
|
|
3781
3781
|
#include <tonemapping_fragment>
|
|
3782
3782
|
#include <colorspace_fragment>
|
|
3783
3783
|
#include <fog_fragment>
|
|
3784
|
-
}`,mn={alphahash_fragment:Oz,alphahash_pars_fragment:Vz,alphamap_fragment:Hz,alphamap_pars_fragment:Gz,alphatest_fragment:Wz,alphatest_pars_fragment:jz,aomap_fragment:Xz,aomap_pars_fragment:qz,batching_pars_vertex:Yz,batching_vertex:Jz,begin_vertex:Qz,beginnormal_vertex:Zz,bsdfs:Kz,iridescence_fragment:_z,bumpmap_pars_fragment:$z,clipping_planes_fragment:eB,clipping_planes_pars_fragment:tB,clipping_planes_pars_vertex:nB,clipping_planes_vertex:iB,color_fragment:rB,color_pars_fragment:sB,color_pars_vertex:aB,color_vertex:oB,common:lB,cube_uv_reflection_fragment:cB,defaultnormal_vertex:uB,displacementmap_pars_vertex:dB,displacementmap_vertex:fB,emissivemap_fragment:hB,emissivemap_pars_fragment:pB,colorspace_fragment:mB,colorspace_pars_fragment:gB,envmap_fragment:AB,envmap_common_pars_fragment:vB,envmap_pars_fragment:yB,envmap_pars_vertex:bB,envmap_physical_pars_fragment:DB,envmap_vertex:xB,fog_vertex:SB,fog_pars_vertex:MB,fog_fragment:wB,fog_pars_fragment:TB,gradientmap_pars_fragment:EB,lightmap_pars_fragment:CB,lights_lambert_fragment:RB,lights_lambert_pars_fragment:PB,lights_pars_begin:kB,lights_toon_fragment:LB,lights_toon_pars_fragment:IB,lights_phong_fragment:NB,lights_phong_pars_fragment:zB,lights_physical_fragment:BB,lights_physical_pars_fragment:UB,lights_fragment_begin:FB,lights_fragment_maps:OB,lights_fragment_end:VB,lightprobes_pars_fragment:HB,logdepthbuf_fragment:GB,logdepthbuf_pars_fragment:WB,logdepthbuf_pars_vertex:jB,logdepthbuf_vertex:XB,map_fragment:qB,map_pars_fragment:YB,map_particle_fragment:JB,map_particle_pars_fragment:QB,metalnessmap_fragment:ZB,metalnessmap_pars_fragment:KB,morphinstance_vertex:_B,morphcolor_vertex:$B,morphnormal_vertex:eU,morphtarget_pars_vertex:tU,morphtarget_vertex:nU,normal_fragment_begin:iU,normal_fragment_maps:rU,normal_pars_fragment:sU,normal_pars_vertex:aU,normal_vertex:oU,normalmap_pars_fragment:lU,clearcoat_normal_fragment_begin:cU,clearcoat_normal_fragment_maps:uU,clearcoat_pars_fragment:dU,iridescence_pars_fragment:fU,opaque_fragment:hU,packing:pU,premultiplied_alpha_fragment:mU,project_vertex:gU,dithering_fragment:AU,dithering_pars_fragment:vU,roughnessmap_fragment:yU,roughnessmap_pars_fragment:bU,shadowmap_pars_fragment:xU,shadowmap_pars_vertex:SU,shadowmap_vertex:MU,shadowmask_pars_fragment:wU,skinbase_vertex:TU,skinning_pars_vertex:EU,skinning_vertex:CU,skinnormal_vertex:RU,specularmap_fragment:PU,specularmap_pars_fragment:kU,tonemapping_fragment:DU,tonemapping_pars_fragment:LU,transmission_fragment:IU,transmission_pars_fragment:NU,uv_pars_fragment:zU,uv_pars_vertex:BU,uv_vertex:UU,worldpos_vertex:FU,background_vert:OU,background_frag:VU,backgroundCube_vert:HU,backgroundCube_frag:GU,cube_vert:WU,cube_frag:jU,depth_vert:XU,depth_frag:qU,distance_vert:YU,distance_frag:JU,equirect_vert:QU,equirect_frag:ZU,linedashed_vert:KU,linedashed_frag:_U,meshbasic_vert:$U,meshbasic_frag:eF,meshlambert_vert:tF,meshlambert_frag:nF,meshmatcap_vert:iF,meshmatcap_frag:rF,meshnormal_vert:sF,meshnormal_frag:aF,meshphong_vert:oF,meshphong_frag:lF,meshphysical_vert:cF,meshphysical_frag:uF,meshtoon_vert:dF,meshtoon_frag:fF,points_vert:hF,points_frag:pF,shadow_vert:mF,shadow_frag:gF,sprite_vert:AF,sprite_frag:vF},ft={common:{diffuse:{value:new ut(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new _t}},envmap:{envMap:{value:null},envMapRotation:{value:new _t},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new _t}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new _t}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new _t},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new _t},normalScale:{value:new Oe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new _t},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new _t}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new _t}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new _t}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ut(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new J},probesMax:{value:new J},probesResolution:{value:new J}},points:{diffuse:{value:new ut(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0},uvTransform:{value:new _t}},sprite:{diffuse:{value:new ut(16777215)},opacity:{value:1},center:{value:new Oe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}}},Go={basic:{uniforms:xs([ft.common,ft.specularmap,ft.envmap,ft.aomap,ft.lightmap,ft.fog]),vertexShader:mn.meshbasic_vert,fragmentShader:mn.meshbasic_frag},lambert:{uniforms:xs([ft.common,ft.specularmap,ft.envmap,ft.aomap,ft.lightmap,ft.emissivemap,ft.bumpmap,ft.normalmap,ft.displacementmap,ft.fog,ft.lights,{emissive:{value:new ut(0)},envMapIntensity:{value:1}}]),vertexShader:mn.meshlambert_vert,fragmentShader:mn.meshlambert_frag},phong:{uniforms:xs([ft.common,ft.specularmap,ft.envmap,ft.aomap,ft.lightmap,ft.emissivemap,ft.bumpmap,ft.normalmap,ft.displacementmap,ft.fog,ft.lights,{emissive:{value:new ut(0)},specular:{value:new ut(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:mn.meshphong_vert,fragmentShader:mn.meshphong_frag},standard:{uniforms:xs([ft.common,ft.envmap,ft.aomap,ft.lightmap,ft.emissivemap,ft.bumpmap,ft.normalmap,ft.displacementmap,ft.roughnessmap,ft.metalnessmap,ft.fog,ft.lights,{emissive:{value:new ut(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag},toon:{uniforms:xs([ft.common,ft.aomap,ft.lightmap,ft.emissivemap,ft.bumpmap,ft.normalmap,ft.displacementmap,ft.gradientmap,ft.fog,ft.lights,{emissive:{value:new ut(0)}}]),vertexShader:mn.meshtoon_vert,fragmentShader:mn.meshtoon_frag},matcap:{uniforms:xs([ft.common,ft.bumpmap,ft.normalmap,ft.displacementmap,ft.fog,{matcap:{value:null}}]),vertexShader:mn.meshmatcap_vert,fragmentShader:mn.meshmatcap_frag},points:{uniforms:xs([ft.points,ft.fog]),vertexShader:mn.points_vert,fragmentShader:mn.points_frag},dashed:{uniforms:xs([ft.common,ft.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mn.linedashed_vert,fragmentShader:mn.linedashed_frag},depth:{uniforms:xs([ft.common,ft.displacementmap]),vertexShader:mn.depth_vert,fragmentShader:mn.depth_frag},normal:{uniforms:xs([ft.common,ft.bumpmap,ft.normalmap,ft.displacementmap,{opacity:{value:1}}]),vertexShader:mn.meshnormal_vert,fragmentShader:mn.meshnormal_frag},sprite:{uniforms:xs([ft.sprite,ft.fog]),vertexShader:mn.sprite_vert,fragmentShader:mn.sprite_frag},background:{uniforms:{uvTransform:{value:new _t},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mn.background_vert,fragmentShader:mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new _t}},vertexShader:mn.backgroundCube_vert,fragmentShader:mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mn.cube_vert,fragmentShader:mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mn.equirect_vert,fragmentShader:mn.equirect_frag},distance:{uniforms:xs([ft.common,ft.displacementmap,{referencePosition:{value:new J},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mn.distance_vert,fragmentShader:mn.distance_frag},shadow:{uniforms:xs([ft.lights,ft.fog,{color:{value:new ut(0)},opacity:{value:1}}]),vertexShader:mn.shadow_vert,fragmentShader:mn.shadow_frag}};Go.physical={uniforms:xs([Go.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new _t},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new _t},clearcoatNormalScale:{value:new Oe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new _t},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new _t},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new _t},sheen:{value:0},sheenColor:{value:new ut(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new _t},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new _t},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new _t},transmissionSamplerSize:{value:new Oe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new _t},attenuationDistance:{value:0},attenuationColor:{value:new ut(0)},specularColor:{value:new ut(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new _t},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new _t},anisotropyVector:{value:new Oe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new _t}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag};const mb={r:0,b:0,g:0},yF=new Zt,YR=new _t;YR.set(-1,0,0,0,1,0,0,0,1);function bF(s,e,t,i,a,c){const d=new ut(0);let f=a===!0?0:1,m,g,v=null,M=0,x=null;function S(D){let z=D.isScene===!0?D.background:null;if(z&&z.isTexture){const L=D.backgroundBlurriness>0;z=e.get(z,L)}return z}function w(D){let z=!1;const L=S(D);L===null?C(d,f):L&&L.isColor&&(C(L,1),z=!0);const O=s.xr.getEnvironmentBlendMode();O==="additive"?t.buffers.color.setClear(0,0,0,1,c):O==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,c),(s.autoClear||z)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function k(D,z){const L=S(z);L&&(L.isCubeTexture||L.mapping===Bm)?(g===void 0&&(g=new or(new Yf(1,1,1),new Pa({name:"BackgroundCubeMaterial",uniforms:Im(Go.backgroundCube.uniforms),vertexShader:Go.backgroundCube.vertexShader,fragmentShader:Go.backgroundCube.fragmentShader,side:Ts,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),g.geometry.deleteAttribute("normal"),g.geometry.deleteAttribute("uv"),g.onBeforeRender=function(O,U,H){this.matrixWorld.copyPosition(H.matrixWorld)},Object.defineProperty(g.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(g)),g.material.uniforms.envMap.value=L,g.material.uniforms.backgroundBlurriness.value=z.backgroundBlurriness,g.material.uniforms.backgroundIntensity.value=z.backgroundIntensity,g.material.uniforms.backgroundRotation.value.setFromMatrix4(yF.makeRotationFromEuler(z.backgroundRotation)).transpose(),L.isCubeTexture&&L.isRenderTargetTexture===!1&&g.material.uniforms.backgroundRotation.value.premultiply(YR),g.material.toneMapped=wn.getTransfer(L.colorSpace)!==_n,(v!==L||M!==L.version||x!==s.toneMapping)&&(g.material.needsUpdate=!0,v=L,M=L.version,x=s.toneMapping),g.layers.enableAll(),D.unshift(g,g.geometry,g.material,0,0,null)):L&&L.isTexture&&(m===void 0&&(m=new or(new Fm(2,2),new Pa({name:"BackgroundMaterial",uniforms:Im(Go.background.uniforms),vertexShader:Go.background.vertexShader,fragmentShader:Go.background.fragmentShader,side:kc,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),m.geometry.deleteAttribute("normal"),Object.defineProperty(m.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(m)),m.material.uniforms.t2D.value=L,m.material.uniforms.backgroundIntensity.value=z.backgroundIntensity,m.material.toneMapped=wn.getTransfer(L.colorSpace)!==_n,L.matrixAutoUpdate===!0&&L.updateMatrix(),m.material.uniforms.uvTransform.value.copy(L.matrix),(v!==L||M!==L.version||x!==s.toneMapping)&&(m.material.needsUpdate=!0,v=L,M=L.version,x=s.toneMapping),m.layers.enableAll(),D.unshift(m,m.geometry,m.material,0,0,null))}function C(D,z){D.getRGB(mb,uR(s)),t.buffers.color.setClear(mb.r,mb.g,mb.b,z,c)}function T(){g!==void 0&&(g.geometry.dispose(),g.material.dispose(),g=void 0),m!==void 0&&(m.geometry.dispose(),m.material.dispose(),m=void 0)}return{getClearColor:function(){return d},setClearColor:function(D,z=1){d.set(D),f=z,C(d,f)},getClearAlpha:function(){return f},setClearAlpha:function(D){f=D,C(d,f)},render:w,addToRenderList:k,dispose:T}}function xF(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),i={},a=x(null);let c=a,d=!1;function f(X,_,K,le,$){let j=!1;const Q=M(X,le,K,_);c!==Q&&(c=Q,g(c.object)),j=S(X,le,K,$),j&&w(X,le,K,$),$!==null&&e.update($,s.ELEMENT_ARRAY_BUFFER),(j||d)&&(d=!1,L(X,_,K,le),$!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get($).buffer))}function m(){return s.createVertexArray()}function g(X){return s.bindVertexArray(X)}function v(X){return s.deleteVertexArray(X)}function M(X,_,K,le){const $=le.wireframe===!0;let j=i[_.id];j===void 0&&(j={},i[_.id]=j);const Q=X.isInstancedMesh===!0?X.id:0;let ne=j[Q];ne===void 0&&(ne={},j[Q]=ne);let ce=ne[K.id];ce===void 0&&(ce={},ne[K.id]=ce);let ye=ce[$];return ye===void 0&&(ye=x(m()),ce[$]=ye),ye}function x(X){const _=[],K=[],le=[];for(let $=0;$<t;$++)_[$]=0,K[$]=0,le[$]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:_,enabledAttributes:K,attributeDivisors:le,object:X,attributes:{},index:null}}function S(X,_,K,le){const $=c.attributes,j=_.attributes;let Q=0;const ne=K.getAttributes();for(const ce in ne)if(ne[ce].location>=0){const Te=$[ce];let Fe=j[ce];if(Fe===void 0&&(ce==="instanceMatrix"&&X.instanceMatrix&&(Fe=X.instanceMatrix),ce==="instanceColor"&&X.instanceColor&&(Fe=X.instanceColor)),Te===void 0||Te.attribute!==Fe||Fe&&Te.data!==Fe.data)return!0;Q++}return c.attributesNum!==Q||c.index!==le}function w(X,_,K,le){const $={},j=_.attributes;let Q=0;const ne=K.getAttributes();for(const ce in ne)if(ne[ce].location>=0){let Te=j[ce];Te===void 0&&(ce==="instanceMatrix"&&X.instanceMatrix&&(Te=X.instanceMatrix),ce==="instanceColor"&&X.instanceColor&&(Te=X.instanceColor));const Fe={};Fe.attribute=Te,Te&&Te.data&&(Fe.data=Te.data),$[ce]=Fe,Q++}c.attributes=$,c.attributesNum=Q,c.index=le}function k(){const X=c.newAttributes;for(let _=0,K=X.length;_<K;_++)X[_]=0}function C(X){T(X,0)}function T(X,_){const K=c.newAttributes,le=c.enabledAttributes,$=c.attributeDivisors;K[X]=1,le[X]===0&&(s.enableVertexAttribArray(X),le[X]=1),$[X]!==_&&(s.vertexAttribDivisor(X,_),$[X]=_)}function D(){const X=c.newAttributes,_=c.enabledAttributes;for(let K=0,le=_.length;K<le;K++)_[K]!==X[K]&&(s.disableVertexAttribArray(K),_[K]=0)}function z(X,_,K,le,$,j,Q){Q===!0?s.vertexAttribIPointer(X,_,K,$,j):s.vertexAttribPointer(X,_,K,le,$,j)}function L(X,_,K,le){k();const $=le.attributes,j=K.getAttributes(),Q=_.defaultAttributeValues;for(const ne in j){const ce=j[ne];if(ce.location>=0){let ye=$[ne];if(ye===void 0&&(ne==="instanceMatrix"&&X.instanceMatrix&&(ye=X.instanceMatrix),ne==="instanceColor"&&X.instanceColor&&(ye=X.instanceColor)),ye!==void 0){const Te=ye.normalized,Fe=ye.itemSize,lt=e.get(ye);if(lt===void 0)continue;const ht=lt.buffer,ct=lt.type,Pe=lt.bytesPerElement,Xe=ct===s.INT||ct===s.UNSIGNED_INT||ye.gpuType===Rx;if(ye.isInterleavedBufferAttribute){const He=ye.data,pt=He.stride,Nt=ye.offset;if(He.isInstancedInterleavedBuffer){for(let nt=0;nt<ce.locationSize;nt++)T(ce.location+nt,He.meshPerAttribute);X.isInstancedMesh!==!0&&le._maxInstanceCount===void 0&&(le._maxInstanceCount=He.meshPerAttribute*He.count)}else for(let nt=0;nt<ce.locationSize;nt++)C(ce.location+nt);s.bindBuffer(s.ARRAY_BUFFER,ht);for(let nt=0;nt<ce.locationSize;nt++)z(ce.location+nt,Fe/ce.locationSize,ct,Te,pt*Pe,(Nt+Fe/ce.locationSize*nt)*Pe,Xe)}else{if(ye.isInstancedBufferAttribute){for(let He=0;He<ce.locationSize;He++)T(ce.location+He,ye.meshPerAttribute);X.isInstancedMesh!==!0&&le._maxInstanceCount===void 0&&(le._maxInstanceCount=ye.meshPerAttribute*ye.count)}else for(let He=0;He<ce.locationSize;He++)C(ce.location+He);s.bindBuffer(s.ARRAY_BUFFER,ht);for(let He=0;He<ce.locationSize;He++)z(ce.location+He,Fe/ce.locationSize,ct,Te,Fe*Pe,Fe/ce.locationSize*He*Pe,Xe)}}else if(Q!==void 0){const Te=Q[ne];if(Te!==void 0)switch(Te.length){case 2:s.vertexAttrib2fv(ce.location,Te);break;case 3:s.vertexAttrib3fv(ce.location,Te);break;case 4:s.vertexAttrib4fv(ce.location,Te);break;default:s.vertexAttrib1fv(ce.location,Te)}}}}D()}function O(){F();for(const X in i){const _=i[X];for(const K in _){const le=_[K];for(const $ in le){const j=le[$];for(const Q in j)v(j[Q].object),delete j[Q];delete le[$]}}delete i[X]}}function U(X){if(i[X.id]===void 0)return;const _=i[X.id];for(const K in _){const le=_[K];for(const $ in le){const j=le[$];for(const Q in j)v(j[Q].object),delete j[Q];delete le[$]}}delete i[X.id]}function H(X){for(const _ in i){const K=i[_];for(const le in K){const $=K[le];if($[X.id]===void 0)continue;const j=$[X.id];for(const Q in j)v(j[Q].object),delete j[Q];delete $[X.id]}}}function I(X){for(const _ in i){const K=i[_],le=X.isInstancedMesh===!0?X.id:0,$=K[le];if($!==void 0){for(const j in $){const Q=$[j];for(const ne in Q)v(Q[ne].object),delete Q[ne];delete $[j]}delete K[le],Object.keys(K).length===0&&delete i[_]}}}function F(){V(),d=!0,c!==a&&(c=a,g(c.object))}function V(){a.geometry=null,a.program=null,a.wireframe=!1}return{setup:f,reset:F,resetDefaultState:V,dispose:O,releaseStatesOfGeometry:U,releaseStatesOfObject:I,releaseStatesOfProgram:H,initAttributes:k,enableAttribute:C,disableUnusedAttributes:D}}function SF(s,e,t){let i;function a(m){i=m}function c(m,g){s.drawArrays(i,m,g),t.update(g,i,1)}function d(m,g,v){v!==0&&(s.drawArraysInstanced(i,m,g,v),t.update(g,i,v))}function f(m,g,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,m,0,g,0,v);let x=0;for(let S=0;S<v;S++)x+=g[S];t.update(x,i,1)}this.setMode=a,this.render=c,this.renderInstances=d,this.renderMultiDraw=f}function MF(s,e,t,i){let a;function c(){if(a!==void 0)return a;if(e.has("EXT_texture_filter_anisotropic")===!0){const H=e.get("EXT_texture_filter_anisotropic");a=s.getParameter(H.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else a=0;return a}function d(H){return!(H!==as&&i.convert(H)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function f(H){const I=H===Ll&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(H!==Ss&&i.convert(H)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&H!==ws&&!I)}function m(H){if(H==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";H="mediump"}return H==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let g=t.precision!==void 0?t.precision:"highp";const v=m(g);v!==g&&(ot("WebGLRenderer:",g,"not supported, using",v,"instead."),g=v);const M=t.logarithmicDepthBuffer===!0,x=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control");t.reversedDepthBuffer===!0&&x===!1&&ot("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");const S=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),w=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),k=s.getParameter(s.MAX_TEXTURE_SIZE),C=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),T=s.getParameter(s.MAX_VERTEX_ATTRIBS),D=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),z=s.getParameter(s.MAX_VARYING_VECTORS),L=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),O=s.getParameter(s.MAX_SAMPLES),U=s.getParameter(s.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:c,getMaxPrecision:m,textureFormatReadable:d,textureTypeReadable:f,precision:g,logarithmicDepthBuffer:M,reversedDepthBuffer:x,maxTextures:S,maxVertexTextures:w,maxTextureSize:k,maxCubemapSize:C,maxAttributes:T,maxVertexUniforms:D,maxVaryings:z,maxFragmentUniforms:L,maxSamples:O,samples:U}}function wF(s){const e=this;let t=null,i=0,a=!1,c=!1;const d=new Ou,f=new _t,m={value:null,needsUpdate:!1};this.uniform=m,this.numPlanes=0,this.numIntersection=0,this.init=function(M,x){const S=M.length!==0||x||i!==0||a;return a=x,i=M.length,S},this.beginShadows=function(){c=!0,v(null)},this.endShadows=function(){c=!1},this.setGlobalState=function(M,x){t=v(M,x,0)},this.setState=function(M,x,S){const w=M.clippingPlanes,k=M.clipIntersection,C=M.clipShadows,T=s.get(M);if(!a||w===null||w.length===0||c&&!C)c?v(null):g();else{const D=c?0:i,z=D*4;let L=T.clippingState||null;m.value=L,L=v(w,x,z,S);for(let O=0;O!==z;++O)L[O]=t[O];T.clippingState=L,this.numIntersection=k?this.numPlanes:0,this.numPlanes+=D}};function g(){m.value!==t&&(m.value=t,m.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function v(M,x,S,w){const k=M!==null?M.length:0;let C=null;if(k!==0){if(C=m.value,w!==!0||C===null){const T=S+k*4,D=x.matrixWorldInverse;f.getNormalMatrix(D),(C===null||C.length<T)&&(C=new Float32Array(T));for(let z=0,L=S;z!==k;++z,L+=4)d.copy(M[z]).applyMatrix4(D,f),d.normal.toArray(C,L),C[L+3]=d.constant}m.value=C,m.needsUpdate=!0}return e.numPlanes=k,e.numIntersection=0,C}}const ju=4,n2=[.125,.215,.35,.446,.526,.582],Lf=20,TF=256,WA=new Vm,i2=new ut;let aw=null,ow=0,lw=0,cw=!1;const EF=new J;class jw{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,i=.1,a=100,c={}){const{size:d=256,position:f=EF}=c;aw=this._renderer.getRenderTarget(),ow=this._renderer.getActiveCubeFace(),lw=this._renderer.getActiveMipmapLevel(),cw=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(d);const m=this._allocateTargets();return m.depthBuffer=!0,this._sceneToCubeUV(e,i,a,m,f),t>0&&this._blur(m,0,0,t),this._applyPMREM(m),this._cleanup(m),m}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=a2(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=s2(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(aw,ow,lw),this._renderer.xr.enabled=cw,e.scissorTest=!1,Am(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Dl||e.mapping===qu?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),aw=this._renderer.getRenderTarget(),ow=this._renderer.getActiveCubeFace(),lw=this._renderer.getActiveMipmapLevel(),cw=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:mi,minFilter:mi,generateMipmaps:!1,type:Ll,format:as,colorSpace:Rm,depthBuffer:!1},a=r2(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=r2(e,t,i);const{_lodMax:c}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=CF(c)),this._blurMaterial=PF(c,e,t),this._ggxMaterial=RF(c,e,t)}return a}_compileMaterial(e){const t=new or(new rn,e);this._renderer.compile(t,WA)}_sceneToCubeUV(e,t,i,a,c){const m=new kr(90,1,t,i),g=[1,-1,1,1,1,1],v=[1,1,1,-1,-1,-1],M=this._renderer,x=M.autoClear,S=M.toneMapping;M.getClearColor(i2),M.toneMapping=so,M.autoClear=!1,M.state.buffers.depth.getReversed()&&(M.setRenderTarget(a),M.clearDepth(),M.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new or(new Yf,new Ku({name:"PMREM.Background",side:Ts,depthWrite:!1,depthTest:!1})));const k=this._backgroundBox,C=k.material;let T=!1;const D=e.background;D?D.isColor&&(C.color.copy(D),e.background=null,T=!0):(C.color.copy(i2),T=!0);for(let z=0;z<6;z++){const L=z%3;L===0?(m.up.set(0,g[z],0),m.position.set(c.x,c.y,c.z),m.lookAt(c.x+v[z],c.y,c.z)):L===1?(m.up.set(0,0,g[z]),m.position.set(c.x,c.y,c.z),m.lookAt(c.x,c.y+v[z],c.z)):(m.up.set(0,g[z],0),m.position.set(c.x,c.y,c.z),m.lookAt(c.x,c.y,c.z+v[z]));const O=this._cubeSize;Am(a,L*O,z>2?O:0,O,O),M.setRenderTarget(a),T&&M.render(k,m),M.render(e,m)}M.toneMapping=S,M.autoClear=x,e.background=D}_textureToCubeUV(e,t){const i=this._renderer,a=e.mapping===Dl||e.mapping===qu;a?(this._cubemapMaterial===null&&(this._cubemapMaterial=a2()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=s2());const c=a?this._cubemapMaterial:this._equirectMaterial,d=this._lodMeshes[0];d.material=c;const f=c.uniforms;f.envMap.value=e;const m=this._cubeSize;Am(t,0,0,3*m,2*m),i.setRenderTarget(t),i.render(d,WA)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const a=this._lodMeshes.length;for(let c=1;c<a;c++)this._applyGGXFilter(e,c-1,c);t.autoClear=i}_applyGGXFilter(e,t,i){const a=this._renderer,c=this._pingPongRenderTarget,d=this._ggxMaterial,f=this._lodMeshes[i];f.material=d;const m=d.uniforms,g=i/(this._lodMeshes.length-1),v=t/(this._lodMeshes.length-1),M=Math.sqrt(g*g-v*v),x=0+g*1.25,S=M*x,{_lodMax:w}=this,k=this._sizeLods[i],C=3*k*(i>w-ju?i-w+ju:0),T=4*(this._cubeSize-k);m.envMap.value=e.texture,m.roughness.value=S,m.mipInt.value=w-t,Am(c,C,T,3*k,2*k),a.setRenderTarget(c),a.render(f,WA),m.envMap.value=c.texture,m.roughness.value=0,m.mipInt.value=w-i,Am(e,C,T,3*k,2*k),a.setRenderTarget(e),a.render(f,WA)}_blur(e,t,i,a,c){const d=this._pingPongRenderTarget;this._halfBlur(e,d,t,i,a,"latitudinal",c),this._halfBlur(d,e,i,i,a,"longitudinal",c)}_halfBlur(e,t,i,a,c,d,f){const m=this._renderer,g=this._blurMaterial;d!=="latitudinal"&&d!=="longitudinal"&&kt("blur direction must be either latitudinal or longitudinal!");const v=3,M=this._lodMeshes[a];M.material=g;const x=g.uniforms,S=this._sizeLods[i]-1,w=isFinite(c)?Math.PI/(2*S):2*Math.PI/(2*Lf-1),k=c/w,C=isFinite(c)?1+Math.floor(v*k):Lf;C>Lf&&ot(`sigmaRadians, ${c}, is too large and will clip, as it requested ${C} samples when the maximum is set to ${Lf}`);const T=[];let D=0;for(let H=0;H<Lf;++H){const I=H/k,F=Math.exp(-I*I/2);T.push(F),H===0?D+=F:H<C&&(D+=2*F)}for(let H=0;H<T.length;H++)T[H]=T[H]/D;x.envMap.value=e.texture,x.samples.value=C,x.weights.value=T,x.latitudinal.value=d==="latitudinal",f&&(x.poleAxis.value=f);const{_lodMax:z}=this;x.dTheta.value=w,x.mipInt.value=z-i;const L=this._sizeLods[a],O=3*L*(a>z-ju?a-z+ju:0),U=4*(this._cubeSize-L);Am(t,O,U,3*L,2*L),m.setRenderTarget(t),m.render(M,WA)}}function CF(s){const e=[],t=[],i=[];let a=s;const c=s-ju+1+n2.length;for(let d=0;d<c;d++){const f=Math.pow(2,a);e.push(f);let m=1/f;d>s-ju?m=n2[d-s+ju-1]:d===0&&(m=0),t.push(m);const g=1/(f-2),v=-g,M=1+g,x=[v,v,M,v,M,M,v,v,M,M,v,M],S=6,w=6,k=3,C=2,T=1,D=new Float32Array(k*w*S),z=new Float32Array(C*w*S),L=new Float32Array(T*w*S);for(let U=0;U<S;U++){const H=U%3*2/3-1,I=U>2?0:-1,F=[H,I,0,H+2/3,I,0,H+2/3,I+1,0,H,I,0,H+2/3,I+1,0,H,I+1,0];D.set(F,k*w*U),z.set(x,C*w*U);const V=[U,U,U,U,U,U];L.set(V,T*w*U)}const O=new rn;O.setAttribute("position",new si(D,k)),O.setAttribute("uv",new si(z,C)),O.setAttribute("faceIndex",new si(L,T)),i.push(new or(O,null)),a>ju&&a--}return{lodMeshes:i,sizeLods:e,sigmas:t}}function r2(s,e,t){const i=new Ra(s,e,t);return i.texture.mapping=Bm,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Am(s,e,t,i,a){s.viewport.set(e,t,i,a),s.scissor.set(e,t,i,a)}function RF(s,e,t){return new Pa({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:TF,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:lS(),fragmentShader:`
|
|
3784
|
+
}`,mn={alphahash_fragment:Oz,alphahash_pars_fragment:Vz,alphamap_fragment:Hz,alphamap_pars_fragment:Gz,alphatest_fragment:Wz,alphatest_pars_fragment:jz,aomap_fragment:Xz,aomap_pars_fragment:qz,batching_pars_vertex:Yz,batching_vertex:Jz,begin_vertex:Qz,beginnormal_vertex:Zz,bsdfs:Kz,iridescence_fragment:_z,bumpmap_pars_fragment:$z,clipping_planes_fragment:eB,clipping_planes_pars_fragment:tB,clipping_planes_pars_vertex:nB,clipping_planes_vertex:iB,color_fragment:rB,color_pars_fragment:sB,color_pars_vertex:aB,color_vertex:oB,common:lB,cube_uv_reflection_fragment:cB,defaultnormal_vertex:uB,displacementmap_pars_vertex:dB,displacementmap_vertex:fB,emissivemap_fragment:hB,emissivemap_pars_fragment:pB,colorspace_fragment:mB,colorspace_pars_fragment:gB,envmap_fragment:AB,envmap_common_pars_fragment:vB,envmap_pars_fragment:yB,envmap_pars_vertex:bB,envmap_physical_pars_fragment:DB,envmap_vertex:xB,fog_vertex:SB,fog_pars_vertex:MB,fog_fragment:wB,fog_pars_fragment:TB,gradientmap_pars_fragment:EB,lightmap_pars_fragment:CB,lights_lambert_fragment:RB,lights_lambert_pars_fragment:PB,lights_pars_begin:kB,lights_toon_fragment:LB,lights_toon_pars_fragment:IB,lights_phong_fragment:NB,lights_phong_pars_fragment:zB,lights_physical_fragment:BB,lights_physical_pars_fragment:UB,lights_fragment_begin:FB,lights_fragment_maps:OB,lights_fragment_end:VB,lightprobes_pars_fragment:HB,logdepthbuf_fragment:GB,logdepthbuf_pars_fragment:WB,logdepthbuf_pars_vertex:jB,logdepthbuf_vertex:XB,map_fragment:qB,map_pars_fragment:YB,map_particle_fragment:JB,map_particle_pars_fragment:QB,metalnessmap_fragment:ZB,metalnessmap_pars_fragment:KB,morphinstance_vertex:_B,morphcolor_vertex:$B,morphnormal_vertex:eU,morphtarget_pars_vertex:tU,morphtarget_vertex:nU,normal_fragment_begin:iU,normal_fragment_maps:rU,normal_pars_fragment:sU,normal_pars_vertex:aU,normal_vertex:oU,normalmap_pars_fragment:lU,clearcoat_normal_fragment_begin:cU,clearcoat_normal_fragment_maps:uU,clearcoat_pars_fragment:dU,iridescence_pars_fragment:fU,opaque_fragment:hU,packing:pU,premultiplied_alpha_fragment:mU,project_vertex:gU,dithering_fragment:AU,dithering_pars_fragment:vU,roughnessmap_fragment:yU,roughnessmap_pars_fragment:bU,shadowmap_pars_fragment:xU,shadowmap_pars_vertex:SU,shadowmap_vertex:MU,shadowmask_pars_fragment:wU,skinbase_vertex:TU,skinning_pars_vertex:EU,skinning_vertex:CU,skinnormal_vertex:RU,specularmap_fragment:PU,specularmap_pars_fragment:kU,tonemapping_fragment:DU,tonemapping_pars_fragment:LU,transmission_fragment:IU,transmission_pars_fragment:NU,uv_pars_fragment:zU,uv_pars_vertex:BU,uv_vertex:UU,worldpos_vertex:FU,background_vert:OU,background_frag:VU,backgroundCube_vert:HU,backgroundCube_frag:GU,cube_vert:WU,cube_frag:jU,depth_vert:XU,depth_frag:qU,distance_vert:YU,distance_frag:JU,equirect_vert:QU,equirect_frag:ZU,linedashed_vert:KU,linedashed_frag:_U,meshbasic_vert:$U,meshbasic_frag:eF,meshlambert_vert:tF,meshlambert_frag:nF,meshmatcap_vert:iF,meshmatcap_frag:rF,meshnormal_vert:sF,meshnormal_frag:aF,meshphong_vert:oF,meshphong_frag:lF,meshphysical_vert:cF,meshphysical_frag:uF,meshtoon_vert:dF,meshtoon_frag:fF,points_vert:hF,points_frag:pF,shadow_vert:mF,shadow_frag:gF,sprite_vert:AF,sprite_frag:vF},ht={common:{diffuse:{value:new ut(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new _t}},envmap:{envMap:{value:null},envMapRotation:{value:new _t},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new _t}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new _t}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new _t},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new _t},normalScale:{value:new Oe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new _t},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new _t}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new _t}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new _t}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ut(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new J},probesMax:{value:new J},probesResolution:{value:new J}},points:{diffuse:{value:new ut(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0},uvTransform:{value:new _t}},sprite:{diffuse:{value:new ut(16777215)},opacity:{value:1},center:{value:new Oe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}}},Go={basic:{uniforms:xs([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.fog]),vertexShader:mn.meshbasic_vert,fragmentShader:mn.meshbasic_frag},lambert:{uniforms:xs([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new ut(0)},envMapIntensity:{value:1}}]),vertexShader:mn.meshlambert_vert,fragmentShader:mn.meshlambert_frag},phong:{uniforms:xs([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new ut(0)},specular:{value:new ut(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:mn.meshphong_vert,fragmentShader:mn.meshphong_frag},standard:{uniforms:xs([ht.common,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.roughnessmap,ht.metalnessmap,ht.fog,ht.lights,{emissive:{value:new ut(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag},toon:{uniforms:xs([ht.common,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.gradientmap,ht.fog,ht.lights,{emissive:{value:new ut(0)}}]),vertexShader:mn.meshtoon_vert,fragmentShader:mn.meshtoon_frag},matcap:{uniforms:xs([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,{matcap:{value:null}}]),vertexShader:mn.meshmatcap_vert,fragmentShader:mn.meshmatcap_frag},points:{uniforms:xs([ht.points,ht.fog]),vertexShader:mn.points_vert,fragmentShader:mn.points_frag},dashed:{uniforms:xs([ht.common,ht.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mn.linedashed_vert,fragmentShader:mn.linedashed_frag},depth:{uniforms:xs([ht.common,ht.displacementmap]),vertexShader:mn.depth_vert,fragmentShader:mn.depth_frag},normal:{uniforms:xs([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,{opacity:{value:1}}]),vertexShader:mn.meshnormal_vert,fragmentShader:mn.meshnormal_frag},sprite:{uniforms:xs([ht.sprite,ht.fog]),vertexShader:mn.sprite_vert,fragmentShader:mn.sprite_frag},background:{uniforms:{uvTransform:{value:new _t},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mn.background_vert,fragmentShader:mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new _t}},vertexShader:mn.backgroundCube_vert,fragmentShader:mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mn.cube_vert,fragmentShader:mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mn.equirect_vert,fragmentShader:mn.equirect_frag},distance:{uniforms:xs([ht.common,ht.displacementmap,{referencePosition:{value:new J},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mn.distance_vert,fragmentShader:mn.distance_frag},shadow:{uniforms:xs([ht.lights,ht.fog,{color:{value:new ut(0)},opacity:{value:1}}]),vertexShader:mn.shadow_vert,fragmentShader:mn.shadow_frag}};Go.physical={uniforms:xs([Go.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new _t},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new _t},clearcoatNormalScale:{value:new Oe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new _t},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new _t},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new _t},sheen:{value:0},sheenColor:{value:new ut(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new _t},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new _t},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new _t},transmissionSamplerSize:{value:new Oe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new _t},attenuationDistance:{value:0},attenuationColor:{value:new ut(0)},specularColor:{value:new ut(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new _t},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new _t},anisotropyVector:{value:new Oe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new _t}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag};const mb={r:0,b:0,g:0},yF=new Zt,YR=new _t;YR.set(-1,0,0,0,1,0,0,0,1);function bF(s,e,t,i,a,c){const d=new ut(0);let f=a===!0?0:1,m,g,v=null,M=0,x=null;function S(D){let z=D.isScene===!0?D.background:null;if(z&&z.isTexture){const L=D.backgroundBlurriness>0;z=e.get(z,L)}return z}function w(D){let z=!1;const L=S(D);L===null?C(d,f):L&&L.isColor&&(C(L,1),z=!0);const O=s.xr.getEnvironmentBlendMode();O==="additive"?t.buffers.color.setClear(0,0,0,1,c):O==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,c),(s.autoClear||z)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function k(D,z){const L=S(z);L&&(L.isCubeTexture||L.mapping===Bm)?(g===void 0&&(g=new or(new Yf(1,1,1),new Pa({name:"BackgroundCubeMaterial",uniforms:Im(Go.backgroundCube.uniforms),vertexShader:Go.backgroundCube.vertexShader,fragmentShader:Go.backgroundCube.fragmentShader,side:Ts,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),g.geometry.deleteAttribute("normal"),g.geometry.deleteAttribute("uv"),g.onBeforeRender=function(O,U,H){this.matrixWorld.copyPosition(H.matrixWorld)},Object.defineProperty(g.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(g)),g.material.uniforms.envMap.value=L,g.material.uniforms.backgroundBlurriness.value=z.backgroundBlurriness,g.material.uniforms.backgroundIntensity.value=z.backgroundIntensity,g.material.uniforms.backgroundRotation.value.setFromMatrix4(yF.makeRotationFromEuler(z.backgroundRotation)).transpose(),L.isCubeTexture&&L.isRenderTargetTexture===!1&&g.material.uniforms.backgroundRotation.value.premultiply(YR),g.material.toneMapped=wn.getTransfer(L.colorSpace)!==_n,(v!==L||M!==L.version||x!==s.toneMapping)&&(g.material.needsUpdate=!0,v=L,M=L.version,x=s.toneMapping),g.layers.enableAll(),D.unshift(g,g.geometry,g.material,0,0,null)):L&&L.isTexture&&(m===void 0&&(m=new or(new Fm(2,2),new Pa({name:"BackgroundMaterial",uniforms:Im(Go.background.uniforms),vertexShader:Go.background.vertexShader,fragmentShader:Go.background.fragmentShader,side:kc,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),m.geometry.deleteAttribute("normal"),Object.defineProperty(m.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(m)),m.material.uniforms.t2D.value=L,m.material.uniforms.backgroundIntensity.value=z.backgroundIntensity,m.material.toneMapped=wn.getTransfer(L.colorSpace)!==_n,L.matrixAutoUpdate===!0&&L.updateMatrix(),m.material.uniforms.uvTransform.value.copy(L.matrix),(v!==L||M!==L.version||x!==s.toneMapping)&&(m.material.needsUpdate=!0,v=L,M=L.version,x=s.toneMapping),m.layers.enableAll(),D.unshift(m,m.geometry,m.material,0,0,null))}function C(D,z){D.getRGB(mb,uR(s)),t.buffers.color.setClear(mb.r,mb.g,mb.b,z,c)}function T(){g!==void 0&&(g.geometry.dispose(),g.material.dispose(),g=void 0),m!==void 0&&(m.geometry.dispose(),m.material.dispose(),m=void 0)}return{getClearColor:function(){return d},setClearColor:function(D,z=1){d.set(D),f=z,C(d,f)},getClearAlpha:function(){return f},setClearAlpha:function(D){f=D,C(d,f)},render:w,addToRenderList:k,dispose:T}}function xF(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),i={},a=x(null);let c=a,d=!1;function f(X,_,K,le,$){let j=!1;const Q=M(X,le,K,_);c!==Q&&(c=Q,g(c.object)),j=S(X,le,K,$),j&&w(X,le,K,$),$!==null&&e.update($,s.ELEMENT_ARRAY_BUFFER),(j||d)&&(d=!1,L(X,_,K,le),$!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get($).buffer))}function m(){return s.createVertexArray()}function g(X){return s.bindVertexArray(X)}function v(X){return s.deleteVertexArray(X)}function M(X,_,K,le){const $=le.wireframe===!0;let j=i[_.id];j===void 0&&(j={},i[_.id]=j);const Q=X.isInstancedMesh===!0?X.id:0;let ne=j[Q];ne===void 0&&(ne={},j[Q]=ne);let ce=ne[K.id];ce===void 0&&(ce={},ne[K.id]=ce);let ye=ce[$];return ye===void 0&&(ye=x(m()),ce[$]=ye),ye}function x(X){const _=[],K=[],le=[];for(let $=0;$<t;$++)_[$]=0,K[$]=0,le[$]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:_,enabledAttributes:K,attributeDivisors:le,object:X,attributes:{},index:null}}function S(X,_,K,le){const $=c.attributes,j=_.attributes;let Q=0;const ne=K.getAttributes();for(const ce in ne)if(ne[ce].location>=0){const Te=$[ce];let Fe=j[ce];if(Fe===void 0&&(ce==="instanceMatrix"&&X.instanceMatrix&&(Fe=X.instanceMatrix),ce==="instanceColor"&&X.instanceColor&&(Fe=X.instanceColor)),Te===void 0||Te.attribute!==Fe||Fe&&Te.data!==Fe.data)return!0;Q++}return c.attributesNum!==Q||c.index!==le}function w(X,_,K,le){const $={},j=_.attributes;let Q=0;const ne=K.getAttributes();for(const ce in ne)if(ne[ce].location>=0){let Te=j[ce];Te===void 0&&(ce==="instanceMatrix"&&X.instanceMatrix&&(Te=X.instanceMatrix),ce==="instanceColor"&&X.instanceColor&&(Te=X.instanceColor));const Fe={};Fe.attribute=Te,Te&&Te.data&&(Fe.data=Te.data),$[ce]=Fe,Q++}c.attributes=$,c.attributesNum=Q,c.index=le}function k(){const X=c.newAttributes;for(let _=0,K=X.length;_<K;_++)X[_]=0}function C(X){T(X,0)}function T(X,_){const K=c.newAttributes,le=c.enabledAttributes,$=c.attributeDivisors;K[X]=1,le[X]===0&&(s.enableVertexAttribArray(X),le[X]=1),$[X]!==_&&(s.vertexAttribDivisor(X,_),$[X]=_)}function D(){const X=c.newAttributes,_=c.enabledAttributes;for(let K=0,le=_.length;K<le;K++)_[K]!==X[K]&&(s.disableVertexAttribArray(K),_[K]=0)}function z(X,_,K,le,$,j,Q){Q===!0?s.vertexAttribIPointer(X,_,K,$,j):s.vertexAttribPointer(X,_,K,le,$,j)}function L(X,_,K,le){k();const $=le.attributes,j=K.getAttributes(),Q=_.defaultAttributeValues;for(const ne in j){const ce=j[ne];if(ce.location>=0){let ye=$[ne];if(ye===void 0&&(ne==="instanceMatrix"&&X.instanceMatrix&&(ye=X.instanceMatrix),ne==="instanceColor"&&X.instanceColor&&(ye=X.instanceColor)),ye!==void 0){const Te=ye.normalized,Fe=ye.itemSize,ft=e.get(ye);if(ft===void 0)continue;const lt=ft.buffer,ct=ft.type,Pe=ft.bytesPerElement,qe=ct===s.INT||ct===s.UNSIGNED_INT||ye.gpuType===Rx;if(ye.isInterleavedBufferAttribute){const He=ye.data,pt=He.stride,Nt=ye.offset;if(He.isInstancedInterleavedBuffer){for(let nt=0;nt<ce.locationSize;nt++)T(ce.location+nt,He.meshPerAttribute);X.isInstancedMesh!==!0&&le._maxInstanceCount===void 0&&(le._maxInstanceCount=He.meshPerAttribute*He.count)}else for(let nt=0;nt<ce.locationSize;nt++)C(ce.location+nt);s.bindBuffer(s.ARRAY_BUFFER,lt);for(let nt=0;nt<ce.locationSize;nt++)z(ce.location+nt,Fe/ce.locationSize,ct,Te,pt*Pe,(Nt+Fe/ce.locationSize*nt)*Pe,qe)}else{if(ye.isInstancedBufferAttribute){for(let He=0;He<ce.locationSize;He++)T(ce.location+He,ye.meshPerAttribute);X.isInstancedMesh!==!0&&le._maxInstanceCount===void 0&&(le._maxInstanceCount=ye.meshPerAttribute*ye.count)}else for(let He=0;He<ce.locationSize;He++)C(ce.location+He);s.bindBuffer(s.ARRAY_BUFFER,lt);for(let He=0;He<ce.locationSize;He++)z(ce.location+He,Fe/ce.locationSize,ct,Te,Fe*Pe,Fe/ce.locationSize*He*Pe,qe)}}else if(Q!==void 0){const Te=Q[ne];if(Te!==void 0)switch(Te.length){case 2:s.vertexAttrib2fv(ce.location,Te);break;case 3:s.vertexAttrib3fv(ce.location,Te);break;case 4:s.vertexAttrib4fv(ce.location,Te);break;default:s.vertexAttrib1fv(ce.location,Te)}}}}D()}function O(){F();for(const X in i){const _=i[X];for(const K in _){const le=_[K];for(const $ in le){const j=le[$];for(const Q in j)v(j[Q].object),delete j[Q];delete le[$]}}delete i[X]}}function U(X){if(i[X.id]===void 0)return;const _=i[X.id];for(const K in _){const le=_[K];for(const $ in le){const j=le[$];for(const Q in j)v(j[Q].object),delete j[Q];delete le[$]}}delete i[X.id]}function H(X){for(const _ in i){const K=i[_];for(const le in K){const $=K[le];if($[X.id]===void 0)continue;const j=$[X.id];for(const Q in j)v(j[Q].object),delete j[Q];delete $[X.id]}}}function I(X){for(const _ in i){const K=i[_],le=X.isInstancedMesh===!0?X.id:0,$=K[le];if($!==void 0){for(const j in $){const Q=$[j];for(const ne in Q)v(Q[ne].object),delete Q[ne];delete $[j]}delete K[le],Object.keys(K).length===0&&delete i[_]}}}function F(){V(),d=!0,c!==a&&(c=a,g(c.object))}function V(){a.geometry=null,a.program=null,a.wireframe=!1}return{setup:f,reset:F,resetDefaultState:V,dispose:O,releaseStatesOfGeometry:U,releaseStatesOfObject:I,releaseStatesOfProgram:H,initAttributes:k,enableAttribute:C,disableUnusedAttributes:D}}function SF(s,e,t){let i;function a(m){i=m}function c(m,g){s.drawArrays(i,m,g),t.update(g,i,1)}function d(m,g,v){v!==0&&(s.drawArraysInstanced(i,m,g,v),t.update(g,i,v))}function f(m,g,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,m,0,g,0,v);let x=0;for(let S=0;S<v;S++)x+=g[S];t.update(x,i,1)}this.setMode=a,this.render=c,this.renderInstances=d,this.renderMultiDraw=f}function MF(s,e,t,i){let a;function c(){if(a!==void 0)return a;if(e.has("EXT_texture_filter_anisotropic")===!0){const H=e.get("EXT_texture_filter_anisotropic");a=s.getParameter(H.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else a=0;return a}function d(H){return!(H!==as&&i.convert(H)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function f(H){const I=H===Ll&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(H!==Ss&&i.convert(H)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&H!==ws&&!I)}function m(H){if(H==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";H="mediump"}return H==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let g=t.precision!==void 0?t.precision:"highp";const v=m(g);v!==g&&(ot("WebGLRenderer:",g,"not supported, using",v,"instead."),g=v);const M=t.logarithmicDepthBuffer===!0,x=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control");t.reversedDepthBuffer===!0&&x===!1&&ot("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");const S=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),w=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),k=s.getParameter(s.MAX_TEXTURE_SIZE),C=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),T=s.getParameter(s.MAX_VERTEX_ATTRIBS),D=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),z=s.getParameter(s.MAX_VARYING_VECTORS),L=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),O=s.getParameter(s.MAX_SAMPLES),U=s.getParameter(s.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:c,getMaxPrecision:m,textureFormatReadable:d,textureTypeReadable:f,precision:g,logarithmicDepthBuffer:M,reversedDepthBuffer:x,maxTextures:S,maxVertexTextures:w,maxTextureSize:k,maxCubemapSize:C,maxAttributes:T,maxVertexUniforms:D,maxVaryings:z,maxFragmentUniforms:L,maxSamples:O,samples:U}}function wF(s){const e=this;let t=null,i=0,a=!1,c=!1;const d=new Ou,f=new _t,m={value:null,needsUpdate:!1};this.uniform=m,this.numPlanes=0,this.numIntersection=0,this.init=function(M,x){const S=M.length!==0||x||i!==0||a;return a=x,i=M.length,S},this.beginShadows=function(){c=!0,v(null)},this.endShadows=function(){c=!1},this.setGlobalState=function(M,x){t=v(M,x,0)},this.setState=function(M,x,S){const w=M.clippingPlanes,k=M.clipIntersection,C=M.clipShadows,T=s.get(M);if(!a||w===null||w.length===0||c&&!C)c?v(null):g();else{const D=c?0:i,z=D*4;let L=T.clippingState||null;m.value=L,L=v(w,x,z,S);for(let O=0;O!==z;++O)L[O]=t[O];T.clippingState=L,this.numIntersection=k?this.numPlanes:0,this.numPlanes+=D}};function g(){m.value!==t&&(m.value=t,m.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function v(M,x,S,w){const k=M!==null?M.length:0;let C=null;if(k!==0){if(C=m.value,w!==!0||C===null){const T=S+k*4,D=x.matrixWorldInverse;f.getNormalMatrix(D),(C===null||C.length<T)&&(C=new Float32Array(T));for(let z=0,L=S;z!==k;++z,L+=4)d.copy(M[z]).applyMatrix4(D,f),d.normal.toArray(C,L),C[L+3]=d.constant}m.value=C,m.needsUpdate=!0}return e.numPlanes=k,e.numIntersection=0,C}}const ju=4,n2=[.125,.215,.35,.446,.526,.582],Lf=20,TF=256,WA=new Vm,i2=new ut;let aw=null,ow=0,lw=0,cw=!1;const EF=new J;class jw{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,i=.1,a=100,c={}){const{size:d=256,position:f=EF}=c;aw=this._renderer.getRenderTarget(),ow=this._renderer.getActiveCubeFace(),lw=this._renderer.getActiveMipmapLevel(),cw=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(d);const m=this._allocateTargets();return m.depthBuffer=!0,this._sceneToCubeUV(e,i,a,m,f),t>0&&this._blur(m,0,0,t),this._applyPMREM(m),this._cleanup(m),m}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=a2(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=s2(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(aw,ow,lw),this._renderer.xr.enabled=cw,e.scissorTest=!1,Am(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Dl||e.mapping===qu?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),aw=this._renderer.getRenderTarget(),ow=this._renderer.getActiveCubeFace(),lw=this._renderer.getActiveMipmapLevel(),cw=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:mi,minFilter:mi,generateMipmaps:!1,type:Ll,format:as,colorSpace:Rm,depthBuffer:!1},a=r2(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=r2(e,t,i);const{_lodMax:c}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=CF(c)),this._blurMaterial=PF(c,e,t),this._ggxMaterial=RF(c,e,t)}return a}_compileMaterial(e){const t=new or(new rn,e);this._renderer.compile(t,WA)}_sceneToCubeUV(e,t,i,a,c){const m=new kr(90,1,t,i),g=[1,-1,1,1,1,1],v=[1,1,1,-1,-1,-1],M=this._renderer,x=M.autoClear,S=M.toneMapping;M.getClearColor(i2),M.toneMapping=so,M.autoClear=!1,M.state.buffers.depth.getReversed()&&(M.setRenderTarget(a),M.clearDepth(),M.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new or(new Yf,new Ku({name:"PMREM.Background",side:Ts,depthWrite:!1,depthTest:!1})));const k=this._backgroundBox,C=k.material;let T=!1;const D=e.background;D?D.isColor&&(C.color.copy(D),e.background=null,T=!0):(C.color.copy(i2),T=!0);for(let z=0;z<6;z++){const L=z%3;L===0?(m.up.set(0,g[z],0),m.position.set(c.x,c.y,c.z),m.lookAt(c.x+v[z],c.y,c.z)):L===1?(m.up.set(0,0,g[z]),m.position.set(c.x,c.y,c.z),m.lookAt(c.x,c.y+v[z],c.z)):(m.up.set(0,g[z],0),m.position.set(c.x,c.y,c.z),m.lookAt(c.x,c.y,c.z+v[z]));const O=this._cubeSize;Am(a,L*O,z>2?O:0,O,O),M.setRenderTarget(a),T&&M.render(k,m),M.render(e,m)}M.toneMapping=S,M.autoClear=x,e.background=D}_textureToCubeUV(e,t){const i=this._renderer,a=e.mapping===Dl||e.mapping===qu;a?(this._cubemapMaterial===null&&(this._cubemapMaterial=a2()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=s2());const c=a?this._cubemapMaterial:this._equirectMaterial,d=this._lodMeshes[0];d.material=c;const f=c.uniforms;f.envMap.value=e;const m=this._cubeSize;Am(t,0,0,3*m,2*m),i.setRenderTarget(t),i.render(d,WA)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const a=this._lodMeshes.length;for(let c=1;c<a;c++)this._applyGGXFilter(e,c-1,c);t.autoClear=i}_applyGGXFilter(e,t,i){const a=this._renderer,c=this._pingPongRenderTarget,d=this._ggxMaterial,f=this._lodMeshes[i];f.material=d;const m=d.uniforms,g=i/(this._lodMeshes.length-1),v=t/(this._lodMeshes.length-1),M=Math.sqrt(g*g-v*v),x=0+g*1.25,S=M*x,{_lodMax:w}=this,k=this._sizeLods[i],C=3*k*(i>w-ju?i-w+ju:0),T=4*(this._cubeSize-k);m.envMap.value=e.texture,m.roughness.value=S,m.mipInt.value=w-t,Am(c,C,T,3*k,2*k),a.setRenderTarget(c),a.render(f,WA),m.envMap.value=c.texture,m.roughness.value=0,m.mipInt.value=w-i,Am(e,C,T,3*k,2*k),a.setRenderTarget(e),a.render(f,WA)}_blur(e,t,i,a,c){const d=this._pingPongRenderTarget;this._halfBlur(e,d,t,i,a,"latitudinal",c),this._halfBlur(d,e,i,i,a,"longitudinal",c)}_halfBlur(e,t,i,a,c,d,f){const m=this._renderer,g=this._blurMaterial;d!=="latitudinal"&&d!=="longitudinal"&&kt("blur direction must be either latitudinal or longitudinal!");const v=3,M=this._lodMeshes[a];M.material=g;const x=g.uniforms,S=this._sizeLods[i]-1,w=isFinite(c)?Math.PI/(2*S):2*Math.PI/(2*Lf-1),k=c/w,C=isFinite(c)?1+Math.floor(v*k):Lf;C>Lf&&ot(`sigmaRadians, ${c}, is too large and will clip, as it requested ${C} samples when the maximum is set to ${Lf}`);const T=[];let D=0;for(let H=0;H<Lf;++H){const I=H/k,F=Math.exp(-I*I/2);T.push(F),H===0?D+=F:H<C&&(D+=2*F)}for(let H=0;H<T.length;H++)T[H]=T[H]/D;x.envMap.value=e.texture,x.samples.value=C,x.weights.value=T,x.latitudinal.value=d==="latitudinal",f&&(x.poleAxis.value=f);const{_lodMax:z}=this;x.dTheta.value=w,x.mipInt.value=z-i;const L=this._sizeLods[a],O=3*L*(a>z-ju?a-z+ju:0),U=4*(this._cubeSize-L);Am(t,O,U,3*L,2*L),m.setRenderTarget(t),m.render(M,WA)}}function CF(s){const e=[],t=[],i=[];let a=s;const c=s-ju+1+n2.length;for(let d=0;d<c;d++){const f=Math.pow(2,a);e.push(f);let m=1/f;d>s-ju?m=n2[d-s+ju-1]:d===0&&(m=0),t.push(m);const g=1/(f-2),v=-g,M=1+g,x=[v,v,M,v,M,M,v,v,M,M,v,M],S=6,w=6,k=3,C=2,T=1,D=new Float32Array(k*w*S),z=new Float32Array(C*w*S),L=new Float32Array(T*w*S);for(let U=0;U<S;U++){const H=U%3*2/3-1,I=U>2?0:-1,F=[H,I,0,H+2/3,I,0,H+2/3,I+1,0,H,I,0,H+2/3,I+1,0,H,I+1,0];D.set(F,k*w*U),z.set(x,C*w*U);const V=[U,U,U,U,U,U];L.set(V,T*w*U)}const O=new rn;O.setAttribute("position",new si(D,k)),O.setAttribute("uv",new si(z,C)),O.setAttribute("faceIndex",new si(L,T)),i.push(new or(O,null)),a>ju&&a--}return{lodMeshes:i,sizeLods:e,sigmas:t}}function r2(s,e,t){const i=new Ra(s,e,t);return i.texture.mapping=Bm,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Am(s,e,t,i,a){s.viewport.set(e,t,i,a),s.scissor.set(e,t,i,a)}function RF(s,e,t){return new Pa({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:TF,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:lS(),fragmentShader:`
|
|
3785
3785
|
|
|
3786
3786
|
precision highp float;
|
|
3787
3787
|
precision highp int;
|
|
@@ -4167,7 +4167,7 @@ Material Type: `+X.type+`
|
|
|
4167
4167
|
|
|
4168
4168
|
Program Info Log: `+$+`
|
|
4169
4169
|
`+ye+`
|
|
4170
|
-
`+Te)}else $!==""?ot("WebGLProgram: Program Info Log:",$):(j===""||Q==="")&&(ce=!1);ce&&(X.diagnostics={runnable:ne,programLog:$,vertexShader:{log:j,prefix:C},fragmentShader:{log:Q,prefix:T}})}a.deleteShader(O),a.deleteShader(U),I=new wb(a,k),F=OO(a,k)}let I;this.getUniforms=function(){return I===void 0&&H(this),I};let F;this.getAttributes=function(){return F===void 0&&H(this),F};let V=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return V===!1&&(V=a.getProgramParameter(k,PO)),V},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(k),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=kO++,this.cacheKey=e,this.usedTimes=1,this.program=k,this.vertexShader=O,this.fragmentShader=U,this}let t4=0;class n4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e,t,i){const a=this._getShaderCacheForMaterial(e);return a.has(t)===!1&&(a.add(t),t.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderStage(e){return this._getShaderStage(e.vertexShader)}getFragmentShaderStage(e){return this._getShaderStage(e.fragmentShader)}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new i4(e),t.set(e,i)),i}}class i4{constructor(e){this.id=t4++,this.code=e,this.usedTimes=0}}function r4(s){return s===Yu||s===cv||s===uv}function s4(s,e,t,i,a,c){const d=new km,f=new n4,m=new Set,g=[],v=new Map,M=i.logarithmicDepthBuffer;let x=i.precision;const S={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function w(I){return m.add(I),I===0?"uv":`uv${I}`}function k(I,F,V,X,_,K){const le=X.fog,$=_.geometry,j=I.isMeshStandardMaterial||I.isMeshLambertMaterial||I.isMeshPhongMaterial?X.environment:null,Q=I.isMeshStandardMaterial||I.isMeshLambertMaterial&&!I.envMap||I.isMeshPhongMaterial&&!I.envMap,ne=e.get(I.envMap||j,Q),ce=ne&&ne.mapping===Bm?ne.image.height:null,ye=S[I.type];I.precision!==null&&(x=i.getMaxPrecision(I.precision),x!==I.precision&&ot("WebGLProgram.getParameters:",I.precision,"not supported, using",x,"instead."));const Te=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,Fe=Te!==void 0?Te.length:0;let lt=0;$.morphAttributes.position!==void 0&&(lt=1),$.morphAttributes.normal!==void 0&&(lt=2),$.morphAttributes.color!==void 0&&(lt=3);let ht,ct,Pe,Xe;if(ye){const gt=Go[ye];ht=gt.vertexShader,ct=gt.fragmentShader}else{ht=I.vertexShader,ct=I.fragmentShader;const gt=f.getVertexShaderStage(I),yn=f.getFragmentShaderStage(I);f.update(I,gt,yn),Pe=gt.id,Xe=yn.id}const He=s.getRenderTarget(),pt=s.state.buffers.depth.getReversed(),Nt=_.isInstancedMesh===!0,nt=_.isBatchedMesh===!0,sn=!!I.map,Dt=!!I.matcap,Be=!!ne,xe=!!I.aoMap,Ue=!!I.lightMap,qe=!!I.bumpMap&&I.wireframe===!1,Ze=!!I.normalMap,Pt=!!I.displacementMap,bt=!!I.emissiveMap,zt=!!I.metalnessMap,Et=!!I.roughnessMap,ee=I.anisotropy>0,Cn=I.clearcoat>0,an=I.dispersion>0,Y=I.iridescence>0,B=I.sheen>0,de=I.transmission>0,me=ee&&!!I.anisotropyMap,Ce=Cn&&!!I.clearcoatMap,Qe=Cn&&!!I.clearcoatNormalMap,Ke=Cn&&!!I.clearcoatRoughnessMap,ke=Y&&!!I.iridescenceMap,De=Y&&!!I.iridescenceThicknessMap,et=B&&!!I.sheenColorMap,Rt=B&&!!I.sheenRoughnessMap,rt=!!I.specularMap,st=!!I.specularColorMap,mt=!!I.specularIntensityMap,Ct=de&&!!I.transmissionMap,jt=de&&!!I.thicknessMap,ae=!!I.gradientMap,_e=!!I.alphaMap,Le=I.alphaTest>0,it=!!I.alphaHash,tt=!!I.extensions;let Ne=so;I.toneMapped&&(He===null||He.isXRRenderTarget===!0)&&(Ne=s.toneMapping);const Mt={shaderID:ye,shaderType:I.type,shaderName:I.name,vertexShader:ht,fragmentShader:ct,defines:I.defines,customVertexShaderID:Pe,customFragmentShaderID:Xe,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:x,batching:nt,batchingColor:nt&&_._colorsTexture!==null,instancing:Nt,instancingColor:Nt&&_.instanceColor!==null,instancingMorph:Nt&&_.morphTexture!==null,outputColorSpace:He===null?s.outputColorSpace:He.isXRRenderTarget===!0?He.texture.colorSpace:wn.workingColorSpace,alphaToCoverage:!!I.alphaToCoverage,map:sn,matcap:Dt,envMap:Be,envMapMode:Be&&ne.mapping,envMapCubeUVHeight:ce,aoMap:xe,lightMap:Ue,bumpMap:qe,normalMap:Ze,displacementMap:Pt,emissiveMap:bt,normalMapObjectSpace:Ze&&I.normalMapType===k3,normalMapTangentSpace:Ze&&I.normalMapType===Lc,packedNormalMap:Ze&&I.normalMapType===Lc&&r4(I.normalMap.format),metalnessMap:zt,roughnessMap:Et,anisotropy:ee,anisotropyMap:me,clearcoat:Cn,clearcoatMap:Ce,clearcoatNormalMap:Qe,clearcoatRoughnessMap:Ke,dispersion:an,iridescence:Y,iridescenceMap:ke,iridescenceThicknessMap:De,sheen:B,sheenColorMap:et,sheenRoughnessMap:Rt,specularMap:rt,specularColorMap:st,specularIntensityMap:mt,transmission:de,transmissionMap:Ct,thicknessMap:jt,gradientMap:ae,opaque:I.transparent===!1&&I.blending===Uf&&I.alphaToCoverage===!1,alphaMap:_e,alphaTest:Le,alphaHash:it,combine:I.combine,mapUv:sn&&w(I.map.channel),aoMapUv:xe&&w(I.aoMap.channel),lightMapUv:Ue&&w(I.lightMap.channel),bumpMapUv:qe&&w(I.bumpMap.channel),normalMapUv:Ze&&w(I.normalMap.channel),displacementMapUv:Pt&&w(I.displacementMap.channel),emissiveMapUv:bt&&w(I.emissiveMap.channel),metalnessMapUv:zt&&w(I.metalnessMap.channel),roughnessMapUv:Et&&w(I.roughnessMap.channel),anisotropyMapUv:me&&w(I.anisotropyMap.channel),clearcoatMapUv:Ce&&w(I.clearcoatMap.channel),clearcoatNormalMapUv:Qe&&w(I.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ke&&w(I.clearcoatRoughnessMap.channel),iridescenceMapUv:ke&&w(I.iridescenceMap.channel),iridescenceThicknessMapUv:De&&w(I.iridescenceThicknessMap.channel),sheenColorMapUv:et&&w(I.sheenColorMap.channel),sheenRoughnessMapUv:Rt&&w(I.sheenRoughnessMap.channel),specularMapUv:rt&&w(I.specularMap.channel),specularColorMapUv:st&&w(I.specularColorMap.channel),specularIntensityMapUv:mt&&w(I.specularIntensityMap.channel),transmissionMapUv:Ct&&w(I.transmissionMap.channel),thicknessMapUv:jt&&w(I.thicknessMap.channel),alphaMapUv:_e&&w(I.alphaMap.channel),vertexTangents:!!$.attributes.tangent&&(Ze||ee),vertexNormals:!!$.attributes.normal,vertexColors:I.vertexColors,vertexAlphas:I.vertexColors===!0&&!!$.attributes.color&&$.attributes.color.itemSize===4,pointsUvs:_.isPoints===!0&&!!$.attributes.uv&&(sn||_e),fog:!!le,useFog:I.fog===!0,fogExp2:!!le&&le.isFogExp2,flatShading:I.wireframe===!1&&(I.flatShading===!0||$.attributes.normal===void 0&&Ze===!1&&(I.isMeshLambertMaterial||I.isMeshPhongMaterial||I.isMeshStandardMaterial||I.isMeshPhysicalMaterial)),sizeAttenuation:I.sizeAttenuation===!0,logarithmicDepthBuffer:M,reversedDepthBuffer:pt,skinning:_.isSkinnedMesh===!0,hasPositionAttribute:$.attributes.position!==void 0,morphTargets:$.morphAttributes.position!==void 0,morphNormals:$.morphAttributes.normal!==void 0,morphColors:$.morphAttributes.color!==void 0,morphTargetsCount:Fe,morphTextureStride:lt,numDirLights:F.directional.length,numPointLights:F.point.length,numSpotLights:F.spot.length,numSpotLightMaps:F.spotLightMap.length,numRectAreaLights:F.rectArea.length,numHemiLights:F.hemi.length,numDirLightShadows:F.directionalShadowMap.length,numPointLightShadows:F.pointShadowMap.length,numSpotLightShadows:F.spotShadowMap.length,numSpotLightShadowsWithMaps:F.numSpotLightShadowsWithMaps,numLightProbes:F.numLightProbes,numLightProbeGrids:K.length,numClippingPlanes:c.numPlanes,numClipIntersection:c.numIntersection,dithering:I.dithering,shadowMapEnabled:s.shadowMap.enabled&&V.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ne,decodeVideoTexture:sn&&I.map.isVideoTexture===!0&&wn.getTransfer(I.map.colorSpace)===_n,decodeVideoTextureEmissive:bt&&I.emissiveMap.isVideoTexture===!0&&wn.getTransfer(I.emissiveMap.colorSpace)===_n,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===Cl,flipSided:I.side===Ts,useDepthPacking:I.depthPacking>=0,depthPacking:I.depthPacking||0,index0AttributeName:I.index0AttributeName,extensionClipCullDistance:tt&&I.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(tt&&I.extensions.multiDraw===!0||nt)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:I.customProgramCacheKey()};return Mt.vertexUv1s=m.has(1),Mt.vertexUv2s=m.has(2),Mt.vertexUv3s=m.has(3),m.clear(),Mt}function C(I){const F=[];if(I.shaderID?F.push(I.shaderID):(F.push(I.customVertexShaderID),F.push(I.customFragmentShaderID)),I.defines!==void 0)for(const V in I.defines)F.push(V),F.push(I.defines[V]);return I.isRawShaderMaterial===!1&&(T(F,I),D(F,I),F.push(s.outputColorSpace)),F.push(I.customProgramCacheKey),F.join()}function T(I,F){I.push(F.precision),I.push(F.outputColorSpace),I.push(F.envMapMode),I.push(F.envMapCubeUVHeight),I.push(F.mapUv),I.push(F.alphaMapUv),I.push(F.lightMapUv),I.push(F.aoMapUv),I.push(F.bumpMapUv),I.push(F.normalMapUv),I.push(F.displacementMapUv),I.push(F.emissiveMapUv),I.push(F.metalnessMapUv),I.push(F.roughnessMapUv),I.push(F.anisotropyMapUv),I.push(F.clearcoatMapUv),I.push(F.clearcoatNormalMapUv),I.push(F.clearcoatRoughnessMapUv),I.push(F.iridescenceMapUv),I.push(F.iridescenceThicknessMapUv),I.push(F.sheenColorMapUv),I.push(F.sheenRoughnessMapUv),I.push(F.specularMapUv),I.push(F.specularColorMapUv),I.push(F.specularIntensityMapUv),I.push(F.transmissionMapUv),I.push(F.thicknessMapUv),I.push(F.combine),I.push(F.fogExp2),I.push(F.sizeAttenuation),I.push(F.morphTargetsCount),I.push(F.morphAttributeCount),I.push(F.numDirLights),I.push(F.numPointLights),I.push(F.numSpotLights),I.push(F.numSpotLightMaps),I.push(F.numHemiLights),I.push(F.numRectAreaLights),I.push(F.numDirLightShadows),I.push(F.numPointLightShadows),I.push(F.numSpotLightShadows),I.push(F.numSpotLightShadowsWithMaps),I.push(F.numLightProbes),I.push(F.shadowMapType),I.push(F.toneMapping),I.push(F.numClippingPlanes),I.push(F.numClipIntersection),I.push(F.depthPacking)}function D(I,F){d.disableAll(),F.instancing&&d.enable(0),F.instancingColor&&d.enable(1),F.instancingMorph&&d.enable(2),F.matcap&&d.enable(3),F.envMap&&d.enable(4),F.normalMapObjectSpace&&d.enable(5),F.normalMapTangentSpace&&d.enable(6),F.clearcoat&&d.enable(7),F.iridescence&&d.enable(8),F.alphaTest&&d.enable(9),F.vertexColors&&d.enable(10),F.vertexAlphas&&d.enable(11),F.vertexUv1s&&d.enable(12),F.vertexUv2s&&d.enable(13),F.vertexUv3s&&d.enable(14),F.vertexTangents&&d.enable(15),F.anisotropy&&d.enable(16),F.alphaHash&&d.enable(17),F.batching&&d.enable(18),F.dispersion&&d.enable(19),F.batchingColor&&d.enable(20),F.gradientMap&&d.enable(21),F.packedNormalMap&&d.enable(22),F.vertexNormals&&d.enable(23),I.push(d.mask),d.disableAll(),F.fog&&d.enable(0),F.useFog&&d.enable(1),F.flatShading&&d.enable(2),F.logarithmicDepthBuffer&&d.enable(3),F.reversedDepthBuffer&&d.enable(4),F.skinning&&d.enable(5),F.morphTargets&&d.enable(6),F.morphNormals&&d.enable(7),F.morphColors&&d.enable(8),F.premultipliedAlpha&&d.enable(9),F.shadowMapEnabled&&d.enable(10),F.doubleSided&&d.enable(11),F.flipSided&&d.enable(12),F.useDepthPacking&&d.enable(13),F.dithering&&d.enable(14),F.transmission&&d.enable(15),F.sheen&&d.enable(16),F.opaque&&d.enable(17),F.pointsUvs&&d.enable(18),F.decodeVideoTexture&&d.enable(19),F.decodeVideoTextureEmissive&&d.enable(20),F.alphaToCoverage&&d.enable(21),F.numLightProbeGrids>0&&d.enable(22),F.hasPositionAttribute&&d.enable(23),I.push(d.mask)}function z(I){const F=S[I.type];let V;if(F){const X=Go[F];V=dR.clone(X.uniforms)}else V=I.uniforms;return V}function L(I,F){let V=v.get(F);return V!==void 0?++V.usedTimes:(V=new e4(s,F,I,a),g.push(V),v.set(F,V)),V}function O(I){if(--I.usedTimes===0){const F=g.indexOf(I);g[F]=g[g.length-1],g.pop(),v.delete(I.cacheKey),I.destroy()}}function U(I){f.remove(I)}function H(){f.dispose()}return{getParameters:k,getProgramCacheKey:C,getUniforms:z,acquireProgram:L,releaseProgram:O,releaseShaderCache:U,programs:g,dispose:H}}function a4(){let s=new WeakMap;function e(d){return s.has(d)}function t(d){let f=s.get(d);return f===void 0&&(f={},s.set(d,f)),f}function i(d){s.delete(d)}function a(d,f,m){s.get(d)[f]=m}function c(){s=new WeakMap}return{has:e,get:t,remove:i,update:a,dispose:c}}function o4(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.materialVariant!==e.materialVariant?s.materialVariant-e.materialVariant:s.z!==e.z?s.z-e.z:s.id-e.id}function b2(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function x2(){const s=[];let e=0;const t=[],i=[],a=[];function c(){e=0,t.length=0,i.length=0,a.length=0}function d(x){let S=0;return x.isInstancedMesh&&(S+=2),x.isSkinnedMesh&&(S+=1),S}function f(x,S,w,k,C,T){let D=s[e];return D===void 0?(D={id:x.id,object:x,geometry:S,material:w,materialVariant:d(x),groupOrder:k,renderOrder:x.renderOrder,z:C,group:T},s[e]=D):(D.id=x.id,D.object=x,D.geometry=S,D.material=w,D.materialVariant=d(x),D.groupOrder=k,D.renderOrder=x.renderOrder,D.z=C,D.group=T),e++,D}function m(x,S,w,k,C,T){const D=f(x,S,w,k,C,T);w.transmission>0?i.push(D):w.transparent===!0?a.push(D):t.push(D)}function g(x,S,w,k,C,T){const D=f(x,S,w,k,C,T);w.transmission>0?i.unshift(D):w.transparent===!0?a.unshift(D):t.unshift(D)}function v(x,S,w){t.length>1&&t.sort(x||o4),i.length>1&&i.sort(S||b2),a.length>1&&a.sort(S||b2),w&&(t.reverse(),i.reverse(),a.reverse())}function M(){for(let x=e,S=s.length;x<S;x++){const w=s[x];if(w.id===null)break;w.id=null,w.object=null,w.geometry=null,w.material=null,w.group=null}}return{opaque:t,transmissive:i,transparent:a,init:c,push:m,unshift:g,finish:M,sort:v}}function l4(){let s=new WeakMap;function e(i,a){const c=s.get(i);let d;return c===void 0?(d=new x2,s.set(i,[d])):a>=c.length?(d=new x2,c.push(d)):d=c[a],d}function t(){s=new WeakMap}return{get:e,dispose:t}}function c4(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new J,color:new ut};break;case"SpotLight":t={position:new J,direction:new J,color:new ut,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new J,color:new ut,distance:0,decay:0};break;case"HemisphereLight":t={direction:new J,skyColor:new ut,groundColor:new ut};break;case"RectAreaLight":t={color:new ut,position:new J,halfWidth:new J,halfHeight:new J};break}return s[e.id]=t,t}}}function u4(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let d4=0;function f4(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function h4(s){const e=new c4,t=u4(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)i.probe.push(new J);const a=new J,c=new Zt,d=new Zt;function f(g){let v=0,M=0,x=0;for(let F=0;F<9;F++)i.probe[F].set(0,0,0);let S=0,w=0,k=0,C=0,T=0,D=0,z=0,L=0,O=0,U=0,H=0;g.sort(f4);for(let F=0,V=g.length;F<V;F++){const X=g[F],_=X.color,K=X.intensity,le=X.distance;let $=null;if(X.shadow&&X.shadow.map&&(X.shadow.map.texture.format===Yu?$=X.shadow.map.texture:$=X.shadow.map.depthTexture||X.shadow.map.texture),X.isAmbientLight)v+=_.r*K,M+=_.g*K,x+=_.b*K;else if(X.isLightProbe){for(let j=0;j<9;j++)i.probe[j].addScaledVector(X.sh.coefficients[j],K);H++}else if(X.isDirectionalLight){const j=e.get(X);if(j.color.copy(X.color).multiplyScalar(X.intensity),X.castShadow){const Q=X.shadow,ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,i.directionalShadow[S]=ne,i.directionalShadowMap[S]=$,i.directionalShadowMatrix[S]=X.shadow.matrix,D++}i.directional[S]=j,S++}else if(X.isSpotLight){const j=e.get(X);j.position.setFromMatrixPosition(X.matrixWorld),j.color.copy(_).multiplyScalar(K),j.distance=le,j.coneCos=Math.cos(X.angle),j.penumbraCos=Math.cos(X.angle*(1-X.penumbra)),j.decay=X.decay,i.spot[k]=j;const Q=X.shadow;if(X.map&&(i.spotLightMap[O]=X.map,O++,Q.updateMatrices(X),X.castShadow&&U++),i.spotLightMatrix[k]=Q.matrix,X.castShadow){const ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,i.spotShadow[k]=ne,i.spotShadowMap[k]=$,L++}k++}else if(X.isRectAreaLight){const j=e.get(X);j.color.copy(_).multiplyScalar(K),j.halfWidth.set(X.width*.5,0,0),j.halfHeight.set(0,X.height*.5,0),i.rectArea[C]=j,C++}else if(X.isPointLight){const j=e.get(X);if(j.color.copy(X.color).multiplyScalar(X.intensity),j.distance=X.distance,j.decay=X.decay,X.castShadow){const Q=X.shadow,ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,ne.shadowCameraNear=Q.camera.near,ne.shadowCameraFar=Q.camera.far,i.pointShadow[w]=ne,i.pointShadowMap[w]=$,i.pointShadowMatrix[w]=X.shadow.matrix,z++}i.point[w]=j,w++}else if(X.isHemisphereLight){const j=e.get(X);j.skyColor.copy(X.color).multiplyScalar(K),j.groundColor.copy(X.groundColor).multiplyScalar(K),i.hemi[T]=j,T++}}C>0&&(s.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ft.LTC_FLOAT_1,i.rectAreaLTC2=ft.LTC_FLOAT_2):(i.rectAreaLTC1=ft.LTC_HALF_1,i.rectAreaLTC2=ft.LTC_HALF_2)),i.ambient[0]=v,i.ambient[1]=M,i.ambient[2]=x;const I=i.hash;(I.directionalLength!==S||I.pointLength!==w||I.spotLength!==k||I.rectAreaLength!==C||I.hemiLength!==T||I.numDirectionalShadows!==D||I.numPointShadows!==z||I.numSpotShadows!==L||I.numSpotMaps!==O||I.numLightProbes!==H)&&(i.directional.length=S,i.spot.length=k,i.rectArea.length=C,i.point.length=w,i.hemi.length=T,i.directionalShadow.length=D,i.directionalShadowMap.length=D,i.pointShadow.length=z,i.pointShadowMap.length=z,i.spotShadow.length=L,i.spotShadowMap.length=L,i.directionalShadowMatrix.length=D,i.pointShadowMatrix.length=z,i.spotLightMatrix.length=L+O-U,i.spotLightMap.length=O,i.numSpotLightShadowsWithMaps=U,i.numLightProbes=H,I.directionalLength=S,I.pointLength=w,I.spotLength=k,I.rectAreaLength=C,I.hemiLength=T,I.numDirectionalShadows=D,I.numPointShadows=z,I.numSpotShadows=L,I.numSpotMaps=O,I.numLightProbes=H,i.version=d4++)}function m(g,v){let M=0,x=0,S=0,w=0,k=0;const C=v.matrixWorldInverse;for(let T=0,D=g.length;T<D;T++){const z=g[T];if(z.isDirectionalLight){const L=i.directional[M];L.direction.setFromMatrixPosition(z.matrixWorld),a.setFromMatrixPosition(z.target.matrixWorld),L.direction.sub(a),L.direction.transformDirection(C),M++}else if(z.isSpotLight){const L=i.spot[S];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),L.direction.setFromMatrixPosition(z.matrixWorld),a.setFromMatrixPosition(z.target.matrixWorld),L.direction.sub(a),L.direction.transformDirection(C),S++}else if(z.isRectAreaLight){const L=i.rectArea[w];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),d.identity(),c.copy(z.matrixWorld),c.premultiply(C),d.extractRotation(c),L.halfWidth.set(z.width*.5,0,0),L.halfHeight.set(0,z.height*.5,0),L.halfWidth.applyMatrix4(d),L.halfHeight.applyMatrix4(d),w++}else if(z.isPointLight){const L=i.point[x];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),x++}else if(z.isHemisphereLight){const L=i.hemi[k];L.direction.setFromMatrixPosition(z.matrixWorld),L.direction.transformDirection(C),k++}}}return{setup:f,setupView:m,state:i}}function S2(s){const e=new h4(s),t=[],i=[],a=[];function c(x){M.camera=x,t.length=0,i.length=0,a.length=0}function d(x){t.push(x)}function f(x){i.push(x)}function m(x){a.push(x)}function g(){e.setup(t)}function v(x){e.setupView(t,x)}const M={lightsArray:t,shadowsArray:i,lightProbeGridArray:a,camera:null,lights:e,transmissionRenderTarget:{},textureUnits:0};return{init:c,state:M,setupLights:g,setupLightsView:v,pushLight:d,pushShadow:f,pushLightProbeGrid:m}}function p4(s){let e=new WeakMap;function t(a,c=0){const d=e.get(a);let f;return d===void 0?(f=new S2(s),e.set(a,[f])):c>=d.length?(f=new S2(s),d.push(f)):f=d[c],f}function i(){e=new WeakMap}return{get:t,dispose:i}}const m4=`void main() {
|
|
4170
|
+
`+Te)}else $!==""?ot("WebGLProgram: Program Info Log:",$):(j===""||Q==="")&&(ce=!1);ce&&(X.diagnostics={runnable:ne,programLog:$,vertexShader:{log:j,prefix:C},fragmentShader:{log:Q,prefix:T}})}a.deleteShader(O),a.deleteShader(U),I=new wb(a,k),F=OO(a,k)}let I;this.getUniforms=function(){return I===void 0&&H(this),I};let F;this.getAttributes=function(){return F===void 0&&H(this),F};let V=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return V===!1&&(V=a.getProgramParameter(k,PO)),V},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(k),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=kO++,this.cacheKey=e,this.usedTimes=1,this.program=k,this.vertexShader=O,this.fragmentShader=U,this}let t4=0;class n4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e,t,i){const a=this._getShaderCacheForMaterial(e);return a.has(t)===!1&&(a.add(t),t.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderStage(e){return this._getShaderStage(e.vertexShader)}getFragmentShaderStage(e){return this._getShaderStage(e.fragmentShader)}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new i4(e),t.set(e,i)),i}}class i4{constructor(e){this.id=t4++,this.code=e,this.usedTimes=0}}function r4(s){return s===Yu||s===cv||s===uv}function s4(s,e,t,i,a,c){const d=new km,f=new n4,m=new Set,g=[],v=new Map,M=i.logarithmicDepthBuffer;let x=i.precision;const S={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function w(I){return m.add(I),I===0?"uv":`uv${I}`}function k(I,F,V,X,_,K){const le=X.fog,$=_.geometry,j=I.isMeshStandardMaterial||I.isMeshLambertMaterial||I.isMeshPhongMaterial?X.environment:null,Q=I.isMeshStandardMaterial||I.isMeshLambertMaterial&&!I.envMap||I.isMeshPhongMaterial&&!I.envMap,ne=e.get(I.envMap||j,Q),ce=ne&&ne.mapping===Bm?ne.image.height:null,ye=S[I.type];I.precision!==null&&(x=i.getMaxPrecision(I.precision),x!==I.precision&&ot("WebGLProgram.getParameters:",I.precision,"not supported, using",x,"instead."));const Te=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,Fe=Te!==void 0?Te.length:0;let ft=0;$.morphAttributes.position!==void 0&&(ft=1),$.morphAttributes.normal!==void 0&&(ft=2),$.morphAttributes.color!==void 0&&(ft=3);let lt,ct,Pe,qe;if(ye){const gt=Go[ye];lt=gt.vertexShader,ct=gt.fragmentShader}else{lt=I.vertexShader,ct=I.fragmentShader;const gt=f.getVertexShaderStage(I),yn=f.getFragmentShaderStage(I);f.update(I,gt,yn),Pe=gt.id,qe=yn.id}const He=s.getRenderTarget(),pt=s.state.buffers.depth.getReversed(),Nt=_.isInstancedMesh===!0,nt=_.isBatchedMesh===!0,sn=!!I.map,Dt=!!I.matcap,Ue=!!ne,xe=!!I.aoMap,ze=!!I.lightMap,je=!!I.bumpMap&&I.wireframe===!1,Ze=!!I.normalMap,Pt=!!I.displacementMap,bt=!!I.emissiveMap,zt=!!I.metalnessMap,Et=!!I.roughnessMap,ee=I.anisotropy>0,Cn=I.clearcoat>0,an=I.dispersion>0,Y=I.iridescence>0,B=I.sheen>0,de=I.transmission>0,me=ee&&!!I.anisotropyMap,Ce=Cn&&!!I.clearcoatMap,Qe=Cn&&!!I.clearcoatNormalMap,Ke=Cn&&!!I.clearcoatRoughnessMap,ke=Y&&!!I.iridescenceMap,De=Y&&!!I.iridescenceThicknessMap,et=B&&!!I.sheenColorMap,Rt=B&&!!I.sheenRoughnessMap,rt=!!I.specularMap,st=!!I.specularColorMap,mt=!!I.specularIntensityMap,Ct=de&&!!I.transmissionMap,jt=de&&!!I.thicknessMap,ae=!!I.gradientMap,_e=!!I.alphaMap,Le=I.alphaTest>0,it=!!I.alphaHash,tt=!!I.extensions;let Ne=so;I.toneMapped&&(He===null||He.isXRRenderTarget===!0)&&(Ne=s.toneMapping);const Mt={shaderID:ye,shaderType:I.type,shaderName:I.name,vertexShader:lt,fragmentShader:ct,defines:I.defines,customVertexShaderID:Pe,customFragmentShaderID:qe,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:x,batching:nt,batchingColor:nt&&_._colorsTexture!==null,instancing:Nt,instancingColor:Nt&&_.instanceColor!==null,instancingMorph:Nt&&_.morphTexture!==null,outputColorSpace:He===null?s.outputColorSpace:He.isXRRenderTarget===!0?He.texture.colorSpace:wn.workingColorSpace,alphaToCoverage:!!I.alphaToCoverage,map:sn,matcap:Dt,envMap:Ue,envMapMode:Ue&&ne.mapping,envMapCubeUVHeight:ce,aoMap:xe,lightMap:ze,bumpMap:je,normalMap:Ze,displacementMap:Pt,emissiveMap:bt,normalMapObjectSpace:Ze&&I.normalMapType===k3,normalMapTangentSpace:Ze&&I.normalMapType===Lc,packedNormalMap:Ze&&I.normalMapType===Lc&&r4(I.normalMap.format),metalnessMap:zt,roughnessMap:Et,anisotropy:ee,anisotropyMap:me,clearcoat:Cn,clearcoatMap:Ce,clearcoatNormalMap:Qe,clearcoatRoughnessMap:Ke,dispersion:an,iridescence:Y,iridescenceMap:ke,iridescenceThicknessMap:De,sheen:B,sheenColorMap:et,sheenRoughnessMap:Rt,specularMap:rt,specularColorMap:st,specularIntensityMap:mt,transmission:de,transmissionMap:Ct,thicknessMap:jt,gradientMap:ae,opaque:I.transparent===!1&&I.blending===Uf&&I.alphaToCoverage===!1,alphaMap:_e,alphaTest:Le,alphaHash:it,combine:I.combine,mapUv:sn&&w(I.map.channel),aoMapUv:xe&&w(I.aoMap.channel),lightMapUv:ze&&w(I.lightMap.channel),bumpMapUv:je&&w(I.bumpMap.channel),normalMapUv:Ze&&w(I.normalMap.channel),displacementMapUv:Pt&&w(I.displacementMap.channel),emissiveMapUv:bt&&w(I.emissiveMap.channel),metalnessMapUv:zt&&w(I.metalnessMap.channel),roughnessMapUv:Et&&w(I.roughnessMap.channel),anisotropyMapUv:me&&w(I.anisotropyMap.channel),clearcoatMapUv:Ce&&w(I.clearcoatMap.channel),clearcoatNormalMapUv:Qe&&w(I.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ke&&w(I.clearcoatRoughnessMap.channel),iridescenceMapUv:ke&&w(I.iridescenceMap.channel),iridescenceThicknessMapUv:De&&w(I.iridescenceThicknessMap.channel),sheenColorMapUv:et&&w(I.sheenColorMap.channel),sheenRoughnessMapUv:Rt&&w(I.sheenRoughnessMap.channel),specularMapUv:rt&&w(I.specularMap.channel),specularColorMapUv:st&&w(I.specularColorMap.channel),specularIntensityMapUv:mt&&w(I.specularIntensityMap.channel),transmissionMapUv:Ct&&w(I.transmissionMap.channel),thicknessMapUv:jt&&w(I.thicknessMap.channel),alphaMapUv:_e&&w(I.alphaMap.channel),vertexTangents:!!$.attributes.tangent&&(Ze||ee),vertexNormals:!!$.attributes.normal,vertexColors:I.vertexColors,vertexAlphas:I.vertexColors===!0&&!!$.attributes.color&&$.attributes.color.itemSize===4,pointsUvs:_.isPoints===!0&&!!$.attributes.uv&&(sn||_e),fog:!!le,useFog:I.fog===!0,fogExp2:!!le&&le.isFogExp2,flatShading:I.wireframe===!1&&(I.flatShading===!0||$.attributes.normal===void 0&&Ze===!1&&(I.isMeshLambertMaterial||I.isMeshPhongMaterial||I.isMeshStandardMaterial||I.isMeshPhysicalMaterial)),sizeAttenuation:I.sizeAttenuation===!0,logarithmicDepthBuffer:M,reversedDepthBuffer:pt,skinning:_.isSkinnedMesh===!0,hasPositionAttribute:$.attributes.position!==void 0,morphTargets:$.morphAttributes.position!==void 0,morphNormals:$.morphAttributes.normal!==void 0,morphColors:$.morphAttributes.color!==void 0,morphTargetsCount:Fe,morphTextureStride:ft,numDirLights:F.directional.length,numPointLights:F.point.length,numSpotLights:F.spot.length,numSpotLightMaps:F.spotLightMap.length,numRectAreaLights:F.rectArea.length,numHemiLights:F.hemi.length,numDirLightShadows:F.directionalShadowMap.length,numPointLightShadows:F.pointShadowMap.length,numSpotLightShadows:F.spotShadowMap.length,numSpotLightShadowsWithMaps:F.numSpotLightShadowsWithMaps,numLightProbes:F.numLightProbes,numLightProbeGrids:K.length,numClippingPlanes:c.numPlanes,numClipIntersection:c.numIntersection,dithering:I.dithering,shadowMapEnabled:s.shadowMap.enabled&&V.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ne,decodeVideoTexture:sn&&I.map.isVideoTexture===!0&&wn.getTransfer(I.map.colorSpace)===_n,decodeVideoTextureEmissive:bt&&I.emissiveMap.isVideoTexture===!0&&wn.getTransfer(I.emissiveMap.colorSpace)===_n,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===Cl,flipSided:I.side===Ts,useDepthPacking:I.depthPacking>=0,depthPacking:I.depthPacking||0,index0AttributeName:I.index0AttributeName,extensionClipCullDistance:tt&&I.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(tt&&I.extensions.multiDraw===!0||nt)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:I.customProgramCacheKey()};return Mt.vertexUv1s=m.has(1),Mt.vertexUv2s=m.has(2),Mt.vertexUv3s=m.has(3),m.clear(),Mt}function C(I){const F=[];if(I.shaderID?F.push(I.shaderID):(F.push(I.customVertexShaderID),F.push(I.customFragmentShaderID)),I.defines!==void 0)for(const V in I.defines)F.push(V),F.push(I.defines[V]);return I.isRawShaderMaterial===!1&&(T(F,I),D(F,I),F.push(s.outputColorSpace)),F.push(I.customProgramCacheKey),F.join()}function T(I,F){I.push(F.precision),I.push(F.outputColorSpace),I.push(F.envMapMode),I.push(F.envMapCubeUVHeight),I.push(F.mapUv),I.push(F.alphaMapUv),I.push(F.lightMapUv),I.push(F.aoMapUv),I.push(F.bumpMapUv),I.push(F.normalMapUv),I.push(F.displacementMapUv),I.push(F.emissiveMapUv),I.push(F.metalnessMapUv),I.push(F.roughnessMapUv),I.push(F.anisotropyMapUv),I.push(F.clearcoatMapUv),I.push(F.clearcoatNormalMapUv),I.push(F.clearcoatRoughnessMapUv),I.push(F.iridescenceMapUv),I.push(F.iridescenceThicknessMapUv),I.push(F.sheenColorMapUv),I.push(F.sheenRoughnessMapUv),I.push(F.specularMapUv),I.push(F.specularColorMapUv),I.push(F.specularIntensityMapUv),I.push(F.transmissionMapUv),I.push(F.thicknessMapUv),I.push(F.combine),I.push(F.fogExp2),I.push(F.sizeAttenuation),I.push(F.morphTargetsCount),I.push(F.morphAttributeCount),I.push(F.numDirLights),I.push(F.numPointLights),I.push(F.numSpotLights),I.push(F.numSpotLightMaps),I.push(F.numHemiLights),I.push(F.numRectAreaLights),I.push(F.numDirLightShadows),I.push(F.numPointLightShadows),I.push(F.numSpotLightShadows),I.push(F.numSpotLightShadowsWithMaps),I.push(F.numLightProbes),I.push(F.shadowMapType),I.push(F.toneMapping),I.push(F.numClippingPlanes),I.push(F.numClipIntersection),I.push(F.depthPacking)}function D(I,F){d.disableAll(),F.instancing&&d.enable(0),F.instancingColor&&d.enable(1),F.instancingMorph&&d.enable(2),F.matcap&&d.enable(3),F.envMap&&d.enable(4),F.normalMapObjectSpace&&d.enable(5),F.normalMapTangentSpace&&d.enable(6),F.clearcoat&&d.enable(7),F.iridescence&&d.enable(8),F.alphaTest&&d.enable(9),F.vertexColors&&d.enable(10),F.vertexAlphas&&d.enable(11),F.vertexUv1s&&d.enable(12),F.vertexUv2s&&d.enable(13),F.vertexUv3s&&d.enable(14),F.vertexTangents&&d.enable(15),F.anisotropy&&d.enable(16),F.alphaHash&&d.enable(17),F.batching&&d.enable(18),F.dispersion&&d.enable(19),F.batchingColor&&d.enable(20),F.gradientMap&&d.enable(21),F.packedNormalMap&&d.enable(22),F.vertexNormals&&d.enable(23),I.push(d.mask),d.disableAll(),F.fog&&d.enable(0),F.useFog&&d.enable(1),F.flatShading&&d.enable(2),F.logarithmicDepthBuffer&&d.enable(3),F.reversedDepthBuffer&&d.enable(4),F.skinning&&d.enable(5),F.morphTargets&&d.enable(6),F.morphNormals&&d.enable(7),F.morphColors&&d.enable(8),F.premultipliedAlpha&&d.enable(9),F.shadowMapEnabled&&d.enable(10),F.doubleSided&&d.enable(11),F.flipSided&&d.enable(12),F.useDepthPacking&&d.enable(13),F.dithering&&d.enable(14),F.transmission&&d.enable(15),F.sheen&&d.enable(16),F.opaque&&d.enable(17),F.pointsUvs&&d.enable(18),F.decodeVideoTexture&&d.enable(19),F.decodeVideoTextureEmissive&&d.enable(20),F.alphaToCoverage&&d.enable(21),F.numLightProbeGrids>0&&d.enable(22),F.hasPositionAttribute&&d.enable(23),I.push(d.mask)}function z(I){const F=S[I.type];let V;if(F){const X=Go[F];V=dR.clone(X.uniforms)}else V=I.uniforms;return V}function L(I,F){let V=v.get(F);return V!==void 0?++V.usedTimes:(V=new e4(s,F,I,a),g.push(V),v.set(F,V)),V}function O(I){if(--I.usedTimes===0){const F=g.indexOf(I);g[F]=g[g.length-1],g.pop(),v.delete(I.cacheKey),I.destroy()}}function U(I){f.remove(I)}function H(){f.dispose()}return{getParameters:k,getProgramCacheKey:C,getUniforms:z,acquireProgram:L,releaseProgram:O,releaseShaderCache:U,programs:g,dispose:H}}function a4(){let s=new WeakMap;function e(d){return s.has(d)}function t(d){let f=s.get(d);return f===void 0&&(f={},s.set(d,f)),f}function i(d){s.delete(d)}function a(d,f,m){s.get(d)[f]=m}function c(){s=new WeakMap}return{has:e,get:t,remove:i,update:a,dispose:c}}function o4(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.materialVariant!==e.materialVariant?s.materialVariant-e.materialVariant:s.z!==e.z?s.z-e.z:s.id-e.id}function b2(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function x2(){const s=[];let e=0;const t=[],i=[],a=[];function c(){e=0,t.length=0,i.length=0,a.length=0}function d(x){let S=0;return x.isInstancedMesh&&(S+=2),x.isSkinnedMesh&&(S+=1),S}function f(x,S,w,k,C,T){let D=s[e];return D===void 0?(D={id:x.id,object:x,geometry:S,material:w,materialVariant:d(x),groupOrder:k,renderOrder:x.renderOrder,z:C,group:T},s[e]=D):(D.id=x.id,D.object=x,D.geometry=S,D.material=w,D.materialVariant=d(x),D.groupOrder=k,D.renderOrder=x.renderOrder,D.z=C,D.group=T),e++,D}function m(x,S,w,k,C,T){const D=f(x,S,w,k,C,T);w.transmission>0?i.push(D):w.transparent===!0?a.push(D):t.push(D)}function g(x,S,w,k,C,T){const D=f(x,S,w,k,C,T);w.transmission>0?i.unshift(D):w.transparent===!0?a.unshift(D):t.unshift(D)}function v(x,S,w){t.length>1&&t.sort(x||o4),i.length>1&&i.sort(S||b2),a.length>1&&a.sort(S||b2),w&&(t.reverse(),i.reverse(),a.reverse())}function M(){for(let x=e,S=s.length;x<S;x++){const w=s[x];if(w.id===null)break;w.id=null,w.object=null,w.geometry=null,w.material=null,w.group=null}}return{opaque:t,transmissive:i,transparent:a,init:c,push:m,unshift:g,finish:M,sort:v}}function l4(){let s=new WeakMap;function e(i,a){const c=s.get(i);let d;return c===void 0?(d=new x2,s.set(i,[d])):a>=c.length?(d=new x2,c.push(d)):d=c[a],d}function t(){s=new WeakMap}return{get:e,dispose:t}}function c4(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new J,color:new ut};break;case"SpotLight":t={position:new J,direction:new J,color:new ut,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new J,color:new ut,distance:0,decay:0};break;case"HemisphereLight":t={direction:new J,skyColor:new ut,groundColor:new ut};break;case"RectAreaLight":t={color:new ut,position:new J,halfWidth:new J,halfHeight:new J};break}return s[e.id]=t,t}}}function u4(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Oe,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let d4=0;function f4(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function h4(s){const e=new c4,t=u4(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)i.probe.push(new J);const a=new J,c=new Zt,d=new Zt;function f(g){let v=0,M=0,x=0;for(let F=0;F<9;F++)i.probe[F].set(0,0,0);let S=0,w=0,k=0,C=0,T=0,D=0,z=0,L=0,O=0,U=0,H=0;g.sort(f4);for(let F=0,V=g.length;F<V;F++){const X=g[F],_=X.color,K=X.intensity,le=X.distance;let $=null;if(X.shadow&&X.shadow.map&&(X.shadow.map.texture.format===Yu?$=X.shadow.map.texture:$=X.shadow.map.depthTexture||X.shadow.map.texture),X.isAmbientLight)v+=_.r*K,M+=_.g*K,x+=_.b*K;else if(X.isLightProbe){for(let j=0;j<9;j++)i.probe[j].addScaledVector(X.sh.coefficients[j],K);H++}else if(X.isDirectionalLight){const j=e.get(X);if(j.color.copy(X.color).multiplyScalar(X.intensity),X.castShadow){const Q=X.shadow,ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,i.directionalShadow[S]=ne,i.directionalShadowMap[S]=$,i.directionalShadowMatrix[S]=X.shadow.matrix,D++}i.directional[S]=j,S++}else if(X.isSpotLight){const j=e.get(X);j.position.setFromMatrixPosition(X.matrixWorld),j.color.copy(_).multiplyScalar(K),j.distance=le,j.coneCos=Math.cos(X.angle),j.penumbraCos=Math.cos(X.angle*(1-X.penumbra)),j.decay=X.decay,i.spot[k]=j;const Q=X.shadow;if(X.map&&(i.spotLightMap[O]=X.map,O++,Q.updateMatrices(X),X.castShadow&&U++),i.spotLightMatrix[k]=Q.matrix,X.castShadow){const ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,i.spotShadow[k]=ne,i.spotShadowMap[k]=$,L++}k++}else if(X.isRectAreaLight){const j=e.get(X);j.color.copy(_).multiplyScalar(K),j.halfWidth.set(X.width*.5,0,0),j.halfHeight.set(0,X.height*.5,0),i.rectArea[C]=j,C++}else if(X.isPointLight){const j=e.get(X);if(j.color.copy(X.color).multiplyScalar(X.intensity),j.distance=X.distance,j.decay=X.decay,X.castShadow){const Q=X.shadow,ne=t.get(X);ne.shadowIntensity=Q.intensity,ne.shadowBias=Q.bias,ne.shadowNormalBias=Q.normalBias,ne.shadowRadius=Q.radius,ne.shadowMapSize=Q.mapSize,ne.shadowCameraNear=Q.camera.near,ne.shadowCameraFar=Q.camera.far,i.pointShadow[w]=ne,i.pointShadowMap[w]=$,i.pointShadowMatrix[w]=X.shadow.matrix,z++}i.point[w]=j,w++}else if(X.isHemisphereLight){const j=e.get(X);j.skyColor.copy(X.color).multiplyScalar(K),j.groundColor.copy(X.groundColor).multiplyScalar(K),i.hemi[T]=j,T++}}C>0&&(s.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ht.LTC_FLOAT_1,i.rectAreaLTC2=ht.LTC_FLOAT_2):(i.rectAreaLTC1=ht.LTC_HALF_1,i.rectAreaLTC2=ht.LTC_HALF_2)),i.ambient[0]=v,i.ambient[1]=M,i.ambient[2]=x;const I=i.hash;(I.directionalLength!==S||I.pointLength!==w||I.spotLength!==k||I.rectAreaLength!==C||I.hemiLength!==T||I.numDirectionalShadows!==D||I.numPointShadows!==z||I.numSpotShadows!==L||I.numSpotMaps!==O||I.numLightProbes!==H)&&(i.directional.length=S,i.spot.length=k,i.rectArea.length=C,i.point.length=w,i.hemi.length=T,i.directionalShadow.length=D,i.directionalShadowMap.length=D,i.pointShadow.length=z,i.pointShadowMap.length=z,i.spotShadow.length=L,i.spotShadowMap.length=L,i.directionalShadowMatrix.length=D,i.pointShadowMatrix.length=z,i.spotLightMatrix.length=L+O-U,i.spotLightMap.length=O,i.numSpotLightShadowsWithMaps=U,i.numLightProbes=H,I.directionalLength=S,I.pointLength=w,I.spotLength=k,I.rectAreaLength=C,I.hemiLength=T,I.numDirectionalShadows=D,I.numPointShadows=z,I.numSpotShadows=L,I.numSpotMaps=O,I.numLightProbes=H,i.version=d4++)}function m(g,v){let M=0,x=0,S=0,w=0,k=0;const C=v.matrixWorldInverse;for(let T=0,D=g.length;T<D;T++){const z=g[T];if(z.isDirectionalLight){const L=i.directional[M];L.direction.setFromMatrixPosition(z.matrixWorld),a.setFromMatrixPosition(z.target.matrixWorld),L.direction.sub(a),L.direction.transformDirection(C),M++}else if(z.isSpotLight){const L=i.spot[S];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),L.direction.setFromMatrixPosition(z.matrixWorld),a.setFromMatrixPosition(z.target.matrixWorld),L.direction.sub(a),L.direction.transformDirection(C),S++}else if(z.isRectAreaLight){const L=i.rectArea[w];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),d.identity(),c.copy(z.matrixWorld),c.premultiply(C),d.extractRotation(c),L.halfWidth.set(z.width*.5,0,0),L.halfHeight.set(0,z.height*.5,0),L.halfWidth.applyMatrix4(d),L.halfHeight.applyMatrix4(d),w++}else if(z.isPointLight){const L=i.point[x];L.position.setFromMatrixPosition(z.matrixWorld),L.position.applyMatrix4(C),x++}else if(z.isHemisphereLight){const L=i.hemi[k];L.direction.setFromMatrixPosition(z.matrixWorld),L.direction.transformDirection(C),k++}}}return{setup:f,setupView:m,state:i}}function S2(s){const e=new h4(s),t=[],i=[],a=[];function c(x){M.camera=x,t.length=0,i.length=0,a.length=0}function d(x){t.push(x)}function f(x){i.push(x)}function m(x){a.push(x)}function g(){e.setup(t)}function v(x){e.setupView(t,x)}const M={lightsArray:t,shadowsArray:i,lightProbeGridArray:a,camera:null,lights:e,transmissionRenderTarget:{},textureUnits:0};return{init:c,state:M,setupLights:g,setupLightsView:v,pushLight:d,pushShadow:f,pushLightProbeGrid:m}}function p4(s){let e=new WeakMap;function t(a,c=0){const d=e.get(a);let f;return d===void 0?(f=new S2(s),e.set(a,[f])):c>=d.length?(f=new S2(s),d.push(f)):f=d[c],f}function i(){e=new WeakMap}return{get:t,dispose:i}}const m4=`void main() {
|
|
4171
4171
|
gl_Position = vec4( position, 1.0 );
|
|
4172
4172
|
}`,g4=`uniform sampler2D shadow_pass;
|
|
4173
4173
|
uniform vec2 resolution;
|
|
@@ -4194,7 +4194,7 @@ void main() {
|
|
|
4194
4194
|
squared_mean = squared_mean / samples;
|
|
4195
4195
|
float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
|
|
4196
4196
|
gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
|
|
4197
|
-
}`,A4=[new J(1,0,0),new J(-1,0,0),new J(0,1,0),new J(0,-1,0),new J(0,0,1),new J(0,0,-1)],v4=[new J(0,-1,0),new J(0,-1,0),new J(0,0,1),new J(0,0,-1),new J(0,-1,0),new J(0,-1,0)],M2=new Zt,jA=new J,dw=new J;function y4(s,e,t){let i=new Wf;const a=new Oe,c=new Oe,d=new ni,f=new U1,m=new F1,g={},v=t.maxTextureSize,M={[kc]:Ts,[Ts]:kc,[Cl]:Cl},x=new Pa({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Oe},radius:{value:4}},vertexShader:m4,fragmentShader:g4}),S=x.clone();S.defines.HORIZONTAL_PASS=1;const w=new rn;w.setAttribute("position",new si(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const k=new or(w,x),C=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=wm;let T=this.type;this.render=function(U,H,I){if(C.enabled===!1||C.autoUpdate===!1&&C.needsUpdate===!1||U.length===0)return;this.type===ZA&&(ot("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=wm);const F=s.getRenderTarget(),V=s.getActiveCubeFace(),X=s.getActiveMipmapLevel(),_=s.state;_.setBlending(kl),_.buffers.depth.getReversed()===!0?_.buffers.color.setClear(0,0,0,0):_.buffers.color.setClear(1,1,1,1),_.buffers.depth.setTest(!0),_.setScissorTest(!1);const K=T!==this.type;K&&H.traverse(function(le){le.material&&(Array.isArray(le.material)?le.material.forEach($=>$.needsUpdate=!0):le.material.needsUpdate=!0)});for(let le=0,$=U.length;le<$;le++){const j=U[le],Q=j.shadow;if(Q===void 0){ot("WebGLShadowMap:",j,"has no shadow.");continue}if(Q.autoUpdate===!1&&Q.needsUpdate===!1)continue;a.copy(Q.mapSize);const ne=Q.getFrameExtents();a.multiply(ne),c.copy(Q.mapSize),(a.x>v||a.y>v)&&(a.x>v&&(c.x=Math.floor(v/ne.x),a.x=c.x*ne.x,Q.mapSize.x=c.x),a.y>v&&(c.y=Math.floor(v/ne.y),a.y=c.y*ne.y,Q.mapSize.y=c.y));const ce=s.state.buffers.depth.getReversed();if(Q.camera._reversedDepth=ce,Q.map===null||K===!0){if(Q.map!==null&&(Q.map.depthTexture!==null&&(Q.map.depthTexture.dispose(),Q.map.depthTexture=null),Q.map.dispose()),this.type===If){if(j.isPointLight){ot("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}Q.map=new Ra(a.x,a.y,{format:Yu,type:Ll,minFilter:mi,magFilter:mi,generateMipmaps:!1}),Q.map.texture.name=j.name+".shadowMap",Q.map.depthTexture=new jf(a.x,a.y,ws),Q.map.depthTexture.name=j.name+".shadowMapDepth",Q.map.depthTexture.format=Il,Q.map.depthTexture.compareFunction=null,Q.map.depthTexture.minFilter=Ji,Q.map.depthTexture.magFilter=Ji}else j.isPointLight?(Q.map=new Q1(a.x),Q.map.depthTexture=new K3(a.x,oo)):(Q.map=new Ra(a.x,a.y),Q.map.depthTexture=new jf(a.x,a.y,oo)),Q.map.depthTexture.name=j.name+".shadowMap",Q.map.depthTexture.format=Il,this.type===wm?(Q.map.depthTexture.compareFunction=ce?Bx:zx,Q.map.depthTexture.minFilter=mi,Q.map.depthTexture.magFilter=mi):(Q.map.depthTexture.compareFunction=null,Q.map.depthTexture.minFilter=Ji,Q.map.depthTexture.magFilter=Ji);Q.camera.updateProjectionMatrix()}const ye=Q.map.isWebGLCubeRenderTarget?6:1;for(let Te=0;Te<ye;Te++){if(Q.map.isWebGLCubeRenderTarget)s.setRenderTarget(Q.map,Te),s.clear();else{Te===0&&(s.setRenderTarget(Q.map),s.clear());const Fe=Q.getViewport(Te);d.set(c.x*Fe.x,c.y*Fe.y,c.x*Fe.z,c.y*Fe.w),_.viewport(d)}if(j.isPointLight){const Fe=Q.camera,lt=Q.matrix,ht=j.distance||Fe.far;ht!==Fe.far&&(Fe.far=ht,Fe.updateProjectionMatrix()),jA.setFromMatrixPosition(j.matrixWorld),Fe.position.copy(jA),dw.copy(Fe.position),dw.add(A4[Te]),Fe.up.copy(v4[Te]),Fe.lookAt(dw),Fe.updateMatrixWorld(),lt.makeTranslation(-jA.x,-jA.y,-jA.z),M2.multiplyMatrices(Fe.projectionMatrix,Fe.matrixWorldInverse),Q._frustum.setFromProjectionMatrix(M2,Fe.coordinateSystem,Fe.reversedDepth)}else Q.updateMatrices(j);i=Q.getFrustum(),L(H,I,Q.camera,j,this.type)}Q.isPointLightShadow!==!0&&this.type===If&&D(Q,I),Q.needsUpdate=!1}T=this.type,C.needsUpdate=!1,s.setRenderTarget(F,V,X)};function D(U,H){const I=e.update(k);x.defines.VSM_SAMPLES!==U.blurSamples&&(x.defines.VSM_SAMPLES=U.blurSamples,S.defines.VSM_SAMPLES=U.blurSamples,x.needsUpdate=!0,S.needsUpdate=!0),U.mapPass===null&&(U.mapPass=new Ra(a.x,a.y,{format:Yu,type:Ll})),x.uniforms.shadow_pass.value=U.map.depthTexture,x.uniforms.resolution.value=U.mapSize,x.uniforms.radius.value=U.radius,s.setRenderTarget(U.mapPass),s.clear(),s.renderBufferDirect(H,null,I,x,k,null),S.uniforms.shadow_pass.value=U.mapPass.texture,S.uniforms.resolution.value=U.mapSize,S.uniforms.radius.value=U.radius,s.setRenderTarget(U.map),s.clear(),s.renderBufferDirect(H,null,I,S,k,null)}function z(U,H,I,F){let V=null;const X=I.isPointLight===!0?U.customDistanceMaterial:U.customDepthMaterial;if(X!==void 0)V=X;else if(V=I.isPointLight===!0?m:f,s.localClippingEnabled&&H.clipShadows===!0&&Array.isArray(H.clippingPlanes)&&H.clippingPlanes.length!==0||H.displacementMap&&H.displacementScale!==0||H.alphaMap&&H.alphaTest>0||H.map&&H.alphaTest>0||H.alphaToCoverage===!0){const _=V.uuid,K=H.uuid;let le=g[_];le===void 0&&(le={},g[_]=le);let $=le[K];$===void 0&&($=V.clone(),le[K]=$,H.addEventListener("dispose",O)),V=$}if(V.visible=H.visible,V.wireframe=H.wireframe,F===If?V.side=H.shadowSide!==null?H.shadowSide:H.side:V.side=H.shadowSide!==null?H.shadowSide:M[H.side],V.alphaMap=H.alphaMap,V.alphaTest=H.alphaToCoverage===!0?.5:H.alphaTest,V.map=H.map,V.clipShadows=H.clipShadows,V.clippingPlanes=H.clippingPlanes,V.clipIntersection=H.clipIntersection,V.displacementMap=H.displacementMap,V.displacementScale=H.displacementScale,V.displacementBias=H.displacementBias,V.wireframeLinewidth=H.wireframeLinewidth,V.linewidth=H.linewidth,I.isPointLight===!0&&V.isMeshDistanceMaterial===!0){const _=s.properties.get(V);_.light=I}return V}function L(U,H,I,F,V){if(U.visible===!1)return;if(U.layers.test(H.layers)&&(U.isMesh||U.isLine||U.isPoints)&&(U.castShadow||U.receiveShadow&&V===If)&&(!U.frustumCulled||i.intersectsObject(U))){U.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,U.matrixWorld);const K=e.update(U),le=U.material;if(Array.isArray(le)){const $=K.groups;for(let j=0,Q=$.length;j<Q;j++){const ne=$[j],ce=le[ne.materialIndex];if(ce&&ce.visible){const ye=z(U,ce,F,V);U.onBeforeShadow(s,U,H,I,K,ye,ne),s.renderBufferDirect(I,null,K,ye,U,ne),U.onAfterShadow(s,U,H,I,K,ye,ne)}}}else if(le.visible){const $=z(U,le,F,V);U.onBeforeShadow(s,U,H,I,K,$,null),s.renderBufferDirect(I,null,K,$,U,null),U.onAfterShadow(s,U,H,I,K,$,null)}}const _=U.children;for(let K=0,le=_.length;K<le;K++)L(_[K],H,I,F,V)}function O(U){U.target.removeEventListener("dispose",O);for(const I in g){const F=g[I],V=U.target.uuid;V in F&&(F[V].dispose(),delete F[V])}}}function b4(s,e){function t(){let ae=!1;const _e=new ni;let Le=null;const it=new ni(0,0,0,0);return{setMask:function(tt){Le!==tt&&!ae&&(s.colorMask(tt,tt,tt,tt),Le=tt)},setLocked:function(tt){ae=tt},setClear:function(tt,Ne,Mt,gt,yn){yn===!0&&(tt*=gt,Ne*=gt,Mt*=gt),_e.set(tt,Ne,Mt,gt),it.equals(_e)===!1&&(s.clearColor(tt,Ne,Mt,gt),it.copy(_e))},reset:function(){ae=!1,Le=null,it.set(-1,0,0,0)}}}function i(){let ae=!1,_e=!1,Le=null,it=null,tt=null;return{setReversed:function(Ne){if(_e!==Ne){const Mt=e.get("EXT_clip_control");Ne?Mt.clipControlEXT(Mt.LOWER_LEFT_EXT,Mt.ZERO_TO_ONE_EXT):Mt.clipControlEXT(Mt.LOWER_LEFT_EXT,Mt.NEGATIVE_ONE_TO_ONE_EXT),_e=Ne;const gt=tt;tt=null,this.setClear(gt)}},getReversed:function(){return _e},setTest:function(Ne){Ne?He(s.DEPTH_TEST):pt(s.DEPTH_TEST)},setMask:function(Ne){Le!==Ne&&!ae&&(s.depthMask(Ne),Le=Ne)},setFunc:function(Ne){if(_e&&(Ne=OL[Ne]),it!==Ne){switch(Ne){case kb:s.depthFunc(s.NEVER);break;case Db:s.depthFunc(s.ALWAYS);break;case Lb:s.depthFunc(s.LESS);break;case Vf:s.depthFunc(s.LEQUAL);break;case Ib:s.depthFunc(s.EQUAL);break;case Nb:s.depthFunc(s.GEQUAL);break;case zb:s.depthFunc(s.GREATER);break;case Bb:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}it=Ne}},setLocked:function(Ne){ae=Ne},setClear:function(Ne){tt!==Ne&&(tt=Ne,_e&&(Ne=1-Ne),s.clearDepth(Ne))},reset:function(){ae=!1,Le=null,it=null,tt=null,_e=!1}}}function a(){let ae=!1,_e=null,Le=null,it=null,tt=null,Ne=null,Mt=null,gt=null,yn=null;return{setTest:function(Rn){ae||(Rn?He(s.STENCIL_TEST):pt(s.STENCIL_TEST))},setMask:function(Rn){_e!==Rn&&!ae&&(s.stencilMask(Rn),_e=Rn)},setFunc:function(Rn,Qi,Gr){(Le!==Rn||it!==Qi||tt!==Gr)&&(s.stencilFunc(Rn,Qi,Gr),Le=Rn,it=Qi,tt=Gr)},setOp:function(Rn,Qi,Gr){(Ne!==Rn||Mt!==Qi||gt!==Gr)&&(s.stencilOp(Rn,Qi,Gr),Ne=Rn,Mt=Qi,gt=Gr)},setLocked:function(Rn){ae=Rn},setClear:function(Rn){yn!==Rn&&(s.clearStencil(Rn),yn=Rn)},reset:function(){ae=!1,_e=null,Le=null,it=null,tt=null,Ne=null,Mt=null,gt=null,yn=null}}}const c=new t,d=new i,f=new a,m=new WeakMap,g=new WeakMap;let v={},M={},x={},S=new WeakMap,w=[],k=null,C=!1,T=null,D=null,z=null,L=null,O=null,U=null,H=null,I=new ut(0,0,0),F=0,V=!1,X=null,_=null,K=null,le=null,$=null;const j=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Q=!1,ne=0;const ce=s.getParameter(s.VERSION);ce.indexOf("WebGL")!==-1?(ne=parseFloat(/^WebGL (\d)/.exec(ce)[1]),Q=ne>=1):ce.indexOf("OpenGL ES")!==-1&&(ne=parseFloat(/^OpenGL ES (\d)/.exec(ce)[1]),Q=ne>=2);let ye=null,Te={};const Fe=s.getParameter(s.SCISSOR_BOX),lt=s.getParameter(s.VIEWPORT),ht=new ni().fromArray(Fe),ct=new ni().fromArray(lt);function Pe(ae,_e,Le,it){const tt=new Uint8Array(4),Ne=s.createTexture();s.bindTexture(ae,Ne),s.texParameteri(ae,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(ae,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let Mt=0;Mt<Le;Mt++)ae===s.TEXTURE_3D||ae===s.TEXTURE_2D_ARRAY?s.texImage3D(_e,0,s.RGBA,1,1,it,0,s.RGBA,s.UNSIGNED_BYTE,tt):s.texImage2D(_e+Mt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,tt);return Ne}const Xe={};Xe[s.TEXTURE_2D]=Pe(s.TEXTURE_2D,s.TEXTURE_2D,1),Xe[s.TEXTURE_CUBE_MAP]=Pe(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),Xe[s.TEXTURE_2D_ARRAY]=Pe(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),Xe[s.TEXTURE_3D]=Pe(s.TEXTURE_3D,s.TEXTURE_3D,1,1),c.setClear(0,0,0,1),d.setClear(1),f.setClear(0),He(s.DEPTH_TEST),d.setFunc(Vf),qe(!1),Ze(Pw),He(s.CULL_FACE),xe(kl);function He(ae){v[ae]!==!0&&(s.enable(ae),v[ae]=!0)}function pt(ae){v[ae]!==!1&&(s.disable(ae),v[ae]=!1)}function Nt(ae,_e){return x[ae]!==_e?(s.bindFramebuffer(ae,_e),x[ae]=_e,ae===s.DRAW_FRAMEBUFFER&&(x[s.FRAMEBUFFER]=_e),ae===s.FRAMEBUFFER&&(x[s.DRAW_FRAMEBUFFER]=_e),!0):!1}function nt(ae,_e){let Le=w,it=!1;if(ae){Le=S.get(_e),Le===void 0&&(Le=[],S.set(_e,Le));const tt=ae.textures;if(Le.length!==tt.length||Le[0]!==s.COLOR_ATTACHMENT0){for(let Ne=0,Mt=tt.length;Ne<Mt;Ne++)Le[Ne]=s.COLOR_ATTACHMENT0+Ne;Le.length=tt.length,it=!0}}else Le[0]!==s.BACK&&(Le[0]=s.BACK,it=!0);it&&s.drawBuffers(Le)}function sn(ae){return k!==ae?(s.useProgram(ae),k=ae,!0):!1}const Dt={[Vu]:s.FUNC_ADD,[a3]:s.FUNC_SUBTRACT,[o3]:s.FUNC_REVERSE_SUBTRACT};Dt[l3]=s.MIN,Dt[c3]=s.MAX;const Be={[u3]:s.ZERO,[d3]:s.ONE,[f3]:s.SRC_COLOR,[Rb]:s.SRC_ALPHA,[v3]:s.SRC_ALPHA_SATURATE,[g3]:s.DST_COLOR,[p3]:s.DST_ALPHA,[h3]:s.ONE_MINUS_SRC_COLOR,[Pb]:s.ONE_MINUS_SRC_ALPHA,[A3]:s.ONE_MINUS_DST_COLOR,[m3]:s.ONE_MINUS_DST_ALPHA,[y3]:s.CONSTANT_COLOR,[b3]:s.ONE_MINUS_CONSTANT_COLOR,[x3]:s.CONSTANT_ALPHA,[S3]:s.ONE_MINUS_CONSTANT_ALPHA};function xe(ae,_e,Le,it,tt,Ne,Mt,gt,yn,Rn){if(ae===kl){C===!0&&(pt(s.BLEND),C=!1);return}if(C===!1&&(He(s.BLEND),C=!0),ae!==s3){if(ae!==T||Rn!==V){if((D!==Vu||O!==Vu)&&(s.blendEquation(s.FUNC_ADD),D=Vu,O=Vu),Rn)switch(ae){case Uf:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case kw:s.blendFunc(s.ONE,s.ONE);break;case Dw:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Lw:s.blendFuncSeparate(s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ZERO,s.ONE);break;default:kt("WebGLState: Invalid blending: ",ae);break}else switch(ae){case Uf:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case kw:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE,s.ONE,s.ONE);break;case Dw:kt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case Lw:kt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:kt("WebGLState: Invalid blending: ",ae);break}z=null,L=null,U=null,H=null,I.set(0,0,0),F=0,T=ae,V=Rn}return}tt=tt||_e,Ne=Ne||Le,Mt=Mt||it,(_e!==D||tt!==O)&&(s.blendEquationSeparate(Dt[_e],Dt[tt]),D=_e,O=tt),(Le!==z||it!==L||Ne!==U||Mt!==H)&&(s.blendFuncSeparate(Be[Le],Be[it],Be[Ne],Be[Mt]),z=Le,L=it,U=Ne,H=Mt),(gt.equals(I)===!1||yn!==F)&&(s.blendColor(gt.r,gt.g,gt.b,yn),I.copy(gt),F=yn),T=ae,V=!1}function Ue(ae,_e){ae.side===Cl?pt(s.CULL_FACE):He(s.CULL_FACE);let Le=ae.side===Ts;_e&&(Le=!Le),qe(Le),ae.blending===Uf&&ae.transparent===!1?xe(kl):xe(ae.blending,ae.blendEquation,ae.blendSrc,ae.blendDst,ae.blendEquationAlpha,ae.blendSrcAlpha,ae.blendDstAlpha,ae.blendColor,ae.blendAlpha,ae.premultipliedAlpha),d.setFunc(ae.depthFunc),d.setTest(ae.depthTest),d.setMask(ae.depthWrite),c.setMask(ae.colorWrite);const it=ae.stencilWrite;f.setTest(it),it&&(f.setMask(ae.stencilWriteMask),f.setFunc(ae.stencilFunc,ae.stencilRef,ae.stencilFuncMask),f.setOp(ae.stencilFail,ae.stencilZFail,ae.stencilZPass)),bt(ae.polygonOffset,ae.polygonOffsetFactor,ae.polygonOffsetUnits),ae.alphaToCoverage===!0?He(s.SAMPLE_ALPHA_TO_COVERAGE):pt(s.SAMPLE_ALPHA_TO_COVERAGE)}function qe(ae){X!==ae&&(ae?s.frontFace(s.CW):s.frontFace(s.CCW),X=ae)}function Ze(ae){ae!==n3?(He(s.CULL_FACE),ae!==_&&(ae===Pw?s.cullFace(s.BACK):ae===i3?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):pt(s.CULL_FACE),_=ae}function Pt(ae){ae!==K&&(Q&&s.lineWidth(ae),K=ae)}function bt(ae,_e,Le){ae?(He(s.POLYGON_OFFSET_FILL),(le!==_e||$!==Le)&&(le=_e,$=Le,d.getReversed()&&(_e=-_e),s.polygonOffset(_e,Le))):pt(s.POLYGON_OFFSET_FILL)}function zt(ae){ae?He(s.SCISSOR_TEST):pt(s.SCISSOR_TEST)}function Et(ae){ae===void 0&&(ae=s.TEXTURE0+j-1),ye!==ae&&(s.activeTexture(ae),ye=ae)}function ee(ae,_e,Le){Le===void 0&&(ye===null?Le=s.TEXTURE0+j-1:Le=ye);let it=Te[Le];it===void 0&&(it={type:void 0,texture:void 0},Te[Le]=it),(it.type!==ae||it.texture!==_e)&&(ye!==Le&&(s.activeTexture(Le),ye=Le),s.bindTexture(ae,_e||Xe[ae]),it.type=ae,it.texture=_e)}function Cn(){const ae=Te[ye];ae!==void 0&&ae.type!==void 0&&(s.bindTexture(ae.type,null),ae.type=void 0,ae.texture=void 0)}function an(){try{s.compressedTexImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Y(){try{s.compressedTexImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function B(){try{s.texSubImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function de(){try{s.texSubImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function me(){try{s.compressedTexSubImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Ce(){try{s.compressedTexSubImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Qe(){try{s.texStorage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Ke(){try{s.texStorage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function ke(){try{s.texImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function De(){try{s.texImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function et(ae){return M[ae]!==void 0?M[ae]:s.getParameter(ae)}function Rt(ae,_e){M[ae]!==_e&&(s.pixelStorei(ae,_e),M[ae]=_e)}function rt(ae){ht.equals(ae)===!1&&(s.scissor(ae.x,ae.y,ae.z,ae.w),ht.copy(ae))}function st(ae){ct.equals(ae)===!1&&(s.viewport(ae.x,ae.y,ae.z,ae.w),ct.copy(ae))}function mt(ae,_e){let Le=g.get(_e);Le===void 0&&(Le=new WeakMap,g.set(_e,Le));let it=Le.get(ae);it===void 0&&(it=s.getUniformBlockIndex(_e,ae.name),Le.set(ae,it))}function Ct(ae,_e){const it=g.get(_e).get(ae);m.get(_e)!==it&&(s.uniformBlockBinding(_e,it,ae.__bindingPointIndex),m.set(_e,it))}function jt(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),d.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),s.pixelStorei(s.PACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL),s.pixelStorei(s.PACK_ROW_LENGTH,0),s.pixelStorei(s.PACK_SKIP_PIXELS,0),s.pixelStorei(s.PACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_ROW_LENGTH,0),s.pixelStorei(s.UNPACK_IMAGE_HEIGHT,0),s.pixelStorei(s.UNPACK_SKIP_PIXELS,0),s.pixelStorei(s.UNPACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_SKIP_IMAGES,0),v={},M={},ye=null,Te={},x={},S=new WeakMap,w=[],k=null,C=!1,T=null,D=null,z=null,L=null,O=null,U=null,H=null,I=new ut(0,0,0),F=0,V=!1,X=null,_=null,K=null,le=null,$=null,ht.set(0,0,s.canvas.width,s.canvas.height),ct.set(0,0,s.canvas.width,s.canvas.height),c.reset(),d.reset(),f.reset()}return{buffers:{color:c,depth:d,stencil:f},enable:He,disable:pt,bindFramebuffer:Nt,drawBuffers:nt,useProgram:sn,setBlending:xe,setMaterial:Ue,setFlipSided:qe,setCullFace:Ze,setLineWidth:Pt,setPolygonOffset:bt,setScissorTest:zt,activeTexture:Et,bindTexture:ee,unbindTexture:Cn,compressedTexImage2D:an,compressedTexImage3D:Y,texImage2D:ke,texImage3D:De,pixelStorei:Rt,getParameter:et,updateUBOMapping:mt,uniformBlockBinding:Ct,texStorage2D:Qe,texStorage3D:Ke,texSubImage2D:B,texSubImage3D:de,compressedTexSubImage2D:me,compressedTexSubImage3D:Ce,scissor:rt,viewport:st,reset:jt}}function x4(s,e,t,i,a,c,d){const f=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,m=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Oe,v=new WeakMap,M=new Set;let x;const S=new WeakMap;let w=!1;try{w=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function k(Y,B){return w?new OffscreenCanvas(Y,B):mv("canvas")}function C(Y,B,de){let me=1;const Ce=an(Y);if((Ce.width>de||Ce.height>de)&&(me=de/Math.max(Ce.width,Ce.height)),me<1)if(typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Y instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Y instanceof ImageBitmap||typeof VideoFrame<"u"&&Y instanceof VideoFrame){const Qe=Math.floor(me*Ce.width),Ke=Math.floor(me*Ce.height);x===void 0&&(x=k(Qe,Ke));const ke=B?k(Qe,Ke):x;return ke.width=Qe,ke.height=Ke,ke.getContext("2d").drawImage(Y,0,0,Qe,Ke),ot("WebGLRenderer: Texture has been resized from ("+Ce.width+"x"+Ce.height+") to ("+Qe+"x"+Ke+")."),ke}else return"data"in Y&&ot("WebGLRenderer: Image in DataTexture is too big ("+Ce.width+"x"+Ce.height+")."),Y;return Y}function T(Y){return Y.generateMipmaps}function D(Y){s.generateMipmap(Y)}function z(Y){return Y.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:Y.isWebGL3DRenderTarget?s.TEXTURE_3D:Y.isWebGLArrayRenderTarget||Y.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function L(Y,B,de,me,Ce,Qe=!1){if(Y!==null){if(s[Y]!==void 0)return s[Y];ot("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Y+"'")}let Ke;me&&(Ke=e.get("EXT_texture_norm16"),Ke||ot("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let ke=B;if(B===s.RED&&(de===s.FLOAT&&(ke=s.R32F),de===s.HALF_FLOAT&&(ke=s.R16F),de===s.UNSIGNED_BYTE&&(ke=s.R8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.R16_EXT),de===s.SHORT&&Ke&&(ke=Ke.R16_SNORM_EXT)),B===s.RED_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.R8UI),de===s.UNSIGNED_SHORT&&(ke=s.R16UI),de===s.UNSIGNED_INT&&(ke=s.R32UI),de===s.BYTE&&(ke=s.R8I),de===s.SHORT&&(ke=s.R16I),de===s.INT&&(ke=s.R32I)),B===s.RG&&(de===s.FLOAT&&(ke=s.RG32F),de===s.HALF_FLOAT&&(ke=s.RG16F),de===s.UNSIGNED_BYTE&&(ke=s.RG8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RG16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RG16_SNORM_EXT)),B===s.RG_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RG8UI),de===s.UNSIGNED_SHORT&&(ke=s.RG16UI),de===s.UNSIGNED_INT&&(ke=s.RG32UI),de===s.BYTE&&(ke=s.RG8I),de===s.SHORT&&(ke=s.RG16I),de===s.INT&&(ke=s.RG32I)),B===s.RGB_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RGB8UI),de===s.UNSIGNED_SHORT&&(ke=s.RGB16UI),de===s.UNSIGNED_INT&&(ke=s.RGB32UI),de===s.BYTE&&(ke=s.RGB8I),de===s.SHORT&&(ke=s.RGB16I),de===s.INT&&(ke=s.RGB32I)),B===s.RGBA_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RGBA8UI),de===s.UNSIGNED_SHORT&&(ke=s.RGBA16UI),de===s.UNSIGNED_INT&&(ke=s.RGBA32UI),de===s.BYTE&&(ke=s.RGBA8I),de===s.SHORT&&(ke=s.RGBA16I),de===s.INT&&(ke=s.RGBA32I)),B===s.RGB&&(de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RGB16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RGB16_SNORM_EXT),de===s.UNSIGNED_INT_5_9_9_9_REV&&(ke=s.RGB9_E5),de===s.UNSIGNED_INT_10F_11F_11F_REV&&(ke=s.R11F_G11F_B10F)),B===s.RGBA){const De=Qe?hv:wn.getTransfer(Ce);de===s.FLOAT&&(ke=s.RGBA32F),de===s.HALF_FLOAT&&(ke=s.RGBA16F),de===s.UNSIGNED_BYTE&&(ke=De===_n?s.SRGB8_ALPHA8:s.RGBA8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RGBA16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RGBA16_SNORM_EXT),de===s.UNSIGNED_SHORT_4_4_4_4&&(ke=s.RGBA4),de===s.UNSIGNED_SHORT_5_5_5_1&&(ke=s.RGB5_A1)}return(ke===s.R16F||ke===s.R32F||ke===s.RG16F||ke===s.RG32F||ke===s.RGBA16F||ke===s.RGBA32F)&&e.get("EXT_color_buffer_float"),ke}function O(Y,B){let de;return Y?B===null||B===oo||B===Cm?de=s.DEPTH24_STENCIL8:B===ws?de=s.DEPTH32F_STENCIL8:B===Em&&(de=s.DEPTH24_STENCIL8,ot("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):B===null||B===oo||B===Cm?de=s.DEPTH_COMPONENT24:B===ws?de=s.DEPTH_COMPONENT32F:B===Em&&(de=s.DEPTH_COMPONENT16),de}function U(Y,B){return T(Y)===!0||Y.isFramebufferTexture&&Y.minFilter!==Ji&&Y.minFilter!==mi?Math.log2(Math.max(B.width,B.height))+1:Y.mipmaps!==void 0&&Y.mipmaps.length>0?Y.mipmaps.length:Y.isCompressedTexture&&Array.isArray(Y.image)?B.mipmaps.length:1}function H(Y){const B=Y.target;B.removeEventListener("dispose",H),F(B),B.isVideoTexture&&v.delete(B),B.isHTMLTexture&&M.delete(B)}function I(Y){const B=Y.target;B.removeEventListener("dispose",I),X(B)}function F(Y){const B=i.get(Y);if(B.__webglInit===void 0)return;const de=Y.source,me=S.get(de);if(me){const Ce=me[B.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&V(Y),Object.keys(me).length===0&&S.delete(de)}i.remove(Y)}function V(Y){const B=i.get(Y);s.deleteTexture(B.__webglTexture);const de=Y.source,me=S.get(de);delete me[B.__cacheKey],d.memory.textures--}function X(Y){const B=i.get(Y);if(Y.depthTexture&&(Y.depthTexture.dispose(),i.remove(Y.depthTexture)),Y.isWebGLCubeRenderTarget)for(let me=0;me<6;me++){if(Array.isArray(B.__webglFramebuffer[me]))for(let Ce=0;Ce<B.__webglFramebuffer[me].length;Ce++)s.deleteFramebuffer(B.__webglFramebuffer[me][Ce]);else s.deleteFramebuffer(B.__webglFramebuffer[me]);B.__webglDepthbuffer&&s.deleteRenderbuffer(B.__webglDepthbuffer[me])}else{if(Array.isArray(B.__webglFramebuffer))for(let me=0;me<B.__webglFramebuffer.length;me++)s.deleteFramebuffer(B.__webglFramebuffer[me]);else s.deleteFramebuffer(B.__webglFramebuffer);if(B.__webglDepthbuffer&&s.deleteRenderbuffer(B.__webglDepthbuffer),B.__webglMultisampledFramebuffer&&s.deleteFramebuffer(B.__webglMultisampledFramebuffer),B.__webglColorRenderbuffer)for(let me=0;me<B.__webglColorRenderbuffer.length;me++)B.__webglColorRenderbuffer[me]&&s.deleteRenderbuffer(B.__webglColorRenderbuffer[me]);B.__webglDepthRenderbuffer&&s.deleteRenderbuffer(B.__webglDepthRenderbuffer)}const de=Y.textures;for(let me=0,Ce=de.length;me<Ce;me++){const Qe=i.get(de[me]);Qe.__webglTexture&&(s.deleteTexture(Qe.__webglTexture),d.memory.textures--),i.remove(de[me])}i.remove(Y)}let _=0;function K(){_=0}function le(){return _}function $(Y){_=Y}function j(){const Y=_;return Y>=a.maxTextures&&ot("WebGLTextures: Trying to use "+Y+" texture units while this GPU supports only "+a.maxTextures),_+=1,Y}function Q(Y){const B=[];return B.push(Y.wrapS),B.push(Y.wrapT),B.push(Y.wrapR||0),B.push(Y.magFilter),B.push(Y.minFilter),B.push(Y.anisotropy),B.push(Y.internalFormat),B.push(Y.format),B.push(Y.type),B.push(Y.generateMipmaps),B.push(Y.premultiplyAlpha),B.push(Y.flipY),B.push(Y.unpackAlignment),B.push(Y.colorSpace),B.join()}function ne(Y,B){const de=i.get(Y);if(Y.isVideoTexture&&ee(Y),Y.isRenderTargetTexture===!1&&Y.isExternalTexture!==!0&&Y.version>0&&de.__version!==Y.version){const me=Y.image;if(me===null)ot("WebGLRenderer: Texture marked for update but no image data found.");else if(me.complete===!1)ot("WebGLRenderer: Texture marked for update but image is incomplete");else{pt(de,Y,B);return}}else Y.isExternalTexture&&(de.__webglTexture=Y.sourceTexture?Y.sourceTexture:null);t.bindTexture(s.TEXTURE_2D,de.__webglTexture,s.TEXTURE0+B)}function ce(Y,B){const de=i.get(Y);if(Y.isRenderTargetTexture===!1&&Y.version>0&&de.__version!==Y.version){pt(de,Y,B);return}else Y.isExternalTexture&&(de.__webglTexture=Y.sourceTexture?Y.sourceTexture:null);t.bindTexture(s.TEXTURE_2D_ARRAY,de.__webglTexture,s.TEXTURE0+B)}function ye(Y,B){const de=i.get(Y);if(Y.isRenderTargetTexture===!1&&Y.version>0&&de.__version!==Y.version){pt(de,Y,B);return}t.bindTexture(s.TEXTURE_3D,de.__webglTexture,s.TEXTURE0+B)}function Te(Y,B){const de=i.get(Y);if(Y.isCubeDepthTexture!==!0&&Y.version>0&&de.__version!==Y.version){Nt(de,Y,B);return}t.bindTexture(s.TEXTURE_CUBE_MAP,de.__webglTexture,s.TEXTURE0+B)}const Fe={[Dc]:s.REPEAT,[Zs]:s.CLAMP_TO_EDGE,[lv]:s.MIRRORED_REPEAT},lt={[Ji]:s.NEAREST,[f1]:s.NEAREST_MIPMAP_NEAREST,[xm]:s.NEAREST_MIPMAP_LINEAR,[mi]:s.LINEAR,[$A]:s.LINEAR_MIPMAP_NEAREST,[Rl]:s.LINEAR_MIPMAP_LINEAR},ht={[D3]:s.NEVER,[B3]:s.ALWAYS,[L3]:s.LESS,[zx]:s.LEQUAL,[I3]:s.EQUAL,[Bx]:s.GEQUAL,[N3]:s.GREATER,[z3]:s.NOTEQUAL};function ct(Y,B){if(B.type===ws&&e.has("OES_texture_float_linear")===!1&&(B.magFilter===mi||B.magFilter===$A||B.magFilter===xm||B.magFilter===Rl||B.minFilter===mi||B.minFilter===$A||B.minFilter===xm||B.minFilter===Rl)&&ot("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(Y,s.TEXTURE_WRAP_S,Fe[B.wrapS]),s.texParameteri(Y,s.TEXTURE_WRAP_T,Fe[B.wrapT]),(Y===s.TEXTURE_3D||Y===s.TEXTURE_2D_ARRAY)&&s.texParameteri(Y,s.TEXTURE_WRAP_R,Fe[B.wrapR]),s.texParameteri(Y,s.TEXTURE_MAG_FILTER,lt[B.magFilter]),s.texParameteri(Y,s.TEXTURE_MIN_FILTER,lt[B.minFilter]),B.compareFunction&&(s.texParameteri(Y,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(Y,s.TEXTURE_COMPARE_FUNC,ht[B.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(B.magFilter===Ji||B.minFilter!==xm&&B.minFilter!==Rl||B.type===ws&&e.has("OES_texture_float_linear")===!1)return;if(B.anisotropy>1||i.get(B).__currentAnisotropy){const de=e.get("EXT_texture_filter_anisotropic");s.texParameterf(Y,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(B.anisotropy,a.getMaxAnisotropy())),i.get(B).__currentAnisotropy=B.anisotropy}}}function Pe(Y,B){let de=!1;Y.__webglInit===void 0&&(Y.__webglInit=!0,B.addEventListener("dispose",H));const me=B.source;let Ce=S.get(me);Ce===void 0&&(Ce={},S.set(me,Ce));const Qe=Q(B);if(Qe!==Y.__cacheKey){Ce[Qe]===void 0&&(Ce[Qe]={texture:s.createTexture(),usedTimes:0},d.memory.textures++,de=!0),Ce[Qe].usedTimes++;const Ke=Ce[Y.__cacheKey];Ke!==void 0&&(Ce[Y.__cacheKey].usedTimes--,Ke.usedTimes===0&&V(B)),Y.__cacheKey=Qe,Y.__webglTexture=Ce[Qe].texture}return de}function Xe(Y,B,de){return Math.floor(Math.floor(Y/de)/B)}function He(Y,B,de,me){const Qe=Y.updateRanges;if(Qe.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,B.width,B.height,de,me,B.data);else{Qe.sort((Rt,rt)=>Rt.start-rt.start);let Ke=0;for(let Rt=1;Rt<Qe.length;Rt++){const rt=Qe[Ke],st=Qe[Rt],mt=rt.start+rt.count,Ct=Xe(st.start,B.width,4),jt=Xe(rt.start,B.width,4);st.start<=mt+1&&Ct===jt&&Xe(st.start+st.count-1,B.width,4)===Ct?rt.count=Math.max(rt.count,st.start+st.count-rt.start):(++Ke,Qe[Ke]=st)}Qe.length=Ke+1;const ke=t.getParameter(s.UNPACK_ROW_LENGTH),De=t.getParameter(s.UNPACK_SKIP_PIXELS),et=t.getParameter(s.UNPACK_SKIP_ROWS);t.pixelStorei(s.UNPACK_ROW_LENGTH,B.width);for(let Rt=0,rt=Qe.length;Rt<rt;Rt++){const st=Qe[Rt],mt=Math.floor(st.start/4),Ct=Math.ceil(st.count/4),jt=mt%B.width,ae=Math.floor(mt/B.width),_e=Ct,Le=1;t.pixelStorei(s.UNPACK_SKIP_PIXELS,jt),t.pixelStorei(s.UNPACK_SKIP_ROWS,ae),t.texSubImage2D(s.TEXTURE_2D,0,jt,ae,_e,Le,de,me,B.data)}Y.clearUpdateRanges(),t.pixelStorei(s.UNPACK_ROW_LENGTH,ke),t.pixelStorei(s.UNPACK_SKIP_PIXELS,De),t.pixelStorei(s.UNPACK_SKIP_ROWS,et)}}function pt(Y,B,de){let me=s.TEXTURE_2D;(B.isDataArrayTexture||B.isCompressedArrayTexture)&&(me=s.TEXTURE_2D_ARRAY),B.isData3DTexture&&(me=s.TEXTURE_3D);const Ce=Pe(Y,B),Qe=B.source;t.bindTexture(me,Y.__webglTexture,s.TEXTURE0+de);const Ke=i.get(Qe);if(Qe.version!==Ke.__version||Ce===!0){if(t.activeTexture(s.TEXTURE0+de),(typeof ImageBitmap<"u"&&B.image instanceof ImageBitmap)===!1){const Le=wn.getPrimaries(wn.workingColorSpace),it=B.colorSpace===Cc?null:wn.getPrimaries(B.colorSpace),tt=B.colorSpace===Cc||Le===it?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,tt)}t.pixelStorei(s.UNPACK_ALIGNMENT,B.unpackAlignment);let De=C(B.image,!1,a.maxTextureSize);De=Cn(B,De);const et=c.convert(B.format,B.colorSpace),Rt=c.convert(B.type);let rt=L(B.internalFormat,et,Rt,B.normalized,B.colorSpace,B.isVideoTexture);ct(me,B);let st;const mt=B.mipmaps,Ct=B.isVideoTexture!==!0,jt=Ke.__version===void 0||Ce===!0,ae=Qe.dataReady,_e=U(B,De);if(B.isDepthTexture)rt=O(B.format===Gu,B.type),jt&&(Ct?t.texStorage2D(s.TEXTURE_2D,1,rt,De.width,De.height):t.texImage2D(s.TEXTURE_2D,0,rt,De.width,De.height,0,et,Rt,null));else if(B.isDataTexture)if(mt.length>0){Ct&&jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,mt[0].width,mt[0].height);for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,Rt,st.data):t.texImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,et,Rt,st.data);B.generateMipmaps=!1}else Ct?(jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,De.width,De.height),ae&&He(B,De,et,Rt)):t.texImage2D(s.TEXTURE_2D,0,rt,De.width,De.height,0,et,Rt,De.data);else if(B.isCompressedTexture)if(B.isCompressedArrayTexture){Ct&&jt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,_e,rt,mt[0].width,mt[0].height,De.depth);for(let Le=0,it=mt.length;Le<it;Le++)if(st=mt[Le],B.format!==as)if(et!==null)if(Ct){if(ae)if(B.layerUpdates.size>0){const tt=Ww(st.width,st.height,B.format,B.type);for(const Ne of B.layerUpdates){const Mt=st.data.subarray(Ne*tt/st.data.BYTES_PER_ELEMENT,(Ne+1)*tt/st.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,Ne,st.width,st.height,1,et,Mt)}B.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,0,st.width,st.height,De.depth,et,st.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,Le,rt,st.width,st.height,De.depth,0,st.data,0,0);else ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ct?ae&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,0,st.width,st.height,De.depth,et,Rt,st.data):t.texImage3D(s.TEXTURE_2D_ARRAY,Le,rt,st.width,st.height,De.depth,0,et,Rt,st.data)}else{Ct&&jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,mt[0].width,mt[0].height);for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],B.format!==as?et!==null?Ct?ae&&t.compressedTexSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,st.data):t.compressedTexImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,st.data):ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,Rt,st.data):t.texImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,et,Rt,st.data)}else if(B.isDataArrayTexture)if(Ct){if(jt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,_e,rt,De.width,De.height,De.depth),ae)if(B.layerUpdates.size>0){const Le=Ww(De.width,De.height,B.format,B.type);for(const it of B.layerUpdates){const tt=De.data.subarray(it*Le/De.data.BYTES_PER_ELEMENT,(it+1)*Le/De.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,it,De.width,De.height,1,et,Rt,tt)}B.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,De.width,De.height,De.depth,et,Rt,De.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,rt,De.width,De.height,De.depth,0,et,Rt,De.data);else if(B.isData3DTexture)Ct?(jt&&t.texStorage3D(s.TEXTURE_3D,_e,rt,De.width,De.height,De.depth),ae&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,De.width,De.height,De.depth,et,Rt,De.data)):t.texImage3D(s.TEXTURE_3D,0,rt,De.width,De.height,De.depth,0,et,Rt,De.data);else if(B.isFramebufferTexture){if(jt)if(Ct)t.texStorage2D(s.TEXTURE_2D,_e,rt,De.width,De.height);else{let Le=De.width,it=De.height;for(let tt=0;tt<_e;tt++)t.texImage2D(s.TEXTURE_2D,tt,rt,Le,it,0,et,Rt,null),Le>>=1,it>>=1}}else if(B.isHTMLTexture){if("texElementImage2D"in s){const Le=s.canvas;if(Le.hasAttribute("layoutsubtree")||Le.setAttribute("layoutsubtree","true"),De.parentNode!==Le){Le.appendChild(De),M.add(B),Le.onpaint=it=>{const tt=it.changedElements;for(const Ne of M)tt.includes(Ne.image)&&(Ne.needsUpdate=!0)},Le.requestPaint();return}if(s.texElementImage2D.length===3)s.texElementImage2D(s.TEXTURE_2D,s.RGBA8,De);else{const tt=s.RGBA,Ne=s.RGBA,Mt=s.UNSIGNED_BYTE;s.texElementImage2D(s.TEXTURE_2D,0,tt,Ne,Mt,De)}s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE)}}else if(mt.length>0){if(Ct&&jt){const Le=an(mt[0]);t.texStorage2D(s.TEXTURE_2D,_e,rt,Le.width,Le.height)}for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,et,Rt,st):t.texImage2D(s.TEXTURE_2D,Le,rt,et,Rt,st);B.generateMipmaps=!1}else if(Ct){if(jt){const Le=an(De);t.texStorage2D(s.TEXTURE_2D,_e,rt,Le.width,Le.height)}ae&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,et,Rt,De)}else t.texImage2D(s.TEXTURE_2D,0,rt,et,Rt,De);T(B)&&D(me),Ke.__version=Qe.version,B.onUpdate&&B.onUpdate(B)}Y.__version=B.version}function Nt(Y,B,de){if(B.image.length!==6)return;const me=Pe(Y,B),Ce=B.source;t.bindTexture(s.TEXTURE_CUBE_MAP,Y.__webglTexture,s.TEXTURE0+de);const Qe=i.get(Ce);if(Ce.version!==Qe.__version||me===!0){t.activeTexture(s.TEXTURE0+de);const Ke=wn.getPrimaries(wn.workingColorSpace),ke=B.colorSpace===Cc?null:wn.getPrimaries(B.colorSpace),De=B.colorSpace===Cc||Ke===ke?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(s.UNPACK_ALIGNMENT,B.unpackAlignment),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,De);const et=B.isCompressedTexture||B.image[0].isCompressedTexture,Rt=B.image[0]&&B.image[0].isDataTexture,rt=[];for(let Ne=0;Ne<6;Ne++)!et&&!Rt?rt[Ne]=C(B.image[Ne],!0,a.maxCubemapSize):rt[Ne]=Rt?B.image[Ne].image:B.image[Ne],rt[Ne]=Cn(B,rt[Ne]);const st=rt[0],mt=c.convert(B.format,B.colorSpace),Ct=c.convert(B.type),jt=L(B.internalFormat,mt,Ct,B.normalized,B.colorSpace),ae=B.isVideoTexture!==!0,_e=Qe.__version===void 0||me===!0,Le=Ce.dataReady;let it=U(B,st);ct(s.TEXTURE_CUBE_MAP,B);let tt;if(et){ae&&_e&&t.texStorage2D(s.TEXTURE_CUBE_MAP,it,jt,st.width,st.height);for(let Ne=0;Ne<6;Ne++){tt=rt[Ne].mipmaps;for(let Mt=0;Mt<tt.length;Mt++){const gt=tt[Mt];B.format!==as?mt!==null?ae?Le&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,0,0,gt.width,gt.height,mt,gt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,jt,gt.width,gt.height,0,gt.data):ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,0,0,gt.width,gt.height,mt,Ct,gt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,jt,gt.width,gt.height,0,mt,Ct,gt.data)}}}else{if(tt=B.mipmaps,ae&&_e){tt.length>0&&it++;const Ne=an(rt[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,it,jt,Ne.width,Ne.height)}for(let Ne=0;Ne<6;Ne++)if(Rt){ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,rt[Ne].width,rt[Ne].height,mt,Ct,rt[Ne].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,jt,rt[Ne].width,rt[Ne].height,0,mt,Ct,rt[Ne].data);for(let Mt=0;Mt<tt.length;Mt++){const yn=tt[Mt].image[Ne].image;ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,0,0,yn.width,yn.height,mt,Ct,yn.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,jt,yn.width,yn.height,0,mt,Ct,yn.data)}}else{ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,mt,Ct,rt[Ne]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,jt,mt,Ct,rt[Ne]);for(let Mt=0;Mt<tt.length;Mt++){const gt=tt[Mt];ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,0,0,mt,Ct,gt.image[Ne]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,jt,mt,Ct,gt.image[Ne])}}}T(B)&&D(s.TEXTURE_CUBE_MAP),Qe.__version=Ce.version,B.onUpdate&&B.onUpdate(B)}Y.__version=B.version}function nt(Y,B,de,me,Ce,Qe){const Ke=c.convert(de.format,de.colorSpace),ke=c.convert(de.type),De=L(de.internalFormat,Ke,ke,de.normalized,de.colorSpace),et=i.get(B),Rt=i.get(de);if(Rt.__renderTarget=B,!et.__hasExternalTextures){const rt=Math.max(1,B.width>>Qe),st=Math.max(1,B.height>>Qe);Ce===s.TEXTURE_3D||Ce===s.TEXTURE_2D_ARRAY?t.texImage3D(Ce,Qe,De,rt,st,B.depth,0,Ke,ke,null):t.texImage2D(Ce,Qe,De,rt,st,0,Ke,ke,null)}t.bindFramebuffer(s.FRAMEBUFFER,Y),Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,me,Ce,Rt.__webglTexture,0,zt(B)):(Ce===s.TEXTURE_2D||Ce>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Ce<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,me,Ce,Rt.__webglTexture,Qe),t.bindFramebuffer(s.FRAMEBUFFER,null)}function sn(Y,B,de){if(s.bindRenderbuffer(s.RENDERBUFFER,Y),B.depthBuffer){const me=B.depthTexture,Ce=me&&me.isDepthTexture?me.type:null,Qe=O(B.stencilBuffer,Ce),Ke=B.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;Et(B)?f.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,zt(B),Qe,B.width,B.height):de?s.renderbufferStorageMultisample(s.RENDERBUFFER,zt(B),Qe,B.width,B.height):s.renderbufferStorage(s.RENDERBUFFER,Qe,B.width,B.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ke,s.RENDERBUFFER,Y)}else{const me=B.textures;for(let Ce=0;Ce<me.length;Ce++){const Qe=me[Ce],Ke=c.convert(Qe.format,Qe.colorSpace),ke=c.convert(Qe.type),De=L(Qe.internalFormat,Ke,ke,Qe.normalized,Qe.colorSpace);Et(B)?f.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,zt(B),De,B.width,B.height):de?s.renderbufferStorageMultisample(s.RENDERBUFFER,zt(B),De,B.width,B.height):s.renderbufferStorage(s.RENDERBUFFER,De,B.width,B.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function Dt(Y,B,de){const me=B.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(s.FRAMEBUFFER,Y),!(B.depthTexture&&B.depthTexture.isDepthTexture))throw new Error("THREE.WebGLTextures: renderTarget.depthTexture must be an instance of THREE.DepthTexture.");const Ce=i.get(B.depthTexture);if(Ce.__renderTarget=B,(!Ce.__webglTexture||B.depthTexture.image.width!==B.width||B.depthTexture.image.height!==B.height)&&(B.depthTexture.image.width=B.width,B.depthTexture.image.height=B.height,B.depthTexture.needsUpdate=!0),me){if(Ce.__webglInit===void 0&&(Ce.__webglInit=!0,B.depthTexture.addEventListener("dispose",H)),Ce.__webglTexture===void 0){Ce.__webglTexture=s.createTexture(),t.bindTexture(s.TEXTURE_CUBE_MAP,Ce.__webglTexture),ct(s.TEXTURE_CUBE_MAP,B.depthTexture);const et=c.convert(B.depthTexture.format),Rt=c.convert(B.depthTexture.type);let rt;B.depthTexture.format===Il?rt=s.DEPTH_COMPONENT24:B.depthTexture.format===Gu&&(rt=s.DEPTH24_STENCIL8);for(let st=0;st<6;st++)s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,rt,B.width,B.height,0,et,Rt,null)}}else ne(B.depthTexture,0);const Qe=Ce.__webglTexture,Ke=zt(B),ke=me?s.TEXTURE_CUBE_MAP_POSITIVE_X+de:s.TEXTURE_2D,De=B.depthTexture.format===Gu?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;if(B.depthTexture.format===Il)Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,De,ke,Qe,0,Ke):s.framebufferTexture2D(s.FRAMEBUFFER,De,ke,Qe,0);else if(B.depthTexture.format===Gu)Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,De,ke,Qe,0,Ke):s.framebufferTexture2D(s.FRAMEBUFFER,De,ke,Qe,0);else throw new Error("THREE.WebGLTextures: Unknown depthTexture format.")}function Be(Y){const B=i.get(Y),de=Y.isWebGLCubeRenderTarget===!0;if(B.__boundDepthTexture!==Y.depthTexture){const me=Y.depthTexture;if(B.__depthDisposeCallback&&B.__depthDisposeCallback(),me){const Ce=()=>{delete B.__boundDepthTexture,delete B.__depthDisposeCallback,me.removeEventListener("dispose",Ce)};me.addEventListener("dispose",Ce),B.__depthDisposeCallback=Ce}B.__boundDepthTexture=me}if(Y.depthTexture&&!B.__autoAllocateDepthBuffer)if(de)for(let me=0;me<6;me++)Dt(B.__webglFramebuffer[me],Y,me);else{const me=Y.texture.mipmaps;me&&me.length>0?Dt(B.__webglFramebuffer[0],Y,0):Dt(B.__webglFramebuffer,Y,0)}else if(de){B.__webglDepthbuffer=[];for(let me=0;me<6;me++)if(t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer[me]),B.__webglDepthbuffer[me]===void 0)B.__webglDepthbuffer[me]=s.createRenderbuffer(),sn(B.__webglDepthbuffer[me],Y,!1);else{const Ce=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Qe=B.__webglDepthbuffer[me];s.bindRenderbuffer(s.RENDERBUFFER,Qe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ce,s.RENDERBUFFER,Qe)}}else{const me=Y.texture.mipmaps;if(me&&me.length>0?t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer),B.__webglDepthbuffer===void 0)B.__webglDepthbuffer=s.createRenderbuffer(),sn(B.__webglDepthbuffer,Y,!1);else{const Ce=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Qe=B.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,Qe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ce,s.RENDERBUFFER,Qe)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function xe(Y,B,de){const me=i.get(Y);B!==void 0&&nt(me.__webglFramebuffer,Y,Y.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),de!==void 0&&Be(Y)}function Ue(Y){const B=Y.texture,de=i.get(Y),me=i.get(B);Y.addEventListener("dispose",I);const Ce=Y.textures,Qe=Y.isWebGLCubeRenderTarget===!0,Ke=Ce.length>1;if(Ke||(me.__webglTexture===void 0&&(me.__webglTexture=s.createTexture()),me.__version=B.version,d.memory.textures++),Qe){de.__webglFramebuffer=[];for(let ke=0;ke<6;ke++)if(B.mipmaps&&B.mipmaps.length>0){de.__webglFramebuffer[ke]=[];for(let De=0;De<B.mipmaps.length;De++)de.__webglFramebuffer[ke][De]=s.createFramebuffer()}else de.__webglFramebuffer[ke]=s.createFramebuffer()}else{if(B.mipmaps&&B.mipmaps.length>0){de.__webglFramebuffer=[];for(let ke=0;ke<B.mipmaps.length;ke++)de.__webglFramebuffer[ke]=s.createFramebuffer()}else de.__webglFramebuffer=s.createFramebuffer();if(Ke)for(let ke=0,De=Ce.length;ke<De;ke++){const et=i.get(Ce[ke]);et.__webglTexture===void 0&&(et.__webglTexture=s.createTexture(),d.memory.textures++)}if(Y.samples>0&&Et(Y)===!1){de.__webglMultisampledFramebuffer=s.createFramebuffer(),de.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let ke=0;ke<Ce.length;ke++){const De=Ce[ke];de.__webglColorRenderbuffer[ke]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,de.__webglColorRenderbuffer[ke]);const et=c.convert(De.format,De.colorSpace),Rt=c.convert(De.type),rt=L(De.internalFormat,et,Rt,De.normalized,De.colorSpace,Y.isXRRenderTarget===!0),st=zt(Y);s.renderbufferStorageMultisample(s.RENDERBUFFER,st,rt,Y.width,Y.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+ke,s.RENDERBUFFER,de.__webglColorRenderbuffer[ke])}s.bindRenderbuffer(s.RENDERBUFFER,null),Y.depthBuffer&&(de.__webglDepthRenderbuffer=s.createRenderbuffer(),sn(de.__webglDepthRenderbuffer,Y,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(Qe){t.bindTexture(s.TEXTURE_CUBE_MAP,me.__webglTexture),ct(s.TEXTURE_CUBE_MAP,B);for(let ke=0;ke<6;ke++)if(B.mipmaps&&B.mipmaps.length>0)for(let De=0;De<B.mipmaps.length;De++)nt(de.__webglFramebuffer[ke][De],Y,B,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ke,De);else nt(de.__webglFramebuffer[ke],Y,B,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0);T(B)&&D(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ke){for(let ke=0,De=Ce.length;ke<De;ke++){const et=Ce[ke],Rt=i.get(et);let rt=s.TEXTURE_2D;(Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(rt=Y.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(rt,Rt.__webglTexture),ct(rt,et),nt(de.__webglFramebuffer,Y,et,s.COLOR_ATTACHMENT0+ke,rt,0),T(et)&&D(rt)}t.unbindTexture()}else{let ke=s.TEXTURE_2D;if((Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(ke=Y.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(ke,me.__webglTexture),ct(ke,B),B.mipmaps&&B.mipmaps.length>0)for(let De=0;De<B.mipmaps.length;De++)nt(de.__webglFramebuffer[De],Y,B,s.COLOR_ATTACHMENT0,ke,De);else nt(de.__webglFramebuffer,Y,B,s.COLOR_ATTACHMENT0,ke,0);T(B)&&D(ke),t.unbindTexture()}Y.depthBuffer&&Be(Y)}function qe(Y){const B=Y.textures;for(let de=0,me=B.length;de<me;de++){const Ce=B[de];if(T(Ce)){const Qe=z(Y),Ke=i.get(Ce).__webglTexture;t.bindTexture(Qe,Ke),D(Qe),t.unbindTexture()}}}const Ze=[],Pt=[];function bt(Y){if(Y.samples>0){if(Et(Y)===!1){const B=Y.textures,de=Y.width,me=Y.height;let Ce=s.COLOR_BUFFER_BIT;const Qe=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ke=i.get(Y),ke=B.length>1;if(ke)for(let et=0;et<B.length;et++)t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,Ke.__webglMultisampledFramebuffer);const De=Y.texture.mipmaps;De&&De.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglFramebuffer);for(let et=0;et<B.length;et++){if(Y.resolveDepthBuffer&&(Y.depthBuffer&&(Ce|=s.DEPTH_BUFFER_BIT),Y.stencilBuffer&&Y.resolveStencilBuffer&&(Ce|=s.STENCIL_BUFFER_BIT)),ke){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,Ke.__webglColorRenderbuffer[et]);const Rt=i.get(B[et]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Rt,0)}s.blitFramebuffer(0,0,de,me,0,0,de,me,Ce,s.NEAREST),m===!0&&(Ze.length=0,Pt.length=0,Ze.push(s.COLOR_ATTACHMENT0+et),Y.depthBuffer&&Y.resolveDepthBuffer===!1&&(Ze.push(Qe),Pt.push(Qe),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,Pt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,Ze))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),ke)for(let et=0;et<B.length;et++){t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.RENDERBUFFER,Ke.__webglColorRenderbuffer[et]);const Rt=i.get(B[et]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.TEXTURE_2D,Rt,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglMultisampledFramebuffer)}else if(Y.depthBuffer&&Y.resolveDepthBuffer===!1&&m){const B=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[B])}}}function zt(Y){return Math.min(a.maxSamples,Y.samples)}function Et(Y){const B=i.get(Y);return Y.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&B.__useRenderToTexture!==!1}function ee(Y){const B=d.render.frame;v.get(Y)!==B&&(v.set(Y,B),Y.update())}function Cn(Y,B){const de=Y.colorSpace,me=Y.format,Ce=Y.type;return Y.isCompressedTexture===!0||Y.isVideoTexture===!0||de!==Rm&&de!==Cc&&(wn.getTransfer(de)===_n?(me!==as||Ce!==Ss)&&ot("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):kt("WebGLTextures: Unsupported texture color space:",de)),B}function an(Y){return typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement?(g.width=Y.naturalWidth||Y.width,g.height=Y.naturalHeight||Y.height):typeof VideoFrame<"u"&&Y instanceof VideoFrame?(g.width=Y.displayWidth,g.height=Y.displayHeight):(g.width=Y.width,g.height=Y.height),g}this.allocateTextureUnit=j,this.resetTextureUnits=K,this.getTextureUnits=le,this.setTextureUnits=$,this.setTexture2D=ne,this.setTexture2DArray=ce,this.setTexture3D=ye,this.setTextureCube=Te,this.rebindTextures=xe,this.setupRenderTarget=Ue,this.updateRenderTargetMipmap=qe,this.updateMultisampleRenderTarget=bt,this.setupDepthRenderbuffer=Be,this.setupFrameBufferTexture=nt,this.useMultisampledRTT=Et,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function _R(s,e){function t(i,a=Cc){let c;const d=wn.getTransfer(a);if(i===Ss)return s.UNSIGNED_BYTE;if(i===Px)return s.UNSIGNED_SHORT_4_4_4_4;if(i===kx)return s.UNSIGNED_SHORT_5_5_5_1;if(i===m1)return s.UNSIGNED_INT_5_9_9_9_REV;if(i===g1)return s.UNSIGNED_INT_10F_11F_11F_REV;if(i===h1)return s.BYTE;if(i===p1)return s.SHORT;if(i===Em)return s.UNSIGNED_SHORT;if(i===Rx)return s.INT;if(i===oo)return s.UNSIGNED_INT;if(i===ws)return s.FLOAT;if(i===Ll)return s.HALF_FLOAT;if(i===A1)return s.ALPHA;if(i===v1)return s.RGB;if(i===as)return s.RGBA;if(i===Il)return s.DEPTH_COMPONENT;if(i===Gu)return s.DEPTH_STENCIL;if(i===Dx)return s.RED;if(i===Tv)return s.RED_INTEGER;if(i===Yu)return s.RG;if(i===Lx)return s.RG_INTEGER;if(i===Ix)return s.RGBA_INTEGER;if(i===ev||i===tv||i===nv||i===iv)if(d===_n)if(c=e.get("WEBGL_compressed_texture_s3tc_srgb"),c!==null){if(i===ev)return c.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===tv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===nv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===iv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(c=e.get("WEBGL_compressed_texture_s3tc"),c!==null){if(i===ev)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===tv)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===nv)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===iv)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Ub||i===Fb||i===Ob||i===Vb)if(c=e.get("WEBGL_compressed_texture_pvrtc"),c!==null){if(i===Ub)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Fb)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Ob)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Vb)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Hb||i===Gb||i===Wb||i===jb||i===Xb||i===cv||i===qb)if(c=e.get("WEBGL_compressed_texture_etc"),c!==null){if(i===Hb||i===Gb)return d===_n?c.COMPRESSED_SRGB8_ETC2:c.COMPRESSED_RGB8_ETC2;if(i===Wb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:c.COMPRESSED_RGBA8_ETC2_EAC;if(i===jb)return c.COMPRESSED_R11_EAC;if(i===Xb)return c.COMPRESSED_SIGNED_R11_EAC;if(i===cv)return c.COMPRESSED_RG11_EAC;if(i===qb)return c.COMPRESSED_SIGNED_RG11_EAC}else return null;if(i===Yb||i===Jb||i===Qb||i===Zb||i===Kb||i===_b||i===$b||i===ex||i===tx||i===nx||i===ix||i===rx||i===sx||i===ax)if(c=e.get("WEBGL_compressed_texture_astc"),c!==null){if(i===Yb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:c.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===Jb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:c.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Qb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:c.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Zb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:c.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Kb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:c.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===_b)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:c.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===$b)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:c.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===ex)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:c.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===tx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:c.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===nx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:c.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===ix)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:c.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===rx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:c.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===sx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:c.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===ax)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:c.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===ox||i===lx||i===cx)if(c=e.get("EXT_texture_compression_bptc"),c!==null){if(i===ox)return d===_n?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===lx)return c.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===cx)return c.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===ux||i===dx||i===uv||i===fx)if(c=e.get("EXT_texture_compression_rgtc"),c!==null){if(i===ux)return c.COMPRESSED_RED_RGTC1_EXT;if(i===dx)return c.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===uv)return c.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===fx)return c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Cm?s.UNSIGNED_INT_24_8:s[i]!==void 0?s[i]:null}return{convert:t}}const S4=`
|
|
4197
|
+
}`,A4=[new J(1,0,0),new J(-1,0,0),new J(0,1,0),new J(0,-1,0),new J(0,0,1),new J(0,0,-1)],v4=[new J(0,-1,0),new J(0,-1,0),new J(0,0,1),new J(0,0,-1),new J(0,-1,0),new J(0,-1,0)],M2=new Zt,jA=new J,dw=new J;function y4(s,e,t){let i=new Wf;const a=new Oe,c=new Oe,d=new ni,f=new U1,m=new F1,g={},v=t.maxTextureSize,M={[kc]:Ts,[Ts]:kc,[Cl]:Cl},x=new Pa({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Oe},radius:{value:4}},vertexShader:m4,fragmentShader:g4}),S=x.clone();S.defines.HORIZONTAL_PASS=1;const w=new rn;w.setAttribute("position",new si(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const k=new or(w,x),C=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=wm;let T=this.type;this.render=function(U,H,I){if(C.enabled===!1||C.autoUpdate===!1&&C.needsUpdate===!1||U.length===0)return;this.type===ZA&&(ot("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=wm);const F=s.getRenderTarget(),V=s.getActiveCubeFace(),X=s.getActiveMipmapLevel(),_=s.state;_.setBlending(kl),_.buffers.depth.getReversed()===!0?_.buffers.color.setClear(0,0,0,0):_.buffers.color.setClear(1,1,1,1),_.buffers.depth.setTest(!0),_.setScissorTest(!1);const K=T!==this.type;K&&H.traverse(function(le){le.material&&(Array.isArray(le.material)?le.material.forEach($=>$.needsUpdate=!0):le.material.needsUpdate=!0)});for(let le=0,$=U.length;le<$;le++){const j=U[le],Q=j.shadow;if(Q===void 0){ot("WebGLShadowMap:",j,"has no shadow.");continue}if(Q.autoUpdate===!1&&Q.needsUpdate===!1)continue;a.copy(Q.mapSize);const ne=Q.getFrameExtents();a.multiply(ne),c.copy(Q.mapSize),(a.x>v||a.y>v)&&(a.x>v&&(c.x=Math.floor(v/ne.x),a.x=c.x*ne.x,Q.mapSize.x=c.x),a.y>v&&(c.y=Math.floor(v/ne.y),a.y=c.y*ne.y,Q.mapSize.y=c.y));const ce=s.state.buffers.depth.getReversed();if(Q.camera._reversedDepth=ce,Q.map===null||K===!0){if(Q.map!==null&&(Q.map.depthTexture!==null&&(Q.map.depthTexture.dispose(),Q.map.depthTexture=null),Q.map.dispose()),this.type===If){if(j.isPointLight){ot("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}Q.map=new Ra(a.x,a.y,{format:Yu,type:Ll,minFilter:mi,magFilter:mi,generateMipmaps:!1}),Q.map.texture.name=j.name+".shadowMap",Q.map.depthTexture=new jf(a.x,a.y,ws),Q.map.depthTexture.name=j.name+".shadowMapDepth",Q.map.depthTexture.format=Il,Q.map.depthTexture.compareFunction=null,Q.map.depthTexture.minFilter=Ji,Q.map.depthTexture.magFilter=Ji}else j.isPointLight?(Q.map=new Q1(a.x),Q.map.depthTexture=new K3(a.x,oo)):(Q.map=new Ra(a.x,a.y),Q.map.depthTexture=new jf(a.x,a.y,oo)),Q.map.depthTexture.name=j.name+".shadowMap",Q.map.depthTexture.format=Il,this.type===wm?(Q.map.depthTexture.compareFunction=ce?Bx:zx,Q.map.depthTexture.minFilter=mi,Q.map.depthTexture.magFilter=mi):(Q.map.depthTexture.compareFunction=null,Q.map.depthTexture.minFilter=Ji,Q.map.depthTexture.magFilter=Ji);Q.camera.updateProjectionMatrix()}const ye=Q.map.isWebGLCubeRenderTarget?6:1;for(let Te=0;Te<ye;Te++){if(Q.map.isWebGLCubeRenderTarget)s.setRenderTarget(Q.map,Te),s.clear();else{Te===0&&(s.setRenderTarget(Q.map),s.clear());const Fe=Q.getViewport(Te);d.set(c.x*Fe.x,c.y*Fe.y,c.x*Fe.z,c.y*Fe.w),_.viewport(d)}if(j.isPointLight){const Fe=Q.camera,ft=Q.matrix,lt=j.distance||Fe.far;lt!==Fe.far&&(Fe.far=lt,Fe.updateProjectionMatrix()),jA.setFromMatrixPosition(j.matrixWorld),Fe.position.copy(jA),dw.copy(Fe.position),dw.add(A4[Te]),Fe.up.copy(v4[Te]),Fe.lookAt(dw),Fe.updateMatrixWorld(),ft.makeTranslation(-jA.x,-jA.y,-jA.z),M2.multiplyMatrices(Fe.projectionMatrix,Fe.matrixWorldInverse),Q._frustum.setFromProjectionMatrix(M2,Fe.coordinateSystem,Fe.reversedDepth)}else Q.updateMatrices(j);i=Q.getFrustum(),L(H,I,Q.camera,j,this.type)}Q.isPointLightShadow!==!0&&this.type===If&&D(Q,I),Q.needsUpdate=!1}T=this.type,C.needsUpdate=!1,s.setRenderTarget(F,V,X)};function D(U,H){const I=e.update(k);x.defines.VSM_SAMPLES!==U.blurSamples&&(x.defines.VSM_SAMPLES=U.blurSamples,S.defines.VSM_SAMPLES=U.blurSamples,x.needsUpdate=!0,S.needsUpdate=!0),U.mapPass===null&&(U.mapPass=new Ra(a.x,a.y,{format:Yu,type:Ll})),x.uniforms.shadow_pass.value=U.map.depthTexture,x.uniforms.resolution.value=U.mapSize,x.uniforms.radius.value=U.radius,s.setRenderTarget(U.mapPass),s.clear(),s.renderBufferDirect(H,null,I,x,k,null),S.uniforms.shadow_pass.value=U.mapPass.texture,S.uniforms.resolution.value=U.mapSize,S.uniforms.radius.value=U.radius,s.setRenderTarget(U.map),s.clear(),s.renderBufferDirect(H,null,I,S,k,null)}function z(U,H,I,F){let V=null;const X=I.isPointLight===!0?U.customDistanceMaterial:U.customDepthMaterial;if(X!==void 0)V=X;else if(V=I.isPointLight===!0?m:f,s.localClippingEnabled&&H.clipShadows===!0&&Array.isArray(H.clippingPlanes)&&H.clippingPlanes.length!==0||H.displacementMap&&H.displacementScale!==0||H.alphaMap&&H.alphaTest>0||H.map&&H.alphaTest>0||H.alphaToCoverage===!0){const _=V.uuid,K=H.uuid;let le=g[_];le===void 0&&(le={},g[_]=le);let $=le[K];$===void 0&&($=V.clone(),le[K]=$,H.addEventListener("dispose",O)),V=$}if(V.visible=H.visible,V.wireframe=H.wireframe,F===If?V.side=H.shadowSide!==null?H.shadowSide:H.side:V.side=H.shadowSide!==null?H.shadowSide:M[H.side],V.alphaMap=H.alphaMap,V.alphaTest=H.alphaToCoverage===!0?.5:H.alphaTest,V.map=H.map,V.clipShadows=H.clipShadows,V.clippingPlanes=H.clippingPlanes,V.clipIntersection=H.clipIntersection,V.displacementMap=H.displacementMap,V.displacementScale=H.displacementScale,V.displacementBias=H.displacementBias,V.wireframeLinewidth=H.wireframeLinewidth,V.linewidth=H.linewidth,I.isPointLight===!0&&V.isMeshDistanceMaterial===!0){const _=s.properties.get(V);_.light=I}return V}function L(U,H,I,F,V){if(U.visible===!1)return;if(U.layers.test(H.layers)&&(U.isMesh||U.isLine||U.isPoints)&&(U.castShadow||U.receiveShadow&&V===If)&&(!U.frustumCulled||i.intersectsObject(U))){U.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,U.matrixWorld);const K=e.update(U),le=U.material;if(Array.isArray(le)){const $=K.groups;for(let j=0,Q=$.length;j<Q;j++){const ne=$[j],ce=le[ne.materialIndex];if(ce&&ce.visible){const ye=z(U,ce,F,V);U.onBeforeShadow(s,U,H,I,K,ye,ne),s.renderBufferDirect(I,null,K,ye,U,ne),U.onAfterShadow(s,U,H,I,K,ye,ne)}}}else if(le.visible){const $=z(U,le,F,V);U.onBeforeShadow(s,U,H,I,K,$,null),s.renderBufferDirect(I,null,K,$,U,null),U.onAfterShadow(s,U,H,I,K,$,null)}}const _=U.children;for(let K=0,le=_.length;K<le;K++)L(_[K],H,I,F,V)}function O(U){U.target.removeEventListener("dispose",O);for(const I in g){const F=g[I],V=U.target.uuid;V in F&&(F[V].dispose(),delete F[V])}}}function b4(s,e){function t(){let ae=!1;const _e=new ni;let Le=null;const it=new ni(0,0,0,0);return{setMask:function(tt){Le!==tt&&!ae&&(s.colorMask(tt,tt,tt,tt),Le=tt)},setLocked:function(tt){ae=tt},setClear:function(tt,Ne,Mt,gt,yn){yn===!0&&(tt*=gt,Ne*=gt,Mt*=gt),_e.set(tt,Ne,Mt,gt),it.equals(_e)===!1&&(s.clearColor(tt,Ne,Mt,gt),it.copy(_e))},reset:function(){ae=!1,Le=null,it.set(-1,0,0,0)}}}function i(){let ae=!1,_e=!1,Le=null,it=null,tt=null;return{setReversed:function(Ne){if(_e!==Ne){const Mt=e.get("EXT_clip_control");Ne?Mt.clipControlEXT(Mt.LOWER_LEFT_EXT,Mt.ZERO_TO_ONE_EXT):Mt.clipControlEXT(Mt.LOWER_LEFT_EXT,Mt.NEGATIVE_ONE_TO_ONE_EXT),_e=Ne;const gt=tt;tt=null,this.setClear(gt)}},getReversed:function(){return _e},setTest:function(Ne){Ne?He(s.DEPTH_TEST):pt(s.DEPTH_TEST)},setMask:function(Ne){Le!==Ne&&!ae&&(s.depthMask(Ne),Le=Ne)},setFunc:function(Ne){if(_e&&(Ne=OL[Ne]),it!==Ne){switch(Ne){case kb:s.depthFunc(s.NEVER);break;case Db:s.depthFunc(s.ALWAYS);break;case Lb:s.depthFunc(s.LESS);break;case Vf:s.depthFunc(s.LEQUAL);break;case Ib:s.depthFunc(s.EQUAL);break;case Nb:s.depthFunc(s.GEQUAL);break;case zb:s.depthFunc(s.GREATER);break;case Bb:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}it=Ne}},setLocked:function(Ne){ae=Ne},setClear:function(Ne){tt!==Ne&&(tt=Ne,_e&&(Ne=1-Ne),s.clearDepth(Ne))},reset:function(){ae=!1,Le=null,it=null,tt=null,_e=!1}}}function a(){let ae=!1,_e=null,Le=null,it=null,tt=null,Ne=null,Mt=null,gt=null,yn=null;return{setTest:function(Rn){ae||(Rn?He(s.STENCIL_TEST):pt(s.STENCIL_TEST))},setMask:function(Rn){_e!==Rn&&!ae&&(s.stencilMask(Rn),_e=Rn)},setFunc:function(Rn,Qi,Gr){(Le!==Rn||it!==Qi||tt!==Gr)&&(s.stencilFunc(Rn,Qi,Gr),Le=Rn,it=Qi,tt=Gr)},setOp:function(Rn,Qi,Gr){(Ne!==Rn||Mt!==Qi||gt!==Gr)&&(s.stencilOp(Rn,Qi,Gr),Ne=Rn,Mt=Qi,gt=Gr)},setLocked:function(Rn){ae=Rn},setClear:function(Rn){yn!==Rn&&(s.clearStencil(Rn),yn=Rn)},reset:function(){ae=!1,_e=null,Le=null,it=null,tt=null,Ne=null,Mt=null,gt=null,yn=null}}}const c=new t,d=new i,f=new a,m=new WeakMap,g=new WeakMap;let v={},M={},x={},S=new WeakMap,w=[],k=null,C=!1,T=null,D=null,z=null,L=null,O=null,U=null,H=null,I=new ut(0,0,0),F=0,V=!1,X=null,_=null,K=null,le=null,$=null;const j=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Q=!1,ne=0;const ce=s.getParameter(s.VERSION);ce.indexOf("WebGL")!==-1?(ne=parseFloat(/^WebGL (\d)/.exec(ce)[1]),Q=ne>=1):ce.indexOf("OpenGL ES")!==-1&&(ne=parseFloat(/^OpenGL ES (\d)/.exec(ce)[1]),Q=ne>=2);let ye=null,Te={};const Fe=s.getParameter(s.SCISSOR_BOX),ft=s.getParameter(s.VIEWPORT),lt=new ni().fromArray(Fe),ct=new ni().fromArray(ft);function Pe(ae,_e,Le,it){const tt=new Uint8Array(4),Ne=s.createTexture();s.bindTexture(ae,Ne),s.texParameteri(ae,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(ae,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let Mt=0;Mt<Le;Mt++)ae===s.TEXTURE_3D||ae===s.TEXTURE_2D_ARRAY?s.texImage3D(_e,0,s.RGBA,1,1,it,0,s.RGBA,s.UNSIGNED_BYTE,tt):s.texImage2D(_e+Mt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,tt);return Ne}const qe={};qe[s.TEXTURE_2D]=Pe(s.TEXTURE_2D,s.TEXTURE_2D,1),qe[s.TEXTURE_CUBE_MAP]=Pe(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),qe[s.TEXTURE_2D_ARRAY]=Pe(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),qe[s.TEXTURE_3D]=Pe(s.TEXTURE_3D,s.TEXTURE_3D,1,1),c.setClear(0,0,0,1),d.setClear(1),f.setClear(0),He(s.DEPTH_TEST),d.setFunc(Vf),je(!1),Ze(Pw),He(s.CULL_FACE),xe(kl);function He(ae){v[ae]!==!0&&(s.enable(ae),v[ae]=!0)}function pt(ae){v[ae]!==!1&&(s.disable(ae),v[ae]=!1)}function Nt(ae,_e){return x[ae]!==_e?(s.bindFramebuffer(ae,_e),x[ae]=_e,ae===s.DRAW_FRAMEBUFFER&&(x[s.FRAMEBUFFER]=_e),ae===s.FRAMEBUFFER&&(x[s.DRAW_FRAMEBUFFER]=_e),!0):!1}function nt(ae,_e){let Le=w,it=!1;if(ae){Le=S.get(_e),Le===void 0&&(Le=[],S.set(_e,Le));const tt=ae.textures;if(Le.length!==tt.length||Le[0]!==s.COLOR_ATTACHMENT0){for(let Ne=0,Mt=tt.length;Ne<Mt;Ne++)Le[Ne]=s.COLOR_ATTACHMENT0+Ne;Le.length=tt.length,it=!0}}else Le[0]!==s.BACK&&(Le[0]=s.BACK,it=!0);it&&s.drawBuffers(Le)}function sn(ae){return k!==ae?(s.useProgram(ae),k=ae,!0):!1}const Dt={[Vu]:s.FUNC_ADD,[a3]:s.FUNC_SUBTRACT,[o3]:s.FUNC_REVERSE_SUBTRACT};Dt[l3]=s.MIN,Dt[c3]=s.MAX;const Ue={[u3]:s.ZERO,[d3]:s.ONE,[f3]:s.SRC_COLOR,[Rb]:s.SRC_ALPHA,[v3]:s.SRC_ALPHA_SATURATE,[g3]:s.DST_COLOR,[p3]:s.DST_ALPHA,[h3]:s.ONE_MINUS_SRC_COLOR,[Pb]:s.ONE_MINUS_SRC_ALPHA,[A3]:s.ONE_MINUS_DST_COLOR,[m3]:s.ONE_MINUS_DST_ALPHA,[y3]:s.CONSTANT_COLOR,[b3]:s.ONE_MINUS_CONSTANT_COLOR,[x3]:s.CONSTANT_ALPHA,[S3]:s.ONE_MINUS_CONSTANT_ALPHA};function xe(ae,_e,Le,it,tt,Ne,Mt,gt,yn,Rn){if(ae===kl){C===!0&&(pt(s.BLEND),C=!1);return}if(C===!1&&(He(s.BLEND),C=!0),ae!==s3){if(ae!==T||Rn!==V){if((D!==Vu||O!==Vu)&&(s.blendEquation(s.FUNC_ADD),D=Vu,O=Vu),Rn)switch(ae){case Uf:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case kw:s.blendFunc(s.ONE,s.ONE);break;case Dw:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Lw:s.blendFuncSeparate(s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ZERO,s.ONE);break;default:kt("WebGLState: Invalid blending: ",ae);break}else switch(ae){case Uf:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case kw:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE,s.ONE,s.ONE);break;case Dw:kt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case Lw:kt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:kt("WebGLState: Invalid blending: ",ae);break}z=null,L=null,U=null,H=null,I.set(0,0,0),F=0,T=ae,V=Rn}return}tt=tt||_e,Ne=Ne||Le,Mt=Mt||it,(_e!==D||tt!==O)&&(s.blendEquationSeparate(Dt[_e],Dt[tt]),D=_e,O=tt),(Le!==z||it!==L||Ne!==U||Mt!==H)&&(s.blendFuncSeparate(Ue[Le],Ue[it],Ue[Ne],Ue[Mt]),z=Le,L=it,U=Ne,H=Mt),(gt.equals(I)===!1||yn!==F)&&(s.blendColor(gt.r,gt.g,gt.b,yn),I.copy(gt),F=yn),T=ae,V=!1}function ze(ae,_e){ae.side===Cl?pt(s.CULL_FACE):He(s.CULL_FACE);let Le=ae.side===Ts;_e&&(Le=!Le),je(Le),ae.blending===Uf&&ae.transparent===!1?xe(kl):xe(ae.blending,ae.blendEquation,ae.blendSrc,ae.blendDst,ae.blendEquationAlpha,ae.blendSrcAlpha,ae.blendDstAlpha,ae.blendColor,ae.blendAlpha,ae.premultipliedAlpha),d.setFunc(ae.depthFunc),d.setTest(ae.depthTest),d.setMask(ae.depthWrite),c.setMask(ae.colorWrite);const it=ae.stencilWrite;f.setTest(it),it&&(f.setMask(ae.stencilWriteMask),f.setFunc(ae.stencilFunc,ae.stencilRef,ae.stencilFuncMask),f.setOp(ae.stencilFail,ae.stencilZFail,ae.stencilZPass)),bt(ae.polygonOffset,ae.polygonOffsetFactor,ae.polygonOffsetUnits),ae.alphaToCoverage===!0?He(s.SAMPLE_ALPHA_TO_COVERAGE):pt(s.SAMPLE_ALPHA_TO_COVERAGE)}function je(ae){X!==ae&&(ae?s.frontFace(s.CW):s.frontFace(s.CCW),X=ae)}function Ze(ae){ae!==n3?(He(s.CULL_FACE),ae!==_&&(ae===Pw?s.cullFace(s.BACK):ae===i3?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):pt(s.CULL_FACE),_=ae}function Pt(ae){ae!==K&&(Q&&s.lineWidth(ae),K=ae)}function bt(ae,_e,Le){ae?(He(s.POLYGON_OFFSET_FILL),(le!==_e||$!==Le)&&(le=_e,$=Le,d.getReversed()&&(_e=-_e),s.polygonOffset(_e,Le))):pt(s.POLYGON_OFFSET_FILL)}function zt(ae){ae?He(s.SCISSOR_TEST):pt(s.SCISSOR_TEST)}function Et(ae){ae===void 0&&(ae=s.TEXTURE0+j-1),ye!==ae&&(s.activeTexture(ae),ye=ae)}function ee(ae,_e,Le){Le===void 0&&(ye===null?Le=s.TEXTURE0+j-1:Le=ye);let it=Te[Le];it===void 0&&(it={type:void 0,texture:void 0},Te[Le]=it),(it.type!==ae||it.texture!==_e)&&(ye!==Le&&(s.activeTexture(Le),ye=Le),s.bindTexture(ae,_e||qe[ae]),it.type=ae,it.texture=_e)}function Cn(){const ae=Te[ye];ae!==void 0&&ae.type!==void 0&&(s.bindTexture(ae.type,null),ae.type=void 0,ae.texture=void 0)}function an(){try{s.compressedTexImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Y(){try{s.compressedTexImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function B(){try{s.texSubImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function de(){try{s.texSubImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function me(){try{s.compressedTexSubImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Ce(){try{s.compressedTexSubImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Qe(){try{s.texStorage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function Ke(){try{s.texStorage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function ke(){try{s.texImage2D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function De(){try{s.texImage3D(...arguments)}catch(ae){kt("WebGLState:",ae)}}function et(ae){return M[ae]!==void 0?M[ae]:s.getParameter(ae)}function Rt(ae,_e){M[ae]!==_e&&(s.pixelStorei(ae,_e),M[ae]=_e)}function rt(ae){lt.equals(ae)===!1&&(s.scissor(ae.x,ae.y,ae.z,ae.w),lt.copy(ae))}function st(ae){ct.equals(ae)===!1&&(s.viewport(ae.x,ae.y,ae.z,ae.w),ct.copy(ae))}function mt(ae,_e){let Le=g.get(_e);Le===void 0&&(Le=new WeakMap,g.set(_e,Le));let it=Le.get(ae);it===void 0&&(it=s.getUniformBlockIndex(_e,ae.name),Le.set(ae,it))}function Ct(ae,_e){const it=g.get(_e).get(ae);m.get(_e)!==it&&(s.uniformBlockBinding(_e,it,ae.__bindingPointIndex),m.set(_e,it))}function jt(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),d.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),s.pixelStorei(s.PACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL),s.pixelStorei(s.PACK_ROW_LENGTH,0),s.pixelStorei(s.PACK_SKIP_PIXELS,0),s.pixelStorei(s.PACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_ROW_LENGTH,0),s.pixelStorei(s.UNPACK_IMAGE_HEIGHT,0),s.pixelStorei(s.UNPACK_SKIP_PIXELS,0),s.pixelStorei(s.UNPACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_SKIP_IMAGES,0),v={},M={},ye=null,Te={},x={},S=new WeakMap,w=[],k=null,C=!1,T=null,D=null,z=null,L=null,O=null,U=null,H=null,I=new ut(0,0,0),F=0,V=!1,X=null,_=null,K=null,le=null,$=null,lt.set(0,0,s.canvas.width,s.canvas.height),ct.set(0,0,s.canvas.width,s.canvas.height),c.reset(),d.reset(),f.reset()}return{buffers:{color:c,depth:d,stencil:f},enable:He,disable:pt,bindFramebuffer:Nt,drawBuffers:nt,useProgram:sn,setBlending:xe,setMaterial:ze,setFlipSided:je,setCullFace:Ze,setLineWidth:Pt,setPolygonOffset:bt,setScissorTest:zt,activeTexture:Et,bindTexture:ee,unbindTexture:Cn,compressedTexImage2D:an,compressedTexImage3D:Y,texImage2D:ke,texImage3D:De,pixelStorei:Rt,getParameter:et,updateUBOMapping:mt,uniformBlockBinding:Ct,texStorage2D:Qe,texStorage3D:Ke,texSubImage2D:B,texSubImage3D:de,compressedTexSubImage2D:me,compressedTexSubImage3D:Ce,scissor:rt,viewport:st,reset:jt}}function x4(s,e,t,i,a,c,d){const f=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,m=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Oe,v=new WeakMap,M=new Set;let x;const S=new WeakMap;let w=!1;try{w=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function k(Y,B){return w?new OffscreenCanvas(Y,B):mv("canvas")}function C(Y,B,de){let me=1;const Ce=an(Y);if((Ce.width>de||Ce.height>de)&&(me=de/Math.max(Ce.width,Ce.height)),me<1)if(typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Y instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Y instanceof ImageBitmap||typeof VideoFrame<"u"&&Y instanceof VideoFrame){const Qe=Math.floor(me*Ce.width),Ke=Math.floor(me*Ce.height);x===void 0&&(x=k(Qe,Ke));const ke=B?k(Qe,Ke):x;return ke.width=Qe,ke.height=Ke,ke.getContext("2d").drawImage(Y,0,0,Qe,Ke),ot("WebGLRenderer: Texture has been resized from ("+Ce.width+"x"+Ce.height+") to ("+Qe+"x"+Ke+")."),ke}else return"data"in Y&&ot("WebGLRenderer: Image in DataTexture is too big ("+Ce.width+"x"+Ce.height+")."),Y;return Y}function T(Y){return Y.generateMipmaps}function D(Y){s.generateMipmap(Y)}function z(Y){return Y.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:Y.isWebGL3DRenderTarget?s.TEXTURE_3D:Y.isWebGLArrayRenderTarget||Y.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function L(Y,B,de,me,Ce,Qe=!1){if(Y!==null){if(s[Y]!==void 0)return s[Y];ot("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Y+"'")}let Ke;me&&(Ke=e.get("EXT_texture_norm16"),Ke||ot("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let ke=B;if(B===s.RED&&(de===s.FLOAT&&(ke=s.R32F),de===s.HALF_FLOAT&&(ke=s.R16F),de===s.UNSIGNED_BYTE&&(ke=s.R8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.R16_EXT),de===s.SHORT&&Ke&&(ke=Ke.R16_SNORM_EXT)),B===s.RED_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.R8UI),de===s.UNSIGNED_SHORT&&(ke=s.R16UI),de===s.UNSIGNED_INT&&(ke=s.R32UI),de===s.BYTE&&(ke=s.R8I),de===s.SHORT&&(ke=s.R16I),de===s.INT&&(ke=s.R32I)),B===s.RG&&(de===s.FLOAT&&(ke=s.RG32F),de===s.HALF_FLOAT&&(ke=s.RG16F),de===s.UNSIGNED_BYTE&&(ke=s.RG8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RG16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RG16_SNORM_EXT)),B===s.RG_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RG8UI),de===s.UNSIGNED_SHORT&&(ke=s.RG16UI),de===s.UNSIGNED_INT&&(ke=s.RG32UI),de===s.BYTE&&(ke=s.RG8I),de===s.SHORT&&(ke=s.RG16I),de===s.INT&&(ke=s.RG32I)),B===s.RGB_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RGB8UI),de===s.UNSIGNED_SHORT&&(ke=s.RGB16UI),de===s.UNSIGNED_INT&&(ke=s.RGB32UI),de===s.BYTE&&(ke=s.RGB8I),de===s.SHORT&&(ke=s.RGB16I),de===s.INT&&(ke=s.RGB32I)),B===s.RGBA_INTEGER&&(de===s.UNSIGNED_BYTE&&(ke=s.RGBA8UI),de===s.UNSIGNED_SHORT&&(ke=s.RGBA16UI),de===s.UNSIGNED_INT&&(ke=s.RGBA32UI),de===s.BYTE&&(ke=s.RGBA8I),de===s.SHORT&&(ke=s.RGBA16I),de===s.INT&&(ke=s.RGBA32I)),B===s.RGB&&(de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RGB16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RGB16_SNORM_EXT),de===s.UNSIGNED_INT_5_9_9_9_REV&&(ke=s.RGB9_E5),de===s.UNSIGNED_INT_10F_11F_11F_REV&&(ke=s.R11F_G11F_B10F)),B===s.RGBA){const De=Qe?hv:wn.getTransfer(Ce);de===s.FLOAT&&(ke=s.RGBA32F),de===s.HALF_FLOAT&&(ke=s.RGBA16F),de===s.UNSIGNED_BYTE&&(ke=De===_n?s.SRGB8_ALPHA8:s.RGBA8),de===s.UNSIGNED_SHORT&&Ke&&(ke=Ke.RGBA16_EXT),de===s.SHORT&&Ke&&(ke=Ke.RGBA16_SNORM_EXT),de===s.UNSIGNED_SHORT_4_4_4_4&&(ke=s.RGBA4),de===s.UNSIGNED_SHORT_5_5_5_1&&(ke=s.RGB5_A1)}return(ke===s.R16F||ke===s.R32F||ke===s.RG16F||ke===s.RG32F||ke===s.RGBA16F||ke===s.RGBA32F)&&e.get("EXT_color_buffer_float"),ke}function O(Y,B){let de;return Y?B===null||B===oo||B===Cm?de=s.DEPTH24_STENCIL8:B===ws?de=s.DEPTH32F_STENCIL8:B===Em&&(de=s.DEPTH24_STENCIL8,ot("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):B===null||B===oo||B===Cm?de=s.DEPTH_COMPONENT24:B===ws?de=s.DEPTH_COMPONENT32F:B===Em&&(de=s.DEPTH_COMPONENT16),de}function U(Y,B){return T(Y)===!0||Y.isFramebufferTexture&&Y.minFilter!==Ji&&Y.minFilter!==mi?Math.log2(Math.max(B.width,B.height))+1:Y.mipmaps!==void 0&&Y.mipmaps.length>0?Y.mipmaps.length:Y.isCompressedTexture&&Array.isArray(Y.image)?B.mipmaps.length:1}function H(Y){const B=Y.target;B.removeEventListener("dispose",H),F(B),B.isVideoTexture&&v.delete(B),B.isHTMLTexture&&M.delete(B)}function I(Y){const B=Y.target;B.removeEventListener("dispose",I),X(B)}function F(Y){const B=i.get(Y);if(B.__webglInit===void 0)return;const de=Y.source,me=S.get(de);if(me){const Ce=me[B.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&V(Y),Object.keys(me).length===0&&S.delete(de)}i.remove(Y)}function V(Y){const B=i.get(Y);s.deleteTexture(B.__webglTexture);const de=Y.source,me=S.get(de);delete me[B.__cacheKey],d.memory.textures--}function X(Y){const B=i.get(Y);if(Y.depthTexture&&(Y.depthTexture.dispose(),i.remove(Y.depthTexture)),Y.isWebGLCubeRenderTarget)for(let me=0;me<6;me++){if(Array.isArray(B.__webglFramebuffer[me]))for(let Ce=0;Ce<B.__webglFramebuffer[me].length;Ce++)s.deleteFramebuffer(B.__webglFramebuffer[me][Ce]);else s.deleteFramebuffer(B.__webglFramebuffer[me]);B.__webglDepthbuffer&&s.deleteRenderbuffer(B.__webglDepthbuffer[me])}else{if(Array.isArray(B.__webglFramebuffer))for(let me=0;me<B.__webglFramebuffer.length;me++)s.deleteFramebuffer(B.__webglFramebuffer[me]);else s.deleteFramebuffer(B.__webglFramebuffer);if(B.__webglDepthbuffer&&s.deleteRenderbuffer(B.__webglDepthbuffer),B.__webglMultisampledFramebuffer&&s.deleteFramebuffer(B.__webglMultisampledFramebuffer),B.__webglColorRenderbuffer)for(let me=0;me<B.__webglColorRenderbuffer.length;me++)B.__webglColorRenderbuffer[me]&&s.deleteRenderbuffer(B.__webglColorRenderbuffer[me]);B.__webglDepthRenderbuffer&&s.deleteRenderbuffer(B.__webglDepthRenderbuffer)}const de=Y.textures;for(let me=0,Ce=de.length;me<Ce;me++){const Qe=i.get(de[me]);Qe.__webglTexture&&(s.deleteTexture(Qe.__webglTexture),d.memory.textures--),i.remove(de[me])}i.remove(Y)}let _=0;function K(){_=0}function le(){return _}function $(Y){_=Y}function j(){const Y=_;return Y>=a.maxTextures&&ot("WebGLTextures: Trying to use "+Y+" texture units while this GPU supports only "+a.maxTextures),_+=1,Y}function Q(Y){const B=[];return B.push(Y.wrapS),B.push(Y.wrapT),B.push(Y.wrapR||0),B.push(Y.magFilter),B.push(Y.minFilter),B.push(Y.anisotropy),B.push(Y.internalFormat),B.push(Y.format),B.push(Y.type),B.push(Y.generateMipmaps),B.push(Y.premultiplyAlpha),B.push(Y.flipY),B.push(Y.unpackAlignment),B.push(Y.colorSpace),B.join()}function ne(Y,B){const de=i.get(Y);if(Y.isVideoTexture&&ee(Y),Y.isRenderTargetTexture===!1&&Y.isExternalTexture!==!0&&Y.version>0&&de.__version!==Y.version){const me=Y.image;if(me===null)ot("WebGLRenderer: Texture marked for update but no image data found.");else if(me.complete===!1)ot("WebGLRenderer: Texture marked for update but image is incomplete");else{pt(de,Y,B);return}}else Y.isExternalTexture&&(de.__webglTexture=Y.sourceTexture?Y.sourceTexture:null);t.bindTexture(s.TEXTURE_2D,de.__webglTexture,s.TEXTURE0+B)}function ce(Y,B){const de=i.get(Y);if(Y.isRenderTargetTexture===!1&&Y.version>0&&de.__version!==Y.version){pt(de,Y,B);return}else Y.isExternalTexture&&(de.__webglTexture=Y.sourceTexture?Y.sourceTexture:null);t.bindTexture(s.TEXTURE_2D_ARRAY,de.__webglTexture,s.TEXTURE0+B)}function ye(Y,B){const de=i.get(Y);if(Y.isRenderTargetTexture===!1&&Y.version>0&&de.__version!==Y.version){pt(de,Y,B);return}t.bindTexture(s.TEXTURE_3D,de.__webglTexture,s.TEXTURE0+B)}function Te(Y,B){const de=i.get(Y);if(Y.isCubeDepthTexture!==!0&&Y.version>0&&de.__version!==Y.version){Nt(de,Y,B);return}t.bindTexture(s.TEXTURE_CUBE_MAP,de.__webglTexture,s.TEXTURE0+B)}const Fe={[Dc]:s.REPEAT,[Zs]:s.CLAMP_TO_EDGE,[lv]:s.MIRRORED_REPEAT},ft={[Ji]:s.NEAREST,[f1]:s.NEAREST_MIPMAP_NEAREST,[xm]:s.NEAREST_MIPMAP_LINEAR,[mi]:s.LINEAR,[$A]:s.LINEAR_MIPMAP_NEAREST,[Rl]:s.LINEAR_MIPMAP_LINEAR},lt={[D3]:s.NEVER,[B3]:s.ALWAYS,[L3]:s.LESS,[zx]:s.LEQUAL,[I3]:s.EQUAL,[Bx]:s.GEQUAL,[N3]:s.GREATER,[z3]:s.NOTEQUAL};function ct(Y,B){if(B.type===ws&&e.has("OES_texture_float_linear")===!1&&(B.magFilter===mi||B.magFilter===$A||B.magFilter===xm||B.magFilter===Rl||B.minFilter===mi||B.minFilter===$A||B.minFilter===xm||B.minFilter===Rl)&&ot("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(Y,s.TEXTURE_WRAP_S,Fe[B.wrapS]),s.texParameteri(Y,s.TEXTURE_WRAP_T,Fe[B.wrapT]),(Y===s.TEXTURE_3D||Y===s.TEXTURE_2D_ARRAY)&&s.texParameteri(Y,s.TEXTURE_WRAP_R,Fe[B.wrapR]),s.texParameteri(Y,s.TEXTURE_MAG_FILTER,ft[B.magFilter]),s.texParameteri(Y,s.TEXTURE_MIN_FILTER,ft[B.minFilter]),B.compareFunction&&(s.texParameteri(Y,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(Y,s.TEXTURE_COMPARE_FUNC,lt[B.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(B.magFilter===Ji||B.minFilter!==xm&&B.minFilter!==Rl||B.type===ws&&e.has("OES_texture_float_linear")===!1)return;if(B.anisotropy>1||i.get(B).__currentAnisotropy){const de=e.get("EXT_texture_filter_anisotropic");s.texParameterf(Y,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(B.anisotropy,a.getMaxAnisotropy())),i.get(B).__currentAnisotropy=B.anisotropy}}}function Pe(Y,B){let de=!1;Y.__webglInit===void 0&&(Y.__webglInit=!0,B.addEventListener("dispose",H));const me=B.source;let Ce=S.get(me);Ce===void 0&&(Ce={},S.set(me,Ce));const Qe=Q(B);if(Qe!==Y.__cacheKey){Ce[Qe]===void 0&&(Ce[Qe]={texture:s.createTexture(),usedTimes:0},d.memory.textures++,de=!0),Ce[Qe].usedTimes++;const Ke=Ce[Y.__cacheKey];Ke!==void 0&&(Ce[Y.__cacheKey].usedTimes--,Ke.usedTimes===0&&V(B)),Y.__cacheKey=Qe,Y.__webglTexture=Ce[Qe].texture}return de}function qe(Y,B,de){return Math.floor(Math.floor(Y/de)/B)}function He(Y,B,de,me){const Qe=Y.updateRanges;if(Qe.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,B.width,B.height,de,me,B.data);else{Qe.sort((Rt,rt)=>Rt.start-rt.start);let Ke=0;for(let Rt=1;Rt<Qe.length;Rt++){const rt=Qe[Ke],st=Qe[Rt],mt=rt.start+rt.count,Ct=qe(st.start,B.width,4),jt=qe(rt.start,B.width,4);st.start<=mt+1&&Ct===jt&&qe(st.start+st.count-1,B.width,4)===Ct?rt.count=Math.max(rt.count,st.start+st.count-rt.start):(++Ke,Qe[Ke]=st)}Qe.length=Ke+1;const ke=t.getParameter(s.UNPACK_ROW_LENGTH),De=t.getParameter(s.UNPACK_SKIP_PIXELS),et=t.getParameter(s.UNPACK_SKIP_ROWS);t.pixelStorei(s.UNPACK_ROW_LENGTH,B.width);for(let Rt=0,rt=Qe.length;Rt<rt;Rt++){const st=Qe[Rt],mt=Math.floor(st.start/4),Ct=Math.ceil(st.count/4),jt=mt%B.width,ae=Math.floor(mt/B.width),_e=Ct,Le=1;t.pixelStorei(s.UNPACK_SKIP_PIXELS,jt),t.pixelStorei(s.UNPACK_SKIP_ROWS,ae),t.texSubImage2D(s.TEXTURE_2D,0,jt,ae,_e,Le,de,me,B.data)}Y.clearUpdateRanges(),t.pixelStorei(s.UNPACK_ROW_LENGTH,ke),t.pixelStorei(s.UNPACK_SKIP_PIXELS,De),t.pixelStorei(s.UNPACK_SKIP_ROWS,et)}}function pt(Y,B,de){let me=s.TEXTURE_2D;(B.isDataArrayTexture||B.isCompressedArrayTexture)&&(me=s.TEXTURE_2D_ARRAY),B.isData3DTexture&&(me=s.TEXTURE_3D);const Ce=Pe(Y,B),Qe=B.source;t.bindTexture(me,Y.__webglTexture,s.TEXTURE0+de);const Ke=i.get(Qe);if(Qe.version!==Ke.__version||Ce===!0){if(t.activeTexture(s.TEXTURE0+de),(typeof ImageBitmap<"u"&&B.image instanceof ImageBitmap)===!1){const Le=wn.getPrimaries(wn.workingColorSpace),it=B.colorSpace===Cc?null:wn.getPrimaries(B.colorSpace),tt=B.colorSpace===Cc||Le===it?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,tt)}t.pixelStorei(s.UNPACK_ALIGNMENT,B.unpackAlignment);let De=C(B.image,!1,a.maxTextureSize);De=Cn(B,De);const et=c.convert(B.format,B.colorSpace),Rt=c.convert(B.type);let rt=L(B.internalFormat,et,Rt,B.normalized,B.colorSpace,B.isVideoTexture);ct(me,B);let st;const mt=B.mipmaps,Ct=B.isVideoTexture!==!0,jt=Ke.__version===void 0||Ce===!0,ae=Qe.dataReady,_e=U(B,De);if(B.isDepthTexture)rt=O(B.format===Gu,B.type),jt&&(Ct?t.texStorage2D(s.TEXTURE_2D,1,rt,De.width,De.height):t.texImage2D(s.TEXTURE_2D,0,rt,De.width,De.height,0,et,Rt,null));else if(B.isDataTexture)if(mt.length>0){Ct&&jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,mt[0].width,mt[0].height);for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,Rt,st.data):t.texImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,et,Rt,st.data);B.generateMipmaps=!1}else Ct?(jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,De.width,De.height),ae&&He(B,De,et,Rt)):t.texImage2D(s.TEXTURE_2D,0,rt,De.width,De.height,0,et,Rt,De.data);else if(B.isCompressedTexture)if(B.isCompressedArrayTexture){Ct&&jt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,_e,rt,mt[0].width,mt[0].height,De.depth);for(let Le=0,it=mt.length;Le<it;Le++)if(st=mt[Le],B.format!==as)if(et!==null)if(Ct){if(ae)if(B.layerUpdates.size>0){const tt=Ww(st.width,st.height,B.format,B.type);for(const Ne of B.layerUpdates){const Mt=st.data.subarray(Ne*tt/st.data.BYTES_PER_ELEMENT,(Ne+1)*tt/st.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,Ne,st.width,st.height,1,et,Mt)}B.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,0,st.width,st.height,De.depth,et,st.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,Le,rt,st.width,st.height,De.depth,0,st.data,0,0);else ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ct?ae&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,Le,0,0,0,st.width,st.height,De.depth,et,Rt,st.data):t.texImage3D(s.TEXTURE_2D_ARRAY,Le,rt,st.width,st.height,De.depth,0,et,Rt,st.data)}else{Ct&&jt&&t.texStorage2D(s.TEXTURE_2D,_e,rt,mt[0].width,mt[0].height);for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],B.format!==as?et!==null?Ct?ae&&t.compressedTexSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,st.data):t.compressedTexImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,st.data):ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,st.width,st.height,et,Rt,st.data):t.texImage2D(s.TEXTURE_2D,Le,rt,st.width,st.height,0,et,Rt,st.data)}else if(B.isDataArrayTexture)if(Ct){if(jt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,_e,rt,De.width,De.height,De.depth),ae)if(B.layerUpdates.size>0){const Le=Ww(De.width,De.height,B.format,B.type);for(const it of B.layerUpdates){const tt=De.data.subarray(it*Le/De.data.BYTES_PER_ELEMENT,(it+1)*Le/De.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,it,De.width,De.height,1,et,Rt,tt)}B.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,De.width,De.height,De.depth,et,Rt,De.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,rt,De.width,De.height,De.depth,0,et,Rt,De.data);else if(B.isData3DTexture)Ct?(jt&&t.texStorage3D(s.TEXTURE_3D,_e,rt,De.width,De.height,De.depth),ae&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,De.width,De.height,De.depth,et,Rt,De.data)):t.texImage3D(s.TEXTURE_3D,0,rt,De.width,De.height,De.depth,0,et,Rt,De.data);else if(B.isFramebufferTexture){if(jt)if(Ct)t.texStorage2D(s.TEXTURE_2D,_e,rt,De.width,De.height);else{let Le=De.width,it=De.height;for(let tt=0;tt<_e;tt++)t.texImage2D(s.TEXTURE_2D,tt,rt,Le,it,0,et,Rt,null),Le>>=1,it>>=1}}else if(B.isHTMLTexture){if("texElementImage2D"in s){const Le=s.canvas;if(Le.hasAttribute("layoutsubtree")||Le.setAttribute("layoutsubtree","true"),De.parentNode!==Le){Le.appendChild(De),M.add(B),Le.onpaint=it=>{const tt=it.changedElements;for(const Ne of M)tt.includes(Ne.image)&&(Ne.needsUpdate=!0)},Le.requestPaint();return}if(s.texElementImage2D.length===3)s.texElementImage2D(s.TEXTURE_2D,s.RGBA8,De);else{const tt=s.RGBA,Ne=s.RGBA,Mt=s.UNSIGNED_BYTE;s.texElementImage2D(s.TEXTURE_2D,0,tt,Ne,Mt,De)}s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE)}}else if(mt.length>0){if(Ct&&jt){const Le=an(mt[0]);t.texStorage2D(s.TEXTURE_2D,_e,rt,Le.width,Le.height)}for(let Le=0,it=mt.length;Le<it;Le++)st=mt[Le],Ct?ae&&t.texSubImage2D(s.TEXTURE_2D,Le,0,0,et,Rt,st):t.texImage2D(s.TEXTURE_2D,Le,rt,et,Rt,st);B.generateMipmaps=!1}else if(Ct){if(jt){const Le=an(De);t.texStorage2D(s.TEXTURE_2D,_e,rt,Le.width,Le.height)}ae&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,et,Rt,De)}else t.texImage2D(s.TEXTURE_2D,0,rt,et,Rt,De);T(B)&&D(me),Ke.__version=Qe.version,B.onUpdate&&B.onUpdate(B)}Y.__version=B.version}function Nt(Y,B,de){if(B.image.length!==6)return;const me=Pe(Y,B),Ce=B.source;t.bindTexture(s.TEXTURE_CUBE_MAP,Y.__webglTexture,s.TEXTURE0+de);const Qe=i.get(Ce);if(Ce.version!==Qe.__version||me===!0){t.activeTexture(s.TEXTURE0+de);const Ke=wn.getPrimaries(wn.workingColorSpace),ke=B.colorSpace===Cc?null:wn.getPrimaries(B.colorSpace),De=B.colorSpace===Cc||Ke===ke?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(s.UNPACK_ALIGNMENT,B.unpackAlignment),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,De);const et=B.isCompressedTexture||B.image[0].isCompressedTexture,Rt=B.image[0]&&B.image[0].isDataTexture,rt=[];for(let Ne=0;Ne<6;Ne++)!et&&!Rt?rt[Ne]=C(B.image[Ne],!0,a.maxCubemapSize):rt[Ne]=Rt?B.image[Ne].image:B.image[Ne],rt[Ne]=Cn(B,rt[Ne]);const st=rt[0],mt=c.convert(B.format,B.colorSpace),Ct=c.convert(B.type),jt=L(B.internalFormat,mt,Ct,B.normalized,B.colorSpace),ae=B.isVideoTexture!==!0,_e=Qe.__version===void 0||me===!0,Le=Ce.dataReady;let it=U(B,st);ct(s.TEXTURE_CUBE_MAP,B);let tt;if(et){ae&&_e&&t.texStorage2D(s.TEXTURE_CUBE_MAP,it,jt,st.width,st.height);for(let Ne=0;Ne<6;Ne++){tt=rt[Ne].mipmaps;for(let Mt=0;Mt<tt.length;Mt++){const gt=tt[Mt];B.format!==as?mt!==null?ae?Le&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,0,0,gt.width,gt.height,mt,gt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,jt,gt.width,gt.height,0,gt.data):ot("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,0,0,gt.width,gt.height,mt,Ct,gt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt,jt,gt.width,gt.height,0,mt,Ct,gt.data)}}}else{if(tt=B.mipmaps,ae&&_e){tt.length>0&&it++;const Ne=an(rt[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,it,jt,Ne.width,Ne.height)}for(let Ne=0;Ne<6;Ne++)if(Rt){ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,rt[Ne].width,rt[Ne].height,mt,Ct,rt[Ne].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,jt,rt[Ne].width,rt[Ne].height,0,mt,Ct,rt[Ne].data);for(let Mt=0;Mt<tt.length;Mt++){const yn=tt[Mt].image[Ne].image;ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,0,0,yn.width,yn.height,mt,Ct,yn.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,jt,yn.width,yn.height,0,mt,Ct,yn.data)}}else{ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,mt,Ct,rt[Ne]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,jt,mt,Ct,rt[Ne]);for(let Mt=0;Mt<tt.length;Mt++){const gt=tt[Mt];ae?Le&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,0,0,mt,Ct,gt.image[Ne]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,Mt+1,jt,mt,Ct,gt.image[Ne])}}}T(B)&&D(s.TEXTURE_CUBE_MAP),Qe.__version=Ce.version,B.onUpdate&&B.onUpdate(B)}Y.__version=B.version}function nt(Y,B,de,me,Ce,Qe){const Ke=c.convert(de.format,de.colorSpace),ke=c.convert(de.type),De=L(de.internalFormat,Ke,ke,de.normalized,de.colorSpace),et=i.get(B),Rt=i.get(de);if(Rt.__renderTarget=B,!et.__hasExternalTextures){const rt=Math.max(1,B.width>>Qe),st=Math.max(1,B.height>>Qe);Ce===s.TEXTURE_3D||Ce===s.TEXTURE_2D_ARRAY?t.texImage3D(Ce,Qe,De,rt,st,B.depth,0,Ke,ke,null):t.texImage2D(Ce,Qe,De,rt,st,0,Ke,ke,null)}t.bindFramebuffer(s.FRAMEBUFFER,Y),Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,me,Ce,Rt.__webglTexture,0,zt(B)):(Ce===s.TEXTURE_2D||Ce>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Ce<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,me,Ce,Rt.__webglTexture,Qe),t.bindFramebuffer(s.FRAMEBUFFER,null)}function sn(Y,B,de){if(s.bindRenderbuffer(s.RENDERBUFFER,Y),B.depthBuffer){const me=B.depthTexture,Ce=me&&me.isDepthTexture?me.type:null,Qe=O(B.stencilBuffer,Ce),Ke=B.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;Et(B)?f.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,zt(B),Qe,B.width,B.height):de?s.renderbufferStorageMultisample(s.RENDERBUFFER,zt(B),Qe,B.width,B.height):s.renderbufferStorage(s.RENDERBUFFER,Qe,B.width,B.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ke,s.RENDERBUFFER,Y)}else{const me=B.textures;for(let Ce=0;Ce<me.length;Ce++){const Qe=me[Ce],Ke=c.convert(Qe.format,Qe.colorSpace),ke=c.convert(Qe.type),De=L(Qe.internalFormat,Ke,ke,Qe.normalized,Qe.colorSpace);Et(B)?f.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,zt(B),De,B.width,B.height):de?s.renderbufferStorageMultisample(s.RENDERBUFFER,zt(B),De,B.width,B.height):s.renderbufferStorage(s.RENDERBUFFER,De,B.width,B.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function Dt(Y,B,de){const me=B.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(s.FRAMEBUFFER,Y),!(B.depthTexture&&B.depthTexture.isDepthTexture))throw new Error("THREE.WebGLTextures: renderTarget.depthTexture must be an instance of THREE.DepthTexture.");const Ce=i.get(B.depthTexture);if(Ce.__renderTarget=B,(!Ce.__webglTexture||B.depthTexture.image.width!==B.width||B.depthTexture.image.height!==B.height)&&(B.depthTexture.image.width=B.width,B.depthTexture.image.height=B.height,B.depthTexture.needsUpdate=!0),me){if(Ce.__webglInit===void 0&&(Ce.__webglInit=!0,B.depthTexture.addEventListener("dispose",H)),Ce.__webglTexture===void 0){Ce.__webglTexture=s.createTexture(),t.bindTexture(s.TEXTURE_CUBE_MAP,Ce.__webglTexture),ct(s.TEXTURE_CUBE_MAP,B.depthTexture);const et=c.convert(B.depthTexture.format),Rt=c.convert(B.depthTexture.type);let rt;B.depthTexture.format===Il?rt=s.DEPTH_COMPONENT24:B.depthTexture.format===Gu&&(rt=s.DEPTH24_STENCIL8);for(let st=0;st<6;st++)s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,rt,B.width,B.height,0,et,Rt,null)}}else ne(B.depthTexture,0);const Qe=Ce.__webglTexture,Ke=zt(B),ke=me?s.TEXTURE_CUBE_MAP_POSITIVE_X+de:s.TEXTURE_2D,De=B.depthTexture.format===Gu?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;if(B.depthTexture.format===Il)Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,De,ke,Qe,0,Ke):s.framebufferTexture2D(s.FRAMEBUFFER,De,ke,Qe,0);else if(B.depthTexture.format===Gu)Et(B)?f.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,De,ke,Qe,0,Ke):s.framebufferTexture2D(s.FRAMEBUFFER,De,ke,Qe,0);else throw new Error("THREE.WebGLTextures: Unknown depthTexture format.")}function Ue(Y){const B=i.get(Y),de=Y.isWebGLCubeRenderTarget===!0;if(B.__boundDepthTexture!==Y.depthTexture){const me=Y.depthTexture;if(B.__depthDisposeCallback&&B.__depthDisposeCallback(),me){const Ce=()=>{delete B.__boundDepthTexture,delete B.__depthDisposeCallback,me.removeEventListener("dispose",Ce)};me.addEventListener("dispose",Ce),B.__depthDisposeCallback=Ce}B.__boundDepthTexture=me}if(Y.depthTexture&&!B.__autoAllocateDepthBuffer)if(de)for(let me=0;me<6;me++)Dt(B.__webglFramebuffer[me],Y,me);else{const me=Y.texture.mipmaps;me&&me.length>0?Dt(B.__webglFramebuffer[0],Y,0):Dt(B.__webglFramebuffer,Y,0)}else if(de){B.__webglDepthbuffer=[];for(let me=0;me<6;me++)if(t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer[me]),B.__webglDepthbuffer[me]===void 0)B.__webglDepthbuffer[me]=s.createRenderbuffer(),sn(B.__webglDepthbuffer[me],Y,!1);else{const Ce=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Qe=B.__webglDepthbuffer[me];s.bindRenderbuffer(s.RENDERBUFFER,Qe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ce,s.RENDERBUFFER,Qe)}}else{const me=Y.texture.mipmaps;if(me&&me.length>0?t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,B.__webglFramebuffer),B.__webglDepthbuffer===void 0)B.__webglDepthbuffer=s.createRenderbuffer(),sn(B.__webglDepthbuffer,Y,!1);else{const Ce=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Qe=B.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,Qe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ce,s.RENDERBUFFER,Qe)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function xe(Y,B,de){const me=i.get(Y);B!==void 0&&nt(me.__webglFramebuffer,Y,Y.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),de!==void 0&&Ue(Y)}function ze(Y){const B=Y.texture,de=i.get(Y),me=i.get(B);Y.addEventListener("dispose",I);const Ce=Y.textures,Qe=Y.isWebGLCubeRenderTarget===!0,Ke=Ce.length>1;if(Ke||(me.__webglTexture===void 0&&(me.__webglTexture=s.createTexture()),me.__version=B.version,d.memory.textures++),Qe){de.__webglFramebuffer=[];for(let ke=0;ke<6;ke++)if(B.mipmaps&&B.mipmaps.length>0){de.__webglFramebuffer[ke]=[];for(let De=0;De<B.mipmaps.length;De++)de.__webglFramebuffer[ke][De]=s.createFramebuffer()}else de.__webglFramebuffer[ke]=s.createFramebuffer()}else{if(B.mipmaps&&B.mipmaps.length>0){de.__webglFramebuffer=[];for(let ke=0;ke<B.mipmaps.length;ke++)de.__webglFramebuffer[ke]=s.createFramebuffer()}else de.__webglFramebuffer=s.createFramebuffer();if(Ke)for(let ke=0,De=Ce.length;ke<De;ke++){const et=i.get(Ce[ke]);et.__webglTexture===void 0&&(et.__webglTexture=s.createTexture(),d.memory.textures++)}if(Y.samples>0&&Et(Y)===!1){de.__webglMultisampledFramebuffer=s.createFramebuffer(),de.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let ke=0;ke<Ce.length;ke++){const De=Ce[ke];de.__webglColorRenderbuffer[ke]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,de.__webglColorRenderbuffer[ke]);const et=c.convert(De.format,De.colorSpace),Rt=c.convert(De.type),rt=L(De.internalFormat,et,Rt,De.normalized,De.colorSpace,Y.isXRRenderTarget===!0),st=zt(Y);s.renderbufferStorageMultisample(s.RENDERBUFFER,st,rt,Y.width,Y.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+ke,s.RENDERBUFFER,de.__webglColorRenderbuffer[ke])}s.bindRenderbuffer(s.RENDERBUFFER,null),Y.depthBuffer&&(de.__webglDepthRenderbuffer=s.createRenderbuffer(),sn(de.__webglDepthRenderbuffer,Y,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(Qe){t.bindTexture(s.TEXTURE_CUBE_MAP,me.__webglTexture),ct(s.TEXTURE_CUBE_MAP,B);for(let ke=0;ke<6;ke++)if(B.mipmaps&&B.mipmaps.length>0)for(let De=0;De<B.mipmaps.length;De++)nt(de.__webglFramebuffer[ke][De],Y,B,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ke,De);else nt(de.__webglFramebuffer[ke],Y,B,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0);T(B)&&D(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ke){for(let ke=0,De=Ce.length;ke<De;ke++){const et=Ce[ke],Rt=i.get(et);let rt=s.TEXTURE_2D;(Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(rt=Y.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(rt,Rt.__webglTexture),ct(rt,et),nt(de.__webglFramebuffer,Y,et,s.COLOR_ATTACHMENT0+ke,rt,0),T(et)&&D(rt)}t.unbindTexture()}else{let ke=s.TEXTURE_2D;if((Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(ke=Y.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(ke,me.__webglTexture),ct(ke,B),B.mipmaps&&B.mipmaps.length>0)for(let De=0;De<B.mipmaps.length;De++)nt(de.__webglFramebuffer[De],Y,B,s.COLOR_ATTACHMENT0,ke,De);else nt(de.__webglFramebuffer,Y,B,s.COLOR_ATTACHMENT0,ke,0);T(B)&&D(ke),t.unbindTexture()}Y.depthBuffer&&Ue(Y)}function je(Y){const B=Y.textures;for(let de=0,me=B.length;de<me;de++){const Ce=B[de];if(T(Ce)){const Qe=z(Y),Ke=i.get(Ce).__webglTexture;t.bindTexture(Qe,Ke),D(Qe),t.unbindTexture()}}}const Ze=[],Pt=[];function bt(Y){if(Y.samples>0){if(Et(Y)===!1){const B=Y.textures,de=Y.width,me=Y.height;let Ce=s.COLOR_BUFFER_BIT;const Qe=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ke=i.get(Y),ke=B.length>1;if(ke)for(let et=0;et<B.length;et++)t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,Ke.__webglMultisampledFramebuffer);const De=Y.texture.mipmaps;De&&De.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglFramebuffer);for(let et=0;et<B.length;et++){if(Y.resolveDepthBuffer&&(Y.depthBuffer&&(Ce|=s.DEPTH_BUFFER_BIT),Y.stencilBuffer&&Y.resolveStencilBuffer&&(Ce|=s.STENCIL_BUFFER_BIT)),ke){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,Ke.__webglColorRenderbuffer[et]);const Rt=i.get(B[et]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Rt,0)}s.blitFramebuffer(0,0,de,me,0,0,de,me,Ce,s.NEAREST),m===!0&&(Ze.length=0,Pt.length=0,Ze.push(s.COLOR_ATTACHMENT0+et),Y.depthBuffer&&Y.resolveDepthBuffer===!1&&(Ze.push(Qe),Pt.push(Qe),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,Pt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,Ze))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),ke)for(let et=0;et<B.length;et++){t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.RENDERBUFFER,Ke.__webglColorRenderbuffer[et]);const Rt=i.get(B[et]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,Ke.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+et,s.TEXTURE_2D,Rt,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,Ke.__webglMultisampledFramebuffer)}else if(Y.depthBuffer&&Y.resolveDepthBuffer===!1&&m){const B=Y.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[B])}}}function zt(Y){return Math.min(a.maxSamples,Y.samples)}function Et(Y){const B=i.get(Y);return Y.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&B.__useRenderToTexture!==!1}function ee(Y){const B=d.render.frame;v.get(Y)!==B&&(v.set(Y,B),Y.update())}function Cn(Y,B){const de=Y.colorSpace,me=Y.format,Ce=Y.type;return Y.isCompressedTexture===!0||Y.isVideoTexture===!0||de!==Rm&&de!==Cc&&(wn.getTransfer(de)===_n?(me!==as||Ce!==Ss)&&ot("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):kt("WebGLTextures: Unsupported texture color space:",de)),B}function an(Y){return typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement?(g.width=Y.naturalWidth||Y.width,g.height=Y.naturalHeight||Y.height):typeof VideoFrame<"u"&&Y instanceof VideoFrame?(g.width=Y.displayWidth,g.height=Y.displayHeight):(g.width=Y.width,g.height=Y.height),g}this.allocateTextureUnit=j,this.resetTextureUnits=K,this.getTextureUnits=le,this.setTextureUnits=$,this.setTexture2D=ne,this.setTexture2DArray=ce,this.setTexture3D=ye,this.setTextureCube=Te,this.rebindTextures=xe,this.setupRenderTarget=ze,this.updateRenderTargetMipmap=je,this.updateMultisampleRenderTarget=bt,this.setupDepthRenderbuffer=Ue,this.setupFrameBufferTexture=nt,this.useMultisampledRTT=Et,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function _R(s,e){function t(i,a=Cc){let c;const d=wn.getTransfer(a);if(i===Ss)return s.UNSIGNED_BYTE;if(i===Px)return s.UNSIGNED_SHORT_4_4_4_4;if(i===kx)return s.UNSIGNED_SHORT_5_5_5_1;if(i===m1)return s.UNSIGNED_INT_5_9_9_9_REV;if(i===g1)return s.UNSIGNED_INT_10F_11F_11F_REV;if(i===h1)return s.BYTE;if(i===p1)return s.SHORT;if(i===Em)return s.UNSIGNED_SHORT;if(i===Rx)return s.INT;if(i===oo)return s.UNSIGNED_INT;if(i===ws)return s.FLOAT;if(i===Ll)return s.HALF_FLOAT;if(i===A1)return s.ALPHA;if(i===v1)return s.RGB;if(i===as)return s.RGBA;if(i===Il)return s.DEPTH_COMPONENT;if(i===Gu)return s.DEPTH_STENCIL;if(i===Dx)return s.RED;if(i===Tv)return s.RED_INTEGER;if(i===Yu)return s.RG;if(i===Lx)return s.RG_INTEGER;if(i===Ix)return s.RGBA_INTEGER;if(i===ev||i===tv||i===nv||i===iv)if(d===_n)if(c=e.get("WEBGL_compressed_texture_s3tc_srgb"),c!==null){if(i===ev)return c.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===tv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===nv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===iv)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(c=e.get("WEBGL_compressed_texture_s3tc"),c!==null){if(i===ev)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===tv)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===nv)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===iv)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Ub||i===Fb||i===Ob||i===Vb)if(c=e.get("WEBGL_compressed_texture_pvrtc"),c!==null){if(i===Ub)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Fb)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Ob)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Vb)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Hb||i===Gb||i===Wb||i===jb||i===Xb||i===cv||i===qb)if(c=e.get("WEBGL_compressed_texture_etc"),c!==null){if(i===Hb||i===Gb)return d===_n?c.COMPRESSED_SRGB8_ETC2:c.COMPRESSED_RGB8_ETC2;if(i===Wb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:c.COMPRESSED_RGBA8_ETC2_EAC;if(i===jb)return c.COMPRESSED_R11_EAC;if(i===Xb)return c.COMPRESSED_SIGNED_R11_EAC;if(i===cv)return c.COMPRESSED_RG11_EAC;if(i===qb)return c.COMPRESSED_SIGNED_RG11_EAC}else return null;if(i===Yb||i===Jb||i===Qb||i===Zb||i===Kb||i===_b||i===$b||i===ex||i===tx||i===nx||i===ix||i===rx||i===sx||i===ax)if(c=e.get("WEBGL_compressed_texture_astc"),c!==null){if(i===Yb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:c.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===Jb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:c.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Qb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:c.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Zb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:c.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Kb)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:c.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===_b)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:c.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===$b)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:c.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===ex)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:c.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===tx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:c.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===nx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:c.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===ix)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:c.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===rx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:c.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===sx)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:c.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===ax)return d===_n?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:c.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===ox||i===lx||i===cx)if(c=e.get("EXT_texture_compression_bptc"),c!==null){if(i===ox)return d===_n?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===lx)return c.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===cx)return c.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===ux||i===dx||i===uv||i===fx)if(c=e.get("EXT_texture_compression_rgtc"),c!==null){if(i===ux)return c.COMPRESSED_RED_RGTC1_EXT;if(i===dx)return c.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===uv)return c.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===fx)return c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Cm?s.UNSIGNED_INT_24_8:s[i]!==void 0?s[i]:null}return{convert:t}}const S4=`
|
|
4198
4198
|
void main() {
|
|
4199
4199
|
|
|
4200
4200
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -4218,7 +4218,7 @@ void main() {
|
|
|
4218
4218
|
|
|
4219
4219
|
}
|
|
4220
4220
|
|
|
4221
|
-
}`;class w4{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const i=new R1(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new Pa({vertexShader:S4,fragmentShader:M4,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new or(new Fm(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class T4 extends Xo{constructor(e,t){super();const i=this;let a=null,c=1,d=null,f="local-floor",m=1,g=null,v=null,M=null,x=null,S=null,w=null;const k=typeof XRWebGLBinding<"u",C=new w4,T={},D=t.getContextAttributes();let z=null,L=null;const O=[],U=[],H=new Oe;let I=null;const F=new kr;F.viewport=new ni;const V=new kr;V.viewport=new ni;const X=[F,V],_=new UR;let K=null,le=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Pe){let Xe=O[Pe];return Xe===void 0&&(Xe=new Mb,O[Pe]=Xe),Xe.getTargetRaySpace()},this.getControllerGrip=function(Pe){let Xe=O[Pe];return Xe===void 0&&(Xe=new Mb,O[Pe]=Xe),Xe.getGripSpace()},this.getHand=function(Pe){let Xe=O[Pe];return Xe===void 0&&(Xe=new Mb,O[Pe]=Xe),Xe.getHandSpace()};function $(Pe){const Xe=U.indexOf(Pe.inputSource);if(Xe===-1)return;const He=O[Xe];He!==void 0&&(He.update(Pe.inputSource,Pe.frame,g||d),He.dispatchEvent({type:Pe.type,data:Pe.inputSource}))}function j(){a.removeEventListener("select",$),a.removeEventListener("selectstart",$),a.removeEventListener("selectend",$),a.removeEventListener("squeeze",$),a.removeEventListener("squeezestart",$),a.removeEventListener("squeezeend",$),a.removeEventListener("end",j),a.removeEventListener("inputsourceschange",Q);for(let Pe=0;Pe<O.length;Pe++){const Xe=U[Pe];Xe!==null&&(U[Pe]=null,O[Pe].disconnect(Xe))}K=null,le=null,C.reset();for(const Pe in T)delete T[Pe];e.setRenderTarget(z),S=null,x=null,M=null,a=null,L=null,ct.stop(),i.isPresenting=!1,e.setPixelRatio(I),e.setSize(H.width,H.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Pe){c=Pe,i.isPresenting===!0&&ot("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Pe){f=Pe,i.isPresenting===!0&&ot("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return g||d},this.setReferenceSpace=function(Pe){g=Pe},this.getBaseLayer=function(){return x!==null?x:S},this.getBinding=function(){return M===null&&k&&(M=new XRWebGLBinding(a,t)),M},this.getFrame=function(){return w},this.getSession=function(){return a},this.setSession=async function(Pe){if(a=Pe,a!==null){if(z=e.getRenderTarget(),a.addEventListener("select",$),a.addEventListener("selectstart",$),a.addEventListener("selectend",$),a.addEventListener("squeeze",$),a.addEventListener("squeezestart",$),a.addEventListener("squeezeend",$),a.addEventListener("end",j),a.addEventListener("inputsourceschange",Q),D.xrCompatible!==!0&&await t.makeXRCompatible(),I=e.getPixelRatio(),e.getSize(H),k&&"createProjectionLayer"in XRWebGLBinding.prototype){let He=null,pt=null,Nt=null;D.depth&&(Nt=D.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,He=D.stencil?Gu:Il,pt=D.stencil?Cm:oo);const nt={colorFormat:t.RGBA8,depthFormat:Nt,scaleFactor:c};M=this.getBinding(),x=M.createProjectionLayer(nt),a.updateRenderState({layers:[x]}),e.setPixelRatio(1),e.setSize(x.textureWidth,x.textureHeight,!1),L=new Ra(x.textureWidth,x.textureHeight,{format:as,type:Ss,depthTexture:new jf(x.textureWidth,x.textureHeight,pt,void 0,void 0,void 0,void 0,void 0,void 0,He),stencilBuffer:D.stencil,colorSpace:e.outputColorSpace,samples:D.antialias?4:0,resolveDepthBuffer:x.ignoreDepthValues===!1,resolveStencilBuffer:x.ignoreDepthValues===!1})}else{const He={antialias:D.antialias,alpha:!0,depth:D.depth,stencil:D.stencil,framebufferScaleFactor:c};S=new XRWebGLLayer(a,t,He),a.updateRenderState({baseLayer:S}),e.setPixelRatio(1),e.setSize(S.framebufferWidth,S.framebufferHeight,!1),L=new Ra(S.framebufferWidth,S.framebufferHeight,{format:as,type:Ss,colorSpace:e.outputColorSpace,stencilBuffer:D.stencil,resolveDepthBuffer:S.ignoreDepthValues===!1,resolveStencilBuffer:S.ignoreDepthValues===!1})}L.isXRRenderTarget=!0,this.setFoveation(m),g=null,d=await a.requestReferenceSpace(f),ct.setContext(a),ct.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(a!==null)return a.environmentBlendMode},this.getDepthTexture=function(){return C.getDepthTexture()};function Q(Pe){for(let Xe=0;Xe<Pe.removed.length;Xe++){const He=Pe.removed[Xe],pt=U.indexOf(He);pt>=0&&(U[pt]=null,O[pt].disconnect(He))}for(let Xe=0;Xe<Pe.added.length;Xe++){const He=Pe.added[Xe];let pt=U.indexOf(He);if(pt===-1){for(let nt=0;nt<O.length;nt++)if(nt>=U.length){U.push(He),pt=nt;break}else if(U[nt]===null){U[nt]=He,pt=nt;break}if(pt===-1)break}const Nt=O[pt];Nt&&Nt.connect(He)}}const ne=new J,ce=new J;function ye(Pe,Xe,He){ne.setFromMatrixPosition(Xe.matrixWorld),ce.setFromMatrixPosition(He.matrixWorld);const pt=ne.distanceTo(ce),Nt=Xe.projectionMatrix.elements,nt=He.projectionMatrix.elements,sn=Nt[14]/(Nt[10]-1),Dt=Nt[14]/(Nt[10]+1),Be=(Nt[9]+1)/Nt[5],xe=(Nt[9]-1)/Nt[5],Ue=(Nt[8]-1)/Nt[0],qe=(nt[8]+1)/nt[0],Ze=sn*Ue,Pt=sn*qe,bt=pt/(-Ue+qe),zt=bt*-Ue;if(Xe.matrixWorld.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.translateX(zt),Pe.translateZ(bt),Pe.matrixWorld.compose(Pe.position,Pe.quaternion,Pe.scale),Pe.matrixWorldInverse.copy(Pe.matrixWorld).invert(),Nt[10]===-1)Pe.projectionMatrix.copy(Xe.projectionMatrix),Pe.projectionMatrixInverse.copy(Xe.projectionMatrixInverse);else{const Et=sn+bt,ee=Dt+bt,Cn=Ze-zt,an=Pt+(pt-zt),Y=Be*Dt/ee*Et,B=xe*Dt/ee*Et;Pe.projectionMatrix.makePerspective(Cn,an,Y,B,Et,ee),Pe.projectionMatrixInverse.copy(Pe.projectionMatrix).invert()}}function Te(Pe,Xe){Xe===null?Pe.matrixWorld.copy(Pe.matrix):Pe.matrixWorld.multiplyMatrices(Xe.matrixWorld,Pe.matrix),Pe.matrixWorldInverse.copy(Pe.matrixWorld).invert()}this.updateCamera=function(Pe){if(a===null)return;let Xe=Pe.near,He=Pe.far;C.texture!==null&&(C.depthNear>0&&(Xe=C.depthNear),C.depthFar>0&&(He=C.depthFar)),_.near=V.near=F.near=Xe,_.far=V.far=F.far=He,(K!==_.near||le!==_.far)&&(a.updateRenderState({depthNear:_.near,depthFar:_.far}),K=_.near,le=_.far),_.layers.mask=Pe.layers.mask|6,F.layers.mask=_.layers.mask&-5,V.layers.mask=_.layers.mask&-3;const pt=Pe.parent,Nt=_.cameras;Te(_,pt);for(let nt=0;nt<Nt.length;nt++)Te(Nt[nt],pt);Nt.length===2?ye(_,F,V):_.projectionMatrix.copy(F.projectionMatrix),Fe(Pe,_,pt)};function Fe(Pe,Xe,He){He===null?Pe.matrix.copy(Xe.matrixWorld):(Pe.matrix.copy(He.matrixWorld),Pe.matrix.invert(),Pe.matrix.multiply(Xe.matrixWorld)),Pe.matrix.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.updateMatrixWorld(!0),Pe.projectionMatrix.copy(Xe.projectionMatrix),Pe.projectionMatrixInverse.copy(Xe.projectionMatrixInverse),Pe.isPerspectiveCamera&&(Pe.fov=Pm*2*Math.atan(1/Pe.projectionMatrix.elements[5]),Pe.zoom=1)}this.getCamera=function(){return _},this.getFoveation=function(){if(!(x===null&&S===null))return m},this.setFoveation=function(Pe){m=Pe,x!==null&&(x.fixedFoveation=Pe),S!==null&&S.fixedFoveation!==void 0&&(S.fixedFoveation=Pe)},this.hasDepthSensing=function(){return C.texture!==null},this.getDepthSensingMesh=function(){return C.getMesh(_)},this.getCameraTexture=function(Pe){return T[Pe]};let lt=null;function ht(Pe,Xe){if(v=Xe.getViewerPose(g||d),w=Xe,v!==null){const He=v.views;S!==null&&(e.setRenderTargetFramebuffer(L,S.framebuffer),e.setRenderTarget(L));let pt=!1;He.length!==_.cameras.length&&(_.cameras.length=0,pt=!0);for(let Dt=0;Dt<He.length;Dt++){const Be=He[Dt];let xe=null;if(S!==null)xe=S.getViewport(Be);else{const qe=M.getViewSubImage(x,Be);xe=qe.viewport,Dt===0&&(e.setRenderTargetTextures(L,qe.colorTexture,qe.depthStencilTexture),e.setRenderTarget(L))}let Ue=X[Dt];Ue===void 0&&(Ue=new kr,Ue.layers.enable(Dt),Ue.viewport=new ni,X[Dt]=Ue),Ue.matrix.fromArray(Be.transform.matrix),Ue.matrix.decompose(Ue.position,Ue.quaternion,Ue.scale),Ue.projectionMatrix.fromArray(Be.projectionMatrix),Ue.projectionMatrixInverse.copy(Ue.projectionMatrix).invert(),Ue.viewport.set(xe.x,xe.y,xe.width,xe.height),Dt===0&&(_.matrix.copy(Ue.matrix),_.matrix.decompose(_.position,_.quaternion,_.scale)),pt===!0&&_.cameras.push(Ue)}const Nt=a.enabledFeatures;if(Nt&&Nt.includes("depth-sensing")&&a.depthUsage=="gpu-optimized"&&k){M=i.getBinding();const Dt=M.getDepthInformation(He[0]);Dt&&Dt.isValid&&Dt.texture&&C.init(Dt,a.renderState)}if(Nt&&Nt.includes("camera-access")&&k){e.state.unbindTexture(),M=i.getBinding();for(let Dt=0;Dt<He.length;Dt++){const Be=He[Dt].camera;if(Be){let xe=T[Be];xe||(xe=new R1,T[Be]=xe);const Ue=M.getCameraImage(Be);xe.sourceTexture=Ue}}}}for(let He=0;He<O.length;He++){const pt=U[He],Nt=O[He];pt!==null&&Nt!==void 0&&Nt.update(pt,Xe,g||d)}lt&<(Pe,Xe),Xe.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:Xe}),w=null}const ct=new qR;ct.setAnimationLoop(ht),this.setAnimationLoop=function(Pe){lt=Pe},this.dispose=function(){}}}const E4=new Zt,$R=new _t;$R.set(-1,0,0,0,1,0,0,0,1);function C4(s,e){function t(C,T){C.matrixAutoUpdate===!0&&C.updateMatrix(),T.value.copy(C.matrix)}function i(C,T){T.color.getRGB(C.fogColor.value,uR(s)),T.isFog?(C.fogNear.value=T.near,C.fogFar.value=T.far):T.isFogExp2&&(C.fogDensity.value=T.density)}function a(C,T,D,z,L){T.isNodeMaterial?T.uniformsNeedUpdate=!1:T.isMeshBasicMaterial?c(C,T):T.isMeshLambertMaterial?(c(C,T),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)):T.isMeshToonMaterial?(c(C,T),M(C,T)):T.isMeshPhongMaterial?(c(C,T),v(C,T),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)):T.isMeshStandardMaterial?(c(C,T),x(C,T),T.isMeshPhysicalMaterial&&S(C,T,L)):T.isMeshMatcapMaterial?(c(C,T),w(C,T)):T.isMeshDepthMaterial?c(C,T):T.isMeshDistanceMaterial?(c(C,T),k(C,T)):T.isMeshNormalMaterial?c(C,T):T.isLineBasicMaterial?(d(C,T),T.isLineDashedMaterial&&f(C,T)):T.isPointsMaterial?m(C,T,D,z):T.isSpriteMaterial?g(C,T):T.isShadowMaterial?(C.color.value.copy(T.color),C.opacity.value=T.opacity):T.isShaderMaterial&&(T.uniformsNeedUpdate=!1)}function c(C,T){C.opacity.value=T.opacity,T.color&&C.diffuse.value.copy(T.color),T.emissive&&C.emissive.value.copy(T.emissive).multiplyScalar(T.emissiveIntensity),T.map&&(C.map.value=T.map,t(T.map,C.mapTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.bumpMap&&(C.bumpMap.value=T.bumpMap,t(T.bumpMap,C.bumpMapTransform),C.bumpScale.value=T.bumpScale,T.side===Ts&&(C.bumpScale.value*=-1)),T.normalMap&&(C.normalMap.value=T.normalMap,t(T.normalMap,C.normalMapTransform),C.normalScale.value.copy(T.normalScale),T.side===Ts&&C.normalScale.value.negate()),T.displacementMap&&(C.displacementMap.value=T.displacementMap,t(T.displacementMap,C.displacementMapTransform),C.displacementScale.value=T.displacementScale,C.displacementBias.value=T.displacementBias),T.emissiveMap&&(C.emissiveMap.value=T.emissiveMap,t(T.emissiveMap,C.emissiveMapTransform)),T.specularMap&&(C.specularMap.value=T.specularMap,t(T.specularMap,C.specularMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest);const D=e.get(T),z=D.envMap,L=D.envMapRotation;z&&(C.envMap.value=z,C.envMapRotation.value.setFromMatrix4(E4.makeRotationFromEuler(L)).transpose(),z.isCubeTexture&&z.isRenderTargetTexture===!1&&C.envMapRotation.value.premultiply($R),C.reflectivity.value=T.reflectivity,C.ior.value=T.ior,C.refractionRatio.value=T.refractionRatio),T.lightMap&&(C.lightMap.value=T.lightMap,C.lightMapIntensity.value=T.lightMapIntensity,t(T.lightMap,C.lightMapTransform)),T.aoMap&&(C.aoMap.value=T.aoMap,C.aoMapIntensity.value=T.aoMapIntensity,t(T.aoMap,C.aoMapTransform))}function d(C,T){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,T.map&&(C.map.value=T.map,t(T.map,C.mapTransform))}function f(C,T){C.dashSize.value=T.dashSize,C.totalSize.value=T.dashSize+T.gapSize,C.scale.value=T.scale}function m(C,T,D,z){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,C.size.value=T.size*D,C.scale.value=z*.5,T.map&&(C.map.value=T.map,t(T.map,C.uvTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest)}function g(C,T){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,C.rotation.value=T.rotation,T.map&&(C.map.value=T.map,t(T.map,C.mapTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest)}function v(C,T){C.specular.value.copy(T.specular),C.shininess.value=Math.max(T.shininess,1e-4)}function M(C,T){T.gradientMap&&(C.gradientMap.value=T.gradientMap)}function x(C,T){C.metalness.value=T.metalness,T.metalnessMap&&(C.metalnessMap.value=T.metalnessMap,t(T.metalnessMap,C.metalnessMapTransform)),C.roughness.value=T.roughness,T.roughnessMap&&(C.roughnessMap.value=T.roughnessMap,t(T.roughnessMap,C.roughnessMapTransform)),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)}function S(C,T,D){C.ior.value=T.ior,T.sheen>0&&(C.sheenColor.value.copy(T.sheenColor).multiplyScalar(T.sheen),C.sheenRoughness.value=T.sheenRoughness,T.sheenColorMap&&(C.sheenColorMap.value=T.sheenColorMap,t(T.sheenColorMap,C.sheenColorMapTransform)),T.sheenRoughnessMap&&(C.sheenRoughnessMap.value=T.sheenRoughnessMap,t(T.sheenRoughnessMap,C.sheenRoughnessMapTransform))),T.clearcoat>0&&(C.clearcoat.value=T.clearcoat,C.clearcoatRoughness.value=T.clearcoatRoughness,T.clearcoatMap&&(C.clearcoatMap.value=T.clearcoatMap,t(T.clearcoatMap,C.clearcoatMapTransform)),T.clearcoatRoughnessMap&&(C.clearcoatRoughnessMap.value=T.clearcoatRoughnessMap,t(T.clearcoatRoughnessMap,C.clearcoatRoughnessMapTransform)),T.clearcoatNormalMap&&(C.clearcoatNormalMap.value=T.clearcoatNormalMap,t(T.clearcoatNormalMap,C.clearcoatNormalMapTransform),C.clearcoatNormalScale.value.copy(T.clearcoatNormalScale),T.side===Ts&&C.clearcoatNormalScale.value.negate())),T.dispersion>0&&(C.dispersion.value=T.dispersion),T.iridescence>0&&(C.iridescence.value=T.iridescence,C.iridescenceIOR.value=T.iridescenceIOR,C.iridescenceThicknessMinimum.value=T.iridescenceThicknessRange[0],C.iridescenceThicknessMaximum.value=T.iridescenceThicknessRange[1],T.iridescenceMap&&(C.iridescenceMap.value=T.iridescenceMap,t(T.iridescenceMap,C.iridescenceMapTransform)),T.iridescenceThicknessMap&&(C.iridescenceThicknessMap.value=T.iridescenceThicknessMap,t(T.iridescenceThicknessMap,C.iridescenceThicknessMapTransform))),T.transmission>0&&(C.transmission.value=T.transmission,C.transmissionSamplerMap.value=D.texture,C.transmissionSamplerSize.value.set(D.width,D.height),T.transmissionMap&&(C.transmissionMap.value=T.transmissionMap,t(T.transmissionMap,C.transmissionMapTransform)),C.thickness.value=T.thickness,T.thicknessMap&&(C.thicknessMap.value=T.thicknessMap,t(T.thicknessMap,C.thicknessMapTransform)),C.attenuationDistance.value=T.attenuationDistance,C.attenuationColor.value.copy(T.attenuationColor)),T.anisotropy>0&&(C.anisotropyVector.value.set(T.anisotropy*Math.cos(T.anisotropyRotation),T.anisotropy*Math.sin(T.anisotropyRotation)),T.anisotropyMap&&(C.anisotropyMap.value=T.anisotropyMap,t(T.anisotropyMap,C.anisotropyMapTransform))),C.specularIntensity.value=T.specularIntensity,C.specularColor.value.copy(T.specularColor),T.specularColorMap&&(C.specularColorMap.value=T.specularColorMap,t(T.specularColorMap,C.specularColorMapTransform)),T.specularIntensityMap&&(C.specularIntensityMap.value=T.specularIntensityMap,t(T.specularIntensityMap,C.specularIntensityMapTransform))}function w(C,T){T.matcap&&(C.matcap.value=T.matcap)}function k(C,T){const D=e.get(T).light;C.referencePosition.value.setFromMatrixPosition(D.matrixWorld),C.nearDistance.value=D.shadow.camera.near,C.farDistance.value=D.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:a}}function R4(s,e,t,i){let a={},c={},d=[];const f=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function m(L,O){const U=O.program;i.uniformBlockBinding(L,U)}function g(L,O){let U=a[L.id];U===void 0&&(C(L),U=v(L),a[L.id]=U,L.addEventListener("dispose",D));const H=O.program;i.updateUBOMapping(L,H);const I=e.render.frame;c[L.id]!==I&&(x(L),c[L.id]=I)}function v(L){const O=M();L.__bindingPointIndex=O;const U=s.createBuffer(),H=L.__size,I=L.usage;return s.bindBuffer(s.UNIFORM_BUFFER,U),s.bufferData(s.UNIFORM_BUFFER,H,I),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,O,U),U}function M(){for(let L=0;L<f;L++)if(d.indexOf(L)===-1)return d.push(L),L;return kt("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function x(L){const O=a[L.id],U=L.uniforms,H=L.__cache;s.bindBuffer(s.UNIFORM_BUFFER,O);for(let I=0,F=U.length;I<F;I++){const V=U[I];if(Array.isArray(V))for(let X=0,_=V.length;X<_;X++)S(V[X],I,X,H);else S(V,I,0,H)}s.bindBuffer(s.UNIFORM_BUFFER,null)}function S(L,O,U,H){if(k(L,O,U,H)===!0){const I=L.__offset,F=L.value;if(Array.isArray(F)){let V=0;for(let X=0;X<F.length;X++){const _=F[X],K=T(_);w(_,L.__data,V),typeof _!="number"&&typeof _!="boolean"&&!_.isMatrix3&&!ArrayBuffer.isView(_)&&(V+=K.storage/Float32Array.BYTES_PER_ELEMENT)}}else w(F,L.__data,0);s.bufferSubData(s.UNIFORM_BUFFER,I,L.__data)}}function w(L,O,U){typeof L=="number"||typeof L=="boolean"?O[0]=L:L.isMatrix3?(O[0]=L.elements[0],O[1]=L.elements[1],O[2]=L.elements[2],O[3]=0,O[4]=L.elements[3],O[5]=L.elements[4],O[6]=L.elements[5],O[7]=0,O[8]=L.elements[6],O[9]=L.elements[7],O[10]=L.elements[8],O[11]=0):ArrayBuffer.isView(L)?O.set(new L.constructor(L.buffer,L.byteOffset,O.length)):L.toArray(O,U)}function k(L,O,U,H){const I=L.value,F=O+"_"+U;if(H[F]===void 0)return typeof I=="number"||typeof I=="boolean"?H[F]=I:ArrayBuffer.isView(I)?H[F]=I.slice():H[F]=I.clone(),!0;{const V=H[F];if(typeof I=="number"||typeof I=="boolean"){if(V!==I)return H[F]=I,!0}else{if(ArrayBuffer.isView(I))return!0;if(V.equals(I)===!1)return V.copy(I),!0}}return!1}function C(L){const O=L.uniforms;let U=0;const H=16;for(let F=0,V=O.length;F<V;F++){const X=Array.isArray(O[F])?O[F]:[O[F]];for(let _=0,K=X.length;_<K;_++){const le=X[_],$=Array.isArray(le.value)?le.value:[le.value];for(let j=0,Q=$.length;j<Q;j++){const ne=$[j],ce=T(ne),ye=U%H,Te=ye%ce.boundary,Fe=ye+Te;U+=Te,Fe!==0&&H-Fe<ce.storage&&(U+=H-Fe),le.__data=new Float32Array(ce.storage/Float32Array.BYTES_PER_ELEMENT),le.__offset=U,U+=ce.storage}}}const I=U%H;return I>0&&(U+=H-I),L.__size=U,L.__cache={},this}function T(L){const O={boundary:0,storage:0};return typeof L=="number"||typeof L=="boolean"?(O.boundary=4,O.storage=4):L.isVector2?(O.boundary=8,O.storage=8):L.isVector3||L.isColor?(O.boundary=16,O.storage=12):L.isVector4?(O.boundary=16,O.storage=16):L.isMatrix3?(O.boundary=48,O.storage=48):L.isMatrix4?(O.boundary=64,O.storage=64):L.isTexture?ot("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(L)?(O.boundary=16,O.storage=L.byteLength):ot("WebGLRenderer: Unsupported uniform value type.",L),O}function D(L){const O=L.target;O.removeEventListener("dispose",D);const U=d.indexOf(O.__bindingPointIndex);d.splice(U,1),s.deleteBuffer(a[O.id]),delete a[O.id],delete c[O.id]}function z(){for(const L in a)s.deleteBuffer(a[L]);d=[],a={},c={}}return{bind:m,update:g,dispose:z}}const P4=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let El=null;function k4(){return El===null&&(El=new ao(P4,16,16,Yu,Ll),El.name="DFG_LUT",El.minFilter=mi,El.magFilter=mi,El.wrapS=Zs,El.wrapT=Zs,El.generateMipmaps=!1,El.needsUpdate=!0),El}class eP{constructor(e={}){const{canvas:t=F3(),context:i=null,depth:a=!0,stencil:c=!1,alpha:d=!1,antialias:f=!1,premultipliedAlpha:m=!0,preserveDrawingBuffer:g=!1,powerPreference:v="default",failIfMajorPerformanceCaveat:M=!1,reversedDepthBuffer:x=!1,outputBufferType:S=Ss}=e;this.isWebGLRenderer=!0;let w;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");w=i.getContextAttributes().alpha}else w=d;const k=S,C=new Set([Ix,Lx,Tv]),T=new Set([Ss,oo,Em,Cm,Px,kx]),D=new Uint32Array(4),z=new Int32Array(4),L=new J;let O=null,U=null;const H=[],I=[];let F=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=so,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const V=this;let X=!1,_=null,K=null,le=null,$=null;this._outputColorSpace=ss;let j=0,Q=0,ne=null,ce=-1,ye=null;const Te=new ni,Fe=new ni;let lt=null;const ht=new ut(0);let ct=0,Pe=t.width,Xe=t.height,He=1,pt=null,Nt=null;const nt=new ni(0,0,Pe,Xe),sn=new ni(0,0,Pe,Xe);let Dt=!1;const Be=new Wf;let xe=!1,Ue=!1;const qe=new Zt,Ze=new J,Pt=new ni,bt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let zt=!1;function Et(){return ne===null?He:1}let ee=i;function Cn(G,oe){return t.getContext(G,oe)}try{const G={alpha:!0,depth:a,stencil:c,antialias:f,premultipliedAlpha:m,preserveDrawingBuffer:g,powerPreference:v,failIfMajorPerformanceCaveat:M};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Tx}`),t.addEventListener("webglcontextlost",yn,!1),t.addEventListener("webglcontextrestored",Rn,!1),t.addEventListener("webglcontextcreationerror",Qi,!1),ee===null){const oe="webgl2";if(ee=Cn(oe,G),ee===null)throw Cn(oe)?new Error("THREE.WebGLRenderer: Error creating WebGL context with your selected attributes."):new Error("THREE.WebGLRenderer: Error creating WebGL context.")}}catch(G){throw kt("WebGLRenderer: "+G.message),G}let an,Y,B,de,me,Ce,Qe,Ke,ke,De,et,Rt,rt,st,mt,Ct,jt,ae,_e,Le,it,tt,Ne;function Mt(){an=new DF(ee),an.init(),it=new _R(ee,an),Y=new MF(ee,an,e,it),B=new b4(ee,an),Y.reversedDepthBuffer&&x&&B.buffers.depth.setReversed(!0),K=ee.createFramebuffer(),le=ee.createFramebuffer(),$=ee.createFramebuffer(),de=new NF(ee),me=new a4,Ce=new x4(ee,an,B,me,Y,it,de),Qe=new kF(V),Ke=new Fz(ee),tt=new xF(ee,Ke),ke=new LF(ee,Ke,de,tt),De=new BF(ee,ke,Ke,tt,de),ae=new zF(ee,Y,Ce),mt=new wF(me),et=new s4(V,Qe,an,Y,tt,mt),Rt=new C4(V,me),rt=new l4,st=new p4(an),jt=new bF(V,Qe,B,De,w,m),Ct=new y4(V,De,Y),Ne=new R4(ee,de,Y,B),_e=new SF(ee,an,de),Le=new IF(ee,an,de),de.programs=et.programs,V.capabilities=Y,V.extensions=an,V.properties=me,V.renderLists=rt,V.shadowMap=Ct,V.state=B,V.info=de}Mt(),k!==Ss&&(F=new FF(k,t.width,t.height,f,a,c));const gt=new T4(V,ee);this.xr=gt,this.getContext=function(){return ee},this.getContextAttributes=function(){return ee.getContextAttributes()},this.forceContextLoss=function(){const G=an.get("WEBGL_lose_context");G&&G.loseContext()},this.forceContextRestore=function(){const G=an.get("WEBGL_lose_context");G&&G.restoreContext()},this.getPixelRatio=function(){return He},this.setPixelRatio=function(G){G!==void 0&&(He=G,this.setSize(Pe,Xe,!1))},this.getSize=function(G){return G.set(Pe,Xe)},this.setSize=function(G,oe,Ae=!0){if(gt.isPresenting){ot("WebGLRenderer: Can't change size while VR device is presenting.");return}Pe=G,Xe=oe,t.width=Math.floor(G*He),t.height=Math.floor(oe*He),Ae===!0&&(t.style.width=G+"px",t.style.height=oe+"px"),F!==null&&F.setSize(t.width,t.height),this.setViewport(0,0,G,oe)},this.getDrawingBufferSize=function(G){return G.set(Pe*He,Xe*He).floor()},this.setDrawingBufferSize=function(G,oe,Ae){Pe=G,Xe=oe,He=Ae,t.width=Math.floor(G*Ae),t.height=Math.floor(oe*Ae),this.setViewport(0,0,G,oe)},this.setEffects=function(G){if(k===Ss){kt("WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(G){for(let oe=0;oe<G.length;oe++)if(G[oe].isOutputPass===!0){ot("WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}F.setEffects(G||[])},this.getCurrentViewport=function(G){return G.copy(Te)},this.getViewport=function(G){return G.copy(nt)},this.setViewport=function(G,oe,Ae,he){G.isVector4?nt.set(G.x,G.y,G.z,G.w):nt.set(G,oe,Ae,he),B.viewport(Te.copy(nt).multiplyScalar(He).round())},this.getScissor=function(G){return G.copy(sn)},this.setScissor=function(G,oe,Ae,he){G.isVector4?sn.set(G.x,G.y,G.z,G.w):sn.set(G,oe,Ae,he),B.scissor(Fe.copy(sn).multiplyScalar(He).round())},this.getScissorTest=function(){return Dt},this.setScissorTest=function(G){B.setScissorTest(Dt=G)},this.setOpaqueSort=function(G){pt=G},this.setTransparentSort=function(G){Nt=G},this.getClearColor=function(G){return G.copy(jt.getClearColor())},this.setClearColor=function(){jt.setClearColor(...arguments)},this.getClearAlpha=function(){return jt.getClearAlpha()},this.setClearAlpha=function(){jt.setClearAlpha(...arguments)},this.clear=function(G=!0,oe=!0,Ae=!0){let he=0;if(G){let ge=!1;if(ne!==null){const We=ne.texture.format;ge=C.has(We)}if(ge){const We=ne.texture.type,dt=T.has(We),at=jt.getClearColor(),St=jt.getClearAlpha(),Tt=at.r,Xt=at.g,Ot=at.b;dt?(D[0]=Tt,D[1]=Xt,D[2]=Ot,D[3]=St,ee.clearBufferuiv(ee.COLOR,0,D)):(z[0]=Tt,z[1]=Xt,z[2]=Ot,z[3]=St,ee.clearBufferiv(ee.COLOR,0,z))}else he|=ee.COLOR_BUFFER_BIT}oe&&(he|=ee.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),Ae&&(he|=ee.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),he!==0&&ee.clear(he)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(G){G.setRenderer(this),_=G},this.dispose=function(){t.removeEventListener("webglcontextlost",yn,!1),t.removeEventListener("webglcontextrestored",Rn,!1),t.removeEventListener("webglcontextcreationerror",Qi,!1),jt.dispose(),rt.dispose(),st.dispose(),me.dispose(),Qe.dispose(),De.dispose(),tt.dispose(),Ne.dispose(),et.dispose(),gt.dispose(),gt.removeEventListener("sessionstart",ka),gt.removeEventListener("sessionend",Jo),Dr.stop()};function yn(G){G.preventDefault(),gv("WebGLRenderer: Context Lost."),X=!0}function Rn(){gv("WebGLRenderer: Context Restored."),X=!1;const G=de.autoReset,oe=Ct.enabled,Ae=Ct.autoUpdate,he=Ct.needsUpdate,ge=Ct.type;Mt(),de.autoReset=G,Ct.enabled=oe,Ct.autoUpdate=Ae,Ct.needsUpdate=he,Ct.type=ge}function Qi(G){kt("WebGLRenderer: A WebGL context could not be created. Reason: ",G.statusMessage)}function Gr(G){const oe=G.target;oe.removeEventListener("dispose",Gr),Zi(oe)}function Zi(G){$s(G),me.remove(G)}function $s(G){const oe=me.get(G).programs;oe!==void 0&&(oe.forEach(function(Ae){et.releaseProgram(Ae)}),G.isShaderMaterial&&et.releaseShaderCache(G))}this.renderBufferDirect=function(G,oe,Ae,he,ge,We){oe===null&&(oe=bt);const dt=ge.isMesh&&ge.matrixWorld.determinantAffine()<0,at=zl(G,oe,Ae,he,ge);B.setMaterial(he,dt);let St=Ae.index,Tt=1;if(he.wireframe===!0){if(St=ke.getWireframeAttribute(Ae),St===void 0)return;Tt=2}const Xt=Ae.drawRange,Ot=Ae.attributes.position;let vt=Xt.start*Tt,Pn=(Xt.start+Xt.count)*Tt;We!==null&&(vt=Math.max(vt,We.start*Tt),Pn=Math.min(Pn,(We.start+We.count)*Tt)),St!==null?(vt=Math.max(vt,0),Pn=Math.min(Pn,St.count)):Ot!=null&&(vt=Math.max(vt,0),Pn=Math.min(Pn,Ot.count));const dn=Pn-vt;if(dn<0||dn===1/0)return;tt.setup(ge,he,at,Ae,St);let Ht,Tn=_e;if(St!==null&&(Ht=Ke.get(St),Tn=Le,Tn.setIndex(Ht)),ge.isMesh)he.wireframe===!0?(B.setLineWidth(he.wireframeLinewidth*Et()),Tn.setMode(ee.LINES)):Tn.setMode(ee.TRIANGLES);else if(ge.isLine){let Qn=he.linewidth;Qn===void 0&&(Qn=1),B.setLineWidth(Qn*Et()),ge.isLineSegments?Tn.setMode(ee.LINES):ge.isLineLoop?Tn.setMode(ee.LINE_LOOP):Tn.setMode(ee.LINE_STRIP)}else ge.isPoints?Tn.setMode(ee.POINTS):ge.isSprite&&Tn.setMode(ee.TRIANGLES);if(ge.isBatchedMesh)if(an.get("WEBGL_multi_draw"))Tn.renderMultiDraw(ge._multiDrawStarts,ge._multiDrawCounts,ge._multiDrawCount);else{const Qn=ge._multiDrawStarts,je=ge._multiDrawCounts,Li=ge._multiDrawCount,Kt=St?Ke.get(St).bytesPerElement:1,Hi=me.get(he).currentProgram.getUniforms();for(let Ii=0;Ii<Li;Ii++)Hi.setValue(ee,"_gl_DrawID",Ii),Tn.render(Qn[Ii]/Kt,je[Ii])}else if(ge.isInstancedMesh)Tn.renderInstances(vt,dn,ge.count);else if(Ae.isInstancedBufferGeometry){const Qn=Ae._maxInstanceCount!==void 0?Ae._maxInstanceCount:1/0,je=Math.min(Ae.instanceCount,Qn);Tn.renderInstances(vt,dn,je)}else Tn.render(vt,dn)};function Rs(G,oe,Ae){G.transparent===!0&&G.side===Cl&&G.forceSinglePass===!1?(G.side=Ts,G.needsUpdate=!0,ks(G,oe,Ae),G.side=kc,G.needsUpdate=!0,ks(G,oe,Ae),G.side=Cl):ks(G,oe,Ae)}this.compile=function(G,oe,Ae=null){Ae===null&&(Ae=G),U=st.get(Ae),U.init(oe),I.push(U),Ae.traverseVisible(function(ge){ge.isLight&&ge.layers.test(oe.layers)&&(U.pushLight(ge),ge.castShadow&&U.pushShadow(ge))}),G!==Ae&&G.traverseVisible(function(ge){ge.isLight&&ge.layers.test(oe.layers)&&(U.pushLight(ge),ge.castShadow&&U.pushShadow(ge))}),U.setupLights();const he=new Set;return G.traverse(function(ge){if(!(ge.isMesh||ge.isPoints||ge.isLine||ge.isSprite))return;const We=ge.material;if(We)if(Array.isArray(We))for(let dt=0;dt<We.length;dt++){const at=We[dt];Rs(at,Ae,ge),he.add(at)}else Rs(We,Ae,ge),he.add(We)}),U=I.pop(),he},this.compileAsync=function(G,oe,Ae=null){const he=this.compile(G,oe,Ae);return new Promise(ge=>{function We(){if(he.forEach(function(dt){me.get(dt).currentProgram.isReady()&&he.delete(dt)}),he.size===0){ge(G);return}setTimeout(We,10)}an.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Ps=null;function Yo(G){Ps&&Ps(G)}function ka(){Dr.stop()}function Jo(){Dr.start()}const Dr=new qR;Dr.setAnimationLoop(Yo),typeof self<"u"&&Dr.setContext(self),this.setAnimationLoop=function(G){Ps=G,gt.setAnimationLoop(G),G===null?Dr.stop():Dr.start()},gt.addEventListener("sessionstart",ka),gt.addEventListener("sessionend",Jo),this.render=function(G,oe){if(oe!==void 0&&oe.isCamera!==!0){kt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(X===!0)return;_!==null&&_.renderStart(G,oe);const Ae=gt.enabled===!0&>.isPresenting===!0,he=F!==null&&(ne===null||Ae)&&F.begin(V,ne);if(G.matrixWorldAutoUpdate===!0&&G.updateMatrixWorld(),oe.parent===null&&oe.matrixWorldAutoUpdate===!0&&oe.updateMatrixWorld(),gt.enabled===!0&>.isPresenting===!0&&(F===null||F.isCompositing()===!1)&&(gt.cameraAutoUpdate===!0&>.updateCamera(oe),oe=gt.getCamera()),G.isScene===!0&&G.onBeforeRender(V,G,oe,ne),U=st.get(G,I.length),U.init(oe),U.state.textureUnits=Ce.getTextureUnits(),I.push(U),qe.multiplyMatrices(oe.projectionMatrix,oe.matrixWorldInverse),Be.setFromProjectionMatrix(qe,Ea,oe.reversedDepth),Ue=this.localClippingEnabled,xe=mt.init(this.clippingPlanes,Ue),O=rt.get(G,H.length),O.init(),H.push(O),gt.enabled===!0&>.isPresenting===!0){const dt=V.xr.getDepthSensingMesh();dt!==null&&lr(dt,oe,-1/0,V.sortObjects)}lr(G,oe,0,V.sortObjects),O.finish(),V.sortObjects===!0&&O.sort(pt,Nt,oe.reversedDepth),zt=gt.enabled===!1||gt.isPresenting===!1||gt.hasDepthSensing()===!1,zt&&jt.addToRenderList(O,G),this.info.render.frame++,this.info.autoReset===!0&&this.info.reset(),xe===!0&&mt.beginShadows();const ge=U.state.shadowsArray;if(Ct.render(ge,G,oe),xe===!0&&mt.endShadows(),(he&&F.hasRenderPass())===!1){const dt=O.opaque,at=O.transmissive;if(U.setupLights(),oe.isArrayCamera){const St=oe.cameras;if(at.length>0)for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt];Qo(dt,at,G,Ot)}zt&&jt.render(G);for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt];ls(O,G,Ot,Ot.viewport)}}else at.length>0&&Qo(dt,at,G,oe),zt&&jt.render(G),ls(O,G,oe)}ne!==null&&Q===0&&(Ce.updateMultisampleRenderTarget(ne),Ce.updateRenderTargetMipmap(ne)),he&&F.end(V),G.isScene===!0&&G.onAfterRender(V,G,oe),tt.resetDefaultState(),ce=-1,ye=null,I.pop(),I.length>0?(U=I[I.length-1],Ce.setTextureUnits(U.state.textureUnits),xe===!0&&mt.setGlobalState(V.clippingPlanes,U.state.camera)):U=null,H.pop(),H.length>0?O=H[H.length-1]:O=null,_!==null&&_.renderEnd()};function lr(G,oe,Ae,he){if(G.visible===!1)return;if(G.layers.test(oe.layers)){if(G.isGroup)Ae=G.renderOrder;else if(G.isLOD)G.autoUpdate===!0&&G.update(oe);else if(G.isLightProbeGrid)U.pushLightProbeGrid(G);else if(G.isLight)U.pushLight(G),G.castShadow&&U.pushShadow(G);else if(G.isSprite){if(!G.frustumCulled||Be.intersectsSprite(G)){he&&Pt.setFromMatrixPosition(G.matrixWorld).applyMatrix4(qe);const dt=De.update(G),at=G.material;at.visible&&O.push(G,dt,at,Ae,Pt.z,null)}}else if((G.isMesh||G.isLine||G.isPoints)&&(!G.frustumCulled||Be.intersectsObject(G))){const dt=De.update(G),at=G.material;if(he&&(G.boundingSphere!==void 0?(G.boundingSphere===null&&G.computeBoundingSphere(),Pt.copy(G.boundingSphere.center)):(dt.boundingSphere===null&&dt.computeBoundingSphere(),Pt.copy(dt.boundingSphere.center)),Pt.applyMatrix4(G.matrixWorld).applyMatrix4(qe)),Array.isArray(at)){const St=dt.groups;for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt],vt=at[Ot.materialIndex];vt&&vt.visible&&O.push(G,dt,vt,Ae,Pt.z,Ot)}}else at.visible&&O.push(G,dt,at,Ae,Pt.z,null)}}const We=G.children;for(let dt=0,at=We.length;dt<at;dt++)lr(We[dt],oe,Ae,he)}function ls(G,oe,Ae,he){const{opaque:ge,transmissive:We,transparent:dt}=G;U.setupLightsView(Ae),xe===!0&&mt.setGlobalState(V.clippingPlanes,Ae),he&&B.viewport(Te.copy(he)),ge.length>0&&Zo(ge,oe,Ae),We.length>0&&Zo(We,oe,Ae),dt.length>0&&Zo(dt,oe,Ae),B.buffers.depth.setTest(!0),B.buffers.depth.setMask(!0),B.buffers.color.setMask(!0),B.setPolygonOffset(!1)}function Qo(G,oe,Ae,he){if((Ae.isScene===!0?Ae.overrideMaterial:null)!==null)return;if(U.state.transmissionRenderTarget[he.id]===void 0){const vt=an.has("EXT_color_buffer_half_float")||an.has("EXT_color_buffer_float");U.state.transmissionRenderTarget[he.id]=new Ra(1,1,{generateMipmaps:!0,type:vt?Ll:Ss,minFilter:Rl,samples:Math.max(4,Y.samples),stencilBuffer:c,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:wn.workingColorSpace})}const We=U.state.transmissionRenderTarget[he.id],dt=he.viewport||Te;We.setSize(dt.z*V.transmissionResolutionScale,dt.w*V.transmissionResolutionScale);const at=V.getRenderTarget(),St=V.getActiveCubeFace(),Tt=V.getActiveMipmapLevel();V.setRenderTarget(We),V.getClearColor(ht),ct=V.getClearAlpha(),ct<1&&V.setClearColor(16777215,.5),V.clear(),zt&&jt.render(Ae);const Xt=V.toneMapping;V.toneMapping=so;const Ot=he.viewport;if(he.viewport!==void 0&&(he.viewport=void 0),U.setupLightsView(he),xe===!0&&mt.setGlobalState(V.clippingPlanes,he),Zo(G,Ae,he),Ce.updateMultisampleRenderTarget(We),Ce.updateRenderTargetMipmap(We),an.has("WEBGL_multisampled_render_to_texture")===!1){let vt=!1;for(let Pn=0,dn=oe.length;Pn<dn;Pn++){const Ht=oe[Pn],{object:Tn,geometry:Qn,material:je,group:Li}=Ht;if(je.side===Cl&&Tn.layers.test(he.layers)){const Kt=je.side;je.side=Ts,je.needsUpdate=!0,fo(Tn,Ae,he,Qn,je,Li),je.side=Kt,je.needsUpdate=!0,vt=!0}}vt===!0&&(Ce.updateMultisampleRenderTarget(We),Ce.updateRenderTargetMipmap(We))}V.setRenderTarget(at,St,Tt),V.setClearColor(ht,ct),Ot!==void 0&&(he.viewport=Ot),V.toneMapping=Xt}function Zo(G,oe,Ae){const he=oe.isScene===!0?oe.overrideMaterial:null;for(let ge=0,We=G.length;ge<We;ge++){const dt=G[ge],{object:at,geometry:St,group:Tt}=dt;let Xt=dt.material;Xt.allowOverride===!0&&he!==null&&(Xt=he),at.layers.test(Ae.layers)&&fo(at,oe,Ae,St,Xt,Tt)}}function fo(G,oe,Ae,he,ge,We){G.onBeforeRender(V,oe,Ae,he,ge,We),G.modelViewMatrix.multiplyMatrices(Ae.matrixWorldInverse,G.matrixWorld),G.normalMatrix.getNormalMatrix(G.modelViewMatrix),ge.onBeforeRender(V,oe,Ae,he,G,We),ge.transparent===!0&&ge.side===Cl&&ge.forceSinglePass===!1?(ge.side=Ts,ge.needsUpdate=!0,V.renderBufferDirect(Ae,oe,he,ge,G,We),ge.side=kc,ge.needsUpdate=!0,V.renderBufferDirect(Ae,oe,he,ge,G,We),ge.side=Cl):V.renderBufferDirect(Ae,oe,he,ge,G,We),G.onAfterRender(V,oe,Ae,he,ge,We)}function ks(G,oe,Ae){oe.isScene!==!0&&(oe=bt);const he=me.get(G),ge=U.state.lights,We=U.state.shadowsArray,dt=ge.state.version,at=et.getParameters(G,ge.state,We,oe,Ae,U.state.lightProbeGridArray),St=et.getProgramCacheKey(at);let Tt=he.programs;he.environment=G.isMeshStandardMaterial||G.isMeshLambertMaterial||G.isMeshPhongMaterial?oe.environment:null,he.fog=oe.fog;const Xt=G.isMeshStandardMaterial||G.isMeshLambertMaterial&&!G.envMap||G.isMeshPhongMaterial&&!G.envMap;he.envMap=Qe.get(G.envMap||he.environment,Xt),he.envMapRotation=he.environment!==null&&G.envMap===null?oe.environmentRotation:G.envMapRotation,Tt===void 0&&(G.addEventListener("dispose",Gr),Tt=new Map,he.programs=Tt);let Ot=Tt.get(St);if(Ot!==void 0){if(he.currentProgram===Ot&&he.lightsStateVersion===dt)return ed(G,at),Ot}else at.uniforms=et.getUniforms(G),_!==null&&G.isNodeMaterial&&_.build(G,Ae,at),G.onBeforeCompile(at,V),Ot=et.acquireProgram(at,St),Tt.set(St,Ot),he.uniforms=at.uniforms;const vt=he.uniforms;return(!G.isShaderMaterial&&!G.isRawShaderMaterial||G.clipping===!0)&&(vt.clippingPlanes=mt.uniform),ed(G,at),he.needsLights=ta(G),he.lightsStateVersion=dt,he.needsLights&&(vt.ambientLightColor.value=ge.state.ambient,vt.lightProbe.value=ge.state.probe,vt.directionalLights.value=ge.state.directional,vt.directionalLightShadows.value=ge.state.directionalShadow,vt.spotLights.value=ge.state.spot,vt.spotLightShadows.value=ge.state.spotShadow,vt.rectAreaLights.value=ge.state.rectArea,vt.ltc_1.value=ge.state.rectAreaLTC1,vt.ltc_2.value=ge.state.rectAreaLTC2,vt.pointLights.value=ge.state.point,vt.pointLightShadows.value=ge.state.pointShadow,vt.hemisphereLights.value=ge.state.hemi,vt.directionalShadowMatrix.value=ge.state.directionalShadowMatrix,vt.spotLightMatrix.value=ge.state.spotLightMatrix,vt.spotLightMap.value=ge.state.spotLightMap,vt.pointShadowMatrix.value=ge.state.pointShadowMatrix),he.lightProbeGrid=U.state.lightProbeGridArray.length>0,he.currentProgram=Ot,he.uniformsList=null,Ot}function zc(G){if(G.uniformsList===null){const oe=G.currentProgram.getUniforms();G.uniformsList=wb.seqWithValue(oe.seq,G.uniforms)}return G.uniformsList}function ed(G,oe){const Ae=me.get(G);Ae.outputColorSpace=oe.outputColorSpace,Ae.batching=oe.batching,Ae.batchingColor=oe.batchingColor,Ae.instancing=oe.instancing,Ae.instancingColor=oe.instancingColor,Ae.instancingMorph=oe.instancingMorph,Ae.skinning=oe.skinning,Ae.morphTargets=oe.morphTargets,Ae.morphNormals=oe.morphNormals,Ae.morphColors=oe.morphColors,Ae.morphTargetsCount=oe.morphTargetsCount,Ae.numClippingPlanes=oe.numClippingPlanes,Ae.numIntersection=oe.numClipIntersection,Ae.vertexAlphas=oe.vertexAlphas,Ae.vertexTangents=oe.vertexTangents,Ae.toneMapping=oe.toneMapping}function xt(G,oe){if(G.length===0)return null;if(G.length===1)return G[0].texture!==null?G[0]:null;L.setFromMatrixPosition(oe.matrixWorld);for(let Ae=0,he=G.length;Ae<he;Ae++){const ge=G[Ae];if(ge.texture!==null&&ge.boundingBox.containsPoint(L))return ge}return null}function zl(G,oe,Ae,he,ge){oe.isScene!==!0&&(oe=bt),Ce.resetTextureUnits();const We=oe.fog,dt=he.isMeshStandardMaterial||he.isMeshLambertMaterial||he.isMeshPhongMaterial?oe.environment:null,at=ne===null?V.outputColorSpace:ne.isXRRenderTarget===!0?ne.texture.colorSpace:wn.workingColorSpace,St=he.isMeshStandardMaterial||he.isMeshLambertMaterial&&!he.envMap||he.isMeshPhongMaterial&&!he.envMap,Tt=Qe.get(he.envMap||dt,St),Xt=he.vertexColors===!0&&!!Ae.attributes.color&&Ae.attributes.color.itemSize===4,Ot=!!Ae.attributes.tangent&&(!!he.normalMap||he.anisotropy>0),vt=!!Ae.morphAttributes.position,Pn=!!Ae.morphAttributes.normal,dn=!!Ae.morphAttributes.color;let Ht=so;he.toneMapped&&(ne===null||ne.isXRRenderTarget===!0)&&(Ht=V.toneMapping);const Tn=Ae.morphAttributes.position||Ae.morphAttributes.normal||Ae.morphAttributes.color,Qn=Tn!==void 0?Tn.length:0,je=me.get(he),Li=U.state.lights;if(xe===!0&&(Ue===!0||G!==ye)){const Dn=G===ye&&he.id===ce;mt.setState(he,G,Dn)}let Kt=!1;he.version===je.__version?(je.needsLights&&je.lightsStateVersion!==Li.state.version||je.outputColorSpace!==at||ge.isBatchedMesh&&je.batching===!1||!ge.isBatchedMesh&&je.batching===!0||ge.isBatchedMesh&&je.batchingColor===!0&&ge.colorTexture===null||ge.isBatchedMesh&&je.batchingColor===!1&&ge.colorTexture!==null||ge.isInstancedMesh&&je.instancing===!1||!ge.isInstancedMesh&&je.instancing===!0||ge.isSkinnedMesh&&je.skinning===!1||!ge.isSkinnedMesh&&je.skinning===!0||ge.isInstancedMesh&&je.instancingColor===!0&&ge.instanceColor===null||ge.isInstancedMesh&&je.instancingColor===!1&&ge.instanceColor!==null||ge.isInstancedMesh&&je.instancingMorph===!0&&ge.morphTexture===null||ge.isInstancedMesh&&je.instancingMorph===!1&&ge.morphTexture!==null||je.envMap!==Tt||he.fog===!0&&je.fog!==We||je.numClippingPlanes!==void 0&&(je.numClippingPlanes!==mt.numPlanes||je.numIntersection!==mt.numIntersection)||je.vertexAlphas!==Xt||je.vertexTangents!==Ot||je.morphTargets!==vt||je.morphNormals!==Pn||je.morphColors!==dn||je.toneMapping!==Ht||je.morphTargetsCount!==Qn||!!je.lightProbeGrid!=U.state.lightProbeGridArray.length>0)&&(Kt=!0):(Kt=!0,je.__version=he.version);let Hi=je.currentProgram;Kt===!0&&(Hi=ks(he,oe,ge),_&&he.isNodeMaterial&&_.onUpdateProgram(he,Hi,je));let Ii=!1,yr=!1,Ki=!1;const Gn=Hi.getUniforms(),zn=je.uniforms;if(B.useProgram(Hi.program)&&(Ii=!0,yr=!0,Ki=!0),he.id!==ce&&(ce=he.id,yr=!0),je.needsLights){const Dn=xt(U.state.lightProbeGridArray,ge);je.lightProbeGrid!==Dn&&(je.lightProbeGrid=Dn,yr=!0)}if(Ii||ye!==G){B.buffers.depth.getReversed()&&G.reversedDepth!==!0&&(G._reversedDepth=!0,G.updateProjectionMatrix()),Gn.setValue(ee,"projectionMatrix",G.projectionMatrix),Gn.setValue(ee,"viewMatrix",G.matrixWorldInverse);const jr=Gn.map.cameraPosition;jr!==void 0&&jr.setValue(ee,Ze.setFromMatrixPosition(G.matrixWorld)),Y.logarithmicDepthBuffer&&Gn.setValue(ee,"logDepthBufFC",2/(Math.log(G.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&Gn.setValue(ee,"isOrthographic",G.isOrthographicCamera===!0),ye!==G&&(ye=G,yr=!0,Ki=!0)}if(je.needsLights&&(Li.state.directionalShadowMap.length>0&&Gn.setValue(ee,"directionalShadowMap",Li.state.directionalShadowMap,Ce),Li.state.spotShadowMap.length>0&&Gn.setValue(ee,"spotShadowMap",Li.state.spotShadowMap,Ce),Li.state.pointShadowMap.length>0&&Gn.setValue(ee,"pointShadowMap",Li.state.pointShadowMap,Ce)),ge.isSkinnedMesh){Gn.setOptional(ee,ge,"bindMatrix"),Gn.setOptional(ee,ge,"bindMatrixInverse");const Dn=ge.skeleton;Dn&&(Dn.boneTexture===null&&Dn.computeBoneTexture(),Gn.setValue(ee,"boneTexture",Dn.boneTexture,Ce))}ge.isBatchedMesh&&(Gn.setOptional(ee,ge,"batchingTexture"),Gn.setValue(ee,"batchingTexture",ge._matricesTexture,Ce),Gn.setOptional(ee,ge,"batchingIdTexture"),Gn.setValue(ee,"batchingIdTexture",ge._indirectTexture,Ce),Gn.setOptional(ee,ge,"batchingColorTexture"),ge._colorsTexture!==null&&Gn.setValue(ee,"batchingColorTexture",ge._colorsTexture,Ce));const Wr=Ae.morphAttributes;if((Wr.position!==void 0||Wr.normal!==void 0||Wr.color!==void 0)&&ae.update(ge,Ae,Hi),(yr||je.receiveShadow!==ge.receiveShadow)&&(je.receiveShadow=ge.receiveShadow,Gn.setValue(ee,"receiveShadow",ge.receiveShadow)),(he.isMeshStandardMaterial||he.isMeshLambertMaterial||he.isMeshPhongMaterial)&&he.envMap===null&&oe.environment!==null&&(zn.envMapIntensity.value=oe.environmentIntensity),zn.dfgLUT!==void 0&&(zn.dfgLUT.value=k4()),yr){if(Gn.setValue(ee,"toneMappingExposure",V.toneMappingExposure),je.needsLights&&ea(zn,Ki),We&&he.fog===!0&&Rt.refreshFogUniforms(zn,We),Rt.refreshMaterialUniforms(zn,he,He,Xe,U.state.transmissionRenderTarget[G.id]),je.needsLights&&je.lightProbeGrid){const Dn=je.lightProbeGrid;zn.probesSH.value=Dn.texture,zn.probesMin.value.copy(Dn.boundingBox.min),zn.probesMax.value.copy(Dn.boundingBox.max),zn.probesResolution.value.copy(Dn.resolution)}wb.upload(ee,zc(je),zn,Ce)}if(he.isShaderMaterial&&he.uniformsNeedUpdate===!0&&(wb.upload(ee,zc(je),zn,Ce),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&Gn.setValue(ee,"center",ge.center),Gn.setValue(ee,"modelViewMatrix",ge.modelViewMatrix),Gn.setValue(ee,"normalMatrix",ge.normalMatrix),Gn.setValue(ee,"modelMatrix",ge.matrixWorld),he.uniformsGroups!==void 0){const Dn=he.uniformsGroups;for(let jr=0,gi=Dn.length;jr<gi;jr++){const cr=Dn[jr];Ne.update(cr,Hi),Ne.bind(cr,Hi)}}return Hi}function ea(G,oe){G.ambientLightColor.needsUpdate=oe,G.lightProbe.needsUpdate=oe,G.directionalLights.needsUpdate=oe,G.directionalLightShadows.needsUpdate=oe,G.pointLights.needsUpdate=oe,G.pointLightShadows.needsUpdate=oe,G.spotLights.needsUpdate=oe,G.spotLightShadows.needsUpdate=oe,G.rectAreaLights.needsUpdate=oe,G.hemisphereLights.needsUpdate=oe}function ta(G){return G.isMeshLambertMaterial||G.isMeshToonMaterial||G.isMeshPhongMaterial||G.isMeshStandardMaterial||G.isShadowMaterial||G.isShaderMaterial&&G.lights===!0}this.getActiveCubeFace=function(){return j},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return ne},this.setRenderTargetTextures=function(G,oe,Ae){const he=me.get(G);he.__autoAllocateDepthBuffer=G.resolveDepthBuffer===!1,he.__autoAllocateDepthBuffer===!1&&(he.__useRenderToTexture=!1),me.get(G.texture).__webglTexture=oe,me.get(G.depthTexture).__webglTexture=he.__autoAllocateDepthBuffer?void 0:Ae,he.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(G,oe){const Ae=me.get(G);Ae.__webglFramebuffer=oe,Ae.__useDefaultFramebuffer=oe===void 0},this.setRenderTarget=function(G,oe=0,Ae=0){ne=G,j=oe,Q=Ae;let he=null,ge=!1,We=!1;if(G){const at=me.get(G);if(at.__useDefaultFramebuffer!==void 0){B.bindFramebuffer(ee.FRAMEBUFFER,at.__webglFramebuffer),Te.copy(G.viewport),Fe.copy(G.scissor),lt=G.scissorTest,B.viewport(Te),B.scissor(Fe),B.setScissorTest(lt),ce=-1;return}else if(at.__webglFramebuffer===void 0)Ce.setupRenderTarget(G);else if(at.__hasExternalTextures)Ce.rebindTextures(G,me.get(G.texture).__webglTexture,me.get(G.depthTexture).__webglTexture);else if(G.depthBuffer){const Xt=G.depthTexture;if(at.__boundDepthTexture!==Xt){if(Xt!==null&&me.has(Xt)&&(G.width!==Xt.image.width||G.height!==Xt.image.height))throw new Error("THREE.WebGLRenderer: Attached DepthTexture is initialized to the incorrect size.");Ce.setupDepthRenderbuffer(G)}}const St=G.texture;(St.isData3DTexture||St.isDataArrayTexture||St.isCompressedArrayTexture)&&(We=!0);const Tt=me.get(G).__webglFramebuffer;G.isWebGLCubeRenderTarget?(Array.isArray(Tt[oe])?he=Tt[oe][Ae]:he=Tt[oe],ge=!0):G.samples>0&&Ce.useMultisampledRTT(G)===!1?he=me.get(G).__webglMultisampledFramebuffer:Array.isArray(Tt)?he=Tt[Ae]:he=Tt,Te.copy(G.viewport),Fe.copy(G.scissor),lt=G.scissorTest}else Te.copy(nt).multiplyScalar(He).floor(),Fe.copy(sn).multiplyScalar(He).floor(),lt=Dt;if(Ae!==0&&(he=K),B.bindFramebuffer(ee.FRAMEBUFFER,he)&&B.drawBuffers(G,he),B.viewport(Te),B.scissor(Fe),B.setScissorTest(lt),ge){const at=me.get(G.texture);ee.framebufferTexture2D(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_CUBE_MAP_POSITIVE_X+oe,at.__webglTexture,Ae)}else if(We){const at=oe;for(let St=0;St<G.textures.length;St++){const Tt=me.get(G.textures[St]);ee.framebufferTextureLayer(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0+St,Tt.__webglTexture,Ae,at)}}else if(G!==null&&Ae!==0){const at=me.get(G.texture);ee.framebufferTexture2D(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,at.__webglTexture,Ae)}ce=-1},this.readRenderTargetPixels=function(G,oe,Ae,he,ge,We,dt,at=0){if(!(G&&G.isWebGLRenderTarget)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=me.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&dt!==void 0&&(St=St[dt]),St){B.bindFramebuffer(ee.FRAMEBUFFER,St);try{const Tt=G.textures[at],Xt=Tt.format,Ot=Tt.type;if(G.textures.length>1&&ee.readBuffer(ee.COLOR_ATTACHMENT0+at),!Y.textureFormatReadable(Xt)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Y.textureTypeReadable(Ot)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}oe>=0&&oe<=G.width-he&&Ae>=0&&Ae<=G.height-ge&&ee.readPixels(oe,Ae,he,ge,it.convert(Xt),it.convert(Ot),We)}finally{const Tt=ne!==null?me.get(ne).__webglFramebuffer:null;B.bindFramebuffer(ee.FRAMEBUFFER,Tt)}}},this.readRenderTargetPixelsAsync=async function(G,oe,Ae,he,ge,We,dt,at=0){if(!(G&&G.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let St=me.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&dt!==void 0&&(St=St[dt]),St)if(oe>=0&&oe<=G.width-he&&Ae>=0&&Ae<=G.height-ge){B.bindFramebuffer(ee.FRAMEBUFFER,St);const Tt=G.textures[at],Xt=Tt.format,Ot=Tt.type;if(G.textures.length>1&&ee.readBuffer(ee.COLOR_ATTACHMENT0+at),!Y.textureFormatReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Y.textureTypeReadable(Ot))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const vt=ee.createBuffer();ee.bindBuffer(ee.PIXEL_PACK_BUFFER,vt),ee.bufferData(ee.PIXEL_PACK_BUFFER,We.byteLength,ee.STREAM_READ),ee.readPixels(oe,Ae,he,ge,it.convert(Xt),it.convert(Ot),0);const Pn=ne!==null?me.get(ne).__webglFramebuffer:null;B.bindFramebuffer(ee.FRAMEBUFFER,Pn);const dn=ee.fenceSync(ee.SYNC_GPU_COMMANDS_COMPLETE,0);return ee.flush(),await FL(ee,dn,4),ee.bindBuffer(ee.PIXEL_PACK_BUFFER,vt),ee.getBufferSubData(ee.PIXEL_PACK_BUFFER,0,We),ee.deleteBuffer(vt),ee.deleteSync(dn),We}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(G,oe=null,Ae=0){const he=Math.pow(2,-Ae),ge=Math.floor(G.image.width*he),We=Math.floor(G.image.height*he),dt=oe!==null?oe.x:0,at=oe!==null?oe.y:0;Ce.setTexture2D(G,0),ee.copyTexSubImage2D(ee.TEXTURE_2D,Ae,0,0,dt,at,ge,We),B.unbindTexture()},this.copyTextureToTexture=function(G,oe,Ae=null,he=null,ge=0,We=0){let dt,at,St,Tt,Xt,Ot,vt,Pn,dn;const Ht=G.isCompressedTexture?G.mipmaps[We]:G.image;if(Ae!==null)dt=Ae.max.x-Ae.min.x,at=Ae.max.y-Ae.min.y,St=Ae.isBox3?Ae.max.z-Ae.min.z:1,Tt=Ae.min.x,Xt=Ae.min.y,Ot=Ae.isBox3?Ae.min.z:0;else{const zn=Math.pow(2,-ge);dt=Math.floor(Ht.width*zn),at=Math.floor(Ht.height*zn),G.isDataArrayTexture?St=Ht.depth:G.isData3DTexture?St=Math.floor(Ht.depth*zn):St=1,Tt=0,Xt=0,Ot=0}he!==null?(vt=he.x,Pn=he.y,dn=he.z):(vt=0,Pn=0,dn=0);const Tn=it.convert(oe.format),Qn=it.convert(oe.type);let je;oe.isData3DTexture?(Ce.setTexture3D(oe,0),je=ee.TEXTURE_3D):oe.isDataArrayTexture||oe.isCompressedArrayTexture?(Ce.setTexture2DArray(oe,0),je=ee.TEXTURE_2D_ARRAY):(Ce.setTexture2D(oe,0),je=ee.TEXTURE_2D),B.activeTexture(ee.TEXTURE0),B.pixelStorei(ee.UNPACK_FLIP_Y_WEBGL,oe.flipY),B.pixelStorei(ee.UNPACK_PREMULTIPLY_ALPHA_WEBGL,oe.premultiplyAlpha),B.pixelStorei(ee.UNPACK_ALIGNMENT,oe.unpackAlignment);const Li=B.getParameter(ee.UNPACK_ROW_LENGTH),Kt=B.getParameter(ee.UNPACK_IMAGE_HEIGHT),Hi=B.getParameter(ee.UNPACK_SKIP_PIXELS),Ii=B.getParameter(ee.UNPACK_SKIP_ROWS),yr=B.getParameter(ee.UNPACK_SKIP_IMAGES);B.pixelStorei(ee.UNPACK_ROW_LENGTH,Ht.width),B.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,Ht.height),B.pixelStorei(ee.UNPACK_SKIP_PIXELS,Tt),B.pixelStorei(ee.UNPACK_SKIP_ROWS,Xt),B.pixelStorei(ee.UNPACK_SKIP_IMAGES,Ot);const Ki=G.isDataArrayTexture||G.isData3DTexture,Gn=oe.isDataArrayTexture||oe.isData3DTexture;if(G.isDepthTexture){const zn=me.get(G),Wr=me.get(oe),Dn=me.get(zn.__renderTarget),jr=me.get(Wr.__renderTarget);B.bindFramebuffer(ee.READ_FRAMEBUFFER,Dn.__webglFramebuffer),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,jr.__webglFramebuffer);for(let gi=0;gi<St;gi++)Ki&&(ee.framebufferTextureLayer(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,me.get(G).__webglTexture,ge,Ot+gi),ee.framebufferTextureLayer(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,me.get(oe).__webglTexture,We,dn+gi)),ee.blitFramebuffer(Tt,Xt,dt,at,vt,Pn,dt,at,ee.DEPTH_BUFFER_BIT,ee.NEAREST);B.bindFramebuffer(ee.READ_FRAMEBUFFER,null),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,null)}else if(ge!==0||G.isRenderTargetTexture||me.has(G)){const zn=me.get(G),Wr=me.get(oe);B.bindFramebuffer(ee.READ_FRAMEBUFFER,le),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,$);for(let Dn=0;Dn<St;Dn++)Ki?ee.framebufferTextureLayer(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,zn.__webglTexture,ge,Ot+Dn):ee.framebufferTexture2D(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,zn.__webglTexture,ge),Gn?ee.framebufferTextureLayer(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,Wr.__webglTexture,We,dn+Dn):ee.framebufferTexture2D(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,Wr.__webglTexture,We),ge!==0?ee.blitFramebuffer(Tt,Xt,dt,at,vt,Pn,dt,at,ee.COLOR_BUFFER_BIT,ee.NEAREST):Gn?ee.copyTexSubImage3D(je,We,vt,Pn,dn+Dn,Tt,Xt,dt,at):ee.copyTexSubImage2D(je,We,vt,Pn,Tt,Xt,dt,at);B.bindFramebuffer(ee.READ_FRAMEBUFFER,null),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,null)}else Gn?G.isDataTexture||G.isData3DTexture?ee.texSubImage3D(je,We,vt,Pn,dn,dt,at,St,Tn,Qn,Ht.data):oe.isCompressedArrayTexture?ee.compressedTexSubImage3D(je,We,vt,Pn,dn,dt,at,St,Tn,Ht.data):ee.texSubImage3D(je,We,vt,Pn,dn,dt,at,St,Tn,Qn,Ht):G.isDataTexture?ee.texSubImage2D(ee.TEXTURE_2D,We,vt,Pn,dt,at,Tn,Qn,Ht.data):G.isCompressedTexture?ee.compressedTexSubImage2D(ee.TEXTURE_2D,We,vt,Pn,Ht.width,Ht.height,Tn,Ht.data):ee.texSubImage2D(ee.TEXTURE_2D,We,vt,Pn,dt,at,Tn,Qn,Ht);B.pixelStorei(ee.UNPACK_ROW_LENGTH,Li),B.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,Kt),B.pixelStorei(ee.UNPACK_SKIP_PIXELS,Hi),B.pixelStorei(ee.UNPACK_SKIP_ROWS,Ii),B.pixelStorei(ee.UNPACK_SKIP_IMAGES,yr),We===0&&oe.generateMipmaps&&ee.generateMipmap(je),B.unbindTexture()},this.initRenderTarget=function(G){me.get(G).__webglFramebuffer===void 0&&Ce.setupRenderTarget(G)},this.initTexture=function(G){G.isCubeTexture?Ce.setTextureCube(G,0):G.isData3DTexture?Ce.setTexture3D(G,0):G.isDataArrayTexture||G.isCompressedArrayTexture?Ce.setTexture2DArray(G,0):Ce.setTexture2D(G,0),B.unbindTexture()},this.resetState=function(){j=0,Q=0,ne=null,B.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ea}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=wn._getDrawingBufferColorSpace(e),t.unpackColorSpace=wn._getUnpackColorSpace()}}const D4=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:Ex,AddEquation:Vu,AddOperation:w3,AdditiveAnimationBlendMode:y1,AdditiveBlending:kw,AgXToneMapping:u1,AlphaFormat:A1,AlwaysCompare:B3,AlwaysDepth:Db,AlwaysStencilFunc:zw,AmbientLight:DR,AnimationAction:HR,AnimationClip:xv,AnimationLoader:DN,AnimationMixer:az,AnimationObjectGroup:rz,AnimationUtils:CN,ArcCurve:$3,ArrayCamera:UR,ArrowHelper:Pz,AttachedBindMode:Iw,Audio:OR,AudioAnalyser:JN,AudioContext:X1,AudioListener:XN,AudioLoader:HN,AxesHelper:kz,BackSide:Ts,BasicDepthPacking:P3,BasicShadowMap:r3,BatchedMesh:Y3,BezierInterpolant:MR,Bone:E1,BooleanKeyframeTrack:Jf,Box2:jR,Box3:os,Box3Helper:Cz,BoxGeometry:Yf,BoxHelper:Ez,BufferAttribute:si,BufferGeometry:rn,BufferGeometryLoader:zR,ByteType:h1,Cache:Pl,Camera:aS,CameraHelper:Tz,CanvasTexture:qI,CapsuleGeometry:Xx,CatmullRomCurve3:eR,CineonToneMapping:l1,CircleGeometry:qx,ClampToEdgeWrapping:Zs,Clock:WR,Color:ut,ColorKeyframeTrack:V1,ColorManagement:wn,Compatibility:IL,CompressedArrayTexture:jI,CompressedCubeTexture:XI,CompressedTexture:jx,CompressedTextureLoader:LN,ConeGeometry:Rv,ConstantAlphaFactor:x3,ConstantColorFactor:y3,Controls:Lz,CubeCamera:BR,CubeDepthTexture:K3,CubeReflectionMapping:Dl,CubeRefractionMapping:qu,CubeTexture:Ev,CubeTextureLoader:IN,CubeUVReflectionMapping:Bm,CubicBezierCurve:k1,CubicBezierCurve3:tR,CubicInterpolant:xR,CullFaceBack:Pw,CullFaceFront:i3,CullFaceFrontBack:XD,CullFaceNone:n3,Curve:qo,CurvePath:iR,CustomBlending:s3,CustomToneMapping:c1,CylinderGeometry:Cv,Cylindrical:hz,Data3DTexture:Fx,DataArrayTexture:Ux,DataTexture:ao,DataTextureLoader:NN,DataUtils:gI,DecrementStencilOp:uL,DecrementWrapStencilOp:fL,DefaultLoadingManager:TR,DepthFormat:Il,DepthStencilFormat:Gu,DepthTexture:jf,DetachedBindMode:T3,DirectionalLight:kR,DirectionalLightHelper:wz,DiscreteInterpolant:SR,DodecahedronGeometry:Yx,DoubleSide:Cl,DstAlphaFactor:p3,DstColorFactor:g3,DynamicCopyUsage:CL,DynamicDrawUsage:xL,DynamicReadUsage:wL,EdgesGeometry:_3,EllipseCurve:Jx,EqualCompare:I3,EqualDepth:Ib,EqualStencilFunc:gL,EquirectangularReflectionMapping:KA,EquirectangularRefractionMapping:_A,Euler:jo,EventDispatcher:Xo,ExternalTexture:R1,ExtrudeGeometry:Qx,FileLoader:Ic,Float16BufferAttribute:MI,Float32BufferAttribute:wt,FloatType:ws,Fog:Vx,FogExp2:Ox,FramebufferTexture:WI,FrontSide:kc,Frustum:Wf,FrustumArray:Wx,GLBufferAttribute:dz,GLSL1:PL,GLSL3:Bw,GreaterCompare:N3,GreaterDepth:zb,GreaterEqualCompare:Bx,GreaterEqualDepth:Nb,GreaterEqualStencilFunc:bL,GreaterStencilFunc:vL,GridHelper:Sz,Group:Mm,HTMLTexture:YI,HalfFloatType:Ll,HemisphereLight:CR,HemisphereLightHelper:xz,IcosahedronGeometry:Zx,ImageBitmapLoader:VN,ImageLoader:Sv,ImageUtils:V3,IncrementStencilOp:cL,IncrementWrapStencilOp:dL,InstancedBufferAttribute:Dm,InstancedBufferGeometry:NR,InstancedInterleavedBuffer:uz,InstancedMesh:q3,Int16BufferAttribute:xI,Int32BufferAttribute:SI,Int8BufferAttribute:vI,IntType:Rx,InterleavedBuffer:Hx,InterleavedBufferAttribute:Gf,Interpolant:Om,InterpolateBezier:Nw,InterpolateDiscrete:dv,InterpolateLinear:hx,InterpolateSmooth:Sb,InterpolationSamplingMode:LL,InterpolationSamplingType:DL,InvertStencilOp:hL,KeepStencilOp:Df,KeyframeTrack:uo,LOD:j3,LatheGeometry:Kx,Layers:km,LessCompare:L3,LessDepth:Lb,LessEqualCompare:zx,LessEqualDepth:Vf,LessEqualStencilFunc:AL,LessStencilFunc:mL,Light:$u,LightProbe:IR,Line:Qu,Line3:gz,LineBasicMaterial:Cs,LineCurve:D1,LineCurve3:nR,LineDashedMaterial:vR,LineLoop:J3,LineSegments:Nl,LinearFilter:mi,LinearInterpolant:O1,LinearMipMapLinearFilter:ZD,LinearMipMapNearestFilter:QD,LinearMipmapLinearFilter:Rl,LinearMipmapNearestFilter:$A,LinearSRGBColorSpace:Rm,LinearToneMapping:a1,LinearTransfer:hv,Loader:_s,LoaderUtils:Hw,LoadingManager:G1,LoopOnce:E3,LoopPingPong:R3,LoopRepeat:C3,MOUSE:WD,Material:Hr,MaterialBlending:qD,MaterialLoader:oS,MathUtils:nI,Matrix2:J1,Matrix3:_t,Matrix4:Zt,MaxEquation:c3,Mesh:or,MeshBasicMaterial:Ku,MeshDepthMaterial:U1,MeshDistanceMaterial:F1,MeshLambertMaterial:gR,MeshMatcapMaterial:AR,MeshNormalMaterial:mR,MeshPhongMaterial:hR,MeshPhysicalMaterial:fR,MeshStandardMaterial:B1,MeshToonMaterial:pR,MinEquation:l3,MirroredRepeatWrapping:lv,MixOperation:M3,MultiplyBlending:Lw,MultiplyOperation:wv,NearestFilter:Ji,NearestMipMapLinearFilter:JD,NearestMipMapNearestFilter:YD,NearestMipmapLinearFilter:xm,NearestMipmapNearestFilter:f1,NeutralToneMapping:d1,NeverCompare:D3,NeverDepth:kb,NeverStencilFunc:pL,NoBlending:kl,NoColorSpace:Cc,NoNormalPacking:rL,NoToneMapping:so,NormalAnimationBlendMode:Nx,NormalBlending:Uf,NormalGAPacking:aL,NormalRGPacking:sL,NotEqualCompare:z3,NotEqualDepth:Bb,NotEqualStencilFunc:yL,NumberKeyframeTrack:rS,Object3D:Hn,ObjectLoader:FN,ObjectSpaceNormalMap:k3,OctahedronGeometry:kv,OneFactor:d3,OneMinusConstantAlphaFactor:S3,OneMinusConstantColorFactor:b3,OneMinusDstAlphaFactor:m3,OneMinusDstColorFactor:A3,OneMinusSrcAlphaFactor:Pb,OneMinusSrcColorFactor:h3,OrthographicCamera:Vm,PCFShadowMap:wm,PCFSoftShadowMap:ZA,PMREMGenerator:jw,Path:Av,PerspectiveCamera:kr,Plane:Ou,PlaneGeometry:Fm,PlaneHelper:Rz,PointLight:PR,PointLightHelper:yz,Points:Q3,PointsMaterial:C1,PolarGridHelper:Mz,PolyhedronGeometry:_u,PositionalAudio:YN,PropertyBinding:On,PropertyMixer:VR,QuadraticBezierCurve:L1,QuadraticBezierCurve3:I1,Quaternion:Es,QuaternionKeyframeTrack:sS,QuaternionLinearInterpolant:wR,R11_EAC_Format:jb,RED_GREEN_RGTC2_Format:uv,RED_RGTC1_Format:ux,REVISION:Tx,RG11_EAC_Format:cv,RGBADepthPacking:tL,RGBAFormat:as,RGBAIntegerFormat:Ix,RGBA_ASTC_10x10_Format:rx,RGBA_ASTC_10x5_Format:tx,RGBA_ASTC_10x6_Format:nx,RGBA_ASTC_10x8_Format:ix,RGBA_ASTC_12x10_Format:sx,RGBA_ASTC_12x12_Format:ax,RGBA_ASTC_4x4_Format:Yb,RGBA_ASTC_5x4_Format:Jb,RGBA_ASTC_5x5_Format:Qb,RGBA_ASTC_6x5_Format:Zb,RGBA_ASTC_6x6_Format:Kb,RGBA_ASTC_8x5_Format:_b,RGBA_ASTC_8x6_Format:$b,RGBA_ASTC_8x8_Format:ex,RGBA_BPTC_Format:ox,RGBA_ETC2_EAC_Format:Wb,RGBA_PVRTC_2BPPV1_Format:Vb,RGBA_PVRTC_4BPPV1_Format:Ob,RGBA_S3TC_DXT1_Format:tv,RGBA_S3TC_DXT3_Format:nv,RGBA_S3TC_DXT5_Format:iv,RGBDepthPacking:nL,RGBFormat:v1,RGBIntegerFormat:KD,RGB_BPTC_SIGNED_Format:lx,RGB_BPTC_UNSIGNED_Format:cx,RGB_ETC1_Format:Hb,RGB_ETC2_Format:Gb,RGB_PVRTC_2BPPV1_Format:Fb,RGB_PVRTC_4BPPV1_Format:Ub,RGB_S3TC_DXT1_Format:ev,RGDepthPacking:iL,RGFormat:Yu,RGIntegerFormat:Lx,RawShaderMaterial:z1,Ray:Um,Raycaster:GR,RectAreaLight:LR,RedFormat:Dx,RedIntegerFormat:Tv,ReinhardToneMapping:o1,RenderTarget:x1,RenderTarget3D:oz,RepeatWrapping:Dc,ReplaceStencilOp:lL,ReverseSubtractEquation:o3,RingGeometry:_x,SIGNED_R11_EAC_Format:Xb,SIGNED_RED_GREEN_RGTC2_Format:fx,SIGNED_RED_RGTC1_Format:dx,SIGNED_RG11_EAC_Format:qb,SRGBColorSpace:ss,SRGBTransfer:_n,Scene:S1,ShaderChunk:mn,ShaderLib:Go,ShaderMaterial:Pa,ShadowMaterial:cR,Shape:Pv,ShapeGeometry:$x,ShapePath:Dz,ShapeUtils:Wo,ShortType:p1,Skeleton:Gx,SkeletonHelper:vz,SkinnedMesh:X3,Source:Wu,Sphere:Vr,SphereGeometry:Dv,Spherical:fz,SphericalHarmonics3:j1,SplineCurve:N1,SpotLight:RR,SpotLightHelper:Az,Sprite:W3,SpriteMaterial:T1,SrcAlphaFactor:Rb,SrcAlphaSaturateFactor:v3,SrcColorFactor:f3,StaticCopyUsage:EL,StaticDrawUsage:pv,StaticReadUsage:ML,StereoCamera:GN,StreamCopyUsage:RL,StreamDrawUsage:SL,StreamReadUsage:TL,StringKeyframeTrack:Qf,SubtractEquation:a3,SubtractiveBlending:Dw,TOUCH:jD,TangentSpaceNormalMap:Lc,TetrahedronGeometry:eS,Texture:Di,TextureLoader:ER,TextureUtils:Uz,Timer:FR,TimestampQuery:kL,TorusGeometry:tS,TorusKnotGeometry:nS,Triangle:Qs,TriangleFanDrawMode:eL,TriangleStripDrawMode:$D,TrianglesDrawMode:_D,TubeGeometry:iS,UVMapping:Cx,Uint16BufferAttribute:M1,Uint32BufferAttribute:w1,Uint8BufferAttribute:yI,Uint8ClampedBufferAttribute:bI,Uniform:Ta,UniformsGroup:cz,UniformsLib:ft,UniformsUtils:dR,UnsignedByteType:Ss,UnsignedInt101111Type:g1,UnsignedInt248Type:Cm,UnsignedInt5999Type:m1,UnsignedIntType:oo,UnsignedShort4444Type:Px,UnsignedShort5551Type:kx,UnsignedShortType:Em,VSMShadowMap:If,Vector2:Oe,Vector3:J,Vector4:ni,VectorKeyframeTrack:H1,VideoFrameTexture:GI,VideoTexture:Z3,WebGL3DRenderTarget:oI,WebGLArrayRenderTarget:aI,WebGLCoordinateSystem:Ea,WebGLCubeRenderTarget:Q1,WebGLRenderTarget:Ra,WebGLRenderer:eP,WebGLUtils:_R,WebGPUCoordinateSystem:Hf,WebXRController:Mb,WireframeGeometry:lR,WrapAroundEnding:fv,ZeroCurvatureEnding:Nf,ZeroFactor:u3,ZeroSlopeEnding:zf,ZeroStencilOp:oL,createCanvasElement:F3,error:kt,getConsoleFunction:UL,log:gv,setConsoleFunction:BL,warn:ot,warnOnce:Xu},Symbol.toStringTag,{value:"Module"}));var Ab={exports:{}},fw={},vb={exports:{}},hw={};/**
|
|
4221
|
+
}`;class w4{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const i=new R1(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new Pa({vertexShader:S4,fragmentShader:M4,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new or(new Fm(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class T4 extends Xo{constructor(e,t){super();const i=this;let a=null,c=1,d=null,f="local-floor",m=1,g=null,v=null,M=null,x=null,S=null,w=null;const k=typeof XRWebGLBinding<"u",C=new w4,T={},D=t.getContextAttributes();let z=null,L=null;const O=[],U=[],H=new Oe;let I=null;const F=new kr;F.viewport=new ni;const V=new kr;V.viewport=new ni;const X=[F,V],_=new UR;let K=null,le=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Pe){let qe=O[Pe];return qe===void 0&&(qe=new Mb,O[Pe]=qe),qe.getTargetRaySpace()},this.getControllerGrip=function(Pe){let qe=O[Pe];return qe===void 0&&(qe=new Mb,O[Pe]=qe),qe.getGripSpace()},this.getHand=function(Pe){let qe=O[Pe];return qe===void 0&&(qe=new Mb,O[Pe]=qe),qe.getHandSpace()};function $(Pe){const qe=U.indexOf(Pe.inputSource);if(qe===-1)return;const He=O[qe];He!==void 0&&(He.update(Pe.inputSource,Pe.frame,g||d),He.dispatchEvent({type:Pe.type,data:Pe.inputSource}))}function j(){a.removeEventListener("select",$),a.removeEventListener("selectstart",$),a.removeEventListener("selectend",$),a.removeEventListener("squeeze",$),a.removeEventListener("squeezestart",$),a.removeEventListener("squeezeend",$),a.removeEventListener("end",j),a.removeEventListener("inputsourceschange",Q);for(let Pe=0;Pe<O.length;Pe++){const qe=U[Pe];qe!==null&&(U[Pe]=null,O[Pe].disconnect(qe))}K=null,le=null,C.reset();for(const Pe in T)delete T[Pe];e.setRenderTarget(z),S=null,x=null,M=null,a=null,L=null,ct.stop(),i.isPresenting=!1,e.setPixelRatio(I),e.setSize(H.width,H.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Pe){c=Pe,i.isPresenting===!0&&ot("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Pe){f=Pe,i.isPresenting===!0&&ot("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return g||d},this.setReferenceSpace=function(Pe){g=Pe},this.getBaseLayer=function(){return x!==null?x:S},this.getBinding=function(){return M===null&&k&&(M=new XRWebGLBinding(a,t)),M},this.getFrame=function(){return w},this.getSession=function(){return a},this.setSession=async function(Pe){if(a=Pe,a!==null){if(z=e.getRenderTarget(),a.addEventListener("select",$),a.addEventListener("selectstart",$),a.addEventListener("selectend",$),a.addEventListener("squeeze",$),a.addEventListener("squeezestart",$),a.addEventListener("squeezeend",$),a.addEventListener("end",j),a.addEventListener("inputsourceschange",Q),D.xrCompatible!==!0&&await t.makeXRCompatible(),I=e.getPixelRatio(),e.getSize(H),k&&"createProjectionLayer"in XRWebGLBinding.prototype){let He=null,pt=null,Nt=null;D.depth&&(Nt=D.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,He=D.stencil?Gu:Il,pt=D.stencil?Cm:oo);const nt={colorFormat:t.RGBA8,depthFormat:Nt,scaleFactor:c};M=this.getBinding(),x=M.createProjectionLayer(nt),a.updateRenderState({layers:[x]}),e.setPixelRatio(1),e.setSize(x.textureWidth,x.textureHeight,!1),L=new Ra(x.textureWidth,x.textureHeight,{format:as,type:Ss,depthTexture:new jf(x.textureWidth,x.textureHeight,pt,void 0,void 0,void 0,void 0,void 0,void 0,He),stencilBuffer:D.stencil,colorSpace:e.outputColorSpace,samples:D.antialias?4:0,resolveDepthBuffer:x.ignoreDepthValues===!1,resolveStencilBuffer:x.ignoreDepthValues===!1})}else{const He={antialias:D.antialias,alpha:!0,depth:D.depth,stencil:D.stencil,framebufferScaleFactor:c};S=new XRWebGLLayer(a,t,He),a.updateRenderState({baseLayer:S}),e.setPixelRatio(1),e.setSize(S.framebufferWidth,S.framebufferHeight,!1),L=new Ra(S.framebufferWidth,S.framebufferHeight,{format:as,type:Ss,colorSpace:e.outputColorSpace,stencilBuffer:D.stencil,resolveDepthBuffer:S.ignoreDepthValues===!1,resolveStencilBuffer:S.ignoreDepthValues===!1})}L.isXRRenderTarget=!0,this.setFoveation(m),g=null,d=await a.requestReferenceSpace(f),ct.setContext(a),ct.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(a!==null)return a.environmentBlendMode},this.getDepthTexture=function(){return C.getDepthTexture()};function Q(Pe){for(let qe=0;qe<Pe.removed.length;qe++){const He=Pe.removed[qe],pt=U.indexOf(He);pt>=0&&(U[pt]=null,O[pt].disconnect(He))}for(let qe=0;qe<Pe.added.length;qe++){const He=Pe.added[qe];let pt=U.indexOf(He);if(pt===-1){for(let nt=0;nt<O.length;nt++)if(nt>=U.length){U.push(He),pt=nt;break}else if(U[nt]===null){U[nt]=He,pt=nt;break}if(pt===-1)break}const Nt=O[pt];Nt&&Nt.connect(He)}}const ne=new J,ce=new J;function ye(Pe,qe,He){ne.setFromMatrixPosition(qe.matrixWorld),ce.setFromMatrixPosition(He.matrixWorld);const pt=ne.distanceTo(ce),Nt=qe.projectionMatrix.elements,nt=He.projectionMatrix.elements,sn=Nt[14]/(Nt[10]-1),Dt=Nt[14]/(Nt[10]+1),Ue=(Nt[9]+1)/Nt[5],xe=(Nt[9]-1)/Nt[5],ze=(Nt[8]-1)/Nt[0],je=(nt[8]+1)/nt[0],Ze=sn*ze,Pt=sn*je,bt=pt/(-ze+je),zt=bt*-ze;if(qe.matrixWorld.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.translateX(zt),Pe.translateZ(bt),Pe.matrixWorld.compose(Pe.position,Pe.quaternion,Pe.scale),Pe.matrixWorldInverse.copy(Pe.matrixWorld).invert(),Nt[10]===-1)Pe.projectionMatrix.copy(qe.projectionMatrix),Pe.projectionMatrixInverse.copy(qe.projectionMatrixInverse);else{const Et=sn+bt,ee=Dt+bt,Cn=Ze-zt,an=Pt+(pt-zt),Y=Ue*Dt/ee*Et,B=xe*Dt/ee*Et;Pe.projectionMatrix.makePerspective(Cn,an,Y,B,Et,ee),Pe.projectionMatrixInverse.copy(Pe.projectionMatrix).invert()}}function Te(Pe,qe){qe===null?Pe.matrixWorld.copy(Pe.matrix):Pe.matrixWorld.multiplyMatrices(qe.matrixWorld,Pe.matrix),Pe.matrixWorldInverse.copy(Pe.matrixWorld).invert()}this.updateCamera=function(Pe){if(a===null)return;let qe=Pe.near,He=Pe.far;C.texture!==null&&(C.depthNear>0&&(qe=C.depthNear),C.depthFar>0&&(He=C.depthFar)),_.near=V.near=F.near=qe,_.far=V.far=F.far=He,(K!==_.near||le!==_.far)&&(a.updateRenderState({depthNear:_.near,depthFar:_.far}),K=_.near,le=_.far),_.layers.mask=Pe.layers.mask|6,F.layers.mask=_.layers.mask&-5,V.layers.mask=_.layers.mask&-3;const pt=Pe.parent,Nt=_.cameras;Te(_,pt);for(let nt=0;nt<Nt.length;nt++)Te(Nt[nt],pt);Nt.length===2?ye(_,F,V):_.projectionMatrix.copy(F.projectionMatrix),Fe(Pe,_,pt)};function Fe(Pe,qe,He){He===null?Pe.matrix.copy(qe.matrixWorld):(Pe.matrix.copy(He.matrixWorld),Pe.matrix.invert(),Pe.matrix.multiply(qe.matrixWorld)),Pe.matrix.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.updateMatrixWorld(!0),Pe.projectionMatrix.copy(qe.projectionMatrix),Pe.projectionMatrixInverse.copy(qe.projectionMatrixInverse),Pe.isPerspectiveCamera&&(Pe.fov=Pm*2*Math.atan(1/Pe.projectionMatrix.elements[5]),Pe.zoom=1)}this.getCamera=function(){return _},this.getFoveation=function(){if(!(x===null&&S===null))return m},this.setFoveation=function(Pe){m=Pe,x!==null&&(x.fixedFoveation=Pe),S!==null&&S.fixedFoveation!==void 0&&(S.fixedFoveation=Pe)},this.hasDepthSensing=function(){return C.texture!==null},this.getDepthSensingMesh=function(){return C.getMesh(_)},this.getCameraTexture=function(Pe){return T[Pe]};let ft=null;function lt(Pe,qe){if(v=qe.getViewerPose(g||d),w=qe,v!==null){const He=v.views;S!==null&&(e.setRenderTargetFramebuffer(L,S.framebuffer),e.setRenderTarget(L));let pt=!1;He.length!==_.cameras.length&&(_.cameras.length=0,pt=!0);for(let Dt=0;Dt<He.length;Dt++){const Ue=He[Dt];let xe=null;if(S!==null)xe=S.getViewport(Ue);else{const je=M.getViewSubImage(x,Ue);xe=je.viewport,Dt===0&&(e.setRenderTargetTextures(L,je.colorTexture,je.depthStencilTexture),e.setRenderTarget(L))}let ze=X[Dt];ze===void 0&&(ze=new kr,ze.layers.enable(Dt),ze.viewport=new ni,X[Dt]=ze),ze.matrix.fromArray(Ue.transform.matrix),ze.matrix.decompose(ze.position,ze.quaternion,ze.scale),ze.projectionMatrix.fromArray(Ue.projectionMatrix),ze.projectionMatrixInverse.copy(ze.projectionMatrix).invert(),ze.viewport.set(xe.x,xe.y,xe.width,xe.height),Dt===0&&(_.matrix.copy(ze.matrix),_.matrix.decompose(_.position,_.quaternion,_.scale)),pt===!0&&_.cameras.push(ze)}const Nt=a.enabledFeatures;if(Nt&&Nt.includes("depth-sensing")&&a.depthUsage=="gpu-optimized"&&k){M=i.getBinding();const Dt=M.getDepthInformation(He[0]);Dt&&Dt.isValid&&Dt.texture&&C.init(Dt,a.renderState)}if(Nt&&Nt.includes("camera-access")&&k){e.state.unbindTexture(),M=i.getBinding();for(let Dt=0;Dt<He.length;Dt++){const Ue=He[Dt].camera;if(Ue){let xe=T[Ue];xe||(xe=new R1,T[Ue]=xe);const ze=M.getCameraImage(Ue);xe.sourceTexture=ze}}}}for(let He=0;He<O.length;He++){const pt=U[He],Nt=O[He];pt!==null&&Nt!==void 0&&Nt.update(pt,qe,g||d)}ft&&ft(Pe,qe),qe.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:qe}),w=null}const ct=new qR;ct.setAnimationLoop(lt),this.setAnimationLoop=function(Pe){ft=Pe},this.dispose=function(){}}}const E4=new Zt,$R=new _t;$R.set(-1,0,0,0,1,0,0,0,1);function C4(s,e){function t(C,T){C.matrixAutoUpdate===!0&&C.updateMatrix(),T.value.copy(C.matrix)}function i(C,T){T.color.getRGB(C.fogColor.value,uR(s)),T.isFog?(C.fogNear.value=T.near,C.fogFar.value=T.far):T.isFogExp2&&(C.fogDensity.value=T.density)}function a(C,T,D,z,L){T.isNodeMaterial?T.uniformsNeedUpdate=!1:T.isMeshBasicMaterial?c(C,T):T.isMeshLambertMaterial?(c(C,T),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)):T.isMeshToonMaterial?(c(C,T),M(C,T)):T.isMeshPhongMaterial?(c(C,T),v(C,T),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)):T.isMeshStandardMaterial?(c(C,T),x(C,T),T.isMeshPhysicalMaterial&&S(C,T,L)):T.isMeshMatcapMaterial?(c(C,T),w(C,T)):T.isMeshDepthMaterial?c(C,T):T.isMeshDistanceMaterial?(c(C,T),k(C,T)):T.isMeshNormalMaterial?c(C,T):T.isLineBasicMaterial?(d(C,T),T.isLineDashedMaterial&&f(C,T)):T.isPointsMaterial?m(C,T,D,z):T.isSpriteMaterial?g(C,T):T.isShadowMaterial?(C.color.value.copy(T.color),C.opacity.value=T.opacity):T.isShaderMaterial&&(T.uniformsNeedUpdate=!1)}function c(C,T){C.opacity.value=T.opacity,T.color&&C.diffuse.value.copy(T.color),T.emissive&&C.emissive.value.copy(T.emissive).multiplyScalar(T.emissiveIntensity),T.map&&(C.map.value=T.map,t(T.map,C.mapTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.bumpMap&&(C.bumpMap.value=T.bumpMap,t(T.bumpMap,C.bumpMapTransform),C.bumpScale.value=T.bumpScale,T.side===Ts&&(C.bumpScale.value*=-1)),T.normalMap&&(C.normalMap.value=T.normalMap,t(T.normalMap,C.normalMapTransform),C.normalScale.value.copy(T.normalScale),T.side===Ts&&C.normalScale.value.negate()),T.displacementMap&&(C.displacementMap.value=T.displacementMap,t(T.displacementMap,C.displacementMapTransform),C.displacementScale.value=T.displacementScale,C.displacementBias.value=T.displacementBias),T.emissiveMap&&(C.emissiveMap.value=T.emissiveMap,t(T.emissiveMap,C.emissiveMapTransform)),T.specularMap&&(C.specularMap.value=T.specularMap,t(T.specularMap,C.specularMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest);const D=e.get(T),z=D.envMap,L=D.envMapRotation;z&&(C.envMap.value=z,C.envMapRotation.value.setFromMatrix4(E4.makeRotationFromEuler(L)).transpose(),z.isCubeTexture&&z.isRenderTargetTexture===!1&&C.envMapRotation.value.premultiply($R),C.reflectivity.value=T.reflectivity,C.ior.value=T.ior,C.refractionRatio.value=T.refractionRatio),T.lightMap&&(C.lightMap.value=T.lightMap,C.lightMapIntensity.value=T.lightMapIntensity,t(T.lightMap,C.lightMapTransform)),T.aoMap&&(C.aoMap.value=T.aoMap,C.aoMapIntensity.value=T.aoMapIntensity,t(T.aoMap,C.aoMapTransform))}function d(C,T){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,T.map&&(C.map.value=T.map,t(T.map,C.mapTransform))}function f(C,T){C.dashSize.value=T.dashSize,C.totalSize.value=T.dashSize+T.gapSize,C.scale.value=T.scale}function m(C,T,D,z){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,C.size.value=T.size*D,C.scale.value=z*.5,T.map&&(C.map.value=T.map,t(T.map,C.uvTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest)}function g(C,T){C.diffuse.value.copy(T.color),C.opacity.value=T.opacity,C.rotation.value=T.rotation,T.map&&(C.map.value=T.map,t(T.map,C.mapTransform)),T.alphaMap&&(C.alphaMap.value=T.alphaMap,t(T.alphaMap,C.alphaMapTransform)),T.alphaTest>0&&(C.alphaTest.value=T.alphaTest)}function v(C,T){C.specular.value.copy(T.specular),C.shininess.value=Math.max(T.shininess,1e-4)}function M(C,T){T.gradientMap&&(C.gradientMap.value=T.gradientMap)}function x(C,T){C.metalness.value=T.metalness,T.metalnessMap&&(C.metalnessMap.value=T.metalnessMap,t(T.metalnessMap,C.metalnessMapTransform)),C.roughness.value=T.roughness,T.roughnessMap&&(C.roughnessMap.value=T.roughnessMap,t(T.roughnessMap,C.roughnessMapTransform)),T.envMap&&(C.envMapIntensity.value=T.envMapIntensity)}function S(C,T,D){C.ior.value=T.ior,T.sheen>0&&(C.sheenColor.value.copy(T.sheenColor).multiplyScalar(T.sheen),C.sheenRoughness.value=T.sheenRoughness,T.sheenColorMap&&(C.sheenColorMap.value=T.sheenColorMap,t(T.sheenColorMap,C.sheenColorMapTransform)),T.sheenRoughnessMap&&(C.sheenRoughnessMap.value=T.sheenRoughnessMap,t(T.sheenRoughnessMap,C.sheenRoughnessMapTransform))),T.clearcoat>0&&(C.clearcoat.value=T.clearcoat,C.clearcoatRoughness.value=T.clearcoatRoughness,T.clearcoatMap&&(C.clearcoatMap.value=T.clearcoatMap,t(T.clearcoatMap,C.clearcoatMapTransform)),T.clearcoatRoughnessMap&&(C.clearcoatRoughnessMap.value=T.clearcoatRoughnessMap,t(T.clearcoatRoughnessMap,C.clearcoatRoughnessMapTransform)),T.clearcoatNormalMap&&(C.clearcoatNormalMap.value=T.clearcoatNormalMap,t(T.clearcoatNormalMap,C.clearcoatNormalMapTransform),C.clearcoatNormalScale.value.copy(T.clearcoatNormalScale),T.side===Ts&&C.clearcoatNormalScale.value.negate())),T.dispersion>0&&(C.dispersion.value=T.dispersion),T.iridescence>0&&(C.iridescence.value=T.iridescence,C.iridescenceIOR.value=T.iridescenceIOR,C.iridescenceThicknessMinimum.value=T.iridescenceThicknessRange[0],C.iridescenceThicknessMaximum.value=T.iridescenceThicknessRange[1],T.iridescenceMap&&(C.iridescenceMap.value=T.iridescenceMap,t(T.iridescenceMap,C.iridescenceMapTransform)),T.iridescenceThicknessMap&&(C.iridescenceThicknessMap.value=T.iridescenceThicknessMap,t(T.iridescenceThicknessMap,C.iridescenceThicknessMapTransform))),T.transmission>0&&(C.transmission.value=T.transmission,C.transmissionSamplerMap.value=D.texture,C.transmissionSamplerSize.value.set(D.width,D.height),T.transmissionMap&&(C.transmissionMap.value=T.transmissionMap,t(T.transmissionMap,C.transmissionMapTransform)),C.thickness.value=T.thickness,T.thicknessMap&&(C.thicknessMap.value=T.thicknessMap,t(T.thicknessMap,C.thicknessMapTransform)),C.attenuationDistance.value=T.attenuationDistance,C.attenuationColor.value.copy(T.attenuationColor)),T.anisotropy>0&&(C.anisotropyVector.value.set(T.anisotropy*Math.cos(T.anisotropyRotation),T.anisotropy*Math.sin(T.anisotropyRotation)),T.anisotropyMap&&(C.anisotropyMap.value=T.anisotropyMap,t(T.anisotropyMap,C.anisotropyMapTransform))),C.specularIntensity.value=T.specularIntensity,C.specularColor.value.copy(T.specularColor),T.specularColorMap&&(C.specularColorMap.value=T.specularColorMap,t(T.specularColorMap,C.specularColorMapTransform)),T.specularIntensityMap&&(C.specularIntensityMap.value=T.specularIntensityMap,t(T.specularIntensityMap,C.specularIntensityMapTransform))}function w(C,T){T.matcap&&(C.matcap.value=T.matcap)}function k(C,T){const D=e.get(T).light;C.referencePosition.value.setFromMatrixPosition(D.matrixWorld),C.nearDistance.value=D.shadow.camera.near,C.farDistance.value=D.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:a}}function R4(s,e,t,i){let a={},c={},d=[];const f=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function m(L,O){const U=O.program;i.uniformBlockBinding(L,U)}function g(L,O){let U=a[L.id];U===void 0&&(C(L),U=v(L),a[L.id]=U,L.addEventListener("dispose",D));const H=O.program;i.updateUBOMapping(L,H);const I=e.render.frame;c[L.id]!==I&&(x(L),c[L.id]=I)}function v(L){const O=M();L.__bindingPointIndex=O;const U=s.createBuffer(),H=L.__size,I=L.usage;return s.bindBuffer(s.UNIFORM_BUFFER,U),s.bufferData(s.UNIFORM_BUFFER,H,I),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,O,U),U}function M(){for(let L=0;L<f;L++)if(d.indexOf(L)===-1)return d.push(L),L;return kt("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function x(L){const O=a[L.id],U=L.uniforms,H=L.__cache;s.bindBuffer(s.UNIFORM_BUFFER,O);for(let I=0,F=U.length;I<F;I++){const V=U[I];if(Array.isArray(V))for(let X=0,_=V.length;X<_;X++)S(V[X],I,X,H);else S(V,I,0,H)}s.bindBuffer(s.UNIFORM_BUFFER,null)}function S(L,O,U,H){if(k(L,O,U,H)===!0){const I=L.__offset,F=L.value;if(Array.isArray(F)){let V=0;for(let X=0;X<F.length;X++){const _=F[X],K=T(_);w(_,L.__data,V),typeof _!="number"&&typeof _!="boolean"&&!_.isMatrix3&&!ArrayBuffer.isView(_)&&(V+=K.storage/Float32Array.BYTES_PER_ELEMENT)}}else w(F,L.__data,0);s.bufferSubData(s.UNIFORM_BUFFER,I,L.__data)}}function w(L,O,U){typeof L=="number"||typeof L=="boolean"?O[0]=L:L.isMatrix3?(O[0]=L.elements[0],O[1]=L.elements[1],O[2]=L.elements[2],O[3]=0,O[4]=L.elements[3],O[5]=L.elements[4],O[6]=L.elements[5],O[7]=0,O[8]=L.elements[6],O[9]=L.elements[7],O[10]=L.elements[8],O[11]=0):ArrayBuffer.isView(L)?O.set(new L.constructor(L.buffer,L.byteOffset,O.length)):L.toArray(O,U)}function k(L,O,U,H){const I=L.value,F=O+"_"+U;if(H[F]===void 0)return typeof I=="number"||typeof I=="boolean"?H[F]=I:ArrayBuffer.isView(I)?H[F]=I.slice():H[F]=I.clone(),!0;{const V=H[F];if(typeof I=="number"||typeof I=="boolean"){if(V!==I)return H[F]=I,!0}else{if(ArrayBuffer.isView(I))return!0;if(V.equals(I)===!1)return V.copy(I),!0}}return!1}function C(L){const O=L.uniforms;let U=0;const H=16;for(let F=0,V=O.length;F<V;F++){const X=Array.isArray(O[F])?O[F]:[O[F]];for(let _=0,K=X.length;_<K;_++){const le=X[_],$=Array.isArray(le.value)?le.value:[le.value];for(let j=0,Q=$.length;j<Q;j++){const ne=$[j],ce=T(ne),ye=U%H,Te=ye%ce.boundary,Fe=ye+Te;U+=Te,Fe!==0&&H-Fe<ce.storage&&(U+=H-Fe),le.__data=new Float32Array(ce.storage/Float32Array.BYTES_PER_ELEMENT),le.__offset=U,U+=ce.storage}}}const I=U%H;return I>0&&(U+=H-I),L.__size=U,L.__cache={},this}function T(L){const O={boundary:0,storage:0};return typeof L=="number"||typeof L=="boolean"?(O.boundary=4,O.storage=4):L.isVector2?(O.boundary=8,O.storage=8):L.isVector3||L.isColor?(O.boundary=16,O.storage=12):L.isVector4?(O.boundary=16,O.storage=16):L.isMatrix3?(O.boundary=48,O.storage=48):L.isMatrix4?(O.boundary=64,O.storage=64):L.isTexture?ot("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(L)?(O.boundary=16,O.storage=L.byteLength):ot("WebGLRenderer: Unsupported uniform value type.",L),O}function D(L){const O=L.target;O.removeEventListener("dispose",D);const U=d.indexOf(O.__bindingPointIndex);d.splice(U,1),s.deleteBuffer(a[O.id]),delete a[O.id],delete c[O.id]}function z(){for(const L in a)s.deleteBuffer(a[L]);d=[],a={},c={}}return{bind:m,update:g,dispose:z}}const P4=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let El=null;function k4(){return El===null&&(El=new ao(P4,16,16,Yu,Ll),El.name="DFG_LUT",El.minFilter=mi,El.magFilter=mi,El.wrapS=Zs,El.wrapT=Zs,El.generateMipmaps=!1,El.needsUpdate=!0),El}class eP{constructor(e={}){const{canvas:t=F3(),context:i=null,depth:a=!0,stencil:c=!1,alpha:d=!1,antialias:f=!1,premultipliedAlpha:m=!0,preserveDrawingBuffer:g=!1,powerPreference:v="default",failIfMajorPerformanceCaveat:M=!1,reversedDepthBuffer:x=!1,outputBufferType:S=Ss}=e;this.isWebGLRenderer=!0;let w;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");w=i.getContextAttributes().alpha}else w=d;const k=S,C=new Set([Ix,Lx,Tv]),T=new Set([Ss,oo,Em,Cm,Px,kx]),D=new Uint32Array(4),z=new Int32Array(4),L=new J;let O=null,U=null;const H=[],I=[];let F=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=so,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const V=this;let X=!1,_=null,K=null,le=null,$=null;this._outputColorSpace=ss;let j=0,Q=0,ne=null,ce=-1,ye=null;const Te=new ni,Fe=new ni;let ft=null;const lt=new ut(0);let ct=0,Pe=t.width,qe=t.height,He=1,pt=null,Nt=null;const nt=new ni(0,0,Pe,qe),sn=new ni(0,0,Pe,qe);let Dt=!1;const Ue=new Wf;let xe=!1,ze=!1;const je=new Zt,Ze=new J,Pt=new ni,bt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let zt=!1;function Et(){return ne===null?He:1}let ee=i;function Cn(G,oe){return t.getContext(G,oe)}try{const G={alpha:!0,depth:a,stencil:c,antialias:f,premultipliedAlpha:m,preserveDrawingBuffer:g,powerPreference:v,failIfMajorPerformanceCaveat:M};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Tx}`),t.addEventListener("webglcontextlost",yn,!1),t.addEventListener("webglcontextrestored",Rn,!1),t.addEventListener("webglcontextcreationerror",Qi,!1),ee===null){const oe="webgl2";if(ee=Cn(oe,G),ee===null)throw Cn(oe)?new Error("THREE.WebGLRenderer: Error creating WebGL context with your selected attributes."):new Error("THREE.WebGLRenderer: Error creating WebGL context.")}}catch(G){throw kt("WebGLRenderer: "+G.message),G}let an,Y,B,de,me,Ce,Qe,Ke,ke,De,et,Rt,rt,st,mt,Ct,jt,ae,_e,Le,it,tt,Ne;function Mt(){an=new DF(ee),an.init(),it=new _R(ee,an),Y=new MF(ee,an,e,it),B=new b4(ee,an),Y.reversedDepthBuffer&&x&&B.buffers.depth.setReversed(!0),K=ee.createFramebuffer(),le=ee.createFramebuffer(),$=ee.createFramebuffer(),de=new NF(ee),me=new a4,Ce=new x4(ee,an,B,me,Y,it,de),Qe=new kF(V),Ke=new Fz(ee),tt=new xF(ee,Ke),ke=new LF(ee,Ke,de,tt),De=new BF(ee,ke,Ke,tt,de),ae=new zF(ee,Y,Ce),mt=new wF(me),et=new s4(V,Qe,an,Y,tt,mt),Rt=new C4(V,me),rt=new l4,st=new p4(an),jt=new bF(V,Qe,B,De,w,m),Ct=new y4(V,De,Y),Ne=new R4(ee,de,Y,B),_e=new SF(ee,an,de),Le=new IF(ee,an,de),de.programs=et.programs,V.capabilities=Y,V.extensions=an,V.properties=me,V.renderLists=rt,V.shadowMap=Ct,V.state=B,V.info=de}Mt(),k!==Ss&&(F=new FF(k,t.width,t.height,f,a,c));const gt=new T4(V,ee);this.xr=gt,this.getContext=function(){return ee},this.getContextAttributes=function(){return ee.getContextAttributes()},this.forceContextLoss=function(){const G=an.get("WEBGL_lose_context");G&&G.loseContext()},this.forceContextRestore=function(){const G=an.get("WEBGL_lose_context");G&&G.restoreContext()},this.getPixelRatio=function(){return He},this.setPixelRatio=function(G){G!==void 0&&(He=G,this.setSize(Pe,qe,!1))},this.getSize=function(G){return G.set(Pe,qe)},this.setSize=function(G,oe,Ae=!0){if(gt.isPresenting){ot("WebGLRenderer: Can't change size while VR device is presenting.");return}Pe=G,qe=oe,t.width=Math.floor(G*He),t.height=Math.floor(oe*He),Ae===!0&&(t.style.width=G+"px",t.style.height=oe+"px"),F!==null&&F.setSize(t.width,t.height),this.setViewport(0,0,G,oe)},this.getDrawingBufferSize=function(G){return G.set(Pe*He,qe*He).floor()},this.setDrawingBufferSize=function(G,oe,Ae){Pe=G,qe=oe,He=Ae,t.width=Math.floor(G*Ae),t.height=Math.floor(oe*Ae),this.setViewport(0,0,G,oe)},this.setEffects=function(G){if(k===Ss){kt("WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(G){for(let oe=0;oe<G.length;oe++)if(G[oe].isOutputPass===!0){ot("WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}F.setEffects(G||[])},this.getCurrentViewport=function(G){return G.copy(Te)},this.getViewport=function(G){return G.copy(nt)},this.setViewport=function(G,oe,Ae,he){G.isVector4?nt.set(G.x,G.y,G.z,G.w):nt.set(G,oe,Ae,he),B.viewport(Te.copy(nt).multiplyScalar(He).round())},this.getScissor=function(G){return G.copy(sn)},this.setScissor=function(G,oe,Ae,he){G.isVector4?sn.set(G.x,G.y,G.z,G.w):sn.set(G,oe,Ae,he),B.scissor(Fe.copy(sn).multiplyScalar(He).round())},this.getScissorTest=function(){return Dt},this.setScissorTest=function(G){B.setScissorTest(Dt=G)},this.setOpaqueSort=function(G){pt=G},this.setTransparentSort=function(G){Nt=G},this.getClearColor=function(G){return G.copy(jt.getClearColor())},this.setClearColor=function(){jt.setClearColor(...arguments)},this.getClearAlpha=function(){return jt.getClearAlpha()},this.setClearAlpha=function(){jt.setClearAlpha(...arguments)},this.clear=function(G=!0,oe=!0,Ae=!0){let he=0;if(G){let ge=!1;if(ne!==null){const We=ne.texture.format;ge=C.has(We)}if(ge){const We=ne.texture.type,dt=T.has(We),at=jt.getClearColor(),St=jt.getClearAlpha(),Tt=at.r,Xt=at.g,Ot=at.b;dt?(D[0]=Tt,D[1]=Xt,D[2]=Ot,D[3]=St,ee.clearBufferuiv(ee.COLOR,0,D)):(z[0]=Tt,z[1]=Xt,z[2]=Ot,z[3]=St,ee.clearBufferiv(ee.COLOR,0,z))}else he|=ee.COLOR_BUFFER_BIT}oe&&(he|=ee.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),Ae&&(he|=ee.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),he!==0&&ee.clear(he)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(G){G.setRenderer(this),_=G},this.dispose=function(){t.removeEventListener("webglcontextlost",yn,!1),t.removeEventListener("webglcontextrestored",Rn,!1),t.removeEventListener("webglcontextcreationerror",Qi,!1),jt.dispose(),rt.dispose(),st.dispose(),me.dispose(),Qe.dispose(),De.dispose(),tt.dispose(),Ne.dispose(),et.dispose(),gt.dispose(),gt.removeEventListener("sessionstart",ka),gt.removeEventListener("sessionend",Jo),Dr.stop()};function yn(G){G.preventDefault(),gv("WebGLRenderer: Context Lost."),X=!0}function Rn(){gv("WebGLRenderer: Context Restored."),X=!1;const G=de.autoReset,oe=Ct.enabled,Ae=Ct.autoUpdate,he=Ct.needsUpdate,ge=Ct.type;Mt(),de.autoReset=G,Ct.enabled=oe,Ct.autoUpdate=Ae,Ct.needsUpdate=he,Ct.type=ge}function Qi(G){kt("WebGLRenderer: A WebGL context could not be created. Reason: ",G.statusMessage)}function Gr(G){const oe=G.target;oe.removeEventListener("dispose",Gr),Zi(oe)}function Zi(G){$s(G),me.remove(G)}function $s(G){const oe=me.get(G).programs;oe!==void 0&&(oe.forEach(function(Ae){et.releaseProgram(Ae)}),G.isShaderMaterial&&et.releaseShaderCache(G))}this.renderBufferDirect=function(G,oe,Ae,he,ge,We){oe===null&&(oe=bt);const dt=ge.isMesh&&ge.matrixWorld.determinantAffine()<0,at=zl(G,oe,Ae,he,ge);B.setMaterial(he,dt);let St=Ae.index,Tt=1;if(he.wireframe===!0){if(St=ke.getWireframeAttribute(Ae),St===void 0)return;Tt=2}const Xt=Ae.drawRange,Ot=Ae.attributes.position;let vt=Xt.start*Tt,Pn=(Xt.start+Xt.count)*Tt;We!==null&&(vt=Math.max(vt,We.start*Tt),Pn=Math.min(Pn,(We.start+We.count)*Tt)),St!==null?(vt=Math.max(vt,0),Pn=Math.min(Pn,St.count)):Ot!=null&&(vt=Math.max(vt,0),Pn=Math.min(Pn,Ot.count));const dn=Pn-vt;if(dn<0||dn===1/0)return;tt.setup(ge,he,at,Ae,St);let Ht,Tn=_e;if(St!==null&&(Ht=Ke.get(St),Tn=Le,Tn.setIndex(Ht)),ge.isMesh)he.wireframe===!0?(B.setLineWidth(he.wireframeLinewidth*Et()),Tn.setMode(ee.LINES)):Tn.setMode(ee.TRIANGLES);else if(ge.isLine){let Qn=he.linewidth;Qn===void 0&&(Qn=1),B.setLineWidth(Qn*Et()),ge.isLineSegments?Tn.setMode(ee.LINES):ge.isLineLoop?Tn.setMode(ee.LINE_LOOP):Tn.setMode(ee.LINE_STRIP)}else ge.isPoints?Tn.setMode(ee.POINTS):ge.isSprite&&Tn.setMode(ee.TRIANGLES);if(ge.isBatchedMesh)if(an.get("WEBGL_multi_draw"))Tn.renderMultiDraw(ge._multiDrawStarts,ge._multiDrawCounts,ge._multiDrawCount);else{const Qn=ge._multiDrawStarts,Xe=ge._multiDrawCounts,Li=ge._multiDrawCount,Kt=St?Ke.get(St).bytesPerElement:1,Hi=me.get(he).currentProgram.getUniforms();for(let Ii=0;Ii<Li;Ii++)Hi.setValue(ee,"_gl_DrawID",Ii),Tn.render(Qn[Ii]/Kt,Xe[Ii])}else if(ge.isInstancedMesh)Tn.renderInstances(vt,dn,ge.count);else if(Ae.isInstancedBufferGeometry){const Qn=Ae._maxInstanceCount!==void 0?Ae._maxInstanceCount:1/0,Xe=Math.min(Ae.instanceCount,Qn);Tn.renderInstances(vt,dn,Xe)}else Tn.render(vt,dn)};function Rs(G,oe,Ae){G.transparent===!0&&G.side===Cl&&G.forceSinglePass===!1?(G.side=Ts,G.needsUpdate=!0,ks(G,oe,Ae),G.side=kc,G.needsUpdate=!0,ks(G,oe,Ae),G.side=Cl):ks(G,oe,Ae)}this.compile=function(G,oe,Ae=null){Ae===null&&(Ae=G),U=st.get(Ae),U.init(oe),I.push(U),Ae.traverseVisible(function(ge){ge.isLight&&ge.layers.test(oe.layers)&&(U.pushLight(ge),ge.castShadow&&U.pushShadow(ge))}),G!==Ae&&G.traverseVisible(function(ge){ge.isLight&&ge.layers.test(oe.layers)&&(U.pushLight(ge),ge.castShadow&&U.pushShadow(ge))}),U.setupLights();const he=new Set;return G.traverse(function(ge){if(!(ge.isMesh||ge.isPoints||ge.isLine||ge.isSprite))return;const We=ge.material;if(We)if(Array.isArray(We))for(let dt=0;dt<We.length;dt++){const at=We[dt];Rs(at,Ae,ge),he.add(at)}else Rs(We,Ae,ge),he.add(We)}),U=I.pop(),he},this.compileAsync=function(G,oe,Ae=null){const he=this.compile(G,oe,Ae);return new Promise(ge=>{function We(){if(he.forEach(function(dt){me.get(dt).currentProgram.isReady()&&he.delete(dt)}),he.size===0){ge(G);return}setTimeout(We,10)}an.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Ps=null;function Yo(G){Ps&&Ps(G)}function ka(){Dr.stop()}function Jo(){Dr.start()}const Dr=new qR;Dr.setAnimationLoop(Yo),typeof self<"u"&&Dr.setContext(self),this.setAnimationLoop=function(G){Ps=G,gt.setAnimationLoop(G),G===null?Dr.stop():Dr.start()},gt.addEventListener("sessionstart",ka),gt.addEventListener("sessionend",Jo),this.render=function(G,oe){if(oe!==void 0&&oe.isCamera!==!0){kt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(X===!0)return;_!==null&&_.renderStart(G,oe);const Ae=gt.enabled===!0&>.isPresenting===!0,he=F!==null&&(ne===null||Ae)&&F.begin(V,ne);if(G.matrixWorldAutoUpdate===!0&&G.updateMatrixWorld(),oe.parent===null&&oe.matrixWorldAutoUpdate===!0&&oe.updateMatrixWorld(),gt.enabled===!0&>.isPresenting===!0&&(F===null||F.isCompositing()===!1)&&(gt.cameraAutoUpdate===!0&>.updateCamera(oe),oe=gt.getCamera()),G.isScene===!0&&G.onBeforeRender(V,G,oe,ne),U=st.get(G,I.length),U.init(oe),U.state.textureUnits=Ce.getTextureUnits(),I.push(U),je.multiplyMatrices(oe.projectionMatrix,oe.matrixWorldInverse),Ue.setFromProjectionMatrix(je,Ea,oe.reversedDepth),ze=this.localClippingEnabled,xe=mt.init(this.clippingPlanes,ze),O=rt.get(G,H.length),O.init(),H.push(O),gt.enabled===!0&>.isPresenting===!0){const dt=V.xr.getDepthSensingMesh();dt!==null&&lr(dt,oe,-1/0,V.sortObjects)}lr(G,oe,0,V.sortObjects),O.finish(),V.sortObjects===!0&&O.sort(pt,Nt,oe.reversedDepth),zt=gt.enabled===!1||gt.isPresenting===!1||gt.hasDepthSensing()===!1,zt&&jt.addToRenderList(O,G),this.info.render.frame++,this.info.autoReset===!0&&this.info.reset(),xe===!0&&mt.beginShadows();const ge=U.state.shadowsArray;if(Ct.render(ge,G,oe),xe===!0&&mt.endShadows(),(he&&F.hasRenderPass())===!1){const dt=O.opaque,at=O.transmissive;if(U.setupLights(),oe.isArrayCamera){const St=oe.cameras;if(at.length>0)for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt];Qo(dt,at,G,Ot)}zt&&jt.render(G);for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt];ls(O,G,Ot,Ot.viewport)}}else at.length>0&&Qo(dt,at,G,oe),zt&&jt.render(G),ls(O,G,oe)}ne!==null&&Q===0&&(Ce.updateMultisampleRenderTarget(ne),Ce.updateRenderTargetMipmap(ne)),he&&F.end(V),G.isScene===!0&&G.onAfterRender(V,G,oe),tt.resetDefaultState(),ce=-1,ye=null,I.pop(),I.length>0?(U=I[I.length-1],Ce.setTextureUnits(U.state.textureUnits),xe===!0&&mt.setGlobalState(V.clippingPlanes,U.state.camera)):U=null,H.pop(),H.length>0?O=H[H.length-1]:O=null,_!==null&&_.renderEnd()};function lr(G,oe,Ae,he){if(G.visible===!1)return;if(G.layers.test(oe.layers)){if(G.isGroup)Ae=G.renderOrder;else if(G.isLOD)G.autoUpdate===!0&&G.update(oe);else if(G.isLightProbeGrid)U.pushLightProbeGrid(G);else if(G.isLight)U.pushLight(G),G.castShadow&&U.pushShadow(G);else if(G.isSprite){if(!G.frustumCulled||Ue.intersectsSprite(G)){he&&Pt.setFromMatrixPosition(G.matrixWorld).applyMatrix4(je);const dt=De.update(G),at=G.material;at.visible&&O.push(G,dt,at,Ae,Pt.z,null)}}else if((G.isMesh||G.isLine||G.isPoints)&&(!G.frustumCulled||Ue.intersectsObject(G))){const dt=De.update(G),at=G.material;if(he&&(G.boundingSphere!==void 0?(G.boundingSphere===null&&G.computeBoundingSphere(),Pt.copy(G.boundingSphere.center)):(dt.boundingSphere===null&&dt.computeBoundingSphere(),Pt.copy(dt.boundingSphere.center)),Pt.applyMatrix4(G.matrixWorld).applyMatrix4(je)),Array.isArray(at)){const St=dt.groups;for(let Tt=0,Xt=St.length;Tt<Xt;Tt++){const Ot=St[Tt],vt=at[Ot.materialIndex];vt&&vt.visible&&O.push(G,dt,vt,Ae,Pt.z,Ot)}}else at.visible&&O.push(G,dt,at,Ae,Pt.z,null)}}const We=G.children;for(let dt=0,at=We.length;dt<at;dt++)lr(We[dt],oe,Ae,he)}function ls(G,oe,Ae,he){const{opaque:ge,transmissive:We,transparent:dt}=G;U.setupLightsView(Ae),xe===!0&&mt.setGlobalState(V.clippingPlanes,Ae),he&&B.viewport(Te.copy(he)),ge.length>0&&Zo(ge,oe,Ae),We.length>0&&Zo(We,oe,Ae),dt.length>0&&Zo(dt,oe,Ae),B.buffers.depth.setTest(!0),B.buffers.depth.setMask(!0),B.buffers.color.setMask(!0),B.setPolygonOffset(!1)}function Qo(G,oe,Ae,he){if((Ae.isScene===!0?Ae.overrideMaterial:null)!==null)return;if(U.state.transmissionRenderTarget[he.id]===void 0){const vt=an.has("EXT_color_buffer_half_float")||an.has("EXT_color_buffer_float");U.state.transmissionRenderTarget[he.id]=new Ra(1,1,{generateMipmaps:!0,type:vt?Ll:Ss,minFilter:Rl,samples:Math.max(4,Y.samples),stencilBuffer:c,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:wn.workingColorSpace})}const We=U.state.transmissionRenderTarget[he.id],dt=he.viewport||Te;We.setSize(dt.z*V.transmissionResolutionScale,dt.w*V.transmissionResolutionScale);const at=V.getRenderTarget(),St=V.getActiveCubeFace(),Tt=V.getActiveMipmapLevel();V.setRenderTarget(We),V.getClearColor(lt),ct=V.getClearAlpha(),ct<1&&V.setClearColor(16777215,.5),V.clear(),zt&&jt.render(Ae);const Xt=V.toneMapping;V.toneMapping=so;const Ot=he.viewport;if(he.viewport!==void 0&&(he.viewport=void 0),U.setupLightsView(he),xe===!0&&mt.setGlobalState(V.clippingPlanes,he),Zo(G,Ae,he),Ce.updateMultisampleRenderTarget(We),Ce.updateRenderTargetMipmap(We),an.has("WEBGL_multisampled_render_to_texture")===!1){let vt=!1;for(let Pn=0,dn=oe.length;Pn<dn;Pn++){const Ht=oe[Pn],{object:Tn,geometry:Qn,material:Xe,group:Li}=Ht;if(Xe.side===Cl&&Tn.layers.test(he.layers)){const Kt=Xe.side;Xe.side=Ts,Xe.needsUpdate=!0,fo(Tn,Ae,he,Qn,Xe,Li),Xe.side=Kt,Xe.needsUpdate=!0,vt=!0}}vt===!0&&(Ce.updateMultisampleRenderTarget(We),Ce.updateRenderTargetMipmap(We))}V.setRenderTarget(at,St,Tt),V.setClearColor(lt,ct),Ot!==void 0&&(he.viewport=Ot),V.toneMapping=Xt}function Zo(G,oe,Ae){const he=oe.isScene===!0?oe.overrideMaterial:null;for(let ge=0,We=G.length;ge<We;ge++){const dt=G[ge],{object:at,geometry:St,group:Tt}=dt;let Xt=dt.material;Xt.allowOverride===!0&&he!==null&&(Xt=he),at.layers.test(Ae.layers)&&fo(at,oe,Ae,St,Xt,Tt)}}function fo(G,oe,Ae,he,ge,We){G.onBeforeRender(V,oe,Ae,he,ge,We),G.modelViewMatrix.multiplyMatrices(Ae.matrixWorldInverse,G.matrixWorld),G.normalMatrix.getNormalMatrix(G.modelViewMatrix),ge.onBeforeRender(V,oe,Ae,he,G,We),ge.transparent===!0&&ge.side===Cl&&ge.forceSinglePass===!1?(ge.side=Ts,ge.needsUpdate=!0,V.renderBufferDirect(Ae,oe,he,ge,G,We),ge.side=kc,ge.needsUpdate=!0,V.renderBufferDirect(Ae,oe,he,ge,G,We),ge.side=Cl):V.renderBufferDirect(Ae,oe,he,ge,G,We),G.onAfterRender(V,oe,Ae,he,ge,We)}function ks(G,oe,Ae){oe.isScene!==!0&&(oe=bt);const he=me.get(G),ge=U.state.lights,We=U.state.shadowsArray,dt=ge.state.version,at=et.getParameters(G,ge.state,We,oe,Ae,U.state.lightProbeGridArray),St=et.getProgramCacheKey(at);let Tt=he.programs;he.environment=G.isMeshStandardMaterial||G.isMeshLambertMaterial||G.isMeshPhongMaterial?oe.environment:null,he.fog=oe.fog;const Xt=G.isMeshStandardMaterial||G.isMeshLambertMaterial&&!G.envMap||G.isMeshPhongMaterial&&!G.envMap;he.envMap=Qe.get(G.envMap||he.environment,Xt),he.envMapRotation=he.environment!==null&&G.envMap===null?oe.environmentRotation:G.envMapRotation,Tt===void 0&&(G.addEventListener("dispose",Gr),Tt=new Map,he.programs=Tt);let Ot=Tt.get(St);if(Ot!==void 0){if(he.currentProgram===Ot&&he.lightsStateVersion===dt)return ed(G,at),Ot}else at.uniforms=et.getUniforms(G),_!==null&&G.isNodeMaterial&&_.build(G,Ae,at),G.onBeforeCompile(at,V),Ot=et.acquireProgram(at,St),Tt.set(St,Ot),he.uniforms=at.uniforms;const vt=he.uniforms;return(!G.isShaderMaterial&&!G.isRawShaderMaterial||G.clipping===!0)&&(vt.clippingPlanes=mt.uniform),ed(G,at),he.needsLights=ta(G),he.lightsStateVersion=dt,he.needsLights&&(vt.ambientLightColor.value=ge.state.ambient,vt.lightProbe.value=ge.state.probe,vt.directionalLights.value=ge.state.directional,vt.directionalLightShadows.value=ge.state.directionalShadow,vt.spotLights.value=ge.state.spot,vt.spotLightShadows.value=ge.state.spotShadow,vt.rectAreaLights.value=ge.state.rectArea,vt.ltc_1.value=ge.state.rectAreaLTC1,vt.ltc_2.value=ge.state.rectAreaLTC2,vt.pointLights.value=ge.state.point,vt.pointLightShadows.value=ge.state.pointShadow,vt.hemisphereLights.value=ge.state.hemi,vt.directionalShadowMatrix.value=ge.state.directionalShadowMatrix,vt.spotLightMatrix.value=ge.state.spotLightMatrix,vt.spotLightMap.value=ge.state.spotLightMap,vt.pointShadowMatrix.value=ge.state.pointShadowMatrix),he.lightProbeGrid=U.state.lightProbeGridArray.length>0,he.currentProgram=Ot,he.uniformsList=null,Ot}function zc(G){if(G.uniformsList===null){const oe=G.currentProgram.getUniforms();G.uniformsList=wb.seqWithValue(oe.seq,G.uniforms)}return G.uniformsList}function ed(G,oe){const Ae=me.get(G);Ae.outputColorSpace=oe.outputColorSpace,Ae.batching=oe.batching,Ae.batchingColor=oe.batchingColor,Ae.instancing=oe.instancing,Ae.instancingColor=oe.instancingColor,Ae.instancingMorph=oe.instancingMorph,Ae.skinning=oe.skinning,Ae.morphTargets=oe.morphTargets,Ae.morphNormals=oe.morphNormals,Ae.morphColors=oe.morphColors,Ae.morphTargetsCount=oe.morphTargetsCount,Ae.numClippingPlanes=oe.numClippingPlanes,Ae.numIntersection=oe.numClipIntersection,Ae.vertexAlphas=oe.vertexAlphas,Ae.vertexTangents=oe.vertexTangents,Ae.toneMapping=oe.toneMapping}function xt(G,oe){if(G.length===0)return null;if(G.length===1)return G[0].texture!==null?G[0]:null;L.setFromMatrixPosition(oe.matrixWorld);for(let Ae=0,he=G.length;Ae<he;Ae++){const ge=G[Ae];if(ge.texture!==null&&ge.boundingBox.containsPoint(L))return ge}return null}function zl(G,oe,Ae,he,ge){oe.isScene!==!0&&(oe=bt),Ce.resetTextureUnits();const We=oe.fog,dt=he.isMeshStandardMaterial||he.isMeshLambertMaterial||he.isMeshPhongMaterial?oe.environment:null,at=ne===null?V.outputColorSpace:ne.isXRRenderTarget===!0?ne.texture.colorSpace:wn.workingColorSpace,St=he.isMeshStandardMaterial||he.isMeshLambertMaterial&&!he.envMap||he.isMeshPhongMaterial&&!he.envMap,Tt=Qe.get(he.envMap||dt,St),Xt=he.vertexColors===!0&&!!Ae.attributes.color&&Ae.attributes.color.itemSize===4,Ot=!!Ae.attributes.tangent&&(!!he.normalMap||he.anisotropy>0),vt=!!Ae.morphAttributes.position,Pn=!!Ae.morphAttributes.normal,dn=!!Ae.morphAttributes.color;let Ht=so;he.toneMapped&&(ne===null||ne.isXRRenderTarget===!0)&&(Ht=V.toneMapping);const Tn=Ae.morphAttributes.position||Ae.morphAttributes.normal||Ae.morphAttributes.color,Qn=Tn!==void 0?Tn.length:0,Xe=me.get(he),Li=U.state.lights;if(xe===!0&&(ze===!0||G!==ye)){const Dn=G===ye&&he.id===ce;mt.setState(he,G,Dn)}let Kt=!1;he.version===Xe.__version?(Xe.needsLights&&Xe.lightsStateVersion!==Li.state.version||Xe.outputColorSpace!==at||ge.isBatchedMesh&&Xe.batching===!1||!ge.isBatchedMesh&&Xe.batching===!0||ge.isBatchedMesh&&Xe.batchingColor===!0&&ge.colorTexture===null||ge.isBatchedMesh&&Xe.batchingColor===!1&&ge.colorTexture!==null||ge.isInstancedMesh&&Xe.instancing===!1||!ge.isInstancedMesh&&Xe.instancing===!0||ge.isSkinnedMesh&&Xe.skinning===!1||!ge.isSkinnedMesh&&Xe.skinning===!0||ge.isInstancedMesh&&Xe.instancingColor===!0&&ge.instanceColor===null||ge.isInstancedMesh&&Xe.instancingColor===!1&&ge.instanceColor!==null||ge.isInstancedMesh&&Xe.instancingMorph===!0&&ge.morphTexture===null||ge.isInstancedMesh&&Xe.instancingMorph===!1&&ge.morphTexture!==null||Xe.envMap!==Tt||he.fog===!0&&Xe.fog!==We||Xe.numClippingPlanes!==void 0&&(Xe.numClippingPlanes!==mt.numPlanes||Xe.numIntersection!==mt.numIntersection)||Xe.vertexAlphas!==Xt||Xe.vertexTangents!==Ot||Xe.morphTargets!==vt||Xe.morphNormals!==Pn||Xe.morphColors!==dn||Xe.toneMapping!==Ht||Xe.morphTargetsCount!==Qn||!!Xe.lightProbeGrid!=U.state.lightProbeGridArray.length>0)&&(Kt=!0):(Kt=!0,Xe.__version=he.version);let Hi=Xe.currentProgram;Kt===!0&&(Hi=ks(he,oe,ge),_&&he.isNodeMaterial&&_.onUpdateProgram(he,Hi,Xe));let Ii=!1,yr=!1,Ki=!1;const Gn=Hi.getUniforms(),zn=Xe.uniforms;if(B.useProgram(Hi.program)&&(Ii=!0,yr=!0,Ki=!0),he.id!==ce&&(ce=he.id,yr=!0),Xe.needsLights){const Dn=xt(U.state.lightProbeGridArray,ge);Xe.lightProbeGrid!==Dn&&(Xe.lightProbeGrid=Dn,yr=!0)}if(Ii||ye!==G){B.buffers.depth.getReversed()&&G.reversedDepth!==!0&&(G._reversedDepth=!0,G.updateProjectionMatrix()),Gn.setValue(ee,"projectionMatrix",G.projectionMatrix),Gn.setValue(ee,"viewMatrix",G.matrixWorldInverse);const jr=Gn.map.cameraPosition;jr!==void 0&&jr.setValue(ee,Ze.setFromMatrixPosition(G.matrixWorld)),Y.logarithmicDepthBuffer&&Gn.setValue(ee,"logDepthBufFC",2/(Math.log(G.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&Gn.setValue(ee,"isOrthographic",G.isOrthographicCamera===!0),ye!==G&&(ye=G,yr=!0,Ki=!0)}if(Xe.needsLights&&(Li.state.directionalShadowMap.length>0&&Gn.setValue(ee,"directionalShadowMap",Li.state.directionalShadowMap,Ce),Li.state.spotShadowMap.length>0&&Gn.setValue(ee,"spotShadowMap",Li.state.spotShadowMap,Ce),Li.state.pointShadowMap.length>0&&Gn.setValue(ee,"pointShadowMap",Li.state.pointShadowMap,Ce)),ge.isSkinnedMesh){Gn.setOptional(ee,ge,"bindMatrix"),Gn.setOptional(ee,ge,"bindMatrixInverse");const Dn=ge.skeleton;Dn&&(Dn.boneTexture===null&&Dn.computeBoneTexture(),Gn.setValue(ee,"boneTexture",Dn.boneTexture,Ce))}ge.isBatchedMesh&&(Gn.setOptional(ee,ge,"batchingTexture"),Gn.setValue(ee,"batchingTexture",ge._matricesTexture,Ce),Gn.setOptional(ee,ge,"batchingIdTexture"),Gn.setValue(ee,"batchingIdTexture",ge._indirectTexture,Ce),Gn.setOptional(ee,ge,"batchingColorTexture"),ge._colorsTexture!==null&&Gn.setValue(ee,"batchingColorTexture",ge._colorsTexture,Ce));const Wr=Ae.morphAttributes;if((Wr.position!==void 0||Wr.normal!==void 0||Wr.color!==void 0)&&ae.update(ge,Ae,Hi),(yr||Xe.receiveShadow!==ge.receiveShadow)&&(Xe.receiveShadow=ge.receiveShadow,Gn.setValue(ee,"receiveShadow",ge.receiveShadow)),(he.isMeshStandardMaterial||he.isMeshLambertMaterial||he.isMeshPhongMaterial)&&he.envMap===null&&oe.environment!==null&&(zn.envMapIntensity.value=oe.environmentIntensity),zn.dfgLUT!==void 0&&(zn.dfgLUT.value=k4()),yr){if(Gn.setValue(ee,"toneMappingExposure",V.toneMappingExposure),Xe.needsLights&&ea(zn,Ki),We&&he.fog===!0&&Rt.refreshFogUniforms(zn,We),Rt.refreshMaterialUniforms(zn,he,He,qe,U.state.transmissionRenderTarget[G.id]),Xe.needsLights&&Xe.lightProbeGrid){const Dn=Xe.lightProbeGrid;zn.probesSH.value=Dn.texture,zn.probesMin.value.copy(Dn.boundingBox.min),zn.probesMax.value.copy(Dn.boundingBox.max),zn.probesResolution.value.copy(Dn.resolution)}wb.upload(ee,zc(Xe),zn,Ce)}if(he.isShaderMaterial&&he.uniformsNeedUpdate===!0&&(wb.upload(ee,zc(Xe),zn,Ce),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&Gn.setValue(ee,"center",ge.center),Gn.setValue(ee,"modelViewMatrix",ge.modelViewMatrix),Gn.setValue(ee,"normalMatrix",ge.normalMatrix),Gn.setValue(ee,"modelMatrix",ge.matrixWorld),he.uniformsGroups!==void 0){const Dn=he.uniformsGroups;for(let jr=0,gi=Dn.length;jr<gi;jr++){const cr=Dn[jr];Ne.update(cr,Hi),Ne.bind(cr,Hi)}}return Hi}function ea(G,oe){G.ambientLightColor.needsUpdate=oe,G.lightProbe.needsUpdate=oe,G.directionalLights.needsUpdate=oe,G.directionalLightShadows.needsUpdate=oe,G.pointLights.needsUpdate=oe,G.pointLightShadows.needsUpdate=oe,G.spotLights.needsUpdate=oe,G.spotLightShadows.needsUpdate=oe,G.rectAreaLights.needsUpdate=oe,G.hemisphereLights.needsUpdate=oe}function ta(G){return G.isMeshLambertMaterial||G.isMeshToonMaterial||G.isMeshPhongMaterial||G.isMeshStandardMaterial||G.isShadowMaterial||G.isShaderMaterial&&G.lights===!0}this.getActiveCubeFace=function(){return j},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return ne},this.setRenderTargetTextures=function(G,oe,Ae){const he=me.get(G);he.__autoAllocateDepthBuffer=G.resolveDepthBuffer===!1,he.__autoAllocateDepthBuffer===!1&&(he.__useRenderToTexture=!1),me.get(G.texture).__webglTexture=oe,me.get(G.depthTexture).__webglTexture=he.__autoAllocateDepthBuffer?void 0:Ae,he.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(G,oe){const Ae=me.get(G);Ae.__webglFramebuffer=oe,Ae.__useDefaultFramebuffer=oe===void 0},this.setRenderTarget=function(G,oe=0,Ae=0){ne=G,j=oe,Q=Ae;let he=null,ge=!1,We=!1;if(G){const at=me.get(G);if(at.__useDefaultFramebuffer!==void 0){B.bindFramebuffer(ee.FRAMEBUFFER,at.__webglFramebuffer),Te.copy(G.viewport),Fe.copy(G.scissor),ft=G.scissorTest,B.viewport(Te),B.scissor(Fe),B.setScissorTest(ft),ce=-1;return}else if(at.__webglFramebuffer===void 0)Ce.setupRenderTarget(G);else if(at.__hasExternalTextures)Ce.rebindTextures(G,me.get(G.texture).__webglTexture,me.get(G.depthTexture).__webglTexture);else if(G.depthBuffer){const Xt=G.depthTexture;if(at.__boundDepthTexture!==Xt){if(Xt!==null&&me.has(Xt)&&(G.width!==Xt.image.width||G.height!==Xt.image.height))throw new Error("THREE.WebGLRenderer: Attached DepthTexture is initialized to the incorrect size.");Ce.setupDepthRenderbuffer(G)}}const St=G.texture;(St.isData3DTexture||St.isDataArrayTexture||St.isCompressedArrayTexture)&&(We=!0);const Tt=me.get(G).__webglFramebuffer;G.isWebGLCubeRenderTarget?(Array.isArray(Tt[oe])?he=Tt[oe][Ae]:he=Tt[oe],ge=!0):G.samples>0&&Ce.useMultisampledRTT(G)===!1?he=me.get(G).__webglMultisampledFramebuffer:Array.isArray(Tt)?he=Tt[Ae]:he=Tt,Te.copy(G.viewport),Fe.copy(G.scissor),ft=G.scissorTest}else Te.copy(nt).multiplyScalar(He).floor(),Fe.copy(sn).multiplyScalar(He).floor(),ft=Dt;if(Ae!==0&&(he=K),B.bindFramebuffer(ee.FRAMEBUFFER,he)&&B.drawBuffers(G,he),B.viewport(Te),B.scissor(Fe),B.setScissorTest(ft),ge){const at=me.get(G.texture);ee.framebufferTexture2D(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_CUBE_MAP_POSITIVE_X+oe,at.__webglTexture,Ae)}else if(We){const at=oe;for(let St=0;St<G.textures.length;St++){const Tt=me.get(G.textures[St]);ee.framebufferTextureLayer(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0+St,Tt.__webglTexture,Ae,at)}}else if(G!==null&&Ae!==0){const at=me.get(G.texture);ee.framebufferTexture2D(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,at.__webglTexture,Ae)}ce=-1},this.readRenderTargetPixels=function(G,oe,Ae,he,ge,We,dt,at=0){if(!(G&&G.isWebGLRenderTarget)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=me.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&dt!==void 0&&(St=St[dt]),St){B.bindFramebuffer(ee.FRAMEBUFFER,St);try{const Tt=G.textures[at],Xt=Tt.format,Ot=Tt.type;if(G.textures.length>1&&ee.readBuffer(ee.COLOR_ATTACHMENT0+at),!Y.textureFormatReadable(Xt)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Y.textureTypeReadable(Ot)){kt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}oe>=0&&oe<=G.width-he&&Ae>=0&&Ae<=G.height-ge&&ee.readPixels(oe,Ae,he,ge,it.convert(Xt),it.convert(Ot),We)}finally{const Tt=ne!==null?me.get(ne).__webglFramebuffer:null;B.bindFramebuffer(ee.FRAMEBUFFER,Tt)}}},this.readRenderTargetPixelsAsync=async function(G,oe,Ae,he,ge,We,dt,at=0){if(!(G&&G.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let St=me.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&dt!==void 0&&(St=St[dt]),St)if(oe>=0&&oe<=G.width-he&&Ae>=0&&Ae<=G.height-ge){B.bindFramebuffer(ee.FRAMEBUFFER,St);const Tt=G.textures[at],Xt=Tt.format,Ot=Tt.type;if(G.textures.length>1&&ee.readBuffer(ee.COLOR_ATTACHMENT0+at),!Y.textureFormatReadable(Xt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Y.textureTypeReadable(Ot))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const vt=ee.createBuffer();ee.bindBuffer(ee.PIXEL_PACK_BUFFER,vt),ee.bufferData(ee.PIXEL_PACK_BUFFER,We.byteLength,ee.STREAM_READ),ee.readPixels(oe,Ae,he,ge,it.convert(Xt),it.convert(Ot),0);const Pn=ne!==null?me.get(ne).__webglFramebuffer:null;B.bindFramebuffer(ee.FRAMEBUFFER,Pn);const dn=ee.fenceSync(ee.SYNC_GPU_COMMANDS_COMPLETE,0);return ee.flush(),await FL(ee,dn,4),ee.bindBuffer(ee.PIXEL_PACK_BUFFER,vt),ee.getBufferSubData(ee.PIXEL_PACK_BUFFER,0,We),ee.deleteBuffer(vt),ee.deleteSync(dn),We}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(G,oe=null,Ae=0){const he=Math.pow(2,-Ae),ge=Math.floor(G.image.width*he),We=Math.floor(G.image.height*he),dt=oe!==null?oe.x:0,at=oe!==null?oe.y:0;Ce.setTexture2D(G,0),ee.copyTexSubImage2D(ee.TEXTURE_2D,Ae,0,0,dt,at,ge,We),B.unbindTexture()},this.copyTextureToTexture=function(G,oe,Ae=null,he=null,ge=0,We=0){let dt,at,St,Tt,Xt,Ot,vt,Pn,dn;const Ht=G.isCompressedTexture?G.mipmaps[We]:G.image;if(Ae!==null)dt=Ae.max.x-Ae.min.x,at=Ae.max.y-Ae.min.y,St=Ae.isBox3?Ae.max.z-Ae.min.z:1,Tt=Ae.min.x,Xt=Ae.min.y,Ot=Ae.isBox3?Ae.min.z:0;else{const zn=Math.pow(2,-ge);dt=Math.floor(Ht.width*zn),at=Math.floor(Ht.height*zn),G.isDataArrayTexture?St=Ht.depth:G.isData3DTexture?St=Math.floor(Ht.depth*zn):St=1,Tt=0,Xt=0,Ot=0}he!==null?(vt=he.x,Pn=he.y,dn=he.z):(vt=0,Pn=0,dn=0);const Tn=it.convert(oe.format),Qn=it.convert(oe.type);let Xe;oe.isData3DTexture?(Ce.setTexture3D(oe,0),Xe=ee.TEXTURE_3D):oe.isDataArrayTexture||oe.isCompressedArrayTexture?(Ce.setTexture2DArray(oe,0),Xe=ee.TEXTURE_2D_ARRAY):(Ce.setTexture2D(oe,0),Xe=ee.TEXTURE_2D),B.activeTexture(ee.TEXTURE0),B.pixelStorei(ee.UNPACK_FLIP_Y_WEBGL,oe.flipY),B.pixelStorei(ee.UNPACK_PREMULTIPLY_ALPHA_WEBGL,oe.premultiplyAlpha),B.pixelStorei(ee.UNPACK_ALIGNMENT,oe.unpackAlignment);const Li=B.getParameter(ee.UNPACK_ROW_LENGTH),Kt=B.getParameter(ee.UNPACK_IMAGE_HEIGHT),Hi=B.getParameter(ee.UNPACK_SKIP_PIXELS),Ii=B.getParameter(ee.UNPACK_SKIP_ROWS),yr=B.getParameter(ee.UNPACK_SKIP_IMAGES);B.pixelStorei(ee.UNPACK_ROW_LENGTH,Ht.width),B.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,Ht.height),B.pixelStorei(ee.UNPACK_SKIP_PIXELS,Tt),B.pixelStorei(ee.UNPACK_SKIP_ROWS,Xt),B.pixelStorei(ee.UNPACK_SKIP_IMAGES,Ot);const Ki=G.isDataArrayTexture||G.isData3DTexture,Gn=oe.isDataArrayTexture||oe.isData3DTexture;if(G.isDepthTexture){const zn=me.get(G),Wr=me.get(oe),Dn=me.get(zn.__renderTarget),jr=me.get(Wr.__renderTarget);B.bindFramebuffer(ee.READ_FRAMEBUFFER,Dn.__webglFramebuffer),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,jr.__webglFramebuffer);for(let gi=0;gi<St;gi++)Ki&&(ee.framebufferTextureLayer(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,me.get(G).__webglTexture,ge,Ot+gi),ee.framebufferTextureLayer(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,me.get(oe).__webglTexture,We,dn+gi)),ee.blitFramebuffer(Tt,Xt,dt,at,vt,Pn,dt,at,ee.DEPTH_BUFFER_BIT,ee.NEAREST);B.bindFramebuffer(ee.READ_FRAMEBUFFER,null),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,null)}else if(ge!==0||G.isRenderTargetTexture||me.has(G)){const zn=me.get(G),Wr=me.get(oe);B.bindFramebuffer(ee.READ_FRAMEBUFFER,le),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,$);for(let Dn=0;Dn<St;Dn++)Ki?ee.framebufferTextureLayer(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,zn.__webglTexture,ge,Ot+Dn):ee.framebufferTexture2D(ee.READ_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,zn.__webglTexture,ge),Gn?ee.framebufferTextureLayer(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,Wr.__webglTexture,We,dn+Dn):ee.framebufferTexture2D(ee.DRAW_FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_2D,Wr.__webglTexture,We),ge!==0?ee.blitFramebuffer(Tt,Xt,dt,at,vt,Pn,dt,at,ee.COLOR_BUFFER_BIT,ee.NEAREST):Gn?ee.copyTexSubImage3D(Xe,We,vt,Pn,dn+Dn,Tt,Xt,dt,at):ee.copyTexSubImage2D(Xe,We,vt,Pn,Tt,Xt,dt,at);B.bindFramebuffer(ee.READ_FRAMEBUFFER,null),B.bindFramebuffer(ee.DRAW_FRAMEBUFFER,null)}else Gn?G.isDataTexture||G.isData3DTexture?ee.texSubImage3D(Xe,We,vt,Pn,dn,dt,at,St,Tn,Qn,Ht.data):oe.isCompressedArrayTexture?ee.compressedTexSubImage3D(Xe,We,vt,Pn,dn,dt,at,St,Tn,Ht.data):ee.texSubImage3D(Xe,We,vt,Pn,dn,dt,at,St,Tn,Qn,Ht):G.isDataTexture?ee.texSubImage2D(ee.TEXTURE_2D,We,vt,Pn,dt,at,Tn,Qn,Ht.data):G.isCompressedTexture?ee.compressedTexSubImage2D(ee.TEXTURE_2D,We,vt,Pn,Ht.width,Ht.height,Tn,Ht.data):ee.texSubImage2D(ee.TEXTURE_2D,We,vt,Pn,dt,at,Tn,Qn,Ht);B.pixelStorei(ee.UNPACK_ROW_LENGTH,Li),B.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,Kt),B.pixelStorei(ee.UNPACK_SKIP_PIXELS,Hi),B.pixelStorei(ee.UNPACK_SKIP_ROWS,Ii),B.pixelStorei(ee.UNPACK_SKIP_IMAGES,yr),We===0&&oe.generateMipmaps&&ee.generateMipmap(Xe),B.unbindTexture()},this.initRenderTarget=function(G){me.get(G).__webglFramebuffer===void 0&&Ce.setupRenderTarget(G)},this.initTexture=function(G){G.isCubeTexture?Ce.setTextureCube(G,0):G.isData3DTexture?Ce.setTexture3D(G,0):G.isDataArrayTexture||G.isCompressedArrayTexture?Ce.setTexture2DArray(G,0):Ce.setTexture2D(G,0),B.unbindTexture()},this.resetState=function(){j=0,Q=0,ne=null,B.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ea}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=wn._getDrawingBufferColorSpace(e),t.unpackColorSpace=wn._getUnpackColorSpace()}}const D4=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:Ex,AddEquation:Vu,AddOperation:w3,AdditiveAnimationBlendMode:y1,AdditiveBlending:kw,AgXToneMapping:u1,AlphaFormat:A1,AlwaysCompare:B3,AlwaysDepth:Db,AlwaysStencilFunc:zw,AmbientLight:DR,AnimationAction:HR,AnimationClip:xv,AnimationLoader:DN,AnimationMixer:az,AnimationObjectGroup:rz,AnimationUtils:CN,ArcCurve:$3,ArrayCamera:UR,ArrowHelper:Pz,AttachedBindMode:Iw,Audio:OR,AudioAnalyser:JN,AudioContext:X1,AudioListener:XN,AudioLoader:HN,AxesHelper:kz,BackSide:Ts,BasicDepthPacking:P3,BasicShadowMap:r3,BatchedMesh:Y3,BezierInterpolant:MR,Bone:E1,BooleanKeyframeTrack:Jf,Box2:jR,Box3:os,Box3Helper:Cz,BoxGeometry:Yf,BoxHelper:Ez,BufferAttribute:si,BufferGeometry:rn,BufferGeometryLoader:zR,ByteType:h1,Cache:Pl,Camera:aS,CameraHelper:Tz,CanvasTexture:qI,CapsuleGeometry:Xx,CatmullRomCurve3:eR,CineonToneMapping:l1,CircleGeometry:qx,ClampToEdgeWrapping:Zs,Clock:WR,Color:ut,ColorKeyframeTrack:V1,ColorManagement:wn,Compatibility:IL,CompressedArrayTexture:jI,CompressedCubeTexture:XI,CompressedTexture:jx,CompressedTextureLoader:LN,ConeGeometry:Rv,ConstantAlphaFactor:x3,ConstantColorFactor:y3,Controls:Lz,CubeCamera:BR,CubeDepthTexture:K3,CubeReflectionMapping:Dl,CubeRefractionMapping:qu,CubeTexture:Ev,CubeTextureLoader:IN,CubeUVReflectionMapping:Bm,CubicBezierCurve:k1,CubicBezierCurve3:tR,CubicInterpolant:xR,CullFaceBack:Pw,CullFaceFront:i3,CullFaceFrontBack:XD,CullFaceNone:n3,Curve:qo,CurvePath:iR,CustomBlending:s3,CustomToneMapping:c1,CylinderGeometry:Cv,Cylindrical:hz,Data3DTexture:Fx,DataArrayTexture:Ux,DataTexture:ao,DataTextureLoader:NN,DataUtils:gI,DecrementStencilOp:uL,DecrementWrapStencilOp:fL,DefaultLoadingManager:TR,DepthFormat:Il,DepthStencilFormat:Gu,DepthTexture:jf,DetachedBindMode:T3,DirectionalLight:kR,DirectionalLightHelper:wz,DiscreteInterpolant:SR,DodecahedronGeometry:Yx,DoubleSide:Cl,DstAlphaFactor:p3,DstColorFactor:g3,DynamicCopyUsage:CL,DynamicDrawUsage:xL,DynamicReadUsage:wL,EdgesGeometry:_3,EllipseCurve:Jx,EqualCompare:I3,EqualDepth:Ib,EqualStencilFunc:gL,EquirectangularReflectionMapping:KA,EquirectangularRefractionMapping:_A,Euler:jo,EventDispatcher:Xo,ExternalTexture:R1,ExtrudeGeometry:Qx,FileLoader:Ic,Float16BufferAttribute:MI,Float32BufferAttribute:wt,FloatType:ws,Fog:Vx,FogExp2:Ox,FramebufferTexture:WI,FrontSide:kc,Frustum:Wf,FrustumArray:Wx,GLBufferAttribute:dz,GLSL1:PL,GLSL3:Bw,GreaterCompare:N3,GreaterDepth:zb,GreaterEqualCompare:Bx,GreaterEqualDepth:Nb,GreaterEqualStencilFunc:bL,GreaterStencilFunc:vL,GridHelper:Sz,Group:Mm,HTMLTexture:YI,HalfFloatType:Ll,HemisphereLight:CR,HemisphereLightHelper:xz,IcosahedronGeometry:Zx,ImageBitmapLoader:VN,ImageLoader:Sv,ImageUtils:V3,IncrementStencilOp:cL,IncrementWrapStencilOp:dL,InstancedBufferAttribute:Dm,InstancedBufferGeometry:NR,InstancedInterleavedBuffer:uz,InstancedMesh:q3,Int16BufferAttribute:xI,Int32BufferAttribute:SI,Int8BufferAttribute:vI,IntType:Rx,InterleavedBuffer:Hx,InterleavedBufferAttribute:Gf,Interpolant:Om,InterpolateBezier:Nw,InterpolateDiscrete:dv,InterpolateLinear:hx,InterpolateSmooth:Sb,InterpolationSamplingMode:LL,InterpolationSamplingType:DL,InvertStencilOp:hL,KeepStencilOp:Df,KeyframeTrack:uo,LOD:j3,LatheGeometry:Kx,Layers:km,LessCompare:L3,LessDepth:Lb,LessEqualCompare:zx,LessEqualDepth:Vf,LessEqualStencilFunc:AL,LessStencilFunc:mL,Light:$u,LightProbe:IR,Line:Qu,Line3:gz,LineBasicMaterial:Cs,LineCurve:D1,LineCurve3:nR,LineDashedMaterial:vR,LineLoop:J3,LineSegments:Nl,LinearFilter:mi,LinearInterpolant:O1,LinearMipMapLinearFilter:ZD,LinearMipMapNearestFilter:QD,LinearMipmapLinearFilter:Rl,LinearMipmapNearestFilter:$A,LinearSRGBColorSpace:Rm,LinearToneMapping:a1,LinearTransfer:hv,Loader:_s,LoaderUtils:Hw,LoadingManager:G1,LoopOnce:E3,LoopPingPong:R3,LoopRepeat:C3,MOUSE:WD,Material:Hr,MaterialBlending:qD,MaterialLoader:oS,MathUtils:nI,Matrix2:J1,Matrix3:_t,Matrix4:Zt,MaxEquation:c3,Mesh:or,MeshBasicMaterial:Ku,MeshDepthMaterial:U1,MeshDistanceMaterial:F1,MeshLambertMaterial:gR,MeshMatcapMaterial:AR,MeshNormalMaterial:mR,MeshPhongMaterial:hR,MeshPhysicalMaterial:fR,MeshStandardMaterial:B1,MeshToonMaterial:pR,MinEquation:l3,MirroredRepeatWrapping:lv,MixOperation:M3,MultiplyBlending:Lw,MultiplyOperation:wv,NearestFilter:Ji,NearestMipMapLinearFilter:JD,NearestMipMapNearestFilter:YD,NearestMipmapLinearFilter:xm,NearestMipmapNearestFilter:f1,NeutralToneMapping:d1,NeverCompare:D3,NeverDepth:kb,NeverStencilFunc:pL,NoBlending:kl,NoColorSpace:Cc,NoNormalPacking:rL,NoToneMapping:so,NormalAnimationBlendMode:Nx,NormalBlending:Uf,NormalGAPacking:aL,NormalRGPacking:sL,NotEqualCompare:z3,NotEqualDepth:Bb,NotEqualStencilFunc:yL,NumberKeyframeTrack:rS,Object3D:Hn,ObjectLoader:FN,ObjectSpaceNormalMap:k3,OctahedronGeometry:kv,OneFactor:d3,OneMinusConstantAlphaFactor:S3,OneMinusConstantColorFactor:b3,OneMinusDstAlphaFactor:m3,OneMinusDstColorFactor:A3,OneMinusSrcAlphaFactor:Pb,OneMinusSrcColorFactor:h3,OrthographicCamera:Vm,PCFShadowMap:wm,PCFSoftShadowMap:ZA,PMREMGenerator:jw,Path:Av,PerspectiveCamera:kr,Plane:Ou,PlaneGeometry:Fm,PlaneHelper:Rz,PointLight:PR,PointLightHelper:yz,Points:Q3,PointsMaterial:C1,PolarGridHelper:Mz,PolyhedronGeometry:_u,PositionalAudio:YN,PropertyBinding:On,PropertyMixer:VR,QuadraticBezierCurve:L1,QuadraticBezierCurve3:I1,Quaternion:Es,QuaternionKeyframeTrack:sS,QuaternionLinearInterpolant:wR,R11_EAC_Format:jb,RED_GREEN_RGTC2_Format:uv,RED_RGTC1_Format:ux,REVISION:Tx,RG11_EAC_Format:cv,RGBADepthPacking:tL,RGBAFormat:as,RGBAIntegerFormat:Ix,RGBA_ASTC_10x10_Format:rx,RGBA_ASTC_10x5_Format:tx,RGBA_ASTC_10x6_Format:nx,RGBA_ASTC_10x8_Format:ix,RGBA_ASTC_12x10_Format:sx,RGBA_ASTC_12x12_Format:ax,RGBA_ASTC_4x4_Format:Yb,RGBA_ASTC_5x4_Format:Jb,RGBA_ASTC_5x5_Format:Qb,RGBA_ASTC_6x5_Format:Zb,RGBA_ASTC_6x6_Format:Kb,RGBA_ASTC_8x5_Format:_b,RGBA_ASTC_8x6_Format:$b,RGBA_ASTC_8x8_Format:ex,RGBA_BPTC_Format:ox,RGBA_ETC2_EAC_Format:Wb,RGBA_PVRTC_2BPPV1_Format:Vb,RGBA_PVRTC_4BPPV1_Format:Ob,RGBA_S3TC_DXT1_Format:tv,RGBA_S3TC_DXT3_Format:nv,RGBA_S3TC_DXT5_Format:iv,RGBDepthPacking:nL,RGBFormat:v1,RGBIntegerFormat:KD,RGB_BPTC_SIGNED_Format:lx,RGB_BPTC_UNSIGNED_Format:cx,RGB_ETC1_Format:Hb,RGB_ETC2_Format:Gb,RGB_PVRTC_2BPPV1_Format:Fb,RGB_PVRTC_4BPPV1_Format:Ub,RGB_S3TC_DXT1_Format:ev,RGDepthPacking:iL,RGFormat:Yu,RGIntegerFormat:Lx,RawShaderMaterial:z1,Ray:Um,Raycaster:GR,RectAreaLight:LR,RedFormat:Dx,RedIntegerFormat:Tv,ReinhardToneMapping:o1,RenderTarget:x1,RenderTarget3D:oz,RepeatWrapping:Dc,ReplaceStencilOp:lL,ReverseSubtractEquation:o3,RingGeometry:_x,SIGNED_R11_EAC_Format:Xb,SIGNED_RED_GREEN_RGTC2_Format:fx,SIGNED_RED_RGTC1_Format:dx,SIGNED_RG11_EAC_Format:qb,SRGBColorSpace:ss,SRGBTransfer:_n,Scene:S1,ShaderChunk:mn,ShaderLib:Go,ShaderMaterial:Pa,ShadowMaterial:cR,Shape:Pv,ShapeGeometry:$x,ShapePath:Dz,ShapeUtils:Wo,ShortType:p1,Skeleton:Gx,SkeletonHelper:vz,SkinnedMesh:X3,Source:Wu,Sphere:Vr,SphereGeometry:Dv,Spherical:fz,SphericalHarmonics3:j1,SplineCurve:N1,SpotLight:RR,SpotLightHelper:Az,Sprite:W3,SpriteMaterial:T1,SrcAlphaFactor:Rb,SrcAlphaSaturateFactor:v3,SrcColorFactor:f3,StaticCopyUsage:EL,StaticDrawUsage:pv,StaticReadUsage:ML,StereoCamera:GN,StreamCopyUsage:RL,StreamDrawUsage:SL,StreamReadUsage:TL,StringKeyframeTrack:Qf,SubtractEquation:a3,SubtractiveBlending:Dw,TOUCH:jD,TangentSpaceNormalMap:Lc,TetrahedronGeometry:eS,Texture:Di,TextureLoader:ER,TextureUtils:Uz,Timer:FR,TimestampQuery:kL,TorusGeometry:tS,TorusKnotGeometry:nS,Triangle:Qs,TriangleFanDrawMode:eL,TriangleStripDrawMode:$D,TrianglesDrawMode:_D,TubeGeometry:iS,UVMapping:Cx,Uint16BufferAttribute:M1,Uint32BufferAttribute:w1,Uint8BufferAttribute:yI,Uint8ClampedBufferAttribute:bI,Uniform:Ta,UniformsGroup:cz,UniformsLib:ht,UniformsUtils:dR,UnsignedByteType:Ss,UnsignedInt101111Type:g1,UnsignedInt248Type:Cm,UnsignedInt5999Type:m1,UnsignedIntType:oo,UnsignedShort4444Type:Px,UnsignedShort5551Type:kx,UnsignedShortType:Em,VSMShadowMap:If,Vector2:Oe,Vector3:J,Vector4:ni,VectorKeyframeTrack:H1,VideoFrameTexture:GI,VideoTexture:Z3,WebGL3DRenderTarget:oI,WebGLArrayRenderTarget:aI,WebGLCoordinateSystem:Ea,WebGLCubeRenderTarget:Q1,WebGLRenderTarget:Ra,WebGLRenderer:eP,WebGLUtils:_R,WebGPUCoordinateSystem:Hf,WebXRController:Mb,WireframeGeometry:lR,WrapAroundEnding:fv,ZeroCurvatureEnding:Nf,ZeroFactor:u3,ZeroSlopeEnding:zf,ZeroStencilOp:oL,createCanvasElement:F3,error:kt,getConsoleFunction:UL,log:gv,setConsoleFunction:BL,warn:ot,warnOnce:Xu},Symbol.toStringTag,{value:"Module"}));var Ab={exports:{}},fw={},vb={exports:{}},hw={};/**
|
|
4222
4222
|
* @license React
|
|
4223
4223
|
* use-sync-external-store-shim.production.js
|
|
4224
4224
|
*
|
|
@@ -4258,7 +4258,7 @@ void main() {
|
|
|
4258
4258
|
*
|
|
4259
4259
|
* This source code is licensed under the MIT license found in the
|
|
4260
4260
|
* LICENSE file in the root directory of this source tree.
|
|
4261
|
-
*/var L2;function j4(){return L2||(L2=1,(function(s){function e(j,Q){var ne=j.length;j.push(Q);e:for(;0<ne;){var ce=ne-1>>>1,ye=j[ce];if(0<a(ye,Q))j[ce]=Q,j[ne]=ye,ne=ce;else break e}}function t(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var Q=j[0],ne=j.pop();if(ne!==Q){j[0]=ne;e:for(var ce=0,ye=j.length,Te=ye>>>1;ce<Te;){var Fe=2*(ce+1)-1,
|
|
4261
|
+
*/var L2;function j4(){return L2||(L2=1,(function(s){function e(j,Q){var ne=j.length;j.push(Q);e:for(;0<ne;){var ce=ne-1>>>1,ye=j[ce];if(0<a(ye,Q))j[ce]=Q,j[ne]=ye,ne=ce;else break e}}function t(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var Q=j[0],ne=j.pop();if(ne!==Q){j[0]=ne;e:for(var ce=0,ye=j.length,Te=ye>>>1;ce<Te;){var Fe=2*(ce+1)-1,ft=j[Fe],lt=Fe+1,ct=j[lt];if(0>a(ft,ne))lt<ye&&0>a(ct,ft)?(j[ce]=ct,j[lt]=ne,ce=lt):(j[ce]=ft,j[Fe]=ne,ce=Fe);else if(lt<ye&&0>a(ct,ne))j[ce]=ct,j[lt]=ne,ce=lt;else break e}}return Q}function a(j,Q){var ne=j.sortIndex-Q.sortIndex;return ne!==0?ne:j.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;s.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();s.unstable_now=function(){return d.now()-f}}var m=[],g=[],v=1,M=null,x=3,S=!1,w=!1,k=!1,C=!1,T=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function L(j){for(var Q=t(g);Q!==null;){if(Q.callback===null)i(g);else if(Q.startTime<=j)i(g),Q.sortIndex=Q.expirationTime,e(m,Q);else break;Q=t(g)}}function O(j){if(k=!1,L(j),!w)if(t(m)!==null)w=!0,U||(U=!0,_());else{var Q=t(g);Q!==null&&$(O,Q.startTime-j)}}var U=!1,H=-1,I=5,F=-1;function V(){return C?!0:!(s.unstable_now()-F<I)}function X(){if(C=!1,U){var j=s.unstable_now();F=j;var Q=!0;try{e:{w=!1,k&&(k=!1,D(H),H=-1),S=!0;var ne=x;try{t:{for(L(j),M=t(m);M!==null&&!(M.expirationTime>j&&V());){var ce=M.callback;if(typeof ce=="function"){M.callback=null,x=M.priorityLevel;var ye=ce(M.expirationTime<=j);if(j=s.unstable_now(),typeof ye=="function"){M.callback=ye,L(j),Q=!0;break t}M===t(m)&&i(m),L(j)}else i(m);M=t(m)}if(M!==null)Q=!0;else{var Te=t(g);Te!==null&&$(O,Te.startTime-j),Q=!1}}break e}finally{M=null,x=ne,S=!1}Q=void 0}}finally{Q?_():U=!1}}}var _;if(typeof z=="function")_=function(){z(X)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,le=K.port2;K.port1.onmessage=X,_=function(){le.postMessage(null)}}else _=function(){T(X,0)};function $(j,Q){H=T(function(){j(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(j){j.callback=null},s.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},s.unstable_getCurrentPriorityLevel=function(){return x},s.unstable_next=function(j){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var ne=x;x=Q;try{return j()}finally{x=ne}},s.unstable_requestPaint=function(){C=!0},s.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ne=x;x=j;try{return Q()}finally{x=ne}},s.unstable_scheduleCallback=function(j,Q,ne){var ce=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ce+ne:ce):ne=ce,j){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ne+ye,j={id:v++,callback:Q,priorityLevel:j,startTime:ne,expirationTime:ye,sortIndex:-1},ne>ce?(j.sortIndex=ne,e(g,j),t(m)===null&&j===t(g)&&(k?(D(H),H=-1):k=!0,$(O,ne-ce))):(j.sortIndex=ye,e(m,j),w||S||(w=!0,U||(U=!0,_()))),j},s.unstable_shouldYield=V,s.unstable_wrapCallback=function(j){var Q=x;return function(){var ne=x;x=Q;try{return j.apply(this,arguments)}finally{x=ne}}}})(gw)),gw}var Aw={};/**
|
|
4262
4262
|
* @license React
|
|
4263
4263
|
* scheduler.development.js
|
|
4264
4264
|
*
|
|
@@ -4266,7 +4266,7 @@ void main() {
|
|
|
4266
4266
|
*
|
|
4267
4267
|
* This source code is licensed under the MIT license found in the
|
|
4268
4268
|
* LICENSE file in the root directory of this source tree.
|
|
4269
|
-
*/var I2;function X4(){return I2||(I2=1,(function(s){process.env.NODE_ENV!=="production"&&(function(){function e(){if(O=!1,F){var j=s.unstable_now();_=j;var Q=!0;try{e:{z=!1,L&&(L=!1,H(V),V=-1),D=!0;var ne=T;try{t:{for(d(j),C=i(S);C!==null&&!(C.expirationTime>j&&m());){var ce=C.callback;if(typeof ce=="function"){C.callback=null,T=C.priorityLevel;var ye=ce(C.expirationTime<=j);if(j=s.unstable_now(),typeof ye=="function"){C.callback=ye,d(j),Q=!0;break t}C===i(S)&&a(S),d(j)}else a(S);C=i(S)}if(C!==null)Q=!0;else{var Te=i(w);Te!==null&&g(f,Te.startTime-j),Q=!1}}break e}finally{C=null,T=ne,D=!1}Q=void 0}}finally{Q?K():F=!1}}}function t(j,Q){var ne=j.length;j.push(Q);e:for(;0<ne;){var ce=ne-1>>>1,ye=j[ce];if(0<c(ye,Q))j[ce]=Q,j[ne]=ye,ne=ce;else break e}}function i(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var Q=j[0],ne=j.pop();if(ne!==Q){j[0]=ne;e:for(var ce=0,ye=j.length,Te=ye>>>1;ce<Te;){var Fe=2*(ce+1)-1,lt=j[Fe],ht=Fe+1,ct=j[ht];if(0>c(lt,ne))ht<ye&&0>c(ct,lt)?(j[ce]=ct,j[ht]=ne,ce=ht):(j[ce]=lt,j[Fe]=ne,ce=Fe);else if(ht<ye&&0>c(ct,ne))j[ce]=ct,j[ht]=ne,ce=ht;else break e}}return Q}function c(j,Q){var ne=j.sortIndex-Q.sortIndex;return ne!==0?ne:j.id-Q.id}function d(j){for(var Q=i(w);Q!==null;){if(Q.callback===null)a(w);else if(Q.startTime<=j)a(w),Q.sortIndex=Q.expirationTime,t(S,Q);else break;Q=i(w)}}function f(j){if(L=!1,d(j),!z)if(i(S)!==null)z=!0,F||(F=!0,K());else{var Q=i(w);Q!==null&&g(f,Q.startTime-j)}}function m(){return O?!0:!(s.unstable_now()-_<X)}function g(j,Q){V=U(function(){j(s.unstable_now())},Q)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;s.unstable_now=function(){return v.now()}}else{var M=Date,x=M.now();s.unstable_now=function(){return M.now()-x}}var S=[],w=[],k=1,C=null,T=3,D=!1,z=!1,L=!1,O=!1,U=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,F=!1,V=-1,X=5,_=-1;if(typeof I=="function")var K=function(){I(e)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,$=le.port2;le.port1.onmessage=e,K=function(){$.postMessage(null)}}else K=function(){U(e,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(j){j.callback=null},s.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<j?Math.floor(1e3/j):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(j){switch(T){case 1:case 2:case 3:var Q=3;break;default:Q=T}var ne=T;T=Q;try{return j()}finally{T=ne}},s.unstable_requestPaint=function(){O=!0},s.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ne=T;T=j;try{return Q()}finally{T=ne}},s.unstable_scheduleCallback=function(j,Q,ne){var ce=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ce+ne:ce):ne=ce,j){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ne+ye,j={id:k++,callback:Q,priorityLevel:j,startTime:ne,expirationTime:ye,sortIndex:-1},ne>ce?(j.sortIndex=ne,t(w,j),i(S)===null&&j===i(w)&&(L?(H(V),V=-1):L=!0,g(f,ne-ce))):(j.sortIndex=ye,t(S,j),z||D||(z=!0,F||(F=!0,K()))),j},s.unstable_shouldYield=m,s.unstable_wrapCallback=function(j){var Q=T;return function(){var ne=T;T=Q;try{return j.apply(this,arguments)}finally{T=ne}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Aw)),Aw}var N2;function q4(){return N2||(N2=1,process.env.NODE_ENV==="production"?yb.exports=j4():yb.exports=X4()),yb.exports}var Yw=q4();const nP=K2(Yw);function Z1(s,e,t){if(!s)return;if(t(s)===!0)return s;let i=e?s.return:s.child;for(;i;){const a=Z1(i,e,t);if(a)return a;i=e?null:i.sibling}}function iP(s){try{return Object.defineProperties(s,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return s}}const K1=iP(Vn.createContext(null));class rP extends Vn.Component{render(){return Vn.createElement(K1.Provider,{value:this._reactInternals},this.props.children)}}function sP(){const s=Vn.useContext(K1);if(s===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=Vn.useId();return Vn.useMemo(()=>{for(const t of[s,s?.alternate]){if(!t)continue;const i=Z1(t,!1,a=>{let c=a.memoizedState;for(;c;){if(c.memoizedState===e)return!0;c=c.next}});if(i)return i}},[s,e])}const Y4=Symbol.for("react.context"),J4=s=>s!==null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===Y4;function Q4(){const s=sP(),[e]=Vn.useState(()=>new Map);e.clear();let t=s;for(;t;){const i=t.type;J4(i)&&i!==K1&&!e.has(i)&&e.set(i,Vn.use(iP(i))),t=t.return}return e}function Z4(){const s=Q4();return Vn.useMemo(()=>Array.from(s.keys()).reduce((e,t)=>i=>Vn.createElement(e,null,Vn.createElement(t.Provider,{...i,value:s.get(t)})),e=>Vn.createElement(rP,{...e})),[s])}function _1(s){let e=s.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const aP=s=>s&&s.isOrthographicCamera,K4=s=>s&&s.hasOwnProperty("current"),_4=s=>s!=null&&(typeof s=="string"||typeof s=="number"||s.isColor),Lv=((s,e)=>typeof window<"u"&&(((s=window.document)==null?void 0:s.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?Vn.useLayoutEffect:Vn.useEffect;function oP(s){const e=Vn.useRef(s);return Lv(()=>void(e.current=s),[s]),e}function $4(){const s=sP(),e=Z4();return Vn.useMemo(()=>({children:t})=>{const a=!!Z1(s,!0,c=>c.type===Vn.StrictMode)?Vn.StrictMode:Vn.Fragment;return Z.jsx(a,{children:Z.jsx(e,{children:t})})},[s,e])}function eV({set:s}){return Lv(()=>(s(new Promise(()=>null)),()=>s(!1)),[s]),null}const tV=(s=>(s=class extends Vn.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}},s.getDerivedStateFromError=()=>({error:!0}),s))();function lP(s){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(s)?Math.min(Math.max(s[0],t),s[1]):s}function vm(s){var e;return(e=s.__r3f)==null?void 0:e.root.getState()}const pi={obj:s=>s===Object(s)&&!pi.arr(s)&&typeof s!="function",fun:s=>typeof s=="function",str:s=>typeof s=="string",num:s=>typeof s=="number",boo:s=>typeof s=="boolean",und:s=>s===void 0,nul:s=>s===null,arr:s=>Array.isArray(s),equ(s,e,{arrays:t="shallow",objects:i="reference",strict:a=!0}={}){if(typeof s!=typeof e||!!s!=!!e)return!1;if(pi.str(s)||pi.num(s)||pi.boo(s))return s===e;const c=pi.obj(s);if(c&&i==="reference")return s===e;const d=pi.arr(s);if(d&&t==="reference")return s===e;if((d||c)&&s===e)return!0;let f;for(f in s)if(!(f in e))return!1;if(c&&t==="shallow"&&i==="shallow"){for(f in a?e:s)if(!pi.equ(s[f],e[f],{strict:a,objects:"reference"}))return!1}else for(f in a?e:s)if(s[f]!==e[f])return!1;if(pi.und(f)){if(d&&s.length===0&&e.length===0||c&&Object.keys(s).length===0&&Object.keys(e).length===0)return!0;if(s!==e)return!1}return!0}};function nV(s){s.type!=="Scene"&&(s.dispose==null||s.dispose());for(const e in s){const t=s[e];t?.type!=="Scene"&&(t==null||t.dispose==null||t.dispose())}}const cP=["children","key","ref"];function iV(s){const e={};for(const t in s)cP.includes(t)||(e[t]=s[t]);return e}function Ax(s,e,t,i){const a=s;let c=a?.__r3f;return c||(c={root:e,type:t,parent:null,children:[],props:iV(i),object:a,eventCount:0,handlers:{},isHidden:!1},a&&(a.__r3f=c)),c}function Mv(s,e){if(!e.includes("-"))return{root:s,key:e,target:s[e]};if(e in s)return{root:s,key:e,target:s[e]};let t=s;const i=e.split("-");for(const a of i){if(typeof t!="object"||t===null){if(t!==void 0){const c=i.slice(i.indexOf(a)).join("-");return{root:t,key:c,target:void 0}}return{root:s,key:e,target:void 0}}e=a,s=t,t=t[e]}return{root:s,key:e,target:t}}const z2=/-\d+$/;function vx(s,e){if(pi.str(e.props.attach)){if(z2.test(e.props.attach)){const a=e.props.attach.replace(z2,""),{root:c,key:d}=Mv(s.object,a);Array.isArray(c[d])||(c[d]=[])}const{root:t,key:i}=Mv(s.object,e.props.attach);e.previousAttach=t[i],t[i]=e.object}else pi.fun(e.props.attach)&&(e.previousAttach=e.props.attach(s.object,e.object))}function yx(s,e){if(pi.str(e.props.attach)){const{root:t,key:i}=Mv(s.object,e.props.attach),a=e.previousAttach;a===void 0?delete t[i]:t[i]=a}else e.previousAttach==null||e.previousAttach(s.object,e.object);delete e.previousAttach}const Jw=[...cP,"args","dispose","attach","object","onUpdate","dispose"],B2=new Map;function rV(s){let e=B2.get(s.constructor);try{e||(e=new s.constructor,B2.set(s.constructor,e))}catch{}return e}function sV(s,e){const t={};for(const i in e)if(!Jw.includes(i)&&!pi.equ(e[i],s.props[i])){t[i]=e[i];for(const a in e)a.startsWith(`${i}-`)&&(t[a]=e[a])}for(const i in s.props){if(Jw.includes(i)||e.hasOwnProperty(i))continue;const{root:a,key:c}=Mv(s.object,i);if(a.constructor&&a.constructor.length===0){const d=rV(a);pi.und(d)||(t[c]=d[c])}else t[c]=0}return t}const aV=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],oV=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Hu(s,e){var t;const i=s.__r3f,a=i&&_1(i).getState(),c=i?.eventCount;for(const f in e){let m=e[f];if(Jw.includes(f))continue;if(i&&oV.test(f)){typeof m=="function"?i.handlers[f]=m:delete i.handlers[f],i.eventCount=Object.keys(i.handlers).length;continue}if(m===void 0)continue;let{root:g,key:v,target:M}=Mv(s,f);if(M===void 0&&(typeof g!="object"||g===null))throw Error(`R3F: Cannot set "${f}". Ensure it is an object before setting "${v}".`);if(M instanceof km&&m instanceof km)M.mask=m.mask;else if(M instanceof ut&&_4(m))M.set(m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&typeof M.copy=="function"&&m!=null&&m.constructor&&M.constructor===m.constructor)M.copy(m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&Array.isArray(m))typeof M.fromArray=="function"?M.fromArray(m):M.set(...m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&typeof m=="number")typeof M.setScalar=="function"?M.setScalar(m):M.set(m);else if(g instanceof Pa&&v==="uniforms"&&pi.obj(m)){pi.obj(g.uniforms)||(g.uniforms={});const x=g.uniforms,S=m;for(const w in S){const k=S[w],C=x[w];C?Object.assign(C,k):x[w]={...k}}}else{var d;g[v]=m,a&&!a.linear&&aV.includes(v)&&(d=g[v])!=null&&d.isTexture&&g[v].format===as&&g[v].type===Ss&&(g[v].colorSpace=ss)}}if(i!=null&&i.parent&&a!=null&&a.internal&&(t=i.object)!=null&&t.isObject3D&&c!==i.eventCount){const f=i.object,m=a.internal.interaction.indexOf(f);m>-1&&a.internal.interaction.splice(m,1),i.eventCount&&f.raycast!==null&&a.internal.interaction.push(f)}return i&&i.props.attach===void 0&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&Gm(i),s}function Gm(s){var e;if(!s.parent)return;s.props.onUpdate==null||s.props.onUpdate(s.object);const t=(e=s.root)==null||e.getState==null?void 0:e.getState();t&&t.internal.frames===0&&t.invalidate()}function lV(s,e){s.manual||(aP(s)?(s.left=e.width/-2,s.right=e.width/2,s.top=e.height/2,s.bottom=e.height/-2):s.aspect=e.width/e.height,s.updateProjectionMatrix())}const Js=s=>s?.isObject3D;function JA(s){return(s.eventObject||s.object).uuid+"/"+s.index+s.instanceId}function uP(s,e,t,i){const a=t.get(e);a&&(t.delete(e),t.size===0&&(s.delete(i),a.target.releasePointerCapture(i)))}function cV(s,e,t){const{internal:i}=s.getState();for(let a=0;a<i.interaction.length;a++)i.interaction[a]===e&&(i.interaction[a]=t);for(let a=0;a<i.initialHits.length;a++)i.initialHits[a]===e&&(i.initialHits[a]=t);i.hovered.forEach((a,c)=>{if(a.eventObject===e||a.object===e){i.hovered.delete(c);const d={...a,eventObject:a.eventObject===e?t:a.eventObject,object:a.object===e?t:a.object};i.hovered.set(JA(d),d)}}),i.capturedMap.forEach(a=>{const c=a.get(e);c&&(a.delete(e),a.set(t,c))})}function uV(s,e){const{internal:t}=s.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,a)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(a)}),t.capturedMap.forEach((i,a)=>{uP(t.capturedMap,e,i,a)})}function dV(s){function e(m){const{internal:g}=s.getState(),v=m.offsetX-g.initialClick[0],M=m.offsetY-g.initialClick[1];return Math.round(Math.sqrt(v*v+M*M))}function t(m){return m.filter(g=>["Move","Over","Enter","Out","Leave"].some(v=>{var M;return(M=g.__r3f)==null?void 0:M.handlers["onPointer"+v]}))}function i(m,g){const v=s.getState(),M=new Set,x=[],S=g?g(v.internal.interaction):v.internal.interaction;for(let T=0;T<S.length;T++){const D=vm(S[T]);D&&(D.raycaster.camera=void 0)}v.previousRoot||v.events.compute==null||v.events.compute(m,v);function w(T){const D=vm(T);if(!D||!D.events.enabled||D.raycaster.camera===null)return[];if(D.raycaster.camera===void 0){var z;D.events.compute==null||D.events.compute(m,D,(z=D.previousRoot)==null?void 0:z.getState()),D.raycaster.camera===void 0&&(D.raycaster.camera=null)}return D.raycaster.camera?D.raycaster.intersectObject(T,!0):[]}let k=S.flatMap(w).sort((T,D)=>{const z=vm(T.object),L=vm(D.object);return!z||!L?T.distance-D.distance:L.events.priority-z.events.priority||T.distance-D.distance}).filter(T=>{const D=JA(T);return M.has(D)?!1:(M.add(D),!0)});v.events.filter&&(k=v.events.filter(k,v));for(const T of k){let D=T.object;for(;D;){var C;(C=D.__r3f)!=null&&C.eventCount&&x.push({...T,eventObject:D}),D=D.parent}}if("pointerId"in m&&v.internal.capturedMap.has(m.pointerId))for(let T of v.internal.capturedMap.get(m.pointerId).values())M.has(JA(T.intersection))||x.push(T.intersection);return x}function a(m,g,v,M){if(m.length){const x={stopped:!1};for(const S of m){let w=vm(S.object);if(w||S.object.traverseAncestors(k=>{const C=vm(k);if(C)return w=C,!1}),w){const{raycaster:k,pointer:C,camera:T,internal:D}=w,z=new J(C.x,C.y,0).unproject(T),L=F=>{var V,X;return(V=(X=D.capturedMap.get(F))==null?void 0:X.has(S.eventObject))!=null?V:!1},O=F=>{const V={intersection:S,target:g.target};D.capturedMap.has(F)?D.capturedMap.get(F).set(S.eventObject,V):D.capturedMap.set(F,new Map([[S.eventObject,V]])),g.target.setPointerCapture(F)},U=F=>{const V=D.capturedMap.get(F);V&&uP(D.capturedMap,S.eventObject,V,F)};let H={};for(let F in g){let V=g[F];typeof V!="function"&&(H[F]=V)}let I={...S,...H,pointer:C,intersections:m,stopped:x.stopped,delta:v,unprojectedPoint:z,ray:k.ray,camera:T,stopPropagation(){const F="pointerId"in g&&D.capturedMap.get(g.pointerId);if((!F||F.has(S.eventObject))&&(I.stopped=x.stopped=!0,D.hovered.size&&Array.from(D.hovered.values()).find(V=>V.eventObject===S.eventObject))){const V=m.slice(0,m.indexOf(S));c([...V,S])}},target:{hasPointerCapture:L,setPointerCapture:O,releasePointerCapture:U},currentTarget:{hasPointerCapture:L,setPointerCapture:O,releasePointerCapture:U},nativeEvent:g};if(M(I),x.stopped===!0)break}}}return m}function c(m){const{internal:g}=s.getState();for(const v of g.hovered.values())if(!m.length||!m.find(M=>M.object===v.object&&M.index===v.index&&M.instanceId===v.instanceId)){const x=v.eventObject.__r3f;if(g.hovered.delete(JA(v)),x!=null&&x.eventCount){const S=x.handlers,w={...v,intersections:m};S.onPointerOut==null||S.onPointerOut(w),S.onPointerLeave==null||S.onPointerLeave(w)}}}function d(m,g){for(let v=0;v<g.length;v++){const M=g[v].__r3f;M==null||M.handlers.onPointerMissed==null||M.handlers.onPointerMissed(m)}}function f(m){switch(m){case"onPointerLeave":case"onPointerCancel":return()=>c([]);case"onLostPointerCapture":return g=>{const{internal:v}=s.getState();"pointerId"in g&&v.capturedMap.has(g.pointerId)&&requestAnimationFrame(()=>{v.capturedMap.has(g.pointerId)&&(v.capturedMap.delete(g.pointerId),c([]))})}}return function(v){const{onPointerMissed:M,internal:x}=s.getState();x.lastEvent.current=v;const S=m==="onPointerMove",w=m==="onClick"||m==="onContextMenu"||m==="onDoubleClick",C=i(v,S?t:void 0),T=w?e(v):0;m==="onPointerDown"&&(x.initialClick=[v.offsetX,v.offsetY],x.initialHits=C.map(z=>z.eventObject)),w&&!C.length&&T<=2&&(d(v,x.interaction),M&&M(v)),S&&c(C);function D(z){const L=z.eventObject,O=L.__r3f;if(!(O!=null&&O.eventCount))return;const U=O.handlers;if(S){if(U.onPointerOver||U.onPointerEnter||U.onPointerOut||U.onPointerLeave){const H=JA(z),I=x.hovered.get(H);I?I.stopped&&z.stopPropagation():(x.hovered.set(H,z),U.onPointerOver==null||U.onPointerOver(z),U.onPointerEnter==null||U.onPointerEnter(z))}U.onPointerMove==null||U.onPointerMove(z)}else{const H=U[m];H?(!w||x.initialHits.includes(L))&&(d(v,x.interaction.filter(I=>!x.initialHits.includes(I))),H(z)):w&&x.initialHits.includes(L)&&d(v,x.interaction.filter(I=>!x.initialHits.includes(I)))}}a(C,v,T,D)}}return{handlePointer:f}}const U2=s=>!!(s!=null&&s.render),dP=Vn.createContext(null),fV=(s,e)=>{const t=W4((f,m)=>{const g=new J,v=new J,M=new J;function x(T=m().camera,D=v,z=m().size){const{width:L,height:O,top:U,left:H}=z,I=L/O;D.isVector3?M.copy(D):M.set(...D);const F=T.getWorldPosition(g).distanceTo(M);if(aP(T))return{width:L/T.zoom,height:O/T.zoom,top:U,left:H,factor:1,distance:F,aspect:I};{const V=T.fov*Math.PI/180,X=2*Math.tan(V/2)*F,_=X*(L/O);return{width:_,height:X,top:U,left:H,factor:L/_,distance:F,aspect:I}}}let S;const w=T=>f(D=>({performance:{...D.performance,current:T}})),k=new Oe;return{set:f,get:m,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(T=1)=>s(m(),T),advance:(T,D)=>e(T,D,m()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new WR,pointer:k,mouse:k,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const T=m();S&&clearTimeout(S),T.performance.current!==T.performance.min&&w(T.performance.min),S=setTimeout(()=>w(m().performance.max),T.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:x},setEvents:T=>f(D=>({...D,events:{...D.events,...T}})),setSize:(T,D,z=0,L=0)=>{const O=m().camera,U={width:T,height:D,top:z,left:L};f(H=>({size:U,viewport:{...H.viewport,...x(O,v,U)}}))},setDpr:T=>f(D=>{const z=lP(T);return{viewport:{...D.viewport,dpr:z,initialDpr:D.viewport.initialDpr||z}}}),setFrameloop:(T="always")=>{const D=m().clock;D.stop(),D.elapsedTime=0,T!=="never"&&(D.start(),D.elapsedTime=0),f(()=>({frameloop:T}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:Vn.createRef(),active:!1,frames:0,priority:0,subscribe:(T,D,z)=>{const L=m().internal;return L.priority=L.priority+(D>0?1:0),L.subscribers.push({ref:T,priority:D,store:z}),L.subscribers=L.subscribers.sort((O,U)=>O.priority-U.priority),()=>{const O=m().internal;O!=null&&O.subscribers&&(O.priority=O.priority-(D>0?1:0),O.subscribers=O.subscribers.filter(U=>U.ref!==T))}}}}}),i=t.getState();let a=i.size,c=i.viewport.dpr,d=i.camera;return t.subscribe(()=>{const{camera:f,size:m,viewport:g,gl:v,set:M}=t.getState();if(m.width!==a.width||m.height!==a.height||g.dpr!==c){a=m,c=g.dpr,lV(f,m),g.dpr>0&&v.setPixelRatio(g.dpr);const x=typeof HTMLCanvasElement<"u"&&v.domElement instanceof HTMLCanvasElement;v.setSize(m.width,m.height,x)}f!==d&&(d=f,M(x=>({viewport:{...x.viewport,...x.viewport.getCurrentViewport(f)}})))}),t.subscribe(f=>s(f)),t};function fP(){const s=Vn.useContext(dP);if(!s)throw new Error("R3F: Hooks can only be used within the Canvas component!");return s}function hV(s=t=>t,e){return fP()(s,e)}function pV(s,e=0){const t=fP(),i=t.getState().internal.subscribe,a=oP(s);return Lv(()=>i(a,e,t),[e,i,t]),null}/**
|
|
4269
|
+
*/var I2;function X4(){return I2||(I2=1,(function(s){process.env.NODE_ENV!=="production"&&(function(){function e(){if(O=!1,F){var j=s.unstable_now();_=j;var Q=!0;try{e:{z=!1,L&&(L=!1,H(V),V=-1),D=!0;var ne=T;try{t:{for(d(j),C=i(S);C!==null&&!(C.expirationTime>j&&m());){var ce=C.callback;if(typeof ce=="function"){C.callback=null,T=C.priorityLevel;var ye=ce(C.expirationTime<=j);if(j=s.unstable_now(),typeof ye=="function"){C.callback=ye,d(j),Q=!0;break t}C===i(S)&&a(S),d(j)}else a(S);C=i(S)}if(C!==null)Q=!0;else{var Te=i(w);Te!==null&&g(f,Te.startTime-j),Q=!1}}break e}finally{C=null,T=ne,D=!1}Q=void 0}}finally{Q?K():F=!1}}}function t(j,Q){var ne=j.length;j.push(Q);e:for(;0<ne;){var ce=ne-1>>>1,ye=j[ce];if(0<c(ye,Q))j[ce]=Q,j[ne]=ye,ne=ce;else break e}}function i(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var Q=j[0],ne=j.pop();if(ne!==Q){j[0]=ne;e:for(var ce=0,ye=j.length,Te=ye>>>1;ce<Te;){var Fe=2*(ce+1)-1,ft=j[Fe],lt=Fe+1,ct=j[lt];if(0>c(ft,ne))lt<ye&&0>c(ct,ft)?(j[ce]=ct,j[lt]=ne,ce=lt):(j[ce]=ft,j[Fe]=ne,ce=Fe);else if(lt<ye&&0>c(ct,ne))j[ce]=ct,j[lt]=ne,ce=lt;else break e}}return Q}function c(j,Q){var ne=j.sortIndex-Q.sortIndex;return ne!==0?ne:j.id-Q.id}function d(j){for(var Q=i(w);Q!==null;){if(Q.callback===null)a(w);else if(Q.startTime<=j)a(w),Q.sortIndex=Q.expirationTime,t(S,Q);else break;Q=i(w)}}function f(j){if(L=!1,d(j),!z)if(i(S)!==null)z=!0,F||(F=!0,K());else{var Q=i(w);Q!==null&&g(f,Q.startTime-j)}}function m(){return O?!0:!(s.unstable_now()-_<X)}function g(j,Q){V=U(function(){j(s.unstable_now())},Q)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;s.unstable_now=function(){return v.now()}}else{var M=Date,x=M.now();s.unstable_now=function(){return M.now()-x}}var S=[],w=[],k=1,C=null,T=3,D=!1,z=!1,L=!1,O=!1,U=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,F=!1,V=-1,X=5,_=-1;if(typeof I=="function")var K=function(){I(e)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,$=le.port2;le.port1.onmessage=e,K=function(){$.postMessage(null)}}else K=function(){U(e,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(j){j.callback=null},s.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<j?Math.floor(1e3/j):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(j){switch(T){case 1:case 2:case 3:var Q=3;break;default:Q=T}var ne=T;T=Q;try{return j()}finally{T=ne}},s.unstable_requestPaint=function(){O=!0},s.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ne=T;T=j;try{return Q()}finally{T=ne}},s.unstable_scheduleCallback=function(j,Q,ne){var ce=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ce+ne:ce):ne=ce,j){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ne+ye,j={id:k++,callback:Q,priorityLevel:j,startTime:ne,expirationTime:ye,sortIndex:-1},ne>ce?(j.sortIndex=ne,t(w,j),i(S)===null&&j===i(w)&&(L?(H(V),V=-1):L=!0,g(f,ne-ce))):(j.sortIndex=ye,t(S,j),z||D||(z=!0,F||(F=!0,K()))),j},s.unstable_shouldYield=m,s.unstable_wrapCallback=function(j){var Q=T;return function(){var ne=T;T=Q;try{return j.apply(this,arguments)}finally{T=ne}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Aw)),Aw}var N2;function q4(){return N2||(N2=1,process.env.NODE_ENV==="production"?yb.exports=j4():yb.exports=X4()),yb.exports}var Yw=q4();const nP=K2(Yw);function Z1(s,e,t){if(!s)return;if(t(s)===!0)return s;let i=e?s.return:s.child;for(;i;){const a=Z1(i,e,t);if(a)return a;i=e?null:i.sibling}}function iP(s){try{return Object.defineProperties(s,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return s}}const K1=iP(Vn.createContext(null));class rP extends Vn.Component{render(){return Vn.createElement(K1.Provider,{value:this._reactInternals},this.props.children)}}function sP(){const s=Vn.useContext(K1);if(s===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=Vn.useId();return Vn.useMemo(()=>{for(const t of[s,s?.alternate]){if(!t)continue;const i=Z1(t,!1,a=>{let c=a.memoizedState;for(;c;){if(c.memoizedState===e)return!0;c=c.next}});if(i)return i}},[s,e])}const Y4=Symbol.for("react.context"),J4=s=>s!==null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===Y4;function Q4(){const s=sP(),[e]=Vn.useState(()=>new Map);e.clear();let t=s;for(;t;){const i=t.type;J4(i)&&i!==K1&&!e.has(i)&&e.set(i,Vn.use(iP(i))),t=t.return}return e}function Z4(){const s=Q4();return Vn.useMemo(()=>Array.from(s.keys()).reduce((e,t)=>i=>Vn.createElement(e,null,Vn.createElement(t.Provider,{...i,value:s.get(t)})),e=>Vn.createElement(rP,{...e})),[s])}function _1(s){let e=s.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const aP=s=>s&&s.isOrthographicCamera,K4=s=>s&&s.hasOwnProperty("current"),_4=s=>s!=null&&(typeof s=="string"||typeof s=="number"||s.isColor),Lv=((s,e)=>typeof window<"u"&&(((s=window.document)==null?void 0:s.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?Vn.useLayoutEffect:Vn.useEffect;function oP(s){const e=Vn.useRef(s);return Lv(()=>void(e.current=s),[s]),e}function $4(){const s=sP(),e=Z4();return Vn.useMemo(()=>({children:t})=>{const a=!!Z1(s,!0,c=>c.type===Vn.StrictMode)?Vn.StrictMode:Vn.Fragment;return Z.jsx(a,{children:Z.jsx(e,{children:t})})},[s,e])}function eV({set:s}){return Lv(()=>(s(new Promise(()=>null)),()=>s(!1)),[s]),null}const tV=(s=>(s=class extends Vn.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}},s.getDerivedStateFromError=()=>({error:!0}),s))();function lP(s){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(s)?Math.min(Math.max(s[0],t),s[1]):s}function vm(s){var e;return(e=s.__r3f)==null?void 0:e.root.getState()}const pi={obj:s=>s===Object(s)&&!pi.arr(s)&&typeof s!="function",fun:s=>typeof s=="function",str:s=>typeof s=="string",num:s=>typeof s=="number",boo:s=>typeof s=="boolean",und:s=>s===void 0,nul:s=>s===null,arr:s=>Array.isArray(s),equ(s,e,{arrays:t="shallow",objects:i="reference",strict:a=!0}={}){if(typeof s!=typeof e||!!s!=!!e)return!1;if(pi.str(s)||pi.num(s)||pi.boo(s))return s===e;const c=pi.obj(s);if(c&&i==="reference")return s===e;const d=pi.arr(s);if(d&&t==="reference")return s===e;if((d||c)&&s===e)return!0;let f;for(f in s)if(!(f in e))return!1;if(c&&t==="shallow"&&i==="shallow"){for(f in a?e:s)if(!pi.equ(s[f],e[f],{strict:a,objects:"reference"}))return!1}else for(f in a?e:s)if(s[f]!==e[f])return!1;if(pi.und(f)){if(d&&s.length===0&&e.length===0||c&&Object.keys(s).length===0&&Object.keys(e).length===0)return!0;if(s!==e)return!1}return!0}};function nV(s){s.type!=="Scene"&&(s.dispose==null||s.dispose());for(const e in s){const t=s[e];t?.type!=="Scene"&&(t==null||t.dispose==null||t.dispose())}}const cP=["children","key","ref"];function iV(s){const e={};for(const t in s)cP.includes(t)||(e[t]=s[t]);return e}function Ax(s,e,t,i){const a=s;let c=a?.__r3f;return c||(c={root:e,type:t,parent:null,children:[],props:iV(i),object:a,eventCount:0,handlers:{},isHidden:!1},a&&(a.__r3f=c)),c}function Mv(s,e){if(!e.includes("-"))return{root:s,key:e,target:s[e]};if(e in s)return{root:s,key:e,target:s[e]};let t=s;const i=e.split("-");for(const a of i){if(typeof t!="object"||t===null){if(t!==void 0){const c=i.slice(i.indexOf(a)).join("-");return{root:t,key:c,target:void 0}}return{root:s,key:e,target:void 0}}e=a,s=t,t=t[e]}return{root:s,key:e,target:t}}const z2=/-\d+$/;function vx(s,e){if(pi.str(e.props.attach)){if(z2.test(e.props.attach)){const a=e.props.attach.replace(z2,""),{root:c,key:d}=Mv(s.object,a);Array.isArray(c[d])||(c[d]=[])}const{root:t,key:i}=Mv(s.object,e.props.attach);e.previousAttach=t[i],t[i]=e.object}else pi.fun(e.props.attach)&&(e.previousAttach=e.props.attach(s.object,e.object))}function yx(s,e){if(pi.str(e.props.attach)){const{root:t,key:i}=Mv(s.object,e.props.attach),a=e.previousAttach;a===void 0?delete t[i]:t[i]=a}else e.previousAttach==null||e.previousAttach(s.object,e.object);delete e.previousAttach}const Jw=[...cP,"args","dispose","attach","object","onUpdate","dispose"],B2=new Map;function rV(s){let e=B2.get(s.constructor);try{e||(e=new s.constructor,B2.set(s.constructor,e))}catch{}return e}function sV(s,e){const t={};for(const i in e)if(!Jw.includes(i)&&!pi.equ(e[i],s.props[i])){t[i]=e[i];for(const a in e)a.startsWith(`${i}-`)&&(t[a]=e[a])}for(const i in s.props){if(Jw.includes(i)||e.hasOwnProperty(i))continue;const{root:a,key:c}=Mv(s.object,i);if(a.constructor&&a.constructor.length===0){const d=rV(a);pi.und(d)||(t[c]=d[c])}else t[c]=0}return t}const aV=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],oV=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Hu(s,e){var t;const i=s.__r3f,a=i&&_1(i).getState(),c=i?.eventCount;for(const f in e){let m=e[f];if(Jw.includes(f))continue;if(i&&oV.test(f)){typeof m=="function"?i.handlers[f]=m:delete i.handlers[f],i.eventCount=Object.keys(i.handlers).length;continue}if(m===void 0)continue;let{root:g,key:v,target:M}=Mv(s,f);if(M===void 0&&(typeof g!="object"||g===null))throw Error(`R3F: Cannot set "${f}". Ensure it is an object before setting "${v}".`);if(M instanceof km&&m instanceof km)M.mask=m.mask;else if(M instanceof ut&&_4(m))M.set(m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&typeof M.copy=="function"&&m!=null&&m.constructor&&M.constructor===m.constructor)M.copy(m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&Array.isArray(m))typeof M.fromArray=="function"?M.fromArray(m):M.set(...m);else if(M!==null&&typeof M=="object"&&typeof M.set=="function"&&typeof m=="number")typeof M.setScalar=="function"?M.setScalar(m):M.set(m);else if(g instanceof Pa&&v==="uniforms"&&pi.obj(m)){pi.obj(g.uniforms)||(g.uniforms={});const x=g.uniforms,S=m;for(const w in S){const k=S[w],C=x[w];C?Object.assign(C,k):x[w]={...k}}}else{var d;g[v]=m,a&&!a.linear&&aV.includes(v)&&(d=g[v])!=null&&d.isTexture&&g[v].format===as&&g[v].type===Ss&&(g[v].colorSpace=ss)}}if(i!=null&&i.parent&&a!=null&&a.internal&&(t=i.object)!=null&&t.isObject3D&&c!==i.eventCount){const f=i.object,m=a.internal.interaction.indexOf(f);m>-1&&a.internal.interaction.splice(m,1),i.eventCount&&f.raycast!==null&&a.internal.interaction.push(f)}return i&&i.props.attach===void 0&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&Gm(i),s}function Gm(s){var e;if(!s.parent)return;s.props.onUpdate==null||s.props.onUpdate(s.object);const t=(e=s.root)==null||e.getState==null?void 0:e.getState();t&&t.internal.frames===0&&t.invalidate()}function lV(s,e){s.manual||(aP(s)?(s.left=e.width/-2,s.right=e.width/2,s.top=e.height/2,s.bottom=e.height/-2):s.aspect=e.width/e.height,s.updateProjectionMatrix())}const Js=s=>s?.isObject3D;function JA(s){return(s.eventObject||s.object).uuid+"/"+s.index+s.instanceId}function uP(s,e,t,i){const a=t.get(e);a&&(t.delete(e),t.size===0&&(s.delete(i),a.target.releasePointerCapture(i)))}function cV(s,e,t){const{internal:i}=s.getState();for(let a=0;a<i.interaction.length;a++)i.interaction[a]===e&&(i.interaction[a]=t);for(let a=0;a<i.initialHits.length;a++)i.initialHits[a]===e&&(i.initialHits[a]=t);i.hovered.forEach((a,c)=>{if(a.eventObject===e||a.object===e){i.hovered.delete(c);const d={...a,eventObject:a.eventObject===e?t:a.eventObject,object:a.object===e?t:a.object};i.hovered.set(JA(d),d)}}),i.capturedMap.forEach(a=>{const c=a.get(e);c&&(a.delete(e),a.set(t,c))})}function uV(s,e){const{internal:t}=s.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,a)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(a)}),t.capturedMap.forEach((i,a)=>{uP(t.capturedMap,e,i,a)})}function dV(s){function e(m){const{internal:g}=s.getState(),v=m.offsetX-g.initialClick[0],M=m.offsetY-g.initialClick[1];return Math.round(Math.sqrt(v*v+M*M))}function t(m){return m.filter(g=>["Move","Over","Enter","Out","Leave"].some(v=>{var M;return(M=g.__r3f)==null?void 0:M.handlers["onPointer"+v]}))}function i(m,g){const v=s.getState(),M=new Set,x=[],S=g?g(v.internal.interaction):v.internal.interaction;for(let T=0;T<S.length;T++){const D=vm(S[T]);D&&(D.raycaster.camera=void 0)}v.previousRoot||v.events.compute==null||v.events.compute(m,v);function w(T){const D=vm(T);if(!D||!D.events.enabled||D.raycaster.camera===null)return[];if(D.raycaster.camera===void 0){var z;D.events.compute==null||D.events.compute(m,D,(z=D.previousRoot)==null?void 0:z.getState()),D.raycaster.camera===void 0&&(D.raycaster.camera=null)}return D.raycaster.camera?D.raycaster.intersectObject(T,!0):[]}let k=S.flatMap(w).sort((T,D)=>{const z=vm(T.object),L=vm(D.object);return!z||!L?T.distance-D.distance:L.events.priority-z.events.priority||T.distance-D.distance}).filter(T=>{const D=JA(T);return M.has(D)?!1:(M.add(D),!0)});v.events.filter&&(k=v.events.filter(k,v));for(const T of k){let D=T.object;for(;D;){var C;(C=D.__r3f)!=null&&C.eventCount&&x.push({...T,eventObject:D}),D=D.parent}}if("pointerId"in m&&v.internal.capturedMap.has(m.pointerId))for(let T of v.internal.capturedMap.get(m.pointerId).values())M.has(JA(T.intersection))||x.push(T.intersection);return x}function a(m,g,v,M){if(m.length){const x={stopped:!1};for(const S of m){let w=vm(S.object);if(w||S.object.traverseAncestors(k=>{const C=vm(k);if(C)return w=C,!1}),w){const{raycaster:k,pointer:C,camera:T,internal:D}=w,z=new J(C.x,C.y,0).unproject(T),L=F=>{var V,X;return(V=(X=D.capturedMap.get(F))==null?void 0:X.has(S.eventObject))!=null?V:!1},O=F=>{const V={intersection:S,target:g.target};D.capturedMap.has(F)?D.capturedMap.get(F).set(S.eventObject,V):D.capturedMap.set(F,new Map([[S.eventObject,V]])),g.target.setPointerCapture(F)},U=F=>{const V=D.capturedMap.get(F);V&&uP(D.capturedMap,S.eventObject,V,F)};let H={};for(let F in g){let V=g[F];typeof V!="function"&&(H[F]=V)}let I={...S,...H,pointer:C,intersections:m,stopped:x.stopped,delta:v,unprojectedPoint:z,ray:k.ray,camera:T,stopPropagation(){const F="pointerId"in g&&D.capturedMap.get(g.pointerId);if((!F||F.has(S.eventObject))&&(I.stopped=x.stopped=!0,D.hovered.size&&Array.from(D.hovered.values()).find(V=>V.eventObject===S.eventObject))){const V=m.slice(0,m.indexOf(S));c([...V,S])}},target:{hasPointerCapture:L,setPointerCapture:O,releasePointerCapture:U},currentTarget:{hasPointerCapture:L,setPointerCapture:O,releasePointerCapture:U},nativeEvent:g};if(M(I),x.stopped===!0)break}}}return m}function c(m){const{internal:g}=s.getState();for(const v of g.hovered.values())if(!m.length||!m.find(M=>M.object===v.object&&M.index===v.index&&M.instanceId===v.instanceId)){const x=v.eventObject.__r3f;if(g.hovered.delete(JA(v)),x!=null&&x.eventCount){const S=x.handlers,w={...v,intersections:m};S.onPointerOut==null||S.onPointerOut(w),S.onPointerLeave==null||S.onPointerLeave(w)}}}function d(m,g){for(let v=0;v<g.length;v++){const M=g[v].__r3f;M==null||M.handlers.onPointerMissed==null||M.handlers.onPointerMissed(m)}}function f(m){switch(m){case"onPointerLeave":case"onPointerCancel":return()=>c([]);case"onLostPointerCapture":return g=>{const{internal:v}=s.getState();"pointerId"in g&&v.capturedMap.has(g.pointerId)&&requestAnimationFrame(()=>{v.capturedMap.has(g.pointerId)&&(v.capturedMap.delete(g.pointerId),c([]))})}}return function(v){const{onPointerMissed:M,internal:x}=s.getState();x.lastEvent.current=v;const S=m==="onPointerMove",w=m==="onClick"||m==="onContextMenu"||m==="onDoubleClick",C=i(v,S?t:void 0),T=w?e(v):0;m==="onPointerDown"&&(x.initialClick=[v.offsetX,v.offsetY],x.initialHits=C.map(z=>z.eventObject)),w&&!C.length&&T<=2&&(d(v,x.interaction),M&&M(v)),S&&c(C);function D(z){const L=z.eventObject,O=L.__r3f;if(!(O!=null&&O.eventCount))return;const U=O.handlers;if(S){if(U.onPointerOver||U.onPointerEnter||U.onPointerOut||U.onPointerLeave){const H=JA(z),I=x.hovered.get(H);I?I.stopped&&z.stopPropagation():(x.hovered.set(H,z),U.onPointerOver==null||U.onPointerOver(z),U.onPointerEnter==null||U.onPointerEnter(z))}U.onPointerMove==null||U.onPointerMove(z)}else{const H=U[m];H?(!w||x.initialHits.includes(L))&&(d(v,x.interaction.filter(I=>!x.initialHits.includes(I))),H(z)):w&&x.initialHits.includes(L)&&d(v,x.interaction.filter(I=>!x.initialHits.includes(I)))}}a(C,v,T,D)}}return{handlePointer:f}}const U2=s=>!!(s!=null&&s.render),dP=Vn.createContext(null),fV=(s,e)=>{const t=W4((f,m)=>{const g=new J,v=new J,M=new J;function x(T=m().camera,D=v,z=m().size){const{width:L,height:O,top:U,left:H}=z,I=L/O;D.isVector3?M.copy(D):M.set(...D);const F=T.getWorldPosition(g).distanceTo(M);if(aP(T))return{width:L/T.zoom,height:O/T.zoom,top:U,left:H,factor:1,distance:F,aspect:I};{const V=T.fov*Math.PI/180,X=2*Math.tan(V/2)*F,_=X*(L/O);return{width:_,height:X,top:U,left:H,factor:L/_,distance:F,aspect:I}}}let S;const w=T=>f(D=>({performance:{...D.performance,current:T}})),k=new Oe;return{set:f,get:m,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(T=1)=>s(m(),T),advance:(T,D)=>e(T,D,m()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new WR,pointer:k,mouse:k,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const T=m();S&&clearTimeout(S),T.performance.current!==T.performance.min&&w(T.performance.min),S=setTimeout(()=>w(m().performance.max),T.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:x},setEvents:T=>f(D=>({...D,events:{...D.events,...T}})),setSize:(T,D,z=0,L=0)=>{const O=m().camera,U={width:T,height:D,top:z,left:L};f(H=>({size:U,viewport:{...H.viewport,...x(O,v,U)}}))},setDpr:T=>f(D=>{const z=lP(T);return{viewport:{...D.viewport,dpr:z,initialDpr:D.viewport.initialDpr||z}}}),setFrameloop:(T="always")=>{const D=m().clock;D.stop(),D.elapsedTime=0,T!=="never"&&(D.start(),D.elapsedTime=0),f(()=>({frameloop:T}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:Vn.createRef(),active:!1,frames:0,priority:0,subscribe:(T,D,z)=>{const L=m().internal;return L.priority=L.priority+(D>0?1:0),L.subscribers.push({ref:T,priority:D,store:z}),L.subscribers=L.subscribers.sort((O,U)=>O.priority-U.priority),()=>{const O=m().internal;O!=null&&O.subscribers&&(O.priority=O.priority-(D>0?1:0),O.subscribers=O.subscribers.filter(U=>U.ref!==T))}}}}}),i=t.getState();let a=i.size,c=i.viewport.dpr,d=i.camera;return t.subscribe(()=>{const{camera:f,size:m,viewport:g,gl:v,set:M}=t.getState();if(m.width!==a.width||m.height!==a.height||g.dpr!==c){a=m,c=g.dpr,lV(f,m),g.dpr>0&&v.setPixelRatio(g.dpr);const x=typeof HTMLCanvasElement<"u"&&v.domElement instanceof HTMLCanvasElement;v.setSize(m.width,m.height,x)}f!==d&&(d=f,M(x=>({viewport:{...x.viewport,...x.viewport.getCurrentViewport(f)}})))}),t.subscribe(f=>s(f)),t};function fP(){const s=Vn.useContext(dP);if(!s)throw new Error("R3F: Hooks can only be used within the Canvas component!");return s}function hV(s=t=>t,e){return fP()(s,e)}function pV(s,e=0){const t=fP(),i=t.getState().internal.subscribe,a=oP(s);return Lv(()=>i(a,e,t),[e,i,t]),null}/**
|
|
4270
4270
|
* @license React
|
|
4271
4271
|
* react-reconciler-constants.production.js
|
|
4272
4272
|
*
|
|
@@ -4289,7 +4289,7 @@ void main() {
|
|
|
4289
4289
|
`);for(E=A=0;A<Re.length&&!Re[A].includes("DetermineComponentFrameRoot");)A++;for(;E<Ve.length&&!Ve[E].includes("DetermineComponentFrameRoot");)E++;if(A===Re.length||E===Ve.length)for(A=Re.length-1,E=Ve.length-1;1<=A&&0<=E&&Re[A]!==Ve[E];)E--;for(;1<=A&&0<=E;A--,E--)if(Re[A]!==Ve[E]){if(A!==1||E!==1)do if(A--,E--,0>E||Re[A]!==Ve[E]){var $e=`
|
|
4290
4290
|
`+Re[A].replace(" at new "," at ");return o.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",o.displayName)),$e}while(1<=A&&0<=E);break}}}finally{jd=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?$(h):""}function Q(o,l){switch(o.tag){case 26:case 27:case 5:return $(o.type);case 16:return $("Lazy");case 13:return o.child!==l&&l!==null?$("Suspense Fallback"):$("Suspense");case 19:return $("SuspenseList");case 0:case 15:return j(o.type,!1);case 11:return j(o.type.render,!1);case 1:return j(o.type,!0);case 31:return $("Activity");default:return""}}function ne(o){try{var l="",h=null;do l+=Q(o,h),h=o,o=o.return;while(o);return l}catch(A){return`
|
|
4291
4291
|
Error generating stack: `+A.message+`
|
|
4292
|
-
`+A.stack}}function ce(o,l){if(typeof o=="object"&&o!==null){var h=F0.get(o);return h!==void 0?h:(l={value:o,source:l,stack:ne(l)},F0.set(o,l),l)}return{value:o,source:l,stack:ne(l)}}function ye(o,l){_l[ru++]=be,_l[ru++]=zi,zi=o,be=l}function Te(o,l,h){Us[Fs++]=Ur,Us[Fs++]=Wa,Us[Fs++]=Eo,Eo=o;var A=Ur;o=Wa;var E=32-Jr(A)-1;A&=~(1<<E),h+=1;var R=32-Jr(l)+E;if(30<R){var W=E-E%5;R=(A&(1<<W)-1).toString(32),A>>=W,E-=W,Ur=1<<32-Jr(l)+E|h<<E|A,Wa=R+o}else Ur=1<<R|h<<E|A,Wa=o}function Fe(o){o.return!==null&&(ye(o,1),Te(o,1,0))}function lt(o){for(;o===zi;)zi=_l[--ru],_l[ru]=null,be=_l[--ru],_l[ru]=null;for(;o===Eo;)Eo=Us[--Fs],Us[Fs]=null,Wa=Us[--Fs],Us[Fs]=null,Ur=Us[--Fs],Us[Fs]=null}function ht(o,l){Us[Fs++]=Ur,Us[Fs++]=Wa,Us[Fs++]=Eo,Ur=l.id,Wa=l.overflow,Eo=o}function ct(o,l){w(ul,l),w(Xd,o),w(mr,null),o=pS(l),S(mr),w(mr,o)}function Pe(){S(mr),S(Xd),S(ul)}function Xe(o){o.memoizedState!==null&&w(rp,o);var l=mr.current,h=Qv(l,o.type);l!==h&&(w(Xd,o),w(mr,h))}function He(o){Xd.current===o&&(S(mr),S(Xd)),rp.current===o&&(S(rp),zs?ll._currentValue=Br:ll._currentValue2=Br)}function pt(o){var l=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xe(ce(l,o)),qg}function Nt(o,l){if(!fr)throw Error(a(175));Kc(o.stateNode,o.type,o.memoizedProps,l,o)||pt(o,!0)}function nt(o){for(Wi=o.return;Wi;)switch(Wi.tag){case 5:case 31:case 13:Os=!1;return;case 27:case 3:Os=!0;return;default:Wi=Wi.return}}function sn(o){if(!fr||o!==Wi)return!1;if(!gn)return nt(o),gn=!0,!1;var l=o.tag;if(Ni?l!==3&&l!==27&&(l!==5||k0(o.type)&&!zd(o.type,o.memoizedProps))&&oi&&pt(o):l!==3&&(l!==5||k0(o.type)&&!zd(o.type,o.memoizedProps))&&oi&&pt(o),nt(o),l===13){if(!fr)throw Error(a(316));if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));oi=w0(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));oi=M0(o)}else oi=Ni&&l===27?v0(o.type,oi):Wi?Ug(o.stateNode):null;return!0}function Dt(){fr&&(oi=Wi=null,gn=!1)}function Be(){var o=Co;return o!==null&&($r===null?$r=o:$r.push.apply($r,o),Co=null),o}function xe(o){Co===null?Co=[o]:Co.push(o)}function Ue(o,l,h){zs?(w(ja,l._currentValue),l._currentValue=h):(w(ja,l._currentValue2),l._currentValue2=h)}function qe(o){var l=ja.current;zs?o._currentValue=l:o._currentValue2=l,S(ja)}function Ze(o,l,h){for(;o!==null;){var A=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,A!==null&&(A.childLanes|=l)):A!==null&&(A.childLanes&l)!==l&&(A.childLanes|=l),o===h)break;o=o.return}}function Pt(o,l,h,A){var E=o.child;for(E!==null&&(E.return=o);E!==null;){var R=E.dependencies;if(R!==null){var W=E.child;R=R.firstContext;e:for(;R!==null;){var te=R;R=E;for(var Re=0;Re<l.length;Re++)if(te.context===l[Re]){R.lanes|=h,te=R.alternate,te!==null&&(te.lanes|=h),Ze(R.return,h,o),A||(W=null);break e}R=te.next}}else if(E.tag===18){if(W=E.return,W===null)throw Error(a(341));W.lanes|=h,R=W.alternate,R!==null&&(R.lanes|=h),Ze(W,h,o),W=null}else W=E.child;if(W!==null)W.return=E;else for(W=E;W!==null;){if(W===o){W=null;break}if(E=W.sibling,E!==null){E.return=W.return,W=E;break}W=W.return}E=W}}function bt(o,l,h,A){o=null;for(var E=l,R=!1;E!==null;){if(!R){if((E.flags&524288)!==0)R=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var W=E.alternate;if(W===null)throw Error(a(387));if(W=W.memoizedProps,W!==null){var te=E.type;pr(E.pendingProps.value,W.value)||(o!==null?o.push(te):o=[te])}}else if(E===rp.current){if(W=E.alternate,W===null)throw Error(a(387));W.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(o!==null?o.push(ll):o=[ll])}E=E.return}o!==null&&Pt(l,o,h,A),l.flags|=262144}function zt(o){for(o=o.firstContext;o!==null;){var l=o.context;if(!pr(zs?l._currentValue:l._currentValue2,o.memoizedValue))return!0;o=o.next}return!1}function Et(o){Fr=o,li=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function ee(o){return an(Fr,o)}function Cn(o,l){return Fr===null&&Et(o),an(o,l)}function an(o,l){var h=zs?l._currentValue:l._currentValue2;if(l={context:l,memoizedValue:h,next:null},li===null){if(o===null)throw Error(a(308));li=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else li=li.next=l;return h}function Y(){return{controller:new Xa,data:new Map,refCount:0}}function B(o){o.refCount--,o.refCount===0&&Tr(CS,function(){o.controller.abort()})}function de(){}function me(o){o!==Kr&&o.next===null&&(Kr===null?Ti=Kr=o:Kr=Kr.next=o),su=!0,Yg||(Yg=!0,Rt())}function Ce(o,l){if(!$l&&su){$l=!0;do for(var h=!1,A=Ti;A!==null;){if(o!==0){var E=A.pendingLanes;if(E===0)var R=0;else{var W=A.suspendedLanes,te=A.pingedLanes;R=(1<<31-Jr(42|o)+1)-1,R&=E&~(W&~te),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(h=!0,et(A,R))}else R=bn,R=T(A,A===$n?R:0,A.cancelPendingCommit!==null||A.timeoutHandle!==xo),(R&3)===0||D(A,R)||(h=!0,et(A,R));A=A.next}while(h);$l=!1}}function Qe(){Ke()}function Ke(){su=Yg=!1;var o=0;ma!==0&&Lg()&&(o=ma);for(var l=Wn(),h=null,A=Ti;A!==null;){var E=A.next,R=ke(A,l);R===0?(A.next=null,h===null?Ti=E:h.next=E,E===null&&(Kr=h)):(h=A,(o!==0||(R&3)!==0)&&(su=!0)),A=E}qn!==0&&qn!==5||Ce(o),ma!==0&&(ma=0)}function ke(o,l){for(var h=o.suspendedLanes,A=o.pingedLanes,E=o.expirationTimes,R=o.pendingLanes&-62914561;0<R;){var W=31-Jr(R),te=1<<W,Re=E[W];Re===-1?((te&h)===0||(te&A)!==0)&&(E[W]=z(te,l)):Re<=l&&(o.expiredLanes|=te),R&=~te}if(l=$n,h=bn,h=T(o,o===l?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==xo),A=o.callbackNode,h===0||o===l&&(Xn===2||Xn===9)||o.cancelPendingCommit!==null)return A!==null&&A!==null&&hn(A),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||D(o,h)){if(l=h&-h,l===o.callbackPriority)return l;switch(A!==null&&hn(A),_(h)){case 2:case 8:h=wo;break;case 32:h=To;break;case 268435456:h=nu;break;default:h=To}return A=De.bind(null,o),h=tp(h,A),o.callbackPriority=l,o.callbackNode=h,l}return A!==null&&A!==null&&hn(A),o.callbackPriority=2,o.callbackNode=null,2}function De(o,l){if(qn!==0&&qn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(Mi()&&o.callbackNode!==h)return null;var A=bn;return A=T(o,o===$n?A:0,o.cancelPendingCommit!==null||o.timeoutHandle!==xo),A===0?null:(hg(o,A,l),ke(o,Wn()),o.callbackNode!=null&&o.callbackNode===h?De.bind(null,o):null)}function et(o,l){if(Mi())return null;hg(o,l,!0)}function Rt(){i0?Ha(function(){(An&6)!==0?tp(U0,Qe):Ke()}):tp(U0,Qe)}function rt(){if(ma===0){var o=au;o===0&&(o=Gd,Gd<<=1,(Gd&261888)===0&&(Gd=256)),ma=o}return ma}function st(o,l){if(qd===null){var h=qd=[];Jg=0,au=rt(),ou={status:"pending",value:void 0,then:function(A){h.push(A)}}}return Jg++,l.then(mt,mt),l}function mt(){if(--Jg===0&&qd!==null){ou!==null&&(ou.status="fulfilled");var o=qd;qd=null,au=0,ou=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function Ct(o,l){var h=[],A={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return o.then(function(){A.status="fulfilled",A.value=l;for(var E=0;E<h.length;E++)(0,h[E])(l)},function(E){for(A.status="rejected",A.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),A}function jt(){var o=dl.current;return o!==null?o:$n.pooledCache}function ae(o,l){l===null?w(dl,dl.current):w(dl,l.pool)}function _e(){var o=jt();return o===null?null:{parent:zs?di._currentValue:di._currentValue2,pool:o}}function Le(o,l){if(pr(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),A=Object.keys(l);if(h.length!==A.length)return!1;for(A=0;A<h.length;A++){var E=h[A];if(!Xg.call(l,E)||!pr(o[E],l[E]))return!1}return!0}function it(o){return o=o.status,o==="fulfilled"||o==="rejected"}function tt(o,l,h){switch(h=o[h],h===void 0?o.push(l):h!==l&&(l.then(de,de),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,gt(o),o;default:if(typeof l.status=="string")l.then(de,de);else{if(o=$n,o!==null&&100<o.shellSuspendCounter)throw Error(a(482));o=l,o.status="pending",o.then(function(A){if(l.status==="pending"){var E=l;E.status="fulfilled",E.value=A}},function(A){if(l.status==="pending"){var E=l;E.status="rejected",E.reason=A}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,gt(o),o}throw Vs=l,lu}}function Ne(o){try{var l=o._init;return l(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Vs=h,lu):h}}function Mt(){if(Vs===null)throw Error(a(459));var o=Vs;return Vs=null,o}function gt(o){if(o===lu||o===op)throw Error(a(483))}function yn(o){var l=Yd;return Yd+=1,Hs===null&&(Hs=[]),tt(Hs,o,l)}function Rn(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Qi(o,l){throw l.$$typeof===Fh?Error(a(525)):(o=Object.prototype.toString.call(l),Error(a(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function Gr(o){function l(ve,fe){if(o){var we=ve.deletions;we===null?(ve.deletions=[fe],ve.flags|=16):we.push(fe)}}function h(ve,fe){if(!o)return null;for(;fe!==null;)l(ve,fe),fe=fe.sibling;return null}function A(ve){for(var fe=new Map;ve!==null;)ve.key!==null?fe.set(ve.key,ve):fe.set(ve.index,ve),ve=ve.sibling;return fe}function E(ve,fe){return ve=Ua(ve,fe),ve.index=0,ve.sibling=null,ve}function R(ve,fe,we){return ve.index=we,o?(we=ve.alternate,we!==null?(we=we.index,we<fe?(ve.flags|=67108866,fe):we):(ve.flags|=67108866,fe)):(ve.flags|=1048576,fe)}function W(ve){return o&&ve.alternate===null&&(ve.flags|=67108866),ve}function te(ve,fe,we,Ye){return fe===null||fe.tag!==6?(fe=Pd(we,ve.mode,Ye),fe.return=ve,fe):(fe=E(fe,we),fe.return=ve,fe)}function Re(ve,fe,we,Ye){var Bt=we.type;return Bt===Gl?$e(ve,fe,we.props.children,Ye,we.key):fe!==null&&(fe.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===al&&Ne(Bt)===fe.type)?(fe=E(fe,we.props),Rn(fe,we),fe.return=ve,fe):(fe=Rd(we.type,we.key,we.props,null,ve.mode,Ye),Rn(fe,we),fe.return=ve,fe)}function Ve(ve,fe,we,Ye){return fe===null||fe.tag!==4||fe.stateNode.containerInfo!==we.containerInfo||fe.stateNode.implementation!==we.implementation?(fe=zh(we,ve.mode,Ye),fe.return=ve,fe):(fe=E(fe,we.children||[]),fe.return=ve,fe)}function $e(ve,fe,we,Ye,Bt){return fe===null||fe.tag!==7?(fe=yo(we,ve.mode,Ye,Bt),fe.return=ve,fe):(fe=E(fe,we),fe.return=ve,fe)}function Je(ve,fe,we){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return fe=Pd(""+fe,ve.mode,we),fe.return=ve,fe;if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Dd:return we=Rd(fe.type,fe.key,fe.props,null,ve.mode,we),Rn(we,fe),we.return=ve,we;case sl:return fe=zh(fe,ve.mode,we),fe.return=ve,fe;case al:return fe=Ne(fe),Je(ve,fe,we)}if(ol(fe)||v(fe))return fe=yo(fe,ve.mode,we,null),fe.return=ve,fe;if(typeof fe.then=="function")return Je(ve,yn(fe),we);if(fe.$$typeof===bo)return Je(ve,Cn(ve,fe),we);Qi(ve,fe)}return null}function At(ve,fe,we,Ye){var Bt=fe!==null?fe.key:null;if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return Bt!==null?null:te(ve,fe,""+we,Ye);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case Dd:return we.key===Bt?Re(ve,fe,we,Ye):null;case sl:return we.key===Bt?Ve(ve,fe,we,Ye):null;case al:return we=Ne(we),At(ve,fe,we,Ye)}if(ol(we)||v(we))return Bt!==null?null:$e(ve,fe,we,Ye,null);if(typeof we.then=="function")return At(ve,fe,yn(we),Ye);if(we.$$typeof===bo)return At(ve,fe,Cn(ve,we),Ye);Qi(ve,we)}return null}function Ft(ve,fe,we,Ye,Bt){if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint")return ve=ve.get(we)||null,te(fe,ve,""+Ye,Bt);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case Dd:return ve=ve.get(Ye.key===null?we:Ye.key)||null,Re(fe,ve,Ye,Bt);case sl:return ve=ve.get(Ye.key===null?we:Ye.key)||null,Ve(fe,ve,Ye,Bt);case al:return Ye=Ne(Ye),Ft(ve,fe,we,Ye,Bt)}if(ol(Ye)||v(Ye))return ve=ve.get(we)||null,$e(fe,ve,Ye,Bt,null);if(typeof Ye.then=="function")return Ft(ve,fe,we,yn(Ye),Bt);if(Ye.$$typeof===bo)return Ft(ve,fe,we,Cn(fe,Ye),Bt);Qi(fe,Ye)}return null}function ei(ve,fe,we,Ye){for(var Bt=null,fi=null,Gt=fe,Un=fe=0,xn=null;Gt!==null&&Un<we.length;Un++){Gt.index>Un?(xn=Gt,Gt=null):xn=Gt.sibling;var kn=At(ve,Gt,we[Un],Ye);if(kn===null){Gt===null&&(Gt=xn);break}o&&Gt&&kn.alternate===null&&l(ve,Gt),fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn,Gt=xn}if(Un===we.length)return h(ve,Gt),gn&&ye(ve,Un),Bt;if(Gt===null){for(;Un<we.length;Un++)Gt=Je(ve,we[Un],Ye),Gt!==null&&(fe=R(Gt,fe,Un),fi===null?Bt=Gt:fi.sibling=Gt,fi=Gt);return gn&&ye(ve,Un),Bt}for(Gt=A(Gt);Un<we.length;Un++)xn=Ft(Gt,ve,Un,we[Un],Ye),xn!==null&&(o&&xn.alternate!==null&&Gt.delete(xn.key===null?Un:xn.key),fe=R(xn,fe,Un),fi===null?Bt=xn:fi.sibling=xn,fi=xn);return o&&Gt.forEach(function(Do){return l(ve,Do)}),gn&&ye(ve,Un),Bt}function ji(ve,fe,we,Ye){if(we==null)throw Error(a(151));for(var Bt=null,fi=null,Gt=fe,Un=fe=0,xn=null,kn=we.next();Gt!==null&&!kn.done;Un++,kn=we.next()){Gt.index>Un?(xn=Gt,Gt=null):xn=Gt.sibling;var Do=At(ve,Gt,kn.value,Ye);if(Do===null){Gt===null&&(Gt=xn);break}o&&Gt&&Do.alternate===null&&l(ve,Gt),fe=R(Do,fe,Un),fi===null?Bt=Do:fi.sibling=Do,fi=Do,Gt=xn}if(kn.done)return h(ve,Gt),gn&&ye(ve,Un),Bt;if(Gt===null){for(;!kn.done;Un++,kn=we.next())kn=Je(ve,kn.value,Ye),kn!==null&&(fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn);return gn&&ye(ve,Un),Bt}for(Gt=A(Gt);!kn.done;Un++,kn=we.next())kn=Ft(Gt,ve,Un,kn.value,Ye),kn!==null&&(o&&kn.alternate!==null&&Gt.delete(kn.key===null?Un:kn.key),fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn);return o&&Gt.forEach(function($d){return l(ve,$d)}),gn&&ye(ve,Un),Bt}function rc(ve,fe,we,Ye){if(typeof we=="object"&&we!==null&&we.type===Gl&&we.key===null&&(we=we.props.children),typeof we=="object"&&we!==null){switch(we.$$typeof){case Dd:e:{for(var Bt=we.key;fe!==null;){if(fe.key===Bt){if(Bt=we.type,Bt===Gl){if(fe.tag===7){h(ve,fe.sibling),Ye=E(fe,we.props.children),Ye.return=ve,ve=Ye;break e}}else if(fe.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===al&&Ne(Bt)===fe.type){h(ve,fe.sibling),Ye=E(fe,we.props),Rn(Ye,we),Ye.return=ve,ve=Ye;break e}h(ve,fe);break}else l(ve,fe);fe=fe.sibling}we.type===Gl?(Ye=yo(we.props.children,ve.mode,Ye,we.key),Ye.return=ve,ve=Ye):(Ye=Rd(we.type,we.key,we.props,null,ve.mode,Ye),Rn(Ye,we),Ye.return=ve,ve=Ye)}return W(ve);case sl:e:{for(Bt=we.key;fe!==null;){if(fe.key===Bt)if(fe.tag===4&&fe.stateNode.containerInfo===we.containerInfo&&fe.stateNode.implementation===we.implementation){h(ve,fe.sibling),Ye=E(fe,we.children||[]),Ye.return=ve,ve=Ye;break e}else{h(ve,fe);break}else l(ve,fe);fe=fe.sibling}Ye=zh(we,ve.mode,Ye),Ye.return=ve,ve=Ye}return W(ve);case al:return we=Ne(we),rc(ve,fe,we,Ye)}if(ol(we))return ei(ve,fe,we,Ye);if(v(we)){if(Bt=v(we),typeof Bt!="function")throw Error(a(150));return we=Bt.call(we),ji(ve,fe,we,Ye)}if(typeof we.then=="function")return rc(ve,fe,yn(we),Ye);if(we.$$typeof===bo)return rc(ve,fe,Cn(ve,we),Ye);Qi(ve,we)}return typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint"?(we=""+we,fe!==null&&fe.tag===6?(h(ve,fe.sibling),Ye=E(fe,we),Ye.return=ve,ve=Ye):(h(ve,fe),Ye=Pd(we,ve.mode,Ye),Ye.return=ve,ve=Ye),W(ve)):h(ve,fe)}return function(ve,fe,we,Ye){try{Yd=0;var Bt=rc(ve,fe,we,Ye);return Hs=null,Bt}catch(Gt){if(Gt===lu||Gt===op)throw Gt;var fi=t(29,Gt,null,ve.mode);return fi.lanes=Ye,fi.return=ve,fi}finally{}}}function Zi(){for(var o=ga,l=Qg=ga=0;l<o;){var h=Gs[l];Gs[l++]=null;var A=Gs[l];Gs[l++]=null;var E=Gs[l];Gs[l++]=null;var R=Gs[l];if(Gs[l++]=null,A!==null&&E!==null){var W=A.pending;W===null?E.next=E:(E.next=W.next,W.next=E),A.pending=E}R!==0&&Yo(h,E,R)}}function $s(o,l,h,A){Gs[ga++]=o,Gs[ga++]=l,Gs[ga++]=h,Gs[ga++]=A,Qg|=A,o.lanes|=A,o=o.alternate,o!==null&&(o.lanes|=A)}function Rs(o,l,h,A){return $s(o,l,h,A),ka(o)}function Ps(o,l){return $s(o,null,null,l),ka(o)}function Yo(o,l,h){o.lanes|=h;var A=o.alternate;A!==null&&(A.lanes|=h);for(var E=!1,R=o.return;R!==null;)R.childLanes|=h,A=R.alternate,A!==null&&(A.childLanes|=h),R.tag===22&&(o=R.stateNode,o===null||o._visibility&1||(E=!0)),o=R,R=R.return;return o.tag===3?(R=o.stateNode,E&&l!==null&&(E=31-Jr(h),o=R.hiddenUpdates,A=o[E],A===null?o[E]=[l]:A.push(l),l.lane=h|536870912),R):null}function ka(o){if(50<pu)throw pu=0,Tp=null,Error(a(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}function Jo(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dr(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function lr(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ls(o,l,h){var A=o.updateQueue;if(A===null)return null;if(A=A.shared,(An&2)!==0){var E=A.pending;return E===null?l.next=l:(l.next=E.next,E.next=l),A.pending=l,l=ka(o),Yo(o,null,h),l}return $s(o,A,l,h),ka(o)}function Qo(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var A=l.lanes;A&=o.pendingLanes,h|=A,l.lanes=h,F(o,h)}}function Zo(o,l){var h=o.updateQueue,A=o.alternate;if(A!==null&&(A=A.updateQueue,h===A)){var E=null,R=null;if(h=h.firstBaseUpdate,h!==null){do{var W={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};R===null?E=R=W:R=R.next=W,h=h.next}while(h!==null);R===null?E=R=l:R=R.next=l}else E=R=l;h={baseState:A.baseState,firstBaseUpdate:E,lastBaseUpdate:R,shared:A.shared,callbacks:A.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}function fo(){if(Zg){var o=ou;if(o!==null)throw o}}function ks(o,l,h,A){Zg=!1;var E=o.updateQueue;fl=!1;var R=E.firstBaseUpdate,W=E.lastBaseUpdate,te=E.shared.pending;if(te!==null){E.shared.pending=null;var Re=te,Ve=Re.next;Re.next=null,W===null?R=Ve:W.next=Ve,W=Re;var $e=o.alternate;$e!==null&&($e=$e.updateQueue,te=$e.lastBaseUpdate,te!==W&&(te===null?$e.firstBaseUpdate=Ve:te.next=Ve,$e.lastBaseUpdate=Re))}if(R!==null){var Je=E.baseState;W=0,$e=Ve=Re=null,te=R;do{var At=te.lane&-536870913,Ft=At!==te.lane;if(Ft?(bn&At)===At:(A&At)===At){At!==0&&At===au&&(Zg=!0),$e!==null&&($e=$e.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var ei=o,ji=te;At=l;var rc=h;switch(ji.tag){case 1:if(ei=ji.payload,typeof ei=="function"){Je=ei.call(rc,Je,At);break e}Je=ei;break e;case 3:ei.flags=ei.flags&-65537|128;case 0:if(ei=ji.payload,At=typeof ei=="function"?ei.call(rc,Je,At):ei,At==null)break e;Je=us({},Je,At);break e;case 2:fl=!0}}At=te.callback,At!==null&&(o.flags|=64,Ft&&(o.flags|=8192),Ft=E.callbacks,Ft===null?E.callbacks=[At]:Ft.push(At))}else Ft={lane:At,tag:te.tag,payload:te.payload,callback:te.callback,next:null},$e===null?(Ve=$e=Ft,Re=Je):$e=$e.next=Ft,W|=At;if(te=te.next,te===null){if(te=E.shared.pending,te===null)break;Ft=te,te=Ft.next,Ft.next=null,E.lastBaseUpdate=Ft,E.shared.pending=null}}while(!0);$e===null&&(Re=Je),E.baseState=Re,E.firstBaseUpdate=Ve,E.lastBaseUpdate=$e,R===null&&(E.shared.lanes=0),ml|=W,o.lanes=W,o.memoizedState=Je}}function zc(o,l){if(typeof o!="function")throw Error(a(191,o));o.call(l)}function ed(o,l){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)zc(h[o],l)}function xt(o,l){o=Po,w(cp,o),w(qa,l),Po=o|l.baseLanes}function zl(){w(cp,Po),w(qa,qa.current)}function ea(){Po=cp.current,S(qa),S(cp)}function ta(o){var l=o.alternate;w(Ei,Ei.current&1),w(fs,o),Aa===null&&(l===null||qa.current!==null||l.memoizedState!==null)&&(Aa=o)}function G(o){w(Ei,Ei.current),w(fs,o),Aa===null&&(Aa=o)}function oe(o){o.tag===22?(w(Ei,Ei.current),w(fs,o),Aa===null&&(Aa=o)):Ae()}function Ae(){w(Ei,Ei.current),w(fs,fs.current)}function he(o){S(fs),Aa===o&&(Aa=null),S(Ei)}function ge(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Od(h)||Vd(h)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function We(){throw Error(a(321))}function dt(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!pr(o[h],l[h]))return!1;return!0}function at(o,l,h,A,E,R){return Ro=R,tn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,It.H=o===null||o.memoizedState===null?V0:Kg,tc=!1,R=h(A,E),tc=!1,cu&&(R=Tt(l,h,A,E)),St(o),R}function St(o){It.H=Jd;var l=Zn!==null&&Zn.next!==null;if(Ro=0,Bi=Zn=tn=null,up=!1,uu=0,du=null,l)throw Error(a(300));o===null||Ui||(o=o.dependencies,o!==null&&zt(o)&&(Ui=!0))}function Tt(o,l,h,A){tn=o;var E=0;do{if(cu&&(du=null),uu=0,cu=!1,25<=E)throw Error(a(301));if(E+=1,Bi=Zn=null,o.updateQueue!=null){var R=o.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}It.H=H0,R=l(h,A)}while(cu);return R}function Xt(){var o=It.H,l=o.useState()[0];return l=typeof l.then=="function"?Qn(l):l,o=o.useState()[0],(Zn!==null?Zn.memoizedState:null)!==o&&(tn.flags|=1024),l}function Ot(){var o=dp!==0;return dp=0,o}function vt(o,l,h){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~h}function Pn(o){if(up){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}up=!1}Ro=0,Bi=Zn=tn=null,cu=!1,uu=dp=0,du=null}function dn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bi===null?tn.memoizedState=Bi=o:Bi=Bi.next=o,Bi}function Ht(){if(Zn===null){var o=tn.alternate;o=o!==null?o.memoizedState:null}else o=Zn.next;var l=Bi===null?tn.memoizedState:Bi.next;if(l!==null)Bi=l,Zn=o;else{if(o===null)throw tn.alternate===null?Error(a(467)):Error(a(310));Zn=o,o={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},Bi===null?tn.memoizedState=Bi=o:Bi=Bi.next=o}return Bi}function Tn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qn(o){var l=uu;return uu+=1,du===null&&(du=[]),o=tt(du,o,l),l=tn,(Bi===null?l.memoizedState:Bi.next)===null&&(l=l.alternate,It.H=l===null||l.memoizedState===null?V0:Kg),o}function je(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Qn(o);if(o.$$typeof===bo)return ee(o)}throw Error(a(438,String(o)))}function Li(o){var l=null,h=tn.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var A=tn.alternate;A!==null&&(A=A.updateQueue,A!==null&&(A=A.memoCache,A!=null&&(l={data:A.data.map(function(E){return E.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=Tn(),tn.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(o),A=0;A<o;A++)h[A]=Fa;return l.index++,h}function Kt(o,l){return typeof l=="function"?l(o):l}function Hi(o){var l=Ht();return Ii(l,Zn,o)}function Ii(o,l,h){var A=o.queue;if(A===null)throw Error(a(311));A.lastRenderedReducer=h;var E=o.baseQueue,R=A.pending;if(R!==null){if(E!==null){var W=E.next;E.next=R.next,R.next=W}l.baseQueue=E=R,A.pending=null}if(R=o.baseState,E===null)o.memoizedState=R;else{l=E.next;var te=W=null,Re=null,Ve=l,$e=!1;do{var Je=Ve.lane&-536870913;if(Je!==Ve.lane?(bn&Je)===Je:(Ro&Je)===Je){var At=Ve.revertLane;if(At===0)Re!==null&&(Re=Re.next={lane:0,revertLane:0,gesture:null,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null}),Je===au&&($e=!0);else if((Ro&At)===At){Ve=Ve.next,At===au&&($e=!0);continue}else Je={lane:0,revertLane:Ve.revertLane,gesture:null,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null},Re===null?(te=Re=Je,W=R):Re=Re.next=Je,tn.lanes|=At,ml|=At;Je=Ve.action,tc&&h(R,Je),R=Ve.hasEagerState?Ve.eagerState:h(R,Je)}else At={lane:Je,revertLane:Ve.revertLane,gesture:Ve.gesture,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null},Re===null?(te=Re=At,W=R):Re=Re.next=At,tn.lanes|=Je,ml|=Je;Ve=Ve.next}while(Ve!==null&&Ve!==l);if(Re===null?W=R:Re.next=te,!pr(R,o.memoizedState)&&(Ui=!0,$e&&(h=ou,h!==null)))throw h;o.memoizedState=R,o.baseState=W,o.baseQueue=Re,A.lastRenderedState=R}return E===null&&(A.lanes=0),[o.memoizedState,A.dispatch]}function yr(o){var l=Ht(),h=l.queue;if(h===null)throw Error(a(311));h.lastRenderedReducer=o;var A=h.dispatch,E=h.pending,R=l.memoizedState;if(E!==null){h.pending=null;var W=E=E.next;do R=o(R,W.action),W=W.next;while(W!==E);pr(R,l.memoizedState)||(Ui=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),h.lastRenderedState=R}return[R,A]}function Ki(o,l,h){var A=tn,E=Ht(),R=gn;if(R){if(h===void 0)throw Error(a(407));h=h()}else h=l();var W=!pr((Zn||E).memoizedState,h);if(W&&(E.memoizedState=h,Ui=!0),E=E.queue,Kf(Wr.bind(null,A,E,o),[o]),E.getSnapshot!==l||W||Bi!==null&&Bi.memoizedState.tag&1){if(A.flags|=2048,Lr(9,{destroy:void 0},zn.bind(null,A,E,h,l),null),$n===null)throw Error(a(349));R||(Ro&127)!==0||Gn(A,l,h)}return h}function Gn(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=tn.updateQueue,l===null?(l=Tn(),tn.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function zn(o,l,h,A){l.value=h,l.getSnapshot=A,Dn(l)&&jr(o)}function Wr(o,l,h){return h(function(){Dn(l)&&jr(o)})}function Dn(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!pr(o,h)}catch{return!0}}function jr(o){var l=Ps(o,2);l!==null&&Nr(l,o,2)}function gi(o){var l=dn();if(typeof o=="function"){var h=o;if(o=h(),tc){K(!0);try{h()}finally{K(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:o},l}function cr(o,l,h,A){return o.baseState=h,Ii(o,Zn,typeof A=="function"?A:Kt)}function Da(o,l,h,A,E){if(_o(o))throw Error(a(485));if(o=l.action,o!==null){var R={payload:E,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(W){R.listeners.push(W)}};It.T!==null?h(!0):R.isTransition=!1,A(R),h=l.pending,h===null?(R.next=l.pending=R,na(l,R)):(R.next=h.next,l.pending=h.next=R)}}function na(o,l){var h=l.action,A=l.payload,E=o.state;if(l.isTransition){var R=It.T,W={};It.T=W;try{var te=h(E,A),Re=It.S;Re!==null&&Re(W,te),ia(o,l,te)}catch(Ve){td(o,l,Ve)}finally{R!==null&&W.types!==null&&(R.types=W.types),It.T=R}}else try{R=h(E,A),ia(o,l,R)}catch(Ve){td(o,l,Ve)}}function ia(o,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(A){ra(o,l,A)},function(A){return td(o,l,A)}):ra(o,l,h)}function ra(o,l,h){l.status="fulfilled",l.value=h,Zf(l),o.state=h,l=o.pending,l!==null&&(h=l.next,h===l?o.pending=null:(h=h.next,l.next=h,na(o,h)))}function td(o,l,h){var A=o.pending;if(o.pending=null,A!==null){A=A.next;do l.status="rejected",l.reason=h,Zf(l),l=l.next;while(l!==A)}o.action=null}function Zf(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function jm(o,l){return l}function sa(o,l){if(gn){var h=$n.formState;if(h!==null){e:{var A=tn;if(gn){if(oi){var E=g0(oi,Os);if(E){oi=Ug(E),A=A0(E);break e}}pt(A)}A=!1}A&&(l=h[0])}}h=dn(),h.memoizedState=h.baseState=l,A={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:l},h.queue=A,h=ih.bind(null,tn,A),A.dispatch=h,A=gi(!1);var R=Uc.bind(null,tn,!1,A.queue);return A=dn(),E={state:l,dispatch:null,action:o,pending:null},A.queue=E,h=Da.bind(null,tn,E,R,h),E.dispatch=h,A.memoizedState=o,[l,h,!1]}function Xm(o){var l=Ht();return aa(l,Zn,o)}function aa(o,l,h){if(l=Ii(o,l,jm)[0],o=Hi(Kt)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var A=Qn(l)}catch(W){throw W===lu?op:W}else A=l;l=Ht();var E=l.queue,R=E.dispatch;return h!==l.memoizedState&&(tn.flags|=2048,Lr(9,{destroy:void 0},nd.bind(null,E,h),null)),[A,R,o]}function nd(o,l){o.action=l}function id(o){var l=Ht(),h=Zn;if(h!==null)return aa(l,h,o);Ht(),l=l.memoizedState,h=Ht();var A=h.queue.dispatch;return h.memoizedState=o,[l,A,!1]}function Lr(o,l,h,A){return o={tag:o,create:h,deps:A,inst:l,next:null},l=tn.updateQueue,l===null&&(l=Tn(),tn.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=o.next=o:(A=h.next,h.next=o,o.next=A,l.lastEffect=o),o}function Bl(){return Ht().memoizedState}function rd(o,l,h,A){var E=dn();tn.flags|=o,E.memoizedState=Lr(1|l,{destroy:void 0},h,A===void 0?null:A)}function Bc(o,l,h,A){var E=Ht();A=A===void 0?null:A;var R=E.memoizedState.inst;Zn!==null&&A!==null&&dt(A,Zn.memoizedState.deps)?E.memoizedState=Lr(l,R,h,A):(tn.flags|=o,E.memoizedState=Lr(1|l,R,h,A))}function qm(o,l){rd(8390656,8,o,l)}function Kf(o,l){Bc(2048,8,o,l)}function Iv(o){tn.flags|=4;var l=tn.updateQueue;if(l===null)l=Tn(),tn.updateQueue=l,l.events=[o];else{var h=l.events;h===null?l.events=[o]:h.push(o)}}function _f(o){var l=Ht().memoizedState;return Iv({ref:l,nextImpl:o}),function(){if((An&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}function Ym(o,l){return Bc(4,2,o,l)}function $f(o,l){return Bc(4,4,o,l)}function Nv(o,l){if(typeof l=="function"){o=o();var h=l(o);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Jm(o,l,h){h=h!=null?h.concat([o]):null,Bc(4,4,Nv.bind(null,l,o),h)}function Qm(){}function eh(o,l){var h=Ht();l=l===void 0?null:l;var A=h.memoizedState;return l!==null&&dt(l,A[1])?A[0]:(h.memoizedState=[o,l],o)}function sd(o,l){var h=Ht();l=l===void 0?null:l;var A=h.memoizedState;if(l!==null&&dt(l,A[1]))return A[0];if(A=o(),tc){K(!0);try{o()}finally{K(!1)}}return h.memoizedState=[A,l],A}function th(o,l,h){return h===void 0||(Ro&1073741824)!==0&&(bn&261930)===0?o.memoizedState=l:(o.memoizedState=h,o=Md(),tn.lanes|=o,ml|=o,h)}function ad(o,l,h,A){return pr(h,l)?h:qa.current!==null?(o=th(o,h,A),pr(o,l)||(Ui=!0),o):(Ro&42)===0||(Ro&1073741824)!==0&&(bn&261930)===0?(Ui=!0,o.memoizedState=h):(o=Md(),tn.lanes|=o,ml|=o,l)}function Zm(o,l,h,A,E){var R=Va();Gi(R!==0&&8>R?R:8);var W=It.T,te={};It.T=te,Uc(o,!1,l,h);try{var Re=E(),Ve=It.S;if(Ve!==null&&Ve(te,Re),Re!==null&&typeof Re=="object"&&typeof Re.then=="function"){var $e=Ct(Re,A);Ko(o,l,$e,Yr(o))}else Ko(o,l,A,Yr(o))}catch(Je){Ko(o,l,{then:function(){},status:"rejected",reason:Je},Yr())}finally{Gi(R),W!==null&&te.types!==null&&(W.types=te.types),It.T=W}}function Km(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:Br,baseState:Br,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:Br},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:h},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function nh(){return ee(ll)}function ho(){return Ht().memoizedState}function _m(){return Ht().memoizedState}function zv(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var h=Yr();o=lr(h);var A=ls(l,o,h);A!==null&&(Nr(A,l,h),Qo(A,l,h)),l={cache:Y()},o.payload=l;return}l=l.return}}function ur(o,l,h){var A=Yr();h={lane:A,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},_o(o)?$m(l,h):(h=Rs(o,l,h,A),h!==null&&(Nr(h,o,A),od(h,l,A)))}function ih(o,l,h){var A=Yr();Ko(o,l,h,A)}function Ko(o,l,h,A){var E={lane:A,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(_o(o))$m(l,E);else{var R=o.alternate;if(o.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var W=l.lastRenderedState,te=R(W,h);if(E.hasEagerState=!0,E.eagerState=te,pr(te,W))return $s(o,l,E,0),$n===null&&Zi(),!1}catch{}finally{}if(h=Rs(o,l,E,A),h!==null)return Nr(h,o,A),od(h,l,A),!0}return!1}function Uc(o,l,h,A){if(A={lane:2,revertLane:rt(),gesture:null,action:A,hasEagerState:!1,eagerState:null,next:null},_o(o)){if(l)throw Error(a(479))}else l=Rs(o,h,A,2),l!==null&&Nr(l,o,2)}function _o(o){var l=o.alternate;return o===tn||l!==null&&l===tn}function $m(o,l){cu=up=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function od(o,l,h){if((h&4194048)!==0){var A=l.lanes;A&=o.pendingLanes,h|=A,l.lanes=h,F(o,h)}}function rh(o,l,h,A){l=o.memoizedState,h=h(A,l),h=h==null?l:us({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}function ld(o,l,h,A,E,R,W){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(A,R,W):l.prototype&&l.prototype.isPureReactComponent?!Le(h,A)||!Le(E,R):!0}function eg(o,l,h,A){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,A),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,A),l.state!==o&&fp.enqueueReplaceState(l,l.state,null)}function La(o,l){var h=l;if("ref"in l){h={};for(var A in l)A!=="ref"&&(h[A]=l[A])}if(o=o.defaultProps){h===l&&(h=us({},h));for(var E in o)h[E]===void 0&&(h[E]=o[E])}return h}function cd(o,l){try{var h=o.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(A){setTimeout(function(){throw A})}}function tg(o,l,h){try{var A=o.onCaughtError;A(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Fc(o,l,h){return h=lr(h),h.tag=3,h.payload={element:null},h.callback=function(){cd(o,l)},h}function ud(o){return o=lr(o),o.tag=3,o}function sh(o,l,h,A){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var R=A.value;o.payload=function(){return E(R)},o.callback=function(){tg(l,h,A)}}var W=h.stateNode;W!==null&&typeof W.componentDidCatch=="function"&&(o.callback=function(){tg(l,h,A),typeof E!="function"&&(gl===null?gl=new Set([this]):gl.add(this));var te=A.stack;this.componentDidCatch(A.value,{componentStack:te!==null?te:""})})}function br(o,l,h,A,E){if(h.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){if(l=h.alternate,l!==null&&bt(l,h,E,!0),h=fs.current,h!==null){switch(h.tag){case 31:case 13:return Aa===null?qc():h.alternate===null&&vi===0&&(vi=3),h.flags&=-257,h.flags|=65536,h.lanes=E,A===lp?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([A]):l.add(A),Dh(o,A,E)),!1;case 22:return h.flags|=65536,A===lp?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([A])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([A]):h.add(A)),Dh(o,A,E)),!1}throw Error(a(435,h.tag))}return Dh(o,A,E),qc(),!1}if(gn)return l=fs.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=E,A!==qg&&(o=Error(a(422),{cause:A}),xe(ce(o,h)))):(A!==qg&&(l=Error(a(423),{cause:A}),xe(ce(l,h))),o=o.current.alternate,o.flags|=65536,E&=-E,o.lanes|=E,A=ce(A,h),E=Fc(o.stateNode,A,E),Zo(o,E),vi!==4&&(vi=2)),!1;var R=Error(a(520),{cause:A});if(R=ce(R,h),Kd===null?Kd=[R]:Kd.push(R),vi!==4&&(vi=2),l===null)return!0;A=ce(A,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,o=E&-E,h.lanes|=o,o=Fc(h.stateNode,A,o),Zo(h,o),!1;case 1:if(l=h.type,R=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(gl===null||!gl.has(R))))return h.flags|=65536,E&=-E,h.lanes|=E,E=ud(E),sh(E,o,h,A),Zo(h,E),!1}h=h.return}while(h!==null);return!1}function _i(o,l,h,A){l.child=o===null?O0(l,null,h,A):ec(l,o.child,h,A)}function dd(o,l,h,A,E){h=h.render;var R=l.ref;if("ref"in A){var W={};for(var te in A)te!=="ref"&&(W[te]=A[te])}else W=A;return Et(l),A=at(o,l,h,W,R,E),te=Ot(),o!==null&&!Ui?(vt(o,l,E),Xr(o,l,E)):(gn&&te&&Fe(l),l.flags|=1,_i(o,l,A,E),l.child)}function ah(o,l,h,A,E){if(o===null){var R=h.type;return typeof R=="function"&&!Cd(R)&&R.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=R,oh(o,l,R,A,E)):(o=Rd(h.type,null,A,l,l.mode,E),o.ref=l.ref,o.return=l,l.child=o)}if(R=o.child,!Hc(o,E)){var W=R.memoizedProps;if(h=h.compare,h=h!==null?h:Le,h(W,A)&&o.ref===l.ref)return Xr(o,l,E)}return l.flags|=1,o=Ua(R,A),o.ref=l.ref,o.return=l,l.child=o}function oh(o,l,h,A,E){if(o!==null){var R=o.memoizedProps;if(Le(R,A)&&o.ref===l.ref)if(Ui=!1,l.pendingProps=A=R,Hc(o,E))(o.flags&131072)!==0&&(Ui=!0);else return l.lanes=o.lanes,Xr(o,l,E)}return ng(o,l,h,A,E)}function po(o,l,h,A){var E=A.children,R=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),A.mode==="hidden"){if((l.flags&128)!==0){if(R=R!==null?R.baseLanes|h:h,o!==null){for(A=l.child=o.child,E=0;A!==null;)E=E|A.lanes|A.childLanes,A=A.sibling;A=E&~R}else A=0,l.child=null;return Oc(o,l,R,h,A)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&ae(l,R!==null?R.cachePool:null),R!==null?xt(l,R):zl(),oe(l);else return A=l.lanes=536870912,Oc(o,l,R!==null?R.baseLanes|h:h,h,A)}else R!==null?(ae(l,R.cachePool),xt(l,R),Ae(),l.memoizedState=null):(o!==null&&ae(l,null),zl(),Ae());return _i(o,l,E,h),l.child}function Ds(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Oc(o,l,h,A,E){var R=jt();return R=R===null?null:{parent:zs?di._currentValue:di._currentValue2,pool:R},l.memoizedState={baseLanes:h,cachePool:R},o!==null&&ae(l,null),zl(),oe(l),o!==null&&bt(o,l,A,!0),l.childLanes=E,null}function Ul(o,l){return l=oa({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function Vc(o,l,h){return ec(l,o.child,null,h),o=Ul(l,l.pendingProps),o.flags|=2,he(l),l.memoizedState=null,o}function fd(o,l,h){var A=l.pendingProps,E=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(gn){if(A.mode==="hidden")return o=Ul(l,A),l.lanes=536870912,Ds(null,o);if(G(l),(o=oi)?(o=x0(o,Os),o!==null&&(l.memoizedState={dehydrated:o,treeContext:Eo!==null?{id:Ur,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},h=Nh(o),h.return=l,l.child=h,Wi=l,oi=null)):o=null,o===null)throw pt(l);return l.lanes=536870912,null}return Ul(l,A)}var R=o.memoizedState;if(R!==null){var W=R.dehydrated;if(G(l),E)if(l.flags&256)l.flags&=-257,l=Vc(o,l,h);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(a(558));else if(Ui||bt(o,l,h,!1),E=(h&o.childLanes)!==0,Ui||E){if(A=$n,A!==null&&(W=V(A,h),W!==0&&W!==R.retryLane))throw R.retryLane=W,Ps(o,W),Nr(A,o,W),hp;qc(),l=Vc(o,l,h)}else o=R.treeContext,fr&&(oi=Fg(W),Wi=l,gn=!0,Co=null,Os=!1,o!==null&&ht(l,o)),l=Ul(l,A),l.flags|=4096;return l}return o=Ua(o.child,{mode:A.mode,children:A.children}),o.ref=l.ref,l.child=o,o.return=l,o}function hd(o,l){var h=l.ref;if(h===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(a(284));(o===null||o.ref!==h)&&(l.flags|=4194816)}}function ng(o,l,h,A,E){return Et(l),h=at(o,l,h,A,void 0,E),A=Ot(),o!==null&&!Ui?(vt(o,l,E),Xr(o,l,E)):(gn&&A&&Fe(l),l.flags|=1,_i(o,l,h,E),l.child)}function ig(o,l,h,A,E,R){return Et(l),l.updateQueue=null,h=Tt(l,A,h,E),St(o),A=Ot(),o!==null&&!Ui?(vt(o,l,R),Xr(o,l,R)):(gn&&A&&Fe(l),l.flags|=1,_i(o,l,h,R),l.child)}function rg(o,l,h,A,E){if(Et(l),l.stateNode===null){var R=Zl,W=h.contextType;typeof W=="object"&&W!==null&&(R=ee(W)),R=new h(A,R),l.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=fp,l.stateNode=R,R._reactInternals=l,R=l.stateNode,R.props=A,R.state=l.memoizedState,R.refs={},Jo(l),W=h.contextType,R.context=typeof W=="object"&&W!==null?ee(W):Zl,R.state=l.memoizedState,W=h.getDerivedStateFromProps,typeof W=="function"&&(rh(l,h,W,A),R.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(W=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),W!==R.state&&fp.enqueueReplaceState(R,R.state,null),ks(l,A,R,E),fo(),R.state=l.memoizedState),typeof R.componentDidMount=="function"&&(l.flags|=4194308),A=!0}else if(o===null){R=l.stateNode;var te=l.memoizedProps,Re=La(h,te);R.props=Re;var Ve=R.context,$e=h.contextType;W=Zl,typeof $e=="object"&&$e!==null&&(W=ee($e));var Je=h.getDerivedStateFromProps;$e=typeof Je=="function"||typeof R.getSnapshotBeforeUpdate=="function",te=l.pendingProps!==te,$e||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(te||Ve!==W)&&eg(l,R,A,W),fl=!1;var At=l.memoizedState;R.state=At,ks(l,A,R,E),fo(),Ve=l.memoizedState,te||At!==Ve||fl?(typeof Je=="function"&&(rh(l,h,Je,A),Ve=l.memoizedState),(Re=fl||ld(l,h,Re,A,At,Ve,W))?($e||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=A,l.memoizedState=Ve),R.props=A,R.state=Ve,R.context=W,A=Re):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),A=!1)}else{R=l.stateNode,Dr(o,l),W=l.memoizedProps,$e=La(h,W),R.props=$e,Je=l.pendingProps,At=R.context,Ve=h.contextType,Re=Zl,typeof Ve=="object"&&Ve!==null&&(Re=ee(Ve)),te=h.getDerivedStateFromProps,(Ve=typeof te=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(W!==Je||At!==Re)&&eg(l,R,A,Re),fl=!1,At=l.memoizedState,R.state=At,ks(l,A,R,E),fo();var Ft=l.memoizedState;W!==Je||At!==Ft||fl||o!==null&&o.dependencies!==null&&zt(o.dependencies)?(typeof te=="function"&&(rh(l,h,te,A),Ft=l.memoizedState),($e=fl||ld(l,h,$e,A,At,Ft,Re)||o!==null&&o.dependencies!==null&&zt(o.dependencies))?(Ve||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(A,Ft,Re),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(A,Ft,Re)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=1024),l.memoizedProps=A,l.memoizedState=Ft),R.props=A,R.state=Ft,R.context=Re,A=$e):(typeof R.componentDidUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=1024),A=!1)}return R=A,hd(o,l),A=(l.flags&128)!==0,R||A?(R=l.stateNode,h=A&&typeof h.getDerivedStateFromError!="function"?null:R.render(),l.flags|=1,o!==null&&A?(l.child=ec(l,o.child,null,E),l.child=ec(l,null,h,E)):_i(o,l,h,E),l.memoizedState=R.state,o=l.child):o=Xr(o,l,E),o}function lh(o,l,h,A){return Dt(),l.flags|=256,_i(o,l,h,A),l.child}function pd(o){return{baseLanes:o,cachePool:_e()}}function Ia(o,l,h){return o=o!==null?o.childLanes&~h:0,l&&(o|=ps),o}function ch(o,l,h){var A=l.pendingProps,E=!1,R=(l.flags&128)!==0,W;if((W=R)||(W=o!==null&&o.memoizedState===null?!1:(Ei.current&2)!==0),W&&(E=!0,l.flags&=-129),W=(l.flags&32)!==0,l.flags&=-33,o===null){if(gn){if(E?ta(l):Ae(),(o=oi)?(o=xS(o,Os),o!==null&&(l.memoizedState={dehydrated:o,treeContext:Eo!==null?{id:Ur,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},h=Nh(o),h.return=l,l.child=h,Wi=l,oi=null)):o=null,o===null)throw pt(l);return Vd(o)?l.lanes=32:l.lanes=536870912,null}var te=A.children;return A=A.fallback,E?(Ae(),E=l.mode,te=oa({mode:"hidden",children:te},E),A=yo(A,E,h,null),te.return=l,A.return=l,te.sibling=A,l.child=te,A=l.child,A.memoizedState=pd(h),A.childLanes=Ia(o,W,h),l.memoizedState=pp,Ds(null,A)):(ta(l),uh(l,te))}var Re=o.memoizedState;if(Re!==null&&(te=Re.dehydrated,te!==null)){if(R)l.flags&256?(ta(l),l.flags&=-257,l=Ir(o,l,h)):l.memoizedState!==null?(Ae(),l.child=o.child,l.flags|=128,l=null):(Ae(),te=A.fallback,E=l.mode,A=oa({mode:"visible",children:A.children},E),te=yo(te,E,h,null),te.flags|=2,A.return=l,te.return=l,A.sibling=te,l.child=A,ec(l,o.child,null,h),A=l.child,A.memoizedState=pd(h),A.childLanes=Ia(o,W,h),l.memoizedState=pp,l=Ds(null,A));else if(ta(l),Vd(te))W=Yl(te).digest,A=Error(a(419)),A.stack="",A.digest=W,xe({value:A,source:null,stack:null}),l=Ir(o,l,h);else if(Ui||bt(o,l,h,!1),W=(h&o.childLanes)!==0,Ui||W){if(W=$n,W!==null&&(A=V(W,h),A!==0&&A!==Re.retryLane))throw Re.retryLane=A,Ps(o,A),Nr(W,o,A),hp;Od(te)||qc(),l=Ir(o,l,h)}else Od(te)?(l.flags|=192,l.child=o.child,l=null):(o=Re.treeContext,fr&&(oi=y0(te),Wi=l,gn=!0,Co=null,Os=!1,o!==null&&ht(l,o)),l=uh(l,A.children),l.flags|=4096);return l}return E?(Ae(),te=A.fallback,E=l.mode,Re=o.child,R=Re.sibling,A=Ua(Re,{mode:"hidden",children:A.children}),A.subtreeFlags=Re.subtreeFlags&65011712,R!==null?te=Ua(R,te):(te=yo(te,E,h,null),te.flags|=2),te.return=l,A.return=l,A.sibling=te,l.child=A,Ds(null,A),A=l.child,te=o.child.memoizedState,te===null?te=pd(h):(E=te.cachePool,E!==null?(Re=zs?di._currentValue:di._currentValue2,E=E.parent!==Re?{parent:Re,pool:Re}:E):E=_e(),te={baseLanes:te.baseLanes|h,cachePool:E}),A.memoizedState=te,A.childLanes=Ia(o,W,h),l.memoizedState=pp,Ds(o.child,A)):(ta(l),h=o.child,o=h.sibling,h=Ua(h,{mode:"visible",children:A.children}),h.return=l,h.sibling=null,o!==null&&(W=l.deletions,W===null?(l.deletions=[o],l.flags|=16):W.push(o)),l.child=h,l.memoizedState=null,h)}function uh(o,l){return l=oa({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function oa(o,l){return o=t(22,o,null,l),o.lanes=0,o}function Ir(o,l,h){return ec(l,o.child,null,h),o=uh(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function md(o,l,h){o.lanes|=l;var A=o.alternate;A!==null&&(A.lanes|=l),Ze(o.return,l,h)}function en(o,l,h,A,E,R){var W=o.memoizedState;W===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:A,tail:h,tailMode:E,treeForkCount:R}:(W.isBackwards=l,W.rendering=null,W.renderingStartTime=0,W.last=A,W.tail=h,W.tailMode=E,W.treeForkCount=R)}function Ge(o,l,h){var A=l.pendingProps,E=A.revealOrder,R=A.tail;A=A.children;var W=Ei.current,te=(W&2)!==0;if(te?(W=W&1|2,l.flags|=128):W&=1,w(Ei,W),_i(o,l,A,h),A=gn?be:0,!te&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&md(o,h,l);else if(o.tag===19)md(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(E){case"forwards":for(h=l.child,E=null;h!==null;)o=h.alternate,o!==null&&ge(o)===null&&(E=h),h=h.sibling;h=E,h===null?(E=l.child,l.child=null):(E=h.sibling,h.sibling=null),en(l,!1,E,h,R,A);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=l.child,l.child=null;E!==null;){if(o=E.alternate,o!==null&&ge(o)===null){l.child=E;break}o=E.sibling,E.sibling=h,h=E,E=o}en(l,!0,h,null,R,A);break;case"together":en(l,!1,null,null,void 0,A);break;default:l.memoizedState=null}return l.child}function Xr(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),ml|=l.lanes,(h&l.childLanes)===0)if(o!==null){if(bt(o,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(a(153));if(l.child!==null){for(o=l.child,h=Ua(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=Ua(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function Hc(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&zt(o)))}function Ai(o,l,h){switch(l.tag){case 3:ct(l,l.stateNode.containerInfo),Ue(l,di,o.memoizedState.cache),Dt();break;case 27:case 5:Xe(l);break;case 4:ct(l,l.stateNode.containerInfo);break;case 10:Ue(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,G(l),null;break;case 13:var A=l.memoizedState;if(A!==null)return A.dehydrated!==null?(ta(l),l.flags|=128,null):(h&l.child.childLanes)!==0?ch(o,l,h):(ta(l),o=Xr(o,l,h),o!==null?o.sibling:null);ta(l);break;case 19:var E=(o.flags&128)!==0;if(A=(h&l.childLanes)!==0,A||(bt(o,l,h,!1),A=(h&l.childLanes)!==0),E){if(A)return Ge(o,l,h);l.flags|=128}if(E=l.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),w(Ei,Ei.current),A)break;return null;case 22:return l.lanes=0,po(o,l,h,l.pendingProps);case 24:Ue(l,di,o.memoizedState.cache)}return Xr(o,l,h)}function dh(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps)Ui=!0;else{if(!Hc(o,h)&&(l.flags&128)===0)return Ui=!1,Ai(o,l,h);Ui=(o.flags&131072)!==0}else Ui=!1,gn&&(l.flags&1048576)!==0&&Te(l,be,l.index);switch(l.lanes=0,l.tag){case 16:e:{var A=l.pendingProps;if(o=Ne(l.elementType),l.type=o,typeof o=="function")Cd(o)?(A=La(o,A),l.tag=1,l=rg(null,l,o,A,h)):(l.tag=0,l=ng(null,l,o,A,h));else{if(o!=null){var E=o.$$typeof;if(E===Jc){l.tag=11,l=dd(null,l,o,A,h);break e}else if(E===Eg){l.tag=14,l=ah(null,l,o,A,h);break e}}throw l=M(o)||o,Error(a(306,l,""))}}return l;case 0:return ng(o,l,l.type,l.pendingProps,h);case 1:return A=l.type,E=La(A,l.pendingProps),rg(o,l,A,E,h);case 3:e:{if(ct(l,l.stateNode.containerInfo),o===null)throw Error(a(387));var R=l.pendingProps;E=l.memoizedState,A=E.element,Dr(o,l),ks(l,R,null,h);var W=l.memoizedState;if(R=W.cache,Ue(l,di,R),R!==E.cache&&Pt(l,[di],h,!0),fo(),R=W.element,fr&&E.isDehydrated)if(E={element:R,isDehydrated:!1,cache:W.cache},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){l=lh(o,l,R,h);break e}else if(R!==A){A=ce(Error(a(424)),l),xe(A),l=lh(o,l,R,h);break e}else for(fr&&(oi=Yh(l.stateNode.containerInfo),Wi=l,gn=!0,Co=null,Os=!0),h=O0(l,null,R,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Dt(),R===A){l=Xr(o,l,h);break e}_i(o,l,R,h)}l=l.child}return l;case 26:if(Bs)return hd(o,l),o===null?(h=$c(l.type,null,l.pendingProps,null))?l.memoizedState=h:gn||(l.stateNode=I0(l.type,l.pendingProps,ul.current,l)):l.memoizedState=$c(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:if(Ni)return Xe(l),o===null&&Ni&&gn&&(A=l.stateNode=_h(l.type,l.pendingProps,ul.current,mr.current,!1),Wi=l,Os=!0,oi=yS(l.type,A,oi)),_i(o,l,l.pendingProps.children,h),hd(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&gn&&(wS(l.type,l.pendingProps,mr.current),(E=A=oi)&&(A=bS(A,l.type,l.pendingProps,Os),A!==null?(l.stateNode=A,Wi=l,oi=qh(A),Os=!1,E=!0):E=!1),E||pt(l)),Xe(l),E=l.type,R=l.pendingProps,W=o!==null?o.memoizedProps:null,A=R.children,zd(E,R)?A=null:W!==null&&zd(E,W)&&(l.flags|=32),l.memoizedState!==null&&(E=at(o,l,Xt,null,null,h),zs?ll._currentValue=E:ll._currentValue2=E),hd(o,l),_i(o,l,A,h),l.child;case 6:return o===null&&gn&&(Hg(l.pendingProps,mr.current),(o=h=oi)&&(h=b0(h,l.pendingProps,Os),h!==null?(l.stateNode=h,Wi=l,oi=null,o=!0):o=!1),o||pt(l)),null;case 13:return ch(o,l,h);case 4:return ct(l,l.stateNode.containerInfo),A=l.pendingProps,o===null?l.child=ec(l,null,A,h):_i(o,l,A,h),l.child;case 11:return dd(o,l,l.type,l.pendingProps,h);case 7:return _i(o,l,l.pendingProps,h),l.child;case 8:return _i(o,l,l.pendingProps.children,h),l.child;case 12:return _i(o,l,l.pendingProps.children,h),l.child;case 10:return A=l.pendingProps,Ue(l,l.type,A.value),_i(o,l,A.children,h),l.child;case 9:return E=l.type._context,A=l.pendingProps.children,Et(l),E=ee(E),A=A(E),l.flags|=1,_i(o,l,A,h),l.child;case 14:return ah(o,l,l.type,l.pendingProps,h);case 15:return oh(o,l,l.type,l.pendingProps,h);case 19:return Ge(o,l,h);case 31:return fd(o,l,h);case 22:return po(o,l,h,l.pendingProps);case 24:return Et(l),A=ee(di),o===null?(E=jt(),E===null&&(E=$n,R=Y(),E.pooledCache=R,R.refCount++,R!==null&&(E.pooledCacheLanes|=h),E=R),l.memoizedState={parent:A,cache:E},Jo(l),Ue(l,di,E)):((o.lanes&h)!==0&&(Dr(o,l),ks(l,null,null,h),fo()),E=o.memoizedState,R=l.memoizedState,E.parent!==A?(E={parent:A,cache:A},l.memoizedState=E,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=E),Ue(l,di,A)):(A=R.cache,Ue(l,di,A),A!==E.cache&&Pt(l,[di],h,!0))),_i(o,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(a(156,l.tag))}function cs(o){o.flags|=4}function gd(o){fa&&(o.flags|=8)}function fh(o,l){if(o!==null&&o.child===l.child)return!1;if((l.flags&16)!==0)return!0;for(o=l.child;o!==null;){if((o.flags&8218)!==0||(o.subtreeFlags&8218)!==0)return!0;o=o.sibling}return!1}function sg(o,l,h,A){if(Mr)for(h=l.child;h!==null;){if(h.tag===5||h.tag===6)Hh(o,h.stateNode);else if(!(h.tag===4||Ni&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(fa)for(var E=l.child;E!==null;){if(E.tag===5){var R=E.stateNode;h&&A&&(R=So(R,E.type,E.memoizedProps)),Hh(o,R)}else if(E.tag===6)R=E.stateNode,h&&A&&(R=Fd(R,E.memoizedProps)),Hh(o,R);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)R=E.child,R!==null&&(R.return=E),sg(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function hh(o,l,h,A){var E=!1;if(fa)for(var R=l.child;R!==null;){if(R.tag===5){var W=R.stateNode;h&&A&&(W=So(W,R.type,R.memoizedProps)),Bg(o,W)}else if(R.tag===6)W=R.stateNode,h&&A&&(W=Fd(W,R.memoizedProps)),Bg(o,W);else if(R.tag!==4){if(R.tag===22&&R.memoizedState!==null)E=R.child,E!==null&&(E.return=R),hh(o,R,!0,!0),E=!0;else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===l)break;for(;R.sibling===null;){if(R.return===null||R.return===l)return E;R=R.return}R.sibling.return=R.return,R=R.sibling}return E}function ph(o,l){if(fa&&fh(o,l)){o=l.stateNode;var h=o.containerInfo,A=ai();hh(A,l,!1,!1),o.pendingChildren=A,cs(l),p0(h,A)}}function Ad(o,l,h,A){if(Mr)o.memoizedProps!==A&&cs(l);else if(fa){var E=o.stateNode,R=o.memoizedProps;if((o=fh(o,l))||R!==A){var W=mr.current;R=h0(E,h,R,A,!o,null),R===E?l.stateNode=E:(gd(l),Zv(R,h,A,W)&&cs(l),l.stateNode=R,o&&sg(R,l,!1,!1))}else l.stateNode=E}}function dr(o,l,h,A,E){if((o.mode&32)!==0&&(h===null?e0(l,A):AS(l,h,A))){if(o.flags|=16777216,(E&335544128)===E||Qc(l,A))if(hr(o.stateNode,l,A))o.flags|=8192;else if(Wv())o.flags|=8192;else throw Vs=lp,ap}else o.flags&=-16777217}function Fn(o,l){if(TS(l)){if(o.flags|=16777216,!Kh(l))if(Wv())o.flags|=8192;else throw Vs=lp,ap}else o.flags&=-16777217}function Fl(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?L():536870912,o.lanes|=l,fu|=l)}function mo(o,l){if(!gn)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var A=null;h!==null;)h.alternate!==null&&(A=h),h=h.sibling;A===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:A.sibling=null}}function Bn(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,A=0;if(l)for(var E=o.child;E!==null;)h|=E.lanes|E.childLanes,A|=E.subtreeFlags&65011712,A|=E.flags&65011712,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)h|=E.lanes|E.childLanes,A|=E.subtreeFlags,A|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=A,o.childLanes=h,l}function Ol(o,l,h){var A=l.pendingProps;switch(lt(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bn(l),null;case 1:return Bn(l),null;case 3:return h=l.stateNode,A=null,o!==null&&(A=o.memoizedState.cache),l.memoizedState.cache!==A&&(l.flags|=2048),qe(di),Pe(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(sn(l)?cs(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Be())),ph(o,l),Bn(l),null;case 26:if(Bs){var E=l.type,R=l.memoizedState;return o===null?(cs(l),R!==null?(Bn(l),Fn(l,R)):(Bn(l),dr(l,E,null,A,h))):R?R!==o.memoizedState?(cs(l),Bn(l),Fn(l,R)):(Bn(l),l.flags&=-16777217):(R=o.memoizedProps,Mr?R!==A&&cs(l):Ad(o,l,E,A),Bn(l),dr(l,E,R,A,h)),null}case 27:if(Ni){if(He(l),h=ul.current,E=l.type,o!==null&&l.stateNode!=null)Mr?o.memoizedProps!==A&&cs(l):Ad(o,l,E,A);else{if(!A){if(l.stateNode===null)throw Error(a(166));return Bn(l),null}o=mr.current,sn(l)?Nt(l,o):(o=_h(E,A,h,o,!0),l.stateNode=o,cs(l))}return Bn(l),null}case 5:if(He(l),E=l.type,o!==null&&l.stateNode!=null)Ad(o,l,E,A);else{if(!A){if(l.stateNode===null)throw Error(a(166));return Bn(l),null}if(R=mr.current,sn(l))Nt(l,R),C0(l.stateNode,E,A,R)&&(l.flags|=64);else{var W=Oa(E,A,ul.current,R,l);gd(l),sg(W,l,!1,!1),l.stateNode=W,Zv(W,E,A,R)&&cs(l)}}return Bn(l),dr(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,h),null;case 6:if(o&&l.stateNode!=null)h=o.memoizedProps,Mr?h!==A&&cs(l):fa&&(h!==A?(o=ul.current,h=mr.current,gd(l),l.stateNode=Gh(A,o,h,l)):l.stateNode=o.stateNode);else{if(typeof A!="string"&&l.stateNode===null)throw Error(a(166));if(o=ul.current,h=mr.current,sn(l)){if(!fr)throw Error(a(176));if(o=l.stateNode,h=l.memoizedProps,A=null,E=Wi,E!==null)switch(E.tag){case 27:case 5:A=E.memoizedProps}Jh(o,h,l,A)||pt(l,!0)}else gd(l),l.stateNode=Gh(A,o,h,l)}return Bn(l),null;case 31:if(h=l.memoizedState,o===null||o.memoizedState!==null){if(A=sn(l),h!==null){if(o===null){if(!A)throw Error(a(318));if(!fr)throw Error(a(556));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(557));S0(o,l)}else Dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Bn(l),o=!1}else h=Be(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return l.flags&256?(he(l),l):(he(l),null);if((l.flags&128)!==0)throw Error(a(558))}return Bn(l),null;case 13:if(A=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(E=sn(l),A!==null&&A.dehydrated!==null){if(o===null){if(!E)throw Error(a(318));if(!fr)throw Error(a(344));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(a(317));Og(E,l)}else Dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Bn(l),E=!1}else E=Be(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=E),E=!0;if(!E)return l.flags&256?(he(l),l):(he(l),null)}return he(l),(l.flags&128)!==0?(l.lanes=h,l):(h=A!==null,o=o!==null&&o.memoizedState!==null,h&&(A=l.child,E=null,A.alternate!==null&&A.alternate.memoizedState!==null&&A.alternate.memoizedState.cachePool!==null&&(E=A.alternate.memoizedState.cachePool.pool),R=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(R=A.memoizedState.cachePool.pool),R!==E&&(A.flags|=2048)),h!==o&&h&&(l.child.flags|=8192),Fl(l,l.updateQueue),Bn(l),null);case 4:return Pe(),ph(o,l),o===null&&gS(l.stateNode.containerInfo),Bn(l),null;case 10:return qe(l.type),Bn(l),null;case 19:if(S(Ei),A=l.memoizedState,A===null)return Bn(l),null;if(E=(l.flags&128)!==0,R=A.rendering,R===null)if(E)mo(A,!1);else{if(vi!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(R=ge(o),R!==null){for(l.flags|=128,mo(A,!1),o=R.updateQueue,l.updateQueue=o,Fl(l,o),l.subtreeFlags=0,o=h,h=l.child;h!==null;)xg(h,o),h=h.sibling;return w(Ei,Ei.current&1|2),gn&&ye(l,A.treeForkCount),l.child}o=o.sibling}A.tail!==null&&Wn()>hu&&(l.flags|=128,E=!0,mo(A,!1),l.lanes=4194304)}else{if(!E)if(o=ge(R),o!==null){if(l.flags|=128,E=!0,o=o.updateQueue,l.updateQueue=o,Fl(l,o),mo(A,!0),A.tail===null&&A.tailMode==="hidden"&&!R.alternate&&!gn)return Bn(l),null}else 2*Wn()-A.renderingStartTime>hu&&h!==536870912&&(l.flags|=128,E=!0,mo(A,!1),l.lanes=4194304);A.isBackwards?(R.sibling=l.child,l.child=R):(o=A.last,o!==null?o.sibling=R:l.child=R,A.last=R)}return A.tail!==null?(o=A.tail,A.rendering=o,A.tail=o.sibling,A.renderingStartTime=Wn(),o.sibling=null,h=Ei.current,w(Ei,E?h&1|2:h&1),gn&&ye(l,A.treeForkCount),o):(Bn(l),null);case 22:case 23:return he(l),ea(),A=l.memoizedState!==null,o!==null?o.memoizedState!==null!==A&&(l.flags|=8192):A&&(l.flags|=8192),A?(h&536870912)!==0&&(l.flags&128)===0&&(Bn(l),l.subtreeFlags&6&&(l.flags|=8192)):Bn(l),h=l.updateQueue,h!==null&&Fl(l,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),A=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(A=l.memoizedState.cachePool.pool),A!==h&&(l.flags|=2048),o!==null&&S(dl),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),qe(di),Bn(l),null;case 25:return null;case 30:return null}throw Error(a(156,l.tag))}function la(o,l){switch(lt(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return qe(di),Pe(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return He(l),null;case 31:if(l.memoizedState!==null){if(he(l),l.alternate===null)throw Error(a(340));Dt()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(he(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(a(340));Dt()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return S(Ei),null;case 4:return Pe(),null;case 10:return qe(l.type),null;case 22:case 23:return he(l),ea(),o!==null&&S(dl),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return qe(di),null;case 25:return null;default:return null}}function mh(o,l){switch(lt(l),l.tag){case 3:qe(di),Pe();break;case 26:case 27:case 5:He(l);break;case 4:Pe();break;case 31:l.memoizedState!==null&&he(l);break;case 13:he(l);break;case 19:S(Ei);break;case 10:qe(l.type);break;case 22:case 23:he(l),ea(),o!==null&&S(dl);break;case 24:qe(di)}}function Na(o,l){try{var h=l.updateQueue,A=h!==null?h.lastEffect:null;if(A!==null){var E=A.next;h=E;do{if((h.tag&o)===o){A=void 0;var R=h.create,W=h.inst;A=R(),W.destroy=A}h=h.next}while(h!==E)}}catch(te){Ln(l,l.return,te)}}function za(o,l,h){try{var A=l.updateQueue,E=A!==null?A.lastEffect:null;if(E!==null){var R=E.next;A=R;do{if((A.tag&o)===o){var W=A.inst,te=W.destroy;if(te!==void 0){W.destroy=void 0,E=l;var Re=h,Ve=te;try{Ve()}catch($e){Ln(E,Re,$e)}}}A=A.next}while(A!==R)}}catch($e){Ln(l,l.return,$e)}}function Gc(o){var l=o.updateQueue;if(l!==null){var h=o.stateNode;try{ed(l,h)}catch(A){Ln(o,o.return,A)}}}function gh(o,l,h){h.props=La(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(A){Ln(o,l,A)}}function $o(o,l){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var A=Id(o.stateNode);break;case 30:A=o.stateNode;break;default:A=o.stateNode}typeof h=="function"?o.refCleanup=h(A):h.current=A}}catch(E){Ln(o,l,E)}}function ca(o,l){var h=o.ref,A=o.refCleanup;if(h!==null)if(typeof A=="function")try{A()}catch(E){Ln(o,l,E)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){Ln(o,l,E)}else h.current=null}function ag(o){var l=o.type,h=o.memoizedProps,A=o.stateNode;try{l0(A,l,h,o)}catch(E){Ln(o,o.return,E)}}function Ah(o,l,h){try{Wh(o.stateNode,o.type,h,l,o)}catch(A){Ln(o,o.return,A)}}function og(o){return o.tag===5||o.tag===3||(Bs?o.tag===26:!1)||(Ni?o.tag===27&&Ql(o.type):!1)||o.tag===4}function vh(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||og(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(Ni&&o.tag===27&&Ql(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function vd(o,l,h){var A=o.tag;if(A===5||A===6)o=o.stateNode,l?u0(h,o,l):o0(h,o);else if(A!==4&&(Ni&&A===27&&Ql(o.type)&&(h=o.stateNode,l=null),o=o.child,o!==null))for(vd(o,l,h),o=o.sibling;o!==null;)vd(o,l,h),o=o.sibling}function Wc(o,l,h){var A=o.tag;if(A===5||A===6)o=o.stateNode,l?c0(h,o,l):a0(h,o);else if(A!==4&&(Ni&&A===27&&Ql(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(Wc(o,l,h),o=o.sibling;o!==null;)Wc(o,l,h),o=o.sibling}function yh(o,l,h){o=o.containerInfo;try{m0(o,h)}catch(A){Ln(l,l.return,A)}}function lg(o){var l=o.stateNode,h=o.memoizedProps;try{$h(o.type,h,l,o)}catch(A){Ln(o,o.return,A)}}function Bv(o,l){for(mS(o.containerInfo),$i=l;$i!==null;)if(o=$i,l=o.child,(o.subtreeFlags&1028)!==0&&l!==null)l.return=o,$i=l;else for(;$i!==null;){o=$i;var h=o.alternate;switch(l=o.flags,o.tag){case 0:if((l&4)!==0&&(l=o.updateQueue,l=l!==null?l.events:null,l!==null))for(var A=0;A<l.length;A++){var E=l[A];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((l&1024)!==0&&h!==null){l=void 0,A=o,E=h.memoizedProps,h=h.memoizedState;var R=A.stateNode;try{var W=La(A.type,E);l=R.getSnapshotBeforeUpdate(W,h),R.__reactInternalSnapshotBeforeUpdate=l}catch(te){Ln(A,A.return,te)}}break;case 3:(l&1024)!==0&&Mr&&ds(o.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(a(163))}if(l=o.sibling,l!==null){l.return=o.return,$i=l;break}$i=o.return}}function cg(o,l,h){var A=h.flags;switch(h.tag){case 0:case 11:case 15:Is(o,h),A&4&&Na(5,h);break;case 1:if(Is(o,h),A&4)if(o=h.stateNode,l===null)try{o.componentDidMount()}catch(W){Ln(h,h.return,W)}else{var E=La(h.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(E,l,o.__reactInternalSnapshotBeforeUpdate)}catch(W){Ln(h,h.return,W)}}A&64&&Gc(h),A&512&&$o(h,h.return);break;case 3:if(Is(o,h),A&64&&(A=h.updateQueue,A!==null)){if(o=null,h.child!==null)switch(h.child.tag){case 27:case 5:o=Id(h.child.stateNode);break;case 1:o=h.child.stateNode}try{ed(A,o)}catch(W){Ln(h,h.return,W)}}break;case 27:Ni&&l===null&&A&4&&lg(h);case 26:case 5:if(Is(o,h),l===null){if(A&4)ag(h);else if(A&64){o=h.type,l=h.memoizedProps,E=h.stateNode;try{T0(E,o,l,h)}catch(W){Ln(h,h.return,W)}}}A&512&&$o(h,h.return);break;case 12:Is(o,h);break;case 31:Is(o,h),A&4&&ug(o,h);break;case 13:Is(o,h),A&4&&xh(o,h),A&64&&(A=h.memoizedState,A!==null&&(A=A.dehydrated,A!==null&&(h=Lh.bind(null,h),Zc(A,h))));break;case 22:if(A=h.memoizedState!==null||Ya,!A){l=l!==null&&l.memoizedState!==null||Ci,E=Ya;var R=Ci;Ya=A,(Ci=l)&&!R?ua(o,h,(h.subtreeFlags&8772)!==0):Is(o,h),Ya=E,Ci=R}break;case 30:break;default:Is(o,h)}}function Uv(o){var l=o.alternate;l!==null&&(o.alternate=null,Uv(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&$v(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function Ls(o,l,h){for(h=h.child;h!==null;)bh(o,l,h),h=h.sibling}function bh(o,l,h){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Kl,h)}catch{}switch(h.tag){case 26:if(Bs){Ci||ca(h,l),Ls(o,l,h),h.memoizedState?L0(h.memoizedState):h.stateNode&&Wg(h.stateNode);break}case 27:if(Ni){Ci||ca(h,l);var A=Fi,E=_r;Ql(h.type)&&(Fi=h.stateNode,_r=!1),Ls(o,l,h),cl(h.stateNode),Fi=A,_r=E;break}case 5:Ci||ca(h,l);case 6:if(Mr){if(A=Fi,E=_r,Fi=null,Ls(o,l,h),Fi=A,_r=E,Fi!==null)if(_r)try{zg(Fi,h.stateNode)}catch(R){Ln(h,l,R)}else try{Ng(Fi,h.stateNode)}catch(R){Ln(h,l,R)}}else Ls(o,l,h);break;case 18:Mr&&Fi!==null&&(_r?Vg(Fi,h.stateNode):In(Fi,h.stateNode));break;case 4:Mr?(A=Fi,E=_r,Fi=h.stateNode.containerInfo,_r=!0,Ls(o,l,h),Fi=A,_r=E):(fa&&yh(h.stateNode,h,ai()),Ls(o,l,h));break;case 0:case 11:case 14:case 15:za(2,h,l),Ci||za(4,h,l),Ls(o,l,h);break;case 1:Ci||(ca(h,l),A=h.stateNode,typeof A.componentWillUnmount=="function"&&gh(h,l,A)),Ls(o,l,h);break;case 21:Ls(o,l,h);break;case 22:Ci=(A=Ci)||h.memoizedState!==null,Ls(o,l,h),Ci=A;break;default:Ls(o,l,h)}}function ug(o,l){if(fr&&l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{E0(o)}catch(h){Ln(l,l.return,h)}}}function xh(o,l){if(fr&&l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{_c(o)}catch(h){Ln(l,l.return,h)}}function Fv(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new mp),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new mp),l;default:throw Error(a(435,o.tag))}}function yd(o,l){var h=Fv(o);l.forEach(function(A){if(!h.has(A)){h.add(A);var E=Yv.bind(null,o,A);A.then(E,E)}})}function Si(o,l){var h=l.deletions;if(h!==null)for(var A=0;A<h.length;A++){var E=h[A],R=o,W=l;if(Mr){var te=W;e:for(;te!==null;){switch(te.tag){case 27:if(Ni){if(Ql(te.type)){Fi=te.stateNode,_r=!1;break e}break}case 5:Fi=te.stateNode,_r=!1;break e;case 3:case 4:Fi=te.stateNode.containerInfo,_r=!0;break e}te=te.return}if(Fi===null)throw Error(a(160));bh(R,W,E),Fi=null,_r=!1}else bh(R,W,E);R=E.alternate,R!==null&&(R.return=null),E.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)bd(l,o),l=l.sibling}function bd(o,l){var h=o.alternate,A=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Si(l,o),xr(o),A&4&&(za(3,o,o.return),Na(3,o),za(5,o,o.return));break;case 1:Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),A&64&&Ya&&(o=o.updateQueue,o!==null&&(A=o.callbacks,A!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?A:h.concat(A))));break;case 26:if(Bs){var E=va;if(Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),A&4){A=h!==null?h.memoizedState:null;var R=o.memoizedState;h===null?R===null?o.stateNode===null?o.stateNode=Jl(E,o.type,o.memoizedProps,o):Zh(E,o.type,o.stateNode):o.stateNode=D0(E,R,o.memoizedProps):A!==R?(A===null?h.stateNode!==null&&Wg(h.stateNode):L0(A),R===null?Zh(E,o.type,o.stateNode):D0(E,R,o.memoizedProps)):R===null&&o.stateNode!==null&&Ah(o,o.memoizedProps,h.memoizedProps)}break}case 27:if(Ni){Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),h!==null&&A&4&&Ah(o,o.memoizedProps,h.memoizedProps);break}case 5:if(Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),Mr){if(o.flags&32){E=o.stateNode;try{jh(E)}catch(Je){Ln(o,o.return,Je)}}A&4&&o.stateNode!=null&&(E=o.memoizedProps,Ah(o,E,h!==null?h.memoizedProps:E)),A&1024&&(Qd=!0)}else fa&&o.alternate!==null&&(o.alternate.stateNode=o.stateNode);break;case 6:if(Si(l,o),xr(o),A&4&&Mr){if(o.stateNode===null)throw Error(a(162));A=o.memoizedProps,h=h!==null?h.memoizedProps:A,E=o.stateNode;try{Ud(E,h,A)}catch(Je){Ln(o,o.return,Je)}}break;case 3:if(Bs?(N0(),E=va,va=Qh(l.containerInfo),Si(l,o),va=E):Si(l,o),xr(o),A&4){if(Mr&&fr&&h!==null&&h.memoizedState.isDehydrated)try{SS(l.containerInfo)}catch(Je){Ln(o,o.return,Je)}if(fa){A=l.containerInfo,h=l.pendingChildren;try{m0(A,h)}catch(Je){Ln(o,o.return,Je)}}}Qd&&(Qd=!1,Ov(o));break;case 4:Bs?(h=va,va=Qh(o.stateNode.containerInfo),Si(l,o),xr(o),va=h):(Si(l,o),xr(o)),A&4&&fa&&yh(o.stateNode,o,o.stateNode.pendingChildren);break;case 12:Si(l,o),xr(o);break;case 31:Si(l,o),xr(o),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 13:Si(l,o),xr(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(_d=Wn()),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 22:E=o.memoizedState!==null;var W=h!==null&&h.memoizedState!==null,te=Ya,Re=Ci;if(Ya=te||E,Ci=Re||W,Si(l,o),Ci=Re,Ya=te,xr(o),A&8192&&(l=o.stateNode,l._visibility=E?l._visibility&-2:l._visibility|1,E&&(h===null||W||Ya||Ci||Ns(o)),Mr)){e:if(h=null,Mr)for(l=o;;){if(l.tag===5||Bs&&l.tag===26){if(h===null){W=h=l;try{R=W.stateNode,E?d0(R):vS(W.stateNode,W.memoizedProps)}catch(Je){Ln(W,W.return,Je)}}}else if(l.tag===6){if(h===null){W=l;try{var Ve=W.stateNode;E?Xh(Ve):f0(Ve,W.memoizedProps)}catch(Je){Ln(W,W.return,Je)}}}else if(l.tag===18){if(h===null){W=l;try{var $e=W.stateNode;E?MS($e):P0(W.stateNode)}catch(Je){Ln(W,W.return,Je)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}}A&4&&(A=o.updateQueue,A!==null&&(h=A.retryQueue,h!==null&&(A.retryQueue=null,yd(o,h))));break;case 19:Si(l,o),xr(o),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 30:break;case 21:break;default:Si(l,o),xr(o)}}function xr(o){var l=o.flags;if(l&2){try{for(var h,A=o.return;A!==null;){if(og(A)){h=A;break}A=A.return}if(Mr){if(h==null)throw Error(a(160));switch(h.tag){case 27:if(Ni){var E=h.stateNode,R=vh(o);Wc(o,R,E);break}case 5:var W=h.stateNode;h.flags&32&&(jh(W),h.flags&=-33);var te=vh(o);Wc(o,te,W);break;case 3:case 4:var Re=h.stateNode.containerInfo,Ve=vh(o);vd(o,Ve,Re);break;default:throw Error(a(161))}}}catch($e){Ln(o,o.return,$e)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Ov(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;Ov(l),l.tag===5&&l.flags&1024&&jl(l.stateNode),o=o.sibling}}function Is(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)cg(o,l.alternate,l),l=l.sibling}function Ns(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:za(4,l,l.return),Ns(l);break;case 1:ca(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&gh(l,l.return,h),Ns(l);break;case 27:Ni&&cl(l.stateNode);case 26:case 5:ca(l,l.return),Ns(l);break;case 22:l.memoizedState===null&&Ns(l);break;case 30:Ns(l);break;default:Ns(l)}o=o.sibling}}function ua(o,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var A=l.alternate,E=o,R=l,W=R.flags;switch(R.tag){case 0:case 11:case 15:ua(E,R,h),Na(4,R);break;case 1:if(ua(E,R,h),A=R,E=A.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(Ve){Ln(A,A.return,Ve)}if(A=R,E=A.updateQueue,E!==null){var te=A.stateNode;try{var Re=E.shared.hiddenCallbacks;if(Re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<Re.length;E++)zc(Re[E],te)}catch(Ve){Ln(A,A.return,Ve)}}h&&W&64&&Gc(R),$o(R,R.return);break;case 27:Ni&&lg(R);case 26:case 5:ua(E,R,h),h&&A===null&&W&4&&ag(R),$o(R,R.return);break;case 12:ua(E,R,h);break;case 31:ua(E,R,h),h&&W&4&&ug(E,R);break;case 13:ua(E,R,h),h&&W&4&&xh(E,R);break;case 22:R.memoizedState===null&&ua(E,R,h),$o(R,R.return);break;case 30:break;default:ua(E,R,h)}l=l.sibling}}function go(o,l){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&B(h))}function Sr(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&B(o))}function qr(o,l,h,A){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Vv(o,l,h,A),l=l.sibling}function Vv(o,l,h,A){var E=l.flags;switch(l.tag){case 0:case 11:case 15:qr(o,l,h,A),E&2048&&Na(9,l);break;case 1:qr(o,l,h,A);break;case 3:qr(o,l,h,A),E&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&B(o)));break;case 12:if(E&2048){qr(o,l,h,A),o=l.stateNode;try{var R=l.memoizedProps,W=R.id,te=R.onPostCommit;typeof te=="function"&&te(W,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Re){Ln(l,l.return,Re)}}else qr(o,l,h,A);break;case 31:qr(o,l,h,A);break;case 13:qr(o,l,h,A);break;case 23:break;case 22:R=l.stateNode,W=l.alternate,l.memoizedState!==null?R._visibility&2?qr(o,l,h,A):tl(o,l):R._visibility&2?qr(o,l,h,A):(R._visibility|=2,el(o,l,h,A,(l.subtreeFlags&10256)!==0||!1)),E&2048&&go(W,l);break;case 24:qr(o,l,h,A),E&2048&&Sr(l.alternate,l);break;default:qr(o,l,h,A)}}function el(o,l,h,A,E){for(E=E&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var R=o,W=l,te=h,Re=A,Ve=W.flags;switch(W.tag){case 0:case 11:case 15:el(R,W,te,Re,E),Na(8,W);break;case 23:break;case 22:var $e=W.stateNode;W.memoizedState!==null?$e._visibility&2?el(R,W,te,Re,E):tl(R,W):($e._visibility|=2,el(R,W,te,Re,E)),E&&Ve&2048&&go(W.alternate,W);break;case 24:el(R,W,te,Re,E),E&&Ve&2048&&Sr(W.alternate,W);break;default:el(R,W,te,Re,E)}l=l.sibling}}function tl(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=o,A=l,E=A.flags;switch(A.tag){case 22:tl(h,A),E&2048&&go(A.alternate,A);break;case 24:tl(h,A),E&2048&&Sr(A.alternate,A);break;default:tl(h,A)}l=l.sibling}}function Ao(o,l,h){if(o.subtreeFlags&hl)for(o=o.child;o!==null;)dg(o,l,h),o=o.sibling}function dg(o,l,h){switch(o.tag){case 26:if(Ao(o,l,h),o.flags&hl)if(o.memoizedState!==null)Mo(h,va,o.memoizedState,o.memoizedProps);else{var A=o.stateNode,E=o.type;o=o.memoizedProps,((l&335544128)===l||Qc(E,o))&&wr(h,A,E,o)}break;case 5:Ao(o,l,h),o.flags&hl&&(A=o.stateNode,E=o.type,o=o.memoizedProps,((l&335544128)===l||Qc(E,o))&&wr(h,A,E,o));break;case 3:case 4:Bs?(A=va,va=Qh(o.stateNode.containerInfo),Ao(o,l,h),va=A):Ao(o,l,h);break;case 22:o.memoizedState===null&&(A=o.alternate,A!==null&&A.memoizedState!==null?(A=hl,hl=16777216,Ao(o,l,h),hl=A):Ao(o,l,h));break;default:Ao(o,l,h)}}function Sh(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function nl(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var A=l[h];$i=A,wh(A,o)}Sh(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Mh(o),o=o.sibling}function Mh(o){switch(o.tag){case 0:case 11:case 15:nl(o),o.flags&2048&&za(9,o,o.return);break;case 3:nl(o);break;case 12:nl(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Vl(o)):nl(o);break;default:nl(o)}}function Vl(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var A=l[h];$i=A,wh(A,o)}Sh(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:za(8,l,l.return),Vl(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,Vl(l));break;default:Vl(l)}o=o.sibling}}function wh(o,l){for(;$i!==null;){var h=$i;switch(h.tag){case 0:case 11:case 15:za(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var A=h.memoizedState.cachePool.pool;A!=null&&A.refCount++}break;case 24:B(h.memoizedState.cache)}if(A=h.child,A!==null)A.return=h,$i=A;else e:for(h=o;$i!==null;){A=$i;var E=A.sibling,R=A.return;if(Uv(A),A===h){$i=null;break e}if(E!==null){E.return=R,$i=E;break e}$i=R}}}function jc(o){var l=_v(o);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(a(364));return l}if(o=Ig(o),o===null)throw Error(a(362));return o.stateNode.current}function xd(o,l){var h=o.tag;switch(l.$$typeof){case gp:if(o.type===l.value)return!0;break;case Ap:e:{for(l=l.value,o=[o,0],h=0;h<o.length;){var A=o[h++],E=A.tag,R=o[h++],W=l[R];if(E!==5&&E!==26&&E!==27||!Ga(A)){for(;W!=null&&xd(A,W);)R++,W=l[R];if(R===l.length){l=!0;break e}else for(A=A.child;A!==null;)o.push(A,R),A=A.sibling}}l=!1}return l;case vp:if((h===5||h===26||h===27)&&s0(o.stateNode,l.value))return!0;break;case bp:if((h===5||h===6||h===26||h===27)&&(o=r0(o),o!==null&&0<=o.indexOf(l.value)))return!0;break;case yp:if((h===5||h===26||h===27)&&(o=o.memoizedProps["data-testname"],typeof o=="string"&&o.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function Th(o){switch(o.$$typeof){case gp:return"<"+(M(o.value)||"Unknown")+">";case Ap:return":has("+(Th(o)||"")+")";case vp:return'[role="'+o.value+'"]';case bp:return'"'+o.value+'"';case yp:return'[data-testname="'+o.value+'"]';default:throw Error(a(365))}}function fg(o,l){var h=[];o=[o,0];for(var A=0;A<o.length;){var E=o[A++],R=E.tag,W=o[A++],te=l[W];if(R!==5&&R!==26&&R!==27||!Ga(E)){for(;te!=null&&xd(E,te);)W++,te=l[W];if(W===l.length)h.push(E);else for(E=E.child;E!==null;)o.push(E,W),E=E.sibling}}return h}function Sd(o,l){if(!Xl)throw Error(a(363));o=jc(o),o=fg(o,l),l=[],o=Array.from(o);for(var h=0;h<o.length;){var A=o[h++],E=A.tag;if(E===5||E===26||E===27)Ga(A)||l.push(A.stateNode);else for(A=A.child;A!==null;)o.push(A),A=A.sibling}return l}function Yr(){return(An&2)!==0&&bn!==0?bn&-bn:It.T!==null?rt():ha()}function Md(){if(ps===0)if((bn&536870912)===0||gn){var o=Wd;Wd<<=1,(Wd&3932160)===0&&(Wd=262144),ps=o}else ps=536870912;return o=fs.current,o!==null&&(o.flags|=32),ps}function Nr(o,l,h){(o===$n&&(Xn===2||Xn===9)||o.cancelPendingCommit!==null)&&(rl(o,0),vo(o,bn,ps,!1)),U(o,h),((An&2)===0||o!==$n)&&(o===$n&&((An&2)===0&&(ic|=h),vi===4&&vo(o,bn,ps,!1)),me(o))}function hg(o,l,h){if((An&6)!==0)throw Error(a(327));var A=!h&&(l&127)===0&&(l&o.expiredLanes)===0||D(o,l),E=A?Xv(o,l):Yc(o,l,!0),R=A;do{if(E===0){nc&&!A&&vo(o,l,0,!1);break}else{if(h=o.current.alternate,R&&!Hv(h)){E=Yc(o,l,!1),R=!1;continue}if(E===2){if(R=l,o.errorRecoveryDisabledLanes&R)var W=0;else W=o.pendingLanes&-536870913,W=W!==0?W:W&536870912?536870912:0;if(W!==0){l=W;e:{var te=o;E=Kd;var Re=fr&&te.current.memoizedState.isDehydrated;if(Re&&(rl(te,W).flags|=256),W=Yc(te,W,!1),W!==2){if(_g&&!Re){te.errorRecoveryDisabledLanes|=R,ic|=R,E=4;break e}R=$r,$r=E,R!==null&&($r===null?$r=R:$r.push.apply($r,R))}E=W}if(R=!1,E!==2)continue}}if(E===1){rl(o,0),vo(o,l,0,!0);break}e:{switch(A=o,R=E,R){case 0:case 1:throw Error(a(345));case 4:if((l&4194048)!==l)break;case 6:vo(A,l,ps,!pl);break e;case 2:$r=null;break;case 3:case 5:break;default:throw Error(a(329))}if((l&62914560)===l&&(E=_d+300-Wn(),10<E)){if(vo(A,l,ps,!pl),T(A,0,!0)!==0)break e;Ja=l,A.timeoutHandle=Kv(Eh.bind(null,A,h,$r,Sp,xp,l,ps,ic,fu,pl,R,"Throttled",-0,0),E);break e}Eh(A,h,$r,Sp,xp,l,ps,ic,fu,pl,R,null,-0,0)}}break}while(!0);me(o)}function Eh(o,l,h,A,E,R,W,te,Re,Ve,$e,Je,At,Ft){if(o.timeoutHandle=xo,Je=l.subtreeFlags,Je&8192||(Je&16785408)===16785408){Je=t0(),dg(l,R,Je);var ei=(R&62914560)===R?_d-Wn():(R&4194048)===R?eA-Wn():0;if(ei=n0(Je,ei),ei!==null){Ja=R,o.cancelPendingCommit=ei(Ag.bind(null,o,l,R,h,A,E,W,te,Re,$e,Je,null,At,Ft)),vo(o,R,W,!Ve);return}}Ag(o,l,R,h,A,E,W,te,Re)}function Hv(o){for(var l=o;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var A=0;A<h.length;A++){var E=h[A],R=E.getSnapshot;E=E.value;try{if(!pr(R(),E))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function vo(o,l,h,A){l&=~$g,l&=~ic,o.suspendedLanes|=l,o.pingedLanes&=~l,A&&(o.warmLanes|=l),A=o.expirationTimes;for(var E=l;0<E;){var R=31-Jr(E),W=1<<R;A[R]=-1,E&=~W}h!==0&&I(o,h,l)}function il(){return(An&6)===0?(Ce(0),!1):!0}function wd(){if(vn!==null){if(Xn===0)var o=vn.return;else o=vn,li=Fr=null,Pn(o),Hs=null,Yd=0,o=vn;for(;o!==null;)mh(o.alternate,o),o=o.return;vn=null}}function rl(o,l){var h=o.timeoutHandle;h!==xo&&(o.timeoutHandle=xo,Dg(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),Ja=0,wd(),$n=o,vn=h=Ua(o.current,null),bn=l,Xn=0,hs=null,pl=!1,nc=D(o,l),_g=!1,fu=ps=$g=ic=ml=vi=0,$r=Kd=null,xp=!1,(l&8)!==0&&(l|=l&32);var A=o.entangledLanes;if(A!==0)for(o=o.entanglements,A&=l;0<A;){var E=31-Jr(A),R=1<<E;l|=o[E],A&=~R}return Po=l,Zi(),h}function Gv(o,l){tn=null,It.H=Jd,l===lu||l===op?(l=Mt(),Xn=3):l===ap?(l=Mt(),Xn=4):Xn=l===hp?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,hs=l,vn===null&&(vi=1,cd(o,ce(l,o.current)))}function Wv(){var o=fs.current;return o===null?!0:(bn&4194048)===bn?Aa===null:(bn&62914560)===bn||(bn&536870912)!==0?o===Aa:!1}function pg(){var o=It.H;return It.H=Jd,o===null?Jd:o}function Xc(){var o=It.A;return It.A=PS,o}function qc(){vi=4,pl||(bn&4194048)!==bn&&fs.current!==null||(nc=!0),(ml&134217727)===0&&(ic&134217727)===0||$n===null||vo($n,bn,ps,!1)}function Yc(o,l,h){var A=An;An|=2;var E=pg(),R=Xc();($n!==o||bn!==l)&&(Sp=null,rl(o,l)),l=!1;var W=vi;e:do try{if(Xn!==0&&vn!==null){var te=vn,Re=hs;switch(Xn){case 8:wd(),W=6;break e;case 3:case 2:case 9:case 6:fs.current===null&&(l=!0);var Ve=Xn;if(Xn=0,hs=null,Hl(o,te,Re,Ve),h&&nc){W=0;break e}break;default:Ve=Xn,Xn=0,hs=null,Hl(o,te,Re,Ve)}}jv(),W=vi;break}catch($e){Gv(o,$e)}while(!0);return l&&o.shellSuspendCounter++,li=Fr=null,An=A,It.H=E,It.A=R,vn===null&&($n=null,bn=0,Zi()),W}function jv(){for(;vn!==null;)Ch(vn)}function Xv(o,l){var h=An;An|=2;var A=pg(),E=Xc();$n!==o||bn!==l?(Sp=null,hu=Wn()+500,rl(o,l)):nc=D(o,l);e:do try{if(Xn!==0&&vn!==null){l=vn;var R=hs;t:switch(Xn){case 1:Xn=0,hs=null,Hl(o,l,R,1);break;case 2:case 9:if(it(R)){Xn=0,hs=null,gg(l);break}l=function(){Xn!==2&&Xn!==9||$n!==o||(Xn=7),me(o)},R.then(l,l);break e;case 3:Xn=7;break e;case 4:Xn=5;break e;case 7:it(R)?(Xn=0,hs=null,gg(l)):(Xn=0,hs=null,Hl(o,l,R,7));break;case 5:var W=null;switch(vn.tag){case 26:W=vn.memoizedState;case 5:case 27:var te=vn,Re=te.type,Ve=te.pendingProps;if(W?Kh(W):hr(te.stateNode,Re,Ve)){Xn=0,hs=null;var $e=te.sibling;if($e!==null)vn=$e;else{var Je=te.return;Je!==null?(vn=Je,Ba(Je)):vn=null}break t}}Xn=0,hs=null,Hl(o,l,R,5);break;case 6:Xn=0,hs=null,Hl(o,l,R,6);break;case 8:wd(),vi=6;break e;default:throw Error(a(462))}}mg();break}catch(At){Gv(o,At)}while(!0);return li=Fr=null,It.H=A,It.A=E,An=h,vn!==null?0:($n=null,bn=0,Zi(),vi)}function mg(){for(;vn!==null&&!ES();)Ch(vn)}function Ch(o){var l=dh(o.alternate,o,Po);o.memoizedProps=o.pendingProps,l===null?Ba(o):vn=l}function gg(o){var l=o,h=l.alternate;switch(l.tag){case 15:case 0:l=ig(h,l,l.pendingProps,l.type,void 0,bn);break;case 11:l=ig(h,l,l.pendingProps,l.type.render,l.ref,bn);break;case 5:Pn(l);default:mh(h,l),l=vn=xg(l,Po),l=dh(h,l,Po)}o.memoizedProps=o.pendingProps,l===null?Ba(o):vn=l}function Hl(o,l,h,A){li=Fr=null,Pn(l),Hs=null,Yd=0;var E=l.return;try{if(br(o,E,l,h,bn)){vi=1,cd(o,ce(h,o.current)),vn=null;return}}catch(R){if(E!==null)throw vn=E,R;vi=1,cd(o,ce(h,o.current)),vn=null;return}l.flags&32768?(gn||A===1?o=!0:nc||(bn&536870912)!==0?o=!1:(pl=o=!0,(A===2||A===9||A===3||A===6)&&(A=fs.current,A!==null&&A.tag===13&&(A.flags|=16384))),Td(l,o)):Ba(l)}function Ba(o){var l=o;do{if((l.flags&32768)!==0){Td(l,pl);return}o=l.return;var h=Ol(l.alternate,l,Po);if(h!==null){vn=h;return}if(l=l.sibling,l!==null){vn=l;return}vn=l=o}while(l!==null);vi===0&&(vi=5)}function Td(o,l){do{var h=la(o.alternate,o);if(h!==null){h.flags&=32767,vn=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(o=o.sibling,o!==null)){vn=o;return}vn=o=h}while(o!==null);vi=6,vn=null}function Ag(o,l,h,A,E,R,W,te,Re){o.cancelPendingCommit=null;do Mi();while(qn!==0);if((An&6)!==0)throw Error(a(327));if(l!==null){if(l===o.current)throw Error(a(177));if(R=l.lanes|l.childLanes,R|=Qg,H(o,h,R,W,te,Re),o===$n&&(vn=$n=null,bn=0),Al=l,ko=o,Ja=h,Mp=R,wp=E,G0=A,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,fS(To,function(){return vg(),null})):(o.callbackNode=null,o.callbackPriority=0),A=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||A){A=It.T,It.T=null,E=Va(),Gi(2),W=An,An|=4;try{Bv(o,l,h)}finally{An=W,Gi(E),It.T=A}}qn=1,Rh(),Ph(),kh()}}function Rh(){if(qn===1){qn=0;var o=ko,l=Al,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=It.T,It.T=null;var A=Va();Gi(2);var E=An;An|=4;try{bd(l,o),Nd(o.containerInfo)}finally{An=E,Gi(A),It.T=h}}o.current=l,qn=2}}function Ph(){if(qn===2){qn=0;var o=ko,l=Al,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=It.T,It.T=null;var A=Va();Gi(2);var E=An;An|=4;try{cg(o,l.alternate,l)}finally{An=E,Gi(A),It.T=h}}qn=3}}function kh(){if(qn===4||qn===3){qn=0,Qr();var o=ko,l=Al,h=Ja,A=G0;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?qn=5:(qn=0,Al=ko=null,qv(o,o.pendingLanes));var E=o.pendingLanes;if(E===0&&(gl=null),_(h),l=l.stateNode,wi&&typeof wi.onCommitFiberRoot=="function")try{wi.onCommitFiberRoot(Kl,l,void 0,(l.current.flags&128)===128)}catch{}if(A!==null){l=It.T,E=Va(),Gi(2),It.T=null;try{for(var R=o.onRecoverableError,W=0;W<A.length;W++){var te=A[W];R(te.value,{componentStack:te.stack})}}finally{It.T=l,Gi(E)}}(Ja&3)!==0&&Mi(),me(o),E=o.pendingLanes,(h&261930)!==0&&(E&42)!==0?o===Tp?pu++:(pu=0,Tp=o):pu=0,fr&&R0(),Ce(0)}}function qv(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,B(l)))}function Mi(){return Rh(),Ph(),kh(),vg()}function vg(){if(qn!==5)return!1;var o=ko,l=Mp;Mp=0;var h=_(Ja),A=32>h?32:h;h=It.T;var E=Va();try{Gi(A),It.T=null,A=wp,wp=null;var R=ko,W=Ja;if(qn=0,Al=ko=null,Ja=0,(An&6)!==0)throw Error(a(331));var te=An;if(An|=4,Mh(R.current),Vv(R,R.current,W,A),An=te,Ce(0,!1),wi&&typeof wi.onPostCommitFiberRoot=="function")try{wi.onPostCommitFiberRoot(Kl,R)}catch{}return!0}finally{Gi(E),It.T=h,qv(o,l)}}function yg(o,l,h){l=ce(h,l),l=Fc(o.stateNode,l,2),o=ls(o,l,2),o!==null&&(U(o,2),me(o))}function Ln(o,l,h){if(o.tag===3)yg(o,o,h);else for(;l!==null;){if(l.tag===3){yg(l,o,h);break}else if(l.tag===1){var A=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&(gl===null||!gl.has(A))){o=ce(h,o),h=ud(2),A=ls(l,h,2),A!==null&&(sh(h,A,l,o),U(A,2),me(A));break}}l=l.return}}function Dh(o,l,h){var A=o.pingCache;if(A===null){A=o.pingCache=new kS;var E=new Set;A.set(l,E)}else E=A.get(l),E===void 0&&(E=new Set,A.set(l,E));E.has(h)||(_g=!0,E.add(h),o=Ed.bind(null,o,l,h),l.then(o,o))}function Ed(o,l,h){var A=o.pingCache;A!==null&&A.delete(l),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,$n===o&&(bn&h)===h&&(vi===4||vi===3&&(bn&62914560)===bn&&300>Wn()-_d?(An&2)===0&&rl(o,0):$g|=h,fu===bn&&(fu=0)),me(o)}function bg(o,l){l===0&&(l=L()),o=Ps(o,l),o!==null&&(U(o,l),me(o))}function Lh(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),bg(o,h)}function Yv(o,l){var h=0;switch(o.tag){case 31:case 13:var A=o.stateNode,E=o.memoizedState;E!==null&&(h=E.retryLane);break;case 19:A=o.stateNode;break;case 22:A=o.stateNode._retryCache;break;default:throw Error(a(314))}A!==null&&A.delete(l),bg(o,h)}function fS(o,l){return tp(o,l)}function Ih(o,l,h,A){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cd(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ua(o,l){var h=o.alternate;return h===null?(h=t(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function xg(o,l){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,l=h.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Rd(o,l,h,A,E,R){var W=0;if(A=o,typeof o=="function")Cd(o)&&(W=1);else if(typeof o=="string")W=Bs&&Ni?Gg(o,h,mr.current)?26:ep(o)?27:5:Bs?Gg(o,h,mr.current)?26:5:Ni&&ep(o)?27:5;else e:switch(o){case Vh:return o=t(31,h,l,E),o.elementType=Vh,o.lanes=R,o;case Gl:return yo(h.children,E,R,l);case Tg:W=8,E|=24;break;case Ld:return o=t(12,h,l,E|2),o.elementType=Ld,o.lanes=R,o;case Wl:return o=t(13,h,l,E),o.elementType=Wl,o.lanes=R,o;case jn:return o=t(19,h,l,E),o.elementType=jn,o.lanes=R,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case bo:W=10;break e;case Oh:W=9;break e;case Jc:W=11;break e;case Eg:W=14;break e;case al:W=16,A=null;break e}W=29,h=Error(a(130,o===null?"null":typeof o,"")),A=null}return l=t(W,h,l,E),l.elementType=o,l.type=A,l.lanes=R,l}function yo(o,l,h,A){return o=t(7,o,A,l),o.lanes=h,o}function Pd(o,l,h){return o=t(6,o,null,l),o.lanes=h,o}function Nh(o){var l=t(18,null,null,0);return l.stateNode=o,l}function zh(o,l,h){return l=t(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function Sg(o,l,h,A,E,R,W,te,Re){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=xo,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=O(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=O(0),this.hiddenUpdates=O(null),this.identifierPrefix=A,this.onUncaughtError=E,this.onCaughtError=R,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Re,this.incompleteTransitions=new Map}function kd(o,l,h,A,E,R,W,te,Re,Ve,$e,Je){return o=new Sg(o,l,h,W,Re,Ve,$e,Je,te),l=1,R===!0&&(l|=24),R=t(3,null,null,l),o.current=R,R.stateNode=o,l=Y(),l.refCount++,o.pooledCache=l,l.refCount++,R.memoizedState={element:A,isDehydrated:h,cache:l},Jo(R),o}function Bh(o){return o?(o=Zl,o):Zl}function Mg(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(a(188)):(o=Object.keys(o).join(","),Error(a(268,o)));return o=f(l),o=o!==null?m(o):null,o===null?null:Id(o.stateNode)}function Uh(o,l,h,A,E,R){E=Bh(E),A.context===null?A.context=E:A.pendingContext=E,A=lr(l),A.payload={element:h},R=R===void 0?null:R,R!==null&&(A.callback=R),h=ls(o,A,l),h!==null&&(Nr(h,o,l),Qo(h,o,l))}function wg(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function da(o,l){wg(o,l),(o=o.alternate)&&wg(o,l)}var fn={},hS=pe,zr=nP,us=Object.assign,Fh=Symbol.for("react.element"),Dd=Symbol.for("react.transitional.element"),sl=Symbol.for("react.portal"),Gl=Symbol.for("react.fragment"),Tg=Symbol.for("react.strict_mode"),Ld=Symbol.for("react.profiler"),Oh=Symbol.for("react.consumer"),bo=Symbol.for("react.context"),Jc=Symbol.for("react.forward_ref"),Wl=Symbol.for("react.suspense"),jn=Symbol.for("react.suspense_list"),Eg=Symbol.for("react.memo"),al=Symbol.for("react.lazy"),Vh=Symbol.for("react.activity"),Fa=Symbol.for("react.memo_cache_sentinel"),Cg=Symbol.iterator,Rg=Symbol.for("react.client.reference"),ol=Array.isArray,It=hS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jv=e.rendererVersion,Pg=e.rendererPackageName,kg=e.extraDevToolsConfig,Id=e.getPublicInstance,pS=e.getRootHostContext,Qv=e.getChildHostContext,mS=e.prepareForCommit,Nd=e.resetAfterCommit,Oa=e.createInstance;e.cloneMutableInstance;var Hh=e.appendInitialChild,Zv=e.finalizeInitialChildren,zd=e.shouldSetTextContent,Gh=e.createTextInstance;e.cloneMutableTextInstance;var Kv=e.scheduleTimeout,Dg=e.cancelTimeout,xo=e.noTimeout,zs=e.isPrimaryRenderer;e.warnsIfNotActing;var Mr=e.supportsMutation,fa=e.supportsPersistence,fr=e.supportsHydration,_v=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var gS=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var Gi=e.setCurrentUpdatePriority,Va=e.getCurrentUpdatePriority,ha=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var Lg=e.shouldAttemptEagerTransition,$v=e.detachDeletedInstance;e.requestPostPaintCallback;var e0=e.maySuspendCommit,AS=e.maySuspendCommitOnUpdate,Qc=e.maySuspendCommitInSyncRender,hr=e.preloadInstance,t0=e.startSuspendingCommit,wr=e.suspendInstance;e.suspendOnActiveViewTransition;var n0=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var Br=e.NotPendingTransition,ll=e.HostTransitionContext,jl=e.resetFormInstance;e.bindToConsole;var i0=e.supportsMicrotasks,Ha=e.scheduleMicrotask,Xl=e.supportsTestSelectors,Ig=e.findFiberRoot,pa=e.getBoundingRect,r0=e.getTextContent,Ga=e.isHiddenSubtree,s0=e.matchAccessibilityRole,Bd=e.setFocusIfFocusable,ql=e.setupIntersectionObserver,a0=e.appendChild,o0=e.appendChildToContainer,Ud=e.commitTextUpdate,l0=e.commitMount,Wh=e.commitUpdate,c0=e.insertBefore,u0=e.insertInContainerBefore,Ng=e.removeChild,zg=e.removeChildFromContainer,jh=e.resetTextContent,d0=e.hideInstance,Xh=e.hideTextInstance,vS=e.unhideInstance,f0=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var ds=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var h0=e.cloneInstance,ai=e.createContainerChildSet,Bg=e.appendChildToContainerChildSet,p0=e.finalizeContainerChildren,m0=e.replaceContainerChildren,So=e.cloneHiddenInstance,Fd=e.cloneHiddenTextInstance,Od=e.isSuspenseInstancePending,Vd=e.isSuspenseInstanceFallback,Yl=e.getSuspenseInstanceFallbackErrorDetails,Zc=e.registerSuspenseInstanceRetry,g0=e.canHydrateFormStateMarker,A0=e.isFormStateMarkerMatching,Ug=e.getNextHydratableSibling,v0=e.getNextHydratableSiblingAfterSingleton,qh=e.getFirstHydratableChild,Yh=e.getFirstHydratableChildWithinContainer,Fg=e.getFirstHydratableChildWithinActivityInstance,y0=e.getFirstHydratableChildWithinSuspenseInstance,yS=e.getFirstHydratableChildWithinSingleton,bS=e.canHydrateInstance,b0=e.canHydrateTextInstance,x0=e.canHydrateActivityInstance,xS=e.canHydrateSuspenseInstance,Kc=e.hydrateInstance,Jh=e.hydrateTextInstance,S0=e.hydrateActivityInstance,Og=e.hydrateSuspenseInstance,M0=e.getNextHydratableInstanceAfterActivityInstance,w0=e.getNextHydratableInstanceAfterSuspenseInstance,T0=e.commitHydratedInstance,SS=e.commitHydratedContainer,E0=e.commitHydratedActivityInstance,_c=e.commitHydratedSuspenseInstance,C0=e.finalizeHydratedChildren,R0=e.flushHydrationEvents;e.clearActivityBoundary;var In=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var Vg=e.clearSuspenseBoundaryFromContainer,MS=e.hideDehydratedBoundary,P0=e.unhideDehydratedBoundary,k0=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var wS=e.validateHydratableInstance,Hg=e.validateHydratableTextInstance,Bs=e.supportsResources,Gg=e.isHostHoistableType,Qh=e.getHoistableRoot,$c=e.getResource,D0=e.acquireResource,L0=e.releaseResource,Jl=e.hydrateHoistable,Zh=e.mountHoistable,Wg=e.unmountHoistable,I0=e.createHoistableInstance,N0=e.prepareToCommitHoistables,TS=e.mayResourceSuspendCommit,Kh=e.preloadResource,Mo=e.suspendResource,Ni=e.supportsSingletons,_h=e.resolveSingletonInstance,$h=e.acquireSingletonInstance,cl=e.releaseSingletonInstance,ep=e.isHostSingletonType,Ql=e.isSingletonScope,Hd=[],eu=-1,Zl={},Jr=Math.clz32?Math.clz32:k,z0=Math.log,B0=Math.LN2,Gd=256,Wd=262144,tu=4194304,tp=zr.unstable_scheduleCallback,hn=zr.unstable_cancelCallback,ES=zr.unstable_shouldYield,Qr=zr.unstable_requestPaint,Wn=zr.unstable_now,U0=zr.unstable_ImmediatePriority,wo=zr.unstable_UserBlockingPriority,To=zr.unstable_NormalPriority,nu=zr.unstable_IdlePriority,np=zr.log,jg=zr.unstable_setDisableYieldValue,Kl=null,wi=null,pr=typeof Object.is=="function"?Object.is:le,ip=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Xg=Object.prototype.hasOwnProperty,iu,Zr,jd=!1,F0=new WeakMap,_l=[],ru=0,zi=null,be=0,Us=[],Fs=0,Eo=null,Ur=1,Wa="",mr=x(null),Xd=x(null),ul=x(null),rp=x(null),Wi=null,oi=null,gn=!1,Co=null,Os=!1,qg=Error(a(519)),ja=x(null),Fr=null,li=null,Xa=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(h,A){o.push(A)}};this.abort=function(){l.aborted=!0,o.forEach(function(h){return h()})}},Tr=zr.unstable_scheduleCallback,CS=zr.unstable_NormalPriority,di={$$typeof:bo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Ti=null,Kr=null,Yg=!1,su=!1,$l=!1,ma=0,qd=null,Jg=0,au=0,ou=null,sp=It.S;It.S=function(o,l){eA=Wn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&st(o,l),sp!==null&&sp(o,l)};var dl=x(null),lu=Error(a(460)),ap=Error(a(474)),op=Error(a(542)),lp={then:function(){}},Vs=null,Hs=null,Yd=0,ec=Gr(!0),O0=Gr(!1),Gs=[],ga=0,Qg=0,fl=!1,Zg=!1,qa=x(null),cp=x(0),fs=x(null),Aa=null,Ei=x(0),Ro=0,tn=null,Zn=null,Bi=null,up=!1,cu=!1,tc=!1,dp=0,uu=0,du=null,RS=0,Jd={readContext:ee,use:je,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Jd.useEffectEvent=We;var V0={readContext:ee,use:je,useCallback:function(o,l){return dn().memoizedState=[o,l===void 0?null:l],o},useContext:ee,useEffect:qm,useImperativeHandle:function(o,l,h){h=h!=null?h.concat([o]):null,rd(4194308,4,Nv.bind(null,l,o),h)},useLayoutEffect:function(o,l){return rd(4194308,4,o,l)},useInsertionEffect:function(o,l){rd(4,2,o,l)},useMemo:function(o,l){var h=dn();l=l===void 0?null:l;var A=o();if(tc){K(!0);try{o()}finally{K(!1)}}return h.memoizedState=[A,l],A},useReducer:function(o,l,h){var A=dn();if(h!==void 0){var E=h(l);if(tc){K(!0);try{h(l)}finally{K(!1)}}}else E=l;return A.memoizedState=A.baseState=E,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:E},A.queue=o,o=o.dispatch=ur.bind(null,tn,o),[A.memoizedState,o]},useRef:function(o){var l=dn();return o={current:o},l.memoizedState=o},useState:function(o){o=gi(o);var l=o.queue,h=ih.bind(null,tn,l);return l.dispatch=h,[o.memoizedState,h]},useDebugValue:Qm,useDeferredValue:function(o,l){var h=dn();return th(h,o,l)},useTransition:function(){var o=gi(!1);return o=Zm.bind(null,tn,o.queue,!0,!1),dn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,h){var A=tn,E=dn();if(gn){if(h===void 0)throw Error(a(407));h=h()}else{if(h=l(),$n===null)throw Error(a(349));(bn&127)!==0||Gn(A,l,h)}E.memoizedState=h;var R={value:h,getSnapshot:l};return E.queue=R,qm(Wr.bind(null,A,R,o),[o]),A.flags|=2048,Lr(9,{destroy:void 0},zn.bind(null,A,R,h,l),null),h},useId:function(){var o=dn(),l=$n.identifierPrefix;if(gn){var h=Wa,A=Ur;h=(A&~(1<<32-Jr(A)-1)).toString(32)+h,l="_"+l+"R_"+h,h=dp++,0<h&&(l+="H"+h.toString(32)),l+="_"}else h=RS++,l="_"+l+"r_"+h.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:nh,useFormState:sa,useActionState:sa,useOptimistic:function(o){var l=dn();l.memoizedState=l.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=Uc.bind(null,tn,!0,h),h.dispatch=l,[o,l]},useMemoCache:Li,useCacheRefresh:function(){return dn().memoizedState=zv.bind(null,tn)},useEffectEvent:function(o){var l=dn(),h={impl:o};return l.memoizedState=h,function(){if((An&2)!==0)throw Error(a(440));return h.impl.apply(void 0,arguments)}}},Kg={readContext:ee,use:je,useCallback:eh,useContext:ee,useEffect:Kf,useImperativeHandle:Jm,useInsertionEffect:Ym,useLayoutEffect:$f,useMemo:sd,useReducer:Hi,useRef:Bl,useState:function(){return Hi(Kt)},useDebugValue:Qm,useDeferredValue:function(o,l){var h=Ht();return ad(h,Zn.memoizedState,o,l)},useTransition:function(){var o=Hi(Kt)[0],l=Ht().memoizedState;return[typeof o=="boolean"?o:Qn(o),l]},useSyncExternalStore:Ki,useId:ho,useHostTransitionStatus:nh,useFormState:Xm,useActionState:Xm,useOptimistic:function(o,l){var h=Ht();return cr(h,Zn,o,l)},useMemoCache:Li,useCacheRefresh:_m};Kg.useEffectEvent=_f;var H0={readContext:ee,use:je,useCallback:eh,useContext:ee,useEffect:Kf,useImperativeHandle:Jm,useInsertionEffect:Ym,useLayoutEffect:$f,useMemo:sd,useReducer:yr,useRef:Bl,useState:function(){return yr(Kt)},useDebugValue:Qm,useDeferredValue:function(o,l){var h=Ht();return Zn===null?th(h,o,l):ad(h,Zn.memoizedState,o,l)},useTransition:function(){var o=yr(Kt)[0],l=Ht().memoizedState;return[typeof o=="boolean"?o:Qn(o),l]},useSyncExternalStore:Ki,useId:ho,useHostTransitionStatus:nh,useFormState:id,useActionState:id,useOptimistic:function(o,l){var h=Ht();return Zn!==null?cr(h,Zn,o,l):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:Li,useCacheRefresh:_m};H0.useEffectEvent=_f;var fp={enqueueSetState:function(o,l,h){o=o._reactInternals;var A=Yr(),E=lr(A);E.payload=l,h!=null&&(E.callback=h),l=ls(o,E,A),l!==null&&(Nr(l,o,A),Qo(l,o,A))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var A=Yr(),E=lr(A);E.tag=1,E.payload=l,h!=null&&(E.callback=h),l=ls(o,E,A),l!==null&&(Nr(l,o,A),Qo(l,o,A))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=Yr(),A=lr(h);A.tag=2,l!=null&&(A.callback=l),l=ls(o,A,h),l!==null&&(Nr(l,o,h),Qo(l,o,h))}},hp=Error(a(461)),Ui=!1,pp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Ya=!1,Ci=!1,Qd=!1,mp=typeof WeakSet=="function"?WeakSet:Set,$i=null,Fi=null,_r=!1,va=null,hl=8192,PS={getCacheForType:function(o){var l=ee(di),h=l.data.get(o);return h===void 0&&(h=o(),l.data.set(o,h)),h},cacheSignal:function(){return ee(di).controller.signal}},gp=0,Ap=1,vp=2,yp=3,bp=4;if(typeof Symbol=="function"&&Symbol.for){var Zd=Symbol.for;gp=Zd("selector.component"),Ap=Zd("selector.has_pseudo_class"),vp=Zd("selector.role"),yp=Zd("selector.test_id"),bp=Zd("selector.text")}var kS=typeof WeakMap=="function"?WeakMap:Map,An=0,$n=null,vn=null,bn=0,Xn=0,hs=null,pl=!1,nc=!1,_g=!1,Po=0,vi=0,ml=0,ic=0,$g=0,ps=0,fu=0,Kd=null,$r=null,xp=!1,_d=0,eA=0,hu=1/0,Sp=null,gl=null,qn=0,ko=null,Al=null,Ja=0,Mp=0,wp=null,G0=null,pu=0,Tp=null;return fn.attemptContinuousHydration=function(o){if(o.tag===13||o.tag===31){var l=Ps(o,67108864);l!==null&&Nr(l,o,67108864),da(o,67108864)}},fn.attemptHydrationAtCurrentPriority=function(o){if(o.tag===13||o.tag===31){var l=Yr();l=X(l);var h=Ps(o,l);h!==null&&Nr(h,o,l),da(o,l)}},fn.attemptSynchronousHydration=function(o){switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var l=C(o.pendingLanes);if(l!==0){for(o.pendingLanes|=2,o.entangledLanes|=2;l;){var h=1<<31-Jr(l);o.entanglements[1]|=h,l&=~h}me(o),(An&6)===0&&(hu=Wn()+500,Ce(0))}}break;case 31:case 13:l=Ps(o,2),l!==null&&Nr(l,o,2),il(),da(o,2)}},fn.batchedUpdates=function(o,l){return o(l)},fn.createComponentSelector=function(o){return{$$typeof:gp,value:o}},fn.createContainer=function(o,l,h,A,E,R,W,te,Re,Ve){return kd(o,l,!1,null,h,A,R,null,W,te,Re,Ve)},fn.createHasPseudoClassSelector=function(o){return{$$typeof:Ap,value:o}},fn.createHydrationContainer=function(o,l,h,A,E,R,W,te,Re,Ve,$e,Je,At,Ft){var ei;return o=kd(h,A,!0,o,E,R,te,Ft,Re,Ve,$e,Je),o.context=Bh(null),h=o.current,A=Yr(),A=X(A),E=lr(A),E.callback=(ei=l)!=null?ei:null,ls(h,E,A),l=A,o.current.lanes=l,U(o,l),me(o),o},fn.createPortal=function(o,l,h){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sl,key:A==null?null:""+A,children:o,containerInfo:l,implementation:h}},fn.createRoleSelector=function(o){return{$$typeof:vp,value:o}},fn.createTestNameSelector=function(o){return{$$typeof:yp,value:o}},fn.createTextSelector=function(o){return{$$typeof:bp,value:o}},fn.defaultOnCaughtError=function(o){console.error(o)},fn.defaultOnRecoverableError=function(o){ip(o)},fn.defaultOnUncaughtError=function(o){ip(o)},fn.deferredUpdates=function(o){var l=It.T,h=Va();try{return Gi(32),It.T=null,o()}finally{Gi(h),It.T=l}},fn.discreteUpdates=function(o,l,h,A,E){var R=It.T,W=Va();try{return Gi(2),It.T=null,o(l,h,A,E)}finally{Gi(W),It.T=R,An===0&&(hu=Wn()+500)}},fn.findAllNodes=Sd,fn.findBoundingRects=function(o,l){if(!Xl)throw Error(a(363));l=Sd(o,l),o=[];for(var h=0;h<l.length;h++)o.push(pa(l[h]));for(l=o.length-1;0<l;l--){h=o[l];for(var A=h.x,E=A+h.width,R=h.y,W=R+h.height,te=l-1;0<=te;te--)if(l!==te){var Re=o[te],Ve=Re.x,$e=Ve+Re.width,Je=Re.y,At=Je+Re.height;if(A>=Ve&&R>=Je&&E<=$e&&W<=At){o.splice(l,1);break}else if(A!==Ve||h.width!==Re.width||At<R||Je>W){if(!(R!==Je||h.height!==Re.height||$e<A||Ve>E)){Ve>A&&(Re.width+=Ve-A,Re.x=A),$e<E&&(Re.width=E-Ve),o.splice(l,1);break}}else{Je>R&&(Re.height+=Je-R,Re.y=R),At<W&&(Re.height=W-Je),o.splice(l,1);break}}}return o},fn.findHostInstance=Mg,fn.findHostInstanceWithNoPortals=function(o){return o=f(o),o=o!==null?g(o):null,o===null?null:Id(o.stateNode)},fn.findHostInstanceWithWarning=function(o){return Mg(o)},fn.flushPassiveEffects=Mi,fn.flushSyncFromReconciler=function(o){var l=An;An|=1;var h=It.T,A=Va();try{if(Gi(2),It.T=null,o)return o()}finally{Gi(A),It.T=h,An=l,(An&6)===0&&Ce(0)}},fn.flushSyncWork=il,fn.focusWithin=function(o,l){if(!Xl)throw Error(a(363));for(o=jc(o),l=fg(o,l),l=Array.from(l),o=0;o<l.length;){var h=l[o++],A=h.tag;if(!Ga(h)){if((A===5||A===26||A===27)&&Bd(h.stateNode))return!0;for(h=h.child;h!==null;)l.push(h),h=h.sibling}}return!1},fn.getFindAllNodesFailureDescription=function(o,l){if(!Xl)throw Error(a(363));var h=0,A=[];o=[jc(o),0];for(var E=0;E<o.length;){var R=o[E++],W=R.tag,te=o[E++],Re=l[te];if((W!==5&&W!==26&&W!==27||!Ga(R))&&(xd(R,Re)&&(A.push(Th(Re)),te++,te>h&&(h=te)),te<l.length))for(R=R.child;R!==null;)o.push(R,te),R=R.sibling}if(h<l.length){for(o=[];h<l.length;h++)o.push(Th(l[h]));return`findAllNodes was able to match part of the selector:
|
|
4292
|
+
`+A.stack}}function ce(o,l){if(typeof o=="object"&&o!==null){var h=F0.get(o);return h!==void 0?h:(l={value:o,source:l,stack:ne(l)},F0.set(o,l),l)}return{value:o,source:l,stack:ne(l)}}function ye(o,l){_l[ru++]=be,_l[ru++]=zi,zi=o,be=l}function Te(o,l,h){Us[Fs++]=Ur,Us[Fs++]=Wa,Us[Fs++]=Eo,Eo=o;var A=Ur;o=Wa;var E=32-Jr(A)-1;A&=~(1<<E),h+=1;var R=32-Jr(l)+E;if(30<R){var W=E-E%5;R=(A&(1<<W)-1).toString(32),A>>=W,E-=W,Ur=1<<32-Jr(l)+E|h<<E|A,Wa=R+o}else Ur=1<<R|h<<E|A,Wa=o}function Fe(o){o.return!==null&&(ye(o,1),Te(o,1,0))}function ft(o){for(;o===zi;)zi=_l[--ru],_l[ru]=null,be=_l[--ru],_l[ru]=null;for(;o===Eo;)Eo=Us[--Fs],Us[Fs]=null,Wa=Us[--Fs],Us[Fs]=null,Ur=Us[--Fs],Us[Fs]=null}function lt(o,l){Us[Fs++]=Ur,Us[Fs++]=Wa,Us[Fs++]=Eo,Ur=l.id,Wa=l.overflow,Eo=o}function ct(o,l){w(ul,l),w(Xd,o),w(mr,null),o=pS(l),S(mr),w(mr,o)}function Pe(){S(mr),S(Xd),S(ul)}function qe(o){o.memoizedState!==null&&w(rp,o);var l=mr.current,h=Qv(l,o.type);l!==h&&(w(Xd,o),w(mr,h))}function He(o){Xd.current===o&&(S(mr),S(Xd)),rp.current===o&&(S(rp),zs?ll._currentValue=Br:ll._currentValue2=Br)}function pt(o){var l=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xe(ce(l,o)),qg}function Nt(o,l){if(!fr)throw Error(a(175));Kc(o.stateNode,o.type,o.memoizedProps,l,o)||pt(o,!0)}function nt(o){for(Wi=o.return;Wi;)switch(Wi.tag){case 5:case 31:case 13:Os=!1;return;case 27:case 3:Os=!0;return;default:Wi=Wi.return}}function sn(o){if(!fr||o!==Wi)return!1;if(!gn)return nt(o),gn=!0,!1;var l=o.tag;if(Ni?l!==3&&l!==27&&(l!==5||k0(o.type)&&!zd(o.type,o.memoizedProps))&&oi&&pt(o):l!==3&&(l!==5||k0(o.type)&&!zd(o.type,o.memoizedProps))&&oi&&pt(o),nt(o),l===13){if(!fr)throw Error(a(316));if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));oi=w0(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));oi=M0(o)}else oi=Ni&&l===27?v0(o.type,oi):Wi?Ug(o.stateNode):null;return!0}function Dt(){fr&&(oi=Wi=null,gn=!1)}function Ue(){var o=Co;return o!==null&&($r===null?$r=o:$r.push.apply($r,o),Co=null),o}function xe(o){Co===null?Co=[o]:Co.push(o)}function ze(o,l,h){zs?(w(ja,l._currentValue),l._currentValue=h):(w(ja,l._currentValue2),l._currentValue2=h)}function je(o){var l=ja.current;zs?o._currentValue=l:o._currentValue2=l,S(ja)}function Ze(o,l,h){for(;o!==null;){var A=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,A!==null&&(A.childLanes|=l)):A!==null&&(A.childLanes&l)!==l&&(A.childLanes|=l),o===h)break;o=o.return}}function Pt(o,l,h,A){var E=o.child;for(E!==null&&(E.return=o);E!==null;){var R=E.dependencies;if(R!==null){var W=E.child;R=R.firstContext;e:for(;R!==null;){var te=R;R=E;for(var Re=0;Re<l.length;Re++)if(te.context===l[Re]){R.lanes|=h,te=R.alternate,te!==null&&(te.lanes|=h),Ze(R.return,h,o),A||(W=null);break e}R=te.next}}else if(E.tag===18){if(W=E.return,W===null)throw Error(a(341));W.lanes|=h,R=W.alternate,R!==null&&(R.lanes|=h),Ze(W,h,o),W=null}else W=E.child;if(W!==null)W.return=E;else for(W=E;W!==null;){if(W===o){W=null;break}if(E=W.sibling,E!==null){E.return=W.return,W=E;break}W=W.return}E=W}}function bt(o,l,h,A){o=null;for(var E=l,R=!1;E!==null;){if(!R){if((E.flags&524288)!==0)R=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var W=E.alternate;if(W===null)throw Error(a(387));if(W=W.memoizedProps,W!==null){var te=E.type;pr(E.pendingProps.value,W.value)||(o!==null?o.push(te):o=[te])}}else if(E===rp.current){if(W=E.alternate,W===null)throw Error(a(387));W.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(o!==null?o.push(ll):o=[ll])}E=E.return}o!==null&&Pt(l,o,h,A),l.flags|=262144}function zt(o){for(o=o.firstContext;o!==null;){var l=o.context;if(!pr(zs?l._currentValue:l._currentValue2,o.memoizedValue))return!0;o=o.next}return!1}function Et(o){Fr=o,li=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function ee(o){return an(Fr,o)}function Cn(o,l){return Fr===null&&Et(o),an(o,l)}function an(o,l){var h=zs?l._currentValue:l._currentValue2;if(l={context:l,memoizedValue:h,next:null},li===null){if(o===null)throw Error(a(308));li=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else li=li.next=l;return h}function Y(){return{controller:new Xa,data:new Map,refCount:0}}function B(o){o.refCount--,o.refCount===0&&Tr(CS,function(){o.controller.abort()})}function de(){}function me(o){o!==Kr&&o.next===null&&(Kr===null?Ti=Kr=o:Kr=Kr.next=o),su=!0,Yg||(Yg=!0,Rt())}function Ce(o,l){if(!$l&&su){$l=!0;do for(var h=!1,A=Ti;A!==null;){if(o!==0){var E=A.pendingLanes;if(E===0)var R=0;else{var W=A.suspendedLanes,te=A.pingedLanes;R=(1<<31-Jr(42|o)+1)-1,R&=E&~(W&~te),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(h=!0,et(A,R))}else R=bn,R=T(A,A===$n?R:0,A.cancelPendingCommit!==null||A.timeoutHandle!==xo),(R&3)===0||D(A,R)||(h=!0,et(A,R));A=A.next}while(h);$l=!1}}function Qe(){Ke()}function Ke(){su=Yg=!1;var o=0;ma!==0&&Lg()&&(o=ma);for(var l=Wn(),h=null,A=Ti;A!==null;){var E=A.next,R=ke(A,l);R===0?(A.next=null,h===null?Ti=E:h.next=E,E===null&&(Kr=h)):(h=A,(o!==0||(R&3)!==0)&&(su=!0)),A=E}qn!==0&&qn!==5||Ce(o),ma!==0&&(ma=0)}function ke(o,l){for(var h=o.suspendedLanes,A=o.pingedLanes,E=o.expirationTimes,R=o.pendingLanes&-62914561;0<R;){var W=31-Jr(R),te=1<<W,Re=E[W];Re===-1?((te&h)===0||(te&A)!==0)&&(E[W]=z(te,l)):Re<=l&&(o.expiredLanes|=te),R&=~te}if(l=$n,h=bn,h=T(o,o===l?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==xo),A=o.callbackNode,h===0||o===l&&(Xn===2||Xn===9)||o.cancelPendingCommit!==null)return A!==null&&A!==null&&hn(A),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||D(o,h)){if(l=h&-h,l===o.callbackPriority)return l;switch(A!==null&&hn(A),_(h)){case 2:case 8:h=wo;break;case 32:h=To;break;case 268435456:h=nu;break;default:h=To}return A=De.bind(null,o),h=tp(h,A),o.callbackPriority=l,o.callbackNode=h,l}return A!==null&&A!==null&&hn(A),o.callbackPriority=2,o.callbackNode=null,2}function De(o,l){if(qn!==0&&qn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(Mi()&&o.callbackNode!==h)return null;var A=bn;return A=T(o,o===$n?A:0,o.cancelPendingCommit!==null||o.timeoutHandle!==xo),A===0?null:(hg(o,A,l),ke(o,Wn()),o.callbackNode!=null&&o.callbackNode===h?De.bind(null,o):null)}function et(o,l){if(Mi())return null;hg(o,l,!0)}function Rt(){i0?Ha(function(){(An&6)!==0?tp(U0,Qe):Ke()}):tp(U0,Qe)}function rt(){if(ma===0){var o=au;o===0&&(o=Gd,Gd<<=1,(Gd&261888)===0&&(Gd=256)),ma=o}return ma}function st(o,l){if(qd===null){var h=qd=[];Jg=0,au=rt(),ou={status:"pending",value:void 0,then:function(A){h.push(A)}}}return Jg++,l.then(mt,mt),l}function mt(){if(--Jg===0&&qd!==null){ou!==null&&(ou.status="fulfilled");var o=qd;qd=null,au=0,ou=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function Ct(o,l){var h=[],A={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return o.then(function(){A.status="fulfilled",A.value=l;for(var E=0;E<h.length;E++)(0,h[E])(l)},function(E){for(A.status="rejected",A.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),A}function jt(){var o=dl.current;return o!==null?o:$n.pooledCache}function ae(o,l){l===null?w(dl,dl.current):w(dl,l.pool)}function _e(){var o=jt();return o===null?null:{parent:zs?di._currentValue:di._currentValue2,pool:o}}function Le(o,l){if(pr(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),A=Object.keys(l);if(h.length!==A.length)return!1;for(A=0;A<h.length;A++){var E=h[A];if(!Xg.call(l,E)||!pr(o[E],l[E]))return!1}return!0}function it(o){return o=o.status,o==="fulfilled"||o==="rejected"}function tt(o,l,h){switch(h=o[h],h===void 0?o.push(l):h!==l&&(l.then(de,de),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,gt(o),o;default:if(typeof l.status=="string")l.then(de,de);else{if(o=$n,o!==null&&100<o.shellSuspendCounter)throw Error(a(482));o=l,o.status="pending",o.then(function(A){if(l.status==="pending"){var E=l;E.status="fulfilled",E.value=A}},function(A){if(l.status==="pending"){var E=l;E.status="rejected",E.reason=A}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,gt(o),o}throw Vs=l,lu}}function Ne(o){try{var l=o._init;return l(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Vs=h,lu):h}}function Mt(){if(Vs===null)throw Error(a(459));var o=Vs;return Vs=null,o}function gt(o){if(o===lu||o===op)throw Error(a(483))}function yn(o){var l=Yd;return Yd+=1,Hs===null&&(Hs=[]),tt(Hs,o,l)}function Rn(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Qi(o,l){throw l.$$typeof===Fh?Error(a(525)):(o=Object.prototype.toString.call(l),Error(a(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function Gr(o){function l(ve,fe){if(o){var we=ve.deletions;we===null?(ve.deletions=[fe],ve.flags|=16):we.push(fe)}}function h(ve,fe){if(!o)return null;for(;fe!==null;)l(ve,fe),fe=fe.sibling;return null}function A(ve){for(var fe=new Map;ve!==null;)ve.key!==null?fe.set(ve.key,ve):fe.set(ve.index,ve),ve=ve.sibling;return fe}function E(ve,fe){return ve=Ua(ve,fe),ve.index=0,ve.sibling=null,ve}function R(ve,fe,we){return ve.index=we,o?(we=ve.alternate,we!==null?(we=we.index,we<fe?(ve.flags|=67108866,fe):we):(ve.flags|=67108866,fe)):(ve.flags|=1048576,fe)}function W(ve){return o&&ve.alternate===null&&(ve.flags|=67108866),ve}function te(ve,fe,we,Ye){return fe===null||fe.tag!==6?(fe=Pd(we,ve.mode,Ye),fe.return=ve,fe):(fe=E(fe,we),fe.return=ve,fe)}function Re(ve,fe,we,Ye){var Bt=we.type;return Bt===Gl?$e(ve,fe,we.props.children,Ye,we.key):fe!==null&&(fe.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===al&&Ne(Bt)===fe.type)?(fe=E(fe,we.props),Rn(fe,we),fe.return=ve,fe):(fe=Rd(we.type,we.key,we.props,null,ve.mode,Ye),Rn(fe,we),fe.return=ve,fe)}function Ve(ve,fe,we,Ye){return fe===null||fe.tag!==4||fe.stateNode.containerInfo!==we.containerInfo||fe.stateNode.implementation!==we.implementation?(fe=zh(we,ve.mode,Ye),fe.return=ve,fe):(fe=E(fe,we.children||[]),fe.return=ve,fe)}function $e(ve,fe,we,Ye,Bt){return fe===null||fe.tag!==7?(fe=yo(we,ve.mode,Ye,Bt),fe.return=ve,fe):(fe=E(fe,we),fe.return=ve,fe)}function Je(ve,fe,we){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return fe=Pd(""+fe,ve.mode,we),fe.return=ve,fe;if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Dd:return we=Rd(fe.type,fe.key,fe.props,null,ve.mode,we),Rn(we,fe),we.return=ve,we;case sl:return fe=zh(fe,ve.mode,we),fe.return=ve,fe;case al:return fe=Ne(fe),Je(ve,fe,we)}if(ol(fe)||v(fe))return fe=yo(fe,ve.mode,we,null),fe.return=ve,fe;if(typeof fe.then=="function")return Je(ve,yn(fe),we);if(fe.$$typeof===bo)return Je(ve,Cn(ve,fe),we);Qi(ve,fe)}return null}function At(ve,fe,we,Ye){var Bt=fe!==null?fe.key:null;if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return Bt!==null?null:te(ve,fe,""+we,Ye);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case Dd:return we.key===Bt?Re(ve,fe,we,Ye):null;case sl:return we.key===Bt?Ve(ve,fe,we,Ye):null;case al:return we=Ne(we),At(ve,fe,we,Ye)}if(ol(we)||v(we))return Bt!==null?null:$e(ve,fe,we,Ye,null);if(typeof we.then=="function")return At(ve,fe,yn(we),Ye);if(we.$$typeof===bo)return At(ve,fe,Cn(ve,we),Ye);Qi(ve,we)}return null}function Ft(ve,fe,we,Ye,Bt){if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint")return ve=ve.get(we)||null,te(fe,ve,""+Ye,Bt);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case Dd:return ve=ve.get(Ye.key===null?we:Ye.key)||null,Re(fe,ve,Ye,Bt);case sl:return ve=ve.get(Ye.key===null?we:Ye.key)||null,Ve(fe,ve,Ye,Bt);case al:return Ye=Ne(Ye),Ft(ve,fe,we,Ye,Bt)}if(ol(Ye)||v(Ye))return ve=ve.get(we)||null,$e(fe,ve,Ye,Bt,null);if(typeof Ye.then=="function")return Ft(ve,fe,we,yn(Ye),Bt);if(Ye.$$typeof===bo)return Ft(ve,fe,we,Cn(fe,Ye),Bt);Qi(fe,Ye)}return null}function ei(ve,fe,we,Ye){for(var Bt=null,fi=null,Gt=fe,Un=fe=0,xn=null;Gt!==null&&Un<we.length;Un++){Gt.index>Un?(xn=Gt,Gt=null):xn=Gt.sibling;var kn=At(ve,Gt,we[Un],Ye);if(kn===null){Gt===null&&(Gt=xn);break}o&&Gt&&kn.alternate===null&&l(ve,Gt),fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn,Gt=xn}if(Un===we.length)return h(ve,Gt),gn&&ye(ve,Un),Bt;if(Gt===null){for(;Un<we.length;Un++)Gt=Je(ve,we[Un],Ye),Gt!==null&&(fe=R(Gt,fe,Un),fi===null?Bt=Gt:fi.sibling=Gt,fi=Gt);return gn&&ye(ve,Un),Bt}for(Gt=A(Gt);Un<we.length;Un++)xn=Ft(Gt,ve,Un,we[Un],Ye),xn!==null&&(o&&xn.alternate!==null&&Gt.delete(xn.key===null?Un:xn.key),fe=R(xn,fe,Un),fi===null?Bt=xn:fi.sibling=xn,fi=xn);return o&&Gt.forEach(function(Do){return l(ve,Do)}),gn&&ye(ve,Un),Bt}function ji(ve,fe,we,Ye){if(we==null)throw Error(a(151));for(var Bt=null,fi=null,Gt=fe,Un=fe=0,xn=null,kn=we.next();Gt!==null&&!kn.done;Un++,kn=we.next()){Gt.index>Un?(xn=Gt,Gt=null):xn=Gt.sibling;var Do=At(ve,Gt,kn.value,Ye);if(Do===null){Gt===null&&(Gt=xn);break}o&&Gt&&Do.alternate===null&&l(ve,Gt),fe=R(Do,fe,Un),fi===null?Bt=Do:fi.sibling=Do,fi=Do,Gt=xn}if(kn.done)return h(ve,Gt),gn&&ye(ve,Un),Bt;if(Gt===null){for(;!kn.done;Un++,kn=we.next())kn=Je(ve,kn.value,Ye),kn!==null&&(fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn);return gn&&ye(ve,Un),Bt}for(Gt=A(Gt);!kn.done;Un++,kn=we.next())kn=Ft(Gt,ve,Un,kn.value,Ye),kn!==null&&(o&&kn.alternate!==null&&Gt.delete(kn.key===null?Un:kn.key),fe=R(kn,fe,Un),fi===null?Bt=kn:fi.sibling=kn,fi=kn);return o&&Gt.forEach(function($d){return l(ve,$d)}),gn&&ye(ve,Un),Bt}function rc(ve,fe,we,Ye){if(typeof we=="object"&&we!==null&&we.type===Gl&&we.key===null&&(we=we.props.children),typeof we=="object"&&we!==null){switch(we.$$typeof){case Dd:e:{for(var Bt=we.key;fe!==null;){if(fe.key===Bt){if(Bt=we.type,Bt===Gl){if(fe.tag===7){h(ve,fe.sibling),Ye=E(fe,we.props.children),Ye.return=ve,ve=Ye;break e}}else if(fe.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===al&&Ne(Bt)===fe.type){h(ve,fe.sibling),Ye=E(fe,we.props),Rn(Ye,we),Ye.return=ve,ve=Ye;break e}h(ve,fe);break}else l(ve,fe);fe=fe.sibling}we.type===Gl?(Ye=yo(we.props.children,ve.mode,Ye,we.key),Ye.return=ve,ve=Ye):(Ye=Rd(we.type,we.key,we.props,null,ve.mode,Ye),Rn(Ye,we),Ye.return=ve,ve=Ye)}return W(ve);case sl:e:{for(Bt=we.key;fe!==null;){if(fe.key===Bt)if(fe.tag===4&&fe.stateNode.containerInfo===we.containerInfo&&fe.stateNode.implementation===we.implementation){h(ve,fe.sibling),Ye=E(fe,we.children||[]),Ye.return=ve,ve=Ye;break e}else{h(ve,fe);break}else l(ve,fe);fe=fe.sibling}Ye=zh(we,ve.mode,Ye),Ye.return=ve,ve=Ye}return W(ve);case al:return we=Ne(we),rc(ve,fe,we,Ye)}if(ol(we))return ei(ve,fe,we,Ye);if(v(we)){if(Bt=v(we),typeof Bt!="function")throw Error(a(150));return we=Bt.call(we),ji(ve,fe,we,Ye)}if(typeof we.then=="function")return rc(ve,fe,yn(we),Ye);if(we.$$typeof===bo)return rc(ve,fe,Cn(ve,we),Ye);Qi(ve,we)}return typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint"?(we=""+we,fe!==null&&fe.tag===6?(h(ve,fe.sibling),Ye=E(fe,we),Ye.return=ve,ve=Ye):(h(ve,fe),Ye=Pd(we,ve.mode,Ye),Ye.return=ve,ve=Ye),W(ve)):h(ve,fe)}return function(ve,fe,we,Ye){try{Yd=0;var Bt=rc(ve,fe,we,Ye);return Hs=null,Bt}catch(Gt){if(Gt===lu||Gt===op)throw Gt;var fi=t(29,Gt,null,ve.mode);return fi.lanes=Ye,fi.return=ve,fi}finally{}}}function Zi(){for(var o=ga,l=Qg=ga=0;l<o;){var h=Gs[l];Gs[l++]=null;var A=Gs[l];Gs[l++]=null;var E=Gs[l];Gs[l++]=null;var R=Gs[l];if(Gs[l++]=null,A!==null&&E!==null){var W=A.pending;W===null?E.next=E:(E.next=W.next,W.next=E),A.pending=E}R!==0&&Yo(h,E,R)}}function $s(o,l,h,A){Gs[ga++]=o,Gs[ga++]=l,Gs[ga++]=h,Gs[ga++]=A,Qg|=A,o.lanes|=A,o=o.alternate,o!==null&&(o.lanes|=A)}function Rs(o,l,h,A){return $s(o,l,h,A),ka(o)}function Ps(o,l){return $s(o,null,null,l),ka(o)}function Yo(o,l,h){o.lanes|=h;var A=o.alternate;A!==null&&(A.lanes|=h);for(var E=!1,R=o.return;R!==null;)R.childLanes|=h,A=R.alternate,A!==null&&(A.childLanes|=h),R.tag===22&&(o=R.stateNode,o===null||o._visibility&1||(E=!0)),o=R,R=R.return;return o.tag===3?(R=o.stateNode,E&&l!==null&&(E=31-Jr(h),o=R.hiddenUpdates,A=o[E],A===null?o[E]=[l]:A.push(l),l.lane=h|536870912),R):null}function ka(o){if(50<pu)throw pu=0,Tp=null,Error(a(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}function Jo(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dr(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function lr(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ls(o,l,h){var A=o.updateQueue;if(A===null)return null;if(A=A.shared,(An&2)!==0){var E=A.pending;return E===null?l.next=l:(l.next=E.next,E.next=l),A.pending=l,l=ka(o),Yo(o,null,h),l}return $s(o,A,l,h),ka(o)}function Qo(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var A=l.lanes;A&=o.pendingLanes,h|=A,l.lanes=h,F(o,h)}}function Zo(o,l){var h=o.updateQueue,A=o.alternate;if(A!==null&&(A=A.updateQueue,h===A)){var E=null,R=null;if(h=h.firstBaseUpdate,h!==null){do{var W={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};R===null?E=R=W:R=R.next=W,h=h.next}while(h!==null);R===null?E=R=l:R=R.next=l}else E=R=l;h={baseState:A.baseState,firstBaseUpdate:E,lastBaseUpdate:R,shared:A.shared,callbacks:A.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}function fo(){if(Zg){var o=ou;if(o!==null)throw o}}function ks(o,l,h,A){Zg=!1;var E=o.updateQueue;fl=!1;var R=E.firstBaseUpdate,W=E.lastBaseUpdate,te=E.shared.pending;if(te!==null){E.shared.pending=null;var Re=te,Ve=Re.next;Re.next=null,W===null?R=Ve:W.next=Ve,W=Re;var $e=o.alternate;$e!==null&&($e=$e.updateQueue,te=$e.lastBaseUpdate,te!==W&&(te===null?$e.firstBaseUpdate=Ve:te.next=Ve,$e.lastBaseUpdate=Re))}if(R!==null){var Je=E.baseState;W=0,$e=Ve=Re=null,te=R;do{var At=te.lane&-536870913,Ft=At!==te.lane;if(Ft?(bn&At)===At:(A&At)===At){At!==0&&At===au&&(Zg=!0),$e!==null&&($e=$e.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var ei=o,ji=te;At=l;var rc=h;switch(ji.tag){case 1:if(ei=ji.payload,typeof ei=="function"){Je=ei.call(rc,Je,At);break e}Je=ei;break e;case 3:ei.flags=ei.flags&-65537|128;case 0:if(ei=ji.payload,At=typeof ei=="function"?ei.call(rc,Je,At):ei,At==null)break e;Je=us({},Je,At);break e;case 2:fl=!0}}At=te.callback,At!==null&&(o.flags|=64,Ft&&(o.flags|=8192),Ft=E.callbacks,Ft===null?E.callbacks=[At]:Ft.push(At))}else Ft={lane:At,tag:te.tag,payload:te.payload,callback:te.callback,next:null},$e===null?(Ve=$e=Ft,Re=Je):$e=$e.next=Ft,W|=At;if(te=te.next,te===null){if(te=E.shared.pending,te===null)break;Ft=te,te=Ft.next,Ft.next=null,E.lastBaseUpdate=Ft,E.shared.pending=null}}while(!0);$e===null&&(Re=Je),E.baseState=Re,E.firstBaseUpdate=Ve,E.lastBaseUpdate=$e,R===null&&(E.shared.lanes=0),ml|=W,o.lanes=W,o.memoizedState=Je}}function zc(o,l){if(typeof o!="function")throw Error(a(191,o));o.call(l)}function ed(o,l){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)zc(h[o],l)}function xt(o,l){o=Po,w(cp,o),w(qa,l),Po=o|l.baseLanes}function zl(){w(cp,Po),w(qa,qa.current)}function ea(){Po=cp.current,S(qa),S(cp)}function ta(o){var l=o.alternate;w(Ei,Ei.current&1),w(fs,o),Aa===null&&(l===null||qa.current!==null||l.memoizedState!==null)&&(Aa=o)}function G(o){w(Ei,Ei.current),w(fs,o),Aa===null&&(Aa=o)}function oe(o){o.tag===22?(w(Ei,Ei.current),w(fs,o),Aa===null&&(Aa=o)):Ae()}function Ae(){w(Ei,Ei.current),w(fs,fs.current)}function he(o){S(fs),Aa===o&&(Aa=null),S(Ei)}function ge(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Od(h)||Vd(h)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function We(){throw Error(a(321))}function dt(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!pr(o[h],l[h]))return!1;return!0}function at(o,l,h,A,E,R){return Ro=R,tn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,It.H=o===null||o.memoizedState===null?V0:Kg,tc=!1,R=h(A,E),tc=!1,cu&&(R=Tt(l,h,A,E)),St(o),R}function St(o){It.H=Jd;var l=Zn!==null&&Zn.next!==null;if(Ro=0,Bi=Zn=tn=null,up=!1,uu=0,du=null,l)throw Error(a(300));o===null||Ui||(o=o.dependencies,o!==null&&zt(o)&&(Ui=!0))}function Tt(o,l,h,A){tn=o;var E=0;do{if(cu&&(du=null),uu=0,cu=!1,25<=E)throw Error(a(301));if(E+=1,Bi=Zn=null,o.updateQueue!=null){var R=o.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}It.H=H0,R=l(h,A)}while(cu);return R}function Xt(){var o=It.H,l=o.useState()[0];return l=typeof l.then=="function"?Qn(l):l,o=o.useState()[0],(Zn!==null?Zn.memoizedState:null)!==o&&(tn.flags|=1024),l}function Ot(){var o=dp!==0;return dp=0,o}function vt(o,l,h){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~h}function Pn(o){if(up){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}up=!1}Ro=0,Bi=Zn=tn=null,cu=!1,uu=dp=0,du=null}function dn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bi===null?tn.memoizedState=Bi=o:Bi=Bi.next=o,Bi}function Ht(){if(Zn===null){var o=tn.alternate;o=o!==null?o.memoizedState:null}else o=Zn.next;var l=Bi===null?tn.memoizedState:Bi.next;if(l!==null)Bi=l,Zn=o;else{if(o===null)throw tn.alternate===null?Error(a(467)):Error(a(310));Zn=o,o={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},Bi===null?tn.memoizedState=Bi=o:Bi=Bi.next=o}return Bi}function Tn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qn(o){var l=uu;return uu+=1,du===null&&(du=[]),o=tt(du,o,l),l=tn,(Bi===null?l.memoizedState:Bi.next)===null&&(l=l.alternate,It.H=l===null||l.memoizedState===null?V0:Kg),o}function Xe(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Qn(o);if(o.$$typeof===bo)return ee(o)}throw Error(a(438,String(o)))}function Li(o){var l=null,h=tn.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var A=tn.alternate;A!==null&&(A=A.updateQueue,A!==null&&(A=A.memoCache,A!=null&&(l={data:A.data.map(function(E){return E.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=Tn(),tn.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(o),A=0;A<o;A++)h[A]=Fa;return l.index++,h}function Kt(o,l){return typeof l=="function"?l(o):l}function Hi(o){var l=Ht();return Ii(l,Zn,o)}function Ii(o,l,h){var A=o.queue;if(A===null)throw Error(a(311));A.lastRenderedReducer=h;var E=o.baseQueue,R=A.pending;if(R!==null){if(E!==null){var W=E.next;E.next=R.next,R.next=W}l.baseQueue=E=R,A.pending=null}if(R=o.baseState,E===null)o.memoizedState=R;else{l=E.next;var te=W=null,Re=null,Ve=l,$e=!1;do{var Je=Ve.lane&-536870913;if(Je!==Ve.lane?(bn&Je)===Je:(Ro&Je)===Je){var At=Ve.revertLane;if(At===0)Re!==null&&(Re=Re.next={lane:0,revertLane:0,gesture:null,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null}),Je===au&&($e=!0);else if((Ro&At)===At){Ve=Ve.next,At===au&&($e=!0);continue}else Je={lane:0,revertLane:Ve.revertLane,gesture:null,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null},Re===null?(te=Re=Je,W=R):Re=Re.next=Je,tn.lanes|=At,ml|=At;Je=Ve.action,tc&&h(R,Je),R=Ve.hasEagerState?Ve.eagerState:h(R,Je)}else At={lane:Je,revertLane:Ve.revertLane,gesture:Ve.gesture,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null},Re===null?(te=Re=At,W=R):Re=Re.next=At,tn.lanes|=Je,ml|=Je;Ve=Ve.next}while(Ve!==null&&Ve!==l);if(Re===null?W=R:Re.next=te,!pr(R,o.memoizedState)&&(Ui=!0,$e&&(h=ou,h!==null)))throw h;o.memoizedState=R,o.baseState=W,o.baseQueue=Re,A.lastRenderedState=R}return E===null&&(A.lanes=0),[o.memoizedState,A.dispatch]}function yr(o){var l=Ht(),h=l.queue;if(h===null)throw Error(a(311));h.lastRenderedReducer=o;var A=h.dispatch,E=h.pending,R=l.memoizedState;if(E!==null){h.pending=null;var W=E=E.next;do R=o(R,W.action),W=W.next;while(W!==E);pr(R,l.memoizedState)||(Ui=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),h.lastRenderedState=R}return[R,A]}function Ki(o,l,h){var A=tn,E=Ht(),R=gn;if(R){if(h===void 0)throw Error(a(407));h=h()}else h=l();var W=!pr((Zn||E).memoizedState,h);if(W&&(E.memoizedState=h,Ui=!0),E=E.queue,Kf(Wr.bind(null,A,E,o),[o]),E.getSnapshot!==l||W||Bi!==null&&Bi.memoizedState.tag&1){if(A.flags|=2048,Lr(9,{destroy:void 0},zn.bind(null,A,E,h,l),null),$n===null)throw Error(a(349));R||(Ro&127)!==0||Gn(A,l,h)}return h}function Gn(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=tn.updateQueue,l===null?(l=Tn(),tn.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function zn(o,l,h,A){l.value=h,l.getSnapshot=A,Dn(l)&&jr(o)}function Wr(o,l,h){return h(function(){Dn(l)&&jr(o)})}function Dn(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!pr(o,h)}catch{return!0}}function jr(o){var l=Ps(o,2);l!==null&&Nr(l,o,2)}function gi(o){var l=dn();if(typeof o=="function"){var h=o;if(o=h(),tc){K(!0);try{h()}finally{K(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:o},l}function cr(o,l,h,A){return o.baseState=h,Ii(o,Zn,typeof A=="function"?A:Kt)}function Da(o,l,h,A,E){if(_o(o))throw Error(a(485));if(o=l.action,o!==null){var R={payload:E,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(W){R.listeners.push(W)}};It.T!==null?h(!0):R.isTransition=!1,A(R),h=l.pending,h===null?(R.next=l.pending=R,na(l,R)):(R.next=h.next,l.pending=h.next=R)}}function na(o,l){var h=l.action,A=l.payload,E=o.state;if(l.isTransition){var R=It.T,W={};It.T=W;try{var te=h(E,A),Re=It.S;Re!==null&&Re(W,te),ia(o,l,te)}catch(Ve){td(o,l,Ve)}finally{R!==null&&W.types!==null&&(R.types=W.types),It.T=R}}else try{R=h(E,A),ia(o,l,R)}catch(Ve){td(o,l,Ve)}}function ia(o,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(A){ra(o,l,A)},function(A){return td(o,l,A)}):ra(o,l,h)}function ra(o,l,h){l.status="fulfilled",l.value=h,Zf(l),o.state=h,l=o.pending,l!==null&&(h=l.next,h===l?o.pending=null:(h=h.next,l.next=h,na(o,h)))}function td(o,l,h){var A=o.pending;if(o.pending=null,A!==null){A=A.next;do l.status="rejected",l.reason=h,Zf(l),l=l.next;while(l!==A)}o.action=null}function Zf(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function jm(o,l){return l}function sa(o,l){if(gn){var h=$n.formState;if(h!==null){e:{var A=tn;if(gn){if(oi){var E=g0(oi,Os);if(E){oi=Ug(E),A=A0(E);break e}}pt(A)}A=!1}A&&(l=h[0])}}h=dn(),h.memoizedState=h.baseState=l,A={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:l},h.queue=A,h=ih.bind(null,tn,A),A.dispatch=h,A=gi(!1);var R=Uc.bind(null,tn,!1,A.queue);return A=dn(),E={state:l,dispatch:null,action:o,pending:null},A.queue=E,h=Da.bind(null,tn,E,R,h),E.dispatch=h,A.memoizedState=o,[l,h,!1]}function Xm(o){var l=Ht();return aa(l,Zn,o)}function aa(o,l,h){if(l=Ii(o,l,jm)[0],o=Hi(Kt)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var A=Qn(l)}catch(W){throw W===lu?op:W}else A=l;l=Ht();var E=l.queue,R=E.dispatch;return h!==l.memoizedState&&(tn.flags|=2048,Lr(9,{destroy:void 0},nd.bind(null,E,h),null)),[A,R,o]}function nd(o,l){o.action=l}function id(o){var l=Ht(),h=Zn;if(h!==null)return aa(l,h,o);Ht(),l=l.memoizedState,h=Ht();var A=h.queue.dispatch;return h.memoizedState=o,[l,A,!1]}function Lr(o,l,h,A){return o={tag:o,create:h,deps:A,inst:l,next:null},l=tn.updateQueue,l===null&&(l=Tn(),tn.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=o.next=o:(A=h.next,h.next=o,o.next=A,l.lastEffect=o),o}function Bl(){return Ht().memoizedState}function rd(o,l,h,A){var E=dn();tn.flags|=o,E.memoizedState=Lr(1|l,{destroy:void 0},h,A===void 0?null:A)}function Bc(o,l,h,A){var E=Ht();A=A===void 0?null:A;var R=E.memoizedState.inst;Zn!==null&&A!==null&&dt(A,Zn.memoizedState.deps)?E.memoizedState=Lr(l,R,h,A):(tn.flags|=o,E.memoizedState=Lr(1|l,R,h,A))}function qm(o,l){rd(8390656,8,o,l)}function Kf(o,l){Bc(2048,8,o,l)}function Iv(o){tn.flags|=4;var l=tn.updateQueue;if(l===null)l=Tn(),tn.updateQueue=l,l.events=[o];else{var h=l.events;h===null?l.events=[o]:h.push(o)}}function _f(o){var l=Ht().memoizedState;return Iv({ref:l,nextImpl:o}),function(){if((An&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}function Ym(o,l){return Bc(4,2,o,l)}function $f(o,l){return Bc(4,4,o,l)}function Nv(o,l){if(typeof l=="function"){o=o();var h=l(o);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Jm(o,l,h){h=h!=null?h.concat([o]):null,Bc(4,4,Nv.bind(null,l,o),h)}function Qm(){}function eh(o,l){var h=Ht();l=l===void 0?null:l;var A=h.memoizedState;return l!==null&&dt(l,A[1])?A[0]:(h.memoizedState=[o,l],o)}function sd(o,l){var h=Ht();l=l===void 0?null:l;var A=h.memoizedState;if(l!==null&&dt(l,A[1]))return A[0];if(A=o(),tc){K(!0);try{o()}finally{K(!1)}}return h.memoizedState=[A,l],A}function th(o,l,h){return h===void 0||(Ro&1073741824)!==0&&(bn&261930)===0?o.memoizedState=l:(o.memoizedState=h,o=Md(),tn.lanes|=o,ml|=o,h)}function ad(o,l,h,A){return pr(h,l)?h:qa.current!==null?(o=th(o,h,A),pr(o,l)||(Ui=!0),o):(Ro&42)===0||(Ro&1073741824)!==0&&(bn&261930)===0?(Ui=!0,o.memoizedState=h):(o=Md(),tn.lanes|=o,ml|=o,l)}function Zm(o,l,h,A,E){var R=Va();Gi(R!==0&&8>R?R:8);var W=It.T,te={};It.T=te,Uc(o,!1,l,h);try{var Re=E(),Ve=It.S;if(Ve!==null&&Ve(te,Re),Re!==null&&typeof Re=="object"&&typeof Re.then=="function"){var $e=Ct(Re,A);Ko(o,l,$e,Yr(o))}else Ko(o,l,A,Yr(o))}catch(Je){Ko(o,l,{then:function(){},status:"rejected",reason:Je},Yr())}finally{Gi(R),W!==null&&te.types!==null&&(W.types=te.types),It.T=W}}function Km(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:Br,baseState:Br,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:Br},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:h},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function nh(){return ee(ll)}function ho(){return Ht().memoizedState}function _m(){return Ht().memoizedState}function zv(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var h=Yr();o=lr(h);var A=ls(l,o,h);A!==null&&(Nr(A,l,h),Qo(A,l,h)),l={cache:Y()},o.payload=l;return}l=l.return}}function ur(o,l,h){var A=Yr();h={lane:A,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},_o(o)?$m(l,h):(h=Rs(o,l,h,A),h!==null&&(Nr(h,o,A),od(h,l,A)))}function ih(o,l,h){var A=Yr();Ko(o,l,h,A)}function Ko(o,l,h,A){var E={lane:A,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(_o(o))$m(l,E);else{var R=o.alternate;if(o.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var W=l.lastRenderedState,te=R(W,h);if(E.hasEagerState=!0,E.eagerState=te,pr(te,W))return $s(o,l,E,0),$n===null&&Zi(),!1}catch{}finally{}if(h=Rs(o,l,E,A),h!==null)return Nr(h,o,A),od(h,l,A),!0}return!1}function Uc(o,l,h,A){if(A={lane:2,revertLane:rt(),gesture:null,action:A,hasEagerState:!1,eagerState:null,next:null},_o(o)){if(l)throw Error(a(479))}else l=Rs(o,h,A,2),l!==null&&Nr(l,o,2)}function _o(o){var l=o.alternate;return o===tn||l!==null&&l===tn}function $m(o,l){cu=up=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function od(o,l,h){if((h&4194048)!==0){var A=l.lanes;A&=o.pendingLanes,h|=A,l.lanes=h,F(o,h)}}function rh(o,l,h,A){l=o.memoizedState,h=h(A,l),h=h==null?l:us({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}function ld(o,l,h,A,E,R,W){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(A,R,W):l.prototype&&l.prototype.isPureReactComponent?!Le(h,A)||!Le(E,R):!0}function eg(o,l,h,A){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,A),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,A),l.state!==o&&fp.enqueueReplaceState(l,l.state,null)}function La(o,l){var h=l;if("ref"in l){h={};for(var A in l)A!=="ref"&&(h[A]=l[A])}if(o=o.defaultProps){h===l&&(h=us({},h));for(var E in o)h[E]===void 0&&(h[E]=o[E])}return h}function cd(o,l){try{var h=o.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(A){setTimeout(function(){throw A})}}function tg(o,l,h){try{var A=o.onCaughtError;A(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Fc(o,l,h){return h=lr(h),h.tag=3,h.payload={element:null},h.callback=function(){cd(o,l)},h}function ud(o){return o=lr(o),o.tag=3,o}function sh(o,l,h,A){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var R=A.value;o.payload=function(){return E(R)},o.callback=function(){tg(l,h,A)}}var W=h.stateNode;W!==null&&typeof W.componentDidCatch=="function"&&(o.callback=function(){tg(l,h,A),typeof E!="function"&&(gl===null?gl=new Set([this]):gl.add(this));var te=A.stack;this.componentDidCatch(A.value,{componentStack:te!==null?te:""})})}function br(o,l,h,A,E){if(h.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){if(l=h.alternate,l!==null&&bt(l,h,E,!0),h=fs.current,h!==null){switch(h.tag){case 31:case 13:return Aa===null?qc():h.alternate===null&&vi===0&&(vi=3),h.flags&=-257,h.flags|=65536,h.lanes=E,A===lp?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([A]):l.add(A),Dh(o,A,E)),!1;case 22:return h.flags|=65536,A===lp?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([A])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([A]):h.add(A)),Dh(o,A,E)),!1}throw Error(a(435,h.tag))}return Dh(o,A,E),qc(),!1}if(gn)return l=fs.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=E,A!==qg&&(o=Error(a(422),{cause:A}),xe(ce(o,h)))):(A!==qg&&(l=Error(a(423),{cause:A}),xe(ce(l,h))),o=o.current.alternate,o.flags|=65536,E&=-E,o.lanes|=E,A=ce(A,h),E=Fc(o.stateNode,A,E),Zo(o,E),vi!==4&&(vi=2)),!1;var R=Error(a(520),{cause:A});if(R=ce(R,h),Kd===null?Kd=[R]:Kd.push(R),vi!==4&&(vi=2),l===null)return!0;A=ce(A,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,o=E&-E,h.lanes|=o,o=Fc(h.stateNode,A,o),Zo(h,o),!1;case 1:if(l=h.type,R=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(gl===null||!gl.has(R))))return h.flags|=65536,E&=-E,h.lanes|=E,E=ud(E),sh(E,o,h,A),Zo(h,E),!1}h=h.return}while(h!==null);return!1}function _i(o,l,h,A){l.child=o===null?O0(l,null,h,A):ec(l,o.child,h,A)}function dd(o,l,h,A,E){h=h.render;var R=l.ref;if("ref"in A){var W={};for(var te in A)te!=="ref"&&(W[te]=A[te])}else W=A;return Et(l),A=at(o,l,h,W,R,E),te=Ot(),o!==null&&!Ui?(vt(o,l,E),Xr(o,l,E)):(gn&&te&&Fe(l),l.flags|=1,_i(o,l,A,E),l.child)}function ah(o,l,h,A,E){if(o===null){var R=h.type;return typeof R=="function"&&!Cd(R)&&R.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=R,oh(o,l,R,A,E)):(o=Rd(h.type,null,A,l,l.mode,E),o.ref=l.ref,o.return=l,l.child=o)}if(R=o.child,!Hc(o,E)){var W=R.memoizedProps;if(h=h.compare,h=h!==null?h:Le,h(W,A)&&o.ref===l.ref)return Xr(o,l,E)}return l.flags|=1,o=Ua(R,A),o.ref=l.ref,o.return=l,l.child=o}function oh(o,l,h,A,E){if(o!==null){var R=o.memoizedProps;if(Le(R,A)&&o.ref===l.ref)if(Ui=!1,l.pendingProps=A=R,Hc(o,E))(o.flags&131072)!==0&&(Ui=!0);else return l.lanes=o.lanes,Xr(o,l,E)}return ng(o,l,h,A,E)}function po(o,l,h,A){var E=A.children,R=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),A.mode==="hidden"){if((l.flags&128)!==0){if(R=R!==null?R.baseLanes|h:h,o!==null){for(A=l.child=o.child,E=0;A!==null;)E=E|A.lanes|A.childLanes,A=A.sibling;A=E&~R}else A=0,l.child=null;return Oc(o,l,R,h,A)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&ae(l,R!==null?R.cachePool:null),R!==null?xt(l,R):zl(),oe(l);else return A=l.lanes=536870912,Oc(o,l,R!==null?R.baseLanes|h:h,h,A)}else R!==null?(ae(l,R.cachePool),xt(l,R),Ae(),l.memoizedState=null):(o!==null&&ae(l,null),zl(),Ae());return _i(o,l,E,h),l.child}function Ds(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Oc(o,l,h,A,E){var R=jt();return R=R===null?null:{parent:zs?di._currentValue:di._currentValue2,pool:R},l.memoizedState={baseLanes:h,cachePool:R},o!==null&&ae(l,null),zl(),oe(l),o!==null&&bt(o,l,A,!0),l.childLanes=E,null}function Ul(o,l){return l=oa({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function Vc(o,l,h){return ec(l,o.child,null,h),o=Ul(l,l.pendingProps),o.flags|=2,he(l),l.memoizedState=null,o}function fd(o,l,h){var A=l.pendingProps,E=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(gn){if(A.mode==="hidden")return o=Ul(l,A),l.lanes=536870912,Ds(null,o);if(G(l),(o=oi)?(o=x0(o,Os),o!==null&&(l.memoizedState={dehydrated:o,treeContext:Eo!==null?{id:Ur,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},h=Nh(o),h.return=l,l.child=h,Wi=l,oi=null)):o=null,o===null)throw pt(l);return l.lanes=536870912,null}return Ul(l,A)}var R=o.memoizedState;if(R!==null){var W=R.dehydrated;if(G(l),E)if(l.flags&256)l.flags&=-257,l=Vc(o,l,h);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(a(558));else if(Ui||bt(o,l,h,!1),E=(h&o.childLanes)!==0,Ui||E){if(A=$n,A!==null&&(W=V(A,h),W!==0&&W!==R.retryLane))throw R.retryLane=W,Ps(o,W),Nr(A,o,W),hp;qc(),l=Vc(o,l,h)}else o=R.treeContext,fr&&(oi=Fg(W),Wi=l,gn=!0,Co=null,Os=!1,o!==null&<(l,o)),l=Ul(l,A),l.flags|=4096;return l}return o=Ua(o.child,{mode:A.mode,children:A.children}),o.ref=l.ref,l.child=o,o.return=l,o}function hd(o,l){var h=l.ref;if(h===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(a(284));(o===null||o.ref!==h)&&(l.flags|=4194816)}}function ng(o,l,h,A,E){return Et(l),h=at(o,l,h,A,void 0,E),A=Ot(),o!==null&&!Ui?(vt(o,l,E),Xr(o,l,E)):(gn&&A&&Fe(l),l.flags|=1,_i(o,l,h,E),l.child)}function ig(o,l,h,A,E,R){return Et(l),l.updateQueue=null,h=Tt(l,A,h,E),St(o),A=Ot(),o!==null&&!Ui?(vt(o,l,R),Xr(o,l,R)):(gn&&A&&Fe(l),l.flags|=1,_i(o,l,h,R),l.child)}function rg(o,l,h,A,E){if(Et(l),l.stateNode===null){var R=Zl,W=h.contextType;typeof W=="object"&&W!==null&&(R=ee(W)),R=new h(A,R),l.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=fp,l.stateNode=R,R._reactInternals=l,R=l.stateNode,R.props=A,R.state=l.memoizedState,R.refs={},Jo(l),W=h.contextType,R.context=typeof W=="object"&&W!==null?ee(W):Zl,R.state=l.memoizedState,W=h.getDerivedStateFromProps,typeof W=="function"&&(rh(l,h,W,A),R.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(W=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),W!==R.state&&fp.enqueueReplaceState(R,R.state,null),ks(l,A,R,E),fo(),R.state=l.memoizedState),typeof R.componentDidMount=="function"&&(l.flags|=4194308),A=!0}else if(o===null){R=l.stateNode;var te=l.memoizedProps,Re=La(h,te);R.props=Re;var Ve=R.context,$e=h.contextType;W=Zl,typeof $e=="object"&&$e!==null&&(W=ee($e));var Je=h.getDerivedStateFromProps;$e=typeof Je=="function"||typeof R.getSnapshotBeforeUpdate=="function",te=l.pendingProps!==te,$e||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(te||Ve!==W)&&eg(l,R,A,W),fl=!1;var At=l.memoizedState;R.state=At,ks(l,A,R,E),fo(),Ve=l.memoizedState,te||At!==Ve||fl?(typeof Je=="function"&&(rh(l,h,Je,A),Ve=l.memoizedState),(Re=fl||ld(l,h,Re,A,At,Ve,W))?($e||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=A,l.memoizedState=Ve),R.props=A,R.state=Ve,R.context=W,A=Re):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),A=!1)}else{R=l.stateNode,Dr(o,l),W=l.memoizedProps,$e=La(h,W),R.props=$e,Je=l.pendingProps,At=R.context,Ve=h.contextType,Re=Zl,typeof Ve=="object"&&Ve!==null&&(Re=ee(Ve)),te=h.getDerivedStateFromProps,(Ve=typeof te=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(W!==Je||At!==Re)&&eg(l,R,A,Re),fl=!1,At=l.memoizedState,R.state=At,ks(l,A,R,E),fo();var Ft=l.memoizedState;W!==Je||At!==Ft||fl||o!==null&&o.dependencies!==null&&zt(o.dependencies)?(typeof te=="function"&&(rh(l,h,te,A),Ft=l.memoizedState),($e=fl||ld(l,h,$e,A,At,Ft,Re)||o!==null&&o.dependencies!==null&&zt(o.dependencies))?(Ve||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(A,Ft,Re),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(A,Ft,Re)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=1024),l.memoizedProps=A,l.memoizedState=Ft),R.props=A,R.state=Ft,R.context=Re,A=$e):(typeof R.componentDidUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&At===o.memoizedState||(l.flags|=1024),A=!1)}return R=A,hd(o,l),A=(l.flags&128)!==0,R||A?(R=l.stateNode,h=A&&typeof h.getDerivedStateFromError!="function"?null:R.render(),l.flags|=1,o!==null&&A?(l.child=ec(l,o.child,null,E),l.child=ec(l,null,h,E)):_i(o,l,h,E),l.memoizedState=R.state,o=l.child):o=Xr(o,l,E),o}function lh(o,l,h,A){return Dt(),l.flags|=256,_i(o,l,h,A),l.child}function pd(o){return{baseLanes:o,cachePool:_e()}}function Ia(o,l,h){return o=o!==null?o.childLanes&~h:0,l&&(o|=ps),o}function ch(o,l,h){var A=l.pendingProps,E=!1,R=(l.flags&128)!==0,W;if((W=R)||(W=o!==null&&o.memoizedState===null?!1:(Ei.current&2)!==0),W&&(E=!0,l.flags&=-129),W=(l.flags&32)!==0,l.flags&=-33,o===null){if(gn){if(E?ta(l):Ae(),(o=oi)?(o=xS(o,Os),o!==null&&(l.memoizedState={dehydrated:o,treeContext:Eo!==null?{id:Ur,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},h=Nh(o),h.return=l,l.child=h,Wi=l,oi=null)):o=null,o===null)throw pt(l);return Vd(o)?l.lanes=32:l.lanes=536870912,null}var te=A.children;return A=A.fallback,E?(Ae(),E=l.mode,te=oa({mode:"hidden",children:te},E),A=yo(A,E,h,null),te.return=l,A.return=l,te.sibling=A,l.child=te,A=l.child,A.memoizedState=pd(h),A.childLanes=Ia(o,W,h),l.memoizedState=pp,Ds(null,A)):(ta(l),uh(l,te))}var Re=o.memoizedState;if(Re!==null&&(te=Re.dehydrated,te!==null)){if(R)l.flags&256?(ta(l),l.flags&=-257,l=Ir(o,l,h)):l.memoizedState!==null?(Ae(),l.child=o.child,l.flags|=128,l=null):(Ae(),te=A.fallback,E=l.mode,A=oa({mode:"visible",children:A.children},E),te=yo(te,E,h,null),te.flags|=2,A.return=l,te.return=l,A.sibling=te,l.child=A,ec(l,o.child,null,h),A=l.child,A.memoizedState=pd(h),A.childLanes=Ia(o,W,h),l.memoizedState=pp,l=Ds(null,A));else if(ta(l),Vd(te))W=Yl(te).digest,A=Error(a(419)),A.stack="",A.digest=W,xe({value:A,source:null,stack:null}),l=Ir(o,l,h);else if(Ui||bt(o,l,h,!1),W=(h&o.childLanes)!==0,Ui||W){if(W=$n,W!==null&&(A=V(W,h),A!==0&&A!==Re.retryLane))throw Re.retryLane=A,Ps(o,A),Nr(W,o,A),hp;Od(te)||qc(),l=Ir(o,l,h)}else Od(te)?(l.flags|=192,l.child=o.child,l=null):(o=Re.treeContext,fr&&(oi=y0(te),Wi=l,gn=!0,Co=null,Os=!1,o!==null&<(l,o)),l=uh(l,A.children),l.flags|=4096);return l}return E?(Ae(),te=A.fallback,E=l.mode,Re=o.child,R=Re.sibling,A=Ua(Re,{mode:"hidden",children:A.children}),A.subtreeFlags=Re.subtreeFlags&65011712,R!==null?te=Ua(R,te):(te=yo(te,E,h,null),te.flags|=2),te.return=l,A.return=l,A.sibling=te,l.child=A,Ds(null,A),A=l.child,te=o.child.memoizedState,te===null?te=pd(h):(E=te.cachePool,E!==null?(Re=zs?di._currentValue:di._currentValue2,E=E.parent!==Re?{parent:Re,pool:Re}:E):E=_e(),te={baseLanes:te.baseLanes|h,cachePool:E}),A.memoizedState=te,A.childLanes=Ia(o,W,h),l.memoizedState=pp,Ds(o.child,A)):(ta(l),h=o.child,o=h.sibling,h=Ua(h,{mode:"visible",children:A.children}),h.return=l,h.sibling=null,o!==null&&(W=l.deletions,W===null?(l.deletions=[o],l.flags|=16):W.push(o)),l.child=h,l.memoizedState=null,h)}function uh(o,l){return l=oa({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function oa(o,l){return o=t(22,o,null,l),o.lanes=0,o}function Ir(o,l,h){return ec(l,o.child,null,h),o=uh(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function md(o,l,h){o.lanes|=l;var A=o.alternate;A!==null&&(A.lanes|=l),Ze(o.return,l,h)}function en(o,l,h,A,E,R){var W=o.memoizedState;W===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:A,tail:h,tailMode:E,treeForkCount:R}:(W.isBackwards=l,W.rendering=null,W.renderingStartTime=0,W.last=A,W.tail=h,W.tailMode=E,W.treeForkCount=R)}function Ge(o,l,h){var A=l.pendingProps,E=A.revealOrder,R=A.tail;A=A.children;var W=Ei.current,te=(W&2)!==0;if(te?(W=W&1|2,l.flags|=128):W&=1,w(Ei,W),_i(o,l,A,h),A=gn?be:0,!te&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&md(o,h,l);else if(o.tag===19)md(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(E){case"forwards":for(h=l.child,E=null;h!==null;)o=h.alternate,o!==null&&ge(o)===null&&(E=h),h=h.sibling;h=E,h===null?(E=l.child,l.child=null):(E=h.sibling,h.sibling=null),en(l,!1,E,h,R,A);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=l.child,l.child=null;E!==null;){if(o=E.alternate,o!==null&&ge(o)===null){l.child=E;break}o=E.sibling,E.sibling=h,h=E,E=o}en(l,!0,h,null,R,A);break;case"together":en(l,!1,null,null,void 0,A);break;default:l.memoizedState=null}return l.child}function Xr(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),ml|=l.lanes,(h&l.childLanes)===0)if(o!==null){if(bt(o,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(a(153));if(l.child!==null){for(o=l.child,h=Ua(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=Ua(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function Hc(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&zt(o)))}function Ai(o,l,h){switch(l.tag){case 3:ct(l,l.stateNode.containerInfo),ze(l,di,o.memoizedState.cache),Dt();break;case 27:case 5:qe(l);break;case 4:ct(l,l.stateNode.containerInfo);break;case 10:ze(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,G(l),null;break;case 13:var A=l.memoizedState;if(A!==null)return A.dehydrated!==null?(ta(l),l.flags|=128,null):(h&l.child.childLanes)!==0?ch(o,l,h):(ta(l),o=Xr(o,l,h),o!==null?o.sibling:null);ta(l);break;case 19:var E=(o.flags&128)!==0;if(A=(h&l.childLanes)!==0,A||(bt(o,l,h,!1),A=(h&l.childLanes)!==0),E){if(A)return Ge(o,l,h);l.flags|=128}if(E=l.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),w(Ei,Ei.current),A)break;return null;case 22:return l.lanes=0,po(o,l,h,l.pendingProps);case 24:ze(l,di,o.memoizedState.cache)}return Xr(o,l,h)}function dh(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps)Ui=!0;else{if(!Hc(o,h)&&(l.flags&128)===0)return Ui=!1,Ai(o,l,h);Ui=(o.flags&131072)!==0}else Ui=!1,gn&&(l.flags&1048576)!==0&&Te(l,be,l.index);switch(l.lanes=0,l.tag){case 16:e:{var A=l.pendingProps;if(o=Ne(l.elementType),l.type=o,typeof o=="function")Cd(o)?(A=La(o,A),l.tag=1,l=rg(null,l,o,A,h)):(l.tag=0,l=ng(null,l,o,A,h));else{if(o!=null){var E=o.$$typeof;if(E===Jc){l.tag=11,l=dd(null,l,o,A,h);break e}else if(E===Eg){l.tag=14,l=ah(null,l,o,A,h);break e}}throw l=M(o)||o,Error(a(306,l,""))}}return l;case 0:return ng(o,l,l.type,l.pendingProps,h);case 1:return A=l.type,E=La(A,l.pendingProps),rg(o,l,A,E,h);case 3:e:{if(ct(l,l.stateNode.containerInfo),o===null)throw Error(a(387));var R=l.pendingProps;E=l.memoizedState,A=E.element,Dr(o,l),ks(l,R,null,h);var W=l.memoizedState;if(R=W.cache,ze(l,di,R),R!==E.cache&&Pt(l,[di],h,!0),fo(),R=W.element,fr&&E.isDehydrated)if(E={element:R,isDehydrated:!1,cache:W.cache},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){l=lh(o,l,R,h);break e}else if(R!==A){A=ce(Error(a(424)),l),xe(A),l=lh(o,l,R,h);break e}else for(fr&&(oi=Yh(l.stateNode.containerInfo),Wi=l,gn=!0,Co=null,Os=!0),h=O0(l,null,R,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Dt(),R===A){l=Xr(o,l,h);break e}_i(o,l,R,h)}l=l.child}return l;case 26:if(Bs)return hd(o,l),o===null?(h=$c(l.type,null,l.pendingProps,null))?l.memoizedState=h:gn||(l.stateNode=I0(l.type,l.pendingProps,ul.current,l)):l.memoizedState=$c(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:if(Ni)return qe(l),o===null&&Ni&&gn&&(A=l.stateNode=_h(l.type,l.pendingProps,ul.current,mr.current,!1),Wi=l,Os=!0,oi=yS(l.type,A,oi)),_i(o,l,l.pendingProps.children,h),hd(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&gn&&(wS(l.type,l.pendingProps,mr.current),(E=A=oi)&&(A=bS(A,l.type,l.pendingProps,Os),A!==null?(l.stateNode=A,Wi=l,oi=qh(A),Os=!1,E=!0):E=!1),E||pt(l)),qe(l),E=l.type,R=l.pendingProps,W=o!==null?o.memoizedProps:null,A=R.children,zd(E,R)?A=null:W!==null&&zd(E,W)&&(l.flags|=32),l.memoizedState!==null&&(E=at(o,l,Xt,null,null,h),zs?ll._currentValue=E:ll._currentValue2=E),hd(o,l),_i(o,l,A,h),l.child;case 6:return o===null&&gn&&(Hg(l.pendingProps,mr.current),(o=h=oi)&&(h=b0(h,l.pendingProps,Os),h!==null?(l.stateNode=h,Wi=l,oi=null,o=!0):o=!1),o||pt(l)),null;case 13:return ch(o,l,h);case 4:return ct(l,l.stateNode.containerInfo),A=l.pendingProps,o===null?l.child=ec(l,null,A,h):_i(o,l,A,h),l.child;case 11:return dd(o,l,l.type,l.pendingProps,h);case 7:return _i(o,l,l.pendingProps,h),l.child;case 8:return _i(o,l,l.pendingProps.children,h),l.child;case 12:return _i(o,l,l.pendingProps.children,h),l.child;case 10:return A=l.pendingProps,ze(l,l.type,A.value),_i(o,l,A.children,h),l.child;case 9:return E=l.type._context,A=l.pendingProps.children,Et(l),E=ee(E),A=A(E),l.flags|=1,_i(o,l,A,h),l.child;case 14:return ah(o,l,l.type,l.pendingProps,h);case 15:return oh(o,l,l.type,l.pendingProps,h);case 19:return Ge(o,l,h);case 31:return fd(o,l,h);case 22:return po(o,l,h,l.pendingProps);case 24:return Et(l),A=ee(di),o===null?(E=jt(),E===null&&(E=$n,R=Y(),E.pooledCache=R,R.refCount++,R!==null&&(E.pooledCacheLanes|=h),E=R),l.memoizedState={parent:A,cache:E},Jo(l),ze(l,di,E)):((o.lanes&h)!==0&&(Dr(o,l),ks(l,null,null,h),fo()),E=o.memoizedState,R=l.memoizedState,E.parent!==A?(E={parent:A,cache:A},l.memoizedState=E,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=E),ze(l,di,A)):(A=R.cache,ze(l,di,A),A!==E.cache&&Pt(l,[di],h,!0))),_i(o,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(a(156,l.tag))}function cs(o){o.flags|=4}function gd(o){fa&&(o.flags|=8)}function fh(o,l){if(o!==null&&o.child===l.child)return!1;if((l.flags&16)!==0)return!0;for(o=l.child;o!==null;){if((o.flags&8218)!==0||(o.subtreeFlags&8218)!==0)return!0;o=o.sibling}return!1}function sg(o,l,h,A){if(Mr)for(h=l.child;h!==null;){if(h.tag===5||h.tag===6)Hh(o,h.stateNode);else if(!(h.tag===4||Ni&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(fa)for(var E=l.child;E!==null;){if(E.tag===5){var R=E.stateNode;h&&A&&(R=So(R,E.type,E.memoizedProps)),Hh(o,R)}else if(E.tag===6)R=E.stateNode,h&&A&&(R=Fd(R,E.memoizedProps)),Hh(o,R);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)R=E.child,R!==null&&(R.return=E),sg(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function hh(o,l,h,A){var E=!1;if(fa)for(var R=l.child;R!==null;){if(R.tag===5){var W=R.stateNode;h&&A&&(W=So(W,R.type,R.memoizedProps)),Bg(o,W)}else if(R.tag===6)W=R.stateNode,h&&A&&(W=Fd(W,R.memoizedProps)),Bg(o,W);else if(R.tag!==4){if(R.tag===22&&R.memoizedState!==null)E=R.child,E!==null&&(E.return=R),hh(o,R,!0,!0),E=!0;else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===l)break;for(;R.sibling===null;){if(R.return===null||R.return===l)return E;R=R.return}R.sibling.return=R.return,R=R.sibling}return E}function ph(o,l){if(fa&&fh(o,l)){o=l.stateNode;var h=o.containerInfo,A=ai();hh(A,l,!1,!1),o.pendingChildren=A,cs(l),p0(h,A)}}function Ad(o,l,h,A){if(Mr)o.memoizedProps!==A&&cs(l);else if(fa){var E=o.stateNode,R=o.memoizedProps;if((o=fh(o,l))||R!==A){var W=mr.current;R=h0(E,h,R,A,!o,null),R===E?l.stateNode=E:(gd(l),Zv(R,h,A,W)&&cs(l),l.stateNode=R,o&&sg(R,l,!1,!1))}else l.stateNode=E}}function dr(o,l,h,A,E){if((o.mode&32)!==0&&(h===null?e0(l,A):AS(l,h,A))){if(o.flags|=16777216,(E&335544128)===E||Qc(l,A))if(hr(o.stateNode,l,A))o.flags|=8192;else if(Wv())o.flags|=8192;else throw Vs=lp,ap}else o.flags&=-16777217}function Fn(o,l){if(TS(l)){if(o.flags|=16777216,!Kh(l))if(Wv())o.flags|=8192;else throw Vs=lp,ap}else o.flags&=-16777217}function Fl(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?L():536870912,o.lanes|=l,fu|=l)}function mo(o,l){if(!gn)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var A=null;h!==null;)h.alternate!==null&&(A=h),h=h.sibling;A===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:A.sibling=null}}function Bn(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,A=0;if(l)for(var E=o.child;E!==null;)h|=E.lanes|E.childLanes,A|=E.subtreeFlags&65011712,A|=E.flags&65011712,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)h|=E.lanes|E.childLanes,A|=E.subtreeFlags,A|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=A,o.childLanes=h,l}function Ol(o,l,h){var A=l.pendingProps;switch(ft(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bn(l),null;case 1:return Bn(l),null;case 3:return h=l.stateNode,A=null,o!==null&&(A=o.memoizedState.cache),l.memoizedState.cache!==A&&(l.flags|=2048),je(di),Pe(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(sn(l)?cs(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ue())),ph(o,l),Bn(l),null;case 26:if(Bs){var E=l.type,R=l.memoizedState;return o===null?(cs(l),R!==null?(Bn(l),Fn(l,R)):(Bn(l),dr(l,E,null,A,h))):R?R!==o.memoizedState?(cs(l),Bn(l),Fn(l,R)):(Bn(l),l.flags&=-16777217):(R=o.memoizedProps,Mr?R!==A&&cs(l):Ad(o,l,E,A),Bn(l),dr(l,E,R,A,h)),null}case 27:if(Ni){if(He(l),h=ul.current,E=l.type,o!==null&&l.stateNode!=null)Mr?o.memoizedProps!==A&&cs(l):Ad(o,l,E,A);else{if(!A){if(l.stateNode===null)throw Error(a(166));return Bn(l),null}o=mr.current,sn(l)?Nt(l,o):(o=_h(E,A,h,o,!0),l.stateNode=o,cs(l))}return Bn(l),null}case 5:if(He(l),E=l.type,o!==null&&l.stateNode!=null)Ad(o,l,E,A);else{if(!A){if(l.stateNode===null)throw Error(a(166));return Bn(l),null}if(R=mr.current,sn(l))Nt(l,R),C0(l.stateNode,E,A,R)&&(l.flags|=64);else{var W=Oa(E,A,ul.current,R,l);gd(l),sg(W,l,!1,!1),l.stateNode=W,Zv(W,E,A,R)&&cs(l)}}return Bn(l),dr(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,h),null;case 6:if(o&&l.stateNode!=null)h=o.memoizedProps,Mr?h!==A&&cs(l):fa&&(h!==A?(o=ul.current,h=mr.current,gd(l),l.stateNode=Gh(A,o,h,l)):l.stateNode=o.stateNode);else{if(typeof A!="string"&&l.stateNode===null)throw Error(a(166));if(o=ul.current,h=mr.current,sn(l)){if(!fr)throw Error(a(176));if(o=l.stateNode,h=l.memoizedProps,A=null,E=Wi,E!==null)switch(E.tag){case 27:case 5:A=E.memoizedProps}Jh(o,h,l,A)||pt(l,!0)}else gd(l),l.stateNode=Gh(A,o,h,l)}return Bn(l),null;case 31:if(h=l.memoizedState,o===null||o.memoizedState!==null){if(A=sn(l),h!==null){if(o===null){if(!A)throw Error(a(318));if(!fr)throw Error(a(556));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(557));S0(o,l)}else Dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Bn(l),o=!1}else h=Ue(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return l.flags&256?(he(l),l):(he(l),null);if((l.flags&128)!==0)throw Error(a(558))}return Bn(l),null;case 13:if(A=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(E=sn(l),A!==null&&A.dehydrated!==null){if(o===null){if(!E)throw Error(a(318));if(!fr)throw Error(a(344));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(a(317));Og(E,l)}else Dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Bn(l),E=!1}else E=Ue(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=E),E=!0;if(!E)return l.flags&256?(he(l),l):(he(l),null)}return he(l),(l.flags&128)!==0?(l.lanes=h,l):(h=A!==null,o=o!==null&&o.memoizedState!==null,h&&(A=l.child,E=null,A.alternate!==null&&A.alternate.memoizedState!==null&&A.alternate.memoizedState.cachePool!==null&&(E=A.alternate.memoizedState.cachePool.pool),R=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(R=A.memoizedState.cachePool.pool),R!==E&&(A.flags|=2048)),h!==o&&h&&(l.child.flags|=8192),Fl(l,l.updateQueue),Bn(l),null);case 4:return Pe(),ph(o,l),o===null&&gS(l.stateNode.containerInfo),Bn(l),null;case 10:return je(l.type),Bn(l),null;case 19:if(S(Ei),A=l.memoizedState,A===null)return Bn(l),null;if(E=(l.flags&128)!==0,R=A.rendering,R===null)if(E)mo(A,!1);else{if(vi!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(R=ge(o),R!==null){for(l.flags|=128,mo(A,!1),o=R.updateQueue,l.updateQueue=o,Fl(l,o),l.subtreeFlags=0,o=h,h=l.child;h!==null;)xg(h,o),h=h.sibling;return w(Ei,Ei.current&1|2),gn&&ye(l,A.treeForkCount),l.child}o=o.sibling}A.tail!==null&&Wn()>hu&&(l.flags|=128,E=!0,mo(A,!1),l.lanes=4194304)}else{if(!E)if(o=ge(R),o!==null){if(l.flags|=128,E=!0,o=o.updateQueue,l.updateQueue=o,Fl(l,o),mo(A,!0),A.tail===null&&A.tailMode==="hidden"&&!R.alternate&&!gn)return Bn(l),null}else 2*Wn()-A.renderingStartTime>hu&&h!==536870912&&(l.flags|=128,E=!0,mo(A,!1),l.lanes=4194304);A.isBackwards?(R.sibling=l.child,l.child=R):(o=A.last,o!==null?o.sibling=R:l.child=R,A.last=R)}return A.tail!==null?(o=A.tail,A.rendering=o,A.tail=o.sibling,A.renderingStartTime=Wn(),o.sibling=null,h=Ei.current,w(Ei,E?h&1|2:h&1),gn&&ye(l,A.treeForkCount),o):(Bn(l),null);case 22:case 23:return he(l),ea(),A=l.memoizedState!==null,o!==null?o.memoizedState!==null!==A&&(l.flags|=8192):A&&(l.flags|=8192),A?(h&536870912)!==0&&(l.flags&128)===0&&(Bn(l),l.subtreeFlags&6&&(l.flags|=8192)):Bn(l),h=l.updateQueue,h!==null&&Fl(l,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),A=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(A=l.memoizedState.cachePool.pool),A!==h&&(l.flags|=2048),o!==null&&S(dl),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),je(di),Bn(l),null;case 25:return null;case 30:return null}throw Error(a(156,l.tag))}function la(o,l){switch(ft(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return je(di),Pe(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return He(l),null;case 31:if(l.memoizedState!==null){if(he(l),l.alternate===null)throw Error(a(340));Dt()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(he(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(a(340));Dt()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return S(Ei),null;case 4:return Pe(),null;case 10:return je(l.type),null;case 22:case 23:return he(l),ea(),o!==null&&S(dl),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return je(di),null;case 25:return null;default:return null}}function mh(o,l){switch(ft(l),l.tag){case 3:je(di),Pe();break;case 26:case 27:case 5:He(l);break;case 4:Pe();break;case 31:l.memoizedState!==null&&he(l);break;case 13:he(l);break;case 19:S(Ei);break;case 10:je(l.type);break;case 22:case 23:he(l),ea(),o!==null&&S(dl);break;case 24:je(di)}}function Na(o,l){try{var h=l.updateQueue,A=h!==null?h.lastEffect:null;if(A!==null){var E=A.next;h=E;do{if((h.tag&o)===o){A=void 0;var R=h.create,W=h.inst;A=R(),W.destroy=A}h=h.next}while(h!==E)}}catch(te){Ln(l,l.return,te)}}function za(o,l,h){try{var A=l.updateQueue,E=A!==null?A.lastEffect:null;if(E!==null){var R=E.next;A=R;do{if((A.tag&o)===o){var W=A.inst,te=W.destroy;if(te!==void 0){W.destroy=void 0,E=l;var Re=h,Ve=te;try{Ve()}catch($e){Ln(E,Re,$e)}}}A=A.next}while(A!==R)}}catch($e){Ln(l,l.return,$e)}}function Gc(o){var l=o.updateQueue;if(l!==null){var h=o.stateNode;try{ed(l,h)}catch(A){Ln(o,o.return,A)}}}function gh(o,l,h){h.props=La(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(A){Ln(o,l,A)}}function $o(o,l){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var A=Id(o.stateNode);break;case 30:A=o.stateNode;break;default:A=o.stateNode}typeof h=="function"?o.refCleanup=h(A):h.current=A}}catch(E){Ln(o,l,E)}}function ca(o,l){var h=o.ref,A=o.refCleanup;if(h!==null)if(typeof A=="function")try{A()}catch(E){Ln(o,l,E)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){Ln(o,l,E)}else h.current=null}function ag(o){var l=o.type,h=o.memoizedProps,A=o.stateNode;try{l0(A,l,h,o)}catch(E){Ln(o,o.return,E)}}function Ah(o,l,h){try{Wh(o.stateNode,o.type,h,l,o)}catch(A){Ln(o,o.return,A)}}function og(o){return o.tag===5||o.tag===3||(Bs?o.tag===26:!1)||(Ni?o.tag===27&&Ql(o.type):!1)||o.tag===4}function vh(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||og(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(Ni&&o.tag===27&&Ql(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function vd(o,l,h){var A=o.tag;if(A===5||A===6)o=o.stateNode,l?u0(h,o,l):o0(h,o);else if(A!==4&&(Ni&&A===27&&Ql(o.type)&&(h=o.stateNode,l=null),o=o.child,o!==null))for(vd(o,l,h),o=o.sibling;o!==null;)vd(o,l,h),o=o.sibling}function Wc(o,l,h){var A=o.tag;if(A===5||A===6)o=o.stateNode,l?c0(h,o,l):a0(h,o);else if(A!==4&&(Ni&&A===27&&Ql(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(Wc(o,l,h),o=o.sibling;o!==null;)Wc(o,l,h),o=o.sibling}function yh(o,l,h){o=o.containerInfo;try{m0(o,h)}catch(A){Ln(l,l.return,A)}}function lg(o){var l=o.stateNode,h=o.memoizedProps;try{$h(o.type,h,l,o)}catch(A){Ln(o,o.return,A)}}function Bv(o,l){for(mS(o.containerInfo),$i=l;$i!==null;)if(o=$i,l=o.child,(o.subtreeFlags&1028)!==0&&l!==null)l.return=o,$i=l;else for(;$i!==null;){o=$i;var h=o.alternate;switch(l=o.flags,o.tag){case 0:if((l&4)!==0&&(l=o.updateQueue,l=l!==null?l.events:null,l!==null))for(var A=0;A<l.length;A++){var E=l[A];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((l&1024)!==0&&h!==null){l=void 0,A=o,E=h.memoizedProps,h=h.memoizedState;var R=A.stateNode;try{var W=La(A.type,E);l=R.getSnapshotBeforeUpdate(W,h),R.__reactInternalSnapshotBeforeUpdate=l}catch(te){Ln(A,A.return,te)}}break;case 3:(l&1024)!==0&&Mr&&ds(o.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(a(163))}if(l=o.sibling,l!==null){l.return=o.return,$i=l;break}$i=o.return}}function cg(o,l,h){var A=h.flags;switch(h.tag){case 0:case 11:case 15:Is(o,h),A&4&&Na(5,h);break;case 1:if(Is(o,h),A&4)if(o=h.stateNode,l===null)try{o.componentDidMount()}catch(W){Ln(h,h.return,W)}else{var E=La(h.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(E,l,o.__reactInternalSnapshotBeforeUpdate)}catch(W){Ln(h,h.return,W)}}A&64&&Gc(h),A&512&&$o(h,h.return);break;case 3:if(Is(o,h),A&64&&(A=h.updateQueue,A!==null)){if(o=null,h.child!==null)switch(h.child.tag){case 27:case 5:o=Id(h.child.stateNode);break;case 1:o=h.child.stateNode}try{ed(A,o)}catch(W){Ln(h,h.return,W)}}break;case 27:Ni&&l===null&&A&4&&lg(h);case 26:case 5:if(Is(o,h),l===null){if(A&4)ag(h);else if(A&64){o=h.type,l=h.memoizedProps,E=h.stateNode;try{T0(E,o,l,h)}catch(W){Ln(h,h.return,W)}}}A&512&&$o(h,h.return);break;case 12:Is(o,h);break;case 31:Is(o,h),A&4&&ug(o,h);break;case 13:Is(o,h),A&4&&xh(o,h),A&64&&(A=h.memoizedState,A!==null&&(A=A.dehydrated,A!==null&&(h=Lh.bind(null,h),Zc(A,h))));break;case 22:if(A=h.memoizedState!==null||Ya,!A){l=l!==null&&l.memoizedState!==null||Ci,E=Ya;var R=Ci;Ya=A,(Ci=l)&&!R?ua(o,h,(h.subtreeFlags&8772)!==0):Is(o,h),Ya=E,Ci=R}break;case 30:break;default:Is(o,h)}}function Uv(o){var l=o.alternate;l!==null&&(o.alternate=null,Uv(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&$v(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function Ls(o,l,h){for(h=h.child;h!==null;)bh(o,l,h),h=h.sibling}function bh(o,l,h){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Kl,h)}catch{}switch(h.tag){case 26:if(Bs){Ci||ca(h,l),Ls(o,l,h),h.memoizedState?L0(h.memoizedState):h.stateNode&&Wg(h.stateNode);break}case 27:if(Ni){Ci||ca(h,l);var A=Fi,E=_r;Ql(h.type)&&(Fi=h.stateNode,_r=!1),Ls(o,l,h),cl(h.stateNode),Fi=A,_r=E;break}case 5:Ci||ca(h,l);case 6:if(Mr){if(A=Fi,E=_r,Fi=null,Ls(o,l,h),Fi=A,_r=E,Fi!==null)if(_r)try{zg(Fi,h.stateNode)}catch(R){Ln(h,l,R)}else try{Ng(Fi,h.stateNode)}catch(R){Ln(h,l,R)}}else Ls(o,l,h);break;case 18:Mr&&Fi!==null&&(_r?Vg(Fi,h.stateNode):In(Fi,h.stateNode));break;case 4:Mr?(A=Fi,E=_r,Fi=h.stateNode.containerInfo,_r=!0,Ls(o,l,h),Fi=A,_r=E):(fa&&yh(h.stateNode,h,ai()),Ls(o,l,h));break;case 0:case 11:case 14:case 15:za(2,h,l),Ci||za(4,h,l),Ls(o,l,h);break;case 1:Ci||(ca(h,l),A=h.stateNode,typeof A.componentWillUnmount=="function"&&gh(h,l,A)),Ls(o,l,h);break;case 21:Ls(o,l,h);break;case 22:Ci=(A=Ci)||h.memoizedState!==null,Ls(o,l,h),Ci=A;break;default:Ls(o,l,h)}}function ug(o,l){if(fr&&l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{E0(o)}catch(h){Ln(l,l.return,h)}}}function xh(o,l){if(fr&&l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{_c(o)}catch(h){Ln(l,l.return,h)}}function Fv(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new mp),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new mp),l;default:throw Error(a(435,o.tag))}}function yd(o,l){var h=Fv(o);l.forEach(function(A){if(!h.has(A)){h.add(A);var E=Yv.bind(null,o,A);A.then(E,E)}})}function Si(o,l){var h=l.deletions;if(h!==null)for(var A=0;A<h.length;A++){var E=h[A],R=o,W=l;if(Mr){var te=W;e:for(;te!==null;){switch(te.tag){case 27:if(Ni){if(Ql(te.type)){Fi=te.stateNode,_r=!1;break e}break}case 5:Fi=te.stateNode,_r=!1;break e;case 3:case 4:Fi=te.stateNode.containerInfo,_r=!0;break e}te=te.return}if(Fi===null)throw Error(a(160));bh(R,W,E),Fi=null,_r=!1}else bh(R,W,E);R=E.alternate,R!==null&&(R.return=null),E.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)bd(l,o),l=l.sibling}function bd(o,l){var h=o.alternate,A=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Si(l,o),xr(o),A&4&&(za(3,o,o.return),Na(3,o),za(5,o,o.return));break;case 1:Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),A&64&&Ya&&(o=o.updateQueue,o!==null&&(A=o.callbacks,A!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?A:h.concat(A))));break;case 26:if(Bs){var E=va;if(Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),A&4){A=h!==null?h.memoizedState:null;var R=o.memoizedState;h===null?R===null?o.stateNode===null?o.stateNode=Jl(E,o.type,o.memoizedProps,o):Zh(E,o.type,o.stateNode):o.stateNode=D0(E,R,o.memoizedProps):A!==R?(A===null?h.stateNode!==null&&Wg(h.stateNode):L0(A),R===null?Zh(E,o.type,o.stateNode):D0(E,R,o.memoizedProps)):R===null&&o.stateNode!==null&&Ah(o,o.memoizedProps,h.memoizedProps)}break}case 27:if(Ni){Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),h!==null&&A&4&&Ah(o,o.memoizedProps,h.memoizedProps);break}case 5:if(Si(l,o),xr(o),A&512&&(Ci||h===null||ca(h,h.return)),Mr){if(o.flags&32){E=o.stateNode;try{jh(E)}catch(Je){Ln(o,o.return,Je)}}A&4&&o.stateNode!=null&&(E=o.memoizedProps,Ah(o,E,h!==null?h.memoizedProps:E)),A&1024&&(Qd=!0)}else fa&&o.alternate!==null&&(o.alternate.stateNode=o.stateNode);break;case 6:if(Si(l,o),xr(o),A&4&&Mr){if(o.stateNode===null)throw Error(a(162));A=o.memoizedProps,h=h!==null?h.memoizedProps:A,E=o.stateNode;try{Ud(E,h,A)}catch(Je){Ln(o,o.return,Je)}}break;case 3:if(Bs?(N0(),E=va,va=Qh(l.containerInfo),Si(l,o),va=E):Si(l,o),xr(o),A&4){if(Mr&&fr&&h!==null&&h.memoizedState.isDehydrated)try{SS(l.containerInfo)}catch(Je){Ln(o,o.return,Je)}if(fa){A=l.containerInfo,h=l.pendingChildren;try{m0(A,h)}catch(Je){Ln(o,o.return,Je)}}}Qd&&(Qd=!1,Ov(o));break;case 4:Bs?(h=va,va=Qh(o.stateNode.containerInfo),Si(l,o),xr(o),va=h):(Si(l,o),xr(o)),A&4&&fa&&yh(o.stateNode,o,o.stateNode.pendingChildren);break;case 12:Si(l,o),xr(o);break;case 31:Si(l,o),xr(o),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 13:Si(l,o),xr(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(_d=Wn()),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 22:E=o.memoizedState!==null;var W=h!==null&&h.memoizedState!==null,te=Ya,Re=Ci;if(Ya=te||E,Ci=Re||W,Si(l,o),Ci=Re,Ya=te,xr(o),A&8192&&(l=o.stateNode,l._visibility=E?l._visibility&-2:l._visibility|1,E&&(h===null||W||Ya||Ci||Ns(o)),Mr)){e:if(h=null,Mr)for(l=o;;){if(l.tag===5||Bs&&l.tag===26){if(h===null){W=h=l;try{R=W.stateNode,E?d0(R):vS(W.stateNode,W.memoizedProps)}catch(Je){Ln(W,W.return,Je)}}}else if(l.tag===6){if(h===null){W=l;try{var Ve=W.stateNode;E?Xh(Ve):f0(Ve,W.memoizedProps)}catch(Je){Ln(W,W.return,Je)}}}else if(l.tag===18){if(h===null){W=l;try{var $e=W.stateNode;E?MS($e):P0(W.stateNode)}catch(Je){Ln(W,W.return,Je)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}}A&4&&(A=o.updateQueue,A!==null&&(h=A.retryQueue,h!==null&&(A.retryQueue=null,yd(o,h))));break;case 19:Si(l,o),xr(o),A&4&&(A=o.updateQueue,A!==null&&(o.updateQueue=null,yd(o,A)));break;case 30:break;case 21:break;default:Si(l,o),xr(o)}}function xr(o){var l=o.flags;if(l&2){try{for(var h,A=o.return;A!==null;){if(og(A)){h=A;break}A=A.return}if(Mr){if(h==null)throw Error(a(160));switch(h.tag){case 27:if(Ni){var E=h.stateNode,R=vh(o);Wc(o,R,E);break}case 5:var W=h.stateNode;h.flags&32&&(jh(W),h.flags&=-33);var te=vh(o);Wc(o,te,W);break;case 3:case 4:var Re=h.stateNode.containerInfo,Ve=vh(o);vd(o,Ve,Re);break;default:throw Error(a(161))}}}catch($e){Ln(o,o.return,$e)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Ov(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;Ov(l),l.tag===5&&l.flags&1024&&jl(l.stateNode),o=o.sibling}}function Is(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)cg(o,l.alternate,l),l=l.sibling}function Ns(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:za(4,l,l.return),Ns(l);break;case 1:ca(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&gh(l,l.return,h),Ns(l);break;case 27:Ni&&cl(l.stateNode);case 26:case 5:ca(l,l.return),Ns(l);break;case 22:l.memoizedState===null&&Ns(l);break;case 30:Ns(l);break;default:Ns(l)}o=o.sibling}}function ua(o,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var A=l.alternate,E=o,R=l,W=R.flags;switch(R.tag){case 0:case 11:case 15:ua(E,R,h),Na(4,R);break;case 1:if(ua(E,R,h),A=R,E=A.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(Ve){Ln(A,A.return,Ve)}if(A=R,E=A.updateQueue,E!==null){var te=A.stateNode;try{var Re=E.shared.hiddenCallbacks;if(Re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<Re.length;E++)zc(Re[E],te)}catch(Ve){Ln(A,A.return,Ve)}}h&&W&64&&Gc(R),$o(R,R.return);break;case 27:Ni&&lg(R);case 26:case 5:ua(E,R,h),h&&A===null&&W&4&&ag(R),$o(R,R.return);break;case 12:ua(E,R,h);break;case 31:ua(E,R,h),h&&W&4&&ug(E,R);break;case 13:ua(E,R,h),h&&W&4&&xh(E,R);break;case 22:R.memoizedState===null&&ua(E,R,h),$o(R,R.return);break;case 30:break;default:ua(E,R,h)}l=l.sibling}}function go(o,l){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&B(h))}function Sr(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&B(o))}function qr(o,l,h,A){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Vv(o,l,h,A),l=l.sibling}function Vv(o,l,h,A){var E=l.flags;switch(l.tag){case 0:case 11:case 15:qr(o,l,h,A),E&2048&&Na(9,l);break;case 1:qr(o,l,h,A);break;case 3:qr(o,l,h,A),E&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&B(o)));break;case 12:if(E&2048){qr(o,l,h,A),o=l.stateNode;try{var R=l.memoizedProps,W=R.id,te=R.onPostCommit;typeof te=="function"&&te(W,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Re){Ln(l,l.return,Re)}}else qr(o,l,h,A);break;case 31:qr(o,l,h,A);break;case 13:qr(o,l,h,A);break;case 23:break;case 22:R=l.stateNode,W=l.alternate,l.memoizedState!==null?R._visibility&2?qr(o,l,h,A):tl(o,l):R._visibility&2?qr(o,l,h,A):(R._visibility|=2,el(o,l,h,A,(l.subtreeFlags&10256)!==0||!1)),E&2048&&go(W,l);break;case 24:qr(o,l,h,A),E&2048&&Sr(l.alternate,l);break;default:qr(o,l,h,A)}}function el(o,l,h,A,E){for(E=E&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var R=o,W=l,te=h,Re=A,Ve=W.flags;switch(W.tag){case 0:case 11:case 15:el(R,W,te,Re,E),Na(8,W);break;case 23:break;case 22:var $e=W.stateNode;W.memoizedState!==null?$e._visibility&2?el(R,W,te,Re,E):tl(R,W):($e._visibility|=2,el(R,W,te,Re,E)),E&&Ve&2048&&go(W.alternate,W);break;case 24:el(R,W,te,Re,E),E&&Ve&2048&&Sr(W.alternate,W);break;default:el(R,W,te,Re,E)}l=l.sibling}}function tl(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=o,A=l,E=A.flags;switch(A.tag){case 22:tl(h,A),E&2048&&go(A.alternate,A);break;case 24:tl(h,A),E&2048&&Sr(A.alternate,A);break;default:tl(h,A)}l=l.sibling}}function Ao(o,l,h){if(o.subtreeFlags&hl)for(o=o.child;o!==null;)dg(o,l,h),o=o.sibling}function dg(o,l,h){switch(o.tag){case 26:if(Ao(o,l,h),o.flags&hl)if(o.memoizedState!==null)Mo(h,va,o.memoizedState,o.memoizedProps);else{var A=o.stateNode,E=o.type;o=o.memoizedProps,((l&335544128)===l||Qc(E,o))&&wr(h,A,E,o)}break;case 5:Ao(o,l,h),o.flags&hl&&(A=o.stateNode,E=o.type,o=o.memoizedProps,((l&335544128)===l||Qc(E,o))&&wr(h,A,E,o));break;case 3:case 4:Bs?(A=va,va=Qh(o.stateNode.containerInfo),Ao(o,l,h),va=A):Ao(o,l,h);break;case 22:o.memoizedState===null&&(A=o.alternate,A!==null&&A.memoizedState!==null?(A=hl,hl=16777216,Ao(o,l,h),hl=A):Ao(o,l,h));break;default:Ao(o,l,h)}}function Sh(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function nl(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var A=l[h];$i=A,wh(A,o)}Sh(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Mh(o),o=o.sibling}function Mh(o){switch(o.tag){case 0:case 11:case 15:nl(o),o.flags&2048&&za(9,o,o.return);break;case 3:nl(o);break;case 12:nl(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Vl(o)):nl(o);break;default:nl(o)}}function Vl(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var A=l[h];$i=A,wh(A,o)}Sh(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:za(8,l,l.return),Vl(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,Vl(l));break;default:Vl(l)}o=o.sibling}}function wh(o,l){for(;$i!==null;){var h=$i;switch(h.tag){case 0:case 11:case 15:za(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var A=h.memoizedState.cachePool.pool;A!=null&&A.refCount++}break;case 24:B(h.memoizedState.cache)}if(A=h.child,A!==null)A.return=h,$i=A;else e:for(h=o;$i!==null;){A=$i;var E=A.sibling,R=A.return;if(Uv(A),A===h){$i=null;break e}if(E!==null){E.return=R,$i=E;break e}$i=R}}}function jc(o){var l=_v(o);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(a(364));return l}if(o=Ig(o),o===null)throw Error(a(362));return o.stateNode.current}function xd(o,l){var h=o.tag;switch(l.$$typeof){case gp:if(o.type===l.value)return!0;break;case Ap:e:{for(l=l.value,o=[o,0],h=0;h<o.length;){var A=o[h++],E=A.tag,R=o[h++],W=l[R];if(E!==5&&E!==26&&E!==27||!Ga(A)){for(;W!=null&&xd(A,W);)R++,W=l[R];if(R===l.length){l=!0;break e}else for(A=A.child;A!==null;)o.push(A,R),A=A.sibling}}l=!1}return l;case vp:if((h===5||h===26||h===27)&&s0(o.stateNode,l.value))return!0;break;case bp:if((h===5||h===6||h===26||h===27)&&(o=r0(o),o!==null&&0<=o.indexOf(l.value)))return!0;break;case yp:if((h===5||h===26||h===27)&&(o=o.memoizedProps["data-testname"],typeof o=="string"&&o.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function Th(o){switch(o.$$typeof){case gp:return"<"+(M(o.value)||"Unknown")+">";case Ap:return":has("+(Th(o)||"")+")";case vp:return'[role="'+o.value+'"]';case bp:return'"'+o.value+'"';case yp:return'[data-testname="'+o.value+'"]';default:throw Error(a(365))}}function fg(o,l){var h=[];o=[o,0];for(var A=0;A<o.length;){var E=o[A++],R=E.tag,W=o[A++],te=l[W];if(R!==5&&R!==26&&R!==27||!Ga(E)){for(;te!=null&&xd(E,te);)W++,te=l[W];if(W===l.length)h.push(E);else for(E=E.child;E!==null;)o.push(E,W),E=E.sibling}}return h}function Sd(o,l){if(!Xl)throw Error(a(363));o=jc(o),o=fg(o,l),l=[],o=Array.from(o);for(var h=0;h<o.length;){var A=o[h++],E=A.tag;if(E===5||E===26||E===27)Ga(A)||l.push(A.stateNode);else for(A=A.child;A!==null;)o.push(A),A=A.sibling}return l}function Yr(){return(An&2)!==0&&bn!==0?bn&-bn:It.T!==null?rt():ha()}function Md(){if(ps===0)if((bn&536870912)===0||gn){var o=Wd;Wd<<=1,(Wd&3932160)===0&&(Wd=262144),ps=o}else ps=536870912;return o=fs.current,o!==null&&(o.flags|=32),ps}function Nr(o,l,h){(o===$n&&(Xn===2||Xn===9)||o.cancelPendingCommit!==null)&&(rl(o,0),vo(o,bn,ps,!1)),U(o,h),((An&2)===0||o!==$n)&&(o===$n&&((An&2)===0&&(ic|=h),vi===4&&vo(o,bn,ps,!1)),me(o))}function hg(o,l,h){if((An&6)!==0)throw Error(a(327));var A=!h&&(l&127)===0&&(l&o.expiredLanes)===0||D(o,l),E=A?Xv(o,l):Yc(o,l,!0),R=A;do{if(E===0){nc&&!A&&vo(o,l,0,!1);break}else{if(h=o.current.alternate,R&&!Hv(h)){E=Yc(o,l,!1),R=!1;continue}if(E===2){if(R=l,o.errorRecoveryDisabledLanes&R)var W=0;else W=o.pendingLanes&-536870913,W=W!==0?W:W&536870912?536870912:0;if(W!==0){l=W;e:{var te=o;E=Kd;var Re=fr&&te.current.memoizedState.isDehydrated;if(Re&&(rl(te,W).flags|=256),W=Yc(te,W,!1),W!==2){if(_g&&!Re){te.errorRecoveryDisabledLanes|=R,ic|=R,E=4;break e}R=$r,$r=E,R!==null&&($r===null?$r=R:$r.push.apply($r,R))}E=W}if(R=!1,E!==2)continue}}if(E===1){rl(o,0),vo(o,l,0,!0);break}e:{switch(A=o,R=E,R){case 0:case 1:throw Error(a(345));case 4:if((l&4194048)!==l)break;case 6:vo(A,l,ps,!pl);break e;case 2:$r=null;break;case 3:case 5:break;default:throw Error(a(329))}if((l&62914560)===l&&(E=_d+300-Wn(),10<E)){if(vo(A,l,ps,!pl),T(A,0,!0)!==0)break e;Ja=l,A.timeoutHandle=Kv(Eh.bind(null,A,h,$r,Sp,xp,l,ps,ic,fu,pl,R,"Throttled",-0,0),E);break e}Eh(A,h,$r,Sp,xp,l,ps,ic,fu,pl,R,null,-0,0)}}break}while(!0);me(o)}function Eh(o,l,h,A,E,R,W,te,Re,Ve,$e,Je,At,Ft){if(o.timeoutHandle=xo,Je=l.subtreeFlags,Je&8192||(Je&16785408)===16785408){Je=t0(),dg(l,R,Je);var ei=(R&62914560)===R?_d-Wn():(R&4194048)===R?eA-Wn():0;if(ei=n0(Je,ei),ei!==null){Ja=R,o.cancelPendingCommit=ei(Ag.bind(null,o,l,R,h,A,E,W,te,Re,$e,Je,null,At,Ft)),vo(o,R,W,!Ve);return}}Ag(o,l,R,h,A,E,W,te,Re)}function Hv(o){for(var l=o;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var A=0;A<h.length;A++){var E=h[A],R=E.getSnapshot;E=E.value;try{if(!pr(R(),E))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function vo(o,l,h,A){l&=~$g,l&=~ic,o.suspendedLanes|=l,o.pingedLanes&=~l,A&&(o.warmLanes|=l),A=o.expirationTimes;for(var E=l;0<E;){var R=31-Jr(E),W=1<<R;A[R]=-1,E&=~W}h!==0&&I(o,h,l)}function il(){return(An&6)===0?(Ce(0),!1):!0}function wd(){if(vn!==null){if(Xn===0)var o=vn.return;else o=vn,li=Fr=null,Pn(o),Hs=null,Yd=0,o=vn;for(;o!==null;)mh(o.alternate,o),o=o.return;vn=null}}function rl(o,l){var h=o.timeoutHandle;h!==xo&&(o.timeoutHandle=xo,Dg(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),Ja=0,wd(),$n=o,vn=h=Ua(o.current,null),bn=l,Xn=0,hs=null,pl=!1,nc=D(o,l),_g=!1,fu=ps=$g=ic=ml=vi=0,$r=Kd=null,xp=!1,(l&8)!==0&&(l|=l&32);var A=o.entangledLanes;if(A!==0)for(o=o.entanglements,A&=l;0<A;){var E=31-Jr(A),R=1<<E;l|=o[E],A&=~R}return Po=l,Zi(),h}function Gv(o,l){tn=null,It.H=Jd,l===lu||l===op?(l=Mt(),Xn=3):l===ap?(l=Mt(),Xn=4):Xn=l===hp?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,hs=l,vn===null&&(vi=1,cd(o,ce(l,o.current)))}function Wv(){var o=fs.current;return o===null?!0:(bn&4194048)===bn?Aa===null:(bn&62914560)===bn||(bn&536870912)!==0?o===Aa:!1}function pg(){var o=It.H;return It.H=Jd,o===null?Jd:o}function Xc(){var o=It.A;return It.A=PS,o}function qc(){vi=4,pl||(bn&4194048)!==bn&&fs.current!==null||(nc=!0),(ml&134217727)===0&&(ic&134217727)===0||$n===null||vo($n,bn,ps,!1)}function Yc(o,l,h){var A=An;An|=2;var E=pg(),R=Xc();($n!==o||bn!==l)&&(Sp=null,rl(o,l)),l=!1;var W=vi;e:do try{if(Xn!==0&&vn!==null){var te=vn,Re=hs;switch(Xn){case 8:wd(),W=6;break e;case 3:case 2:case 9:case 6:fs.current===null&&(l=!0);var Ve=Xn;if(Xn=0,hs=null,Hl(o,te,Re,Ve),h&&nc){W=0;break e}break;default:Ve=Xn,Xn=0,hs=null,Hl(o,te,Re,Ve)}}jv(),W=vi;break}catch($e){Gv(o,$e)}while(!0);return l&&o.shellSuspendCounter++,li=Fr=null,An=A,It.H=E,It.A=R,vn===null&&($n=null,bn=0,Zi()),W}function jv(){for(;vn!==null;)Ch(vn)}function Xv(o,l){var h=An;An|=2;var A=pg(),E=Xc();$n!==o||bn!==l?(Sp=null,hu=Wn()+500,rl(o,l)):nc=D(o,l);e:do try{if(Xn!==0&&vn!==null){l=vn;var R=hs;t:switch(Xn){case 1:Xn=0,hs=null,Hl(o,l,R,1);break;case 2:case 9:if(it(R)){Xn=0,hs=null,gg(l);break}l=function(){Xn!==2&&Xn!==9||$n!==o||(Xn=7),me(o)},R.then(l,l);break e;case 3:Xn=7;break e;case 4:Xn=5;break e;case 7:it(R)?(Xn=0,hs=null,gg(l)):(Xn=0,hs=null,Hl(o,l,R,7));break;case 5:var W=null;switch(vn.tag){case 26:W=vn.memoizedState;case 5:case 27:var te=vn,Re=te.type,Ve=te.pendingProps;if(W?Kh(W):hr(te.stateNode,Re,Ve)){Xn=0,hs=null;var $e=te.sibling;if($e!==null)vn=$e;else{var Je=te.return;Je!==null?(vn=Je,Ba(Je)):vn=null}break t}}Xn=0,hs=null,Hl(o,l,R,5);break;case 6:Xn=0,hs=null,Hl(o,l,R,6);break;case 8:wd(),vi=6;break e;default:throw Error(a(462))}}mg();break}catch(At){Gv(o,At)}while(!0);return li=Fr=null,It.H=A,It.A=E,An=h,vn!==null?0:($n=null,bn=0,Zi(),vi)}function mg(){for(;vn!==null&&!ES();)Ch(vn)}function Ch(o){var l=dh(o.alternate,o,Po);o.memoizedProps=o.pendingProps,l===null?Ba(o):vn=l}function gg(o){var l=o,h=l.alternate;switch(l.tag){case 15:case 0:l=ig(h,l,l.pendingProps,l.type,void 0,bn);break;case 11:l=ig(h,l,l.pendingProps,l.type.render,l.ref,bn);break;case 5:Pn(l);default:mh(h,l),l=vn=xg(l,Po),l=dh(h,l,Po)}o.memoizedProps=o.pendingProps,l===null?Ba(o):vn=l}function Hl(o,l,h,A){li=Fr=null,Pn(l),Hs=null,Yd=0;var E=l.return;try{if(br(o,E,l,h,bn)){vi=1,cd(o,ce(h,o.current)),vn=null;return}}catch(R){if(E!==null)throw vn=E,R;vi=1,cd(o,ce(h,o.current)),vn=null;return}l.flags&32768?(gn||A===1?o=!0:nc||(bn&536870912)!==0?o=!1:(pl=o=!0,(A===2||A===9||A===3||A===6)&&(A=fs.current,A!==null&&A.tag===13&&(A.flags|=16384))),Td(l,o)):Ba(l)}function Ba(o){var l=o;do{if((l.flags&32768)!==0){Td(l,pl);return}o=l.return;var h=Ol(l.alternate,l,Po);if(h!==null){vn=h;return}if(l=l.sibling,l!==null){vn=l;return}vn=l=o}while(l!==null);vi===0&&(vi=5)}function Td(o,l){do{var h=la(o.alternate,o);if(h!==null){h.flags&=32767,vn=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(o=o.sibling,o!==null)){vn=o;return}vn=o=h}while(o!==null);vi=6,vn=null}function Ag(o,l,h,A,E,R,W,te,Re){o.cancelPendingCommit=null;do Mi();while(qn!==0);if((An&6)!==0)throw Error(a(327));if(l!==null){if(l===o.current)throw Error(a(177));if(R=l.lanes|l.childLanes,R|=Qg,H(o,h,R,W,te,Re),o===$n&&(vn=$n=null,bn=0),Al=l,ko=o,Ja=h,Mp=R,wp=E,G0=A,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,fS(To,function(){return vg(),null})):(o.callbackNode=null,o.callbackPriority=0),A=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||A){A=It.T,It.T=null,E=Va(),Gi(2),W=An,An|=4;try{Bv(o,l,h)}finally{An=W,Gi(E),It.T=A}}qn=1,Rh(),Ph(),kh()}}function Rh(){if(qn===1){qn=0;var o=ko,l=Al,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=It.T,It.T=null;var A=Va();Gi(2);var E=An;An|=4;try{bd(l,o),Nd(o.containerInfo)}finally{An=E,Gi(A),It.T=h}}o.current=l,qn=2}}function Ph(){if(qn===2){qn=0;var o=ko,l=Al,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=It.T,It.T=null;var A=Va();Gi(2);var E=An;An|=4;try{cg(o,l.alternate,l)}finally{An=E,Gi(A),It.T=h}}qn=3}}function kh(){if(qn===4||qn===3){qn=0,Qr();var o=ko,l=Al,h=Ja,A=G0;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?qn=5:(qn=0,Al=ko=null,qv(o,o.pendingLanes));var E=o.pendingLanes;if(E===0&&(gl=null),_(h),l=l.stateNode,wi&&typeof wi.onCommitFiberRoot=="function")try{wi.onCommitFiberRoot(Kl,l,void 0,(l.current.flags&128)===128)}catch{}if(A!==null){l=It.T,E=Va(),Gi(2),It.T=null;try{for(var R=o.onRecoverableError,W=0;W<A.length;W++){var te=A[W];R(te.value,{componentStack:te.stack})}}finally{It.T=l,Gi(E)}}(Ja&3)!==0&&Mi(),me(o),E=o.pendingLanes,(h&261930)!==0&&(E&42)!==0?o===Tp?pu++:(pu=0,Tp=o):pu=0,fr&&R0(),Ce(0)}}function qv(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,B(l)))}function Mi(){return Rh(),Ph(),kh(),vg()}function vg(){if(qn!==5)return!1;var o=ko,l=Mp;Mp=0;var h=_(Ja),A=32>h?32:h;h=It.T;var E=Va();try{Gi(A),It.T=null,A=wp,wp=null;var R=ko,W=Ja;if(qn=0,Al=ko=null,Ja=0,(An&6)!==0)throw Error(a(331));var te=An;if(An|=4,Mh(R.current),Vv(R,R.current,W,A),An=te,Ce(0,!1),wi&&typeof wi.onPostCommitFiberRoot=="function")try{wi.onPostCommitFiberRoot(Kl,R)}catch{}return!0}finally{Gi(E),It.T=h,qv(o,l)}}function yg(o,l,h){l=ce(h,l),l=Fc(o.stateNode,l,2),o=ls(o,l,2),o!==null&&(U(o,2),me(o))}function Ln(o,l,h){if(o.tag===3)yg(o,o,h);else for(;l!==null;){if(l.tag===3){yg(l,o,h);break}else if(l.tag===1){var A=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&(gl===null||!gl.has(A))){o=ce(h,o),h=ud(2),A=ls(l,h,2),A!==null&&(sh(h,A,l,o),U(A,2),me(A));break}}l=l.return}}function Dh(o,l,h){var A=o.pingCache;if(A===null){A=o.pingCache=new kS;var E=new Set;A.set(l,E)}else E=A.get(l),E===void 0&&(E=new Set,A.set(l,E));E.has(h)||(_g=!0,E.add(h),o=Ed.bind(null,o,l,h),l.then(o,o))}function Ed(o,l,h){var A=o.pingCache;A!==null&&A.delete(l),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,$n===o&&(bn&h)===h&&(vi===4||vi===3&&(bn&62914560)===bn&&300>Wn()-_d?(An&2)===0&&rl(o,0):$g|=h,fu===bn&&(fu=0)),me(o)}function bg(o,l){l===0&&(l=L()),o=Ps(o,l),o!==null&&(U(o,l),me(o))}function Lh(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),bg(o,h)}function Yv(o,l){var h=0;switch(o.tag){case 31:case 13:var A=o.stateNode,E=o.memoizedState;E!==null&&(h=E.retryLane);break;case 19:A=o.stateNode;break;case 22:A=o.stateNode._retryCache;break;default:throw Error(a(314))}A!==null&&A.delete(l),bg(o,h)}function fS(o,l){return tp(o,l)}function Ih(o,l,h,A){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cd(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ua(o,l){var h=o.alternate;return h===null?(h=t(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function xg(o,l){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,l=h.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Rd(o,l,h,A,E,R){var W=0;if(A=o,typeof o=="function")Cd(o)&&(W=1);else if(typeof o=="string")W=Bs&&Ni?Gg(o,h,mr.current)?26:ep(o)?27:5:Bs?Gg(o,h,mr.current)?26:5:Ni&&ep(o)?27:5;else e:switch(o){case Vh:return o=t(31,h,l,E),o.elementType=Vh,o.lanes=R,o;case Gl:return yo(h.children,E,R,l);case Tg:W=8,E|=24;break;case Ld:return o=t(12,h,l,E|2),o.elementType=Ld,o.lanes=R,o;case Wl:return o=t(13,h,l,E),o.elementType=Wl,o.lanes=R,o;case jn:return o=t(19,h,l,E),o.elementType=jn,o.lanes=R,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case bo:W=10;break e;case Oh:W=9;break e;case Jc:W=11;break e;case Eg:W=14;break e;case al:W=16,A=null;break e}W=29,h=Error(a(130,o===null?"null":typeof o,"")),A=null}return l=t(W,h,l,E),l.elementType=o,l.type=A,l.lanes=R,l}function yo(o,l,h,A){return o=t(7,o,A,l),o.lanes=h,o}function Pd(o,l,h){return o=t(6,o,null,l),o.lanes=h,o}function Nh(o){var l=t(18,null,null,0);return l.stateNode=o,l}function zh(o,l,h){return l=t(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function Sg(o,l,h,A,E,R,W,te,Re){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=xo,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=O(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=O(0),this.hiddenUpdates=O(null),this.identifierPrefix=A,this.onUncaughtError=E,this.onCaughtError=R,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Re,this.incompleteTransitions=new Map}function kd(o,l,h,A,E,R,W,te,Re,Ve,$e,Je){return o=new Sg(o,l,h,W,Re,Ve,$e,Je,te),l=1,R===!0&&(l|=24),R=t(3,null,null,l),o.current=R,R.stateNode=o,l=Y(),l.refCount++,o.pooledCache=l,l.refCount++,R.memoizedState={element:A,isDehydrated:h,cache:l},Jo(R),o}function Bh(o){return o?(o=Zl,o):Zl}function Mg(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(a(188)):(o=Object.keys(o).join(","),Error(a(268,o)));return o=f(l),o=o!==null?m(o):null,o===null?null:Id(o.stateNode)}function Uh(o,l,h,A,E,R){E=Bh(E),A.context===null?A.context=E:A.pendingContext=E,A=lr(l),A.payload={element:h},R=R===void 0?null:R,R!==null&&(A.callback=R),h=ls(o,A,l),h!==null&&(Nr(h,o,l),Qo(h,o,l))}function wg(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function da(o,l){wg(o,l),(o=o.alternate)&&wg(o,l)}var fn={},hS=pe,zr=nP,us=Object.assign,Fh=Symbol.for("react.element"),Dd=Symbol.for("react.transitional.element"),sl=Symbol.for("react.portal"),Gl=Symbol.for("react.fragment"),Tg=Symbol.for("react.strict_mode"),Ld=Symbol.for("react.profiler"),Oh=Symbol.for("react.consumer"),bo=Symbol.for("react.context"),Jc=Symbol.for("react.forward_ref"),Wl=Symbol.for("react.suspense"),jn=Symbol.for("react.suspense_list"),Eg=Symbol.for("react.memo"),al=Symbol.for("react.lazy"),Vh=Symbol.for("react.activity"),Fa=Symbol.for("react.memo_cache_sentinel"),Cg=Symbol.iterator,Rg=Symbol.for("react.client.reference"),ol=Array.isArray,It=hS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jv=e.rendererVersion,Pg=e.rendererPackageName,kg=e.extraDevToolsConfig,Id=e.getPublicInstance,pS=e.getRootHostContext,Qv=e.getChildHostContext,mS=e.prepareForCommit,Nd=e.resetAfterCommit,Oa=e.createInstance;e.cloneMutableInstance;var Hh=e.appendInitialChild,Zv=e.finalizeInitialChildren,zd=e.shouldSetTextContent,Gh=e.createTextInstance;e.cloneMutableTextInstance;var Kv=e.scheduleTimeout,Dg=e.cancelTimeout,xo=e.noTimeout,zs=e.isPrimaryRenderer;e.warnsIfNotActing;var Mr=e.supportsMutation,fa=e.supportsPersistence,fr=e.supportsHydration,_v=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var gS=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var Gi=e.setCurrentUpdatePriority,Va=e.getCurrentUpdatePriority,ha=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var Lg=e.shouldAttemptEagerTransition,$v=e.detachDeletedInstance;e.requestPostPaintCallback;var e0=e.maySuspendCommit,AS=e.maySuspendCommitOnUpdate,Qc=e.maySuspendCommitInSyncRender,hr=e.preloadInstance,t0=e.startSuspendingCommit,wr=e.suspendInstance;e.suspendOnActiveViewTransition;var n0=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var Br=e.NotPendingTransition,ll=e.HostTransitionContext,jl=e.resetFormInstance;e.bindToConsole;var i0=e.supportsMicrotasks,Ha=e.scheduleMicrotask,Xl=e.supportsTestSelectors,Ig=e.findFiberRoot,pa=e.getBoundingRect,r0=e.getTextContent,Ga=e.isHiddenSubtree,s0=e.matchAccessibilityRole,Bd=e.setFocusIfFocusable,ql=e.setupIntersectionObserver,a0=e.appendChild,o0=e.appendChildToContainer,Ud=e.commitTextUpdate,l0=e.commitMount,Wh=e.commitUpdate,c0=e.insertBefore,u0=e.insertInContainerBefore,Ng=e.removeChild,zg=e.removeChildFromContainer,jh=e.resetTextContent,d0=e.hideInstance,Xh=e.hideTextInstance,vS=e.unhideInstance,f0=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var ds=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var h0=e.cloneInstance,ai=e.createContainerChildSet,Bg=e.appendChildToContainerChildSet,p0=e.finalizeContainerChildren,m0=e.replaceContainerChildren,So=e.cloneHiddenInstance,Fd=e.cloneHiddenTextInstance,Od=e.isSuspenseInstancePending,Vd=e.isSuspenseInstanceFallback,Yl=e.getSuspenseInstanceFallbackErrorDetails,Zc=e.registerSuspenseInstanceRetry,g0=e.canHydrateFormStateMarker,A0=e.isFormStateMarkerMatching,Ug=e.getNextHydratableSibling,v0=e.getNextHydratableSiblingAfterSingleton,qh=e.getFirstHydratableChild,Yh=e.getFirstHydratableChildWithinContainer,Fg=e.getFirstHydratableChildWithinActivityInstance,y0=e.getFirstHydratableChildWithinSuspenseInstance,yS=e.getFirstHydratableChildWithinSingleton,bS=e.canHydrateInstance,b0=e.canHydrateTextInstance,x0=e.canHydrateActivityInstance,xS=e.canHydrateSuspenseInstance,Kc=e.hydrateInstance,Jh=e.hydrateTextInstance,S0=e.hydrateActivityInstance,Og=e.hydrateSuspenseInstance,M0=e.getNextHydratableInstanceAfterActivityInstance,w0=e.getNextHydratableInstanceAfterSuspenseInstance,T0=e.commitHydratedInstance,SS=e.commitHydratedContainer,E0=e.commitHydratedActivityInstance,_c=e.commitHydratedSuspenseInstance,C0=e.finalizeHydratedChildren,R0=e.flushHydrationEvents;e.clearActivityBoundary;var In=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var Vg=e.clearSuspenseBoundaryFromContainer,MS=e.hideDehydratedBoundary,P0=e.unhideDehydratedBoundary,k0=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var wS=e.validateHydratableInstance,Hg=e.validateHydratableTextInstance,Bs=e.supportsResources,Gg=e.isHostHoistableType,Qh=e.getHoistableRoot,$c=e.getResource,D0=e.acquireResource,L0=e.releaseResource,Jl=e.hydrateHoistable,Zh=e.mountHoistable,Wg=e.unmountHoistable,I0=e.createHoistableInstance,N0=e.prepareToCommitHoistables,TS=e.mayResourceSuspendCommit,Kh=e.preloadResource,Mo=e.suspendResource,Ni=e.supportsSingletons,_h=e.resolveSingletonInstance,$h=e.acquireSingletonInstance,cl=e.releaseSingletonInstance,ep=e.isHostSingletonType,Ql=e.isSingletonScope,Hd=[],eu=-1,Zl={},Jr=Math.clz32?Math.clz32:k,z0=Math.log,B0=Math.LN2,Gd=256,Wd=262144,tu=4194304,tp=zr.unstable_scheduleCallback,hn=zr.unstable_cancelCallback,ES=zr.unstable_shouldYield,Qr=zr.unstable_requestPaint,Wn=zr.unstable_now,U0=zr.unstable_ImmediatePriority,wo=zr.unstable_UserBlockingPriority,To=zr.unstable_NormalPriority,nu=zr.unstable_IdlePriority,np=zr.log,jg=zr.unstable_setDisableYieldValue,Kl=null,wi=null,pr=typeof Object.is=="function"?Object.is:le,ip=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Xg=Object.prototype.hasOwnProperty,iu,Zr,jd=!1,F0=new WeakMap,_l=[],ru=0,zi=null,be=0,Us=[],Fs=0,Eo=null,Ur=1,Wa="",mr=x(null),Xd=x(null),ul=x(null),rp=x(null),Wi=null,oi=null,gn=!1,Co=null,Os=!1,qg=Error(a(519)),ja=x(null),Fr=null,li=null,Xa=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(h,A){o.push(A)}};this.abort=function(){l.aborted=!0,o.forEach(function(h){return h()})}},Tr=zr.unstable_scheduleCallback,CS=zr.unstable_NormalPriority,di={$$typeof:bo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Ti=null,Kr=null,Yg=!1,su=!1,$l=!1,ma=0,qd=null,Jg=0,au=0,ou=null,sp=It.S;It.S=function(o,l){eA=Wn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&st(o,l),sp!==null&&sp(o,l)};var dl=x(null),lu=Error(a(460)),ap=Error(a(474)),op=Error(a(542)),lp={then:function(){}},Vs=null,Hs=null,Yd=0,ec=Gr(!0),O0=Gr(!1),Gs=[],ga=0,Qg=0,fl=!1,Zg=!1,qa=x(null),cp=x(0),fs=x(null),Aa=null,Ei=x(0),Ro=0,tn=null,Zn=null,Bi=null,up=!1,cu=!1,tc=!1,dp=0,uu=0,du=null,RS=0,Jd={readContext:ee,use:Xe,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Jd.useEffectEvent=We;var V0={readContext:ee,use:Xe,useCallback:function(o,l){return dn().memoizedState=[o,l===void 0?null:l],o},useContext:ee,useEffect:qm,useImperativeHandle:function(o,l,h){h=h!=null?h.concat([o]):null,rd(4194308,4,Nv.bind(null,l,o),h)},useLayoutEffect:function(o,l){return rd(4194308,4,o,l)},useInsertionEffect:function(o,l){rd(4,2,o,l)},useMemo:function(o,l){var h=dn();l=l===void 0?null:l;var A=o();if(tc){K(!0);try{o()}finally{K(!1)}}return h.memoizedState=[A,l],A},useReducer:function(o,l,h){var A=dn();if(h!==void 0){var E=h(l);if(tc){K(!0);try{h(l)}finally{K(!1)}}}else E=l;return A.memoizedState=A.baseState=E,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:E},A.queue=o,o=o.dispatch=ur.bind(null,tn,o),[A.memoizedState,o]},useRef:function(o){var l=dn();return o={current:o},l.memoizedState=o},useState:function(o){o=gi(o);var l=o.queue,h=ih.bind(null,tn,l);return l.dispatch=h,[o.memoizedState,h]},useDebugValue:Qm,useDeferredValue:function(o,l){var h=dn();return th(h,o,l)},useTransition:function(){var o=gi(!1);return o=Zm.bind(null,tn,o.queue,!0,!1),dn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,h){var A=tn,E=dn();if(gn){if(h===void 0)throw Error(a(407));h=h()}else{if(h=l(),$n===null)throw Error(a(349));(bn&127)!==0||Gn(A,l,h)}E.memoizedState=h;var R={value:h,getSnapshot:l};return E.queue=R,qm(Wr.bind(null,A,R,o),[o]),A.flags|=2048,Lr(9,{destroy:void 0},zn.bind(null,A,R,h,l),null),h},useId:function(){var o=dn(),l=$n.identifierPrefix;if(gn){var h=Wa,A=Ur;h=(A&~(1<<32-Jr(A)-1)).toString(32)+h,l="_"+l+"R_"+h,h=dp++,0<h&&(l+="H"+h.toString(32)),l+="_"}else h=RS++,l="_"+l+"r_"+h.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:nh,useFormState:sa,useActionState:sa,useOptimistic:function(o){var l=dn();l.memoizedState=l.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=Uc.bind(null,tn,!0,h),h.dispatch=l,[o,l]},useMemoCache:Li,useCacheRefresh:function(){return dn().memoizedState=zv.bind(null,tn)},useEffectEvent:function(o){var l=dn(),h={impl:o};return l.memoizedState=h,function(){if((An&2)!==0)throw Error(a(440));return h.impl.apply(void 0,arguments)}}},Kg={readContext:ee,use:Xe,useCallback:eh,useContext:ee,useEffect:Kf,useImperativeHandle:Jm,useInsertionEffect:Ym,useLayoutEffect:$f,useMemo:sd,useReducer:Hi,useRef:Bl,useState:function(){return Hi(Kt)},useDebugValue:Qm,useDeferredValue:function(o,l){var h=Ht();return ad(h,Zn.memoizedState,o,l)},useTransition:function(){var o=Hi(Kt)[0],l=Ht().memoizedState;return[typeof o=="boolean"?o:Qn(o),l]},useSyncExternalStore:Ki,useId:ho,useHostTransitionStatus:nh,useFormState:Xm,useActionState:Xm,useOptimistic:function(o,l){var h=Ht();return cr(h,Zn,o,l)},useMemoCache:Li,useCacheRefresh:_m};Kg.useEffectEvent=_f;var H0={readContext:ee,use:Xe,useCallback:eh,useContext:ee,useEffect:Kf,useImperativeHandle:Jm,useInsertionEffect:Ym,useLayoutEffect:$f,useMemo:sd,useReducer:yr,useRef:Bl,useState:function(){return yr(Kt)},useDebugValue:Qm,useDeferredValue:function(o,l){var h=Ht();return Zn===null?th(h,o,l):ad(h,Zn.memoizedState,o,l)},useTransition:function(){var o=yr(Kt)[0],l=Ht().memoizedState;return[typeof o=="boolean"?o:Qn(o),l]},useSyncExternalStore:Ki,useId:ho,useHostTransitionStatus:nh,useFormState:id,useActionState:id,useOptimistic:function(o,l){var h=Ht();return Zn!==null?cr(h,Zn,o,l):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:Li,useCacheRefresh:_m};H0.useEffectEvent=_f;var fp={enqueueSetState:function(o,l,h){o=o._reactInternals;var A=Yr(),E=lr(A);E.payload=l,h!=null&&(E.callback=h),l=ls(o,E,A),l!==null&&(Nr(l,o,A),Qo(l,o,A))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var A=Yr(),E=lr(A);E.tag=1,E.payload=l,h!=null&&(E.callback=h),l=ls(o,E,A),l!==null&&(Nr(l,o,A),Qo(l,o,A))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=Yr(),A=lr(h);A.tag=2,l!=null&&(A.callback=l),l=ls(o,A,h),l!==null&&(Nr(l,o,h),Qo(l,o,h))}},hp=Error(a(461)),Ui=!1,pp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Ya=!1,Ci=!1,Qd=!1,mp=typeof WeakSet=="function"?WeakSet:Set,$i=null,Fi=null,_r=!1,va=null,hl=8192,PS={getCacheForType:function(o){var l=ee(di),h=l.data.get(o);return h===void 0&&(h=o(),l.data.set(o,h)),h},cacheSignal:function(){return ee(di).controller.signal}},gp=0,Ap=1,vp=2,yp=3,bp=4;if(typeof Symbol=="function"&&Symbol.for){var Zd=Symbol.for;gp=Zd("selector.component"),Ap=Zd("selector.has_pseudo_class"),vp=Zd("selector.role"),yp=Zd("selector.test_id"),bp=Zd("selector.text")}var kS=typeof WeakMap=="function"?WeakMap:Map,An=0,$n=null,vn=null,bn=0,Xn=0,hs=null,pl=!1,nc=!1,_g=!1,Po=0,vi=0,ml=0,ic=0,$g=0,ps=0,fu=0,Kd=null,$r=null,xp=!1,_d=0,eA=0,hu=1/0,Sp=null,gl=null,qn=0,ko=null,Al=null,Ja=0,Mp=0,wp=null,G0=null,pu=0,Tp=null;return fn.attemptContinuousHydration=function(o){if(o.tag===13||o.tag===31){var l=Ps(o,67108864);l!==null&&Nr(l,o,67108864),da(o,67108864)}},fn.attemptHydrationAtCurrentPriority=function(o){if(o.tag===13||o.tag===31){var l=Yr();l=X(l);var h=Ps(o,l);h!==null&&Nr(h,o,l),da(o,l)}},fn.attemptSynchronousHydration=function(o){switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var l=C(o.pendingLanes);if(l!==0){for(o.pendingLanes|=2,o.entangledLanes|=2;l;){var h=1<<31-Jr(l);o.entanglements[1]|=h,l&=~h}me(o),(An&6)===0&&(hu=Wn()+500,Ce(0))}}break;case 31:case 13:l=Ps(o,2),l!==null&&Nr(l,o,2),il(),da(o,2)}},fn.batchedUpdates=function(o,l){return o(l)},fn.createComponentSelector=function(o){return{$$typeof:gp,value:o}},fn.createContainer=function(o,l,h,A,E,R,W,te,Re,Ve){return kd(o,l,!1,null,h,A,R,null,W,te,Re,Ve)},fn.createHasPseudoClassSelector=function(o){return{$$typeof:Ap,value:o}},fn.createHydrationContainer=function(o,l,h,A,E,R,W,te,Re,Ve,$e,Je,At,Ft){var ei;return o=kd(h,A,!0,o,E,R,te,Ft,Re,Ve,$e,Je),o.context=Bh(null),h=o.current,A=Yr(),A=X(A),E=lr(A),E.callback=(ei=l)!=null?ei:null,ls(h,E,A),l=A,o.current.lanes=l,U(o,l),me(o),o},fn.createPortal=function(o,l,h){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sl,key:A==null?null:""+A,children:o,containerInfo:l,implementation:h}},fn.createRoleSelector=function(o){return{$$typeof:vp,value:o}},fn.createTestNameSelector=function(o){return{$$typeof:yp,value:o}},fn.createTextSelector=function(o){return{$$typeof:bp,value:o}},fn.defaultOnCaughtError=function(o){console.error(o)},fn.defaultOnRecoverableError=function(o){ip(o)},fn.defaultOnUncaughtError=function(o){ip(o)},fn.deferredUpdates=function(o){var l=It.T,h=Va();try{return Gi(32),It.T=null,o()}finally{Gi(h),It.T=l}},fn.discreteUpdates=function(o,l,h,A,E){var R=It.T,W=Va();try{return Gi(2),It.T=null,o(l,h,A,E)}finally{Gi(W),It.T=R,An===0&&(hu=Wn()+500)}},fn.findAllNodes=Sd,fn.findBoundingRects=function(o,l){if(!Xl)throw Error(a(363));l=Sd(o,l),o=[];for(var h=0;h<l.length;h++)o.push(pa(l[h]));for(l=o.length-1;0<l;l--){h=o[l];for(var A=h.x,E=A+h.width,R=h.y,W=R+h.height,te=l-1;0<=te;te--)if(l!==te){var Re=o[te],Ve=Re.x,$e=Ve+Re.width,Je=Re.y,At=Je+Re.height;if(A>=Ve&&R>=Je&&E<=$e&&W<=At){o.splice(l,1);break}else if(A!==Ve||h.width!==Re.width||At<R||Je>W){if(!(R!==Je||h.height!==Re.height||$e<A||Ve>E)){Ve>A&&(Re.width+=Ve-A,Re.x=A),$e<E&&(Re.width=E-Ve),o.splice(l,1);break}}else{Je>R&&(Re.height+=Je-R,Re.y=R),At<W&&(Re.height=W-Je),o.splice(l,1);break}}}return o},fn.findHostInstance=Mg,fn.findHostInstanceWithNoPortals=function(o){return o=f(o),o=o!==null?g(o):null,o===null?null:Id(o.stateNode)},fn.findHostInstanceWithWarning=function(o){return Mg(o)},fn.flushPassiveEffects=Mi,fn.flushSyncFromReconciler=function(o){var l=An;An|=1;var h=It.T,A=Va();try{if(Gi(2),It.T=null,o)return o()}finally{Gi(A),It.T=h,An=l,(An&6)===0&&Ce(0)}},fn.flushSyncWork=il,fn.focusWithin=function(o,l){if(!Xl)throw Error(a(363));for(o=jc(o),l=fg(o,l),l=Array.from(l),o=0;o<l.length;){var h=l[o++],A=h.tag;if(!Ga(h)){if((A===5||A===26||A===27)&&Bd(h.stateNode))return!0;for(h=h.child;h!==null;)l.push(h),h=h.sibling}}return!1},fn.getFindAllNodesFailureDescription=function(o,l){if(!Xl)throw Error(a(363));var h=0,A=[];o=[jc(o),0];for(var E=0;E<o.length;){var R=o[E++],W=R.tag,te=o[E++],Re=l[te];if((W!==5&&W!==26&&W!==27||!Ga(R))&&(xd(R,Re)&&(A.push(Th(Re)),te++,te>h&&(h=te)),te<l.length))for(R=R.child;R!==null;)o.push(R,te),R=R.sibling}if(h<l.length){for(o=[];h<l.length;h++)o.push(Th(l[h]));return`findAllNodes was able to match part of the selector:
|
|
4293
4293
|
`+(A.join(" > ")+`
|
|
4294
4294
|
|
|
4295
4295
|
No matching component was found for:
|
|
@@ -4301,17 +4301,17 @@ No matching component was found for:
|
|
|
4301
4301
|
*
|
|
4302
4302
|
* This source code is licensed under the MIT license found in the
|
|
4303
4303
|
* LICENSE file in the root directory of this source tree.
|
|
4304
|
-
*/var H2;function SV(){return H2||(H2=1,(function(s){process.env.NODE_ENV!=="production"&&(s.exports=function(e){function t(n,r){for(n=n.memoizedState;n!==null&&0<r;)n=n.next,r--;return n}function i(n,r,u,p){if(u>=r.length)return p;var b=r[u],y=zi(n)?n.slice():Wn({},n);return y[b]=i(n[b],r,u+1,p),y}function a(n,r,u){if(r.length!==u.length)console.warn("copyWithRename() expects paths of the same length");else{for(var p=0;p<u.length-1;p++)if(r[p]!==u[p]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(n,r,u,0)}}function c(n,r,u,p){var b=r[p],y=zi(n)?n.slice():Wn({},n);return p+1===r.length?(y[u[p]]=y[b],zi(y)?y.splice(b,1):delete y[b]):y[b]=c(n[b],r,u,p+1),y}function d(n,r,u){var p=r[u],b=zi(n)?n.slice():Wn({},n);return u+1===r.length?(zi(b)?b.splice(p,1):delete b[p],b):(b[p]=d(n[p],r,u+1),b)}function f(){return!1}function m(){return null}function g(n,r,u,p){return new TS(n,r,u,p)}function v(n,r){n.context===ei&&(B0(r,n,null,null),Fd())}function M(n,r){if(io!==null){var u=r.staleFamilies;r=r.updatedFamilies,_c(),N0(n.current,r,u),Fd()}}function x(n){io=n}function S(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function w(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function k(){}function C(){}function T(n){var r=[];return n.forEach(function(u){r.push(u)}),r.sort().join(", ")}function D(n){var r=n,u=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(u=r.return),n=r.return;while(n)}return r.tag===3?u:null}function z(n){if(D(n)!==n)throw Error("Unable to find node on an unmounted component.")}function L(n){var r=n.alternate;if(!r){if(r=D(n),r===null)throw Error("Unable to find node on an unmounted component.");return r!==n?null:n}for(var u=n,p=r;;){var b=u.return;if(b===null)break;var y=b.alternate;if(y===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===y.child){for(y=b.child;y;){if(y===u)return z(b),n;if(y===p)return z(b),r;y=y.sibling}throw Error("Unable to find node on an unmounted component.")}if(u.return!==p.return)u=b,p=y;else{for(var P=!1,N=b.child;N;){if(N===u){P=!0,u=b,p=y;break}if(N===p){P=!0,p=b,u=y;break}N=N.sibling}if(!P){for(N=y.child;N;){if(N===u){P=!0,u=y,p=b;break}if(N===p){P=!0,p=y,u=b;break}N=N.sibling}if(!P)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(u.alternate!==p)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(u.tag!==3)throw Error("Unable to find node on an unmounted component.");return u.stateNode.current===u?n:r}function O(n){return n=L(n),n!==null?U(n):null}function U(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=U(n),r!==null)return r;n=n.sibling}return null}function H(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(n.tag!==4&&(r=H(n),r!==null))return r;n=n.sibling}return null}function I(n){return n===null||typeof n!="object"?null:(n=_l&&n[_l]||n["@@iterator"],typeof n=="function"?n:null)}function F(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ru?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case nu:return"Fragment";case jg:return"Profiler";case np:return"StrictMode";case ip:return"Suspense";case Xg:return"SuspenseList";case jd:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case To:return"Portal";case wi:return n.displayName||"Context";case Kl:return(n._context.displayName||"Context")+".Consumer";case pr:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case iu:return r=n.displayName||null,r!==null?r:F(n.type)||"Memo";case Zr:r=n._payload,n=n._init;try{return F(n(r))}catch{}}return null}function V(n){var r=n.type;switch(n.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(r._context.displayName||"Context")+".Consumer";case 10:return r.displayName||"Context";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(r);case 8:return r===np?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;break;case 29:if(r=n._debugInfo,r!=null){for(var u=r.length-1;0<=u;u--)if(typeof r[u].name=="string")return r[u].name}if(n.return!==null)return V(n.return)}return null}function X(n){return{current:n}}function _(n,r){0>Ft?console.error("Unexpected pop."):(r!==At[Ft]&&console.error("Unexpected Fiber popped."),n.current=Je[Ft],Je[Ft]=null,At[Ft]=null,Ft--)}function K(n,r,u){Ft++,Je[Ft]=n.current,At[Ft]=u,n.current=r}function le(n){return n>>>=0,n===0?32:31-(rc(n)/ve|0)|0}function $(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),n}}function j(n,r,u){var p=n.pendingLanes;if(p===0)return 0;var b=0,y=n.suspendedLanes,P=n.pingedLanes;n=n.warmLanes;var N=p&134217727;return N!==0?(p=N&~y,p!==0?b=$(p):(P&=N,P!==0?b=$(P):u||(u=N&~n,u!==0&&(b=$(u))))):(N=p&~y,N!==0?b=$(N):P!==0?b=$(P):u||(u=p&~n,u!==0&&(b=$(u)))),b===0?0:r!==0&&r!==b&&(r&y)===0&&(y=b&-b,u=r&-r,y>=u||y===32&&(u&4194048)!==0)?r:b}function Q(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function ne(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function ce(){var n=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),n}function ye(n){for(var r=[],u=0;31>u;u++)r.push(n);return r}function Te(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Fe(n,r,u,p,b,y){var P=n.pendingLanes;n.pendingLanes=u,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=u,n.entangledLanes&=u,n.errorRecoveryDisabledLanes&=u,n.shellSuspendCounter=0;var N=n.entanglements,q=n.expirationTimes,se=n.hiddenUpdates;for(u=P&~u;0<u;){var Se=31-ji(u),Ee=1<<Se;N[Se]=0,q[Se]=-1;var ze=se[Se];if(ze!==null)for(se[Se]=null,Se=0;Se<ze.length;Se++){var Lt=ze[Se];Lt!==null&&(Lt.lane&=-536870913)}u&=~Ee}p!==0&<(n,p,0),y!==0&&b===0&&n.tag!==0&&(n.suspendedLanes|=y&~(P&~r))}function lt(n,r,u){n.pendingLanes|=r,n.suspendedLanes&=~r;var p=31-ji(r);n.entangledLanes|=r,n.entanglements[p]=n.entanglements[p]|1073741824|u&261930}function ht(n,r){var u=n.entangledLanes|=r;for(n=n.entanglements;u;){var p=31-ji(u),b=1<<p;b&r|n[p]&r&&(n[p]|=r),u&=~b}}function ct(n,r){var u=r&-r;return u=(u&42)!==0?1:Pe(u),(u&(n.suspendedLanes|r))!==0?0:u}function Pe(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Xe(n,r,u){if(yl)for(n=n.pendingUpdatersLaneMap;0<u;){var p=31-ji(u),b=1<<p;n[p].add(r),u&=~b}}function He(n,r){if(yl)for(var u=n.pendingUpdatersLaneMap,p=n.memoizedUpdaters;0<r;){var b=31-ji(r);n=1<<b,b=u[b],0<b.size&&(b.forEach(function(y){var P=y.alternate;P!==null&&p.has(P)||p.add(y)}),b.clear()),r&=~n}}function pt(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Nt(n){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled)return!0;if(!r.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{Ep=r.inject(n),es=r}catch(u){console.error("React instrumentation encountered an error: %o.",u)}return!!r.checkDCE}function nt(n){if(typeof IP=="function"&&NP(n),es&&typeof es.setStrictMode=="function")try{es.setStrictMode(Ep,n)}catch(r){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",r))}}function sn(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}function Dt(n){for(var r=0,u=0;u<n.length;u++){var p=n[u];if(typeof p=="object"&&p!==null)if(zi(p)&&p.length===2&&typeof p[0]=="string"){if(r!==0&&r!==3)return 1;r=3}else return 1;else{if(typeof p=="function"||typeof p=="string"&&50<p.length||r!==0&&r!==2)return 1;r=2}}return r}function Be(n,r,u,p){for(var b in n)DS.call(n,b)&&b[0]!=="_"&&xe(b,n[b],r,u,p)}function xe(n,r,u,p,b){switch(typeof r){case"object":if(r===null){r="null";break}else{if(r.$$typeof===wo){var y=F(r.type)||"…",P=r.key;r=r.props;var N=Object.keys(r),q=N.length;if(P==null&&q===0){r="<"+y+" />";break}if(3>p||q===1&&N[0]==="children"&&P==null){r="<"+y+" … />";break}u.push([b+" ".repeat(p)+n,"<"+y]),P!==null&&xe("key",P,u,p+1,b),n=!1;for(var se in r)se==="children"?r.children!=null&&(!zi(r.children)||0<r.children.length)&&(n=!0):DS.call(r,se)&&se[0]!=="_"&&xe(se,r[se],u,p+1,b);u.push(["",n?">…</"+y+">":"/>"]);return}if(y=Object.prototype.toString.call(r),y=y.slice(8,y.length-1),y==="Array"){if(se=Dt(r),se===2||se===0){r=JSON.stringify(r);break}else if(se===3){for(u.push([b+" ".repeat(p)+n,""]),n=0;n<r.length;n++)y=r[n],xe(y[0],y[1],u,p+1,b);return}}if(y==="Promise"){if(r.status==="fulfilled"){if(y=u.length,xe(n,r.value,u,p,b),u.length>y){u=u[y],u[1]="Promise<"+(u[1]||"Object")+">";return}}else if(r.status==="rejected"&&(y=u.length,xe(n,r.reason,u,p,b),u.length>y)){u=u[y],u[1]="Rejected Promise<"+u[1]+">";return}u.push([" ".repeat(p)+n,"Promise"]);return}y==="Object"&&(se=Object.getPrototypeOf(r))&&typeof se.constructor=="function"&&(y=se.constructor.name),u.push([b+" ".repeat(p)+n,y==="Object"?3>p?"":"…":y]),3>p&&Be(r,u,p+1,b);return}case"function":r=r.name===""?"() => {}":r.name+"() {}";break;case"string":r=r==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(r);break;case"undefined":r="undefined";break;case"boolean":r=r?"true":"false";break;default:r=String(r)}u.push([b+" ".repeat(p)+n,r])}function Ue(n,r,u,p){var b=!0;for(P in n)P in r||(u.push(["– "+" ".repeat(p)+P,"…"]),b=!1);for(var y in r)if(y in n){var P=n[y],N=r[y];if(P!==N){if(p===0&&y==="children")b=" ".repeat(p)+y,u.push(["– "+b,"…"],["+ "+b,"…"]);else{if(!(3<=p)){if(typeof P=="object"&&typeof N=="object"&&P!==null&&N!==null&&P.$$typeof===N.$$typeof)if(N.$$typeof===wo){if(P.type===N.type&&P.key===N.key){P=F(N.type)||"…",b=" ".repeat(p)+y,P="<"+P+" … />",u.push(["– "+b,P],["+ "+b,P]),b=!1;continue}}else{var q=Object.prototype.toString.call(P),se=Object.prototype.toString.call(N);if(q===se&&(se==="[object Object]"||se==="[object Array]")){q=[" "+" ".repeat(p)+y,se==="[object Array]"?"Array":""],u.push(q),se=u.length,Ue(P,N,u,p+1)?se===u.length&&(q[1]="Referentially unequal but deeply equal objects. Consider memoization."):b=!1;continue}}else if(typeof P=="function"&&typeof N=="function"&&P.name===N.name&&P.length===N.length&&(q=Function.prototype.toString.call(P),se=Function.prototype.toString.call(N),q===se)){P=N.name===""?"() => {}":N.name+"() {}",u.push([" "+" ".repeat(p)+y,P+" Referentially unequal function closure. Consider memoization."]);continue}}xe(y,P,u,p,"– "),xe(y,N,u,p,"+ ")}b=!1}}else u.push(["+ "+" ".repeat(p)+y,"…"]),b=!1;return b}function qe(n){En=n&63?"Blocking":n&64?"Gesture":n&4194176?"Transition":n&62914560?"Suspense":n&2080374784?"Idle":"Other"}function Ze(n,r,u,p){ci&&(gu.start=r,gu.end=u,sc.color="warning",sc.tooltipText=p,sc.properties=null,(n=n._debugTask)?n.run(performance.measure.bind(performance,p,gu)):performance.measure(p,gu))}function Pt(n,r,u){Ze(n,r,u,"Reconnect")}function bt(n,r,u,p,b){var y=V(n);if(y!==null&&ci){var P=n.alternate,N=n.actualDuration;if(P===null||P.child!==n.child)for(var q=n.child;q!==null;q=q.sibling)N-=q.actualDuration;p=.5>N?p?"tertiary-light":"primary-light":10>N?p?"tertiary":"primary":100>N?p?"tertiary-dark":"primary-dark":"error";var se=n.memoizedProps;N=n._debugTask,se!==null&&P!==null&&P.memoizedProps!==se?(q=[UP],se=Ue(P.memoizedProps,se,q,0),1<q.length&&(se&&!mu&&(P.lanes&b)===0&&100<n.actualDuration?(mu=!0,q[0]=FP,sc.color="warning",sc.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(sc.color=p,sc.tooltipText=y),sc.properties=q,gu.start=r,gu.end=u,N!=null?N.run(performance.measure.bind(performance,""+y,gu)):performance.measure(""+y,gu))):N!=null?N.run(console.timeStamp.bind(console,y,r,u,"Components ⚛",void 0,p)):console.timeStamp(y,r,u,"Components ⚛",void 0,p)}}function zt(n,r,u,p){if(ci){var b=V(n);if(b!==null){for(var y=null,P=[],N=0;N<p.length;N++){var q=p[N];y==null&&q.source!==null&&(y=q.source._debugTask),q=q.value,P.push(["Error",typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q)])}n.key!==null&&xe("key",n.key,P,0,""),n.memoizedProps!==null&&Be(n.memoizedProps,P,0,""),y==null&&(y=n._debugTask),n={start:r,end:u,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:n.tag===13?"Hydration failed":"Error boundary caught an error",properties:P}}},y?y.run(performance.measure.bind(performance,""+b,n)):performance.measure(""+b,n)}}}function Et(n,r,u,p,b){if(b!==null){if(ci){var y=V(n);if(y!==null){p=[];for(var P=0;P<b.length;P++){var N=b[P].value;p.push(["Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n.key!==null&&xe("key",n.key,p,0,""),n.memoizedProps!==null&&Be(n.memoizedProps,p,0,""),r={start:r,end:u,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:p}}},(n=n._debugTask)?n.run(performance.measure.bind(performance,""+y,r)):performance.measure(""+y,r)}}}else y=V(n),y!==null&&ci&&(b=1>p?"secondary-light":100>p?"secondary":500>p?"secondary-dark":"error",(n=n._debugTask)?n.run(console.timeStamp.bind(console,y,r,u,"Components ⚛",void 0,b)):console.timeStamp(y,r,u,"Components ⚛",void 0,b))}function ee(n,r,u,p){if(ci&&!(r<=n)){var b=(u&738197653)===u?"tertiary-dark":"primary-dark";u=(u&536870912)===u?"Prepared":(u&201326741)===u?"Hydrated":"Render",p?p.run(console.timeStamp.bind(console,u,n,r,En,"Scheduler ⚛",b)):console.timeStamp(u,n,r,En,"Scheduler ⚛",b)}}function Cn(n,r,u,p){!ci||r<=n||(u=(u&738197653)===u?"tertiary-dark":"primary-dark",p?p.run(console.timeStamp.bind(console,"Prewarm",n,r,En,"Scheduler ⚛",u)):console.timeStamp("Prewarm",n,r,En,"Scheduler ⚛",u))}function an(n,r,u,p){!ci||r<=n||(u=(u&738197653)===u?"tertiary-dark":"primary-dark",p?p.run(console.timeStamp.bind(console,"Suspended",n,r,En,"Scheduler ⚛",u)):console.timeStamp("Suspended",n,r,En,"Scheduler ⚛",u))}function Y(n,r,u,p,b,y){if(ci&&!(r<=n)){u=[];for(var P=0;P<p.length;P++){var N=p[P].value;u.push(["Recoverable Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n={start:n,end:r,detail:{devtools:{color:"primary-dark",track:En,trackGroup:"Scheduler ⚛",tooltipText:b?"Hydration Failed":"Recovered after Error",properties:u}}},y?y.run(performance.measure.bind(performance,"Recovered",n)):performance.measure("Recovered",n)}}function B(n,r,u,p){!ci||r<=n||(p?p.run(console.timeStamp.bind(console,"Errored",n,r,En,"Scheduler ⚛","error")):console.timeStamp("Errored",n,r,En,"Scheduler ⚛","error"))}function de(n,r,u,p){!ci||r<=n||(p?p.run(console.timeStamp.bind(console,u,n,r,En,"Scheduler ⚛","secondary-light")):console.timeStamp(u,n,r,En,"Scheduler ⚛","secondary-light"))}function me(n,r,u,p,b){if(ci&&!(r<=n)){for(var y=[],P=0;P<u.length;P++){var N=u[P].value;y.push(["Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n={start:n,end:r,detail:{devtools:{color:"error",track:En,trackGroup:"Scheduler ⚛",tooltipText:p?"Remaining Effects Errored":"Commit Errored",properties:y}}},b?b.run(performance.measure.bind(performance,"Errored",n)):performance.measure("Errored",n)}}function Ce(){}function Qe(){if(tA===0){uT=console.log,dT=console.info,fT=console.warn,hT=console.error,pT=console.group,mT=console.groupCollapsed,gT=console.groupEnd;var n={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}tA++}function Ke(){if(tA--,tA===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Wn({},n,{value:uT}),info:Wn({},n,{value:dT}),warn:Wn({},n,{value:fT}),error:Wn({},n,{value:hT}),group:Wn({},n,{value:pT}),groupCollapsed:Wn({},n,{value:mT}),groupEnd:Wn({},n,{value:gT})})}0>tA&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function ke(n){var r=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,n=n.stack,Error.prepareStackTrace=r,n.startsWith(`Error: react-stack-top-frame
|
|
4304
|
+
*/var H2;function SV(){return H2||(H2=1,(function(s){process.env.NODE_ENV!=="production"&&(s.exports=function(e){function t(n,r){for(n=n.memoizedState;n!==null&&0<r;)n=n.next,r--;return n}function i(n,r,u,p){if(u>=r.length)return p;var b=r[u],y=zi(n)?n.slice():Wn({},n);return y[b]=i(n[b],r,u+1,p),y}function a(n,r,u){if(r.length!==u.length)console.warn("copyWithRename() expects paths of the same length");else{for(var p=0;p<u.length-1;p++)if(r[p]!==u[p]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(n,r,u,0)}}function c(n,r,u,p){var b=r[p],y=zi(n)?n.slice():Wn({},n);return p+1===r.length?(y[u[p]]=y[b],zi(y)?y.splice(b,1):delete y[b]):y[b]=c(n[b],r,u,p+1),y}function d(n,r,u){var p=r[u],b=zi(n)?n.slice():Wn({},n);return u+1===r.length?(zi(b)?b.splice(p,1):delete b[p],b):(b[p]=d(n[p],r,u+1),b)}function f(){return!1}function m(){return null}function g(n,r,u,p){return new TS(n,r,u,p)}function v(n,r){n.context===ei&&(B0(r,n,null,null),Fd())}function M(n,r){if(io!==null){var u=r.staleFamilies;r=r.updatedFamilies,_c(),N0(n.current,r,u),Fd()}}function x(n){io=n}function S(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function w(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function k(){}function C(){}function T(n){var r=[];return n.forEach(function(u){r.push(u)}),r.sort().join(", ")}function D(n){var r=n,u=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(u=r.return),n=r.return;while(n)}return r.tag===3?u:null}function z(n){if(D(n)!==n)throw Error("Unable to find node on an unmounted component.")}function L(n){var r=n.alternate;if(!r){if(r=D(n),r===null)throw Error("Unable to find node on an unmounted component.");return r!==n?null:n}for(var u=n,p=r;;){var b=u.return;if(b===null)break;var y=b.alternate;if(y===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===y.child){for(y=b.child;y;){if(y===u)return z(b),n;if(y===p)return z(b),r;y=y.sibling}throw Error("Unable to find node on an unmounted component.")}if(u.return!==p.return)u=b,p=y;else{for(var P=!1,N=b.child;N;){if(N===u){P=!0,u=b,p=y;break}if(N===p){P=!0,p=b,u=y;break}N=N.sibling}if(!P){for(N=y.child;N;){if(N===u){P=!0,u=y,p=b;break}if(N===p){P=!0,p=y,u=b;break}N=N.sibling}if(!P)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(u.alternate!==p)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(u.tag!==3)throw Error("Unable to find node on an unmounted component.");return u.stateNode.current===u?n:r}function O(n){return n=L(n),n!==null?U(n):null}function U(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=U(n),r!==null)return r;n=n.sibling}return null}function H(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(n.tag!==4&&(r=H(n),r!==null))return r;n=n.sibling}return null}function I(n){return n===null||typeof n!="object"?null:(n=_l&&n[_l]||n["@@iterator"],typeof n=="function"?n:null)}function F(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ru?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case nu:return"Fragment";case jg:return"Profiler";case np:return"StrictMode";case ip:return"Suspense";case Xg:return"SuspenseList";case jd:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case To:return"Portal";case wi:return n.displayName||"Context";case Kl:return(n._context.displayName||"Context")+".Consumer";case pr:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case iu:return r=n.displayName||null,r!==null?r:F(n.type)||"Memo";case Zr:r=n._payload,n=n._init;try{return F(n(r))}catch{}}return null}function V(n){var r=n.type;switch(n.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(r._context.displayName||"Context")+".Consumer";case 10:return r.displayName||"Context";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(r);case 8:return r===np?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;break;case 29:if(r=n._debugInfo,r!=null){for(var u=r.length-1;0<=u;u--)if(typeof r[u].name=="string")return r[u].name}if(n.return!==null)return V(n.return)}return null}function X(n){return{current:n}}function _(n,r){0>Ft?console.error("Unexpected pop."):(r!==At[Ft]&&console.error("Unexpected Fiber popped."),n.current=Je[Ft],Je[Ft]=null,At[Ft]=null,Ft--)}function K(n,r,u){Ft++,Je[Ft]=n.current,At[Ft]=u,n.current=r}function le(n){return n>>>=0,n===0?32:31-(rc(n)/ve|0)|0}function $(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),n}}function j(n,r,u){var p=n.pendingLanes;if(p===0)return 0;var b=0,y=n.suspendedLanes,P=n.pingedLanes;n=n.warmLanes;var N=p&134217727;return N!==0?(p=N&~y,p!==0?b=$(p):(P&=N,P!==0?b=$(P):u||(u=N&~n,u!==0&&(b=$(u))))):(N=p&~y,N!==0?b=$(N):P!==0?b=$(P):u||(u=p&~n,u!==0&&(b=$(u)))),b===0?0:r!==0&&r!==b&&(r&y)===0&&(y=b&-b,u=r&-r,y>=u||y===32&&(u&4194048)!==0)?r:b}function Q(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function ne(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function ce(){var n=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),n}function ye(n){for(var r=[],u=0;31>u;u++)r.push(n);return r}function Te(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Fe(n,r,u,p,b,y){var P=n.pendingLanes;n.pendingLanes=u,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=u,n.entangledLanes&=u,n.errorRecoveryDisabledLanes&=u,n.shellSuspendCounter=0;var N=n.entanglements,q=n.expirationTimes,se=n.hiddenUpdates;for(u=P&~u;0<u;){var Se=31-ji(u),Ee=1<<Se;N[Se]=0,q[Se]=-1;var Be=se[Se];if(Be!==null)for(se[Se]=null,Se=0;Se<Be.length;Se++){var Lt=Be[Se];Lt!==null&&(Lt.lane&=-536870913)}u&=~Ee}p!==0&&ft(n,p,0),y!==0&&b===0&&n.tag!==0&&(n.suspendedLanes|=y&~(P&~r))}function ft(n,r,u){n.pendingLanes|=r,n.suspendedLanes&=~r;var p=31-ji(r);n.entangledLanes|=r,n.entanglements[p]=n.entanglements[p]|1073741824|u&261930}function lt(n,r){var u=n.entangledLanes|=r;for(n=n.entanglements;u;){var p=31-ji(u),b=1<<p;b&r|n[p]&r&&(n[p]|=r),u&=~b}}function ct(n,r){var u=r&-r;return u=(u&42)!==0?1:Pe(u),(u&(n.suspendedLanes|r))!==0?0:u}function Pe(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function qe(n,r,u){if(yl)for(n=n.pendingUpdatersLaneMap;0<u;){var p=31-ji(u),b=1<<p;n[p].add(r),u&=~b}}function He(n,r){if(yl)for(var u=n.pendingUpdatersLaneMap,p=n.memoizedUpdaters;0<r;){var b=31-ji(r);n=1<<b,b=u[b],0<b.size&&(b.forEach(function(y){var P=y.alternate;P!==null&&p.has(P)||p.add(y)}),b.clear()),r&=~n}}function pt(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Nt(n){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled)return!0;if(!r.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{Ep=r.inject(n),es=r}catch(u){console.error("React instrumentation encountered an error: %o.",u)}return!!r.checkDCE}function nt(n){if(typeof IP=="function"&&NP(n),es&&typeof es.setStrictMode=="function")try{es.setStrictMode(Ep,n)}catch(r){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",r))}}function sn(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}function Dt(n){for(var r=0,u=0;u<n.length;u++){var p=n[u];if(typeof p=="object"&&p!==null)if(zi(p)&&p.length===2&&typeof p[0]=="string"){if(r!==0&&r!==3)return 1;r=3}else return 1;else{if(typeof p=="function"||typeof p=="string"&&50<p.length||r!==0&&r!==2)return 1;r=2}}return r}function Ue(n,r,u,p){for(var b in n)DS.call(n,b)&&b[0]!=="_"&&xe(b,n[b],r,u,p)}function xe(n,r,u,p,b){switch(typeof r){case"object":if(r===null){r="null";break}else{if(r.$$typeof===wo){var y=F(r.type)||"…",P=r.key;r=r.props;var N=Object.keys(r),q=N.length;if(P==null&&q===0){r="<"+y+" />";break}if(3>p||q===1&&N[0]==="children"&&P==null){r="<"+y+" … />";break}u.push([b+" ".repeat(p)+n,"<"+y]),P!==null&&xe("key",P,u,p+1,b),n=!1;for(var se in r)se==="children"?r.children!=null&&(!zi(r.children)||0<r.children.length)&&(n=!0):DS.call(r,se)&&se[0]!=="_"&&xe(se,r[se],u,p+1,b);u.push(["",n?">…</"+y+">":"/>"]);return}if(y=Object.prototype.toString.call(r),y=y.slice(8,y.length-1),y==="Array"){if(se=Dt(r),se===2||se===0){r=JSON.stringify(r);break}else if(se===3){for(u.push([b+" ".repeat(p)+n,""]),n=0;n<r.length;n++)y=r[n],xe(y[0],y[1],u,p+1,b);return}}if(y==="Promise"){if(r.status==="fulfilled"){if(y=u.length,xe(n,r.value,u,p,b),u.length>y){u=u[y],u[1]="Promise<"+(u[1]||"Object")+">";return}}else if(r.status==="rejected"&&(y=u.length,xe(n,r.reason,u,p,b),u.length>y)){u=u[y],u[1]="Rejected Promise<"+u[1]+">";return}u.push([" ".repeat(p)+n,"Promise"]);return}y==="Object"&&(se=Object.getPrototypeOf(r))&&typeof se.constructor=="function"&&(y=se.constructor.name),u.push([b+" ".repeat(p)+n,y==="Object"?3>p?"":"…":y]),3>p&&Ue(r,u,p+1,b);return}case"function":r=r.name===""?"() => {}":r.name+"() {}";break;case"string":r=r==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(r);break;case"undefined":r="undefined";break;case"boolean":r=r?"true":"false";break;default:r=String(r)}u.push([b+" ".repeat(p)+n,r])}function ze(n,r,u,p){var b=!0;for(P in n)P in r||(u.push(["– "+" ".repeat(p)+P,"…"]),b=!1);for(var y in r)if(y in n){var P=n[y],N=r[y];if(P!==N){if(p===0&&y==="children")b=" ".repeat(p)+y,u.push(["– "+b,"…"],["+ "+b,"…"]);else{if(!(3<=p)){if(typeof P=="object"&&typeof N=="object"&&P!==null&&N!==null&&P.$$typeof===N.$$typeof)if(N.$$typeof===wo){if(P.type===N.type&&P.key===N.key){P=F(N.type)||"…",b=" ".repeat(p)+y,P="<"+P+" … />",u.push(["– "+b,P],["+ "+b,P]),b=!1;continue}}else{var q=Object.prototype.toString.call(P),se=Object.prototype.toString.call(N);if(q===se&&(se==="[object Object]"||se==="[object Array]")){q=[" "+" ".repeat(p)+y,se==="[object Array]"?"Array":""],u.push(q),se=u.length,ze(P,N,u,p+1)?se===u.length&&(q[1]="Referentially unequal but deeply equal objects. Consider memoization."):b=!1;continue}}else if(typeof P=="function"&&typeof N=="function"&&P.name===N.name&&P.length===N.length&&(q=Function.prototype.toString.call(P),se=Function.prototype.toString.call(N),q===se)){P=N.name===""?"() => {}":N.name+"() {}",u.push([" "+" ".repeat(p)+y,P+" Referentially unequal function closure. Consider memoization."]);continue}}xe(y,P,u,p,"– "),xe(y,N,u,p,"+ ")}b=!1}}else u.push(["+ "+" ".repeat(p)+y,"…"]),b=!1;return b}function je(n){En=n&63?"Blocking":n&64?"Gesture":n&4194176?"Transition":n&62914560?"Suspense":n&2080374784?"Idle":"Other"}function Ze(n,r,u,p){ci&&(gu.start=r,gu.end=u,sc.color="warning",sc.tooltipText=p,sc.properties=null,(n=n._debugTask)?n.run(performance.measure.bind(performance,p,gu)):performance.measure(p,gu))}function Pt(n,r,u){Ze(n,r,u,"Reconnect")}function bt(n,r,u,p,b){var y=V(n);if(y!==null&&ci){var P=n.alternate,N=n.actualDuration;if(P===null||P.child!==n.child)for(var q=n.child;q!==null;q=q.sibling)N-=q.actualDuration;p=.5>N?p?"tertiary-light":"primary-light":10>N?p?"tertiary":"primary":100>N?p?"tertiary-dark":"primary-dark":"error";var se=n.memoizedProps;N=n._debugTask,se!==null&&P!==null&&P.memoizedProps!==se?(q=[UP],se=ze(P.memoizedProps,se,q,0),1<q.length&&(se&&!mu&&(P.lanes&b)===0&&100<n.actualDuration?(mu=!0,q[0]=FP,sc.color="warning",sc.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(sc.color=p,sc.tooltipText=y),sc.properties=q,gu.start=r,gu.end=u,N!=null?N.run(performance.measure.bind(performance,""+y,gu)):performance.measure(""+y,gu))):N!=null?N.run(console.timeStamp.bind(console,y,r,u,"Components ⚛",void 0,p)):console.timeStamp(y,r,u,"Components ⚛",void 0,p)}}function zt(n,r,u,p){if(ci){var b=V(n);if(b!==null){for(var y=null,P=[],N=0;N<p.length;N++){var q=p[N];y==null&&q.source!==null&&(y=q.source._debugTask),q=q.value,P.push(["Error",typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q)])}n.key!==null&&xe("key",n.key,P,0,""),n.memoizedProps!==null&&Ue(n.memoizedProps,P,0,""),y==null&&(y=n._debugTask),n={start:r,end:u,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:n.tag===13?"Hydration failed":"Error boundary caught an error",properties:P}}},y?y.run(performance.measure.bind(performance,""+b,n)):performance.measure(""+b,n)}}}function Et(n,r,u,p,b){if(b!==null){if(ci){var y=V(n);if(y!==null){p=[];for(var P=0;P<b.length;P++){var N=b[P].value;p.push(["Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n.key!==null&&xe("key",n.key,p,0,""),n.memoizedProps!==null&&Ue(n.memoizedProps,p,0,""),r={start:r,end:u,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:p}}},(n=n._debugTask)?n.run(performance.measure.bind(performance,""+y,r)):performance.measure(""+y,r)}}}else y=V(n),y!==null&&ci&&(b=1>p?"secondary-light":100>p?"secondary":500>p?"secondary-dark":"error",(n=n._debugTask)?n.run(console.timeStamp.bind(console,y,r,u,"Components ⚛",void 0,b)):console.timeStamp(y,r,u,"Components ⚛",void 0,b))}function ee(n,r,u,p){if(ci&&!(r<=n)){var b=(u&738197653)===u?"tertiary-dark":"primary-dark";u=(u&536870912)===u?"Prepared":(u&201326741)===u?"Hydrated":"Render",p?p.run(console.timeStamp.bind(console,u,n,r,En,"Scheduler ⚛",b)):console.timeStamp(u,n,r,En,"Scheduler ⚛",b)}}function Cn(n,r,u,p){!ci||r<=n||(u=(u&738197653)===u?"tertiary-dark":"primary-dark",p?p.run(console.timeStamp.bind(console,"Prewarm",n,r,En,"Scheduler ⚛",u)):console.timeStamp("Prewarm",n,r,En,"Scheduler ⚛",u))}function an(n,r,u,p){!ci||r<=n||(u=(u&738197653)===u?"tertiary-dark":"primary-dark",p?p.run(console.timeStamp.bind(console,"Suspended",n,r,En,"Scheduler ⚛",u)):console.timeStamp("Suspended",n,r,En,"Scheduler ⚛",u))}function Y(n,r,u,p,b,y){if(ci&&!(r<=n)){u=[];for(var P=0;P<p.length;P++){var N=p[P].value;u.push(["Recoverable Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n={start:n,end:r,detail:{devtools:{color:"primary-dark",track:En,trackGroup:"Scheduler ⚛",tooltipText:b?"Hydration Failed":"Recovered after Error",properties:u}}},y?y.run(performance.measure.bind(performance,"Recovered",n)):performance.measure("Recovered",n)}}function B(n,r,u,p){!ci||r<=n||(p?p.run(console.timeStamp.bind(console,"Errored",n,r,En,"Scheduler ⚛","error")):console.timeStamp("Errored",n,r,En,"Scheduler ⚛","error"))}function de(n,r,u,p){!ci||r<=n||(p?p.run(console.timeStamp.bind(console,u,n,r,En,"Scheduler ⚛","secondary-light")):console.timeStamp(u,n,r,En,"Scheduler ⚛","secondary-light"))}function me(n,r,u,p,b){if(ci&&!(r<=n)){for(var y=[],P=0;P<u.length;P++){var N=u[P].value;y.push(["Error",typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N)])}n={start:n,end:r,detail:{devtools:{color:"error",track:En,trackGroup:"Scheduler ⚛",tooltipText:p?"Remaining Effects Errored":"Commit Errored",properties:y}}},b?b.run(performance.measure.bind(performance,"Errored",n)):performance.measure("Errored",n)}}function Ce(){}function Qe(){if(tA===0){uT=console.log,dT=console.info,fT=console.warn,hT=console.error,pT=console.group,mT=console.groupCollapsed,gT=console.groupEnd;var n={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}tA++}function Ke(){if(tA--,tA===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Wn({},n,{value:uT}),info:Wn({},n,{value:dT}),warn:Wn({},n,{value:fT}),error:Wn({},n,{value:hT}),group:Wn({},n,{value:pT}),groupCollapsed:Wn({},n,{value:mT}),groupEnd:Wn({},n,{value:gT})})}0>tA&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function ke(n){var r=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,n=n.stack,Error.prepareStackTrace=r,n.startsWith(`Error: react-stack-top-frame
|
|
4305
4305
|
`)&&(n=n.slice(29)),r=n.indexOf(`
|
|
4306
4306
|
`),r!==-1&&(n=n.slice(r+1)),r=n.indexOf("react_stack_bottom_frame"),r!==-1&&(r=n.lastIndexOf(`
|
|
4307
4307
|
`,r)),r!==-1)n=n.slice(0,r);else return"";return n}function De(n){if(LS===void 0)try{throw Error()}catch(u){var r=u.stack.trim().match(/\n( *(at )?)/);LS=r&&r[1]||"",AT=-1<u.stack.indexOf(`
|
|
4308
4308
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4309
|
-
`+LS+n+AT}function et(n,r){if(!n||IS)return"";var u=NS.get(n);if(u!==void 0)return u;IS=!0,u=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var p=null;p=be.H,be.H=null,Qe();try{var b={DetermineComponentFrameRoot:function(){try{if(r){var
|
|
4309
|
+
`+LS+n+AT}function et(n,r){if(!n||IS)return"";var u=NS.get(n);if(u!==void 0)return u;IS=!0,u=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var p=null;p=be.H,be.H=null,Qe();try{var b={DetermineComponentFrameRoot:function(){try{if(r){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(qt){var Lt=qt}Reflect.construct(n,[],Be)}else{try{Be.call()}catch(qt){Lt=qt}n.call(Be.prototype)}}else{try{throw Error()}catch(qt){Lt=qt}(Be=n())&&typeof Be.catch=="function"&&Be.catch(function(){})}}catch(qt){if(qt&&Lt&&typeof qt.stack=="string")return[qt.stack,Lt.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=b.DetermineComponentFrameRoot(),N=P[0],q=P[1];if(N&&q){var se=N.split(`
|
|
4310
4310
|
`),Se=q.split(`
|
|
4311
4311
|
`);for(P=y=0;y<se.length&&!se[y].includes("DetermineComponentFrameRoot");)y++;for(;P<Se.length&&!Se[P].includes("DetermineComponentFrameRoot");)P++;if(y===se.length||P===Se.length)for(y=se.length-1,P=Se.length-1;1<=y&&0<=P&&se[y]!==Se[P];)P--;for(;1<=y&&0<=P;y--,P--)if(se[y]!==Se[P]){if(y!==1||P!==1)do if(y--,P--,0>P||se[y]!==Se[P]){var Ee=`
|
|
4312
4312
|
`+se[y].replace(" at new "," at ");return n.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",n.displayName)),typeof n=="function"&&NS.set(n,Ee),Ee}while(1<=y&&0<=P);break}}}finally{IS=!1,be.H=p,Ke(),Error.prepareStackTrace=u}return se=(se=n?n.displayName||n.name:"")?De(se):"",typeof n=="function"&&NS.set(n,se),se}function Rt(n,r){switch(n.tag){case 26:case 27:case 5:return De(n.type);case 16:return De("Lazy");case 13:return n.child!==r&&r!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return et(n.type,!1);case 11:return et(n.type.render,!1);case 1:return et(n.type,!0);case 31:return De("Activity");default:return""}}function rt(n){try{var r="",u=null;do{r+=Rt(n,u);var p=n._debugInfo;if(p)for(var b=p.length-1;0<=b;b--){var y=p[b];if(typeof y.name=="string"){var P=r;e:{var N=y.name,q=y.env,se=y.debugLocation;if(se!=null){var Se=ke(se),Ee=Se.lastIndexOf(`
|
|
4313
|
-
`),
|
|
4314
|
-
`+
|
|
4313
|
+
`),Be=Ee===-1?Se:Se.slice(Ee+1);if(Be.indexOf(N)!==-1){var Lt=`
|
|
4314
|
+
`+Be;break e}}Lt=De(N+(q?" ["+q+"]":""))}r=P+Lt}}u=n,n=n.return}while(n);return r}catch(qt){return`
|
|
4315
4315
|
Error generating stack: `+qt.message+`
|
|
4316
4316
|
`+qt.stack}}function st(n){return(n=n?n.displayName||n.name:"")?De(n):""}function mt(n,r){if(typeof n=="object"&&n!==null){var u=zS.get(n);return u!==void 0?u:(r={value:n,source:r,stack:rt(r)},zS.set(n,r),r)}return{value:n,source:r,stack:rt(r)}}function Ct(n,r){tt(),Cp[Rp++]=nA,Cp[Rp++]=W0,W0=n,nA=r}function jt(n,r,u){tt(),Qa[Za++]=ac,Qa[Za++]=oc,Qa[Za++]=ef,ef=n;var p=ac;n=oc;var b=32-ji(p)-1;p&=~(1<<b),u+=1;var y=32-ji(r)+b;if(30<y){var P=b-b%5;y=(p&(1<<P)-1).toString(32),p>>=P,b-=P,ac=1<<32-ji(r)+b|u<<b|p,oc=y+n}else ac=1<<y|u<<b|p,oc=n}function ae(n){tt(),n.return!==null&&(Ct(n,1),jt(n,1,0))}function _e(n){for(;n===W0;)W0=Cp[--Rp],Cp[Rp]=null,nA=Cp[--Rp],Cp[Rp]=null;for(;n===ef;)ef=Qa[--Za],Qa[Za]=null,oc=Qa[--Za],Qa[Za]=null,ac=Qa[--Za],Qa[Za]=null}function Le(){return tt(),ef!==null?{id:ac,overflow:oc}:null}function it(n,r){tt(),Qa[Za++]=ac,Qa[Za++]=oc,Qa[Za++]=ef,ac=r.id,oc=r.overflow,ef=n}function tt(){Sn||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Ne(n){return n===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),n}function Mt(n,r){K(vu,r,n),K(iA,n,n),K(Au,null,n),r=Wa(r),_(Au,n),K(Au,r,n)}function gt(n){_(Au,n),_(iA,n),_(vu,n)}function yn(){return Ne(Au.current)}function Rn(n){n.memoizedState!==null&&K(j0,n,n);var r=Ne(Au.current),u=mr(r,n.type);r!==u&&(K(iA,n,n),K(Au,u,n))}function Qi(n){iA.current===n&&(_(Au,n),_(iA,n)),j0.current===n&&(_(j0,n),Fr?Hs._currentValue=Vs:Hs._currentValue2=Vs)}function Gr(n,r){return n.serverProps===void 0&&n.serverTail.length===0&&n.children.length===1&&3<n.distanceFromLeaf&&n.distanceFromLeaf>15-r?Gr(n.children[0],r):n}function Zi(n){return" "+" ".repeat(n)}function $s(n){return"+ "+" ".repeat(n)}function Rs(n){return"- "+" ".repeat(n)}function Ps(n){switch(n.tag){case 26:case 27:case 5:return n.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return n=n.type,n.displayName||n.name||null;case 11:return n=n.type.render,n.displayName||n.name||null;case 1:return n=n.type,n.displayName||n.name||null;default:return null}}function Yo(n,r){return vT.test(n)?(n=JSON.stringify(n),n.length>r-2?8>r?'{"..."}':"{"+n.slice(0,r-7)+'..."}':"{"+n+"}"):n.length>r?5>r?'{"..."}':n.slice(0,r-3)+"...":n}function ka(n,r,u){var p=120-2*u;if(r===null)return $s(u)+Yo(n,p)+`
|
|
4317
4317
|
`;if(typeof r=="string"){for(var b=0;b<r.length&&b<n.length&&r.charCodeAt(b)===n.charCodeAt(b);b++);return b>p-8&&10<b&&(n="..."+n.slice(b-8),r="..."+r.slice(b-8)),$s(u)+Yo(n,p)+`
|
|
@@ -4332,7 +4332,7 @@ Error generating stack: `+qt.message+`
|
|
|
4332
4332
|
`:(b+=$s(p+1)+P+"="+Se+`
|
|
4333
4333
|
`,b+=Rs(p+1)+P+"="+N+`
|
|
4334
4334
|
`)}else b+=Zi(p+1)+P+"="+lr(r[P],N)+`
|
|
4335
|
-
`}y.forEach(function(Ee){if(Ee!=="children"){var
|
|
4335
|
+
`}y.forEach(function(Ee){if(Ee!=="children"){var Be=120-2*(p+1)-Ee.length-1;b+=Rs(p+1)+Ee+"="+lr(u[Ee],Be)+`
|
|
4336
4336
|
`}}),b=b===""?Zi(p)+"<"+n+`>
|
|
4337
4337
|
`:Zi(p)+"<"+n+`
|
|
4338
4338
|
`+b+Zi(p)+`>
|
|
@@ -4368,16 +4368,16 @@ https://react.dev/link/hydration-mismatch`+u),n)),BS}function Ae(n,r){if(!Tr)thr
|
|
|
4368
4368
|
|
|
4369
4369
|
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
4370
4370
|
|
|
4371
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",r)})}}function Xt(){Pp=Y0=null,kp=!1}function Ot(n,r,u){Fr?(K(X0,r._currentValue,n),r._currentValue=u,K(US,r._currentRenderer,n),r._currentRenderer!==void 0&&r._currentRenderer!==null&&r._currentRenderer!==q0&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),r._currentRenderer=q0):(K(X0,r._currentValue2,n),r._currentValue2=u,K(FS,r._currentRenderer2,n),r._currentRenderer2!==void 0&&r._currentRenderer2!==null&&r._currentRenderer2!==q0&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),r._currentRenderer2=q0)}function vt(n,r){var u=X0.current;Fr?(n._currentValue=u,u=US.current,_(US,r),n._currentRenderer=u):(n._currentValue2=u,u=FS.current,_(FS,r),n._currentRenderer2=u),_(X0,r)}function Pn(n,r,u){for(;n!==null;){var p=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,p!==null&&(p.childLanes|=r)):p!==null&&(p.childLanes&r)!==r&&(p.childLanes|=r),n===u)break;n=n.return}n!==u&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function dn(n,r,u,p){var b=n.child;for(b!==null&&(b.return=n);b!==null;){var y=b.dependencies;if(y!==null){var P=b.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=b;for(var q=0;q<r.length;q++)if(N.context===r[q]){y.lanes|=u,N=y.alternate,N!==null&&(N.lanes|=u),Pn(y.return,u,n),p||(P=null);break e}y=N.next}}else if(b.tag===18){if(P=b.return,P===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");P.lanes|=u,y=P.alternate,y!==null&&(y.lanes|=u),Pn(P,u,n),P=null}else P=b.child;if(P!==null)P.return=b;else for(P=b;P!==null;){if(P===n){P=null;break}if(b=P.sibling,b!==null){b.return=P.return,P=b;break}P=P.return}b=P}}function Ht(n,r,u,p){n=null;for(var b=r,y=!1;b!==null;){if(!y){if((b.flags&524288)!==0)y=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var P=b.alternate;if(P===null)throw Error("Should have a current fiber. This is a bug in React.");if(P=P.memoizedProps,P!==null){var N=b.type;ms(b.pendingProps.value,P.value)||(n!==null?n.push(N):n=[N])}}else if(b===j0.current){if(P=b.alternate,P===null)throw Error("Should have a current fiber. This is a bug in React.");P.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(n!==null?n.push(Hs):n=[Hs])}b=b.return}n!==null&&dn(r,n,u,p),r.flags|=262144}function Tn(n){for(n=n.firstContext;n!==null;){var r=n.context;if(!ms(Fr?r._currentValue:r._currentValue2,n.memoizedValue))return!0;n=n.next}return!1}function Qn(n){Y0=n,Pp=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function je(n){return kp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Kt(Y0,n)}function Li(n,r){return Y0===null&&Qn(n),Kt(n,r)}function Kt(n,r){var u=Fr?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:u,next:null},Pp===null){if(n===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Pp=r,n.dependencies={lanes:0,firstContext:r,_debugThenableState:null},n.flags|=524288}else Pp=Pp.next=r;return u}function Hi(){return{controller:new OP,data:new Map,refCount:0}}function Ii(n){n.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),n.refCount++}function yr(n){n.refCount--,0>n.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),n.refCount===0&&VP(HP,function(){n.controller.abort()})}function Ki(n,r,u){(n&127)!==0?0>Sl&&(Sl=er(),rA=J0(r),OS=r,u!=null&&(VS=V(u)),Od()&&(Pi=!0,xu=1),n=ma(),r=$l(),n!==Dp||r!==sA?Dp=-1.1:r!==null&&(xu=1),rf=n,sA=r):(n&4194048)!==0&&0>_a&&(_a=er(),aA=J0(r),yT=r,u!=null&&(bT=V(u)),0>fc)&&(n=ma(),r=$l(),(n!==Mu||r!==sf)&&(Mu=-1.1),Su=n,sf=r)}function Gn(n){if(0>Sl){Sl=er(),rA=n._debugTask!=null?n._debugTask:null,Od()&&(xu=1);var r=ma(),u=$l();r!==Dp||u!==sA?Dp=-1.1:u!==null&&(xu=1),rf=r,sA=u}0>_a&&(_a=er(),aA=n._debugTask!=null?n._debugTask:null,0>fc)&&(n=ma(),r=$l(),(n!==Mu||r!==sf)&&(Mu=-1.1),Su=n,sf=r)}function zn(){var n=tf;return tf=0,n}function Wr(n){var r=tf;return tf=n,r}function Dn(n){var r=tf;return tf+=n,r}function jr(){Vt=Ut=-1.1}function gi(){var n=Ut;return Ut=-1.1,n}function cr(n){0<=n&&(Ut=n)}function Da(){var n=bi;return bi=-0,n}function na(n){0<=n&&(bi=n)}function ia(){var n=hi;return hi=null,n}function ra(){var n=Pi;return Pi=!1,n}function td(n){gs=er(),0>n.actualStartTime&&(n.actualStartTime=gs)}function Zf(n){if(0<=gs){var r=er()-gs;n.actualDuration+=r,n.selfBaseDuration=r,gs=-1}}function jm(n){if(0<=gs){var r=er()-gs;n.actualDuration+=r,gs=-1}}function sa(){if(0<=gs){var n=er(),r=n-gs;gs=-1,tf+=r,bi+=r,Vt=n}}function Xm(n){hi===null&&(hi=[]),hi.push(n),uc===null&&(uc=[]),uc.push(n)}function aa(){gs=er(),0>Ut&&(Ut=gs)}function nd(n){for(var r=n.child;r;)n.actualDuration+=r.actualDuration,r=r.sibling}function id(){}function Lr(n){n!==Lp&&n.next===null&&(Lp===null?$0=Lp=n:Lp=Lp.next=n),ey=!0,be.actQueue!==null?WS||(WS=!0,Ym()):GS||(GS=!0,Ym())}function Bl(n,r){if(!jS&&ey){jS=!0;do for(var u=!1,p=$0;p!==null;){if(n!==0){var b=p.pendingLanes;if(b===0)var y=0;else{var P=p.suspendedLanes,N=p.pingedLanes;y=(1<<31-ji(42|n)+1)-1,y&=b&~(P&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,Iv(p,y))}else y=cn,y=j(p,p===ri?y:0,p.cancelPendingCommit!==null||p.timeoutHandle!==ja),(y&3)===0||Q(p,y)||(u=!0,Iv(p,y));p=p.next}while(u);jS=!1}}function rd(){su(),Bc()}function Bc(){ey=WS=GS=!1;var n=0;af!==0&&qd()&&(n=af);for(var r=xn(),u=null,p=$0;p!==null;){var b=p.next,y=qm(p,r);y===0?(p.next=null,u===null?$0=b:u.next=b,b===null&&(Lp=u)):(u=p,(n!==0||(y&3)!==0)&&(ey=!0)),p=b}sr!==ku&&sr!==My||Bl(n),af!==0&&(af=0)}function qm(n,r){for(var u=n.suspendedLanes,p=n.pingedLanes,b=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var P=31-ji(y),N=1<<P,q=b[P];q===-1?((N&u)===0||(N&p)!==0)&&(b[P]=ne(N,r)):q<=r&&(n.expiredLanes|=N),y&=~N}if(r=ri,u=cn,u=j(n,n===r?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==ja),p=n.callbackNode,u===0||n===r&&(Kn===pf||Kn===mf)||n.cancelPendingCommit!==null)return p!==null&&_f(p),n.callbackNode=null,n.callbackPriority=0;if((u&3)===0||Q(n,u)){if(r=u&-u,r!==n.callbackPriority||be.actQueue!==null&&p!==XS)_f(p);else return r;switch(pt(u)){case 2:case 8:u=Do;break;case 32:u=$d;break;case 268435456:u=aT;break;default:u=$d}return p=Kf.bind(null,n),be.actQueue!==null?(be.actQueue.push(p),u=XS):u=Bt(u,p),n.callbackPriority=r,n.callbackNode=u,r}return p!==null&&_f(p),n.callbackPriority=2,n.callbackNode=null,2}function Kf(n,r){if(_0=K0=!1,su(),sr!==ku&&sr!==My)return n.callbackNode=null,n.callbackPriority=0,null;var u=n.callbackNode;if(Uo===Sy&&(Uo=mM),_c()&&n.callbackNode!==u)return null;var p=cn;return p=j(n,n===ri?p:0,n.cancelPendingCommit!==null||n.timeoutHandle!==ja),p===0?null:(Bg(n,p,r),qm(n,xn()),n.callbackNode!=null&&n.callbackNode===u?Kf.bind(null,n):null)}function Iv(n,r){if(_c())return null;K0=_0,_0=!1,Bg(n,r,!0)}function _f(n){n!==XS&&n!==null&&fi(n)}function Ym(){be.actQueue!==null&&be.actQueue.push(function(){return Bc(),null}),O0?Gs(function(){(Mn&(Rr|no))!==Cr?Bt(kn,rd):Bc()}):Bt(kn,rd)}function $f(){if(af===0){var n=of;n===0&&(n=fe,fe<<=1,(fe&261888)===0&&(fe=256)),af=n}return af}function Nv(n,r){if(lA===null){var u=lA=[];qS=0,of=$f(),Ip={status:"pending",value:void 0,then:function(p){u.push(p)}}}return qS++,r.then(Jm,Jm),r}function Jm(){if(--qS===0&&(-1<_a||(fc=-1.1),lA!==null)){Ip!==null&&(Ip.status="fulfilled");var n=lA;lA=null,of=0,Ip=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function Qm(n,r){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return n.then(function(){p.status="fulfilled",p.value=r;for(var b=0;b<u.length;b++)(0,u[b])(r)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}function eh(){var n=lf.current;return n!==null?n:ri.pooledCache}function sd(n,r){r===null?K(lf,lf.current,n):K(lf,r.pool,n)}function th(){var n=eh();return n===null?null:{parent:Fr?Ri._currentValue:Ri._currentValue2,pool:n}}function ad(n,r){if(ms(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var u=Object.keys(n),p=Object.keys(r);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!DS.call(r,b)||!ms(n[b],r[b]))return!1}return!0}function Zm(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function Km(n){return n=n.status,n==="fulfilled"||n==="rejected"}function nh(n,r,u){be.actQueue!==null&&(be.didUsePromise=!0);var p=n.thenables;if(u=p[u],u===void 0?p.push(r):u!==r&&(n.didWarnAboutUncachedPromise||(n.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),r.then(id,id),r=u),r._debugInfo===void 0){n=performance.now(),p=r.displayName;var b={name:typeof p=="string"?p:"Promise",start:n,end:n,value:r};r._debugInfo=[{awaited:b}],r.status!=="fulfilled"&&r.status!=="rejected"&&(n=function(){b.end=performance.now()},r.then(n,n))}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zv(n),n;default:if(typeof r.status=="string")r.then(id,id);else{if(n=ri,n!==null&&100<n.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");n=r,n.status="pending",n.then(function(y){if(r.status==="pending"){var P=r;P.status="fulfilled",P.value=y}},function(y){if(r.status==="pending"){var P=r;P.status="rejected",P.reason=y}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zv(n),n}throw uf=r,mA=!0,Np}}function ho(n){try{return XP(n)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(uf=r,mA=!0,Np):r}}function _m(){if(uf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var n=uf;return uf=null,mA=!1,n}function zv(n){if(n===Np||n===ny)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ur(n){var r=ln;return n!=null&&(ln=r===null?n:r.concat(n)),r}function ih(){var n=ln;if(n!=null){for(var r=n.length-1;0<=r;r--)if(n[r].name!=null){var u=n[r].debugTask;if(u!=null)return u}}return null}function Ko(n,r,u){for(var p=Object.keys(n.props),b=0;b<p.length;b++){var y=p[b];if(y!=="children"&&y!=="key"){r===null&&(r=$h(n,u.mode,0),r._debugInfo=ln,r.return=u),xt(r,function(P){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P)},y);break}}}function Uc(n){var r=gA;return gA+=1,zp===null&&(zp=Zm()),nh(zp,n,r)}function _o(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function $m(n,r){throw r.$$typeof===U0?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
4371
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",r)})}}function Xt(){Pp=Y0=null,kp=!1}function Ot(n,r,u){Fr?(K(X0,r._currentValue,n),r._currentValue=u,K(US,r._currentRenderer,n),r._currentRenderer!==void 0&&r._currentRenderer!==null&&r._currentRenderer!==q0&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),r._currentRenderer=q0):(K(X0,r._currentValue2,n),r._currentValue2=u,K(FS,r._currentRenderer2,n),r._currentRenderer2!==void 0&&r._currentRenderer2!==null&&r._currentRenderer2!==q0&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),r._currentRenderer2=q0)}function vt(n,r){var u=X0.current;Fr?(n._currentValue=u,u=US.current,_(US,r),n._currentRenderer=u):(n._currentValue2=u,u=FS.current,_(FS,r),n._currentRenderer2=u),_(X0,r)}function Pn(n,r,u){for(;n!==null;){var p=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,p!==null&&(p.childLanes|=r)):p!==null&&(p.childLanes&r)!==r&&(p.childLanes|=r),n===u)break;n=n.return}n!==u&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function dn(n,r,u,p){var b=n.child;for(b!==null&&(b.return=n);b!==null;){var y=b.dependencies;if(y!==null){var P=b.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=b;for(var q=0;q<r.length;q++)if(N.context===r[q]){y.lanes|=u,N=y.alternate,N!==null&&(N.lanes|=u),Pn(y.return,u,n),p||(P=null);break e}y=N.next}}else if(b.tag===18){if(P=b.return,P===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");P.lanes|=u,y=P.alternate,y!==null&&(y.lanes|=u),Pn(P,u,n),P=null}else P=b.child;if(P!==null)P.return=b;else for(P=b;P!==null;){if(P===n){P=null;break}if(b=P.sibling,b!==null){b.return=P.return,P=b;break}P=P.return}b=P}}function Ht(n,r,u,p){n=null;for(var b=r,y=!1;b!==null;){if(!y){if((b.flags&524288)!==0)y=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var P=b.alternate;if(P===null)throw Error("Should have a current fiber. This is a bug in React.");if(P=P.memoizedProps,P!==null){var N=b.type;ms(b.pendingProps.value,P.value)||(n!==null?n.push(N):n=[N])}}else if(b===j0.current){if(P=b.alternate,P===null)throw Error("Should have a current fiber. This is a bug in React.");P.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(n!==null?n.push(Hs):n=[Hs])}b=b.return}n!==null&&dn(r,n,u,p),r.flags|=262144}function Tn(n){for(n=n.firstContext;n!==null;){var r=n.context;if(!ms(Fr?r._currentValue:r._currentValue2,n.memoizedValue))return!0;n=n.next}return!1}function Qn(n){Y0=n,Pp=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Xe(n){return kp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Kt(Y0,n)}function Li(n,r){return Y0===null&&Qn(n),Kt(n,r)}function Kt(n,r){var u=Fr?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:u,next:null},Pp===null){if(n===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Pp=r,n.dependencies={lanes:0,firstContext:r,_debugThenableState:null},n.flags|=524288}else Pp=Pp.next=r;return u}function Hi(){return{controller:new OP,data:new Map,refCount:0}}function Ii(n){n.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),n.refCount++}function yr(n){n.refCount--,0>n.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),n.refCount===0&&VP(HP,function(){n.controller.abort()})}function Ki(n,r,u){(n&127)!==0?0>Sl&&(Sl=er(),rA=J0(r),OS=r,u!=null&&(VS=V(u)),Od()&&(Pi=!0,xu=1),n=ma(),r=$l(),n!==Dp||r!==sA?Dp=-1.1:r!==null&&(xu=1),rf=n,sA=r):(n&4194048)!==0&&0>_a&&(_a=er(),aA=J0(r),yT=r,u!=null&&(bT=V(u)),0>fc)&&(n=ma(),r=$l(),(n!==Mu||r!==sf)&&(Mu=-1.1),Su=n,sf=r)}function Gn(n){if(0>Sl){Sl=er(),rA=n._debugTask!=null?n._debugTask:null,Od()&&(xu=1);var r=ma(),u=$l();r!==Dp||u!==sA?Dp=-1.1:u!==null&&(xu=1),rf=r,sA=u}0>_a&&(_a=er(),aA=n._debugTask!=null?n._debugTask:null,0>fc)&&(n=ma(),r=$l(),(n!==Mu||r!==sf)&&(Mu=-1.1),Su=n,sf=r)}function zn(){var n=tf;return tf=0,n}function Wr(n){var r=tf;return tf=n,r}function Dn(n){var r=tf;return tf+=n,r}function jr(){Vt=Ut=-1.1}function gi(){var n=Ut;return Ut=-1.1,n}function cr(n){0<=n&&(Ut=n)}function Da(){var n=bi;return bi=-0,n}function na(n){0<=n&&(bi=n)}function ia(){var n=hi;return hi=null,n}function ra(){var n=Pi;return Pi=!1,n}function td(n){gs=er(),0>n.actualStartTime&&(n.actualStartTime=gs)}function Zf(n){if(0<=gs){var r=er()-gs;n.actualDuration+=r,n.selfBaseDuration=r,gs=-1}}function jm(n){if(0<=gs){var r=er()-gs;n.actualDuration+=r,gs=-1}}function sa(){if(0<=gs){var n=er(),r=n-gs;gs=-1,tf+=r,bi+=r,Vt=n}}function Xm(n){hi===null&&(hi=[]),hi.push(n),uc===null&&(uc=[]),uc.push(n)}function aa(){gs=er(),0>Ut&&(Ut=gs)}function nd(n){for(var r=n.child;r;)n.actualDuration+=r.actualDuration,r=r.sibling}function id(){}function Lr(n){n!==Lp&&n.next===null&&(Lp===null?$0=Lp=n:Lp=Lp.next=n),ey=!0,be.actQueue!==null?WS||(WS=!0,Ym()):GS||(GS=!0,Ym())}function Bl(n,r){if(!jS&&ey){jS=!0;do for(var u=!1,p=$0;p!==null;){if(n!==0){var b=p.pendingLanes;if(b===0)var y=0;else{var P=p.suspendedLanes,N=p.pingedLanes;y=(1<<31-ji(42|n)+1)-1,y&=b&~(P&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,Iv(p,y))}else y=cn,y=j(p,p===ri?y:0,p.cancelPendingCommit!==null||p.timeoutHandle!==ja),(y&3)===0||Q(p,y)||(u=!0,Iv(p,y));p=p.next}while(u);jS=!1}}function rd(){su(),Bc()}function Bc(){ey=WS=GS=!1;var n=0;af!==0&&qd()&&(n=af);for(var r=xn(),u=null,p=$0;p!==null;){var b=p.next,y=qm(p,r);y===0?(p.next=null,u===null?$0=b:u.next=b,b===null&&(Lp=u)):(u=p,(n!==0||(y&3)!==0)&&(ey=!0)),p=b}sr!==ku&&sr!==My||Bl(n),af!==0&&(af=0)}function qm(n,r){for(var u=n.suspendedLanes,p=n.pingedLanes,b=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var P=31-ji(y),N=1<<P,q=b[P];q===-1?((N&u)===0||(N&p)!==0)&&(b[P]=ne(N,r)):q<=r&&(n.expiredLanes|=N),y&=~N}if(r=ri,u=cn,u=j(n,n===r?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==ja),p=n.callbackNode,u===0||n===r&&(Kn===pf||Kn===mf)||n.cancelPendingCommit!==null)return p!==null&&_f(p),n.callbackNode=null,n.callbackPriority=0;if((u&3)===0||Q(n,u)){if(r=u&-u,r!==n.callbackPriority||be.actQueue!==null&&p!==XS)_f(p);else return r;switch(pt(u)){case 2:case 8:u=Do;break;case 32:u=$d;break;case 268435456:u=aT;break;default:u=$d}return p=Kf.bind(null,n),be.actQueue!==null?(be.actQueue.push(p),u=XS):u=Bt(u,p),n.callbackPriority=r,n.callbackNode=u,r}return p!==null&&_f(p),n.callbackPriority=2,n.callbackNode=null,2}function Kf(n,r){if(_0=K0=!1,su(),sr!==ku&&sr!==My)return n.callbackNode=null,n.callbackPriority=0,null;var u=n.callbackNode;if(Uo===Sy&&(Uo=mM),_c()&&n.callbackNode!==u)return null;var p=cn;return p=j(n,n===ri?p:0,n.cancelPendingCommit!==null||n.timeoutHandle!==ja),p===0?null:(Bg(n,p,r),qm(n,xn()),n.callbackNode!=null&&n.callbackNode===u?Kf.bind(null,n):null)}function Iv(n,r){if(_c())return null;K0=_0,_0=!1,Bg(n,r,!0)}function _f(n){n!==XS&&n!==null&&fi(n)}function Ym(){be.actQueue!==null&&be.actQueue.push(function(){return Bc(),null}),O0?Gs(function(){(Mn&(Rr|no))!==Cr?Bt(kn,rd):Bc()}):Bt(kn,rd)}function $f(){if(af===0){var n=of;n===0&&(n=fe,fe<<=1,(fe&261888)===0&&(fe=256)),af=n}return af}function Nv(n,r){if(lA===null){var u=lA=[];qS=0,of=$f(),Ip={status:"pending",value:void 0,then:function(p){u.push(p)}}}return qS++,r.then(Jm,Jm),r}function Jm(){if(--qS===0&&(-1<_a||(fc=-1.1),lA!==null)){Ip!==null&&(Ip.status="fulfilled");var n=lA;lA=null,of=0,Ip=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function Qm(n,r){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return n.then(function(){p.status="fulfilled",p.value=r;for(var b=0;b<u.length;b++)(0,u[b])(r)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}function eh(){var n=lf.current;return n!==null?n:ri.pooledCache}function sd(n,r){r===null?K(lf,lf.current,n):K(lf,r.pool,n)}function th(){var n=eh();return n===null?null:{parent:Fr?Ri._currentValue:Ri._currentValue2,pool:n}}function ad(n,r){if(ms(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var u=Object.keys(n),p=Object.keys(r);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!DS.call(r,b)||!ms(n[b],r[b]))return!1}return!0}function Zm(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function Km(n){return n=n.status,n==="fulfilled"||n==="rejected"}function nh(n,r,u){be.actQueue!==null&&(be.didUsePromise=!0);var p=n.thenables;if(u=p[u],u===void 0?p.push(r):u!==r&&(n.didWarnAboutUncachedPromise||(n.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),r.then(id,id),r=u),r._debugInfo===void 0){n=performance.now(),p=r.displayName;var b={name:typeof p=="string"?p:"Promise",start:n,end:n,value:r};r._debugInfo=[{awaited:b}],r.status!=="fulfilled"&&r.status!=="rejected"&&(n=function(){b.end=performance.now()},r.then(n,n))}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zv(n),n;default:if(typeof r.status=="string")r.then(id,id);else{if(n=ri,n!==null&&100<n.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");n=r,n.status="pending",n.then(function(y){if(r.status==="pending"){var P=r;P.status="fulfilled",P.value=y}},function(y){if(r.status==="pending"){var P=r;P.status="rejected",P.reason=y}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,zv(n),n}throw uf=r,mA=!0,Np}}function ho(n){try{return XP(n)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(uf=r,mA=!0,Np):r}}function _m(){if(uf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var n=uf;return uf=null,mA=!1,n}function zv(n){if(n===Np||n===ny)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ur(n){var r=ln;return n!=null&&(ln=r===null?n:r.concat(n)),r}function ih(){var n=ln;if(n!=null){for(var r=n.length-1;0<=r;r--)if(n[r].name!=null){var u=n[r].debugTask;if(u!=null)return u}}return null}function Ko(n,r,u){for(var p=Object.keys(n.props),b=0;b<p.length;b++){var y=p[b];if(y!=="children"&&y!=="key"){r===null&&(r=$h(n,u.mode,0),r._debugInfo=ln,r.return=u),xt(r,function(P){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P)},y);break}}}function Uc(n){var r=gA;return gA+=1,zp===null&&(zp=Zm()),nh(zp,n,r)}function _o(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function $m(n,r){throw r.$$typeof===U0?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
4372
4372
|
- Multiple copies of the "react" package is used.
|
|
4373
4373
|
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
4374
4374
|
- A compiler tries to "inline" JSX instead of using the runtime.`):(n=Object.prototype.toString.call(r),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead."))}function od(n,r){var u=ih();u!==null?u.run($m.bind(null,n,r)):$m(n,r)}function rh(n,r){var u=V(n)||"Component";OT[u]||(OT[u]=!0,r=r.displayName||r.name||"Component",n.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
4375
4375
|
root.render(%s)`,r,r,r):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
4376
4376
|
<%s>{%s}</%s>`,r,r,u,r,u))}function ld(n,r){var u=ih();u!==null?u.run(rh.bind(null,n,r)):rh(n,r)}function eg(n,r){var u=V(n)||"Component";VT[u]||(VT[u]=!0,r=String(r),n.tag===3?console.error(`Symbols are not valid as a React child.
|
|
4377
4377
|
root.render(%s)`,r):console.error(`Symbols are not valid as a React child.
|
|
4378
|
-
<%s>%s</%s>`,u,r,u))}function La(n,r){var u=ih();u!==null?u.run(eg.bind(null,n,r)):eg(n,r)}function cd(n){function r(ie,re){if(n){var ue=ie.deletions;ue===null?(ie.deletions=[re],ie.flags|=16):ue.push(re)}}function u(ie,re){if(!n)return null;for(;re!==null;)r(ie,re),re=re.sibling;return null}function p(ie){for(var re=new Map;ie!==null;)ie.key!==null?re.set(ie.key,ie):re.set(ie.index,ie),ie=ie.sibling;return re}function b(ie,re){return ie=Mo(ie,re),ie.index=0,ie.sibling=null,ie}function y(ie,re,ue){return ie.index=ue,n?(ue=ie.alternate,ue!==null?(ue=ue.index,ue<re?(ie.flags|=67108866,re):ue):(ie.flags|=67108866,re)):(ie.flags|=1048576,re)}function P(ie){return n&&ie.alternate===null&&(ie.flags|=67108866),ie}function N(ie,re,ue,Ie){return re===null||re.tag!==6?(re=ep(ue,ie.mode,Ie),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re):(re=b(re,ue),re.return=ie,re._debugInfo=ln,re)}function q(ie,re,ue,Ie){var yt=ue.type;return yt===nu?(re=Se(ie,re,ue.props.children,Ie,ue.key),Ko(ue,re,ie),re):re!==null&&(re.elementType===yt||Wg(re,ue)||typeof yt=="object"&&yt!==null&&yt.$$typeof===Zr&&ho(yt)===re.type)?(re=b(re,ue.props),_o(re,ue),re.return=ie,re._debugOwner=ue._owner,re._debugInfo=ln,re):(re=$h(ue,ie.mode,Ie),_o(re,ue),re.return=ie,re._debugInfo=ln,re)}function se(ie,re,ue,Ie){return re===null||re.tag!==4||re.stateNode.containerInfo!==ue.containerInfo||re.stateNode.implementation!==ue.implementation?(re=Hd(ue,ie.mode,Ie),re.return=ie,re._debugInfo=ln,re):(re=b(re,ue.children||[]),re.return=ie,re._debugInfo=ln,re)}function Se(ie,re,ue,Ie,yt){return re===null||re.tag!==7?(re=cl(ue,ie.mode,Ie,yt),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re):(re=b(re,ue),re.return=ie,re._debugInfo=ln,re)}function Ee(ie,re,ue){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=ep(""+re,ie.mode,ue),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case wo:return ue=$h(re,ie.mode,ue),_o(ue,re),ue.return=ie,ie=ur(re._debugInfo),ue._debugInfo=ln,ln=ie,ue;case To:return re=Hd(re,ie.mode,ue),re.return=ie,re._debugInfo=ln,re;case Zr:var Ie=ur(re._debugInfo);return re=ho(re),ie=Ee(ie,re,ue),ln=Ie,ie}if(zi(re)||I(re))return ue=cl(re,ie.mode,ue,null),ue.return=ie,ue._debugOwner=ie,ue._debugTask=ie._debugTask,ie=ur(re._debugInfo),ue._debugInfo=ln,ln=ie,ue;if(typeof re.then=="function")return Ie=ur(re._debugInfo),ie=Ee(ie,Uc(re),ue),ln=Ie,ie;if(re.$$typeof===wi)return Ee(ie,Li(ie,re),ue);od(ie,re)}return typeof re=="function"&&ld(ie,re),typeof re=="symbol"&&La(ie,re),null}function ze(ie,re,ue,Ie){var yt=re!==null?re.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return yt!==null?null:N(ie,re,""+ue,Ie);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case wo:return ue.key===yt?(yt=ur(ue._debugInfo),ie=q(ie,re,ue,Ie),ln=yt,ie):null;case To:return ue.key===yt?se(ie,re,ue,Ie):null;case Zr:return yt=ur(ue._debugInfo),ue=ho(ue),ie=ze(ie,re,ue,Ie),ln=yt,ie}if(zi(ue)||I(ue))return yt!==null?null:(yt=ur(ue._debugInfo),ie=Se(ie,re,ue,Ie,null),ln=yt,ie);if(typeof ue.then=="function")return yt=ur(ue._debugInfo),ie=ze(ie,re,Uc(ue),Ie),ln=yt,ie;if(ue.$$typeof===wi)return ze(ie,re,Li(ie,ue),Ie);od(ie,ue)}return typeof ue=="function"&&ld(ie,ue),typeof ue=="symbol"&&La(ie,ue),null}function Lt(ie,re,ue,Ie,yt){if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return ie=ie.get(ue)||null,N(re,ie,""+Ie,yt);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case wo:return ue=ie.get(Ie.key===null?ue:Ie.key)||null,ie=ur(Ie._debugInfo),re=q(re,ue,Ie,yt),ln=ie,re;case To:return ie=ie.get(Ie.key===null?ue:Ie.key)||null,se(re,ie,Ie,yt);case Zr:var Nn=ur(Ie._debugInfo);return Ie=ho(Ie),re=Lt(ie,re,ue,Ie,yt),ln=Nn,re}if(zi(Ie)||I(Ie))return ue=ie.get(ue)||null,ie=ur(Ie._debugInfo),re=Se(re,ue,Ie,yt,null),ln=ie,re;if(typeof Ie.then=="function")return Nn=ur(Ie._debugInfo),re=Lt(ie,re,ue,Uc(Ie),yt),ln=Nn,re;if(Ie.$$typeof===wi)return Lt(ie,re,ue,Li(re,Ie),yt);od(re,Ie)}return typeof Ie=="function"&&ld(re,Ie),typeof Ie=="symbol"&&La(re,Ie),null}function qt(ie,re,ue,Ie){if(typeof ue!="object"||ue===null)return Ie;switch(ue.$$typeof){case wo:case To:C(ie,re,ue);var yt=ue.key;if(typeof yt!="string")break;if(Ie===null){Ie=new Set,Ie.add(yt);break}if(!Ie.has(yt)){Ie.add(yt);break}xt(re,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",yt)});break;case Zr:ue=ho(ue),qt(ie,re,ue,Ie)}return Ie}function ti(ie,re,ue,Ie){for(var yt=null,Nn=null,Qt=null,nn=re,on=re=0,ui=null;nn!==null&&on<ue.length;on++){nn.index>on?(ui=nn,nn=null):ui=nn.sibling;var qi=ze(ie,nn,ue[on],Ie);if(qi===null){nn===null&&(nn=ui);break}yt=qt(ie,qi,ue[on],yt),n&&nn&&qi.alternate===null&&r(ie,nn),re=y(qi,re,on),Qt===null?Nn=qi:Qt.sibling=qi,Qt=qi,nn=ui}if(on===ue.length)return u(ie,nn),Sn&&Ct(ie,on),Nn;if(nn===null){for(;on<ue.length;on++)nn=Ee(ie,ue[on],Ie),nn!==null&&(yt=qt(ie,nn,ue[on],yt),re=y(nn,re,on),Qt===null?Nn=nn:Qt.sibling=nn,Qt=nn);return Sn&&Ct(ie,on),Nn}for(nn=p(nn);on<ue.length;on++)ui=Lt(nn,ie,on,ue[on],Ie),ui!==null&&(yt=qt(ie,ui,ue[on],yt),n&&ui.alternate!==null&&nn.delete(ui.key===null?on:ui.key),re=y(ui,re,on),Qt===null?Nn=ui:Qt.sibling=ui,Qt=ui);return n&&nn.forEach(function(yc){return r(ie,yc)}),Sn&&Ct(ie,on),Nn}function Zp(ie,re,ue,Ie){if(ue==null)throw Error("An iterable object provided no iterator.");for(var yt=null,Nn=null,Qt=re,nn=re=0,on=null,ui=null,qi=ue.next();Qt!==null&&!qi.done;nn++,qi=ue.next()){Qt.index>nn?(on=Qt,Qt=null):on=Qt.sibling;var yc=ze(ie,Qt,qi.value,Ie);if(yc===null){Qt===null&&(Qt=on);break}ui=qt(ie,yc,qi.value,ui),n&&Qt&&yc.alternate===null&&r(ie,Qt),re=y(yc,re,nn),Nn===null?yt=yc:Nn.sibling=yc,Nn=yc,Qt=on}if(qi.done)return u(ie,Qt),Sn&&Ct(ie,nn),yt;if(Qt===null){for(;!qi.done;nn++,qi=ue.next())Qt=Ee(ie,qi.value,Ie),Qt!==null&&(ui=qt(ie,Qt,qi.value,ui),re=y(Qt,re,nn),Nn===null?yt=Qt:Nn.sibling=Qt,Nn=Qt);return Sn&&Ct(ie,nn),yt}for(Qt=p(Qt);!qi.done;nn++,qi=ue.next())on=Lt(Qt,ie,nn,qi.value,Ie),on!==null&&(ui=qt(ie,on,qi.value,ui),n&&on.alternate!==null&&Qt.delete(on.key===null?nn:on.key),re=y(on,re,nn),Nn===null?yt=on:Nn.sibling=on,Nn=on);return n&&Qt.forEach(function($P){return r(ie,$P)}),Sn&&Ct(ie,nn),yt}function Fo(ie,re,ue,Ie){if(typeof ue=="object"&&ue!==null&&ue.type===nu&&ue.key===null&&(Ko(ue,null,ie),ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case wo:var yt=ur(ue._debugInfo);e:{for(var Nn=ue.key;re!==null;){if(re.key===Nn){if(Nn=ue.type,Nn===nu){if(re.tag===7){u(ie,re.sibling),Ie=b(re,ue.props.children),Ie.return=ie,Ie._debugOwner=ue._owner,Ie._debugInfo=ln,Ko(ue,Ie,ie),ie=Ie;break e}}else if(re.elementType===Nn||Wg(re,ue)||typeof Nn=="object"&&Nn!==null&&Nn.$$typeof===Zr&&ho(Nn)===re.type){u(ie,re.sibling),Ie=b(re,ue.props),_o(Ie,ue),Ie.return=ie,Ie._debugOwner=ue._owner,Ie._debugInfo=ln,ie=Ie;break e}u(ie,re);break}else r(ie,re);re=re.sibling}ue.type===nu?(Ie=cl(ue.props.children,ie.mode,Ie,ue.key),Ie.return=ie,Ie._debugOwner=ie,Ie._debugTask=ie._debugTask,Ie._debugInfo=ln,Ko(ue,Ie,ie),ie=Ie):(Ie=$h(ue,ie.mode,Ie),_o(Ie,ue),Ie.return=ie,Ie._debugInfo=ln,ie=Ie)}return ie=P(ie),ln=yt,ie;case To:e:{for(yt=ue,ue=yt.key;re!==null;){if(re.key===ue)if(re.tag===4&&re.stateNode.containerInfo===yt.containerInfo&&re.stateNode.implementation===yt.implementation){u(ie,re.sibling),Ie=b(re,yt.children||[]),Ie.return=ie,ie=Ie;break e}else{u(ie,re);break}else r(ie,re);re=re.sibling}Ie=Hd(yt,ie.mode,Ie),Ie.return=ie,ie=Ie}return P(ie);case Zr:return yt=ur(ue._debugInfo),ue=ho(ue),ie=Fo(ie,re,ue,Ie),ln=yt,ie}if(zi(ue))return yt=ur(ue._debugInfo),ie=ti(ie,re,ue,Ie),ln=yt,ie;if(I(ue)){if(yt=ur(ue._debugInfo),Nn=I(ue),typeof Nn!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Qt=Nn.call(ue);return Qt===ue?(ie.tag!==0||Object.prototype.toString.call(ie.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Qt)!=="[object Generator]")&&(UT||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),UT=!0):ue.entries!==Nn||ZS||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ZS=!0),ie=Zp(ie,re,Qt,Ie),ln=yt,ie}if(typeof ue.then=="function")return yt=ur(ue._debugInfo),ie=Fo(ie,re,Uc(ue),Ie),ln=yt,ie;if(ue.$$typeof===wi)return Fo(ie,re,Li(ie,ue),Ie);od(ie,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(yt=""+ue,re!==null&&re.tag===6?(u(ie,re.sibling),Ie=b(re,yt),Ie.return=ie,ie=Ie):(u(ie,re),Ie=ep(yt,ie.mode,Ie),Ie.return=ie,Ie._debugOwner=ie,Ie._debugTask=ie._debugTask,Ie._debugInfo=ln,ie=Ie),P(ie)):(typeof ue=="function"&&ld(ie,ue),typeof ue=="symbol"&&La(ie,ue),u(ie,re))}return function(ie,re,ue,Ie){var yt=ln;ln=null;try{gA=0;var Nn=Fo(ie,re,ue,Ie);return zp=null,Nn}catch(ui){if(ui===Np||ui===ny)throw ui;var Qt=g(29,ui,null,ie.mode);Qt.lanes=Ie,Qt.return=ie;var nn=Qt._debugInfo=ln;if(Qt._debugOwner=ie._debugOwner,Qt._debugTask=ie._debugTask,nn!=null){for(var on=nn.length-1;0<=on;on--)if(typeof nn[on].stack=="string"){Qt._debugOwner=nn[on],Qt._debugTask=nn[on].debugTask;break}}return Qt}finally{ln=yt}}}function tg(n,r){var u=zi(n);return n=!u&&typeof I(n)=="function",u||n?(u=u?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",u,r,u),!1):!0}function Fc(){for(var n=Bp,r=KS=Bp=0;r<n;){var u=$a[r];$a[r++]=null;var p=$a[r];$a[r++]=null;var b=$a[r];$a[r++]=null;var y=$a[r];if($a[r++]=null,p!==null&&b!==null){var P=p.pending;P===null?b.next=b:(b.next=P.next,P.next=b),p.pending=b}y!==0&&_i(u,b,y)}}function ud(n,r,u,p){$a[Bp++]=n,$a[Bp++]=r,$a[Bp++]=u,$a[Bp++]=p,KS|=p,n.lanes|=p,n=n.alternate,n!==null&&(n.lanes|=p)}function sh(n,r,u,p){return ud(n,r,u,p),dd(n)}function br(n,r){return ud(n,null,null,r),dd(n)}function _i(n,r,u){n.lanes|=u;var p=n.alternate;p!==null&&(p.lanes|=u);for(var b=!1,y=n.return;y!==null;)y.childLanes|=u,p=y.alternate,p!==null&&(p.childLanes|=u),y.tag===22&&(n=y.stateNode,n===null||n._visibility&AA||(b=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,b&&r!==null&&(b=31-ji(u),n=y.hiddenUpdates,p=n[b],p===null?n[b]=[r]:p.push(r),r.lane=u|536870912),y):null}function dd(n){if(PA>ZP)throw Af=PA=0,kA=yM=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Af>KP&&(Af=0,kA=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),n.alternate===null&&(n.flags&4098)!==0&&Qh(n);for(var r=n,u=r.return;u!==null;)r.alternate===null&&(r.flags&4098)!==0&&Qh(n),r=u,u=r.return;return r.tag===3?r.stateNode:null}function ah(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oh(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function po(n){return{lane:n,tag:GT,payload:null,callback:null,next:null}}function Ds(n,r,u){var p=n.updateQueue;if(p===null)return null;if(p=p.shared,$S===p&&!XT){var b=V(n);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
4378
|
+
<%s>%s</%s>`,u,r,u))}function La(n,r){var u=ih();u!==null?u.run(eg.bind(null,n,r)):eg(n,r)}function cd(n){function r(ie,re){if(n){var ue=ie.deletions;ue===null?(ie.deletions=[re],ie.flags|=16):ue.push(re)}}function u(ie,re){if(!n)return null;for(;re!==null;)r(ie,re),re=re.sibling;return null}function p(ie){for(var re=new Map;ie!==null;)ie.key!==null?re.set(ie.key,ie):re.set(ie.index,ie),ie=ie.sibling;return re}function b(ie,re){return ie=Mo(ie,re),ie.index=0,ie.sibling=null,ie}function y(ie,re,ue){return ie.index=ue,n?(ue=ie.alternate,ue!==null?(ue=ue.index,ue<re?(ie.flags|=67108866,re):ue):(ie.flags|=67108866,re)):(ie.flags|=1048576,re)}function P(ie){return n&&ie.alternate===null&&(ie.flags|=67108866),ie}function N(ie,re,ue,Ie){return re===null||re.tag!==6?(re=ep(ue,ie.mode,Ie),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re):(re=b(re,ue),re.return=ie,re._debugInfo=ln,re)}function q(ie,re,ue,Ie){var yt=ue.type;return yt===nu?(re=Se(ie,re,ue.props.children,Ie,ue.key),Ko(ue,re,ie),re):re!==null&&(re.elementType===yt||Wg(re,ue)||typeof yt=="object"&&yt!==null&&yt.$$typeof===Zr&&ho(yt)===re.type)?(re=b(re,ue.props),_o(re,ue),re.return=ie,re._debugOwner=ue._owner,re._debugInfo=ln,re):(re=$h(ue,ie.mode,Ie),_o(re,ue),re.return=ie,re._debugInfo=ln,re)}function se(ie,re,ue,Ie){return re===null||re.tag!==4||re.stateNode.containerInfo!==ue.containerInfo||re.stateNode.implementation!==ue.implementation?(re=Hd(ue,ie.mode,Ie),re.return=ie,re._debugInfo=ln,re):(re=b(re,ue.children||[]),re.return=ie,re._debugInfo=ln,re)}function Se(ie,re,ue,Ie,yt){return re===null||re.tag!==7?(re=cl(ue,ie.mode,Ie,yt),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re):(re=b(re,ue),re.return=ie,re._debugInfo=ln,re)}function Ee(ie,re,ue){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=ep(""+re,ie.mode,ue),re.return=ie,re._debugOwner=ie,re._debugTask=ie._debugTask,re._debugInfo=ln,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case wo:return ue=$h(re,ie.mode,ue),_o(ue,re),ue.return=ie,ie=ur(re._debugInfo),ue._debugInfo=ln,ln=ie,ue;case To:return re=Hd(re,ie.mode,ue),re.return=ie,re._debugInfo=ln,re;case Zr:var Ie=ur(re._debugInfo);return re=ho(re),ie=Ee(ie,re,ue),ln=Ie,ie}if(zi(re)||I(re))return ue=cl(re,ie.mode,ue,null),ue.return=ie,ue._debugOwner=ie,ue._debugTask=ie._debugTask,ie=ur(re._debugInfo),ue._debugInfo=ln,ln=ie,ue;if(typeof re.then=="function")return Ie=ur(re._debugInfo),ie=Ee(ie,Uc(re),ue),ln=Ie,ie;if(re.$$typeof===wi)return Ee(ie,Li(ie,re),ue);od(ie,re)}return typeof re=="function"&&ld(ie,re),typeof re=="symbol"&&La(ie,re),null}function Be(ie,re,ue,Ie){var yt=re!==null?re.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return yt!==null?null:N(ie,re,""+ue,Ie);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case wo:return ue.key===yt?(yt=ur(ue._debugInfo),ie=q(ie,re,ue,Ie),ln=yt,ie):null;case To:return ue.key===yt?se(ie,re,ue,Ie):null;case Zr:return yt=ur(ue._debugInfo),ue=ho(ue),ie=Be(ie,re,ue,Ie),ln=yt,ie}if(zi(ue)||I(ue))return yt!==null?null:(yt=ur(ue._debugInfo),ie=Se(ie,re,ue,Ie,null),ln=yt,ie);if(typeof ue.then=="function")return yt=ur(ue._debugInfo),ie=Be(ie,re,Uc(ue),Ie),ln=yt,ie;if(ue.$$typeof===wi)return Be(ie,re,Li(ie,ue),Ie);od(ie,ue)}return typeof ue=="function"&&ld(ie,ue),typeof ue=="symbol"&&La(ie,ue),null}function Lt(ie,re,ue,Ie,yt){if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return ie=ie.get(ue)||null,N(re,ie,""+Ie,yt);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case wo:return ue=ie.get(Ie.key===null?ue:Ie.key)||null,ie=ur(Ie._debugInfo),re=q(re,ue,Ie,yt),ln=ie,re;case To:return ie=ie.get(Ie.key===null?ue:Ie.key)||null,se(re,ie,Ie,yt);case Zr:var Nn=ur(Ie._debugInfo);return Ie=ho(Ie),re=Lt(ie,re,ue,Ie,yt),ln=Nn,re}if(zi(Ie)||I(Ie))return ue=ie.get(ue)||null,ie=ur(Ie._debugInfo),re=Se(re,ue,Ie,yt,null),ln=ie,re;if(typeof Ie.then=="function")return Nn=ur(Ie._debugInfo),re=Lt(ie,re,ue,Uc(Ie),yt),ln=Nn,re;if(Ie.$$typeof===wi)return Lt(ie,re,ue,Li(re,Ie),yt);od(re,Ie)}return typeof Ie=="function"&&ld(re,Ie),typeof Ie=="symbol"&&La(re,Ie),null}function qt(ie,re,ue,Ie){if(typeof ue!="object"||ue===null)return Ie;switch(ue.$$typeof){case wo:case To:C(ie,re,ue);var yt=ue.key;if(typeof yt!="string")break;if(Ie===null){Ie=new Set,Ie.add(yt);break}if(!Ie.has(yt)){Ie.add(yt);break}xt(re,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",yt)});break;case Zr:ue=ho(ue),qt(ie,re,ue,Ie)}return Ie}function ti(ie,re,ue,Ie){for(var yt=null,Nn=null,Qt=null,nn=re,on=re=0,ui=null;nn!==null&&on<ue.length;on++){nn.index>on?(ui=nn,nn=null):ui=nn.sibling;var qi=Be(ie,nn,ue[on],Ie);if(qi===null){nn===null&&(nn=ui);break}yt=qt(ie,qi,ue[on],yt),n&&nn&&qi.alternate===null&&r(ie,nn),re=y(qi,re,on),Qt===null?Nn=qi:Qt.sibling=qi,Qt=qi,nn=ui}if(on===ue.length)return u(ie,nn),Sn&&Ct(ie,on),Nn;if(nn===null){for(;on<ue.length;on++)nn=Ee(ie,ue[on],Ie),nn!==null&&(yt=qt(ie,nn,ue[on],yt),re=y(nn,re,on),Qt===null?Nn=nn:Qt.sibling=nn,Qt=nn);return Sn&&Ct(ie,on),Nn}for(nn=p(nn);on<ue.length;on++)ui=Lt(nn,ie,on,ue[on],Ie),ui!==null&&(yt=qt(ie,ui,ue[on],yt),n&&ui.alternate!==null&&nn.delete(ui.key===null?on:ui.key),re=y(ui,re,on),Qt===null?Nn=ui:Qt.sibling=ui,Qt=ui);return n&&nn.forEach(function(yc){return r(ie,yc)}),Sn&&Ct(ie,on),Nn}function Zp(ie,re,ue,Ie){if(ue==null)throw Error("An iterable object provided no iterator.");for(var yt=null,Nn=null,Qt=re,nn=re=0,on=null,ui=null,qi=ue.next();Qt!==null&&!qi.done;nn++,qi=ue.next()){Qt.index>nn?(on=Qt,Qt=null):on=Qt.sibling;var yc=Be(ie,Qt,qi.value,Ie);if(yc===null){Qt===null&&(Qt=on);break}ui=qt(ie,yc,qi.value,ui),n&&Qt&&yc.alternate===null&&r(ie,Qt),re=y(yc,re,nn),Nn===null?yt=yc:Nn.sibling=yc,Nn=yc,Qt=on}if(qi.done)return u(ie,Qt),Sn&&Ct(ie,nn),yt;if(Qt===null){for(;!qi.done;nn++,qi=ue.next())Qt=Ee(ie,qi.value,Ie),Qt!==null&&(ui=qt(ie,Qt,qi.value,ui),re=y(Qt,re,nn),Nn===null?yt=Qt:Nn.sibling=Qt,Nn=Qt);return Sn&&Ct(ie,nn),yt}for(Qt=p(Qt);!qi.done;nn++,qi=ue.next())on=Lt(Qt,ie,nn,qi.value,Ie),on!==null&&(ui=qt(ie,on,qi.value,ui),n&&on.alternate!==null&&Qt.delete(on.key===null?nn:on.key),re=y(on,re,nn),Nn===null?yt=on:Nn.sibling=on,Nn=on);return n&&Qt.forEach(function($P){return r(ie,$P)}),Sn&&Ct(ie,nn),yt}function Fo(ie,re,ue,Ie){if(typeof ue=="object"&&ue!==null&&ue.type===nu&&ue.key===null&&(Ko(ue,null,ie),ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case wo:var yt=ur(ue._debugInfo);e:{for(var Nn=ue.key;re!==null;){if(re.key===Nn){if(Nn=ue.type,Nn===nu){if(re.tag===7){u(ie,re.sibling),Ie=b(re,ue.props.children),Ie.return=ie,Ie._debugOwner=ue._owner,Ie._debugInfo=ln,Ko(ue,Ie,ie),ie=Ie;break e}}else if(re.elementType===Nn||Wg(re,ue)||typeof Nn=="object"&&Nn!==null&&Nn.$$typeof===Zr&&ho(Nn)===re.type){u(ie,re.sibling),Ie=b(re,ue.props),_o(Ie,ue),Ie.return=ie,Ie._debugOwner=ue._owner,Ie._debugInfo=ln,ie=Ie;break e}u(ie,re);break}else r(ie,re);re=re.sibling}ue.type===nu?(Ie=cl(ue.props.children,ie.mode,Ie,ue.key),Ie.return=ie,Ie._debugOwner=ie,Ie._debugTask=ie._debugTask,Ie._debugInfo=ln,Ko(ue,Ie,ie),ie=Ie):(Ie=$h(ue,ie.mode,Ie),_o(Ie,ue),Ie.return=ie,Ie._debugInfo=ln,ie=Ie)}return ie=P(ie),ln=yt,ie;case To:e:{for(yt=ue,ue=yt.key;re!==null;){if(re.key===ue)if(re.tag===4&&re.stateNode.containerInfo===yt.containerInfo&&re.stateNode.implementation===yt.implementation){u(ie,re.sibling),Ie=b(re,yt.children||[]),Ie.return=ie,ie=Ie;break e}else{u(ie,re);break}else r(ie,re);re=re.sibling}Ie=Hd(yt,ie.mode,Ie),Ie.return=ie,ie=Ie}return P(ie);case Zr:return yt=ur(ue._debugInfo),ue=ho(ue),ie=Fo(ie,re,ue,Ie),ln=yt,ie}if(zi(ue))return yt=ur(ue._debugInfo),ie=ti(ie,re,ue,Ie),ln=yt,ie;if(I(ue)){if(yt=ur(ue._debugInfo),Nn=I(ue),typeof Nn!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Qt=Nn.call(ue);return Qt===ue?(ie.tag!==0||Object.prototype.toString.call(ie.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Qt)!=="[object Generator]")&&(UT||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),UT=!0):ue.entries!==Nn||ZS||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ZS=!0),ie=Zp(ie,re,Qt,Ie),ln=yt,ie}if(typeof ue.then=="function")return yt=ur(ue._debugInfo),ie=Fo(ie,re,Uc(ue),Ie),ln=yt,ie;if(ue.$$typeof===wi)return Fo(ie,re,Li(ie,ue),Ie);od(ie,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(yt=""+ue,re!==null&&re.tag===6?(u(ie,re.sibling),Ie=b(re,yt),Ie.return=ie,ie=Ie):(u(ie,re),Ie=ep(yt,ie.mode,Ie),Ie.return=ie,Ie._debugOwner=ie,Ie._debugTask=ie._debugTask,Ie._debugInfo=ln,ie=Ie),P(ie)):(typeof ue=="function"&&ld(ie,ue),typeof ue=="symbol"&&La(ie,ue),u(ie,re))}return function(ie,re,ue,Ie){var yt=ln;ln=null;try{gA=0;var Nn=Fo(ie,re,ue,Ie);return zp=null,Nn}catch(ui){if(ui===Np||ui===ny)throw ui;var Qt=g(29,ui,null,ie.mode);Qt.lanes=Ie,Qt.return=ie;var nn=Qt._debugInfo=ln;if(Qt._debugOwner=ie._debugOwner,Qt._debugTask=ie._debugTask,nn!=null){for(var on=nn.length-1;0<=on;on--)if(typeof nn[on].stack=="string"){Qt._debugOwner=nn[on],Qt._debugTask=nn[on].debugTask;break}}return Qt}finally{ln=yt}}}function tg(n,r){var u=zi(n);return n=!u&&typeof I(n)=="function",u||n?(u=u?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",u,r,u),!1):!0}function Fc(){for(var n=Bp,r=KS=Bp=0;r<n;){var u=$a[r];$a[r++]=null;var p=$a[r];$a[r++]=null;var b=$a[r];$a[r++]=null;var y=$a[r];if($a[r++]=null,p!==null&&b!==null){var P=p.pending;P===null?b.next=b:(b.next=P.next,P.next=b),p.pending=b}y!==0&&_i(u,b,y)}}function ud(n,r,u,p){$a[Bp++]=n,$a[Bp++]=r,$a[Bp++]=u,$a[Bp++]=p,KS|=p,n.lanes|=p,n=n.alternate,n!==null&&(n.lanes|=p)}function sh(n,r,u,p){return ud(n,r,u,p),dd(n)}function br(n,r){return ud(n,null,null,r),dd(n)}function _i(n,r,u){n.lanes|=u;var p=n.alternate;p!==null&&(p.lanes|=u);for(var b=!1,y=n.return;y!==null;)y.childLanes|=u,p=y.alternate,p!==null&&(p.childLanes|=u),y.tag===22&&(n=y.stateNode,n===null||n._visibility&AA||(b=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,b&&r!==null&&(b=31-ji(u),n=y.hiddenUpdates,p=n[b],p===null?n[b]=[r]:p.push(r),r.lane=u|536870912),y):null}function dd(n){if(PA>ZP)throw Af=PA=0,kA=yM=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Af>KP&&(Af=0,kA=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),n.alternate===null&&(n.flags&4098)!==0&&Qh(n);for(var r=n,u=r.return;u!==null;)r.alternate===null&&(r.flags&4098)!==0&&Qh(n),r=u,u=r.return;return r.tag===3?r.stateNode:null}function ah(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oh(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function po(n){return{lane:n,tag:GT,payload:null,callback:null,next:null}}function Ds(n,r,u){var p=n.updateQueue;if(p===null)return null;if(p=p.shared,$S===p&&!XT){var b=V(n);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
4379
4379
|
|
|
4380
|
-
Please update the following component: %s`,b),XT=!0}return(Mn&Rr)!==Cr?(b=p.pending,b===null?r.next=r:(r.next=b.next,b.next=r),p.pending=r,r=dd(n),_i(n,null,u),r):(ud(n,p,r,u),dd(n))}function Oc(n,r,u){if(r=r.updateQueue,r!==null&&(r=r.shared,(u&4194048)!==0)){var p=r.lanes;p&=n.pendingLanes,u|=p,r.lanes=u,
|
|
4380
|
+
Please update the following component: %s`,b),XT=!0}return(Mn&Rr)!==Cr?(b=p.pending,b===null?r.next=r:(r.next=b.next,b.next=r),p.pending=r,r=dd(n),_i(n,null,u),r):(ud(n,p,r,u),dd(n))}function Oc(n,r,u){if(r=r.updateQueue,r!==null&&(r=r.shared,(u&4194048)!==0)){var p=r.lanes;p&=n.pendingLanes,u|=p,r.lanes=u,lt(n,u)}}function Ul(n,r){var u=n.updateQueue,p=n.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var b=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var P={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?b=y=P:y=y.next=P,u=u.next}while(u!==null);y===null?b=y=r:y=y.next=r}else b=y=r;u={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:y,shared:p.shared,callbacks:p.callbacks},n.updateQueue=u;return}n=u.lastBaseUpdate,n===null?u.firstBaseUpdate=r:n.next=r,u.lastBaseUpdate=r}function Vc(){if(eM){var n=Ip;if(n!==null)throw n}}function fd(n,r,u,p){eM=!1;var b=n.updateQueue;wu=!1,$S=b.shared;var y=b.firstBaseUpdate,P=b.lastBaseUpdate,N=b.shared.pending;if(N!==null){b.shared.pending=null;var q=N,se=q.next;q.next=null,P===null?y=se:P.next=se,P=q;var Se=n.alternate;Se!==null&&(Se=Se.updateQueue,N=Se.lastBaseUpdate,N!==P&&(N===null?Se.firstBaseUpdate=se:N.next=se,Se.lastBaseUpdate=q))}if(y!==null){var Ee=b.baseState;P=0,Se=se=q=null,N=y;do{var Be=N.lane&-536870913,Lt=Be!==N.lane;if(Lt?(cn&Be)===Be:(p&Be)===Be){Be!==0&&Be===of&&(eM=!0),Se!==null&&(Se=Se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{Be=n;var qt=N,ti=r,Zp=u;switch(qt.tag){case WT:if(qt=qt.payload,typeof qt=="function"){kp=!0;var Fo=qt.call(Zp,Ee,ti);if(Be.mode&8){nt(!0);try{qt.call(Zp,Ee,ti)}finally{nt(!1)}}kp=!1,Ee=Fo;break e}Ee=qt;break e;case _S:Be.flags=Be.flags&-65537|128;case GT:if(Fo=qt.payload,typeof Fo=="function"){if(kp=!0,qt=Fo.call(Zp,Ee,ti),Be.mode&8){nt(!0);try{Fo.call(Zp,Ee,ti)}finally{nt(!1)}}kp=!1}else qt=Fo;if(qt==null)break e;Ee=Wn({},Ee,qt);break e;case jT:wu=!0}}Be=N.callback,Be!==null&&(n.flags|=64,Lt&&(n.flags|=8192),Lt=b.callbacks,Lt===null?b.callbacks=[Be]:Lt.push(Be))}else Lt={lane:Be,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Se===null?(se=Se=Lt,q=Ee):Se=Se.next=Lt,P|=Be;if(N=N.next,N===null){if(N=b.shared.pending,N===null)break;Lt=N,N=Lt.next,Lt.next=null,b.lastBaseUpdate=Lt,b.shared.pending=null}}while(!0);Se===null&&(q=Ee),b.baseState=q,b.firstBaseUpdate=se,b.lastBaseUpdate=Se,y===null&&(b.shared.lanes=0),Cu|=P,n.lanes=P,n.memoizedState=Ee}$S=null}function hd(n,r){if(typeof n!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+n);n.call(r)}function ng(n,r){var u=n.shared.hiddenCallbacks;if(u!==null)for(n.shared.hiddenCallbacks=null,n=0;n<u.length;n++)hd(u[n],r)}function ig(n,r){var u=n.callbacks;if(u!==null)for(n.callbacks=null,n=0;n<u.length;n++)hd(u[n],r)}function rg(n,r){var u=wl;K(ry,u,n),K(Up,r,n),wl=u|r.baseLanes}function lh(n){K(ry,wl,n),K(Up,Up.current,n)}function pd(n){wl=ry.current,_(Up,n),_(ry,n)}function Ia(n){var r=n.alternate;K(Xi,Xi.current&Fp,n),K(ba,n,n),Io===null&&(r===null||Up.current!==null||r.memoizedState!==null)&&(Io=n)}function ch(n){K(Xi,Xi.current,n),K(ba,n,n),Io===null&&(Io=n)}function uh(n){n.tag===22?(K(Xi,Xi.current,n),K(ba,n,n),Io===null&&(Io=n)):oa(n)}function oa(n){K(Xi,Xi.current,n),K(ba,ba.current,n)}function Ir(n){_(ba,n),Io===n&&(Io=null),_(Xi,n)}function md(n){for(var r=n;r!==null;){if(r.tag===13){var u=r.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Qd(u)||mp(u)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function en(){var n=Me;to===null?to=[n]:to.push(n)}function Ge(){var n=Me;if(to!==null&&(gc++,to[gc]!==n)){var r=V(Jt);if(!qT.has(r)&&(qT.add(r),to!==null)){for(var u="",p=0;p<=gc;p++){var b=to[p],y=p===gc?n:b;for(b=p+1+". "+b;30>b.length;)b+=" ";b+=y+`
|
|
4381
4381
|
`,u+=b}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
4382
4382
|
|
|
4383
4383
|
Previous render Next render
|
|
@@ -4390,9 +4390,9 @@ Please update the following component: %s`,b),XT=!0}return(Mn&Rr)!==Cr?(b=p.pend
|
|
|
4390
4390
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function dh(n,r){if(bA)return!1;if(r===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Me),!1;n.length!==r.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
4391
4391
|
|
|
4392
4392
|
Previous: %s
|
|
4393
|
-
Incoming: %s`,Me,"["+r.join(", ")+"]","["+n.join(", ")+"]");for(var u=0;u<r.length&&u<n.length;u++)if(!ms(n[u],r[u]))return!1;return!0}function cs(n,r,u,p,b,y){pc=y,Jt=r,to=n!==null?n._debugHookTypes:null,gc=-1,bA=n!==null&&n.type!==r.type,(Object.prototype.toString.call(u)==="[object AsyncFunction]"||Object.prototype.toString.call(u)==="[object AsyncGeneratorFunction]")&&(y=V(Jt),tM.has(y)||(tM.add(y),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",y===null?"An unknown Component":"<"+y+">"))),r.memoizedState=null,r.updateQueue=null,r.lanes=0,be.H=n!==null&&n.memoizedState!==null?iM:to!==null?QT:nM,ff=y=(r.mode&8)!==Wt;var P=YS(u,p,b);if(ff=!1,Vp&&(P=fh(r,u,p,b)),y){nt(!0);try{P=fh(r,u,p,b)}finally{nt(!1)}}return gd(n,r),P}function gd(n,r){r._debugHookTypes=to,r.dependencies===null?mc!==null&&(r.dependencies={lanes:0,firstContext:null,_debugThenableState:mc}):r.dependencies._debugThenableState=mc,be.H=xA;var u=ii!==null&&ii.next!==null;if(pc=0,to=Me=tr=ii=Jt=null,gc=-1,n!==null&&(n.flags&65011712)!==(r.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ay=!1,yA=0,mc=null,u)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");n===null||nr||(n=n.dependencies,n!==null&&Tn(n)&&(nr=!0)),mA?(mA=!1,n=!0):n=!1,n&&(r=V(r)||"Unknown",YT.has(r)||tM.has(r)||(YT.add(r),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function fh(n,r,u,p){Jt=n;var b=0;do{if(Vp&&(mc=null),yA=0,Vp=!1,b>=YP)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(b+=1,bA=!1,tr=ii=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}gc=-1,be.H=ZT,y=YS(r,u,p)}while(Vp);return y}function sg(){var n=be.H,r=n.useState()[0];return r=typeof r.then=="function"?mo(r):r,n=n.useState()[0],(ii!==null?ii.memoizedState:null)!==n&&(Jt.flags|=1024),r}function hh(){var n=oy!==0;return oy=0,n}function ph(n,r,u){r.updateQueue=n.updateQueue,r.flags=(r.mode&16)!==Wt?r.flags&-402655237:r.flags&-2053,n.lanes&=~u}function Ad(n){if(ay){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}ay=!1}pc=0,to=tr=ii=Jt=null,gc=-1,Me=null,Vp=!1,yA=oy=0,mc=null}function dr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tr===null?Jt.memoizedState=tr=n:tr=tr.next=n,tr}function Fn(){if(ii===null){var n=Jt.alternate;n=n!==null?n.memoizedState:null}else n=ii.next;var r=tr===null?Jt.memoizedState:tr.next;if(r!==null)tr=r,ii=n;else{if(n===null)throw Jt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ii=n,n={memoizedState:ii.memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},tr===null?Jt.memoizedState=tr=n:tr=tr.next=n}return tr}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mo(n){var r=yA;return yA+=1,mc===null&&(mc=Zm()),n=nh(mc,n,r),r=Jt,(tr===null?r.memoizedState:tr.next)===null&&(r=r.alternate,be.H=r!==null&&r.memoizedState!==null?iM:nM),n}function Bn(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return mo(n);if(n.$$typeof===wi)return je(n)}throw Error("An unsupported type was passed to use(): "+String(n))}function Ol(n){var r=null,u=Jt.updateQueue;if(u!==null&&(r=u.memoCache),r==null){var p=Jt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(r={data:p.data.map(function(b){return b.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),u===null&&(u=Fl(),Jt.updateQueue=u),u.memoCache=r,u=r.data[r.index],u===void 0||bA)for(u=r.data[r.index]=Array(n),p=0;p<n;p++)u[p]=F0;else u.length!==n&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",u.length,n);return r.index++,u}function la(n,r){return typeof r=="function"?r(n):r}function mh(n,r,u){var p=dr();if(u!==void 0){var b=u(r);if(ff){nt(!0);try{u(r)}finally{nt(!1)}}}else b=r;return p.memoizedState=p.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},p.queue=n,n=n.dispatch=Wv.bind(null,Jt,n),[p.memoizedState,n]}function Na(n){var r=Fn();return za(r,ii,n)}function za(n,r,u){var p=n.queue;if(p===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");p.lastRenderedReducer=u;var b=n.baseQueue,y=p.pending;if(y!==null){if(b!==null){var P=b.next;b.next=y.next,y.next=P}r.baseQueue!==b&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),r.baseQueue=b=y,p.pending=null}if(y=n.baseState,b===null)n.memoizedState=y;else{r=b.next;var N=P=null,q=null,se=r,Se=!1;do{var Ee=se.lane&-536870913;if(Ee!==se.lane?(cn&Ee)===Ee:(pc&Ee)===Ee){var ze=se.revertLane;if(ze===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),Ee===of&&(Se=!0);else if((pc&ze)===ze){se=se.next,ze===of&&(Se=!0);continue}else Ee={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},q===null?(N=q=Ee,P=y):q=q.next=Ee,Jt.lanes|=ze,Cu|=ze;Ee=se.action,ff&&u(y,Ee),y=se.hasEagerState?se.eagerState:u(y,Ee)}else ze={lane:Ee,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},q===null?(N=q=ze,P=y):q=q.next=ze,Jt.lanes|=Ee,Cu|=Ee;se=se.next}while(se!==null&&se!==r);if(q===null?P=y:q.next=N,!ms(y,n.memoizedState)&&(nr=!0,Se&&(u=Ip,u!==null)))throw u;n.memoizedState=y,n.baseState=P,n.baseQueue=q,p.lastRenderedState=y}return b===null&&(p.lanes=0),[n.memoizedState,p.dispatch]}function Gc(n){var r=Fn(),u=r.queue;if(u===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");u.lastRenderedReducer=n;var p=u.dispatch,b=u.pending,y=r.memoizedState;if(b!==null){u.pending=null;var P=b=b.next;do y=n(y,P.action),P=P.next;while(P!==b);ms(y,r.memoizedState)||(nr=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),u.lastRenderedState=y}return[y,p]}function gh(n,r,u){var p=Jt,b=dr();if(Sn){if(u===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var y=u();Op||y===u()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Op=!0)}else{if(y=r(),Op||(u=r(),ms(y,u)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Op=!0)),ri===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(cn&127)!==0||ca(p,r,y)}return b.memoizedState=y,u={value:y,getSnapshot:r},b.queue=u,qr(Ah.bind(null,p,u,n),[n]),p.flags|=2048,Ns(eo|vs,{destroy:void 0},ag.bind(null,p,u,y,r),null),y}function $o(n,r,u){var p=Jt,b=Fn(),y=Sn;if(y){if(u===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");u=u()}else if(u=r(),!Op){var P=r();ms(u,P)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Op=!0)}(P=!ms((ii||b).memoizedState,u))&&(b.memoizedState=u,nr=!0),b=b.queue;var N=Ah.bind(null,p,b,n);if(Sr(2048,vs,N,[n]),b.getSnapshot!==r||P||tr!==null&&tr.memoizedState.tag&eo){if(p.flags|=2048,Ns(eo|vs,{destroy:void 0},ag.bind(null,p,b,u,r),null),ri===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");y||(pc&127)!==0||ca(p,r,u)}return u}function ca(n,r,u){n.flags|=16384,n={getSnapshot:r,value:u},r=Jt.updateQueue,r===null?(r=Fl(),Jt.updateQueue=r,r.stores=[n]):(u=r.stores,u===null?r.stores=[n]:u.push(n))}function ag(n,r,u,p){r.value=u,r.getSnapshot=p,og(r)&&vh(n)}function Ah(n,r,u){return u(function(){og(r)&&(Ki(2,"updateSyncExternalStore()",n),vh(n))})}function og(n){var r=n.getSnapshot;n=n.value;try{var u=r();return!ms(n,u)}catch{return!0}}function vh(n){var r=br(n,2);r!==null&&ai(r,n,2)}function vd(n){var r=dr();if(typeof n=="function"){var u=n;if(n=u(),ff){nt(!0);try{u()}finally{nt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:n},r}function Wc(n){n=vd(n);var r=n.queue,u=pg.bind(null,Jt,r);return r.dispatch=u,[n.memoizedState,u]}function yh(n){var r=dr();r.memoizedState=r.baseState=n;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=u,r=qc.bind(null,Jt,!0,u),u.dispatch=r,[n,r]}function lg(n,r){var u=Fn();return Bv(u,ii,n,r)}function Bv(n,r,u,p){return n.baseState=u,za(n,ii,typeof p=="function"?p:la)}function cg(n,r){var u=Fn();return ii!==null?Bv(u,ii,n,r):(u.baseState=n,[n,u.queue.dispatch])}function Uv(n,r,u,p,b){if(Yc(n))throw Error("Cannot update form state while rendering.");if(n=r.action,n!==null){var y={payload:b,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){y.listeners.push(P)}};be.T!==null?u(!0):y.isTransition=!1,p(y),u=r.pending,u===null?(y.next=r.pending=y,Ls(r,y)):(y.next=u.next,r.pending=u.next=y)}}function Ls(n,r){var u=r.action,p=r.payload,b=n.state;if(r.isTransition){var y=be.T,P={};P._updatedFibers=new Set,be.T=P;try{var N=u(b,p),q=be.S;q!==null&&q(P,N),bh(n,r,N)}catch(se){xh(n,r,se)}finally{y!==null&&P.types!==null&&(y.types!==null&&y.types!==P.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),y.types=P.types),be.T=y,y===null&&P._updatedFibers&&(n=P._updatedFibers.size,P._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{P=u(b,p),bh(n,r,P)}catch(se){xh(n,r,se)}}function bh(n,r,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?(be.asyncTransitions++,u.then(Md,Md),u.then(function(p){ug(n,r,p)},function(p){return xh(n,r,p)}),r.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):ug(n,r,u)}function ug(n,r,u){r.status="fulfilled",r.value=u,Fv(r),n.state=u,r=n.pending,r!==null&&(u=r.next,u===r?n.pending=null:(u=u.next,r.next=u,Ls(n,u)))}function xh(n,r,u){var p=n.pending;if(n.pending=null,p!==null){p=p.next;do r.status="rejected",r.reason=u,Fv(r),r=r.next;while(r!==p)}n.action=null}function Fv(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function yd(n,r){return r}function Si(n,r){if(Sn){var u=ri.formState;if(u!==null){e:{var p=Jt;if(Sn){if(yi){var b=_r(yi,Ka);if(b){yi=hl(b),p=va(b);break e}}oe(p)}p=!1}p&&(r=u[0])}}u=dr(),u.memoizedState=u.baseState=r,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yd,lastRenderedState:r},u.queue=p,u=pg.bind(null,Jt,p),p.dispatch=u,p=vd(!1);var y=qc.bind(null,Jt,!1,p.queue);return p=dr(),b={state:r,dispatch:null,action:n,pending:null},p.queue=b,u=Uv.bind(null,Jt,b,y,u),b.dispatch=u,p.memoizedState=n,[r,u,!1]}function bd(n){var r=Fn();return xr(r,ii,n)}function xr(n,r,u){if(r=za(n,r,yd)[0],n=Na(la)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var p=mo(r)}catch(P){throw P===Np?ny:P}else p=r;r=Fn();var b=r.queue,y=b.dispatch;return u!==r.memoizedState&&(Jt.flags|=2048,Ns(eo|vs,{destroy:void 0},Ov.bind(null,b,u),null)),[p,y,n]}function Ov(n,r){n.action=r}function Is(n){var r=Fn(),u=ii;if(u!==null)return xr(r,u,n);Fn(),r=r.memoizedState,u=Fn();var p=u.queue.dispatch;return u.memoizedState=n,[r,p,!1]}function Ns(n,r,u,p){return n={tag:n,create:u,deps:p,inst:r,next:null},r=Jt.updateQueue,r===null&&(r=Fl(),Jt.updateQueue=r),u=r.lastEffect,u===null?r.lastEffect=n.next=n:(p=u.next,u.next=n,n.next=p,r.lastEffect=n),n}function ua(n){var r=dr();return n={current:n},r.memoizedState=n}function go(n,r,u,p){var b=dr();Jt.flags|=n,b.memoizedState=Ns(eo|r,{destroy:void 0},u,p===void 0?null:p)}function Sr(n,r,u,p){var b=Fn();p=p===void 0?null:p;var y=b.memoizedState.inst;ii!==null&&p!==null&&dh(p,ii.memoizedState.deps)?b.memoizedState=Ns(r,y,u,p):(Jt.flags|=n,b.memoizedState=Ns(eo|r,y,u,p))}function qr(n,r){(Jt.mode&16)!==Wt?go(276826112,vs,n,r):go(8390656,vs,n,r)}function Vv(n){Jt.flags|=4;var r=Jt.updateQueue;if(r===null)r=Fl(),Jt.updateQueue=r,r.events=[n];else{var u=r.events;u===null?r.events=[n]:u.push(n)}}function el(n){var r=dr(),u={impl:n};return r.memoizedState=u,function(){if((Mn&Rr)!==Cr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return u.impl.apply(void 0,arguments)}}function tl(n){var r=Fn().memoizedState;return Vv({ref:r,nextImpl:n}),function(){if((Mn&Rr)!==Cr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return r.impl.apply(void 0,arguments)}}function Ao(n,r){var u=4194308;return(Jt.mode&16)!==Wt&&(u|=134217728),go(u,xa,n,r)}function dg(n,r){if(typeof r=="function"){n=n();var u=r(n);return function(){typeof u=="function"?u():r(null)}}if(r!=null)return r.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(r).join(", ")+"}"),n=n(),r.current=n,function(){r.current=null}}function Sh(n,r,u){typeof r!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",r!==null?typeof r:"null"),u=u!=null?u.concat([n]):null;var p=4194308;(Jt.mode&16)!==Wt&&(p|=134217728),go(p,xa,dg.bind(null,r,n),u)}function nl(n,r,u){typeof r!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",r!==null?typeof r:"null"),u=u!=null?u.concat([n]):null,Sr(4,xa,dg.bind(null,r,n),u)}function Mh(n,r){return dr().memoizedState=[n,r===void 0?null:r],n}function Vl(n,r){var u=Fn();r=r===void 0?null:r;var p=u.memoizedState;return r!==null&&dh(r,p[1])?p[0]:(u.memoizedState=[n,r],n)}function wh(n,r){var u=dr();r=r===void 0?null:r;var p=n();if(ff){nt(!0);try{n()}finally{nt(!1)}}return u.memoizedState=[p,r],p}function jc(n,r){var u=Fn();r=r===void 0?null:r;var p=u.memoizedState;if(r!==null&&dh(r,p[1]))return p[0];if(p=n(),ff){nt(!0);try{n()}finally{nt(!1)}}return u.memoizedState=[p,r],p}function xd(n,r){var u=dr();return Sd(u,n,r)}function Th(n,r){var u=Fn();return Yr(u,ii.memoizedState,n,r)}function fg(n,r){var u=Fn();return ii===null?Sd(u,n,r):Yr(u,ii.memoizedState,n,r)}function Sd(n,r,u){return u===void 0||(pc&1073741824)!==0&&(cn&261930)===0?n.memoizedState=r:(n.memoizedState=u,n=h0(),Jt.lanes|=n,Cu|=n,u)}function Yr(n,r,u,p){return ms(u,r)?u:Up.current!==null?(n=Sd(n,u,p),ms(n,r)||(nr=!0),n):(pc&42)===0||(pc&1073741824)!==0&&(cn&261930)===0?(nr=!0,n.memoizedState=u):(n=h0(),Jt.lanes|=n,Cu|=n,r)}function Md(){be.asyncTransitions--}function Nr(n,r,u,p,b){var y=Kr();Ti(y!==0&&8>y?y:8);var P=be.T,N={};N._updatedFibers=new Set,be.T=N,qc(n,!1,r,u);try{var q=b(),se=be.S;if(se!==null&&se(N,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){be.asyncTransitions++,q.then(Md,Md);var Se=Qm(q,p);Xc(n,r,Se,ds(n))}else Xc(n,r,p,ds(n))}catch(Ee){Xc(n,r,{then:function(){},status:"rejected",reason:Ee},ds(n))}finally{Ti(y),P!==null&&N.types!==null&&(P.types!==null&&P.types!==N.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),P.types=N.types),be.T=P,P===null&&N._updatedFibers&&(n=N._updatedFibers.size,N._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function hg(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Vs,baseState:Vs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:Vs},next:null};var u={};return r.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:u},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Eh(){var n=vd(!1);return n=Nr.bind(null,Jt,n.queue,!0,!1),dr().memoizedState=n,[!1,n]}function Hv(){var n=Na(la)[0],r=Fn().memoizedState;return[typeof n=="boolean"?n:mo(n),r]}function vo(){var n=Gc(la)[0],r=Fn().memoizedState;return[typeof n=="boolean"?n:mo(n),r]}function il(){return je(Hs)}function wd(){var n=dr(),r=ri.identifierPrefix;if(Sn){var u=oc,p=ac;u=(p&~(1<<32-ji(p)-1)).toString(32)+u,r="_"+r+"R_"+u,u=oy++,0<u&&(r+="H"+u.toString(32)),r+="_"}else u=qP++,r="_"+r+"r_"+u.toString(32)+"_";return n.memoizedState=r}function rl(){return dr().memoizedState=Gv.bind(null,Jt)}function Gv(n,r){for(var u=n.return;u!==null;){switch(u.tag){case 24:case 3:var p=ds(u),b=po(p),y=Ds(u,b,p);y!==null&&(Ki(p,"refresh()",n),ai(y,u,p),Oc(y,u,p)),n=Hi(),r!=null&&y!==null&&console.error("The seed argument is not enabled outside experimental channels."),b.payload={cache:n};return}u=u.return}}function Wv(n,r,u){var p=arguments;typeof p[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),p=ds(n);var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};Yc(n)?jv(r,b):(b=sh(n,r,b,p),b!==null&&(Ki(p,"dispatch()",n),ai(b,n,p),Xv(b,r,p)))}function pg(n,r,u){var p=arguments;typeof p[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),p=ds(n),Xc(n,r,u,p)&&Ki(p,"setState()",n)}function Xc(n,r,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Yc(n))jv(r,b);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null)){var P=be.H;be.H=No;try{var N=r.lastRenderedState,q=y(N,u);if(b.hasEagerState=!0,b.eagerState=q,ms(q,N))return ud(n,r,b,0),ri===null&&Fc(),!1}catch{}finally{be.H=P}}if(u=sh(n,r,b,p),u!==null)return ai(u,n,p),Xv(u,r,p),!0}return!1}function qc(n,r,u,p){if(be.T===null&&of===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),p={lane:2,revertLane:$f(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yc(n)){if(r)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else r=sh(n,u,p,2),r!==null&&(Ki(2,"setOptimistic()",n),ai(r,n,2))}function Yc(n){var r=n.alternate;return n===Jt||r!==null&&r===Jt}function jv(n,r){Vp=ay=!0;var u=n.pending;u===null?r.next=r:(r.next=u.next,u.next=r),n.pending=r}function Xv(n,r,u){if((u&4194048)!==0){var p=r.lanes;p&=n.pendingLanes,u|=p,r.lanes=u,ht(n,u)}}function mg(n){if(n!==null&&typeof n!="function"){var r=String(n);oE.has(r)||(oE.add(r),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",n))}}function Ch(n,r,u,p){var b=n.memoizedState,y=u(p,b);if(n.mode&8){nt(!0);try{y=u(p,b)}finally{nt(!1)}}y===void 0&&(r=F(r)||"Component",iE.has(r)||(iE.add(r),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",r))),b=y==null?b:Wn({},b,y),n.memoizedState=b,n.lanes===0&&(n.updateQueue.baseState=b)}function gg(n,r,u,p,b,y,P){var N=n.stateNode;if(typeof N.shouldComponentUpdate=="function"){if(u=N.shouldComponentUpdate(p,y,P),n.mode&8){nt(!0);try{u=N.shouldComponentUpdate(p,y,P)}finally{nt(!1)}}return u===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",F(r)||"Component"),u}return r.prototype&&r.prototype.isPureReactComponent?!ad(u,p)||!ad(b,y):!0}function Hl(n,r,u,p){var b=r.state;typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(u,p),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(u,p),r.state!==b&&(n=V(n)||"Component",_T.has(n)||(_T.add(n),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",n)),rM.enqueueReplaceState(r,r.state,null))}function Ba(n,r){var u=r;if("ref"in r){u={};for(var p in r)p!=="ref"&&(u[p]=r[p])}if(n=n.defaultProps){u===r&&(u=Wn({},u));for(var b in n)u[b]===void 0&&(u[b]=n[b])}return u}function Td(n,r){try{Hp=r.source?V(r.source):null,sM=null;var u=r.value;if(be.actQueue!==null)be.thrownErrors.push(u);else{var p=n.onUncaughtError;p(u,{componentStack:r.stack})}}catch(b){setTimeout(function(){throw b})}}function Ag(n,r,u){try{Hp=u.source?V(u.source):null,sM=V(r);var p=n.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Rh(n,r,u){return u=po(u),u.tag=_S,u.payload={element:null},u.callback=function(){xt(r.source,Td,n,r)},u}function Ph(n){return n=po(n),n.tag=_S,n}function kh(n,r,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var y=p.value;n.payload=function(){return b(y)},n.callback=function(){I0(u),xt(p.source,Ag,r,u,p)}}var P=u.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(n.callback=function(){I0(u),xt(p.source,Ag,r,u,p),typeof b!="function"&&(Pu===null?Pu=new Set([this]):Pu.add(this)),GP(this,p),typeof b=="function"||(u.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",V(u)||"Unknown")})}function qv(n,r,u,p,b){if(u.flags|=32768,yl&&$c(n,b),p!==null&&typeof p=="object"&&typeof p.then=="function"){if(r=u.alternate,r!==null&&Ht(r,u,b,!0),Sn&&(xl=!0),u=ba.current,u!==null){switch(u.tag){case 31:case 13:return Io===null?Yh():u.alternate===null&&xi===vc&&(xi=gy),u.flags&=-257,u.flags|=65536,u.lanes=b,p===iy?u.flags|=16384:(r=u.updateQueue,r===null?u.updateQueue=new Set([p]):r.add(p),Vg(n,p,b)),!1;case 22:return u.flags|=65536,p===iy?u.flags|=16384:(r=u.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=r):(u=r.retryQueue,u===null?r.retryQueue=new Set([p]):u.add(p)),Vg(n,p,b)),!1}throw Error("Unexpected Suspense handler tag ("+u.tag+"). This is a bug in React.")}return Vg(n,p,b),Yh(),!1}if(Sn)return xl=!0,r=ba.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=b,p!==BS&&St(mt(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:p}),u))):(p!==BS&&St(mt(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:p}),u)),n=n.current.alternate,n.flags|=65536,b&=-b,n.lanes|=b,p=mt(p,u),b=Rh(n.stateNode,p,b),Ul(n,b),xi!==Tu&&(xi=hf)),!1;var y=mt(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:p}),u);if(EA===null?EA=[y]:EA.push(y),xi!==Tu&&(xi=hf),r===null)return!0;p=mt(p,u),u=r;do{switch(u.tag){case 3:return u.flags|=65536,n=b&-b,u.lanes|=n,n=Rh(u.stateNode,p,n),Ul(u,n),!1;case 1:if(r=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Pu===null||!Pu.has(y))))return u.flags|=65536,b&=-b,u.lanes|=b,b=Ph(b),kh(b,n,u,p),Ul(u,b),!1}u=u.return}while(u!==null);return!1}function Mi(n,r,u,p){r.child=n===null?HT(r,null,u,p):df(r,n.child,u,p)}function vg(n,r,u,p,b){u=u.render;var y=r.ref;if("ref"in p){var P={};for(var N in p)N!=="ref"&&(P[N]=p[N])}else P=p;return Qn(r),p=cs(n,r,u,P,y,b),N=hh(),n!==null&&!nr?(ph(n,r,b),da(n,r,b)):(Sn&&N&&ae(r),r.flags|=1,Mi(n,r,p,b),r.child)}function yg(n,r,u,p,b){if(n===null){var y=u.type;return typeof y=="function"&&!Kh(y)&&y.defaultProps===void 0&&u.compare===null?(u=Jl(y),r.tag=15,r.type=u,yo(r,y),Ln(n,r,u,p,b)):(n=_h(u.type,null,p,r,r.mode,b),n.ref=r.ref,n.return=r,r.child=n)}if(y=n.child,!fn(n,b)){var P=y.memoizedProps;if(u=u.compare,u=u!==null?u:ad,u(P,p)&&n.ref===r.ref)return da(n,r,b)}return r.flags|=1,n=Mo(y,p),n.ref=r.ref,n.return=r,r.child=n}function Ln(n,r,u,p,b){if(n!==null){var y=n.memoizedProps;if(ad(y,p)&&n.ref===r.ref&&r.type===n.type)if(nr=!1,r.pendingProps=p=y,fn(n,b))(n.flags&131072)!==0&&(nr=!0);else return r.lanes=n.lanes,da(n,r,b)}return Cd(n,r,u,p,b)}function Dh(n,r,u,p){var b=p.children,y=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:AA,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,n!==null){for(p=r.child=n.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~y}else p=0,r.child=null;return bg(n,r,y,u,p)}if((u&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&sd(r,y!==null?y.cachePool:null),y!==null?rg(r,y):lh(r),uh(r);else return p=r.lanes=536870912,bg(n,r,y!==null?y.baseLanes|u:u,u,p)}else y!==null?(sd(r,y.cachePool),rg(r,y),oa(r),r.memoizedState=null):(n!==null&&sd(r,null),lh(r),oa(r));return Mi(n,r,b,u),r.child}function Ed(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:AA,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function bg(n,r,u,p,b){var y=eh();return y=y===null?null:{parent:Fr?Ri._currentValue:Ri._currentValue2,pool:y},r.memoizedState={baseLanes:u,cachePool:y},n!==null&&sd(r,null),lh(r),uh(r),n!==null&&Ht(n,r,p,!0),r.childLanes=b,null}function Lh(n,r){var u=r.hidden;return u!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
4393
|
+
Incoming: %s`,Me,"["+r.join(", ")+"]","["+n.join(", ")+"]");for(var u=0;u<r.length&&u<n.length;u++)if(!ms(n[u],r[u]))return!1;return!0}function cs(n,r,u,p,b,y){pc=y,Jt=r,to=n!==null?n._debugHookTypes:null,gc=-1,bA=n!==null&&n.type!==r.type,(Object.prototype.toString.call(u)==="[object AsyncFunction]"||Object.prototype.toString.call(u)==="[object AsyncGeneratorFunction]")&&(y=V(Jt),tM.has(y)||(tM.add(y),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",y===null?"An unknown Component":"<"+y+">"))),r.memoizedState=null,r.updateQueue=null,r.lanes=0,be.H=n!==null&&n.memoizedState!==null?iM:to!==null?QT:nM,ff=y=(r.mode&8)!==Wt;var P=YS(u,p,b);if(ff=!1,Vp&&(P=fh(r,u,p,b)),y){nt(!0);try{P=fh(r,u,p,b)}finally{nt(!1)}}return gd(n,r),P}function gd(n,r){r._debugHookTypes=to,r.dependencies===null?mc!==null&&(r.dependencies={lanes:0,firstContext:null,_debugThenableState:mc}):r.dependencies._debugThenableState=mc,be.H=xA;var u=ii!==null&&ii.next!==null;if(pc=0,to=Me=tr=ii=Jt=null,gc=-1,n!==null&&(n.flags&65011712)!==(r.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ay=!1,yA=0,mc=null,u)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");n===null||nr||(n=n.dependencies,n!==null&&Tn(n)&&(nr=!0)),mA?(mA=!1,n=!0):n=!1,n&&(r=V(r)||"Unknown",YT.has(r)||tM.has(r)||(YT.add(r),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function fh(n,r,u,p){Jt=n;var b=0;do{if(Vp&&(mc=null),yA=0,Vp=!1,b>=YP)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(b+=1,bA=!1,tr=ii=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}gc=-1,be.H=ZT,y=YS(r,u,p)}while(Vp);return y}function sg(){var n=be.H,r=n.useState()[0];return r=typeof r.then=="function"?mo(r):r,n=n.useState()[0],(ii!==null?ii.memoizedState:null)!==n&&(Jt.flags|=1024),r}function hh(){var n=oy!==0;return oy=0,n}function ph(n,r,u){r.updateQueue=n.updateQueue,r.flags=(r.mode&16)!==Wt?r.flags&-402655237:r.flags&-2053,n.lanes&=~u}function Ad(n){if(ay){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}ay=!1}pc=0,to=tr=ii=Jt=null,gc=-1,Me=null,Vp=!1,yA=oy=0,mc=null}function dr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tr===null?Jt.memoizedState=tr=n:tr=tr.next=n,tr}function Fn(){if(ii===null){var n=Jt.alternate;n=n!==null?n.memoizedState:null}else n=ii.next;var r=tr===null?Jt.memoizedState:tr.next;if(r!==null)tr=r,ii=n;else{if(n===null)throw Jt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ii=n,n={memoizedState:ii.memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},tr===null?Jt.memoizedState=tr=n:tr=tr.next=n}return tr}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mo(n){var r=yA;return yA+=1,mc===null&&(mc=Zm()),n=nh(mc,n,r),r=Jt,(tr===null?r.memoizedState:tr.next)===null&&(r=r.alternate,be.H=r!==null&&r.memoizedState!==null?iM:nM),n}function Bn(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return mo(n);if(n.$$typeof===wi)return Xe(n)}throw Error("An unsupported type was passed to use(): "+String(n))}function Ol(n){var r=null,u=Jt.updateQueue;if(u!==null&&(r=u.memoCache),r==null){var p=Jt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(r={data:p.data.map(function(b){return b.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),u===null&&(u=Fl(),Jt.updateQueue=u),u.memoCache=r,u=r.data[r.index],u===void 0||bA)for(u=r.data[r.index]=Array(n),p=0;p<n;p++)u[p]=F0;else u.length!==n&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",u.length,n);return r.index++,u}function la(n,r){return typeof r=="function"?r(n):r}function mh(n,r,u){var p=dr();if(u!==void 0){var b=u(r);if(ff){nt(!0);try{u(r)}finally{nt(!1)}}}else b=r;return p.memoizedState=p.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},p.queue=n,n=n.dispatch=Wv.bind(null,Jt,n),[p.memoizedState,n]}function Na(n){var r=Fn();return za(r,ii,n)}function za(n,r,u){var p=n.queue;if(p===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");p.lastRenderedReducer=u;var b=n.baseQueue,y=p.pending;if(y!==null){if(b!==null){var P=b.next;b.next=y.next,y.next=P}r.baseQueue!==b&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),r.baseQueue=b=y,p.pending=null}if(y=n.baseState,b===null)n.memoizedState=y;else{r=b.next;var N=P=null,q=null,se=r,Se=!1;do{var Ee=se.lane&-536870913;if(Ee!==se.lane?(cn&Ee)===Ee:(pc&Ee)===Ee){var Be=se.revertLane;if(Be===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),Ee===of&&(Se=!0);else if((pc&Be)===Be){se=se.next,Be===of&&(Se=!0);continue}else Ee={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},q===null?(N=q=Ee,P=y):q=q.next=Ee,Jt.lanes|=Be,Cu|=Be;Ee=se.action,ff&&u(y,Ee),y=se.hasEagerState?se.eagerState:u(y,Ee)}else Be={lane:Ee,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},q===null?(N=q=Be,P=y):q=q.next=Be,Jt.lanes|=Ee,Cu|=Ee;se=se.next}while(se!==null&&se!==r);if(q===null?P=y:q.next=N,!ms(y,n.memoizedState)&&(nr=!0,Se&&(u=Ip,u!==null)))throw u;n.memoizedState=y,n.baseState=P,n.baseQueue=q,p.lastRenderedState=y}return b===null&&(p.lanes=0),[n.memoizedState,p.dispatch]}function Gc(n){var r=Fn(),u=r.queue;if(u===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");u.lastRenderedReducer=n;var p=u.dispatch,b=u.pending,y=r.memoizedState;if(b!==null){u.pending=null;var P=b=b.next;do y=n(y,P.action),P=P.next;while(P!==b);ms(y,r.memoizedState)||(nr=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),u.lastRenderedState=y}return[y,p]}function gh(n,r,u){var p=Jt,b=dr();if(Sn){if(u===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var y=u();Op||y===u()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Op=!0)}else{if(y=r(),Op||(u=r(),ms(y,u)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Op=!0)),ri===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(cn&127)!==0||ca(p,r,y)}return b.memoizedState=y,u={value:y,getSnapshot:r},b.queue=u,qr(Ah.bind(null,p,u,n),[n]),p.flags|=2048,Ns(eo|vs,{destroy:void 0},ag.bind(null,p,u,y,r),null),y}function $o(n,r,u){var p=Jt,b=Fn(),y=Sn;if(y){if(u===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");u=u()}else if(u=r(),!Op){var P=r();ms(u,P)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Op=!0)}(P=!ms((ii||b).memoizedState,u))&&(b.memoizedState=u,nr=!0),b=b.queue;var N=Ah.bind(null,p,b,n);if(Sr(2048,vs,N,[n]),b.getSnapshot!==r||P||tr!==null&&tr.memoizedState.tag&eo){if(p.flags|=2048,Ns(eo|vs,{destroy:void 0},ag.bind(null,p,b,u,r),null),ri===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");y||(pc&127)!==0||ca(p,r,u)}return u}function ca(n,r,u){n.flags|=16384,n={getSnapshot:r,value:u},r=Jt.updateQueue,r===null?(r=Fl(),Jt.updateQueue=r,r.stores=[n]):(u=r.stores,u===null?r.stores=[n]:u.push(n))}function ag(n,r,u,p){r.value=u,r.getSnapshot=p,og(r)&&vh(n)}function Ah(n,r,u){return u(function(){og(r)&&(Ki(2,"updateSyncExternalStore()",n),vh(n))})}function og(n){var r=n.getSnapshot;n=n.value;try{var u=r();return!ms(n,u)}catch{return!0}}function vh(n){var r=br(n,2);r!==null&&ai(r,n,2)}function vd(n){var r=dr();if(typeof n=="function"){var u=n;if(n=u(),ff){nt(!0);try{u()}finally{nt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:n},r}function Wc(n){n=vd(n);var r=n.queue,u=pg.bind(null,Jt,r);return r.dispatch=u,[n.memoizedState,u]}function yh(n){var r=dr();r.memoizedState=r.baseState=n;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=u,r=qc.bind(null,Jt,!0,u),u.dispatch=r,[n,r]}function lg(n,r){var u=Fn();return Bv(u,ii,n,r)}function Bv(n,r,u,p){return n.baseState=u,za(n,ii,typeof p=="function"?p:la)}function cg(n,r){var u=Fn();return ii!==null?Bv(u,ii,n,r):(u.baseState=n,[n,u.queue.dispatch])}function Uv(n,r,u,p,b){if(Yc(n))throw Error("Cannot update form state while rendering.");if(n=r.action,n!==null){var y={payload:b,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){y.listeners.push(P)}};be.T!==null?u(!0):y.isTransition=!1,p(y),u=r.pending,u===null?(y.next=r.pending=y,Ls(r,y)):(y.next=u.next,r.pending=u.next=y)}}function Ls(n,r){var u=r.action,p=r.payload,b=n.state;if(r.isTransition){var y=be.T,P={};P._updatedFibers=new Set,be.T=P;try{var N=u(b,p),q=be.S;q!==null&&q(P,N),bh(n,r,N)}catch(se){xh(n,r,se)}finally{y!==null&&P.types!==null&&(y.types!==null&&y.types!==P.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),y.types=P.types),be.T=y,y===null&&P._updatedFibers&&(n=P._updatedFibers.size,P._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{P=u(b,p),bh(n,r,P)}catch(se){xh(n,r,se)}}function bh(n,r,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?(be.asyncTransitions++,u.then(Md,Md),u.then(function(p){ug(n,r,p)},function(p){return xh(n,r,p)}),r.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):ug(n,r,u)}function ug(n,r,u){r.status="fulfilled",r.value=u,Fv(r),n.state=u,r=n.pending,r!==null&&(u=r.next,u===r?n.pending=null:(u=u.next,r.next=u,Ls(n,u)))}function xh(n,r,u){var p=n.pending;if(n.pending=null,p!==null){p=p.next;do r.status="rejected",r.reason=u,Fv(r),r=r.next;while(r!==p)}n.action=null}function Fv(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function yd(n,r){return r}function Si(n,r){if(Sn){var u=ri.formState;if(u!==null){e:{var p=Jt;if(Sn){if(yi){var b=_r(yi,Ka);if(b){yi=hl(b),p=va(b);break e}}oe(p)}p=!1}p&&(r=u[0])}}u=dr(),u.memoizedState=u.baseState=r,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yd,lastRenderedState:r},u.queue=p,u=pg.bind(null,Jt,p),p.dispatch=u,p=vd(!1);var y=qc.bind(null,Jt,!1,p.queue);return p=dr(),b={state:r,dispatch:null,action:n,pending:null},p.queue=b,u=Uv.bind(null,Jt,b,y,u),b.dispatch=u,p.memoizedState=n,[r,u,!1]}function bd(n){var r=Fn();return xr(r,ii,n)}function xr(n,r,u){if(r=za(n,r,yd)[0],n=Na(la)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var p=mo(r)}catch(P){throw P===Np?ny:P}else p=r;r=Fn();var b=r.queue,y=b.dispatch;return u!==r.memoizedState&&(Jt.flags|=2048,Ns(eo|vs,{destroy:void 0},Ov.bind(null,b,u),null)),[p,y,n]}function Ov(n,r){n.action=r}function Is(n){var r=Fn(),u=ii;if(u!==null)return xr(r,u,n);Fn(),r=r.memoizedState,u=Fn();var p=u.queue.dispatch;return u.memoizedState=n,[r,p,!1]}function Ns(n,r,u,p){return n={tag:n,create:u,deps:p,inst:r,next:null},r=Jt.updateQueue,r===null&&(r=Fl(),Jt.updateQueue=r),u=r.lastEffect,u===null?r.lastEffect=n.next=n:(p=u.next,u.next=n,n.next=p,r.lastEffect=n),n}function ua(n){var r=dr();return n={current:n},r.memoizedState=n}function go(n,r,u,p){var b=dr();Jt.flags|=n,b.memoizedState=Ns(eo|r,{destroy:void 0},u,p===void 0?null:p)}function Sr(n,r,u,p){var b=Fn();p=p===void 0?null:p;var y=b.memoizedState.inst;ii!==null&&p!==null&&dh(p,ii.memoizedState.deps)?b.memoizedState=Ns(r,y,u,p):(Jt.flags|=n,b.memoizedState=Ns(eo|r,y,u,p))}function qr(n,r){(Jt.mode&16)!==Wt?go(276826112,vs,n,r):go(8390656,vs,n,r)}function Vv(n){Jt.flags|=4;var r=Jt.updateQueue;if(r===null)r=Fl(),Jt.updateQueue=r,r.events=[n];else{var u=r.events;u===null?r.events=[n]:u.push(n)}}function el(n){var r=dr(),u={impl:n};return r.memoizedState=u,function(){if((Mn&Rr)!==Cr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return u.impl.apply(void 0,arguments)}}function tl(n){var r=Fn().memoizedState;return Vv({ref:r,nextImpl:n}),function(){if((Mn&Rr)!==Cr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return r.impl.apply(void 0,arguments)}}function Ao(n,r){var u=4194308;return(Jt.mode&16)!==Wt&&(u|=134217728),go(u,xa,n,r)}function dg(n,r){if(typeof r=="function"){n=n();var u=r(n);return function(){typeof u=="function"?u():r(null)}}if(r!=null)return r.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(r).join(", ")+"}"),n=n(),r.current=n,function(){r.current=null}}function Sh(n,r,u){typeof r!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",r!==null?typeof r:"null"),u=u!=null?u.concat([n]):null;var p=4194308;(Jt.mode&16)!==Wt&&(p|=134217728),go(p,xa,dg.bind(null,r,n),u)}function nl(n,r,u){typeof r!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",r!==null?typeof r:"null"),u=u!=null?u.concat([n]):null,Sr(4,xa,dg.bind(null,r,n),u)}function Mh(n,r){return dr().memoizedState=[n,r===void 0?null:r],n}function Vl(n,r){var u=Fn();r=r===void 0?null:r;var p=u.memoizedState;return r!==null&&dh(r,p[1])?p[0]:(u.memoizedState=[n,r],n)}function wh(n,r){var u=dr();r=r===void 0?null:r;var p=n();if(ff){nt(!0);try{n()}finally{nt(!1)}}return u.memoizedState=[p,r],p}function jc(n,r){var u=Fn();r=r===void 0?null:r;var p=u.memoizedState;if(r!==null&&dh(r,p[1]))return p[0];if(p=n(),ff){nt(!0);try{n()}finally{nt(!1)}}return u.memoizedState=[p,r],p}function xd(n,r){var u=dr();return Sd(u,n,r)}function Th(n,r){var u=Fn();return Yr(u,ii.memoizedState,n,r)}function fg(n,r){var u=Fn();return ii===null?Sd(u,n,r):Yr(u,ii.memoizedState,n,r)}function Sd(n,r,u){return u===void 0||(pc&1073741824)!==0&&(cn&261930)===0?n.memoizedState=r:(n.memoizedState=u,n=h0(),Jt.lanes|=n,Cu|=n,u)}function Yr(n,r,u,p){return ms(u,r)?u:Up.current!==null?(n=Sd(n,u,p),ms(n,r)||(nr=!0),n):(pc&42)===0||(pc&1073741824)!==0&&(cn&261930)===0?(nr=!0,n.memoizedState=u):(n=h0(),Jt.lanes|=n,Cu|=n,r)}function Md(){be.asyncTransitions--}function Nr(n,r,u,p,b){var y=Kr();Ti(y!==0&&8>y?y:8);var P=be.T,N={};N._updatedFibers=new Set,be.T=N,qc(n,!1,r,u);try{var q=b(),se=be.S;if(se!==null&&se(N,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){be.asyncTransitions++,q.then(Md,Md);var Se=Qm(q,p);Xc(n,r,Se,ds(n))}else Xc(n,r,p,ds(n))}catch(Ee){Xc(n,r,{then:function(){},status:"rejected",reason:Ee},ds(n))}finally{Ti(y),P!==null&&N.types!==null&&(P.types!==null&&P.types!==N.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),P.types=N.types),be.T=P,P===null&&N._updatedFibers&&(n=N._updatedFibers.size,N._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function hg(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Vs,baseState:Vs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:Vs},next:null};var u={};return r.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:u},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Eh(){var n=vd(!1);return n=Nr.bind(null,Jt,n.queue,!0,!1),dr().memoizedState=n,[!1,n]}function Hv(){var n=Na(la)[0],r=Fn().memoizedState;return[typeof n=="boolean"?n:mo(n),r]}function vo(){var n=Gc(la)[0],r=Fn().memoizedState;return[typeof n=="boolean"?n:mo(n),r]}function il(){return Xe(Hs)}function wd(){var n=dr(),r=ri.identifierPrefix;if(Sn){var u=oc,p=ac;u=(p&~(1<<32-ji(p)-1)).toString(32)+u,r="_"+r+"R_"+u,u=oy++,0<u&&(r+="H"+u.toString(32)),r+="_"}else u=qP++,r="_"+r+"r_"+u.toString(32)+"_";return n.memoizedState=r}function rl(){return dr().memoizedState=Gv.bind(null,Jt)}function Gv(n,r){for(var u=n.return;u!==null;){switch(u.tag){case 24:case 3:var p=ds(u),b=po(p),y=Ds(u,b,p);y!==null&&(Ki(p,"refresh()",n),ai(y,u,p),Oc(y,u,p)),n=Hi(),r!=null&&y!==null&&console.error("The seed argument is not enabled outside experimental channels."),b.payload={cache:n};return}u=u.return}}function Wv(n,r,u){var p=arguments;typeof p[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),p=ds(n);var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};Yc(n)?jv(r,b):(b=sh(n,r,b,p),b!==null&&(Ki(p,"dispatch()",n),ai(b,n,p),Xv(b,r,p)))}function pg(n,r,u){var p=arguments;typeof p[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),p=ds(n),Xc(n,r,u,p)&&Ki(p,"setState()",n)}function Xc(n,r,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Yc(n))jv(r,b);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null)){var P=be.H;be.H=No;try{var N=r.lastRenderedState,q=y(N,u);if(b.hasEagerState=!0,b.eagerState=q,ms(q,N))return ud(n,r,b,0),ri===null&&Fc(),!1}catch{}finally{be.H=P}}if(u=sh(n,r,b,p),u!==null)return ai(u,n,p),Xv(u,r,p),!0}return!1}function qc(n,r,u,p){if(be.T===null&&of===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),p={lane:2,revertLane:$f(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yc(n)){if(r)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else r=sh(n,u,p,2),r!==null&&(Ki(2,"setOptimistic()",n),ai(r,n,2))}function Yc(n){var r=n.alternate;return n===Jt||r!==null&&r===Jt}function jv(n,r){Vp=ay=!0;var u=n.pending;u===null?r.next=r:(r.next=u.next,u.next=r),n.pending=r}function Xv(n,r,u){if((u&4194048)!==0){var p=r.lanes;p&=n.pendingLanes,u|=p,r.lanes=u,lt(n,u)}}function mg(n){if(n!==null&&typeof n!="function"){var r=String(n);oE.has(r)||(oE.add(r),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",n))}}function Ch(n,r,u,p){var b=n.memoizedState,y=u(p,b);if(n.mode&8){nt(!0);try{y=u(p,b)}finally{nt(!1)}}y===void 0&&(r=F(r)||"Component",iE.has(r)||(iE.add(r),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",r))),b=y==null?b:Wn({},b,y),n.memoizedState=b,n.lanes===0&&(n.updateQueue.baseState=b)}function gg(n,r,u,p,b,y,P){var N=n.stateNode;if(typeof N.shouldComponentUpdate=="function"){if(u=N.shouldComponentUpdate(p,y,P),n.mode&8){nt(!0);try{u=N.shouldComponentUpdate(p,y,P)}finally{nt(!1)}}return u===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",F(r)||"Component"),u}return r.prototype&&r.prototype.isPureReactComponent?!ad(u,p)||!ad(b,y):!0}function Hl(n,r,u,p){var b=r.state;typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(u,p),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(u,p),r.state!==b&&(n=V(n)||"Component",_T.has(n)||(_T.add(n),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",n)),rM.enqueueReplaceState(r,r.state,null))}function Ba(n,r){var u=r;if("ref"in r){u={};for(var p in r)p!=="ref"&&(u[p]=r[p])}if(n=n.defaultProps){u===r&&(u=Wn({},u));for(var b in n)u[b]===void 0&&(u[b]=n[b])}return u}function Td(n,r){try{Hp=r.source?V(r.source):null,sM=null;var u=r.value;if(be.actQueue!==null)be.thrownErrors.push(u);else{var p=n.onUncaughtError;p(u,{componentStack:r.stack})}}catch(b){setTimeout(function(){throw b})}}function Ag(n,r,u){try{Hp=u.source?V(u.source):null,sM=V(r);var p=n.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Rh(n,r,u){return u=po(u),u.tag=_S,u.payload={element:null},u.callback=function(){xt(r.source,Td,n,r)},u}function Ph(n){return n=po(n),n.tag=_S,n}function kh(n,r,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var y=p.value;n.payload=function(){return b(y)},n.callback=function(){I0(u),xt(p.source,Ag,r,u,p)}}var P=u.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(n.callback=function(){I0(u),xt(p.source,Ag,r,u,p),typeof b!="function"&&(Pu===null?Pu=new Set([this]):Pu.add(this)),GP(this,p),typeof b=="function"||(u.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",V(u)||"Unknown")})}function qv(n,r,u,p,b){if(u.flags|=32768,yl&&$c(n,b),p!==null&&typeof p=="object"&&typeof p.then=="function"){if(r=u.alternate,r!==null&&Ht(r,u,b,!0),Sn&&(xl=!0),u=ba.current,u!==null){switch(u.tag){case 31:case 13:return Io===null?Yh():u.alternate===null&&xi===vc&&(xi=gy),u.flags&=-257,u.flags|=65536,u.lanes=b,p===iy?u.flags|=16384:(r=u.updateQueue,r===null?u.updateQueue=new Set([p]):r.add(p),Vg(n,p,b)),!1;case 22:return u.flags|=65536,p===iy?u.flags|=16384:(r=u.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=r):(u=r.retryQueue,u===null?r.retryQueue=new Set([p]):u.add(p)),Vg(n,p,b)),!1}throw Error("Unexpected Suspense handler tag ("+u.tag+"). This is a bug in React.")}return Vg(n,p,b),Yh(),!1}if(Sn)return xl=!0,r=ba.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=b,p!==BS&&St(mt(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:p}),u))):(p!==BS&&St(mt(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:p}),u)),n=n.current.alternate,n.flags|=65536,b&=-b,n.lanes|=b,p=mt(p,u),b=Rh(n.stateNode,p,b),Ul(n,b),xi!==Tu&&(xi=hf)),!1;var y=mt(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:p}),u);if(EA===null?EA=[y]:EA.push(y),xi!==Tu&&(xi=hf),r===null)return!0;p=mt(p,u),u=r;do{switch(u.tag){case 3:return u.flags|=65536,n=b&-b,u.lanes|=n,n=Rh(u.stateNode,p,n),Ul(u,n),!1;case 1:if(r=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Pu===null||!Pu.has(y))))return u.flags|=65536,b&=-b,u.lanes|=b,b=Ph(b),kh(b,n,u,p),Ul(u,b),!1}u=u.return}while(u!==null);return!1}function Mi(n,r,u,p){r.child=n===null?HT(r,null,u,p):df(r,n.child,u,p)}function vg(n,r,u,p,b){u=u.render;var y=r.ref;if("ref"in p){var P={};for(var N in p)N!=="ref"&&(P[N]=p[N])}else P=p;return Qn(r),p=cs(n,r,u,P,y,b),N=hh(),n!==null&&!nr?(ph(n,r,b),da(n,r,b)):(Sn&&N&&ae(r),r.flags|=1,Mi(n,r,p,b),r.child)}function yg(n,r,u,p,b){if(n===null){var y=u.type;return typeof y=="function"&&!Kh(y)&&y.defaultProps===void 0&&u.compare===null?(u=Jl(y),r.tag=15,r.type=u,yo(r,y),Ln(n,r,u,p,b)):(n=_h(u.type,null,p,r,r.mode,b),n.ref=r.ref,n.return=r,r.child=n)}if(y=n.child,!fn(n,b)){var P=y.memoizedProps;if(u=u.compare,u=u!==null?u:ad,u(P,p)&&n.ref===r.ref)return da(n,r,b)}return r.flags|=1,n=Mo(y,p),n.ref=r.ref,n.return=r,r.child=n}function Ln(n,r,u,p,b){if(n!==null){var y=n.memoizedProps;if(ad(y,p)&&n.ref===r.ref&&r.type===n.type)if(nr=!1,r.pendingProps=p=y,fn(n,b))(n.flags&131072)!==0&&(nr=!0);else return r.lanes=n.lanes,da(n,r,b)}return Cd(n,r,u,p,b)}function Dh(n,r,u,p){var b=p.children,y=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:AA,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,n!==null){for(p=r.child=n.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~y}else p=0,r.child=null;return bg(n,r,y,u,p)}if((u&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&sd(r,y!==null?y.cachePool:null),y!==null?rg(r,y):lh(r),uh(r);else return p=r.lanes=536870912,bg(n,r,y!==null?y.baseLanes|u:u,u,p)}else y!==null?(sd(r,y.cachePool),rg(r,y),oa(r),r.memoizedState=null):(n!==null&&sd(r,null),lh(r),oa(r));return Mi(n,r,b,u),r.child}function Ed(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:AA,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function bg(n,r,u,p,b){var y=eh();return y=y===null?null:{parent:Fr?Ri._currentValue:Ri._currentValue2,pool:y},r.memoizedState={baseLanes:u,cachePool:y},n!==null&&sd(r,null),lh(r),uh(r),n!==null&&Ht(n,r,p,!0),r.childLanes=b,null}function Lh(n,r){var u=r.hidden;return u!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
4394
4394
|
- <Activity %s>
|
|
4395
|
-
+ <Activity %s>`,u===!0?"hidden":u===!1?"hidden={false}":"hidden={...}",u?'mode="hidden"':'mode="visible"'),r=kd({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Yv(n,r,u){return df(r,n.child,null,u),n=Lh(r,r.pendingProps),n.flags|=2,Ir(r),r.memoizedState=null,n}function fS(n,r,u){var p=r.pendingProps,b=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Sn){if(p.mode==="hidden")return n=Lh(r,p),r.lanes=536870912,Ed(null,n);if(ch(r),(n=yi)?(u=An(n,Ka),u!==null&&(p={dehydrated:u,treeContext:Le(),retryLane:536870912,hydrationErrors:null},r.memoizedState=p,p=Ql(u),p.return=r,r.child=p,Or=r,yi=null)):u=null,u===null)throw G(r,n),oe(r);return r.lanes=536870912,null}return Lh(r,p)}var y=n.memoizedState;if(y!==null){var P=y.dehydrated;if(ch(r),b)if(r.flags&256)r.flags&=-257,r=Yv(n,r,u);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(ta(),(u&536870912)!==0&&qh(r),nr||Ht(n,r,u,!1),b=(u&n.childLanes)!==0,nr||b){if(p=ri,p!==null&&(P=ct(p,u),P!==0&&P!==y.retryLane))throw y.retryLane=P,br(n,P),ai(p,n,P),aM;Yh(),r=Yv(n,r,u)}else n=y.treeContext,Tr&&(yi=vp(P),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!1,n!==null&&it(r,n)),r=Lh(r,p),r.flags|=4096;return r}return y=n.child,p={mode:p.mode,children:p.children},(u&536870912)!==0&&(u&n.lanes)!==0&&qh(r),n=Mo(y,p),n.ref=r.ref,r.child=n,n.return=r,n}function Ih(n,r){var u=r.ref;if(u===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(n===null||n.ref!==u)&&(r.flags|=4194816)}}function Cd(n,r,u,p,b){if(u.prototype&&typeof u.prototype.render=="function"){var y=F(u)||"Unknown";lE[y]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",y,y),lE[y]=!0)}return r.mode&8&&Lo.recordLegacyContextWarning(r,null),n===null&&(yo(r,r.type),u.contextTypes&&(y=F(u)||"Unknown",uE[y]||(uE[y]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",y)))),Qn(r),u=cs(n,r,u,p,void 0,b),p=hh(),n!==null&&!nr?(ph(n,r,b),da(n,r,b)):(Sn&&p&&ae(r),r.flags|=1,Mi(n,r,u,b),r.child)}function Ua(n,r,u,p,b,y){return Qn(r),gc=-1,bA=n!==null&&n.type!==r.type,r.updateQueue=null,u=fh(r,p,u,b),gd(n,r),p=hh(),n!==null&&!nr?(ph(n,r,y),da(n,r,y)):(Sn&&p&&ae(r),r.flags|=1,Mi(n,r,u,y),r.child)}function xg(n,r,u,p,b){switch(m(r)){case!1:var y=r.stateNode,P=new r.type(r.memoizedProps,y.context).state;y.updater.enqueueSetState(y,P,null);break;case!0:r.flags|=128,r.flags|=65536,y=Error("Simulated error coming from DevTools");var N=b&-b;if(r.lanes|=N,P=ri,P===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");N=Ph(N),kh(N,P,r,mt(y,r)),Ul(r,N)}if(Qn(r),r.stateNode===null){if(P=ei,y=u.contextType,"contextType"in u&&y!==null&&(y===void 0||y.$$typeof!==wi)&&!aE.has(u)&&(aE.add(u),N=y===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof y!="object"?" However, it is set to a "+typeof y+".":y.$$typeof===Kl?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(y).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",F(u)||"Component",N)),typeof y=="object"&&y!==null&&(P=
|
|
4395
|
+
+ <Activity %s>`,u===!0?"hidden":u===!1?"hidden={false}":"hidden={...}",u?'mode="hidden"':'mode="visible"'),r=kd({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Yv(n,r,u){return df(r,n.child,null,u),n=Lh(r,r.pendingProps),n.flags|=2,Ir(r),r.memoizedState=null,n}function fS(n,r,u){var p=r.pendingProps,b=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Sn){if(p.mode==="hidden")return n=Lh(r,p),r.lanes=536870912,Ed(null,n);if(ch(r),(n=yi)?(u=An(n,Ka),u!==null&&(p={dehydrated:u,treeContext:Le(),retryLane:536870912,hydrationErrors:null},r.memoizedState=p,p=Ql(u),p.return=r,r.child=p,Or=r,yi=null)):u=null,u===null)throw G(r,n),oe(r);return r.lanes=536870912,null}return Lh(r,p)}var y=n.memoizedState;if(y!==null){var P=y.dehydrated;if(ch(r),b)if(r.flags&256)r.flags&=-257,r=Yv(n,r,u);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(ta(),(u&536870912)!==0&&qh(r),nr||Ht(n,r,u,!1),b=(u&n.childLanes)!==0,nr||b){if(p=ri,p!==null&&(P=ct(p,u),P!==0&&P!==y.retryLane))throw y.retryLane=P,br(n,P),ai(p,n,P),aM;Yh(),r=Yv(n,r,u)}else n=y.treeContext,Tr&&(yi=vp(P),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!1,n!==null&&it(r,n)),r=Lh(r,p),r.flags|=4096;return r}return y=n.child,p={mode:p.mode,children:p.children},(u&536870912)!==0&&(u&n.lanes)!==0&&qh(r),n=Mo(y,p),n.ref=r.ref,r.child=n,n.return=r,n}function Ih(n,r){var u=r.ref;if(u===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(n===null||n.ref!==u)&&(r.flags|=4194816)}}function Cd(n,r,u,p,b){if(u.prototype&&typeof u.prototype.render=="function"){var y=F(u)||"Unknown";lE[y]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",y,y),lE[y]=!0)}return r.mode&8&&Lo.recordLegacyContextWarning(r,null),n===null&&(yo(r,r.type),u.contextTypes&&(y=F(u)||"Unknown",uE[y]||(uE[y]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",y)))),Qn(r),u=cs(n,r,u,p,void 0,b),p=hh(),n!==null&&!nr?(ph(n,r,b),da(n,r,b)):(Sn&&p&&ae(r),r.flags|=1,Mi(n,r,u,b),r.child)}function Ua(n,r,u,p,b,y){return Qn(r),gc=-1,bA=n!==null&&n.type!==r.type,r.updateQueue=null,u=fh(r,p,u,b),gd(n,r),p=hh(),n!==null&&!nr?(ph(n,r,y),da(n,r,y)):(Sn&&p&&ae(r),r.flags|=1,Mi(n,r,u,y),r.child)}function xg(n,r,u,p,b){switch(m(r)){case!1:var y=r.stateNode,P=new r.type(r.memoizedProps,y.context).state;y.updater.enqueueSetState(y,P,null);break;case!0:r.flags|=128,r.flags|=65536,y=Error("Simulated error coming from DevTools");var N=b&-b;if(r.lanes|=N,P=ri,P===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");N=Ph(N),kh(N,P,r,mt(y,r)),Ul(r,N)}if(Qn(r),r.stateNode===null){if(P=ei,y=u.contextType,"contextType"in u&&y!==null&&(y===void 0||y.$$typeof!==wi)&&!aE.has(u)&&(aE.add(u),N=y===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof y!="object"?" However, it is set to a "+typeof y+".":y.$$typeof===Kl?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(y).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",F(u)||"Component",N)),typeof y=="object"&&y!==null&&(P=Xe(y)),y=new u(p,P),r.mode&8){nt(!0);try{y=new u(p,P)}finally{nt(!1)}}if(P=r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=rM,r.stateNode=y,y._reactInternals=r,y._reactInternalInstance=KT,typeof u.getDerivedStateFromProps=="function"&&P===null&&(P=F(u)||"Component",$T.has(P)||($T.add(P),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",P,y.state===null?"null":"undefined",P))),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"){var q=N=P=null;if(typeof y.componentWillMount=="function"&&y.componentWillMount.__suppressDeprecationWarning!==!0?P="componentWillMount":typeof y.UNSAFE_componentWillMount=="function"&&(P="UNSAFE_componentWillMount"),typeof y.componentWillReceiveProps=="function"&&y.componentWillReceiveProps.__suppressDeprecationWarning!==!0?N="componentWillReceiveProps":typeof y.UNSAFE_componentWillReceiveProps=="function"&&(N="UNSAFE_componentWillReceiveProps"),typeof y.componentWillUpdate=="function"&&y.componentWillUpdate.__suppressDeprecationWarning!==!0?q="componentWillUpdate":typeof y.UNSAFE_componentWillUpdate=="function"&&(q="UNSAFE_componentWillUpdate"),P!==null||N!==null||q!==null){y=F(u)||"Component";var se=typeof u.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";tE.has(y)||(tE.add(y),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
4396
4396
|
|
|
4397
4397
|
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
4398
4398
|
|
|
@@ -4400,8 +4400,8 @@ The above lifecycles should be removed. Learn more about this warning here:
|
|
|
4400
4400
|
https://react.dev/link/unsafe-component-lifecycles`,y,se,P!==null?`
|
|
4401
4401
|
`+P:"",N!==null?`
|
|
4402
4402
|
`+N:"",q!==null?`
|
|
4403
|
-
`+q:""))}}y=r.stateNode,P=F(u)||"Component",y.render||(u.prototype&&typeof u.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",P):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",P)),!y.getInitialState||y.getInitialState.isReactClassApproved||y.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",P),y.getDefaultProps&&!y.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",P),y.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",P),u.childContextTypes&&!sE.has(u)&&(sE.add(u),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",P)),u.contextTypes&&!rE.has(u)&&(rE.add(u),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",P)),typeof y.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",P),u.prototype&&u.prototype.isPureReactComponent&&typeof y.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",F(u)||"A pure component"),typeof y.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",P),typeof y.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",P),typeof y.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",P),typeof y.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",P),N=y.props!==p,y.props!==void 0&&N&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",P),y.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",P,P),typeof y.getSnapshotBeforeUpdate!="function"||typeof y.componentDidUpdate=="function"||eE.has(u)||(eE.add(u),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",F(u))),typeof y.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",P),typeof y.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",P),typeof u.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",P),(N=y.state)&&(typeof N!="object"||zi(N))&&console.error("%s.state: must be set to an object or null",P),typeof y.getChildContext=="function"&&typeof u.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",P),y=r.stateNode,y.props=p,y.state=r.memoizedState,y.refs={},ah(r),P=u.contextType,y.context=typeof P=="object"&&P!==null?
|
|
4404
|
-
%s.childContextTypes = ...`,r.displayName||r.name||"Component"),typeof r.getDerivedStateFromProps=="function"&&(n=F(r)||"Unknown",dE[n]||(console.error("%s: Function components do not support getDerivedStateFromProps.",n),dE[n]=!0)),typeof r.contextType=="object"&&r.contextType!==null&&(r=F(r)||"Unknown",cE[r]||(console.error("%s: Function components do not support contextType.",r),cE[r]=!0))}function Pd(n){return{baseLanes:n,cachePool:th()}}function Nh(n,r,u){return n=n!==null?n.childLanes&~u:0,r&&(n|=Xs),n}function zh(n,r,u){var p=r.pendingProps;f(r)&&(r.flags|=128);var b=!1,y=(r.flags&128)!==0,P;if((P=y)||(P=n!==null&&n.memoizedState===null?!1:(Xi.current&vA)!==0),P&&(b=!0,r.flags&=-129),P=(r.flags&32)!==0,r.flags&=-33,n===null){if(Sn){if(b?Ia(r):oa(r),(n=yi)?(u=$n(n,Ka),u!==null&&(P={dehydrated:u,treeContext:Le(),retryLane:536870912,hydrationErrors:null},r.memoizedState=P,P=Ql(u),P.return=r,r.child=P,Or=r,yi=null)):u=null,u===null)throw G(r,n),oe(r);return mp(u)?r.lanes=32:r.lanes=536870912,null}var N=p.children;return p=p.fallback,b?(oa(r),b=r.mode,N=kd({mode:"hidden",children:N},b),p=cl(p,b,u,null),N.return=r,p.return=r,N.sibling=p,r.child=N,p=r.child,p.memoizedState=Pd(u),p.childLanes=Nh(n,P,u),r.memoizedState=oM,Ed(null,p)):(Ia(r),Sg(r,N))}var q=n.memoizedState;if(q!==null&&(N=q.dehydrated,N!==null)){if(y)r.flags&256?(Ia(r),r.flags&=-257,r=Bh(n,r,u)):r.memoizedState!==null?(oa(r),r.child=n.child,r.flags|=128,r=null):(oa(r),N=p.fallback,b=r.mode,p=kd({mode:"visible",children:p.children},b),N=cl(N,b,u,null),N.flags|=2,p.return=r,N.return=r,p.sibling=N,r.child=p,df(r,n.child,null,u),p=r.child,p.memoizedState=Pd(u),p.childLanes=Nh(n,P,u),r.memoizedState=oM,r=Ed(null,p));else if(Ia(r),ta(),(u&536870912)!==0&&qh(r),mp(N))b=$i(N),P=b.digest,N=b.message,p=b.stack,b=b.componentStack,N=Error(N||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),N.stack=p||"",N.digest=P,P=b===void 0?null:b,p={value:N,source:null,stack:P},typeof P=="string"&&zS.set(N,p),St(p),r=Bh(n,r,u);else if(nr||Ht(n,r,u,!1),P=(u&n.childLanes)!==0,nr||P){if(P=ri,P!==null&&(p=ct(P,u),p!==0&&p!==q.retryLane))throw q.retryLane=p,br(n,p),ai(P,n,p),aM;Qd(N)||Yh(),r=Bh(n,r,u)}else Qd(N)?(r.flags|=192,r.child=n.child,r=null):(n=q.treeContext,Tr&&(yi=yp(N),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!1,n!==null&&it(r,n)),r=Sg(r,p.children),r.flags|=4096);return r}return b?(oa(r),N=p.fallback,b=r.mode,q=n.child,y=q.sibling,p=Mo(q,{mode:"hidden",children:p.children}),p.subtreeFlags=q.subtreeFlags&65011712,y!==null?N=Mo(y,N):(N=cl(N,b,u,null),N.flags|=2),N.return=r,p.return=r,p.sibling=N,r.child=p,Ed(null,p),p=r.child,N=n.child.memoizedState,N===null?N=Pd(u):(b=N.cachePool,b!==null?(q=Fr?Ri._currentValue:Ri._currentValue2,b=b.parent!==q?{parent:q,pool:q}:b):b=th(),N={baseLanes:N.baseLanes|u,cachePool:b}),p.memoizedState=N,p.childLanes=Nh(n,P,u),r.memoizedState=oM,Ed(n.child,p)):(q!==null&&(u&62914560)===u&&(u&n.lanes)!==0&&qh(r),Ia(r),u=n.child,n=u.sibling,u=Mo(u,{mode:"visible",children:p.children}),u.return=r,u.sibling=null,n!==null&&(P=r.deletions,P===null?(r.deletions=[n],r.flags|=16):P.push(n)),r.child=u,r.memoizedState=null,u)}function Sg(n,r){return r=kd({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function kd(n,r){return n=g(22,n,null,r),n.lanes=0,n}function Bh(n,r,u){return df(r,n.child,null,u),n=Sg(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Mg(n,r,u){n.lanes|=r;var p=n.alternate;p!==null&&(p.lanes|=r),Pn(n.return,r,u)}function Uh(n,r,u,p,b,y){var P=n.memoizedState;P===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:y}:(P.isBackwards=r,P.rendering=null,P.renderingStartTime=0,P.last=p,P.tail=u,P.tailMode=b,P.treeForkCount=y)}function wg(n,r,u){var p,b=r.pendingProps,y=b.revealOrder,P=b.tail,N=b.children,q=Xi.current;if((b=(q&vA)!==0)?(q=q&Fp|vA,r.flags|=128):q&=Fp,K(Xi,q,r),q=(p=y)!=null?p:"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!fE[q])if(fE[q]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);q=P??"null",cy[q]||(P==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(cy[q]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):P!=="visible"&&P!=="collapsed"&&P!=="hidden"?(cy[q]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',P)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(cy[q]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',P)));e:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&N!==void 0&&N!==null&&N!==!1)if(zi(N)){for(q=0;q<N.length;q++)if(!tg(N[q],q))break e}else if(q=I(N),typeof q=="function"){if(q=q.call(N))for(var se=q.next(),Se=0;!se.done;se=q.next()){if(!tg(se.value,Se))break e;Se++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(Mi(n,r,N,u),Sn?(tt(),N=nA):N=0,!b&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Mg(n,u,r);else if(n.tag===19)Mg(n,u,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(y){case"forwards":for(u=r.child,y=null;u!==null;)n=u.alternate,n!==null&&md(n)===null&&(y=u),u=u.sibling;u=y,u===null?(y=r.child,r.child=null):(y=u.sibling,u.sibling=null),Uh(r,!1,y,u,P,N);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=r.child,r.child=null;y!==null;){if(n=y.alternate,n!==null&&md(n)===null){r.child=y;break}n=y.sibling,y.sibling=u,u=y,y=n}Uh(r,!0,u,null,P,N);break;case"together":Uh(r,!1,null,null,void 0,N);break;default:r.memoizedState=null}return r.child}function da(n,r,u){if(n!==null&&(r.dependencies=n.dependencies),gs=-1,Cu|=r.lanes,(u&r.childLanes)===0)if(n!==null){if(Ht(n,r,u,!1),(u&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error("Resuming work not yet implemented.");if(r.child!==null){for(n=r.child,u=Mo(n,n.pendingProps),r.child=u,u.return=r;n.sibling!==null;)n=n.sibling,u=u.sibling=Mo(n,n.pendingProps),u.return=r;u.sibling=null}return r.child}function fn(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Tn(n)))}function hS(n,r,u){switch(r.tag){case 3:Mt(r,r.stateNode.containerInfo),Ot(r,Ri,n.memoizedState.cache),dt();break;case 27:case 5:Rn(r);break;case 4:Mt(r,r.stateNode.containerInfo);break;case 10:Ot(r,r.type,r.memoizedProps.value);break;case 12:(u&r.childLanes)!==0&&(r.flags|=4),r.flags|=2048;var p=r.stateNode;p.effectDuration=-0,p.passiveEffectDuration=-0;break;case 31:if(r.memoizedState!==null)return r.flags|=128,ch(r),null;break;case 13:if(p=r.memoizedState,p!==null)return p.dehydrated!==null?(Ia(r),r.flags|=128,null):(u&r.child.childLanes)!==0?zh(n,r,u):(Ia(r),n=da(n,r,u),n!==null?n.sibling:null);Ia(r);break;case 19:var b=(n.flags&128)!==0;if(p=(u&r.childLanes)!==0,p||(Ht(n,r,u,!1),p=(u&r.childLanes)!==0),b){if(p)return wg(n,r,u);r.flags|=128}if(b=r.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),K(Xi,Xi.current,r),p)break;return null;case 22:return r.lanes=0,Dh(n,r,u,r.pendingProps);case 24:Ot(r,Ri,n.memoizedState.cache)}return da(n,r,u)}function zr(n,r,u){if(r._debugNeedsRemount&&n!==null){u=_h(r.type,r.key,r.pendingProps,r._debugOwner||null,r.mode,r.lanes),u._debugStack=r._debugStack,u._debugTask=r._debugTask;var p=r.return;if(p===null)throw Error("Cannot swap the root fiber.");if(n.alternate=null,r.alternate=null,u.index=r.index,u.sibling=r.sibling,u.return=r.return,u.ref=r.ref,u._debugInfo=r._debugInfo,r===p.child)p.child=u;else{var b=p.child;if(b===null)throw Error("Expected parent to have a child.");for(;b.sibling!==r;)if(b=b.sibling,b===null)throw Error("Expected to find the previous sibling.");b.sibling=u}return r=p.deletions,r===null?(p.deletions=[n],p.flags|=16):r.push(n),u.flags|=2,u}if(n!==null)if(n.memoizedProps!==r.pendingProps||r.type!==n.type)nr=!0;else{if(!fn(n,u)&&(r.flags&128)===0)return nr=!1,hS(n,r,u);nr=(n.flags&131072)!==0}else nr=!1,(p=Sn)&&(tt(),p=(r.flags&1048576)!==0),p&&(p=r.index,tt(),jt(r,nA,p));switch(r.lanes=0,r.tag){case 16:e:if(p=r.pendingProps,n=ho(r.elementType),r.type=n,typeof n=="function")Kh(n)?(p=Ba(n,p),r.tag=1,r.type=n=Jl(n),r=xg(null,r,n,p,u)):(r.tag=0,yo(r,n),r.type=n=Jl(n),r=Cd(null,r,n,p,u));else{if(n!=null){if(b=n.$$typeof,b===pr){r.tag=11,r.type=n=Zh(n),r=vg(null,r,n,p,u);break e}else if(b===iu){r.tag=14,r=yg(null,r,n,p,u);break e}}throw r="",n!==null&&typeof n=="object"&&n.$$typeof===Zr&&(r=" Did you wrap a component in React.lazy() more than once?"),n=F(n)||n,Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function."+r)}return r;case 0:return Cd(n,r,r.type,r.pendingProps,u);case 1:return p=r.type,b=Ba(p,r.pendingProps),xg(n,r,p,b,u);case 3:e:{if(Mt(r,r.stateNode.containerInfo),n===null)throw Error("Should have a current fiber. This is a bug in React.");var y=r.pendingProps;b=r.memoizedState,p=b.element,oh(n,r),fd(r,y,null,u);var P=r.memoizedState;if(y=P.cache,Ot(r,Ri,y),y!==b.cache&&dn(r,[Ri],u,!0),Vc(),y=P.element,Tr&&b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:P.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=Rd(n,r,y,u);break e}else if(y!==p){p=mt(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),r),St(p),r=Rd(n,r,y,u);break e}else for(Tr&&(yi=Ap(r.stateNode.containerInfo),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!0),n=HT(r,null,y,u),r.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dt(),y===p){r=da(n,r,u);break e}Mi(n,r,y,u)}r=r.child}return r;case 26:if(qn)return Ih(n,r),n===null?(n=Ja(r.type,null,r.pendingProps,null))?r.memoizedState=n:Sn||(r.stateNode=o(r.type,r.pendingProps,Ne(vu.current),r)):r.memoizedState=Ja(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:if(R)return Rn(r),n===null&&R&&Sn&&(b=Ne(vu.current),p=yn(),b=r.stateNode=W(r.type,r.pendingProps,b,p,!1),xl||(p=_d(b,r.type,r.pendingProps,p),p!==null&&(ea(r,0).serverProps=p)),Or=r,Ka=!0,yi=bp(r.type,b,yi)),Mi(n,r,r.pendingProps.children,u),Ih(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Sn&&(y=yn(),p=Sp(r.type,r.pendingProps,y),b=yi,(P=!b)||(P=Zd(b,r.type,r.pendingProps,Ka),P!==null?(r.stateNode=P,xl||(y=_d(P,r.type,r.pendingProps,y),y!==null&&(ea(r,0).serverProps=y)),Or=r,yi=gp(P),Ka=!1,y=!0):y=!1,P=!y),P&&(p&&G(r,b),oe(r))),Rn(r),b=r.type,y=r.pendingProps,P=n!==null?n.memoizedProps:null,p=y.children,gn(b,y)?p=null:P!==null&&gn(b,P)&&(r.flags|=32),r.memoizedState!==null&&(b=cs(n,r,sg,null,null,u),Fr?Hs._currentValue=b:Hs._currentValue2=b),Ih(n,r),Mi(n,r,p,u),r.child;case 6:return n===null&&Sn&&(n=r.pendingProps,u=yn(),n=gl(n,u),u=yi,(p=!u)||(p=kS(u,r.pendingProps,Ka),p!==null?(r.stateNode=p,Or=r,yi=null,p=!0):p=!1,p=!p),p&&(n&&G(r,u),oe(r))),null;case 13:return zh(n,r,u);case 4:return Mt(r,r.stateNode.containerInfo),p=r.pendingProps,n===null?r.child=df(r,null,p,u):Mi(n,r,p,u),r.child;case 11:return vg(n,r,r.type,r.pendingProps,u);case 7:return Mi(n,r,r.pendingProps,u),r.child;case 8:return Mi(n,r,r.pendingProps.children,u),r.child;case 12:return r.flags|=4,r.flags|=2048,p=r.stateNode,p.effectDuration=-0,p.passiveEffectDuration=-0,Mi(n,r,r.pendingProps.children,u),r.child;case 10:return p=r.type,b=r.pendingProps,y=b.value,"value"in b||hE||(hE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ot(r,p,y),Mi(n,r,b.children,u),r.child;case 9:return b=r.type._context,p=r.pendingProps.children,typeof p!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Qn(r),b=je(b),p=YS(p,b,void 0),r.flags|=1,Mi(n,r,p,u),r.child;case 14:return yg(n,r,r.type,r.pendingProps,u);case 15:return Ln(n,r,r.type,r.pendingProps,u);case 19:return wg(n,r,u);case 31:return fS(n,r,u);case 22:return Dh(n,r,u,r.pendingProps);case 24:return Qn(r),p=je(Ri),n===null?(b=eh(),b===null&&(b=ri,y=Hi(),b.pooledCache=y,Ii(y),y!==null&&(b.pooledCacheLanes|=u),b=y),r.memoizedState={parent:p,cache:b},ah(r),Ot(r,Ri,b)):((n.lanes&u)!==0&&(oh(n,r),fd(r,null,null,u),Vc()),b=n.memoizedState,y=r.memoizedState,b.parent!==p?(b={parent:p,cache:p},r.memoizedState=b,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=b),Ot(r,Ri,p)):(p=y.cache,Ot(r,Ri,p),p!==b.cache&&dn(r,[Ri],u,!0))),Mi(n,r,r.pendingProps.children,u),r.child;case 29:throw r.pendingProps}throw Error("Unknown unit of work tag ("+r.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function us(n){n.flags|=4}function Fh(n){Xa&&(n.flags|=8)}function Dd(n,r){if(n!==null&&n.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(n=r.child;n!==null;){if((n.flags&8218)!==0||(n.subtreeFlags&8218)!==0)return!0;n=n.sibling}return!1}function sl(n,r,u,p){if(li)for(u=r.child;u!==null;){if(u.tag===5||u.tag===6)Wi(n,u.stateNode);else if(!(u.tag===4||R&&u.tag===27)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===r)break;for(;u.sibling===null;){if(u.return===null||u.return===r)return;u=u.return}u.sibling.return=u.return,u=u.sibling}else if(Xa)for(var b=r.child;b!==null;){if(b.tag===5){var y=b.stateNode;u&&p&&(y=Ya(y,b.type,b.memoizedProps)),Wi(n,y)}else if(b.tag===6)y=b.stateNode,u&&p&&(y=Ci(y,b.memoizedProps)),Wi(n,y);else if(b.tag!==4){if(b.tag===22&&b.memoizedState!==null)y=b.child,y!==null&&(y.return=b),sl(n,b,!0,!0);else if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===r)break;for(;b.sibling===null;){if(b.return===null||b.return===r)return;b=b.return}b.sibling.return=b.return,b=b.sibling}}function Gl(n,r,u,p){var b=!1;if(Xa)for(var y=r.child;y!==null;){if(y.tag===5){var P=y.stateNode;u&&p&&(P=Ya(P,y.type,y.memoizedProps)),hp(n,P)}else if(y.tag===6)P=y.stateNode,u&&p&&(P=Ci(P,y.memoizedProps)),hp(n,P);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)b=y.child,b!==null&&(b.return=y),Gl(n,y,!0,!0),b=!0;else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===r)break;for(;y.sibling===null;){if(y.return===null||y.return===r)return b;y=y.return}y.sibling.return=y.return,y=y.sibling}return b}function Tg(n,r){if(Xa&&Dd(n,r)){n=r.stateNode;var u=n.containerInfo,p=fp();Gl(p,r,!1,!1),n.pendingChildren=p,us(r),Ui(u,p)}}function Ld(n,r,u,p){if(li)n.memoizedProps!==p&&us(r);else if(Xa){var b=n.stateNode,y=n.memoizedProps;if((n=Dd(n,r))||y!==p){var P=yn();y=H0(b,u,y,p,!n,null),y===b?r.stateNode=b:(Fh(r),oi(y,u,p,P)&&us(r),r.stateNode=y,n&&sl(y,r,!1,!1))}else r.stateNode=b}}function Oh(n,r,u,p,b){if((n.mode&32)!==Wt&&(u===null?au(r,p):ou(r,u,p))){if(n.flags|=16777216,(b&335544128)===b||sp(r,p))if(dl(n.stateNode,r,p))n.flags|=8192;else if(A0())n.flags|=8192;else throw uf=iy,QS}else n.flags&=-16777217}function bo(n,r){if(h(r)){if(n.flags|=16777216,!A(r))if(A0())n.flags|=8192;else throw uf=iy,QS}else n.flags&=-16777217}function Jc(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?ce():536870912,n.lanes|=r,gf|=r)}function Wl(n,r){if(!Sn)switch(n.tailMode){case"hidden":r=n.tail;for(var u=null;r!==null;)r.alternate!==null&&(u=r),r=r.sibling;u===null?n.tail=null:u.sibling=null;break;case"collapsed":u=n.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:p.sibling=null}}function jn(n){var r=n.alternate!==null&&n.alternate.child===n.child,u=0,p=0;if(r)if((n.mode&2)!==Wt){for(var b=n.selfBaseDuration,y=n.child;y!==null;)u|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,b+=y.treeBaseDuration,y=y.sibling;n.treeBaseDuration=b}else for(b=n.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=n,b=b.sibling;else if((n.mode&2)!==Wt){b=n.actualDuration,y=n.selfBaseDuration;for(var P=n.child;P!==null;)u|=P.lanes|P.childLanes,p|=P.subtreeFlags,p|=P.flags,b+=P.actualDuration,y+=P.treeBaseDuration,P=P.sibling;n.actualDuration=b,n.treeBaseDuration=y}else for(b=n.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=n,b=b.sibling;return n.subtreeFlags|=p,n.childLanes=u,r}function Eg(n,r,u){var p=r.pendingProps;switch(_e(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(r),null;case 1:return jn(r),null;case 3:return u=r.stateNode,p=null,n!==null&&(p=n.memoizedState.cache),r.memoizedState.cache!==p&&(r.flags|=2048),vt(Ri,r),gt(r),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(ge(r)?(Tt(),us(r)):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,at())),Tg(n,r),jn(r),null;case 26:if(qn){var b=r.type,y=r.memoizedState;return n===null?(us(r),y!==null?(jn(r),bo(r,y)):(jn(r),Oh(r,b,null,p,u))):y?y!==n.memoizedState?(us(r),jn(r),bo(r,y)):(jn(r),r.flags&=-16777217):(y=n.memoizedProps,li?y!==p&&us(r):Ld(n,r,b,p),jn(r),Oh(r,b,y,p,u)),null}case 27:if(R){if(Qi(r),u=Ne(vu.current),b=r.type,n!==null&&r.stateNode!=null)li?n.memoizedProps!==p&&us(r):Ld(n,r,b,p);else{if(!p){if(r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return jn(r),null}n=yn(),ge(r)?Ae(r,n):(n=W(b,p,u,n,!0),r.stateNode=n,us(r))}return jn(r),null}case 5:if(Qi(r),b=r.type,n!==null&&r.stateNode!=null)Ld(n,r,b,p);else{if(!p){if(r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return jn(r),null}if(y=yn(),ge(r))Ae(r,y),ic(r.stateNode,b,p,y)&&(r.flags|=64);else{var P=Ne(vu.current);P=rp(b,p,P,y,r),Fh(r),sl(P,r,!1,!1),r.stateNode=P,oi(P,b,p,y)&&us(r)}}return jn(r),Oh(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,u),null;case 6:if(n&&r.stateNode!=null)u=n.memoizedProps,li?u!==p&&us(r):Xa&&(u!==p?(n=Ne(vu.current),u=yn(),Fh(r),r.stateNode=Co(p,n,u,r)):r.stateNode=n.stateNode);else{if(typeof p!="string"&&r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(n=Ne(vu.current),u=yn(),ge(r)){if(!Tr)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(n=r.stateNode,u=r.memoizedProps,b=!xl,p=null,y=Or,y!==null)switch(y.tag){case 3:b&&(b=eA(n,u,p),b!==null&&(ea(r,0).serverProps=b));break;case 27:case 5:p=y.memoizedProps,b&&(b=eA(n,u,p),b!==null&&(ea(r,0).serverProps=b))}bn(n,u,r,p)||oe(r,!0)}else Fh(r),r.stateNode=Co(p,n,u,r)}return jn(r),null;case 31:if(u=r.memoizedState,n===null||n.memoizedState!==null){if(p=ge(r),u!==null){if(n===null){if(!p)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Tr)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");Xn(n,r),jn(r),(r.mode&2)!==Wt&&u!==null&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration))}else Tt(),dt(),(r.flags&128)===0&&(u=r.memoizedState=null),r.flags|=4,jn(r),(r.mode&2)!==Wt&&u!==null&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration));n=!1}else u=at(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=u),n=!0;if(!n)return r.flags&256?(Ir(r),r):(Ir(r),null);if((r.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return jn(r),null;case 13:if(p=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=p,y=ge(r),b!==null&&b.dehydrated!==null){if(n===null){if(!y)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Tr)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");hs(y,r),jn(r),(r.mode&2)!==Wt&&b!==null&&(b=r.child,b!==null&&(r.treeBaseDuration-=b.treeBaseDuration))}else Tt(),dt(),(r.flags&128)===0&&(b=r.memoizedState=null),r.flags|=4,jn(r),(r.mode&2)!==Wt&&b!==null&&(b=r.child,b!==null&&(r.treeBaseDuration-=b.treeBaseDuration));b=!1}else b=at(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return r.flags&256?(Ir(r),r):(Ir(r),null)}return Ir(r),(r.flags&128)!==0?(r.lanes=u,(r.mode&2)!==Wt&&nd(r),r):(u=p!==null,n=n!==null&&n.memoizedState!==null,u&&(p=r.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),y=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(y=p.memoizedState.cachePool.pool),y!==b&&(p.flags|=2048)),u!==n&&u&&(r.child.flags|=8192),Jc(r,r.updateQueue),jn(r),(r.mode&2)!==Wt&&u&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration)),null);case 4:return gt(r),Tg(n,r),n===null&&di(r.stateNode.containerInfo),jn(r),null;case 10:return vt(r.type,r),jn(r),null;case 19:if(_(Xi,r),p=r.memoizedState,p===null)return jn(r),null;if(b=(r.flags&128)!==0,y=p.rendering,y===null)if(b)Wl(p,!1);else{if(xi!==vc||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(y=md(n),y!==null){for(r.flags|=128,Wl(p,!1),n=y.updateQueue,r.updateQueue=n,Jc(r,n),r.subtreeFlags=0,n=u,u=r.child;u!==null;)Ni(u,n),u=u.sibling;return K(Xi,Xi.current&Fp|vA,r),Sn&&Ct(r,p.treeForkCount),r.child}n=n.sibling}p.tail!==null&&xn()>CA&&(r.flags|=128,b=!0,Wl(p,!1),r.lanes=4194304)}else{if(!b)if(n=md(y),n!==null){if(r.flags|=128,b=!0,n=n.updateQueue,r.updateQueue=n,Jc(r,n),Wl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!y.alternate&&!Sn)return jn(r),null}else 2*xn()-p.renderingStartTime>CA&&u!==536870912&&(r.flags|=128,b=!0,Wl(p,!1),r.lanes=4194304);p.isBackwards?(y.sibling=r.child,r.child=y):(n=p.last,n!==null?n.sibling=y:r.child=y,p.last=y)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=xn(),n.sibling=null,u=Xi.current,u=b?u&Fp|vA:u&Fp,K(Xi,u,r),Sn&&Ct(r,p.treeForkCount),n):(jn(r),null);case 22:case 23:return Ir(r),pd(r),p=r.memoizedState!==null,n!==null?n.memoizedState!==null!==p&&(r.flags|=8192):p&&(r.flags|=8192),p?(u&536870912)!==0&&(r.flags&128)===0&&(jn(r),r.subtreeFlags&6&&(r.flags|=8192)):jn(r),u=r.updateQueue,u!==null&&Jc(r,u.retryQueue),u=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),p=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(p=r.memoizedState.cachePool.pool),p!==u&&(r.flags|=2048),n!==null&&_(lf,r),null;case 24:return u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),vt(Ri,r),jn(r),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+r.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function al(n,r){switch(_e(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 3:return vt(Ri,r),gt(r),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Qi(r),null;case 31:if(r.memoizedState!==null){if(Ir(r),r.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");dt()}return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 13:if(Ir(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");dt()}return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 19:return _(Xi,r),null;case 4:return gt(r),null;case 10:return vt(r.type,r),null;case 22:case 23:return Ir(r),pd(r),n!==null&&_(lf,r),n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 24:return vt(Ri,r),null;case 25:return null;default:return null}}function Vh(n,r){switch(_e(r),r.tag){case 3:vt(Ri,r),gt(r);break;case 26:case 27:case 5:Qi(r);break;case 4:gt(r);break;case 31:r.memoizedState!==null&&Ir(r);break;case 13:Ir(r);break;case 19:_(Xi,r);break;case 10:vt(r.type,r);break;case 22:case 23:Ir(r),pd(r),n!==null&&_(lf,r);break;case 24:vt(Ri,r)}}function Fa(n){return(n.mode&2)!==Wt}function Cg(n,r){Fa(n)?(aa(),ol(r,n),sa()):ol(r,n)}function Rg(n,r,u){Fa(n)?(aa(),It(u,n,r),sa()):It(u,n,r)}function ol(n,r){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n&&(p=void 0,(n&As)!==sy&&(Jp=!0),p=xt(r,WP,u),(n&As)!==sy&&(Jp=!1),p!==void 0&&typeof p!="function")){var y=void 0;y=(u.tag&xa)!==0?"useLayoutEffect":(u.tag&As)!==0?"useInsertionEffect":"useEffect";var P=void 0;P=p===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof p.then=="function"?`
|
|
4403
|
+
`+q:""))}}y=r.stateNode,P=F(u)||"Component",y.render||(u.prototype&&typeof u.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",P):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",P)),!y.getInitialState||y.getInitialState.isReactClassApproved||y.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",P),y.getDefaultProps&&!y.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",P),y.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",P),u.childContextTypes&&!sE.has(u)&&(sE.add(u),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",P)),u.contextTypes&&!rE.has(u)&&(rE.add(u),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",P)),typeof y.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",P),u.prototype&&u.prototype.isPureReactComponent&&typeof y.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",F(u)||"A pure component"),typeof y.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",P),typeof y.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",P),typeof y.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",P),typeof y.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",P),N=y.props!==p,y.props!==void 0&&N&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",P),y.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",P,P),typeof y.getSnapshotBeforeUpdate!="function"||typeof y.componentDidUpdate=="function"||eE.has(u)||(eE.add(u),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",F(u))),typeof y.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",P),typeof y.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",P),typeof u.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",P),(N=y.state)&&(typeof N!="object"||zi(N))&&console.error("%s.state: must be set to an object or null",P),typeof y.getChildContext=="function"&&typeof u.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",P),y=r.stateNode,y.props=p,y.state=r.memoizedState,y.refs={},ah(r),P=u.contextType,y.context=typeof P=="object"&&P!==null?Xe(P):ei,y.state===p&&(P=F(u)||"Component",nE.has(P)||(nE.add(P),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",P))),r.mode&8&&Lo.recordLegacyContextWarning(r,y),Lo.recordUnsafeLifecycleWarnings(r,y),y.state=r.memoizedState,P=u.getDerivedStateFromProps,typeof P=="function"&&(Ch(r,u,P,p),y.state=r.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(P=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),P!==y.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",V(r)||"Component"),rM.enqueueReplaceState(y,y.state,null)),fd(r,p,y,b),Vc(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),(r.mode&16)!==Wt&&(r.flags|=134217728),y=!0}else if(n===null){y=r.stateNode;var Se=r.memoizedProps;N=Ba(u,Se),y.props=N;var Ee=y.context;q=u.contextType,P=ei,typeof q=="object"&&q!==null&&(P=Xe(q)),se=u.getDerivedStateFromProps,q=typeof se=="function"||typeof y.getSnapshotBeforeUpdate=="function",Se=r.pendingProps!==Se,q||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(Se||Ee!==P)&&Hl(r,y,p,P),wu=!1;var Be=r.memoizedState;y.state=Be,fd(r,p,y,b),Vc(),Ee=r.memoizedState,Se||Be!==Ee||wu?(typeof se=="function"&&(Ch(r,u,se,p),Ee=r.memoizedState),(N=wu||gg(r,u,N,p,Be,Ee,P))?(q||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308),(r.mode&16)!==Wt&&(r.flags|=134217728)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),(r.mode&16)!==Wt&&(r.flags|=134217728),r.memoizedProps=p,r.memoizedState=Ee),y.props=p,y.state=Ee,y.context=P,y=N):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),(r.mode&16)!==Wt&&(r.flags|=134217728),y=!1)}else{y=r.stateNode,oh(n,r),P=r.memoizedProps,q=Ba(u,P),y.props=q,se=r.pendingProps,Be=y.context,Ee=u.contextType,N=ei,typeof Ee=="object"&&Ee!==null&&(N=Xe(Ee)),Se=u.getDerivedStateFromProps,(Ee=typeof Se=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(P!==se||Be!==N)&&Hl(r,y,p,N),wu=!1,Be=r.memoizedState,y.state=Be,fd(r,p,y,b),Vc();var Lt=r.memoizedState;P!==se||Be!==Lt||wu||n!==null&&n.dependencies!==null&&Tn(n.dependencies)?(typeof Se=="function"&&(Ch(r,u,Se,p),Lt=r.memoizedState),(q=wu||gg(r,u,q,p,Be,Lt,N)||n!==null&&n.dependencies!==null&&Tn(n.dependencies))?(Ee||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(p,Lt,N),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(p,Lt,N)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||P===n.memoizedProps&&Be===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&Be===n.memoizedState||(r.flags|=1024),r.memoizedProps=p,r.memoizedState=Lt),y.props=p,y.state=Lt,y.context=N,y=q):(typeof y.componentDidUpdate!="function"||P===n.memoizedProps&&Be===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&Be===n.memoizedState||(r.flags|=1024),y=!1)}if(N=y,Ih(n,r),P=(r.flags&128)!==0,N||P){if(N=r.stateNode,zl(r),P&&typeof u.getDerivedStateFromError!="function")u=null,gs=-1;else if(u=CT(N),r.mode&8){nt(!0);try{CT(N)}finally{nt(!1)}}r.flags|=1,n!==null&&P?(r.child=df(r,n.child,null,b),r.child=df(r,null,u,b)):Mi(n,r,u,b),r.memoizedState=N.state,n=r.child}else n=da(n,r,b);return b=r.stateNode,y&&b.props!==p&&(Gp||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",V(r)||"a component"),Gp=!0),n}function Rd(n,r,u,p){return dt(),r.flags|=256,Mi(n,r,u,p),r.child}function yo(n,r){r&&r.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
4404
|
+
%s.childContextTypes = ...`,r.displayName||r.name||"Component"),typeof r.getDerivedStateFromProps=="function"&&(n=F(r)||"Unknown",dE[n]||(console.error("%s: Function components do not support getDerivedStateFromProps.",n),dE[n]=!0)),typeof r.contextType=="object"&&r.contextType!==null&&(r=F(r)||"Unknown",cE[r]||(console.error("%s: Function components do not support contextType.",r),cE[r]=!0))}function Pd(n){return{baseLanes:n,cachePool:th()}}function Nh(n,r,u){return n=n!==null?n.childLanes&~u:0,r&&(n|=Xs),n}function zh(n,r,u){var p=r.pendingProps;f(r)&&(r.flags|=128);var b=!1,y=(r.flags&128)!==0,P;if((P=y)||(P=n!==null&&n.memoizedState===null?!1:(Xi.current&vA)!==0),P&&(b=!0,r.flags&=-129),P=(r.flags&32)!==0,r.flags&=-33,n===null){if(Sn){if(b?Ia(r):oa(r),(n=yi)?(u=$n(n,Ka),u!==null&&(P={dehydrated:u,treeContext:Le(),retryLane:536870912,hydrationErrors:null},r.memoizedState=P,P=Ql(u),P.return=r,r.child=P,Or=r,yi=null)):u=null,u===null)throw G(r,n),oe(r);return mp(u)?r.lanes=32:r.lanes=536870912,null}var N=p.children;return p=p.fallback,b?(oa(r),b=r.mode,N=kd({mode:"hidden",children:N},b),p=cl(p,b,u,null),N.return=r,p.return=r,N.sibling=p,r.child=N,p=r.child,p.memoizedState=Pd(u),p.childLanes=Nh(n,P,u),r.memoizedState=oM,Ed(null,p)):(Ia(r),Sg(r,N))}var q=n.memoizedState;if(q!==null&&(N=q.dehydrated,N!==null)){if(y)r.flags&256?(Ia(r),r.flags&=-257,r=Bh(n,r,u)):r.memoizedState!==null?(oa(r),r.child=n.child,r.flags|=128,r=null):(oa(r),N=p.fallback,b=r.mode,p=kd({mode:"visible",children:p.children},b),N=cl(N,b,u,null),N.flags|=2,p.return=r,N.return=r,p.sibling=N,r.child=p,df(r,n.child,null,u),p=r.child,p.memoizedState=Pd(u),p.childLanes=Nh(n,P,u),r.memoizedState=oM,r=Ed(null,p));else if(Ia(r),ta(),(u&536870912)!==0&&qh(r),mp(N))b=$i(N),P=b.digest,N=b.message,p=b.stack,b=b.componentStack,N=Error(N||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),N.stack=p||"",N.digest=P,P=b===void 0?null:b,p={value:N,source:null,stack:P},typeof P=="string"&&zS.set(N,p),St(p),r=Bh(n,r,u);else if(nr||Ht(n,r,u,!1),P=(u&n.childLanes)!==0,nr||P){if(P=ri,P!==null&&(p=ct(P,u),p!==0&&p!==q.retryLane))throw q.retryLane=p,br(n,p),ai(P,n,p),aM;Qd(N)||Yh(),r=Bh(n,r,u)}else Qd(N)?(r.flags|=192,r.child=n.child,r=null):(n=q.treeContext,Tr&&(yi=yp(N),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!1,n!==null&&it(r,n)),r=Sg(r,p.children),r.flags|=4096);return r}return b?(oa(r),N=p.fallback,b=r.mode,q=n.child,y=q.sibling,p=Mo(q,{mode:"hidden",children:p.children}),p.subtreeFlags=q.subtreeFlags&65011712,y!==null?N=Mo(y,N):(N=cl(N,b,u,null),N.flags|=2),N.return=r,p.return=r,p.sibling=N,r.child=p,Ed(null,p),p=r.child,N=n.child.memoizedState,N===null?N=Pd(u):(b=N.cachePool,b!==null?(q=Fr?Ri._currentValue:Ri._currentValue2,b=b.parent!==q?{parent:q,pool:q}:b):b=th(),N={baseLanes:N.baseLanes|u,cachePool:b}),p.memoizedState=N,p.childLanes=Nh(n,P,u),r.memoizedState=oM,Ed(n.child,p)):(q!==null&&(u&62914560)===u&&(u&n.lanes)!==0&&qh(r),Ia(r),u=n.child,n=u.sibling,u=Mo(u,{mode:"visible",children:p.children}),u.return=r,u.sibling=null,n!==null&&(P=r.deletions,P===null?(r.deletions=[n],r.flags|=16):P.push(n)),r.child=u,r.memoizedState=null,u)}function Sg(n,r){return r=kd({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function kd(n,r){return n=g(22,n,null,r),n.lanes=0,n}function Bh(n,r,u){return df(r,n.child,null,u),n=Sg(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Mg(n,r,u){n.lanes|=r;var p=n.alternate;p!==null&&(p.lanes|=r),Pn(n.return,r,u)}function Uh(n,r,u,p,b,y){var P=n.memoizedState;P===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:y}:(P.isBackwards=r,P.rendering=null,P.renderingStartTime=0,P.last=p,P.tail=u,P.tailMode=b,P.treeForkCount=y)}function wg(n,r,u){var p,b=r.pendingProps,y=b.revealOrder,P=b.tail,N=b.children,q=Xi.current;if((b=(q&vA)!==0)?(q=q&Fp|vA,r.flags|=128):q&=Fp,K(Xi,q,r),q=(p=y)!=null?p:"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!fE[q])if(fE[q]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);q=P??"null",cy[q]||(P==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(cy[q]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):P!=="visible"&&P!=="collapsed"&&P!=="hidden"?(cy[q]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',P)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(cy[q]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',P)));e:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&N!==void 0&&N!==null&&N!==!1)if(zi(N)){for(q=0;q<N.length;q++)if(!tg(N[q],q))break e}else if(q=I(N),typeof q=="function"){if(q=q.call(N))for(var se=q.next(),Se=0;!se.done;se=q.next()){if(!tg(se.value,Se))break e;Se++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(Mi(n,r,N,u),Sn?(tt(),N=nA):N=0,!b&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Mg(n,u,r);else if(n.tag===19)Mg(n,u,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(y){case"forwards":for(u=r.child,y=null;u!==null;)n=u.alternate,n!==null&&md(n)===null&&(y=u),u=u.sibling;u=y,u===null?(y=r.child,r.child=null):(y=u.sibling,u.sibling=null),Uh(r,!1,y,u,P,N);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=r.child,r.child=null;y!==null;){if(n=y.alternate,n!==null&&md(n)===null){r.child=y;break}n=y.sibling,y.sibling=u,u=y,y=n}Uh(r,!0,u,null,P,N);break;case"together":Uh(r,!1,null,null,void 0,N);break;default:r.memoizedState=null}return r.child}function da(n,r,u){if(n!==null&&(r.dependencies=n.dependencies),gs=-1,Cu|=r.lanes,(u&r.childLanes)===0)if(n!==null){if(Ht(n,r,u,!1),(u&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error("Resuming work not yet implemented.");if(r.child!==null){for(n=r.child,u=Mo(n,n.pendingProps),r.child=u,u.return=r;n.sibling!==null;)n=n.sibling,u=u.sibling=Mo(n,n.pendingProps),u.return=r;u.sibling=null}return r.child}function fn(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Tn(n)))}function hS(n,r,u){switch(r.tag){case 3:Mt(r,r.stateNode.containerInfo),Ot(r,Ri,n.memoizedState.cache),dt();break;case 27:case 5:Rn(r);break;case 4:Mt(r,r.stateNode.containerInfo);break;case 10:Ot(r,r.type,r.memoizedProps.value);break;case 12:(u&r.childLanes)!==0&&(r.flags|=4),r.flags|=2048;var p=r.stateNode;p.effectDuration=-0,p.passiveEffectDuration=-0;break;case 31:if(r.memoizedState!==null)return r.flags|=128,ch(r),null;break;case 13:if(p=r.memoizedState,p!==null)return p.dehydrated!==null?(Ia(r),r.flags|=128,null):(u&r.child.childLanes)!==0?zh(n,r,u):(Ia(r),n=da(n,r,u),n!==null?n.sibling:null);Ia(r);break;case 19:var b=(n.flags&128)!==0;if(p=(u&r.childLanes)!==0,p||(Ht(n,r,u,!1),p=(u&r.childLanes)!==0),b){if(p)return wg(n,r,u);r.flags|=128}if(b=r.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),K(Xi,Xi.current,r),p)break;return null;case 22:return r.lanes=0,Dh(n,r,u,r.pendingProps);case 24:Ot(r,Ri,n.memoizedState.cache)}return da(n,r,u)}function zr(n,r,u){if(r._debugNeedsRemount&&n!==null){u=_h(r.type,r.key,r.pendingProps,r._debugOwner||null,r.mode,r.lanes),u._debugStack=r._debugStack,u._debugTask=r._debugTask;var p=r.return;if(p===null)throw Error("Cannot swap the root fiber.");if(n.alternate=null,r.alternate=null,u.index=r.index,u.sibling=r.sibling,u.return=r.return,u.ref=r.ref,u._debugInfo=r._debugInfo,r===p.child)p.child=u;else{var b=p.child;if(b===null)throw Error("Expected parent to have a child.");for(;b.sibling!==r;)if(b=b.sibling,b===null)throw Error("Expected to find the previous sibling.");b.sibling=u}return r=p.deletions,r===null?(p.deletions=[n],p.flags|=16):r.push(n),u.flags|=2,u}if(n!==null)if(n.memoizedProps!==r.pendingProps||r.type!==n.type)nr=!0;else{if(!fn(n,u)&&(r.flags&128)===0)return nr=!1,hS(n,r,u);nr=(n.flags&131072)!==0}else nr=!1,(p=Sn)&&(tt(),p=(r.flags&1048576)!==0),p&&(p=r.index,tt(),jt(r,nA,p));switch(r.lanes=0,r.tag){case 16:e:if(p=r.pendingProps,n=ho(r.elementType),r.type=n,typeof n=="function")Kh(n)?(p=Ba(n,p),r.tag=1,r.type=n=Jl(n),r=xg(null,r,n,p,u)):(r.tag=0,yo(r,n),r.type=n=Jl(n),r=Cd(null,r,n,p,u));else{if(n!=null){if(b=n.$$typeof,b===pr){r.tag=11,r.type=n=Zh(n),r=vg(null,r,n,p,u);break e}else if(b===iu){r.tag=14,r=yg(null,r,n,p,u);break e}}throw r="",n!==null&&typeof n=="object"&&n.$$typeof===Zr&&(r=" Did you wrap a component in React.lazy() more than once?"),n=F(n)||n,Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function."+r)}return r;case 0:return Cd(n,r,r.type,r.pendingProps,u);case 1:return p=r.type,b=Ba(p,r.pendingProps),xg(n,r,p,b,u);case 3:e:{if(Mt(r,r.stateNode.containerInfo),n===null)throw Error("Should have a current fiber. This is a bug in React.");var y=r.pendingProps;b=r.memoizedState,p=b.element,oh(n,r),fd(r,y,null,u);var P=r.memoizedState;if(y=P.cache,Ot(r,Ri,y),y!==b.cache&&dn(r,[Ri],u,!0),Vc(),y=P.element,Tr&&b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:P.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=Rd(n,r,y,u);break e}else if(y!==p){p=mt(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),r),St(p),r=Rd(n,r,y,u);break e}else for(Tr&&(yi=Ap(r.stateNode.containerInfo),Or=r,Sn=!0,yu=null,xl=!1,ya=null,Ka=!0),n=HT(r,null,y,u),r.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dt(),y===p){r=da(n,r,u);break e}Mi(n,r,y,u)}r=r.child}return r;case 26:if(qn)return Ih(n,r),n===null?(n=Ja(r.type,null,r.pendingProps,null))?r.memoizedState=n:Sn||(r.stateNode=o(r.type,r.pendingProps,Ne(vu.current),r)):r.memoizedState=Ja(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:if(R)return Rn(r),n===null&&R&&Sn&&(b=Ne(vu.current),p=yn(),b=r.stateNode=W(r.type,r.pendingProps,b,p,!1),xl||(p=_d(b,r.type,r.pendingProps,p),p!==null&&(ea(r,0).serverProps=p)),Or=r,Ka=!0,yi=bp(r.type,b,yi)),Mi(n,r,r.pendingProps.children,u),Ih(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Sn&&(y=yn(),p=Sp(r.type,r.pendingProps,y),b=yi,(P=!b)||(P=Zd(b,r.type,r.pendingProps,Ka),P!==null?(r.stateNode=P,xl||(y=_d(P,r.type,r.pendingProps,y),y!==null&&(ea(r,0).serverProps=y)),Or=r,yi=gp(P),Ka=!1,y=!0):y=!1,P=!y),P&&(p&&G(r,b),oe(r))),Rn(r),b=r.type,y=r.pendingProps,P=n!==null?n.memoizedProps:null,p=y.children,gn(b,y)?p=null:P!==null&&gn(b,P)&&(r.flags|=32),r.memoizedState!==null&&(b=cs(n,r,sg,null,null,u),Fr?Hs._currentValue=b:Hs._currentValue2=b),Ih(n,r),Mi(n,r,p,u),r.child;case 6:return n===null&&Sn&&(n=r.pendingProps,u=yn(),n=gl(n,u),u=yi,(p=!u)||(p=kS(u,r.pendingProps,Ka),p!==null?(r.stateNode=p,Or=r,yi=null,p=!0):p=!1,p=!p),p&&(n&&G(r,u),oe(r))),null;case 13:return zh(n,r,u);case 4:return Mt(r,r.stateNode.containerInfo),p=r.pendingProps,n===null?r.child=df(r,null,p,u):Mi(n,r,p,u),r.child;case 11:return vg(n,r,r.type,r.pendingProps,u);case 7:return Mi(n,r,r.pendingProps,u),r.child;case 8:return Mi(n,r,r.pendingProps.children,u),r.child;case 12:return r.flags|=4,r.flags|=2048,p=r.stateNode,p.effectDuration=-0,p.passiveEffectDuration=-0,Mi(n,r,r.pendingProps.children,u),r.child;case 10:return p=r.type,b=r.pendingProps,y=b.value,"value"in b||hE||(hE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ot(r,p,y),Mi(n,r,b.children,u),r.child;case 9:return b=r.type._context,p=r.pendingProps.children,typeof p!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Qn(r),b=Xe(b),p=YS(p,b,void 0),r.flags|=1,Mi(n,r,p,u),r.child;case 14:return yg(n,r,r.type,r.pendingProps,u);case 15:return Ln(n,r,r.type,r.pendingProps,u);case 19:return wg(n,r,u);case 31:return fS(n,r,u);case 22:return Dh(n,r,u,r.pendingProps);case 24:return Qn(r),p=Xe(Ri),n===null?(b=eh(),b===null&&(b=ri,y=Hi(),b.pooledCache=y,Ii(y),y!==null&&(b.pooledCacheLanes|=u),b=y),r.memoizedState={parent:p,cache:b},ah(r),Ot(r,Ri,b)):((n.lanes&u)!==0&&(oh(n,r),fd(r,null,null,u),Vc()),b=n.memoizedState,y=r.memoizedState,b.parent!==p?(b={parent:p,cache:p},r.memoizedState=b,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=b),Ot(r,Ri,p)):(p=y.cache,Ot(r,Ri,p),p!==b.cache&&dn(r,[Ri],u,!0))),Mi(n,r,r.pendingProps.children,u),r.child;case 29:throw r.pendingProps}throw Error("Unknown unit of work tag ("+r.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function us(n){n.flags|=4}function Fh(n){Xa&&(n.flags|=8)}function Dd(n,r){if(n!==null&&n.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(n=r.child;n!==null;){if((n.flags&8218)!==0||(n.subtreeFlags&8218)!==0)return!0;n=n.sibling}return!1}function sl(n,r,u,p){if(li)for(u=r.child;u!==null;){if(u.tag===5||u.tag===6)Wi(n,u.stateNode);else if(!(u.tag===4||R&&u.tag===27)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===r)break;for(;u.sibling===null;){if(u.return===null||u.return===r)return;u=u.return}u.sibling.return=u.return,u=u.sibling}else if(Xa)for(var b=r.child;b!==null;){if(b.tag===5){var y=b.stateNode;u&&p&&(y=Ya(y,b.type,b.memoizedProps)),Wi(n,y)}else if(b.tag===6)y=b.stateNode,u&&p&&(y=Ci(y,b.memoizedProps)),Wi(n,y);else if(b.tag!==4){if(b.tag===22&&b.memoizedState!==null)y=b.child,y!==null&&(y.return=b),sl(n,b,!0,!0);else if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===r)break;for(;b.sibling===null;){if(b.return===null||b.return===r)return;b=b.return}b.sibling.return=b.return,b=b.sibling}}function Gl(n,r,u,p){var b=!1;if(Xa)for(var y=r.child;y!==null;){if(y.tag===5){var P=y.stateNode;u&&p&&(P=Ya(P,y.type,y.memoizedProps)),hp(n,P)}else if(y.tag===6)P=y.stateNode,u&&p&&(P=Ci(P,y.memoizedProps)),hp(n,P);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)b=y.child,b!==null&&(b.return=y),Gl(n,y,!0,!0),b=!0;else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===r)break;for(;y.sibling===null;){if(y.return===null||y.return===r)return b;y=y.return}y.sibling.return=y.return,y=y.sibling}return b}function Tg(n,r){if(Xa&&Dd(n,r)){n=r.stateNode;var u=n.containerInfo,p=fp();Gl(p,r,!1,!1),n.pendingChildren=p,us(r),Ui(u,p)}}function Ld(n,r,u,p){if(li)n.memoizedProps!==p&&us(r);else if(Xa){var b=n.stateNode,y=n.memoizedProps;if((n=Dd(n,r))||y!==p){var P=yn();y=H0(b,u,y,p,!n,null),y===b?r.stateNode=b:(Fh(r),oi(y,u,p,P)&&us(r),r.stateNode=y,n&&sl(y,r,!1,!1))}else r.stateNode=b}}function Oh(n,r,u,p,b){if((n.mode&32)!==Wt&&(u===null?au(r,p):ou(r,u,p))){if(n.flags|=16777216,(b&335544128)===b||sp(r,p))if(dl(n.stateNode,r,p))n.flags|=8192;else if(A0())n.flags|=8192;else throw uf=iy,QS}else n.flags&=-16777217}function bo(n,r){if(h(r)){if(n.flags|=16777216,!A(r))if(A0())n.flags|=8192;else throw uf=iy,QS}else n.flags&=-16777217}function Jc(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?ce():536870912,n.lanes|=r,gf|=r)}function Wl(n,r){if(!Sn)switch(n.tailMode){case"hidden":r=n.tail;for(var u=null;r!==null;)r.alternate!==null&&(u=r),r=r.sibling;u===null?n.tail=null:u.sibling=null;break;case"collapsed":u=n.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:p.sibling=null}}function jn(n){var r=n.alternate!==null&&n.alternate.child===n.child,u=0,p=0;if(r)if((n.mode&2)!==Wt){for(var b=n.selfBaseDuration,y=n.child;y!==null;)u|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,b+=y.treeBaseDuration,y=y.sibling;n.treeBaseDuration=b}else for(b=n.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=n,b=b.sibling;else if((n.mode&2)!==Wt){b=n.actualDuration,y=n.selfBaseDuration;for(var P=n.child;P!==null;)u|=P.lanes|P.childLanes,p|=P.subtreeFlags,p|=P.flags,b+=P.actualDuration,y+=P.treeBaseDuration,P=P.sibling;n.actualDuration=b,n.treeBaseDuration=y}else for(b=n.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=n,b=b.sibling;return n.subtreeFlags|=p,n.childLanes=u,r}function Eg(n,r,u){var p=r.pendingProps;switch(_e(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(r),null;case 1:return jn(r),null;case 3:return u=r.stateNode,p=null,n!==null&&(p=n.memoizedState.cache),r.memoizedState.cache!==p&&(r.flags|=2048),vt(Ri,r),gt(r),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(ge(r)?(Tt(),us(r)):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,at())),Tg(n,r),jn(r),null;case 26:if(qn){var b=r.type,y=r.memoizedState;return n===null?(us(r),y!==null?(jn(r),bo(r,y)):(jn(r),Oh(r,b,null,p,u))):y?y!==n.memoizedState?(us(r),jn(r),bo(r,y)):(jn(r),r.flags&=-16777217):(y=n.memoizedProps,li?y!==p&&us(r):Ld(n,r,b,p),jn(r),Oh(r,b,y,p,u)),null}case 27:if(R){if(Qi(r),u=Ne(vu.current),b=r.type,n!==null&&r.stateNode!=null)li?n.memoizedProps!==p&&us(r):Ld(n,r,b,p);else{if(!p){if(r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return jn(r),null}n=yn(),ge(r)?Ae(r,n):(n=W(b,p,u,n,!0),r.stateNode=n,us(r))}return jn(r),null}case 5:if(Qi(r),b=r.type,n!==null&&r.stateNode!=null)Ld(n,r,b,p);else{if(!p){if(r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return jn(r),null}if(y=yn(),ge(r))Ae(r,y),ic(r.stateNode,b,p,y)&&(r.flags|=64);else{var P=Ne(vu.current);P=rp(b,p,P,y,r),Fh(r),sl(P,r,!1,!1),r.stateNode=P,oi(P,b,p,y)&&us(r)}}return jn(r),Oh(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,u),null;case 6:if(n&&r.stateNode!=null)u=n.memoizedProps,li?u!==p&&us(r):Xa&&(u!==p?(n=Ne(vu.current),u=yn(),Fh(r),r.stateNode=Co(p,n,u,r)):r.stateNode=n.stateNode);else{if(typeof p!="string"&&r.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(n=Ne(vu.current),u=yn(),ge(r)){if(!Tr)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(n=r.stateNode,u=r.memoizedProps,b=!xl,p=null,y=Or,y!==null)switch(y.tag){case 3:b&&(b=eA(n,u,p),b!==null&&(ea(r,0).serverProps=b));break;case 27:case 5:p=y.memoizedProps,b&&(b=eA(n,u,p),b!==null&&(ea(r,0).serverProps=b))}bn(n,u,r,p)||oe(r,!0)}else Fh(r),r.stateNode=Co(p,n,u,r)}return jn(r),null;case 31:if(u=r.memoizedState,n===null||n.memoizedState!==null){if(p=ge(r),u!==null){if(n===null){if(!p)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Tr)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");Xn(n,r),jn(r),(r.mode&2)!==Wt&&u!==null&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration))}else Tt(),dt(),(r.flags&128)===0&&(u=r.memoizedState=null),r.flags|=4,jn(r),(r.mode&2)!==Wt&&u!==null&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration));n=!1}else u=at(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=u),n=!0;if(!n)return r.flags&256?(Ir(r),r):(Ir(r),null);if((r.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return jn(r),null;case 13:if(p=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=p,y=ge(r),b!==null&&b.dehydrated!==null){if(n===null){if(!y)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Tr)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");hs(y,r),jn(r),(r.mode&2)!==Wt&&b!==null&&(b=r.child,b!==null&&(r.treeBaseDuration-=b.treeBaseDuration))}else Tt(),dt(),(r.flags&128)===0&&(b=r.memoizedState=null),r.flags|=4,jn(r),(r.mode&2)!==Wt&&b!==null&&(b=r.child,b!==null&&(r.treeBaseDuration-=b.treeBaseDuration));b=!1}else b=at(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return r.flags&256?(Ir(r),r):(Ir(r),null)}return Ir(r),(r.flags&128)!==0?(r.lanes=u,(r.mode&2)!==Wt&&nd(r),r):(u=p!==null,n=n!==null&&n.memoizedState!==null,u&&(p=r.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),y=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(y=p.memoizedState.cachePool.pool),y!==b&&(p.flags|=2048)),u!==n&&u&&(r.child.flags|=8192),Jc(r,r.updateQueue),jn(r),(r.mode&2)!==Wt&&u&&(n=r.child,n!==null&&(r.treeBaseDuration-=n.treeBaseDuration)),null);case 4:return gt(r),Tg(n,r),n===null&&di(r.stateNode.containerInfo),jn(r),null;case 10:return vt(r.type,r),jn(r),null;case 19:if(_(Xi,r),p=r.memoizedState,p===null)return jn(r),null;if(b=(r.flags&128)!==0,y=p.rendering,y===null)if(b)Wl(p,!1);else{if(xi!==vc||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(y=md(n),y!==null){for(r.flags|=128,Wl(p,!1),n=y.updateQueue,r.updateQueue=n,Jc(r,n),r.subtreeFlags=0,n=u,u=r.child;u!==null;)Ni(u,n),u=u.sibling;return K(Xi,Xi.current&Fp|vA,r),Sn&&Ct(r,p.treeForkCount),r.child}n=n.sibling}p.tail!==null&&xn()>CA&&(r.flags|=128,b=!0,Wl(p,!1),r.lanes=4194304)}else{if(!b)if(n=md(y),n!==null){if(r.flags|=128,b=!0,n=n.updateQueue,r.updateQueue=n,Jc(r,n),Wl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!y.alternate&&!Sn)return jn(r),null}else 2*xn()-p.renderingStartTime>CA&&u!==536870912&&(r.flags|=128,b=!0,Wl(p,!1),r.lanes=4194304);p.isBackwards?(y.sibling=r.child,r.child=y):(n=p.last,n!==null?n.sibling=y:r.child=y,p.last=y)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=xn(),n.sibling=null,u=Xi.current,u=b?u&Fp|vA:u&Fp,K(Xi,u,r),Sn&&Ct(r,p.treeForkCount),n):(jn(r),null);case 22:case 23:return Ir(r),pd(r),p=r.memoizedState!==null,n!==null?n.memoizedState!==null!==p&&(r.flags|=8192):p&&(r.flags|=8192),p?(u&536870912)!==0&&(r.flags&128)===0&&(jn(r),r.subtreeFlags&6&&(r.flags|=8192)):jn(r),u=r.updateQueue,u!==null&&Jc(r,u.retryQueue),u=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),p=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(p=r.memoizedState.cachePool.pool),p!==u&&(r.flags|=2048),n!==null&&_(lf,r),null;case 24:return u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),vt(Ri,r),jn(r),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+r.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function al(n,r){switch(_e(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 3:return vt(Ri,r),gt(r),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Qi(r),null;case 31:if(r.memoizedState!==null){if(Ir(r),r.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");dt()}return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 13:if(Ir(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");dt()}return n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 19:return _(Xi,r),null;case 4:return gt(r),null;case 10:return vt(r.type,r),null;case 22:case 23:return Ir(r),pd(r),n!==null&&_(lf,r),n=r.flags,n&65536?(r.flags=n&-65537|128,(r.mode&2)!==Wt&&nd(r),r):null;case 24:return vt(Ri,r),null;case 25:return null;default:return null}}function Vh(n,r){switch(_e(r),r.tag){case 3:vt(Ri,r),gt(r);break;case 26:case 27:case 5:Qi(r);break;case 4:gt(r);break;case 31:r.memoizedState!==null&&Ir(r);break;case 13:Ir(r);break;case 19:_(Xi,r);break;case 10:vt(r.type,r);break;case 22:case 23:Ir(r),pd(r),n!==null&&_(lf,r);break;case 24:vt(Ri,r)}}function Fa(n){return(n.mode&2)!==Wt}function Cg(n,r){Fa(n)?(aa(),ol(r,n),sa()):ol(r,n)}function Rg(n,r,u){Fa(n)?(aa(),It(u,n,r),sa()):It(u,n,r)}function ol(n,r){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n&&(p=void 0,(n&As)!==sy&&(Jp=!0),p=xt(r,WP,u),(n&As)!==sy&&(Jp=!1),p!==void 0&&typeof p!="function")){var y=void 0;y=(u.tag&xa)!==0?"useLayoutEffect":(u.tag&As)!==0?"useInsertionEffect":"useEffect";var P=void 0;P=p===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof p.then=="function"?`
|
|
4405
4405
|
|
|
4406
4406
|
It looks like you wrote `+y+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
4407
4407
|
|
|
@@ -4414,7 +4414,7 @@ It looks like you wrote `+y+`(async () => ...) or returned a Promise. Instead, w
|
|
|
4414
4414
|
fetchData();
|
|
4415
4415
|
}, [someId]); // Or [] if effect doesn't need props or state
|
|
4416
4416
|
|
|
4417
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+p,xt(r,function(N,q){console.error("%s must not return anything besides a function, which is used for clean-up.%s",N,q)},y,P)}u=u.next}while(u!==b)}}catch(N){In(r,r.return,N)}}function It(n,r,u){try{var p=r.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var y=b.next;p=y;do{if((p.tag&n)===n){var P=p.inst,N=P.destroy;N!==void 0&&(P.destroy=void 0,(n&As)!==sy&&(Jp=!0),b=r,xt(b,jP,b,u,N),(n&As)!==sy&&(Jp=!1))}p=p.next}while(p!==y)}}catch(q){In(r,r.return,q)}}function Jv(n,r){Fa(n)?(aa(),ol(r,n),sa()):ol(r,n)}function Pg(n,r,u){Fa(n)?(aa(),It(u,n,r),sa()):It(u,n,r)}function kg(n){var r=n.updateQueue;if(r!==null){var u=n.stateNode;n.type.defaultProps||"ref"in n.memoizedProps||Gp||(u.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(n)||"instance"),u.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(n)||"instance"));try{xt(n,ig,r,u)}catch(p){In(n,n.return,p)}}}function Id(n,r,u){return n.getSnapshotBeforeUpdate(r,u)}function pS(n,r){var u=r.memoizedProps,p=r.memoizedState;r=n.stateNode,n.type.defaultProps||"ref"in n.memoizedProps||Gp||(r.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(n)||"instance"),r.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(n)||"instance"));try{var b=Ba(n.type,u),y=xt(n,Id,r,b,p);u=pE,y!==void 0||u.has(n.type)||(u.add(n.type),xt(n,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",V(n))})),r.__reactInternalSnapshotBeforeUpdate=y}catch(P){In(n,n.return,P)}}function Qv(n,r,u){u.props=Ba(n.type,n.memoizedProps),u.state=n.memoizedState,Fa(n)?(aa(),xt(n,IT,n,r,u),sa()):xt(n,IT,n,r,u)}function mS(n){var r=n.ref;if(r!==null){switch(n.tag){case 26:case 27:case 5:var u=Ur(n.stateNode);break;case 30:u=n.stateNode;break;default:u=n.stateNode}if(typeof r=="function")if(Fa(n))try{aa(),n.refCleanup=r(u)}finally{sa()}else n.refCleanup=r(u);else typeof r=="string"?console.error("String refs are no longer supported."):r.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",V(n)),r.current=u}}function Nd(n,r){try{xt(n,mS,n)}catch(u){In(n,r,u)}}function Oa(n,r){var u=n.ref,p=n.refCleanup;if(u!==null)if(typeof p=="function")try{if(Fa(n))try{aa(),xt(n,p)}finally{sa(n)}else xt(n,p)}catch(b){In(n,r,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof u=="function")try{if(Fa(n))try{aa(),xt(n,u,null)}finally{sa(n)}else xt(n,u,null)}catch(b){In(n,r,b)}else u.current=null}function Hh(n,r,u,p){var b=n.memoizedProps,y=b.id,P=b.onCommit;b=b.onRender,r=r===null?"mount":"update",K0&&(r="nested-update"),typeof b=="function"&&b(y,r,n.actualDuration,n.treeBaseDuration,n.actualStartTime,u),typeof P=="function"&&P(y,r,p,u)}function Zv(n,r,u,p){var b=n.memoizedProps;n=b.id,b=b.onPostCommit,r=r===null?"mount":"update",K0&&(r="nested-update"),typeof b=="function"&&b(n,r,p,u)}function zd(n){var r=n.type,u=n.memoizedProps,p=n.stateNode;try{xt(n,Zn,p,r,u,n)}catch(b){In(n,n.return,b)}}function Gh(n,r,u){try{xt(n,Bi,n.stateNode,n.type,u,r,n)}catch(p){In(n,n.return,p)}}function Kv(n){return n.tag===5||n.tag===3||(qn?n.tag===26:!1)||(R?n.tag===27&&$e(n.type):!1)||n.tag===4}function Dg(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Kv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(R&&n.tag===27&&$e(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function xo(n,r,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,r?cu(u,n,r):Ro(u,n);else if(p!==4&&(R&&p===27&&$e(n.type)&&(u=n.stateNode,r=null),n=n.child,n!==null))for(xo(n,r,u),n=n.sibling;n!==null;)xo(n,r,u),n=n.sibling}function zs(n,r,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,r?up(u,n,r):Ei(u,n);else if(p!==4&&(R&&p===27&&$e(n.type)&&(u=n.stateNode),n=n.child,n!==null))for(zs(n,r,u),n=n.sibling;n!==null;)zs(n,r,u),n=n.sibling}function Mr(n){for(var r,u=n.return;u!==null;){if(Kv(u)){r=u;break}u=u.return}if(li){if(r==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(r.tag){case 27:if(R){r=r.stateNode,u=Dg(n),zs(n,u,r);break}case 5:u=r.stateNode,r.flags&32&&(uu(u),r.flags&=-33),r=Dg(n),zs(n,r,u);break;case 3:case 4:r=r.stateNode.containerInfo,u=Dg(n),xo(n,u,r);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function fa(n,r,u){n=n.containerInfo;try{xt(r,pp,n,u)}catch(p){In(r,r.return,p)}}function fr(n){var r=n.stateNode,u=n.memoizedProps;try{xt(n,te,n.type,u,r,n)}catch(p){In(n,n.return,p)}}function _v(n,r){return r.tag===31?(r=r.memoizedState,n.memoizedState!==null&&r===null):r.tag===13?(n=n.memoizedState,r=r.memoizedState,n!==null&&n.dehydrated!==null&&(r===null||r.dehydrated===null)):r.tag===3?n.memoizedState.isDehydrated&&(r.flags&256)===0:!1}function gS(n,r){for(Xd(n.containerInfo),Er=r;Er!==null;)if(n=Er,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,Er=r;else for(;Er!==null;){r=n=Er;var u=r.alternate,p=r.flags;switch(r.tag){case 0:if((p&4)!==0&&(r=r.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)p=r[u],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:(p&1024)!==0&&u!==null&&pS(r,u);break;case 3:(p&1024)!==0&&li&&Kg(r.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(r=n.sibling,r!==null){r.return=n.return,Er=r;break}Er=n.return}}function Gi(n,r,u){var p=gi(),b=Da(),y=ia(),P=ra(),N=u.flags;switch(u.tag){case 0:case 11:case 15:Br(n,u),N&4&&Cg(u,xa|eo);break;case 1:if(Br(n,u),N&4)if(n=u.stateNode,r===null)u.type.defaultProps||"ref"in u.memoizedProps||Gp||(n.props!==u.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(u)||"instance"),n.state!==u.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(u)||"instance")),Fa(u)?(aa(),xt(u,JS,u,n),sa()):xt(u,JS,u,n);else{var q=Ba(u.type,r.memoizedProps);r=r.memoizedState,u.type.defaultProps||"ref"in u.memoizedProps||Gp||(n.props!==u.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(u)||"instance"),n.state!==u.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(u)||"instance")),Fa(u)?(aa(),xt(u,kT,u,n,q,r,n.__reactInternalSnapshotBeforeUpdate),sa()):xt(u,kT,u,n,q,r,n.__reactInternalSnapshotBeforeUpdate)}N&64&&kg(u),N&512&&Nd(u,u.return);break;case 3:if(r=zn(),Br(n,u),N&64&&(N=u.updateQueue,N!==null)){if(q=null,u.child!==null)switch(u.child.tag){case 27:case 5:q=Ur(u.child.stateNode);break;case 1:q=u.child.stateNode}try{xt(u,ig,N,q)}catch(Se){In(u,u.return,Se)}}n.effectDuration+=Wr(r);break;case 27:R&&r===null&&N&4&&fr(u);case 26:case 5:if(Br(n,u),r===null){if(N&4)zd(u);else if(N&64){n=u.type,r=u.memoizedProps,q=u.stateNode;try{xt(u,_g,q,n,r,u)}catch(Se){In(u,u.return,Se)}}}N&512&&Nd(u,u.return);break;case 12:if(N&4){N=zn(),Br(n,u),n=u.stateNode,n.effectDuration+=Dn(N);try{xt(u,Hh,u,r,bu,n.effectDuration)}catch(Se){In(u,u.return,Se)}}else Br(n,u);break;case 31:Br(n,u),N&4&&$v(n,u);break;case 13:Br(n,u),N&4&&e0(n,u),N&64&&(n=u.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(N=k0.bind(null,u),Fi(n,N))));break;case 22:if(N=u.memoizedState!==null||Ac,!N){r=r!==null&&r.memoizedState!==null||ir,q=Ac;var se=ir;Ac=N,(ir=r)&&!se?(Ha(n,u,(u.subtreeFlags&8772)!==0),(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(u,Ut,Vt)):Br(n,u),Ac=q,ir=se}break;case 30:break;default:Br(n,u)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),u.alternate===null&&u.return!==null&&u.return.alternate!==null&&.05<Vt-Ut&&(_v(u.return.alternate,u.return)||Ze(u,Ut,Vt,"Mount"))),cr(p),na(b),hi=y,Pi=P}function Va(n){var r=n.alternate;r!==null&&(n.alternate=null,Va(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Jg(r)),n.stateNode=null,n._debugOwner=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function ha(n,r,u){for(u=u.child;u!==null;)Lg(n,r,u),u=u.sibling}function Lg(n,r,u){if(es&&typeof es.onCommitFiberUnmount=="function")try{es.onCommitFiberUnmount(Ep,u)}catch(se){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",se))}var p=gi(),b=Da(),y=ia(),P=ra();switch(u.tag){case 26:if(qn){ir||Oa(u,r),ha(n,r,u),u.memoizedState?wp(u.memoizedState):u.stateNode&&Tp(u.stateNode);break}case 27:if(R){ir||Oa(u,r);var N=rr,q=Ws;$e(u.type)&&(rr=u.stateNode,Ws=!1),ha(n,r,u),xt(u,Re,u.stateNode),rr=N,Ws=q;break}case 5:ir||Oa(u,r);case 6:if(li){if(N=rr,q=Ws,rr=null,ha(n,r,u),rr=N,Ws=q,rr!==null)if(Ws)try{xt(u,dp,rr,u.stateNode)}catch(se){In(u,r,se)}else try{xt(u,tc,rr,u.stateNode)}catch(se){In(u,r,se)}}else ha(n,r,u);break;case 18:li&&rr!==null&&(Ws?fu(rr,u.stateNode):ps(rr,u.stateNode));break;case 4:li?(N=rr,q=Ws,rr=u.stateNode.containerInfo,Ws=!0,ha(n,r,u),rr=N,Ws=q):(Xa&&fa(u.stateNode,u,fp()),ha(n,r,u));break;case 0:case 11:case 14:case 15:It(As,u,r),ir||Rg(u,r,xa),ha(n,r,u);break;case 1:ir||(Oa(u,r),N=u.stateNode,typeof N.componentWillUnmount=="function"&&Qv(u,r,N)),ha(n,r,u);break;case 21:ha(n,r,u);break;case 22:ir=(N=ir)||u.memoizedState!==null,ha(n,r,u),ir=N;break;default:ha(n,r,u)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),cr(p),na(b),hi=y,Pi=P}function $v(n,r){if(Tr&&r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{xt(r,vi,n)}catch(u){In(r,r.return,u)}}}function e0(n,r){if(Tr&&r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{xt(r,ml,n)}catch(u){In(r,r.return,u)}}function AS(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new mE),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new mE),r;default:throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}}function Qc(n,r){var u=AS(n);r.forEach(function(p){if(!u.has(p)){if(u.add(p),yl)if(Wp!==null&&jp!==null)$c(jp,Wp);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var b=wS.bind(null,n,p);p.then(b,b)}})}function hr(n,r){var u=r.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=n,y=r,P=u[p],N=gi();if(li){var q=y;e:for(;q!==null;){switch(q.tag){case 27:if(R){if($e(q.type)){rr=q.stateNode,Ws=!1;break e}break}case 5:rr=q.stateNode,Ws=!1;break e;case 3:case 4:rr=q.stateNode.containerInfo,Ws=!0;break e}q=q.return}if(rr===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Lg(b,y,P),rr=null,Ws=!1}else Lg(b,y,P);(P.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(P,Ut,Vt,"Unmount"),cr(N),b=P,y=b.alternate,y!==null&&(y.return=null),b.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)t0(r,n),r=r.sibling}function t0(n,r){var u=gi(),p=Da(),b=ia(),y=ra(),P=n.alternate,N=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:hr(r,n),wr(n),N&4&&(It(As|eo,n,n.return),ol(As|eo,n),Rg(n,n.return,xa|eo));break;case 1:hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),N&64&&Ac&&(N=n.updateQueue,N!==null&&(P=N.callbacks,P!==null&&(r=N.shared.hiddenCallbacks,N.shared.hiddenCallbacks=r===null?P:r.concat(P))));break;case 26:if(qn){var q=zo;hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),N&4&&(N=P!==null?P.memoizedState:null,r=n.memoizedState,P===null?r===null?n.stateNode===null?n.stateNode=G0(q,n.type,n.memoizedProps,n):pu(q,n.type,n.stateNode):n.stateNode=Mp(q,r,n.memoizedProps):N!==r?(N===null?P.stateNode!==null&&Tp(P.stateNode):wp(N),r===null?pu(q,n.type,n.stateNode):Mp(q,r,n.memoizedProps)):r===null&&n.stateNode!==null&&Gh(n,n.memoizedProps,P.memoizedProps));break}case 27:if(R){hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),P!==null&&N&4&&Gh(n,n.memoizedProps,P.memoizedProps);break}case 5:if(hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),li){if(n.flags&32){r=n.stateNode;try{xt(n,uu,r)}catch(ti){In(n,n.return,ti)}}N&4&&n.stateNode!=null&&(r=n.memoizedProps,Gh(n,r,P!==null?P.memoizedProps:r)),N&1024&&(lM=!0,n.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Xa&&n.alternate!==null&&(n.alternate.stateNode=n.stateNode);break;case 6:if(hr(r,n),wr(n),N&4&&li){if(n.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");N=n.memoizedProps,P=P!==null?P.memoizedProps:N,r=n.stateNode;try{xt(n,tn,r,P,N)}catch(ti){In(n,n.return,ti)}}break;case 3:if(q=zn(),qn){l();var se=zo;zo=Al(r.containerInfo),hr(r,n),zo=se}else hr(r,n);if(wr(n),N&4){if(li&&Tr&&P!==null&&P.memoizedState.isDehydrated)try{xt(n,Po,r.containerInfo)}catch(ti){In(n,n.return,ti)}if(Xa){N=r.containerInfo,P=r.pendingChildren;try{xt(n,pp,N,P)}catch(ti){In(n,n.return,ti)}}}lM&&(lM=!1,n0(n)),r.effectDuration+=Wr(q);break;case 4:qn?(P=zo,zo=Al(n.stateNode.containerInfo),hr(r,n),wr(n),zo=P):(hr(r,n),wr(n)),N&4&&Xa&&fa(n.stateNode,n,n.stateNode.pendingChildren);break;case 12:N=zn(),hr(r,n),wr(n),n.stateNode.effectDuration+=Dn(N);break;case 31:hr(r,n),wr(n),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 13:hr(r,n),wr(n),n.child.flags&8192&&n.memoizedState!==null!=(P!==null&&P.memoizedState!==null)&&(xy=xn()),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 22:q=n.memoizedState!==null;var Se=P!==null&&P.memoizedState!==null,Ee=Ac,ze=ir;if(Ac=Ee||q,ir=ze||Se,hr(r,n),ir=ze,Ac=Ee,Se&&!q&&!Ee&&!ze&&(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(n,Ut,Vt),wr(n),N&8192&&(r=n.stateNode,r._visibility=q?r._visibility&~AA:r._visibility|AA,!q||P===null||Se||Ac||ir||(jl(n),(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(n,Ut,Vt,"Disconnect")),li)){e:if(P=null,li)for(r=n;;){if(r.tag===5||qn&&r.tag===26){if(P===null){Se=P=r;try{se=Se.stateNode,q?xt(Se,du,se):xt(Se,Jd,Se.stateNode,Se.memoizedProps)}catch(ti){In(Se,Se.return,ti)}}}else if(r.tag===6){if(P===null){Se=r;try{var Lt=Se.stateNode;q?xt(Se,RS,Lt):xt(Se,V0,Lt,Se.memoizedProps)}catch(ti){In(Se,Se.return,ti)}}}else if(r.tag===18){if(P===null){Se=r;try{var qt=Se.stateNode;q?xt(Se,Kd,qt):xt(Se,$r,Se.stateNode)}catch(ti){In(Se,Se.return,ti)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;P===r&&(P=null),r=r.return}P===r&&(P=null),r.sibling.return=r.return,r=r.sibling}}N&4&&(N=n.updateQueue,N!==null&&(P=N.retryQueue,P!==null&&(N.retryQueue=null,Qc(n,P))));break;case 19:hr(r,n),wr(n),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 30:break;case 21:break;default:hr(r,n),wr(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Vt-Ut&&(_v(n.return.alternate,n.return)||Ze(n,Ut,Vt,"Mount"))),cr(u),na(p),hi=b,Pi=y}function wr(n){var r=n.flags;if(r&2){try{xt(n,Mr,n)}catch(u){In(n,n.return,u)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function n0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;n0(r),r.tag===5&&r.flags&1024&&Yd(r.stateNode),n=n.sibling}}function Br(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Gi(n,r.alternate,r),r=r.sibling}function ll(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 14:case 15:Rg(n,n.return,xa),jl(n);break;case 1:Oa(n,n.return);var y=n.stateNode;typeof y.componentWillUnmount=="function"&&Qv(n,n.return,y),jl(n);break;case 27:R&&xt(n,Re,n.stateNode);case 26:case 5:Oa(n,n.return),jl(n);break;case 22:n.memoizedState===null&&jl(n);break;case 30:jl(n);break;default:jl(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),hi=p,Pi=b}function jl(n){for(n=n.child;n!==null;)ll(n),n=n.sibling}function i0(n,r,u,p){var b=gi(),y=Da(),P=ia(),N=ra(),q=u.flags;switch(u.tag){case 0:case 11:case 15:Ha(n,u,p),Cg(u,xa);break;case 1:if(Ha(n,u,p),r=u.stateNode,typeof r.componentDidMount=="function"&&xt(u,JS,u,r),r=u.updateQueue,r!==null){n=u.stateNode;try{xt(u,ng,r,n)}catch(se){In(u,u.return,se)}}p&&q&64&&kg(u),Nd(u,u.return);break;case 27:R&&fr(u);case 26:case 5:Ha(n,u,p),p&&r===null&&q&4&&zd(u),Nd(u,u.return);break;case 12:if(p&&q&4){q=zn(),Ha(n,u,p),p=u.stateNode,p.effectDuration+=Dn(q);try{xt(u,Hh,u,r,bu,p.effectDuration)}catch(se){In(u,u.return,se)}}else Ha(n,u,p);break;case 31:Ha(n,u,p),p&&q&4&&$v(n,u);break;case 13:Ha(n,u,p),p&&q&4&&e0(n,u);break;case 22:u.memoizedState===null&&Ha(n,u,p),Nd(u,u.return);break;case 30:break;default:Ha(n,u,p)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),cr(b),na(y),hi=P,Pi=N}function Ha(n,r,u){for(u=u&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;)i0(n,r.alternate,r,u),r=r.sibling}function Xl(n,r){var u=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==u&&(n!=null&&Ii(n),u!=null&&yr(u))}function Ig(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(Ii(r),n!=null&&yr(n))}function pa(n,r,u,p,b){if(r.subtreeFlags&10256||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child))for(r=r.child;r!==null;){var y=r.sibling;r0(n,r,u,p,y!==null?y.actualStartTime:b),r=y}}function r0(n,r,u,p,b){var y=gi(),P=Da(),N=ia(),q=ra(),se=mu,Se=r.flags;switch(r.tag){case 0:case 11:case 15:(r.mode&2)!==Wt&&0<r.actualStartTime&&(r.flags&1)!==0&&bt(r,r.actualStartTime,b,gr,u),pa(n,r,u,p,b),Se&2048&&Jv(r,vs|eo);break;case 1:(r.mode&2)!==Wt&&0<r.actualStartTime&&((r.flags&128)!==0?zt(r,r.actualStartTime,b,[]):(r.flags&1)!==0&&bt(r,r.actualStartTime,b,gr,u)),pa(n,r,u,p,b);break;case 3:var Ee=zn(),ze=gr;gr=r.alternate!==null&&r.alternate.memoizedState.isDehydrated&&(r.flags&256)===0,pa(n,r,u,p,b),gr=ze,Se&2048&&(u=null,r.alternate!==null&&(u=r.alternate.memoizedState.cache),p=r.memoizedState.cache,p!==u&&(Ii(p),u!=null&&yr(u))),n.passiveEffectDuration+=Wr(Ee);break;case 12:if(Se&2048){Se=zn(),pa(n,r,u,p,b),n=r.stateNode,n.passiveEffectDuration+=Dn(Se);try{xt(r,Zv,r,r.alternate,bu,n.passiveEffectDuration)}catch(Lt){In(r,r.return,Lt)}}else pa(n,r,u,p,b);break;case 31:Se=gr,Ee=r.alternate!==null?r.alternate.memoizedState:null,ze=r.memoizedState,Ee!==null&&ze===null?(ze=r.deletions,ze!==null&&0<ze.length&&ze[0].tag===18?(gr=!1,Ee=Ee.hydrationErrors,Ee!==null&&zt(r,r.actualStartTime,b,Ee)):gr=!0):gr=!1,pa(n,r,u,p,b),gr=Se;break;case 13:Se=gr,Ee=r.alternate!==null?r.alternate.memoizedState:null,ze=r.memoizedState,Ee===null||Ee.dehydrated===null||ze!==null&&ze.dehydrated!==null?gr=!1:(ze=r.deletions,ze!==null&&0<ze.length&&ze[0].tag===18?(gr=!1,Ee=Ee.hydrationErrors,Ee!==null&&zt(r,r.actualStartTime,b,Ee)):gr=!0),pa(n,r,u,p,b),gr=Se;break;case 23:break;case 22:ze=r.stateNode,Ee=r.alternate,r.memoizedState!==null?ze._visibility&hc?pa(n,r,u,p,b):Bd(n,r,u,p,b):ze._visibility&hc?pa(n,r,u,p,b):(ze._visibility|=hc,Ga(n,r,u,p,(r.subtreeFlags&10256)!==0||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child),b),(r.mode&2)===Wt||gr||(n=r.actualStartTime,0<=n&&.05<b-n&&Pt(r,n,b),0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(r,Ut,Vt))),Se&2048&&Xl(Ee,r);break;case 24:pa(n,r,u,p,b),Se&2048&&Ig(r.alternate,r);break;default:pa(n,r,u,p,b)}(r.mode&2)!==Wt&&((n=!gr&&r.alternate===null&&r.return!==null&&r.return.alternate!==null)&&(u=r.actualStartTime,0<=u&&.05<b-u&&Ze(r,u,b,"Mount")),0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(r,Ut,Vt,bi,hi),n&&.05<Vt-Ut&&Ze(r,Ut,Vt,"Mount"))),cr(y),na(P),hi=N,Pi=q,mu=se}function Ga(n,r,u,p,b,y){for(b=b&&((r.subtreeFlags&10256)!==0||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child)),r=r.child;r!==null;){var P=r.sibling;s0(n,r,u,p,b,P!==null?P.actualStartTime:y),r=P}}function s0(n,r,u,p,b,y){var P=gi(),N=Da(),q=ia(),se=ra(),Se=mu;b&&(r.mode&2)!==Wt&&0<r.actualStartTime&&(r.flags&1)!==0&&bt(r,r.actualStartTime,y,gr,u);var Ee=r.flags;switch(r.tag){case 0:case 11:case 15:Ga(n,r,u,p,b,y),Jv(r,vs);break;case 23:break;case 22:var ze=r.stateNode;r.memoizedState!==null?ze._visibility&hc?Ga(n,r,u,p,b,y):Bd(n,r,u,p,y):(ze._visibility|=hc,Ga(n,r,u,p,b,y)),b&&Ee&2048&&Xl(r.alternate,r);break;case 24:Ga(n,r,u,p,b,y),b&&Ee&2048&&Ig(r.alternate,r);break;default:Ga(n,r,u,p,b,y)}(r.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(r,Ut,Vt,bi,hi),cr(P),na(N),hi=q,Pi=se,mu=Se}function Bd(n,r,u,p,b){if(r.subtreeFlags&10256||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child))for(var y=r.child;y!==null;){r=y.sibling;var P=n,N=u,q=p,se=r!==null?r.actualStartTime:b,Se=mu;(y.mode&2)!==Wt&&0<y.actualStartTime&&(y.flags&1)!==0&&bt(y,y.actualStartTime,se,gr,N);var Ee=y.flags;switch(y.tag){case 22:Bd(P,y,N,q,se),Ee&2048&&Xl(y.alternate,y);break;case 24:Bd(P,y,N,q,se),Ee&2048&&Ig(y.alternate,y);break;default:Bd(P,y,N,q,se)}mu=Se,y=r}}function ql(n,r,u){if(n.subtreeFlags&Xp)for(n=n.child;n!==null;)a0(n,r,u),n=n.sibling}function a0(n,r,u){switch(n.tag){case 26:if(ql(n,r,u),n.flags&Xp)if(n.memoizedState!==null)E(u,zo,n.memoizedState,n.memoizedProps);else{var p=n.stateNode,b=n.type;n=n.memoizedProps,((r&335544128)===r||sp(b,n))&&ap(u,p,b,n)}break;case 5:ql(n,r,u),n.flags&Xp&&(p=n.stateNode,b=n.type,n=n.memoizedProps,((r&335544128)===r||sp(b,n))&&ap(u,p,b,n));break;case 3:case 4:qn?(p=zo,zo=Al(n.stateNode.containerInfo),ql(n,r,u),zo=p):ql(n,r,u);break;case 22:n.memoizedState===null&&(p=n.alternate,p!==null&&p.memoizedState!==null?(p=Xp,Xp=16777216,ql(n,r,u),Xp=p):ql(n,r,u));break;default:ql(n,r,u)}}function o0(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Ud(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var u=0;u<r.length;u++){var p=r[u],b=gi();Er=p,u0(p,n),(p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(p,Ut,Vt,"Unmount"),cr(b)}o0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)l0(n),n=n.sibling}function l0(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 15:Ud(n),n.flags&2048&&Pg(n,n.return,vs|eo);break;case 3:var y=zn();Ud(n),n.stateNode.passiveEffectDuration+=Wr(y);break;case 12:y=zn(),Ud(n),n.stateNode.passiveEffectDuration+=Dn(y);break;case 22:y=n.stateNode,n.memoizedState!==null&&y._visibility&hc&&(n.return===null||n.return.tag!==13)?(y._visibility&=~hc,Wh(n),(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(n,Ut,Vt,"Disconnect")):Ud(n);break;default:Ud(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),Pi=b,hi=p}function Wh(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var u=0;u<r.length;u++){var p=r[u],b=gi();Er=p,u0(p,n),(p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(p,Ut,Vt,"Unmount"),cr(b)}o0(n)}for(n=n.child;n!==null;)c0(n),n=n.sibling}function c0(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 15:Pg(n,n.return,vs),Wh(n);break;case 22:var y=n.stateNode;y._visibility&hc&&(y._visibility&=~hc,Wh(n));break;default:Wh(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),Pi=b,hi=p}function u0(n,r){for(;Er!==null;){var u=Er,p=u,b=r,y=gi(),P=Da(),N=ia(),q=ra();switch(p.tag){case 0:case 11:case 15:Pg(p,b,vs);break;case 23:case 22:p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool,b!=null&&Ii(b));break;case 24:yr(p.memoizedState.cache)}if((p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(p,Ut,Vt,bi,hi),cr(y),na(P),Pi=q,hi=N,p=u.child,p!==null)p.return=u,Er=p;else e:for(u=n;Er!==null;){if(p=Er,y=p.sibling,P=p.return,Va(p),p===u){Er=null;break e}if(y!==null){y.return=P,Er=y;break e}Er=P}}}function Ng(n){var r=CS(n);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return r}if(n=Qg(n),n===null)throw Error("Could not find React container within specified host subtree.");return n.stateNode.current}function zg(n,r){var u=n.tag;switch(r.$$typeof){case uy:if(n.type===r.value)return!0;break;case dy:e:{for(r=r.value,n=[n,0],u=0;u<n.length;){var p=n[u++],b=p.tag,y=n[u++],P=r[y];if(b!==5&&b!==26&&b!==27||!qa(p)){for(;P!=null&&zg(p,P);)y++,P=r[y];if(y===r.length){r=!0;break e}else for(p=p.child;p!==null;)n.push(p,y),p=p.sibling}}r=!1}return r;case fy:if((u===5||u===26||u===27)&&cp(n.stateNode,r.value))return!0;break;case py:if((u===5||u===6||u===26||u===27)&&(n=Zg(n),n!==null&&0<=n.indexOf(r.value)))return!0;break;case hy:if((u===5||u===26||u===27)&&(n=n.memoizedProps["data-testname"],typeof n=="string"&&n.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function jh(n){switch(n.$$typeof){case uy:return"<"+(F(n.value)||"Unknown")+">";case dy:return":has("+(jh(n)||"")+")";case fy:return'[role="'+n.value+'"]';case py:return'"'+n.value+'"';case hy:return'[data-testname="'+n.value+'"]';default:throw Error("Invalid selector type specified.")}}function d0(n,r){var u=[];n=[n,0];for(var p=0;p<n.length;){var b=n[p++],y=b.tag,P=n[p++],N=r[P];if(y!==5&&y!==26&&y!==27||!qa(b)){for(;N!=null&&zg(b,N);)P++,N=r[P];if(P===r.length)u.push(b);else for(b=b.child;b!==null;)n.push(b,P),b=b.sibling}}return u}function Xh(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");n=Ng(n),n=d0(n,r),r=[],n=Array.from(n);for(var u=0;u<n.length;){var p=n[u++],b=p.tag;if(b===5||b===26||b===27)qa(p)||r.push(p.stateNode);else for(p=p.child;p!==null;)n.push(p),p=p.sibling}return r}function vS(){ga&&my.forEach(function(n){return n()})}function f0(){var n=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return n||be.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),n}function ds(n){if((Mn&Rr)!==Cr&&cn!==0)return cn&-cn;var r=be.T;return r!==null?(r._updatedFibers||(r._updatedFibers=new Set),r._updatedFibers.add(n),$f()):Yg()}function h0(){if(Xs===0)if((cn&536870912)===0||Sn){var n=we;we<<=1,(we&3932160)===0&&(we=262144),Xs=n}else Xs=536870912;return n=ba.current,n!==null&&(n.flags|=32),Xs}function ai(n,r,u){if(Jp&&console.error("useInsertionEffect must not schedule updates."),bM&&(wy=!0),(n===ri&&(Kn===pf||Kn===mf)||n.cancelPendingCommit!==null)&&(Zc(n,0),So(n,cn,Xs,!1)),Te(n,u),(Mn&Rr)!==Cr&&n===ri){if(bl)switch(r.tag){case 0:case 11:case 15:n=pn&&V(pn)||"Unknown",PE.has(n)||(PE.add(n),r=V(r)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",r,n,n));break;case 1:RE||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),RE=!0)}}else yl&&Xe(n,r,u),L0(r),n===ri&&((Mn&Rr)===Cr&&(Ru|=u),xi===Tu&&So(n,cn,Xs,!1)),Lr(n)}function Bg(n,r,u){if((Mn&(Rr|no))!==Cr)throw Error("Should not already be working.");if(cn!==0&&pn!==null){var p=pn,b=xn();switch(ST){case wA:case pf:var y=oA;ci&&((p=p._debugTask)?p.run(console.timeStamp.bind(console,"Suspended",y,b,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",y,b,"Components ⚛",void 0,"primary-light"));break;case mf:y=oA,ci&&((p=p._debugTask)?p.run(console.timeStamp.bind(console,"Action",y,b,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",y,b,"Components ⚛",void 0,"primary-light"));break;default:ci&&(p=b-oA,3>p||console.timeStamp("Blocked",oA,b,"Components ⚛",void 0,5>p?"primary-light":10>p?"primary":100>p?"primary-dark":"error"))}}y=(u=!u&&(r&127)===0&&(r&n.expiredLanes)===0||Q(n,r))?yS(n,r):Fg(n,r,!0);var P=u;do{if(y===vc){qp&&!u&&So(n,r,0,!1),r=Kn,oA=er(),ST=r;break}else{if(p=xn(),b=n.current.alternate,P&&!m0(b)){qe(r),b=ts,y=p,!ci||y<=b||(Oi?Oi.run(console.timeStamp.bind(console,"Teared Render",b,y,En,"Scheduler ⚛","error")):console.timeStamp("Teared Render",b,y,En,"Scheduler ⚛","error")),Yl(r,p),y=Fg(n,r,!1),P=!1;continue}if(y===hf){if(P=r,n.errorRecoveryDisabledLanes&P)var N=0;else N=n.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){qe(r),B(ts,p,r,Oi),Yl(r,p),r=N;e:{p=n,y=P,P=EA;var q=Tr&&p.current.memoizedState.isDehydrated;if(q&&(Zc(p,N).flags|=256),N=Fg(p,N,!1),N!==hf){if(dM&&!q){p.errorRecoveryDisabledLanes|=y,Ru|=y,y=Tu;break e}p=ys,ys=P,p!==null&&(ys===null?ys=p:ys.push.apply(ys,p))}y=N}if(P=!1,y!==hf)continue;p=xn()}}if(y===MA){qe(r),B(ts,p,r,Oi),Yl(r,p),Zc(n,0),So(n,r,0,!0);break}e:{switch(u=n,y){case vc:case MA:throw Error("Root did not complete. This is a bug in React.");case Tu:if((r&4194048)!==r)break;case Ay:qe(r),Cn(ts,p,r,Oi),Yl(r,p),b=r,(b&127)!==0?Q0=p:(b&4194048)!==0&&(Z0=p),So(u,r,Xs,!Eu);break e;case hf:ys=null;break;case gy:case gE:break;default:throw Error("Unknown root exit status.")}if(be.actQueue!==null)Og(u,b,r,ys,RA,by,Xs,Ru,gf,y,null,null,ts,p);else{if((r&62914560)===r&&(P=xy+yE-xn(),10<P)){if(So(u,r,Xs,!Eu),j(u,0,!0)!==0)break e;Bo=r,u.timeoutHandle=Os(p0.bind(null,u,b,ys,RA,by,r,Xs,Ru,gf,Eu,y,"Throttled",ts,p),P);break e}p0(u,b,ys,RA,by,r,Xs,Ru,gf,Eu,y,null,ts,p)}}}break}while(!0);Lr(n)}function p0(n,r,u,p,b,y,P,N,q,se,Se,Ee,ze,Lt){n.timeoutHandle=ja;var qt=r.subtreeFlags,ti=null;if((qt&8192||(qt&16785408)===16785408)&&(ti=lu(),a0(r,y,ti),qt=(y&62914560)===y?xy-xn():(y&4194048)===y?vE-xn():0,qt=op(ti,qt),qt!==null)){Bo=y,n.cancelPendingCommit=qt(Og.bind(null,n,r,y,u,p,b,P,N,q,Se,ti,lp(ti,n.containerInfo),ze,Lt)),So(n,y,P,!se);return}Og(n,r,y,u,p,b,P,N,q,Se,ti,Ee,ze,Lt)}function m0(n){for(var r=n;;){var u=r.tag;if((u===0||u===11||u===15)&&r.flags&16384&&(u=r.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var b=u[p],y=b.getSnapshot;b=b.value;try{if(!ms(y(),b))return!1}catch{return!1}}if(u=r.child,r.subtreeFlags&16384&&u!==null)u.return=r,r=u;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function So(n,r,u,p){r&=~fM,r&=~Ru,n.suspendedLanes|=r,n.pingedLanes&=~r,p&&(n.warmLanes|=r),p=n.expirationTimes;for(var b=r;0<b;){var y=31-ji(b),P=1<<y;p[y]=-1,b&=~P}u!==0&<(n,u,r)}function Fd(){return(Mn&(Rr|no))===Cr?(Bl(0),!1):!0}function Od(){return(Mn&(Rr|no))!==Cr}function Vd(){if(pn!==null){if(Kn===js)var n=pn.return;else n=pn,Xt(),Ad(n),zp=null,gA=0,n=pn;for(;n!==null;)Vh(n.alternate,n),n=n.return;pn=null}}function Yl(n,r){(n&127)!==0&&(nf=r),(n&4194048)!==0&&(dc=r)}function Zc(n,r){ci&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var u=ts;if(ts=er(),cn!==0&&0<u){if(qe(cn),xi===gy||xi===Tu)Cn(u,ts,r,Oi);else{var p=ts,b=Oi;if(ci&&!(p<=u)){var y=(r&738197653)===r?"tertiary-dark":"primary-dark",P=(r&536870912)===r?"Prewarm":(r&201326741)===r?"Interrupted Hydration":"Interrupted Render";b?b.run(console.timeStamp.bind(console,P,u,p,En,"Scheduler ⚛",y)):console.timeStamp(P,u,p,En,"Scheduler ⚛",y)}}Yl(cn,ts)}if(u=Oi,Oi=null,(r&127)!==0){Oi=rA,b=0<=Sl&&Sl<nf?nf:Sl,p=0<=rf&&rf<nf?nf:rf,y=0<=p?p:0<=b?b:ts,0<=Q0&&(qe(2),an(Q0,y,r,u)),u=b;var N=p,q=sA,se=0<Dp,Se=xu===1,Ee=xu===2;if(b=ts,p=rA,y=OS,P=VS,ci){if(En="Blocking",0<u?u>b&&(u=b):u=b,0<N?N>u&&(N=u):N=u,q!==null&&u>N){var ze=se?"secondary-light":"warning";p?p.run(console.timeStamp.bind(console,se?"Consecutive":"Event: "+q,N,u,En,"Scheduler ⚛",ze)):console.timeStamp(se?"Consecutive":"Event: "+q,N,u,En,"Scheduler ⚛",ze)}b>u&&(N=Se?"error":(r&738197653)===r?"tertiary-light":"primary-light",Se=Ee?"Promise Resolved":Se?"Cascading Update":5<b-u?"Update Blocked":"Update",Ee=[],P!=null&&Ee.push(["Component name",P]),y!=null&&Ee.push(["Method name",y]),u={start:u,end:b,detail:{devtools:{properties:Ee,track:En,trackGroup:"Scheduler ⚛",color:N}}},p?p.run(performance.measure.bind(performance,Se,u)):performance.measure(Se,u))}Sl=-1.1,xu=0,VS=OS=null,Q0=-1.1,Dp=rf,rf=-1.1,nf=er()}if((r&4194048)!==0&&(Oi=aA,b=0<=fc&&fc<dc?dc:fc,u=0<=_a&&_a<dc?dc:_a,p=0<=Su&&Su<dc?dc:Su,y=0<=p?p:0<=u?u:ts,0<=Z0&&(qe(256),an(Z0,y,r,Oi)),Ee=p,N=sf,q=0<Mu,se=HS===2,y=ts,p=aA,P=yT,Se=bT,ci&&(En="Transition",0<u?u>y&&(u=y):u=y,0<b?b>u&&(b=u):b=u,0<Ee?Ee>b&&(Ee=b):Ee=b,b>Ee&&N!==null&&(ze=q?"secondary-light":"warning",p?p.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+N,Ee,b,En,"Scheduler ⚛",ze)):console.timeStamp(q?"Consecutive":"Event: "+N,Ee,b,En,"Scheduler ⚛",ze)),u>b&&(p?p.run(console.timeStamp.bind(console,"Action",b,u,En,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",b,u,En,"Scheduler ⚛","primary-dark")),y>u&&(b=se?"Promise Resolved":5<y-u?"Update Blocked":"Update",Ee=[],Se!=null&&Ee.push(["Component name",Se]),P!=null&&Ee.push(["Method name",P]),u={start:u,end:y,detail:{devtools:{properties:Ee,track:En,trackGroup:"Scheduler ⚛",color:"primary-light"}}},p?p.run(performance.measure.bind(performance,b,u)):performance.measure(b,u))),_a=fc=-1.1,HS=0,Z0=-1.1,Mu=Su,Su=-1.1,dc=er()),u=n.timeoutHandle,u!==ja&&(n.timeoutHandle=ja,qg(u)),u=n.cancelPendingCommit,u!==null&&(n.cancelPendingCommit=null,u()),Bo=0,Vd(),ri=n,pn=u=Mo(n.current,null),cn=r,Kn=js,Sa=null,Eu=!1,qp=Q(n,r),dM=!1,xi=vc,gf=Xs=fM=Ru=Cu=0,ys=EA=null,by=!1,(r&8)!==0&&(r|=r&32),p=n.entangledLanes,p!==0)for(n=n.entanglements,p&=r;0<p;)b=31-ji(p),y=1<<b,r|=n[b],p&=~y;return wl=r,Fc(),n=lT(),1e3<n-oT&&(be.recentlyCreatedOwnerStacks=0,oT=n),Lo.discardPendingWarnings(),u}function g0(n,r){Jt=null,be.H=xA,be.getCurrentStack=null,bl=!1,lc=null,r===Np||r===ny?(r=_m(),Kn=wA):r===QS?(r=_m(),Kn=AE):Kn=r===aM?uM:r!==null&&typeof r=="object"&&typeof r.then=="function"?TA:vy,Sa=r;var u=pn;u===null?(xi=MA,Td(n,mt(r,n.current))):u.mode&2&&Zf(u)}function A0(){var n=ba.current;return n===null?!0:(cn&4194048)===cn?Io===null:(cn&62914560)===cn||(cn&536870912)!==0?n===Io:!1}function Ug(){var n=be.H;return be.H=xA,n===null?xA:n}function v0(){var n=be.A;return be.A=JP,n}function qh(n){Oi===null&&(Oi=n._debugTask==null?null:n._debugTask)}function Yh(){xi=Tu,Eu||(cn&4194048)!==cn&&ba.current!==null||(qp=!0),(Cu&134217727)===0&&(Ru&134217727)===0||ri===null||So(ri,cn,Xs,!1)}function Fg(n,r,u){var p=Mn;Mn|=Rr;var b=Ug(),y=v0();if(ri!==n||cn!==r){if(yl){var P=n.memoizedUpdaters;0<P.size&&($c(n,cn),P.clear()),He(n,r)}RA=null,Zc(n,r)}r=!1,P=xi;e:do try{if(Kn!==js&&pn!==null){var N=pn,q=Sa;switch(Kn){case uM:Vd(),P=Ay;break e;case wA:case pf:case mf:case TA:ba.current===null&&(r=!0);var se=Kn;if(Kn=js,Sa=null,Kc(n,N,q,se),u&&qp){P=vc;break e}break;default:se=Kn,Kn=js,Sa=null,Kc(n,N,q,se)}}y0(),P=xi;break}catch(Se){g0(n,Se)}while(!0);return r&&n.shellSuspendCounter++,Xt(),Mn=p,be.H=b,be.A=y,pn===null&&(ri=null,cn=0,Fc()),P}function y0(){for(;pn!==null;)b0(pn)}function yS(n,r){var u=Mn;Mn|=Rr;var p=Ug(),b=v0();if(ri!==n||cn!==r){if(yl){var y=n.memoizedUpdaters;0<y.size&&($c(n,cn),y.clear()),He(n,r)}RA=null,CA=xn()+hM,Zc(n,r)}else qp=Q(n,r);e:do try{if(Kn!==js&&pn!==null)t:switch(r=pn,y=Sa,Kn){case vy:Kn=js,Sa=null,Kc(n,r,y,vy);break;case pf:case mf:if(Km(y)){Kn=js,Sa=null,x0(r);break}r=function(){Kn!==pf&&Kn!==mf||ri!==n||(Kn=yy),Lr(n)},y.then(r,r);break e;case wA:Kn=yy;break e;case AE:Kn=cM;break e;case yy:Km(y)?(Kn=js,Sa=null,x0(r)):(Kn=js,Sa=null,Kc(n,r,y,yy));break;case cM:var P=null;switch(pn.tag){case 26:P=pn.memoizedState;case 5:case 27:var N=pn,q=N.type,se=N.pendingProps;if(P?A(P):dl(N.stateNode,q,se)){Kn=js,Sa=null;var Se=N.sibling;if(Se!==null)pn=Se;else{var Ee=N.return;Ee!==null?(pn=Ee,Jh(Ee)):pn=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Kn=js,Sa=null,Kc(n,r,y,cM);break;case TA:Kn=js,Sa=null,Kc(n,r,y,TA);break;case uM:Vd(),xi=Ay;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}be.actQueue!==null?y0():bS();break}catch(ze){g0(n,ze)}while(!0);return Xt(),be.H=p,be.A=b,Mn=u,pn!==null?vc:(ri=null,cn=0,Fc(),xi)}function bS(){for(;pn!==null&&!Gt();)b0(pn)}function b0(n){var r=n.alternate;(n.mode&2)!==Wt?(td(n),r=xt(n,zr,r,n,wl),Zf(n)):r=xt(n,zr,r,n,wl),n.memoizedProps=n.pendingProps,r===null?Jh(n):pn=r}function x0(n){var r=xt(n,xS,n);n.memoizedProps=n.pendingProps,r===null?Jh(n):pn=r}function xS(n){var r=n.alternate,u=(n.mode&2)!==Wt;switch(u&&td(n),n.tag){case 15:case 0:r=Ua(r,n,n.pendingProps,n.type,void 0,cn);break;case 11:r=Ua(r,n,n.pendingProps,n.type.render,n.ref,cn);break;case 5:Ad(n);default:Vh(r,n),n=pn=Ni(n,wl),r=zr(r,n,wl)}return u&&Zf(n),r}function Kc(n,r,u,p){Xt(),Ad(r),zp=null,gA=0;var b=r.return;try{if(qv(n,b,r,u,cn)){xi=MA,Td(n,mt(u,n.current)),pn=null;return}}catch(y){if(b!==null)throw pn=b,y;xi=MA,Td(n,mt(u,n.current)),pn=null;return}r.flags&32768?(Sn||p===vy?n=!0:qp||(cn&536870912)!==0?n=!1:(Eu=n=!0,(p===pf||p===mf||p===wA||p===TA)&&(p=ba.current,p!==null&&p.tag===13&&(p.flags|=16384))),S0(r,n)):Jh(r)}function Jh(n){var r=n;do{if((r.flags&32768)!==0){S0(r,Eu);return}var u=r.alternate;if(n=r.return,td(r),u=xt(r,Eg,u,r,wl),(r.mode&2)!==Wt&&jm(r),u!==null){pn=u;return}if(r=r.sibling,r!==null){pn=r;return}pn=r=n}while(r!==null);xi===vc&&(xi=gE)}function S0(n,r){do{var u=al(n.alternate,n);if(u!==null){u.flags&=32767,pn=u;return}if((n.mode&2)!==Wt){jm(n),u=n.actualDuration;for(var p=n.child;p!==null;)u+=p.actualDuration,p=p.sibling;n.actualDuration=u}if(u=n.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!r&&(n=n.sibling,n!==null)){pn=n;return}pn=n=u}while(n!==null);xi=Ay,pn=null}function Og(n,r,u,p,b,y,P,N,q,se,Se,Ee,ze,Lt){n.cancelPendingCommit=null;do _c();while(sr!==ku);if(Lo.flushLegacyContextWarning(),Lo.flushPendingUnsafeLifecycleWarnings(),(Mn&(Rr|no))!==Cr)throw Error("Should not already be working.");if(qe(u),se===hf?B(ze,Lt,u,Oi):p!==null?Y(ze,Lt,u,p,r!==null&&r.alternate!==null&&r.alternate.memoizedState.isDehydrated&&(r.flags&256)!==0,Oi):ee(ze,Lt,u,Oi),r!==null){if(u===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),r===n.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(y=r.lanes|r.childLanes,y|=KS,Fe(n,u,y,P,N,q),n===ri&&(pn=ri=null,cn=0),Yp=r,Du=n,Bo=u,gM=y,vM=b,TE=p,AM=Lt,EE=Ee,Uo=Sy,CE=null,r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,D0($d,function(){return su(),Uo===Sy&&(Uo=mM),C0(),null})):(n.callbackNode=null,n.callbackPriority=0),uc=null,bu=er(),Ee!==null&&de(Lt,bu,Ee,Oi),p=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||p){p=be.T,be.T=null,b=Kr(),Ti(2),P=Mn,Mn|=no;try{gS(n,r,u)}finally{Mn=P,Ti(b),be.T=p}}sr=xE,M0(),w0(),T0()}}function M0(){if(sr===xE){sr=ku;var n=Du,r=Yp,u=Bo,p=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||p){p=be.T,be.T=null;var b=Kr();Ti(2);var y=Mn;Mn|=no;try{Wp=u,jp=n,jr(),t0(r,n),jp=Wp=null,ul(n.containerInfo)}finally{Mn=y,Ti(b),be.T=p}}n.current=r,sr=SE}}function w0(){if(sr===SE){sr=ku;var n=CE;if(n!==null){bu=er();var r=cc,u=bu;!ci||u<=r||console.timeStamp(n,r,u,En,"Scheduler ⚛","secondary-light")}n=Du,r=Yp,u=Bo;var p=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||p){p=be.T,be.T=null;var b=Kr();Ti(2);var y=Mn;Mn|=no;try{Wp=u,jp=n,jr(),Gi(n,r.alternate,r),jp=Wp=null}finally{Mn=y,Ti(b),be.T=p}}n=AM,r=EE,cc=er(),n=r===null?n:bu,r=cc,u=Uo===pM,p=Oi,uc!==null?me(n,r,uc,!1,p):!ci||r<=n||(p?p.run(console.timeStamp.bind(console,u?"Commit Interrupted View Transition":"Commit",n,r,En,"Scheduler ⚛",u?"error":"secondary-dark")):console.timeStamp(u?"Commit Interrupted View Transition":"Commit",n,r,En,"Scheduler ⚛",u?"error":"secondary-dark")),sr=ME}}function T0(){if(sr===wE||sr===ME){if(sr===wE){var n=cc;cc=er();var r=cc,u=Uo===pM;!ci||r<=n||console.timeStamp(u?"Interrupted View Transition":"Starting Animation",n,r,En,"Scheduler ⚛",u?" error":"secondary-light"),Uo!==pM&&(Uo=bE)}sr=ku,Un(),n=Du;var p=Yp;r=Bo,u=TE;var b=p.actualDuration!==0||(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0;b?sr=My:(sr=ku,Yp=Du=null,E0(n,n.pendingLanes),Af=0,kA=null);var y=n.pendingLanes;if(y===0&&(Pu=null),b||Gg(n),y=pt(r),p=p.stateNode,es&&typeof es.onCommitFiberRoot=="function")try{var P=(p.current.flags&128)===128;switch(y){case 2:var N=kn;break;case 8:N=Do;break;case 32:N=$d;break;case 268435456:N=aT;break;default:N=$d}es.onCommitFiberRoot(Ep,p,N,P)}catch(Ee){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",Ee))}if(yl&&n.memoizedUpdaters.clear(),vS(),u!==null){P=be.T,N=Kr(),Ti(2),be.T=null;try{var q=n.onRecoverableError;for(p=0;p<u.length;p++){var se=u[p],Se=SS(se.stack);xt(se.source,q,se.value,Se)}}finally{be.T=P,Ti(N)}}(Bo&3)!==0&&_c(),Lr(n),y=n.pendingLanes,(r&261930)!==0&&(y&42)!==0?(_0=!0,n===yM?PA++:(PA=0,yM=n)):PA=0,b||Yl(r,cc),Tr&&$g(),Bl(0)}}function SS(n){return n={componentStack:n},Object.defineProperty(n,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),n}function E0(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,yr(r)))}function _c(){return M0(),w0(),T0(),C0()}function C0(){if(sr!==My)return!1;var n=Du,r=gM;gM=0;var u=pt(Bo),p=32>u?32:u;u=be.T;var b=Kr();try{Ti(p),be.T=null;var y=vM;vM=null,p=Du;var P=Bo;if(sr=ku,Yp=Du=null,Bo=0,(Mn&(Rr|no))!==Cr)throw Error("Cannot flush passive effects while already rendering.");qe(P),bM=!0,wy=!1;var N=0;if(uc=null,N=xn(),Uo===bE){var q=cc,se=N;!ci||se<=q||(xT?xT.run(console.timeStamp.bind(console,"Animating",q,se,En,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",q,se,En,"Scheduler ⚛","secondary-dark"))}else{q=cc,se=N;var Se=Uo===mM;!ci||se<=q||(Oi?Oi.run(console.timeStamp.bind(console,Se?"Waiting for Paint":"Waiting",q,se,En,"Scheduler ⚛","secondary-light")):console.timeStamp(Se?"Waiting for Paint":"Waiting",q,se,En,"Scheduler ⚛","secondary-light"))}q=Mn,Mn|=no;var Ee=p.current;jr(),l0(Ee);var ze=p.current;Ee=AM,jr(),r0(p,ze,P,y,Ee),Gg(p),Mn=q;var Lt=xn();if(ze=N,Ee=Oi,uc!==null?me(ze,Lt,uc,!0,Ee):!ci||Lt<=ze||(Ee?Ee.run(console.timeStamp.bind(console,"Remaining Effects",ze,Lt,En,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",ze,Lt,En,"Scheduler ⚛","secondary-dark")),Yl(P,Lt),Bl(0,!1),wy?p===kA?Af++:(Af=0,kA=p):Af=0,wy=bM=!1,es&&typeof es.onPostCommitFiberRoot=="function")try{es.onPostCommitFiberRoot(Ep,p)}catch(ti){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",ti))}var qt=p.current.stateNode;return qt.effectDuration=0,qt.passiveEffectDuration=0,!0}finally{Ti(b),be.T=u,E0(n,r)}}function R0(n,r,u){r=mt(u,r),Xm(r),r=Rh(n.stateNode,r,2),n=Ds(n,r,2),n!==null&&(Te(n,2),Lr(n))}function In(n,r,u){if(Jp=!1,n.tag===3)R0(n,n,u);else{for(;r!==null;){if(r.tag===3){R0(r,n,u);return}if(r.tag===1){var p=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Pu===null||!Pu.has(p))){n=mt(u,n),Xm(n),u=Ph(2),p=Ds(r,u,2),p!==null&&(kh(u,p,r,n),Te(p,2),Lr(p));return}}r=r.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
4417
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+p,xt(r,function(N,q){console.error("%s must not return anything besides a function, which is used for clean-up.%s",N,q)},y,P)}u=u.next}while(u!==b)}}catch(N){In(r,r.return,N)}}function It(n,r,u){try{var p=r.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var y=b.next;p=y;do{if((p.tag&n)===n){var P=p.inst,N=P.destroy;N!==void 0&&(P.destroy=void 0,(n&As)!==sy&&(Jp=!0),b=r,xt(b,jP,b,u,N),(n&As)!==sy&&(Jp=!1))}p=p.next}while(p!==y)}}catch(q){In(r,r.return,q)}}function Jv(n,r){Fa(n)?(aa(),ol(r,n),sa()):ol(r,n)}function Pg(n,r,u){Fa(n)?(aa(),It(u,n,r),sa()):It(u,n,r)}function kg(n){var r=n.updateQueue;if(r!==null){var u=n.stateNode;n.type.defaultProps||"ref"in n.memoizedProps||Gp||(u.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(n)||"instance"),u.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(n)||"instance"));try{xt(n,ig,r,u)}catch(p){In(n,n.return,p)}}}function Id(n,r,u){return n.getSnapshotBeforeUpdate(r,u)}function pS(n,r){var u=r.memoizedProps,p=r.memoizedState;r=n.stateNode,n.type.defaultProps||"ref"in n.memoizedProps||Gp||(r.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(n)||"instance"),r.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(n)||"instance"));try{var b=Ba(n.type,u),y=xt(n,Id,r,b,p);u=pE,y!==void 0||u.has(n.type)||(u.add(n.type),xt(n,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",V(n))})),r.__reactInternalSnapshotBeforeUpdate=y}catch(P){In(n,n.return,P)}}function Qv(n,r,u){u.props=Ba(n.type,n.memoizedProps),u.state=n.memoizedState,Fa(n)?(aa(),xt(n,IT,n,r,u),sa()):xt(n,IT,n,r,u)}function mS(n){var r=n.ref;if(r!==null){switch(n.tag){case 26:case 27:case 5:var u=Ur(n.stateNode);break;case 30:u=n.stateNode;break;default:u=n.stateNode}if(typeof r=="function")if(Fa(n))try{aa(),n.refCleanup=r(u)}finally{sa()}else n.refCleanup=r(u);else typeof r=="string"?console.error("String refs are no longer supported."):r.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",V(n)),r.current=u}}function Nd(n,r){try{xt(n,mS,n)}catch(u){In(n,r,u)}}function Oa(n,r){var u=n.ref,p=n.refCleanup;if(u!==null)if(typeof p=="function")try{if(Fa(n))try{aa(),xt(n,p)}finally{sa(n)}else xt(n,p)}catch(b){In(n,r,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof u=="function")try{if(Fa(n))try{aa(),xt(n,u,null)}finally{sa(n)}else xt(n,u,null)}catch(b){In(n,r,b)}else u.current=null}function Hh(n,r,u,p){var b=n.memoizedProps,y=b.id,P=b.onCommit;b=b.onRender,r=r===null?"mount":"update",K0&&(r="nested-update"),typeof b=="function"&&b(y,r,n.actualDuration,n.treeBaseDuration,n.actualStartTime,u),typeof P=="function"&&P(y,r,p,u)}function Zv(n,r,u,p){var b=n.memoizedProps;n=b.id,b=b.onPostCommit,r=r===null?"mount":"update",K0&&(r="nested-update"),typeof b=="function"&&b(n,r,p,u)}function zd(n){var r=n.type,u=n.memoizedProps,p=n.stateNode;try{xt(n,Zn,p,r,u,n)}catch(b){In(n,n.return,b)}}function Gh(n,r,u){try{xt(n,Bi,n.stateNode,n.type,u,r,n)}catch(p){In(n,n.return,p)}}function Kv(n){return n.tag===5||n.tag===3||(qn?n.tag===26:!1)||(R?n.tag===27&&$e(n.type):!1)||n.tag===4}function Dg(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Kv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(R&&n.tag===27&&$e(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function xo(n,r,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,r?cu(u,n,r):Ro(u,n);else if(p!==4&&(R&&p===27&&$e(n.type)&&(u=n.stateNode,r=null),n=n.child,n!==null))for(xo(n,r,u),n=n.sibling;n!==null;)xo(n,r,u),n=n.sibling}function zs(n,r,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,r?up(u,n,r):Ei(u,n);else if(p!==4&&(R&&p===27&&$e(n.type)&&(u=n.stateNode),n=n.child,n!==null))for(zs(n,r,u),n=n.sibling;n!==null;)zs(n,r,u),n=n.sibling}function Mr(n){for(var r,u=n.return;u!==null;){if(Kv(u)){r=u;break}u=u.return}if(li){if(r==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(r.tag){case 27:if(R){r=r.stateNode,u=Dg(n),zs(n,u,r);break}case 5:u=r.stateNode,r.flags&32&&(uu(u),r.flags&=-33),r=Dg(n),zs(n,r,u);break;case 3:case 4:r=r.stateNode.containerInfo,u=Dg(n),xo(n,u,r);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function fa(n,r,u){n=n.containerInfo;try{xt(r,pp,n,u)}catch(p){In(r,r.return,p)}}function fr(n){var r=n.stateNode,u=n.memoizedProps;try{xt(n,te,n.type,u,r,n)}catch(p){In(n,n.return,p)}}function _v(n,r){return r.tag===31?(r=r.memoizedState,n.memoizedState!==null&&r===null):r.tag===13?(n=n.memoizedState,r=r.memoizedState,n!==null&&n.dehydrated!==null&&(r===null||r.dehydrated===null)):r.tag===3?n.memoizedState.isDehydrated&&(r.flags&256)===0:!1}function gS(n,r){for(Xd(n.containerInfo),Er=r;Er!==null;)if(n=Er,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,Er=r;else for(;Er!==null;){r=n=Er;var u=r.alternate,p=r.flags;switch(r.tag){case 0:if((p&4)!==0&&(r=r.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)p=r[u],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:(p&1024)!==0&&u!==null&&pS(r,u);break;case 3:(p&1024)!==0&&li&&Kg(r.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(r=n.sibling,r!==null){r.return=n.return,Er=r;break}Er=n.return}}function Gi(n,r,u){var p=gi(),b=Da(),y=ia(),P=ra(),N=u.flags;switch(u.tag){case 0:case 11:case 15:Br(n,u),N&4&&Cg(u,xa|eo);break;case 1:if(Br(n,u),N&4)if(n=u.stateNode,r===null)u.type.defaultProps||"ref"in u.memoizedProps||Gp||(n.props!==u.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(u)||"instance"),n.state!==u.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(u)||"instance")),Fa(u)?(aa(),xt(u,JS,u,n),sa()):xt(u,JS,u,n);else{var q=Ba(u.type,r.memoizedProps);r=r.memoizedState,u.type.defaultProps||"ref"in u.memoizedProps||Gp||(n.props!==u.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",V(u)||"instance"),n.state!==u.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",V(u)||"instance")),Fa(u)?(aa(),xt(u,kT,u,n,q,r,n.__reactInternalSnapshotBeforeUpdate),sa()):xt(u,kT,u,n,q,r,n.__reactInternalSnapshotBeforeUpdate)}N&64&&kg(u),N&512&&Nd(u,u.return);break;case 3:if(r=zn(),Br(n,u),N&64&&(N=u.updateQueue,N!==null)){if(q=null,u.child!==null)switch(u.child.tag){case 27:case 5:q=Ur(u.child.stateNode);break;case 1:q=u.child.stateNode}try{xt(u,ig,N,q)}catch(Se){In(u,u.return,Se)}}n.effectDuration+=Wr(r);break;case 27:R&&r===null&&N&4&&fr(u);case 26:case 5:if(Br(n,u),r===null){if(N&4)zd(u);else if(N&64){n=u.type,r=u.memoizedProps,q=u.stateNode;try{xt(u,_g,q,n,r,u)}catch(Se){In(u,u.return,Se)}}}N&512&&Nd(u,u.return);break;case 12:if(N&4){N=zn(),Br(n,u),n=u.stateNode,n.effectDuration+=Dn(N);try{xt(u,Hh,u,r,bu,n.effectDuration)}catch(Se){In(u,u.return,Se)}}else Br(n,u);break;case 31:Br(n,u),N&4&&$v(n,u);break;case 13:Br(n,u),N&4&&e0(n,u),N&64&&(n=u.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(N=k0.bind(null,u),Fi(n,N))));break;case 22:if(N=u.memoizedState!==null||Ac,!N){r=r!==null&&r.memoizedState!==null||ir,q=Ac;var se=ir;Ac=N,(ir=r)&&!se?(Ha(n,u,(u.subtreeFlags&8772)!==0),(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(u,Ut,Vt)):Br(n,u),Ac=q,ir=se}break;case 30:break;default:Br(n,u)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),u.alternate===null&&u.return!==null&&u.return.alternate!==null&&.05<Vt-Ut&&(_v(u.return.alternate,u.return)||Ze(u,Ut,Vt,"Mount"))),cr(p),na(b),hi=y,Pi=P}function Va(n){var r=n.alternate;r!==null&&(n.alternate=null,Va(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Jg(r)),n.stateNode=null,n._debugOwner=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function ha(n,r,u){for(u=u.child;u!==null;)Lg(n,r,u),u=u.sibling}function Lg(n,r,u){if(es&&typeof es.onCommitFiberUnmount=="function")try{es.onCommitFiberUnmount(Ep,u)}catch(se){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",se))}var p=gi(),b=Da(),y=ia(),P=ra();switch(u.tag){case 26:if(qn){ir||Oa(u,r),ha(n,r,u),u.memoizedState?wp(u.memoizedState):u.stateNode&&Tp(u.stateNode);break}case 27:if(R){ir||Oa(u,r);var N=rr,q=Ws;$e(u.type)&&(rr=u.stateNode,Ws=!1),ha(n,r,u),xt(u,Re,u.stateNode),rr=N,Ws=q;break}case 5:ir||Oa(u,r);case 6:if(li){if(N=rr,q=Ws,rr=null,ha(n,r,u),rr=N,Ws=q,rr!==null)if(Ws)try{xt(u,dp,rr,u.stateNode)}catch(se){In(u,r,se)}else try{xt(u,tc,rr,u.stateNode)}catch(se){In(u,r,se)}}else ha(n,r,u);break;case 18:li&&rr!==null&&(Ws?fu(rr,u.stateNode):ps(rr,u.stateNode));break;case 4:li?(N=rr,q=Ws,rr=u.stateNode.containerInfo,Ws=!0,ha(n,r,u),rr=N,Ws=q):(Xa&&fa(u.stateNode,u,fp()),ha(n,r,u));break;case 0:case 11:case 14:case 15:It(As,u,r),ir||Rg(u,r,xa),ha(n,r,u);break;case 1:ir||(Oa(u,r),N=u.stateNode,typeof N.componentWillUnmount=="function"&&Qv(u,r,N)),ha(n,r,u);break;case 21:ha(n,r,u);break;case 22:ir=(N=ir)||u.memoizedState!==null,ha(n,r,u),ir=N;break;default:ha(n,r,u)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),cr(p),na(b),hi=y,Pi=P}function $v(n,r){if(Tr&&r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{xt(r,vi,n)}catch(u){In(r,r.return,u)}}}function e0(n,r){if(Tr&&r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{xt(r,ml,n)}catch(u){In(r,r.return,u)}}function AS(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new mE),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new mE),r;default:throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}}function Qc(n,r){var u=AS(n);r.forEach(function(p){if(!u.has(p)){if(u.add(p),yl)if(Wp!==null&&jp!==null)$c(jp,Wp);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var b=wS.bind(null,n,p);p.then(b,b)}})}function hr(n,r){var u=r.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=n,y=r,P=u[p],N=gi();if(li){var q=y;e:for(;q!==null;){switch(q.tag){case 27:if(R){if($e(q.type)){rr=q.stateNode,Ws=!1;break e}break}case 5:rr=q.stateNode,Ws=!1;break e;case 3:case 4:rr=q.stateNode.containerInfo,Ws=!0;break e}q=q.return}if(rr===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Lg(b,y,P),rr=null,Ws=!1}else Lg(b,y,P);(P.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(P,Ut,Vt,"Unmount"),cr(N),b=P,y=b.alternate,y!==null&&(y.return=null),b.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)t0(r,n),r=r.sibling}function t0(n,r){var u=gi(),p=Da(),b=ia(),y=ra(),P=n.alternate,N=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:hr(r,n),wr(n),N&4&&(It(As|eo,n,n.return),ol(As|eo,n),Rg(n,n.return,xa|eo));break;case 1:hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),N&64&&Ac&&(N=n.updateQueue,N!==null&&(P=N.callbacks,P!==null&&(r=N.shared.hiddenCallbacks,N.shared.hiddenCallbacks=r===null?P:r.concat(P))));break;case 26:if(qn){var q=zo;hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),N&4&&(N=P!==null?P.memoizedState:null,r=n.memoizedState,P===null?r===null?n.stateNode===null?n.stateNode=G0(q,n.type,n.memoizedProps,n):pu(q,n.type,n.stateNode):n.stateNode=Mp(q,r,n.memoizedProps):N!==r?(N===null?P.stateNode!==null&&Tp(P.stateNode):wp(N),r===null?pu(q,n.type,n.stateNode):Mp(q,r,n.memoizedProps)):r===null&&n.stateNode!==null&&Gh(n,n.memoizedProps,P.memoizedProps));break}case 27:if(R){hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),P!==null&&N&4&&Gh(n,n.memoizedProps,P.memoizedProps);break}case 5:if(hr(r,n),wr(n),N&512&&(ir||P===null||Oa(P,P.return)),li){if(n.flags&32){r=n.stateNode;try{xt(n,uu,r)}catch(ti){In(n,n.return,ti)}}N&4&&n.stateNode!=null&&(r=n.memoizedProps,Gh(n,r,P!==null?P.memoizedProps:r)),N&1024&&(lM=!0,n.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Xa&&n.alternate!==null&&(n.alternate.stateNode=n.stateNode);break;case 6:if(hr(r,n),wr(n),N&4&&li){if(n.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");N=n.memoizedProps,P=P!==null?P.memoizedProps:N,r=n.stateNode;try{xt(n,tn,r,P,N)}catch(ti){In(n,n.return,ti)}}break;case 3:if(q=zn(),qn){l();var se=zo;zo=Al(r.containerInfo),hr(r,n),zo=se}else hr(r,n);if(wr(n),N&4){if(li&&Tr&&P!==null&&P.memoizedState.isDehydrated)try{xt(n,Po,r.containerInfo)}catch(ti){In(n,n.return,ti)}if(Xa){N=r.containerInfo,P=r.pendingChildren;try{xt(n,pp,N,P)}catch(ti){In(n,n.return,ti)}}}lM&&(lM=!1,n0(n)),r.effectDuration+=Wr(q);break;case 4:qn?(P=zo,zo=Al(n.stateNode.containerInfo),hr(r,n),wr(n),zo=P):(hr(r,n),wr(n)),N&4&&Xa&&fa(n.stateNode,n,n.stateNode.pendingChildren);break;case 12:N=zn(),hr(r,n),wr(n),n.stateNode.effectDuration+=Dn(N);break;case 31:hr(r,n),wr(n),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 13:hr(r,n),wr(n),n.child.flags&8192&&n.memoizedState!==null!=(P!==null&&P.memoizedState!==null)&&(xy=xn()),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 22:q=n.memoizedState!==null;var Se=P!==null&&P.memoizedState!==null,Ee=Ac,Be=ir;if(Ac=Ee||q,ir=Be||Se,hr(r,n),ir=Be,Ac=Ee,Se&&!q&&!Ee&&!Be&&(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(n,Ut,Vt),wr(n),N&8192&&(r=n.stateNode,r._visibility=q?r._visibility&~AA:r._visibility|AA,!q||P===null||Se||Ac||ir||(jl(n),(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(n,Ut,Vt,"Disconnect")),li)){e:if(P=null,li)for(r=n;;){if(r.tag===5||qn&&r.tag===26){if(P===null){Se=P=r;try{se=Se.stateNode,q?xt(Se,du,se):xt(Se,Jd,Se.stateNode,Se.memoizedProps)}catch(ti){In(Se,Se.return,ti)}}}else if(r.tag===6){if(P===null){Se=r;try{var Lt=Se.stateNode;q?xt(Se,RS,Lt):xt(Se,V0,Lt,Se.memoizedProps)}catch(ti){In(Se,Se.return,ti)}}}else if(r.tag===18){if(P===null){Se=r;try{var qt=Se.stateNode;q?xt(Se,Kd,qt):xt(Se,$r,Se.stateNode)}catch(ti){In(Se,Se.return,ti)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;P===r&&(P=null),r=r.return}P===r&&(P=null),r.sibling.return=r.return,r=r.sibling}}N&4&&(N=n.updateQueue,N!==null&&(P=N.retryQueue,P!==null&&(N.retryQueue=null,Qc(n,P))));break;case 19:hr(r,n),wr(n),N&4&&(N=n.updateQueue,N!==null&&(n.updateQueue=null,Qc(n,N)));break;case 30:break;case 21:break;default:hr(r,n),wr(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Vt-Ut&&(_v(n.return.alternate,n.return)||Ze(n,Ut,Vt,"Mount"))),cr(u),na(p),hi=b,Pi=y}function wr(n){var r=n.flags;if(r&2){try{xt(n,Mr,n)}catch(u){In(n,n.return,u)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function n0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;n0(r),r.tag===5&&r.flags&1024&&Yd(r.stateNode),n=n.sibling}}function Br(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Gi(n,r.alternate,r),r=r.sibling}function ll(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 14:case 15:Rg(n,n.return,xa),jl(n);break;case 1:Oa(n,n.return);var y=n.stateNode;typeof y.componentWillUnmount=="function"&&Qv(n,n.return,y),jl(n);break;case 27:R&&xt(n,Re,n.stateNode);case 26:case 5:Oa(n,n.return),jl(n);break;case 22:n.memoizedState===null&&jl(n);break;case 30:jl(n);break;default:jl(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),hi=p,Pi=b}function jl(n){for(n=n.child;n!==null;)ll(n),n=n.sibling}function i0(n,r,u,p){var b=gi(),y=Da(),P=ia(),N=ra(),q=u.flags;switch(u.tag){case 0:case 11:case 15:Ha(n,u,p),Cg(u,xa);break;case 1:if(Ha(n,u,p),r=u.stateNode,typeof r.componentDidMount=="function"&&xt(u,JS,u,r),r=u.updateQueue,r!==null){n=u.stateNode;try{xt(u,ng,r,n)}catch(se){In(u,u.return,se)}}p&&q&64&&kg(u),Nd(u,u.return);break;case 27:R&&fr(u);case 26:case 5:Ha(n,u,p),p&&r===null&&q&4&&zd(u),Nd(u,u.return);break;case 12:if(p&&q&4){q=zn(),Ha(n,u,p),p=u.stateNode,p.effectDuration+=Dn(q);try{xt(u,Hh,u,r,bu,p.effectDuration)}catch(se){In(u,u.return,se)}}else Ha(n,u,p);break;case 31:Ha(n,u,p),p&&q&4&&$v(n,u);break;case 13:Ha(n,u,p),p&&q&4&&e0(n,u);break;case 22:u.memoizedState===null&&Ha(n,u,p),Nd(u,u.return);break;case 30:break;default:Ha(n,u,p)}(u.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(u,Ut,Vt,bi,hi),cr(b),na(y),hi=P,Pi=N}function Ha(n,r,u){for(u=u&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;)i0(n,r.alternate,r,u),r=r.sibling}function Xl(n,r){var u=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==u&&(n!=null&&Ii(n),u!=null&&yr(u))}function Ig(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(Ii(r),n!=null&&yr(n))}function pa(n,r,u,p,b){if(r.subtreeFlags&10256||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child))for(r=r.child;r!==null;){var y=r.sibling;r0(n,r,u,p,y!==null?y.actualStartTime:b),r=y}}function r0(n,r,u,p,b){var y=gi(),P=Da(),N=ia(),q=ra(),se=mu,Se=r.flags;switch(r.tag){case 0:case 11:case 15:(r.mode&2)!==Wt&&0<r.actualStartTime&&(r.flags&1)!==0&&bt(r,r.actualStartTime,b,gr,u),pa(n,r,u,p,b),Se&2048&&Jv(r,vs|eo);break;case 1:(r.mode&2)!==Wt&&0<r.actualStartTime&&((r.flags&128)!==0?zt(r,r.actualStartTime,b,[]):(r.flags&1)!==0&&bt(r,r.actualStartTime,b,gr,u)),pa(n,r,u,p,b);break;case 3:var Ee=zn(),Be=gr;gr=r.alternate!==null&&r.alternate.memoizedState.isDehydrated&&(r.flags&256)===0,pa(n,r,u,p,b),gr=Be,Se&2048&&(u=null,r.alternate!==null&&(u=r.alternate.memoizedState.cache),p=r.memoizedState.cache,p!==u&&(Ii(p),u!=null&&yr(u))),n.passiveEffectDuration+=Wr(Ee);break;case 12:if(Se&2048){Se=zn(),pa(n,r,u,p,b),n=r.stateNode,n.passiveEffectDuration+=Dn(Se);try{xt(r,Zv,r,r.alternate,bu,n.passiveEffectDuration)}catch(Lt){In(r,r.return,Lt)}}else pa(n,r,u,p,b);break;case 31:Se=gr,Ee=r.alternate!==null?r.alternate.memoizedState:null,Be=r.memoizedState,Ee!==null&&Be===null?(Be=r.deletions,Be!==null&&0<Be.length&&Be[0].tag===18?(gr=!1,Ee=Ee.hydrationErrors,Ee!==null&&zt(r,r.actualStartTime,b,Ee)):gr=!0):gr=!1,pa(n,r,u,p,b),gr=Se;break;case 13:Se=gr,Ee=r.alternate!==null?r.alternate.memoizedState:null,Be=r.memoizedState,Ee===null||Ee.dehydrated===null||Be!==null&&Be.dehydrated!==null?gr=!1:(Be=r.deletions,Be!==null&&0<Be.length&&Be[0].tag===18?(gr=!1,Ee=Ee.hydrationErrors,Ee!==null&&zt(r,r.actualStartTime,b,Ee)):gr=!0),pa(n,r,u,p,b),gr=Se;break;case 23:break;case 22:Be=r.stateNode,Ee=r.alternate,r.memoizedState!==null?Be._visibility&hc?pa(n,r,u,p,b):Bd(n,r,u,p,b):Be._visibility&hc?pa(n,r,u,p,b):(Be._visibility|=hc,Ga(n,r,u,p,(r.subtreeFlags&10256)!==0||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child),b),(r.mode&2)===Wt||gr||(n=r.actualStartTime,0<=n&&.05<b-n&&Pt(r,n,b),0<=Ut&&0<=Vt&&.05<Vt-Ut&&Pt(r,Ut,Vt))),Se&2048&&Xl(Ee,r);break;case 24:pa(n,r,u,p,b),Se&2048&&Ig(r.alternate,r);break;default:pa(n,r,u,p,b)}(r.mode&2)!==Wt&&((n=!gr&&r.alternate===null&&r.return!==null&&r.return.alternate!==null)&&(u=r.actualStartTime,0<=u&&.05<b-u&&Ze(r,u,b,"Mount")),0<=Ut&&0<=Vt&&((Pi||.05<bi)&&Et(r,Ut,Vt,bi,hi),n&&.05<Vt-Ut&&Ze(r,Ut,Vt,"Mount"))),cr(y),na(P),hi=N,Pi=q,mu=se}function Ga(n,r,u,p,b,y){for(b=b&&((r.subtreeFlags&10256)!==0||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child)),r=r.child;r!==null;){var P=r.sibling;s0(n,r,u,p,b,P!==null?P.actualStartTime:y),r=P}}function s0(n,r,u,p,b,y){var P=gi(),N=Da(),q=ia(),se=ra(),Se=mu;b&&(r.mode&2)!==Wt&&0<r.actualStartTime&&(r.flags&1)!==0&&bt(r,r.actualStartTime,y,gr,u);var Ee=r.flags;switch(r.tag){case 0:case 11:case 15:Ga(n,r,u,p,b,y),Jv(r,vs);break;case 23:break;case 22:var Be=r.stateNode;r.memoizedState!==null?Be._visibility&hc?Ga(n,r,u,p,b,y):Bd(n,r,u,p,y):(Be._visibility|=hc,Ga(n,r,u,p,b,y)),b&&Ee&2048&&Xl(r.alternate,r);break;case 24:Ga(n,r,u,p,b,y),b&&Ee&2048&&Ig(r.alternate,r);break;default:Ga(n,r,u,p,b,y)}(r.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(r,Ut,Vt,bi,hi),cr(P),na(N),hi=q,Pi=se,mu=Se}function Bd(n,r,u,p,b){if(r.subtreeFlags&10256||r.actualDuration!==0&&(r.alternate===null||r.alternate.child!==r.child))for(var y=r.child;y!==null;){r=y.sibling;var P=n,N=u,q=p,se=r!==null?r.actualStartTime:b,Se=mu;(y.mode&2)!==Wt&&0<y.actualStartTime&&(y.flags&1)!==0&&bt(y,y.actualStartTime,se,gr,N);var Ee=y.flags;switch(y.tag){case 22:Bd(P,y,N,q,se),Ee&2048&&Xl(y.alternate,y);break;case 24:Bd(P,y,N,q,se),Ee&2048&&Ig(y.alternate,y);break;default:Bd(P,y,N,q,se)}mu=Se,y=r}}function ql(n,r,u){if(n.subtreeFlags&Xp)for(n=n.child;n!==null;)a0(n,r,u),n=n.sibling}function a0(n,r,u){switch(n.tag){case 26:if(ql(n,r,u),n.flags&Xp)if(n.memoizedState!==null)E(u,zo,n.memoizedState,n.memoizedProps);else{var p=n.stateNode,b=n.type;n=n.memoizedProps,((r&335544128)===r||sp(b,n))&&ap(u,p,b,n)}break;case 5:ql(n,r,u),n.flags&Xp&&(p=n.stateNode,b=n.type,n=n.memoizedProps,((r&335544128)===r||sp(b,n))&&ap(u,p,b,n));break;case 3:case 4:qn?(p=zo,zo=Al(n.stateNode.containerInfo),ql(n,r,u),zo=p):ql(n,r,u);break;case 22:n.memoizedState===null&&(p=n.alternate,p!==null&&p.memoizedState!==null?(p=Xp,Xp=16777216,ql(n,r,u),Xp=p):ql(n,r,u));break;default:ql(n,r,u)}}function o0(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Ud(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var u=0;u<r.length;u++){var p=r[u],b=gi();Er=p,u0(p,n),(p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(p,Ut,Vt,"Unmount"),cr(b)}o0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)l0(n),n=n.sibling}function l0(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 15:Ud(n),n.flags&2048&&Pg(n,n.return,vs|eo);break;case 3:var y=zn();Ud(n),n.stateNode.passiveEffectDuration+=Wr(y);break;case 12:y=zn(),Ud(n),n.stateNode.passiveEffectDuration+=Dn(y);break;case 22:y=n.stateNode,n.memoizedState!==null&&y._visibility&hc&&(n.return===null||n.return.tag!==13)?(y._visibility&=~hc,Wh(n),(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(n,Ut,Vt,"Disconnect")):Ud(n);break;default:Ud(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),Pi=b,hi=p}function Wh(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var u=0;u<r.length;u++){var p=r[u],b=gi();Er=p,u0(p,n),(p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&.05<Vt-Ut&&Ze(p,Ut,Vt,"Unmount"),cr(b)}o0(n)}for(n=n.child;n!==null;)c0(n),n=n.sibling}function c0(n){var r=gi(),u=Da(),p=ia(),b=ra();switch(n.tag){case 0:case 11:case 15:Pg(n,n.return,vs),Wh(n);break;case 22:var y=n.stateNode;y._visibility&hc&&(y._visibility&=~hc,Wh(n));break;default:Wh(n)}(n.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(n,Ut,Vt,bi,hi),cr(r),na(u),Pi=b,hi=p}function u0(n,r){for(;Er!==null;){var u=Er,p=u,b=r,y=gi(),P=Da(),N=ia(),q=ra();switch(p.tag){case 0:case 11:case 15:Pg(p,b,vs);break;case 23:case 22:p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool,b!=null&&Ii(b));break;case 24:yr(p.memoizedState.cache)}if((p.mode&2)!==Wt&&0<=Ut&&0<=Vt&&(Pi||.05<bi)&&Et(p,Ut,Vt,bi,hi),cr(y),na(P),Pi=q,hi=N,p=u.child,p!==null)p.return=u,Er=p;else e:for(u=n;Er!==null;){if(p=Er,y=p.sibling,P=p.return,Va(p),p===u){Er=null;break e}if(y!==null){y.return=P,Er=y;break e}Er=P}}}function Ng(n){var r=CS(n);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return r}if(n=Qg(n),n===null)throw Error("Could not find React container within specified host subtree.");return n.stateNode.current}function zg(n,r){var u=n.tag;switch(r.$$typeof){case uy:if(n.type===r.value)return!0;break;case dy:e:{for(r=r.value,n=[n,0],u=0;u<n.length;){var p=n[u++],b=p.tag,y=n[u++],P=r[y];if(b!==5&&b!==26&&b!==27||!qa(p)){for(;P!=null&&zg(p,P);)y++,P=r[y];if(y===r.length){r=!0;break e}else for(p=p.child;p!==null;)n.push(p,y),p=p.sibling}}r=!1}return r;case fy:if((u===5||u===26||u===27)&&cp(n.stateNode,r.value))return!0;break;case py:if((u===5||u===6||u===26||u===27)&&(n=Zg(n),n!==null&&0<=n.indexOf(r.value)))return!0;break;case hy:if((u===5||u===26||u===27)&&(n=n.memoizedProps["data-testname"],typeof n=="string"&&n.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function jh(n){switch(n.$$typeof){case uy:return"<"+(F(n.value)||"Unknown")+">";case dy:return":has("+(jh(n)||"")+")";case fy:return'[role="'+n.value+'"]';case py:return'"'+n.value+'"';case hy:return'[data-testname="'+n.value+'"]';default:throw Error("Invalid selector type specified.")}}function d0(n,r){var u=[];n=[n,0];for(var p=0;p<n.length;){var b=n[p++],y=b.tag,P=n[p++],N=r[P];if(y!==5&&y!==26&&y!==27||!qa(b)){for(;N!=null&&zg(b,N);)P++,N=r[P];if(P===r.length)u.push(b);else for(b=b.child;b!==null;)n.push(b,P),b=b.sibling}}return u}function Xh(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");n=Ng(n),n=d0(n,r),r=[],n=Array.from(n);for(var u=0;u<n.length;){var p=n[u++],b=p.tag;if(b===5||b===26||b===27)qa(p)||r.push(p.stateNode);else for(p=p.child;p!==null;)n.push(p),p=p.sibling}return r}function vS(){ga&&my.forEach(function(n){return n()})}function f0(){var n=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return n||be.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),n}function ds(n){if((Mn&Rr)!==Cr&&cn!==0)return cn&-cn;var r=be.T;return r!==null?(r._updatedFibers||(r._updatedFibers=new Set),r._updatedFibers.add(n),$f()):Yg()}function h0(){if(Xs===0)if((cn&536870912)===0||Sn){var n=we;we<<=1,(we&3932160)===0&&(we=262144),Xs=n}else Xs=536870912;return n=ba.current,n!==null&&(n.flags|=32),Xs}function ai(n,r,u){if(Jp&&console.error("useInsertionEffect must not schedule updates."),bM&&(wy=!0),(n===ri&&(Kn===pf||Kn===mf)||n.cancelPendingCommit!==null)&&(Zc(n,0),So(n,cn,Xs,!1)),Te(n,u),(Mn&Rr)!==Cr&&n===ri){if(bl)switch(r.tag){case 0:case 11:case 15:n=pn&&V(pn)||"Unknown",PE.has(n)||(PE.add(n),r=V(r)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",r,n,n));break;case 1:RE||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),RE=!0)}}else yl&&qe(n,r,u),L0(r),n===ri&&((Mn&Rr)===Cr&&(Ru|=u),xi===Tu&&So(n,cn,Xs,!1)),Lr(n)}function Bg(n,r,u){if((Mn&(Rr|no))!==Cr)throw Error("Should not already be working.");if(cn!==0&&pn!==null){var p=pn,b=xn();switch(ST){case wA:case pf:var y=oA;ci&&((p=p._debugTask)?p.run(console.timeStamp.bind(console,"Suspended",y,b,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",y,b,"Components ⚛",void 0,"primary-light"));break;case mf:y=oA,ci&&((p=p._debugTask)?p.run(console.timeStamp.bind(console,"Action",y,b,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",y,b,"Components ⚛",void 0,"primary-light"));break;default:ci&&(p=b-oA,3>p||console.timeStamp("Blocked",oA,b,"Components ⚛",void 0,5>p?"primary-light":10>p?"primary":100>p?"primary-dark":"error"))}}y=(u=!u&&(r&127)===0&&(r&n.expiredLanes)===0||Q(n,r))?yS(n,r):Fg(n,r,!0);var P=u;do{if(y===vc){qp&&!u&&So(n,r,0,!1),r=Kn,oA=er(),ST=r;break}else{if(p=xn(),b=n.current.alternate,P&&!m0(b)){je(r),b=ts,y=p,!ci||y<=b||(Oi?Oi.run(console.timeStamp.bind(console,"Teared Render",b,y,En,"Scheduler ⚛","error")):console.timeStamp("Teared Render",b,y,En,"Scheduler ⚛","error")),Yl(r,p),y=Fg(n,r,!1),P=!1;continue}if(y===hf){if(P=r,n.errorRecoveryDisabledLanes&P)var N=0;else N=n.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){je(r),B(ts,p,r,Oi),Yl(r,p),r=N;e:{p=n,y=P,P=EA;var q=Tr&&p.current.memoizedState.isDehydrated;if(q&&(Zc(p,N).flags|=256),N=Fg(p,N,!1),N!==hf){if(dM&&!q){p.errorRecoveryDisabledLanes|=y,Ru|=y,y=Tu;break e}p=ys,ys=P,p!==null&&(ys===null?ys=p:ys.push.apply(ys,p))}y=N}if(P=!1,y!==hf)continue;p=xn()}}if(y===MA){je(r),B(ts,p,r,Oi),Yl(r,p),Zc(n,0),So(n,r,0,!0);break}e:{switch(u=n,y){case vc:case MA:throw Error("Root did not complete. This is a bug in React.");case Tu:if((r&4194048)!==r)break;case Ay:je(r),Cn(ts,p,r,Oi),Yl(r,p),b=r,(b&127)!==0?Q0=p:(b&4194048)!==0&&(Z0=p),So(u,r,Xs,!Eu);break e;case hf:ys=null;break;case gy:case gE:break;default:throw Error("Unknown root exit status.")}if(be.actQueue!==null)Og(u,b,r,ys,RA,by,Xs,Ru,gf,y,null,null,ts,p);else{if((r&62914560)===r&&(P=xy+yE-xn(),10<P)){if(So(u,r,Xs,!Eu),j(u,0,!0)!==0)break e;Bo=r,u.timeoutHandle=Os(p0.bind(null,u,b,ys,RA,by,r,Xs,Ru,gf,Eu,y,"Throttled",ts,p),P);break e}p0(u,b,ys,RA,by,r,Xs,Ru,gf,Eu,y,null,ts,p)}}}break}while(!0);Lr(n)}function p0(n,r,u,p,b,y,P,N,q,se,Se,Ee,Be,Lt){n.timeoutHandle=ja;var qt=r.subtreeFlags,ti=null;if((qt&8192||(qt&16785408)===16785408)&&(ti=lu(),a0(r,y,ti),qt=(y&62914560)===y?xy-xn():(y&4194048)===y?vE-xn():0,qt=op(ti,qt),qt!==null)){Bo=y,n.cancelPendingCommit=qt(Og.bind(null,n,r,y,u,p,b,P,N,q,Se,ti,lp(ti,n.containerInfo),Be,Lt)),So(n,y,P,!se);return}Og(n,r,y,u,p,b,P,N,q,Se,ti,Ee,Be,Lt)}function m0(n){for(var r=n;;){var u=r.tag;if((u===0||u===11||u===15)&&r.flags&16384&&(u=r.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var b=u[p],y=b.getSnapshot;b=b.value;try{if(!ms(y(),b))return!1}catch{return!1}}if(u=r.child,r.subtreeFlags&16384&&u!==null)u.return=r,r=u;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function So(n,r,u,p){r&=~fM,r&=~Ru,n.suspendedLanes|=r,n.pingedLanes&=~r,p&&(n.warmLanes|=r),p=n.expirationTimes;for(var b=r;0<b;){var y=31-ji(b),P=1<<y;p[y]=-1,b&=~P}u!==0&&ft(n,u,r)}function Fd(){return(Mn&(Rr|no))===Cr?(Bl(0),!1):!0}function Od(){return(Mn&(Rr|no))!==Cr}function Vd(){if(pn!==null){if(Kn===js)var n=pn.return;else n=pn,Xt(),Ad(n),zp=null,gA=0,n=pn;for(;n!==null;)Vh(n.alternate,n),n=n.return;pn=null}}function Yl(n,r){(n&127)!==0&&(nf=r),(n&4194048)!==0&&(dc=r)}function Zc(n,r){ci&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var u=ts;if(ts=er(),cn!==0&&0<u){if(je(cn),xi===gy||xi===Tu)Cn(u,ts,r,Oi);else{var p=ts,b=Oi;if(ci&&!(p<=u)){var y=(r&738197653)===r?"tertiary-dark":"primary-dark",P=(r&536870912)===r?"Prewarm":(r&201326741)===r?"Interrupted Hydration":"Interrupted Render";b?b.run(console.timeStamp.bind(console,P,u,p,En,"Scheduler ⚛",y)):console.timeStamp(P,u,p,En,"Scheduler ⚛",y)}}Yl(cn,ts)}if(u=Oi,Oi=null,(r&127)!==0){Oi=rA,b=0<=Sl&&Sl<nf?nf:Sl,p=0<=rf&&rf<nf?nf:rf,y=0<=p?p:0<=b?b:ts,0<=Q0&&(je(2),an(Q0,y,r,u)),u=b;var N=p,q=sA,se=0<Dp,Se=xu===1,Ee=xu===2;if(b=ts,p=rA,y=OS,P=VS,ci){if(En="Blocking",0<u?u>b&&(u=b):u=b,0<N?N>u&&(N=u):N=u,q!==null&&u>N){var Be=se?"secondary-light":"warning";p?p.run(console.timeStamp.bind(console,se?"Consecutive":"Event: "+q,N,u,En,"Scheduler ⚛",Be)):console.timeStamp(se?"Consecutive":"Event: "+q,N,u,En,"Scheduler ⚛",Be)}b>u&&(N=Se?"error":(r&738197653)===r?"tertiary-light":"primary-light",Se=Ee?"Promise Resolved":Se?"Cascading Update":5<b-u?"Update Blocked":"Update",Ee=[],P!=null&&Ee.push(["Component name",P]),y!=null&&Ee.push(["Method name",y]),u={start:u,end:b,detail:{devtools:{properties:Ee,track:En,trackGroup:"Scheduler ⚛",color:N}}},p?p.run(performance.measure.bind(performance,Se,u)):performance.measure(Se,u))}Sl=-1.1,xu=0,VS=OS=null,Q0=-1.1,Dp=rf,rf=-1.1,nf=er()}if((r&4194048)!==0&&(Oi=aA,b=0<=fc&&fc<dc?dc:fc,u=0<=_a&&_a<dc?dc:_a,p=0<=Su&&Su<dc?dc:Su,y=0<=p?p:0<=u?u:ts,0<=Z0&&(je(256),an(Z0,y,r,Oi)),Ee=p,N=sf,q=0<Mu,se=HS===2,y=ts,p=aA,P=yT,Se=bT,ci&&(En="Transition",0<u?u>y&&(u=y):u=y,0<b?b>u&&(b=u):b=u,0<Ee?Ee>b&&(Ee=b):Ee=b,b>Ee&&N!==null&&(Be=q?"secondary-light":"warning",p?p.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+N,Ee,b,En,"Scheduler ⚛",Be)):console.timeStamp(q?"Consecutive":"Event: "+N,Ee,b,En,"Scheduler ⚛",Be)),u>b&&(p?p.run(console.timeStamp.bind(console,"Action",b,u,En,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",b,u,En,"Scheduler ⚛","primary-dark")),y>u&&(b=se?"Promise Resolved":5<y-u?"Update Blocked":"Update",Ee=[],Se!=null&&Ee.push(["Component name",Se]),P!=null&&Ee.push(["Method name",P]),u={start:u,end:y,detail:{devtools:{properties:Ee,track:En,trackGroup:"Scheduler ⚛",color:"primary-light"}}},p?p.run(performance.measure.bind(performance,b,u)):performance.measure(b,u))),_a=fc=-1.1,HS=0,Z0=-1.1,Mu=Su,Su=-1.1,dc=er()),u=n.timeoutHandle,u!==ja&&(n.timeoutHandle=ja,qg(u)),u=n.cancelPendingCommit,u!==null&&(n.cancelPendingCommit=null,u()),Bo=0,Vd(),ri=n,pn=u=Mo(n.current,null),cn=r,Kn=js,Sa=null,Eu=!1,qp=Q(n,r),dM=!1,xi=vc,gf=Xs=fM=Ru=Cu=0,ys=EA=null,by=!1,(r&8)!==0&&(r|=r&32),p=n.entangledLanes,p!==0)for(n=n.entanglements,p&=r;0<p;)b=31-ji(p),y=1<<b,r|=n[b],p&=~y;return wl=r,Fc(),n=lT(),1e3<n-oT&&(be.recentlyCreatedOwnerStacks=0,oT=n),Lo.discardPendingWarnings(),u}function g0(n,r){Jt=null,be.H=xA,be.getCurrentStack=null,bl=!1,lc=null,r===Np||r===ny?(r=_m(),Kn=wA):r===QS?(r=_m(),Kn=AE):Kn=r===aM?uM:r!==null&&typeof r=="object"&&typeof r.then=="function"?TA:vy,Sa=r;var u=pn;u===null?(xi=MA,Td(n,mt(r,n.current))):u.mode&2&&Zf(u)}function A0(){var n=ba.current;return n===null?!0:(cn&4194048)===cn?Io===null:(cn&62914560)===cn||(cn&536870912)!==0?n===Io:!1}function Ug(){var n=be.H;return be.H=xA,n===null?xA:n}function v0(){var n=be.A;return be.A=JP,n}function qh(n){Oi===null&&(Oi=n._debugTask==null?null:n._debugTask)}function Yh(){xi=Tu,Eu||(cn&4194048)!==cn&&ba.current!==null||(qp=!0),(Cu&134217727)===0&&(Ru&134217727)===0||ri===null||So(ri,cn,Xs,!1)}function Fg(n,r,u){var p=Mn;Mn|=Rr;var b=Ug(),y=v0();if(ri!==n||cn!==r){if(yl){var P=n.memoizedUpdaters;0<P.size&&($c(n,cn),P.clear()),He(n,r)}RA=null,Zc(n,r)}r=!1,P=xi;e:do try{if(Kn!==js&&pn!==null){var N=pn,q=Sa;switch(Kn){case uM:Vd(),P=Ay;break e;case wA:case pf:case mf:case TA:ba.current===null&&(r=!0);var se=Kn;if(Kn=js,Sa=null,Kc(n,N,q,se),u&&qp){P=vc;break e}break;default:se=Kn,Kn=js,Sa=null,Kc(n,N,q,se)}}y0(),P=xi;break}catch(Se){g0(n,Se)}while(!0);return r&&n.shellSuspendCounter++,Xt(),Mn=p,be.H=b,be.A=y,pn===null&&(ri=null,cn=0,Fc()),P}function y0(){for(;pn!==null;)b0(pn)}function yS(n,r){var u=Mn;Mn|=Rr;var p=Ug(),b=v0();if(ri!==n||cn!==r){if(yl){var y=n.memoizedUpdaters;0<y.size&&($c(n,cn),y.clear()),He(n,r)}RA=null,CA=xn()+hM,Zc(n,r)}else qp=Q(n,r);e:do try{if(Kn!==js&&pn!==null)t:switch(r=pn,y=Sa,Kn){case vy:Kn=js,Sa=null,Kc(n,r,y,vy);break;case pf:case mf:if(Km(y)){Kn=js,Sa=null,x0(r);break}r=function(){Kn!==pf&&Kn!==mf||ri!==n||(Kn=yy),Lr(n)},y.then(r,r);break e;case wA:Kn=yy;break e;case AE:Kn=cM;break e;case yy:Km(y)?(Kn=js,Sa=null,x0(r)):(Kn=js,Sa=null,Kc(n,r,y,yy));break;case cM:var P=null;switch(pn.tag){case 26:P=pn.memoizedState;case 5:case 27:var N=pn,q=N.type,se=N.pendingProps;if(P?A(P):dl(N.stateNode,q,se)){Kn=js,Sa=null;var Se=N.sibling;if(Se!==null)pn=Se;else{var Ee=N.return;Ee!==null?(pn=Ee,Jh(Ee)):pn=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Kn=js,Sa=null,Kc(n,r,y,cM);break;case TA:Kn=js,Sa=null,Kc(n,r,y,TA);break;case uM:Vd(),xi=Ay;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}be.actQueue!==null?y0():bS();break}catch(Be){g0(n,Be)}while(!0);return Xt(),be.H=p,be.A=b,Mn=u,pn!==null?vc:(ri=null,cn=0,Fc(),xi)}function bS(){for(;pn!==null&&!Gt();)b0(pn)}function b0(n){var r=n.alternate;(n.mode&2)!==Wt?(td(n),r=xt(n,zr,r,n,wl),Zf(n)):r=xt(n,zr,r,n,wl),n.memoizedProps=n.pendingProps,r===null?Jh(n):pn=r}function x0(n){var r=xt(n,xS,n);n.memoizedProps=n.pendingProps,r===null?Jh(n):pn=r}function xS(n){var r=n.alternate,u=(n.mode&2)!==Wt;switch(u&&td(n),n.tag){case 15:case 0:r=Ua(r,n,n.pendingProps,n.type,void 0,cn);break;case 11:r=Ua(r,n,n.pendingProps,n.type.render,n.ref,cn);break;case 5:Ad(n);default:Vh(r,n),n=pn=Ni(n,wl),r=zr(r,n,wl)}return u&&Zf(n),r}function Kc(n,r,u,p){Xt(),Ad(r),zp=null,gA=0;var b=r.return;try{if(qv(n,b,r,u,cn)){xi=MA,Td(n,mt(u,n.current)),pn=null;return}}catch(y){if(b!==null)throw pn=b,y;xi=MA,Td(n,mt(u,n.current)),pn=null;return}r.flags&32768?(Sn||p===vy?n=!0:qp||(cn&536870912)!==0?n=!1:(Eu=n=!0,(p===pf||p===mf||p===wA||p===TA)&&(p=ba.current,p!==null&&p.tag===13&&(p.flags|=16384))),S0(r,n)):Jh(r)}function Jh(n){var r=n;do{if((r.flags&32768)!==0){S0(r,Eu);return}var u=r.alternate;if(n=r.return,td(r),u=xt(r,Eg,u,r,wl),(r.mode&2)!==Wt&&jm(r),u!==null){pn=u;return}if(r=r.sibling,r!==null){pn=r;return}pn=r=n}while(r!==null);xi===vc&&(xi=gE)}function S0(n,r){do{var u=al(n.alternate,n);if(u!==null){u.flags&=32767,pn=u;return}if((n.mode&2)!==Wt){jm(n),u=n.actualDuration;for(var p=n.child;p!==null;)u+=p.actualDuration,p=p.sibling;n.actualDuration=u}if(u=n.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!r&&(n=n.sibling,n!==null)){pn=n;return}pn=n=u}while(n!==null);xi=Ay,pn=null}function Og(n,r,u,p,b,y,P,N,q,se,Se,Ee,Be,Lt){n.cancelPendingCommit=null;do _c();while(sr!==ku);if(Lo.flushLegacyContextWarning(),Lo.flushPendingUnsafeLifecycleWarnings(),(Mn&(Rr|no))!==Cr)throw Error("Should not already be working.");if(je(u),se===hf?B(Be,Lt,u,Oi):p!==null?Y(Be,Lt,u,p,r!==null&&r.alternate!==null&&r.alternate.memoizedState.isDehydrated&&(r.flags&256)!==0,Oi):ee(Be,Lt,u,Oi),r!==null){if(u===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),r===n.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(y=r.lanes|r.childLanes,y|=KS,Fe(n,u,y,P,N,q),n===ri&&(pn=ri=null,cn=0),Yp=r,Du=n,Bo=u,gM=y,vM=b,TE=p,AM=Lt,EE=Ee,Uo=Sy,CE=null,r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,D0($d,function(){return su(),Uo===Sy&&(Uo=mM),C0(),null})):(n.callbackNode=null,n.callbackPriority=0),uc=null,bu=er(),Ee!==null&&de(Lt,bu,Ee,Oi),p=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||p){p=be.T,be.T=null,b=Kr(),Ti(2),P=Mn,Mn|=no;try{gS(n,r,u)}finally{Mn=P,Ti(b),be.T=p}}sr=xE,M0(),w0(),T0()}}function M0(){if(sr===xE){sr=ku;var n=Du,r=Yp,u=Bo,p=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||p){p=be.T,be.T=null;var b=Kr();Ti(2);var y=Mn;Mn|=no;try{Wp=u,jp=n,jr(),t0(r,n),jp=Wp=null,ul(n.containerInfo)}finally{Mn=y,Ti(b),be.T=p}}n.current=r,sr=SE}}function w0(){if(sr===SE){sr=ku;var n=CE;if(n!==null){bu=er();var r=cc,u=bu;!ci||u<=r||console.timeStamp(n,r,u,En,"Scheduler ⚛","secondary-light")}n=Du,r=Yp,u=Bo;var p=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||p){p=be.T,be.T=null;var b=Kr();Ti(2);var y=Mn;Mn|=no;try{Wp=u,jp=n,jr(),Gi(n,r.alternate,r),jp=Wp=null}finally{Mn=y,Ti(b),be.T=p}}n=AM,r=EE,cc=er(),n=r===null?n:bu,r=cc,u=Uo===pM,p=Oi,uc!==null?me(n,r,uc,!1,p):!ci||r<=n||(p?p.run(console.timeStamp.bind(console,u?"Commit Interrupted View Transition":"Commit",n,r,En,"Scheduler ⚛",u?"error":"secondary-dark")):console.timeStamp(u?"Commit Interrupted View Transition":"Commit",n,r,En,"Scheduler ⚛",u?"error":"secondary-dark")),sr=ME}}function T0(){if(sr===wE||sr===ME){if(sr===wE){var n=cc;cc=er();var r=cc,u=Uo===pM;!ci||r<=n||console.timeStamp(u?"Interrupted View Transition":"Starting Animation",n,r,En,"Scheduler ⚛",u?" error":"secondary-light"),Uo!==pM&&(Uo=bE)}sr=ku,Un(),n=Du;var p=Yp;r=Bo,u=TE;var b=p.actualDuration!==0||(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0;b?sr=My:(sr=ku,Yp=Du=null,E0(n,n.pendingLanes),Af=0,kA=null);var y=n.pendingLanes;if(y===0&&(Pu=null),b||Gg(n),y=pt(r),p=p.stateNode,es&&typeof es.onCommitFiberRoot=="function")try{var P=(p.current.flags&128)===128;switch(y){case 2:var N=kn;break;case 8:N=Do;break;case 32:N=$d;break;case 268435456:N=aT;break;default:N=$d}es.onCommitFiberRoot(Ep,p,N,P)}catch(Ee){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",Ee))}if(yl&&n.memoizedUpdaters.clear(),vS(),u!==null){P=be.T,N=Kr(),Ti(2),be.T=null;try{var q=n.onRecoverableError;for(p=0;p<u.length;p++){var se=u[p],Se=SS(se.stack);xt(se.source,q,se.value,Se)}}finally{be.T=P,Ti(N)}}(Bo&3)!==0&&_c(),Lr(n),y=n.pendingLanes,(r&261930)!==0&&(y&42)!==0?(_0=!0,n===yM?PA++:(PA=0,yM=n)):PA=0,b||Yl(r,cc),Tr&&$g(),Bl(0)}}function SS(n){return n={componentStack:n},Object.defineProperty(n,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),n}function E0(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,yr(r)))}function _c(){return M0(),w0(),T0(),C0()}function C0(){if(sr!==My)return!1;var n=Du,r=gM;gM=0;var u=pt(Bo),p=32>u?32:u;u=be.T;var b=Kr();try{Ti(p),be.T=null;var y=vM;vM=null,p=Du;var P=Bo;if(sr=ku,Yp=Du=null,Bo=0,(Mn&(Rr|no))!==Cr)throw Error("Cannot flush passive effects while already rendering.");je(P),bM=!0,wy=!1;var N=0;if(uc=null,N=xn(),Uo===bE){var q=cc,se=N;!ci||se<=q||(xT?xT.run(console.timeStamp.bind(console,"Animating",q,se,En,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",q,se,En,"Scheduler ⚛","secondary-dark"))}else{q=cc,se=N;var Se=Uo===mM;!ci||se<=q||(Oi?Oi.run(console.timeStamp.bind(console,Se?"Waiting for Paint":"Waiting",q,se,En,"Scheduler ⚛","secondary-light")):console.timeStamp(Se?"Waiting for Paint":"Waiting",q,se,En,"Scheduler ⚛","secondary-light"))}q=Mn,Mn|=no;var Ee=p.current;jr(),l0(Ee);var Be=p.current;Ee=AM,jr(),r0(p,Be,P,y,Ee),Gg(p),Mn=q;var Lt=xn();if(Be=N,Ee=Oi,uc!==null?me(Be,Lt,uc,!0,Ee):!ci||Lt<=Be||(Ee?Ee.run(console.timeStamp.bind(console,"Remaining Effects",Be,Lt,En,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",Be,Lt,En,"Scheduler ⚛","secondary-dark")),Yl(P,Lt),Bl(0,!1),wy?p===kA?Af++:(Af=0,kA=p):Af=0,wy=bM=!1,es&&typeof es.onPostCommitFiberRoot=="function")try{es.onPostCommitFiberRoot(Ep,p)}catch(ti){vl||(vl=!0,console.error("React instrumentation encountered an error: %o",ti))}var qt=p.current.stateNode;return qt.effectDuration=0,qt.passiveEffectDuration=0,!0}finally{Ti(b),be.T=u,E0(n,r)}}function R0(n,r,u){r=mt(u,r),Xm(r),r=Rh(n.stateNode,r,2),n=Ds(n,r,2),n!==null&&(Te(n,2),Lr(n))}function In(n,r,u){if(Jp=!1,n.tag===3)R0(n,n,u);else{for(;r!==null;){if(r.tag===3){R0(r,n,u);return}if(r.tag===1){var p=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Pu===null||!Pu.has(p))){n=mt(u,n),Xm(n),u=Ph(2),p=Ds(r,u,2),p!==null&&(kh(u,p,r,n),Te(p,2),Lr(p));return}}r=r.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
4418
4418
|
|
|
4419
4419
|
Error message:
|
|
4420
4420
|
|
|
@@ -4427,7 +4427,7 @@ act(() => {
|
|
|
4427
4427
|
});
|
|
4428
4428
|
/* assert on the output */
|
|
4429
4429
|
|
|
4430
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),ri===n&&(cn&u)===u&&(xi===Tu||xi===gy&&(cn&62914560)===cn&&xn()-xy<yE?(Mn&Rr)===Cr&&Zc(n,0):fM|=u,gf===cn&&(gf=0)),Lr(n)}function P0(n,r){r===0&&(r=ce()),n=br(n,r),n!==null&&(Te(n,r),Lr(n))}function k0(n){var r=n.memoizedState,u=0;r!==null&&(u=r.retryLane),P0(n,u)}function wS(n,r){var u=0;switch(n.tag){case 31:case 13:var p=n.stateNode,b=n.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=n.stateNode;break;case 22:p=n.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}p!==null&&p.delete(r),P0(n,u)}function Hg(n,r,u){if((r.subtreeFlags&67117056)!==0)for(r=r.child;r!==null;){var p=n,b=r,y=b.type===np;y=u||y,b.tag!==22?b.flags&67108864?y&&xt(b,Bs,p,b):Hg(p,b,y):b.memoizedState===null&&(y&&b.flags&8192?xt(b,Bs,p,b):b.subtreeFlags&67108864&&xt(b,Hg,p,b,y)),r=r.sibling}}function Bs(n,r){nt(!0);try{ll(r),c0(r),i0(n,r.alternate,r,!1),s0(n,r,0,null,!1,0)}finally{nt(!1)}}function Gg(n){var r=!0;n.current.mode&24||(r=!1),Hg(n,n.current,r)}function Qh(n){if((Mn&Rr)===Cr){var r=n.tag;if(r===3||r===1||r===0||r===11||r===14||r===15){if(r=V(n)||"ReactComponent",Ty!==null){if(Ty.has(r))return;Ty.add(r)}else Ty=new Set([r]);xt(n,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function $c(n,r){yl&&n.memoizedUpdaters.forEach(function(u){
|
|
4430
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),ri===n&&(cn&u)===u&&(xi===Tu||xi===gy&&(cn&62914560)===cn&&xn()-xy<yE?(Mn&Rr)===Cr&&Zc(n,0):fM|=u,gf===cn&&(gf=0)),Lr(n)}function P0(n,r){r===0&&(r=ce()),n=br(n,r),n!==null&&(Te(n,r),Lr(n))}function k0(n){var r=n.memoizedState,u=0;r!==null&&(u=r.retryLane),P0(n,u)}function wS(n,r){var u=0;switch(n.tag){case 31:case 13:var p=n.stateNode,b=n.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=n.stateNode;break;case 22:p=n.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}p!==null&&p.delete(r),P0(n,u)}function Hg(n,r,u){if((r.subtreeFlags&67117056)!==0)for(r=r.child;r!==null;){var p=n,b=r,y=b.type===np;y=u||y,b.tag!==22?b.flags&67108864?y&&xt(b,Bs,p,b):Hg(p,b,y):b.memoizedState===null&&(y&&b.flags&8192?xt(b,Bs,p,b):b.subtreeFlags&67108864&&xt(b,Hg,p,b,y)),r=r.sibling}}function Bs(n,r){nt(!0);try{ll(r),c0(r),i0(n,r.alternate,r,!1),s0(n,r,0,null,!1,0)}finally{nt(!1)}}function Gg(n){var r=!0;n.current.mode&24||(r=!1),Hg(n,n.current,r)}function Qh(n){if((Mn&Rr)===Cr){var r=n.tag;if(r===3||r===1||r===0||r===11||r===14||r===15){if(r=V(n)||"ReactComponent",Ty!==null){if(Ty.has(r))return;Ty.add(r)}else Ty=new Set([r]);xt(n,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function $c(n,r){yl&&n.memoizedUpdaters.forEach(function(u){qe(n,u,r)})}function D0(n,r){var u=be.actQueue;return u!==null?(u.push(r),_P):Bt(n,r)}function L0(n){f0()&&be.actQueue===null&&xt(n,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
4431
4431
|
|
|
4432
4432
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
4433
4433
|
|
|
@@ -4479,7 +4479,7 @@ Learn more about this warning here: https://react.dev/link/legacy-context`,p)})}
|
|
|
4479
4479
|
|
|
4480
4480
|
Check the render method of \``+b+"`."),y||p&&(y=`
|
|
4481
4481
|
|
|
4482
|
-
Check the top-level render call using <`+p+">.");var P="";u!=null&&n!==u&&(p=null,typeof u.tag=="number"?p=V(u):typeof u.name=="string"&&(p=u.name),p&&(P=" It was passed a child from "+p+".")),xt(r,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',y,P)})}}};var df=cd(!0),HT=cd(!1),AA=1,hc=2,$a=[],Bp=0,KS=0,GT=0,WT=1,jT=2,_S=3,wu=!1,XT=!1,$S=null,eM=!1,Up=X(null),ry=X(0),ba=X(null),Io=null,Fp=1,vA=2,Xi=X(0),sy=0,eo=1,As=2,xa=4,vs=8,Op,qT=new Set,YT=new Set,tM=new Set,JT=new Set,pc=0,Jt=null,ii=null,tr=null,ay=!1,Vp=!1,ff=!1,oy=0,yA=0,mc=null,qP=0,YP=25,Me=null,to=null,gc=-1,bA=!1,xA={readContext:je,use:Bn,useCallback:Ai,useContext:Ai,useEffect:Ai,useImperativeHandle:Ai,useLayoutEffect:Ai,useInsertionEffect:Ai,useMemo:Ai,useReducer:Ai,useRef:Ai,useState:Ai,useDebugValue:Ai,useDeferredValue:Ai,useTransition:Ai,useSyncExternalStore:Ai,useId:Ai,useHostTransitionStatus:Ai,useFormState:Ai,useActionState:Ai,useOptimistic:Ai,useMemoCache:Ai,useCacheRefresh:Ai};xA.useEffectEvent=Ai;var nM=null,QT=null,iM=null,ZT=null,Ml=null,No=null,ly=null;nM={readContext:function(n){return je(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",en(),Xr(r),Mh(n,r)},useContext:function(n){return Me="useContext",en(),je(n)},useEffect:function(n,r){return Me="useEffect",en(),Xr(r),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",en(),Xr(u),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",en(),Xr(r),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",en(),Xr(r),Ao(n,r)},useMemo:function(n,r){Me="useMemo",en(),Xr(r);var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",en();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",en(),ua(n)},useState:function(n){Me="useState",en();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",en()},useDeferredValue:function(n,r){return Me="useDeferredValue",en(),xd(n,r)},useTransition:function(){return Me="useTransition",en(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",en(),gh(n,r,u)},useId:function(){return Me="useId",en(),wd()},useFormState:function(n,r){return Me="useFormState",en(),Hc(),Si(n,r)},useActionState:function(n,r){return Me="useActionState",en(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",en(),yh(n)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",en(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",en(),el(n)}},QT={readContext:function(n){return je(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Mh(n,r)},useContext:function(n){return Me="useContext",Ge(),je(n)},useEffect:function(n,r){return Me="useEffect",Ge(),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",Ge(),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Ao(n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",Ge(),ua(n)},useState:function(n){Me="useState",Ge();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),xd(n,r)},useTransition:function(){return Me="useTransition",Ge(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),gh(n,r,u)},useId:function(){return Me="useId",Ge(),wd()},useActionState:function(n,r){return Me="useActionState",Ge(),Si(n,r)},useFormState:function(n,r){return Me="useFormState",Ge(),Hc(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",Ge(),yh(n)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),el(n)}},iM={readContext:function(n){return je(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",Ge(),je(n)},useEffect:function(n,r){Me="useEffect",Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=No;try{return Na(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",Ge(),Fn().memoizedState},useState:function(){Me="useState",Ge();var n=be.H;be.H=No;try{return Na(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),Th(n,r)},useTransition:function(){return Me="useTransition",Ge(),Hv()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),$o(n,r,u)},useId:function(){return Me="useId",Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",Ge(),Hc(),bd(n)},useActionState:function(n){return Me="useActionState",Ge(),bd(n)},useOptimistic:function(n,r){return Me="useOptimistic",Ge(),lg(n,r)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),tl(n)}},ZT={readContext:function(n){return je(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",Ge(),je(n)},useEffect:function(n,r){Me="useEffect",Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=ly;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=ly;try{return Gc(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",Ge(),Fn().memoizedState},useState:function(){Me="useState",Ge();var n=be.H;be.H=ly;try{return Gc(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),fg(n,r)},useTransition:function(){return Me="useTransition",Ge(),vo()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),$o(n,r,u)},useId:function(){return Me="useId",Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",Ge(),Hc(),Is(n)},useActionState:function(n){return Me="useActionState",Ge(),Is(n)},useOptimistic:function(n,r){return Me="useOptimistic",Ge(),cg(n,r)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),tl(n)}},Ml={readContext:function(n){return w(),je(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),en(),Mh(n,r)},useContext:function(n){return Me="useContext",S(),en(),je(n)},useEffect:function(n,r){return Me="useEffect",S(),en(),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),en(),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",S(),en(),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),en(),Ao(n,r)},useMemo:function(n,r){Me="useMemo",S(),en();var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),en();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",S(),en(),ua(n)},useState:function(n){Me="useState",S(),en();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",S(),en()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),en(),xd(n,r)},useTransition:function(){return Me="useTransition",S(),en(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),en(),gh(n,r,u)},useId:function(){return Me="useId",S(),en(),wd()},useFormState:function(n,r){return Me="useFormState",S(),en(),Si(n,r)},useActionState:function(n,r){return Me="useActionState",S(),en(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",S(),en(),yh(n)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",en(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",S(),en(),el(n)}},No={readContext:function(n){return w(),je(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",S(),Ge(),je(n)},useEffect:function(n,r){Me="useEffect",S(),Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",S(),Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",S(),Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),Ge();var p=be.H;be.H=No;try{return Na(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",S(),Ge(),Fn().memoizedState},useState:function(){Me="useState",S(),Ge();var n=be.H;be.H=No;try{return Na(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",S(),Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),Ge(),Th(n,r)},useTransition:function(){return Me="useTransition",S(),Ge(),Hv()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),Ge(),$o(n,r,u)},useId:function(){return Me="useId",S(),Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",S(),Ge(),bd(n)},useActionState:function(n){return Me="useActionState",S(),Ge(),bd(n)},useOptimistic:function(n,r){return Me="useOptimistic",S(),Ge(),lg(n,r)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",S(),Ge(),tl(n)}},ly={readContext:function(n){return w(),je(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",S(),Ge(),je(n)},useEffect:function(n,r){Me="useEffect",S(),Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",S(),Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",S(),Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),Ge();var p=be.H;be.H=No;try{return Gc(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",S(),Ge(),Fn().memoizedState},useState:function(){Me="useState",S(),Ge();var n=be.H;be.H=No;try{return Gc(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",S(),Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),Ge(),fg(n,r)},useTransition:function(){return Me="useTransition",S(),Ge(),vo()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),Ge(),$o(n,r,u)},useId:function(){return Me="useId",S(),Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",S(),Ge(),Is(n)},useActionState:function(n){return Me="useActionState",S(),Ge(),Is(n)},useOptimistic:function(n,r){return Me="useOptimistic",S(),Ge(),cg(n,r)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",S(),Ge(),tl(n)}};var KT={},_T=new Set,$T=new Set,eE=new Set,tE=new Set,nE=new Set,iE=new Set,rE=new Set,sE=new Set,aE=new Set,oE=new Set;Object.freeze(KT);var rM={enqueueSetState:function(n,r,u){n=n._reactInternals;var p=ds(n),b=po(p);b.payload=r,u!=null&&(mg(u),b.callback=u),r=Ds(n,b,p),r!==null&&(Ki(p,"this.setState()",n),ai(r,n,p),Oc(r,n,p))},enqueueReplaceState:function(n,r,u){n=n._reactInternals;var p=ds(n),b=po(p);b.tag=WT,b.payload=r,u!=null&&(mg(u),b.callback=u),r=Ds(n,b,p),r!==null&&(Ki(p,"this.replaceState()",n),ai(r,n,p),Oc(r,n,p))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var u=ds(n),p=po(u);p.tag=jT,r!=null&&(mg(r),p.callback=r),r=Ds(n,p,u),r!==null&&(Ki(u,"this.forceUpdate()",n),ai(r,n,u),Oc(r,n,u))}},Hp=null,sM=null,aM=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),nr=!1,lE={},cE={},uE={},dE={},Gp=!1,fE={},cy={},oM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},hE=!1,pE=null;pE=new Set;var Ac=!1,ir=!1,lM=!1,mE=typeof WeakSet=="function"?WeakSet:Set,Er=null,Wp=null,jp=null,rr=null,Ws=!1,zo=null,gr=!1,Xp=8192,JP={getCacheForType:function(n){var r=je(Ri),u=r.data.get(n);return u===void 0&&(u=n(),r.data.set(n,u)),u},cacheSignal:function(){return je(Ri).controller.signal},getOwner:function(){return lc}},uy=0,dy=1,fy=2,hy=3,py=4;if(typeof Symbol=="function"&&Symbol.for){var SA=Symbol.for;uy=SA("selector.component"),dy=SA("selector.has_pseudo_class"),fy=SA("selector.role"),hy=SA("selector.test_id"),py=SA("selector.text")}var my=[],QP=typeof WeakMap=="function"?WeakMap:Map,Cr=0,Rr=2,no=4,vc=0,MA=1,hf=2,gy=3,Tu=4,Ay=6,gE=5,Mn=Cr,ri=null,pn=null,cn=0,js=0,vy=1,pf=2,wA=3,AE=4,cM=5,TA=6,yy=7,uM=8,mf=9,Kn=js,Sa=null,Eu=!1,qp=!1,dM=!1,wl=0,xi=vc,Cu=0,Ru=0,fM=0,Xs=0,gf=0,EA=null,ys=null,by=!1,xy=0,vE=0,yE=300,CA=1/0,hM=500,RA=null,Oi=null,Pu=null,Sy=0,pM=1,mM=2,bE=3,ku=0,xE=1,SE=2,ME=3,wE=4,My=5,sr=0,Du=null,Yp=null,Bo=0,gM=0,AM=-0,vM=null,TE=null,EE=null,Uo=Sy,CE=null,ZP=50,PA=0,yM=null,bM=!1,wy=!1,KP=50,Af=0,kA=null,Jp=!1,Ty=null,RE=!1,PE=new Set,_P={},io=null,Qp=null,kE=!1;try{var U5=Object.preventExtensions({})}catch{kE=!0}var DE=!1,LE={},IE=null,NE=null,zE=null,BE=null,UE=null,FE=null,OE=null,VE=null,HE=null,GE=null;return IE=function(n,r,u,p){r=t(n,r),r!==null&&(u=i(r.memoizedState,u,0,p),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},NE=function(n,r,u){r=t(n,r),r!==null&&(u=d(r.memoizedState,u,0),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},zE=function(n,r,u,p){r=t(n,r),r!==null&&(u=a(r.memoizedState,u,p),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},BE=function(n,r,u){n.pendingProps=i(n.memoizedProps,r,0,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},UE=function(n,r){n.pendingProps=d(n.memoizedProps,r,0),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},FE=function(n,r,u){n.pendingProps=a(n.memoizedProps,r,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},OE=function(n){var r=br(n,2);r!==null&&ai(r,n,2)},VE=function(n){var r=ce(),u=br(n,r);u!==null&&ai(u,n,r)},HE=function(n){m=n},GE=function(n){f=n},hn.attemptContinuousHydration=function(n){if(n.tag===13||n.tag===31){var r=br(n,67108864);r!==null&&ai(r,n,67108864),tu(n,67108864)}},hn.attemptHydrationAtCurrentPriority=function(n){if(n.tag===13||n.tag===31){var r=ds(n);r=Pe(r);var u=br(n,r);u!==null&&ai(u,n,r),tu(n,r)}},hn.attemptSynchronousHydration=function(n){switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var r=$(n.pendingLanes);if(r!==0){for(n.pendingLanes|=2,n.entangledLanes|=2;r;){var u=1<<31-ji(r);n.entanglements[1]|=u,r&=~u}Lr(n),(Mn&(Rr|no))===Cr&&(CA=xn()+hM,Bl(0))}}break;case 31:case 13:r=br(n,2),r!==null&&ai(r,n,2),Fd(),tu(n,2)}},hn.batchedUpdates=function(n,r){return n(r)},hn.createComponentSelector=function(n){return{$$typeof:uy,value:n}},hn.createContainer=function(n,r,u,p,b,y,P,N,q,se){return Zl(n,r,!1,null,u,p,y,null,P,N,q,se)},hn.createHasPseudoClassSelector=function(n){return{$$typeof:dy,value:n}},hn.createHydrationContainer=function(n,r,u,p,b,y,P,N,q,se,Se,Ee,ze,Lt){var qt;return n=Zl(u,p,!0,n,b,y,N,Lt,q,se,Se,Ee),n.context=z0(null),u=n.current,p=ds(u),p=Pe(p),b=po(p),b.callback=(qt=r)!=null?qt:null,Ds(u,b,p),Ki(p,"hydrateRoot()",null),r=p,n.current.lanes=r,Te(n,r),Lr(n),n},hn.createPortal=function(n,r,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{Jr(p);var b=!1}catch{b=!0}return b&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object"),Jr(p)),{$$typeof:To,key:p==null?null:""+p,children:n,containerInfo:r,implementation:u}},hn.createRoleSelector=function(n){return{$$typeof:fy,value:n}},hn.createTestNameSelector=function(n){return{$$typeof:hy,value:n}},hn.createTextSelector=function(n){return{$$typeof:py,value:n}},hn.defaultOnCaughtError=function(n){var r=Hp?"The above error occurred in the <"+Hp+"> component.":"The above error occurred in one of your React components.",u="React will try to recreate this component tree from scratch using the error boundary you provided, "+((sM||"Anonymous")+".");typeof n=="object"&&n!==null&&typeof n.environmentName=="string"?ec("error",[`%o
|
|
4482
|
+
Check the top-level render call using <`+p+">.");var P="";u!=null&&n!==u&&(p=null,typeof u.tag=="number"?p=V(u):typeof u.name=="string"&&(p=u.name),p&&(P=" It was passed a child from "+p+".")),xt(r,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',y,P)})}}};var df=cd(!0),HT=cd(!1),AA=1,hc=2,$a=[],Bp=0,KS=0,GT=0,WT=1,jT=2,_S=3,wu=!1,XT=!1,$S=null,eM=!1,Up=X(null),ry=X(0),ba=X(null),Io=null,Fp=1,vA=2,Xi=X(0),sy=0,eo=1,As=2,xa=4,vs=8,Op,qT=new Set,YT=new Set,tM=new Set,JT=new Set,pc=0,Jt=null,ii=null,tr=null,ay=!1,Vp=!1,ff=!1,oy=0,yA=0,mc=null,qP=0,YP=25,Me=null,to=null,gc=-1,bA=!1,xA={readContext:Xe,use:Bn,useCallback:Ai,useContext:Ai,useEffect:Ai,useImperativeHandle:Ai,useLayoutEffect:Ai,useInsertionEffect:Ai,useMemo:Ai,useReducer:Ai,useRef:Ai,useState:Ai,useDebugValue:Ai,useDeferredValue:Ai,useTransition:Ai,useSyncExternalStore:Ai,useId:Ai,useHostTransitionStatus:Ai,useFormState:Ai,useActionState:Ai,useOptimistic:Ai,useMemoCache:Ai,useCacheRefresh:Ai};xA.useEffectEvent=Ai;var nM=null,QT=null,iM=null,ZT=null,Ml=null,No=null,ly=null;nM={readContext:function(n){return Xe(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",en(),Xr(r),Mh(n,r)},useContext:function(n){return Me="useContext",en(),Xe(n)},useEffect:function(n,r){return Me="useEffect",en(),Xr(r),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",en(),Xr(u),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",en(),Xr(r),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",en(),Xr(r),Ao(n,r)},useMemo:function(n,r){Me="useMemo",en(),Xr(r);var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",en();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",en(),ua(n)},useState:function(n){Me="useState",en();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",en()},useDeferredValue:function(n,r){return Me="useDeferredValue",en(),xd(n,r)},useTransition:function(){return Me="useTransition",en(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",en(),gh(n,r,u)},useId:function(){return Me="useId",en(),wd()},useFormState:function(n,r){return Me="useFormState",en(),Hc(),Si(n,r)},useActionState:function(n,r){return Me="useActionState",en(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",en(),yh(n)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",en(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",en(),el(n)}},QT={readContext:function(n){return Xe(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Mh(n,r)},useContext:function(n){return Me="useContext",Ge(),Xe(n)},useEffect:function(n,r){return Me="useEffect",Ge(),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",Ge(),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Ao(n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",Ge(),ua(n)},useState:function(n){Me="useState",Ge();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),xd(n,r)},useTransition:function(){return Me="useTransition",Ge(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),gh(n,r,u)},useId:function(){return Me="useId",Ge(),wd()},useActionState:function(n,r){return Me="useActionState",Ge(),Si(n,r)},useFormState:function(n,r){return Me="useFormState",Ge(),Hc(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",Ge(),yh(n)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),el(n)}},iM={readContext:function(n){return Xe(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",Ge(),Xe(n)},useEffect:function(n,r){Me="useEffect",Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=No;try{return Na(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",Ge(),Fn().memoizedState},useState:function(){Me="useState",Ge();var n=be.H;be.H=No;try{return Na(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),Th(n,r)},useTransition:function(){return Me="useTransition",Ge(),Hv()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),$o(n,r,u)},useId:function(){return Me="useId",Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",Ge(),Hc(),bd(n)},useActionState:function(n){return Me="useActionState",Ge(),bd(n)},useOptimistic:function(n,r){return Me="useOptimistic",Ge(),lg(n,r)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),tl(n)}},ZT={readContext:function(n){return Xe(n)},use:Bn,useCallback:function(n,r){return Me="useCallback",Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",Ge(),Xe(n)},useEffect:function(n,r){Me="useEffect",Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",Ge();var u=be.H;be.H=ly;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",Ge();var p=be.H;be.H=ly;try{return Gc(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",Ge(),Fn().memoizedState},useState:function(){Me="useState",Ge();var n=be.H;be.H=ly;try{return Gc(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",Ge(),fg(n,r)},useTransition:function(){return Me="useTransition",Ge(),vo()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",Ge(),$o(n,r,u)},useId:function(){return Me="useId",Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",Ge(),Hc(),Is(n)},useActionState:function(n){return Me="useActionState",Ge(),Is(n)},useOptimistic:function(n,r){return Me="useOptimistic",Ge(),cg(n,r)},useHostTransitionStatus:il,useMemoCache:Ol,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",Ge(),tl(n)}},Ml={readContext:function(n){return w(),Xe(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),en(),Mh(n,r)},useContext:function(n){return Me="useContext",S(),en(),Xe(n)},useEffect:function(n,r){return Me="useEffect",S(),en(),qr(n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),en(),Sh(n,r,u)},useInsertionEffect:function(n,r){Me="useInsertionEffect",S(),en(),go(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),en(),Ao(n,r)},useMemo:function(n,r){Me="useMemo",S(),en();var u=be.H;be.H=Ml;try{return wh(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),en();var p=be.H;be.H=Ml;try{return mh(n,r,u)}finally{be.H=p}},useRef:function(n){return Me="useRef",S(),en(),ua(n)},useState:function(n){Me="useState",S(),en();var r=be.H;be.H=Ml;try{return Wc(n)}finally{be.H=r}},useDebugValue:function(){Me="useDebugValue",S(),en()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),en(),xd(n,r)},useTransition:function(){return Me="useTransition",S(),en(),Eh()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),en(),gh(n,r,u)},useId:function(){return Me="useId",S(),en(),wd()},useFormState:function(n,r){return Me="useFormState",S(),en(),Si(n,r)},useActionState:function(n,r){return Me="useActionState",S(),en(),Si(n,r)},useOptimistic:function(n){return Me="useOptimistic",S(),en(),yh(n)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",en(),rl()},useEffectEvent:function(n){return Me="useEffectEvent",S(),en(),el(n)}},No={readContext:function(n){return w(),Xe(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",S(),Ge(),Xe(n)},useEffect:function(n,r){Me="useEffect",S(),Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",S(),Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",S(),Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),Ge();var p=be.H;be.H=No;try{return Na(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",S(),Ge(),Fn().memoizedState},useState:function(){Me="useState",S(),Ge();var n=be.H;be.H=No;try{return Na(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",S(),Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),Ge(),Th(n,r)},useTransition:function(){return Me="useTransition",S(),Ge(),Hv()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),Ge(),$o(n,r,u)},useId:function(){return Me="useId",S(),Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",S(),Ge(),bd(n)},useActionState:function(n){return Me="useActionState",S(),Ge(),bd(n)},useOptimistic:function(n,r){return Me="useOptimistic",S(),Ge(),lg(n,r)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",S(),Ge(),tl(n)}},ly={readContext:function(n){return w(),Xe(n)},use:function(n){return S(),Bn(n)},useCallback:function(n,r){return Me="useCallback",S(),Ge(),Vl(n,r)},useContext:function(n){return Me="useContext",S(),Ge(),Xe(n)},useEffect:function(n,r){Me="useEffect",S(),Ge(),Sr(2048,vs,n,r)},useImperativeHandle:function(n,r,u){return Me="useImperativeHandle",S(),Ge(),nl(n,r,u)},useInsertionEffect:function(n,r){return Me="useInsertionEffect",S(),Ge(),Sr(4,As,n,r)},useLayoutEffect:function(n,r){return Me="useLayoutEffect",S(),Ge(),Sr(4,xa,n,r)},useMemo:function(n,r){Me="useMemo",S(),Ge();var u=be.H;be.H=No;try{return jc(n,r)}finally{be.H=u}},useReducer:function(n,r,u){Me="useReducer",S(),Ge();var p=be.H;be.H=No;try{return Gc(n,r,u)}finally{be.H=p}},useRef:function(){return Me="useRef",S(),Ge(),Fn().memoizedState},useState:function(){Me="useState",S(),Ge();var n=be.H;be.H=No;try{return Gc(la)}finally{be.H=n}},useDebugValue:function(){Me="useDebugValue",S(),Ge()},useDeferredValue:function(n,r){return Me="useDeferredValue",S(),Ge(),fg(n,r)},useTransition:function(){return Me="useTransition",S(),Ge(),vo()},useSyncExternalStore:function(n,r,u){return Me="useSyncExternalStore",S(),Ge(),$o(n,r,u)},useId:function(){return Me="useId",S(),Ge(),Fn().memoizedState},useFormState:function(n){return Me="useFormState",S(),Ge(),Is(n)},useActionState:function(n){return Me="useActionState",S(),Ge(),Is(n)},useOptimistic:function(n,r){return Me="useOptimistic",S(),Ge(),cg(n,r)},useMemoCache:function(n){return S(),Ol(n)},useHostTransitionStatus:il,useCacheRefresh:function(){return Me="useCacheRefresh",Ge(),Fn().memoizedState},useEffectEvent:function(n){return Me="useEffectEvent",S(),Ge(),tl(n)}};var KT={},_T=new Set,$T=new Set,eE=new Set,tE=new Set,nE=new Set,iE=new Set,rE=new Set,sE=new Set,aE=new Set,oE=new Set;Object.freeze(KT);var rM={enqueueSetState:function(n,r,u){n=n._reactInternals;var p=ds(n),b=po(p);b.payload=r,u!=null&&(mg(u),b.callback=u),r=Ds(n,b,p),r!==null&&(Ki(p,"this.setState()",n),ai(r,n,p),Oc(r,n,p))},enqueueReplaceState:function(n,r,u){n=n._reactInternals;var p=ds(n),b=po(p);b.tag=WT,b.payload=r,u!=null&&(mg(u),b.callback=u),r=Ds(n,b,p),r!==null&&(Ki(p,"this.replaceState()",n),ai(r,n,p),Oc(r,n,p))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var u=ds(n),p=po(u);p.tag=jT,r!=null&&(mg(r),p.callback=r),r=Ds(n,p,u),r!==null&&(Ki(u,"this.forceUpdate()",n),ai(r,n,u),Oc(r,n,u))}},Hp=null,sM=null,aM=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),nr=!1,lE={},cE={},uE={},dE={},Gp=!1,fE={},cy={},oM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},hE=!1,pE=null;pE=new Set;var Ac=!1,ir=!1,lM=!1,mE=typeof WeakSet=="function"?WeakSet:Set,Er=null,Wp=null,jp=null,rr=null,Ws=!1,zo=null,gr=!1,Xp=8192,JP={getCacheForType:function(n){var r=Xe(Ri),u=r.data.get(n);return u===void 0&&(u=n(),r.data.set(n,u)),u},cacheSignal:function(){return Xe(Ri).controller.signal},getOwner:function(){return lc}},uy=0,dy=1,fy=2,hy=3,py=4;if(typeof Symbol=="function"&&Symbol.for){var SA=Symbol.for;uy=SA("selector.component"),dy=SA("selector.has_pseudo_class"),fy=SA("selector.role"),hy=SA("selector.test_id"),py=SA("selector.text")}var my=[],QP=typeof WeakMap=="function"?WeakMap:Map,Cr=0,Rr=2,no=4,vc=0,MA=1,hf=2,gy=3,Tu=4,Ay=6,gE=5,Mn=Cr,ri=null,pn=null,cn=0,js=0,vy=1,pf=2,wA=3,AE=4,cM=5,TA=6,yy=7,uM=8,mf=9,Kn=js,Sa=null,Eu=!1,qp=!1,dM=!1,wl=0,xi=vc,Cu=0,Ru=0,fM=0,Xs=0,gf=0,EA=null,ys=null,by=!1,xy=0,vE=0,yE=300,CA=1/0,hM=500,RA=null,Oi=null,Pu=null,Sy=0,pM=1,mM=2,bE=3,ku=0,xE=1,SE=2,ME=3,wE=4,My=5,sr=0,Du=null,Yp=null,Bo=0,gM=0,AM=-0,vM=null,TE=null,EE=null,Uo=Sy,CE=null,ZP=50,PA=0,yM=null,bM=!1,wy=!1,KP=50,Af=0,kA=null,Jp=!1,Ty=null,RE=!1,PE=new Set,_P={},io=null,Qp=null,kE=!1;try{var U5=Object.preventExtensions({})}catch{kE=!0}var DE=!1,LE={},IE=null,NE=null,zE=null,BE=null,UE=null,FE=null,OE=null,VE=null,HE=null,GE=null;return IE=function(n,r,u,p){r=t(n,r),r!==null&&(u=i(r.memoizedState,u,0,p),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},NE=function(n,r,u){r=t(n,r),r!==null&&(u=d(r.memoizedState,u,0),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},zE=function(n,r,u,p){r=t(n,r),r!==null&&(u=a(r.memoizedState,u,p),r.memoizedState=u,r.baseState=u,n.memoizedProps=Wn({},n.memoizedProps),u=br(n,2),u!==null&&ai(u,n,2))},BE=function(n,r,u){n.pendingProps=i(n.memoizedProps,r,0,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},UE=function(n,r){n.pendingProps=d(n.memoizedProps,r,0),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},FE=function(n,r,u){n.pendingProps=a(n.memoizedProps,r,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps),r=br(n,2),r!==null&&ai(r,n,2)},OE=function(n){var r=br(n,2);r!==null&&ai(r,n,2)},VE=function(n){var r=ce(),u=br(n,r);u!==null&&ai(u,n,r)},HE=function(n){m=n},GE=function(n){f=n},hn.attemptContinuousHydration=function(n){if(n.tag===13||n.tag===31){var r=br(n,67108864);r!==null&&ai(r,n,67108864),tu(n,67108864)}},hn.attemptHydrationAtCurrentPriority=function(n){if(n.tag===13||n.tag===31){var r=ds(n);r=Pe(r);var u=br(n,r);u!==null&&ai(u,n,r),tu(n,r)}},hn.attemptSynchronousHydration=function(n){switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var r=$(n.pendingLanes);if(r!==0){for(n.pendingLanes|=2,n.entangledLanes|=2;r;){var u=1<<31-ji(r);n.entanglements[1]|=u,r&=~u}Lr(n),(Mn&(Rr|no))===Cr&&(CA=xn()+hM,Bl(0))}}break;case 31:case 13:r=br(n,2),r!==null&&ai(r,n,2),Fd(),tu(n,2)}},hn.batchedUpdates=function(n,r){return n(r)},hn.createComponentSelector=function(n){return{$$typeof:uy,value:n}},hn.createContainer=function(n,r,u,p,b,y,P,N,q,se){return Zl(n,r,!1,null,u,p,y,null,P,N,q,se)},hn.createHasPseudoClassSelector=function(n){return{$$typeof:dy,value:n}},hn.createHydrationContainer=function(n,r,u,p,b,y,P,N,q,se,Se,Ee,Be,Lt){var qt;return n=Zl(u,p,!0,n,b,y,N,Lt,q,se,Se,Ee),n.context=z0(null),u=n.current,p=ds(u),p=Pe(p),b=po(p),b.callback=(qt=r)!=null?qt:null,Ds(u,b,p),Ki(p,"hydrateRoot()",null),r=p,n.current.lanes=r,Te(n,r),Lr(n),n},hn.createPortal=function(n,r,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{Jr(p);var b=!1}catch{b=!0}return b&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object"),Jr(p)),{$$typeof:To,key:p==null?null:""+p,children:n,containerInfo:r,implementation:u}},hn.createRoleSelector=function(n){return{$$typeof:fy,value:n}},hn.createTestNameSelector=function(n){return{$$typeof:hy,value:n}},hn.createTextSelector=function(n){return{$$typeof:py,value:n}},hn.defaultOnCaughtError=function(n){var r=Hp?"The above error occurred in the <"+Hp+"> component.":"The above error occurred in one of your React components.",u="React will try to recreate this component tree from scratch using the error boundary you provided, "+((sM||"Anonymous")+".");typeof n=="object"&&n!==null&&typeof n.environmentName=="string"?ec("error",[`%o
|
|
4483
4483
|
|
|
4484
4484
|
%s
|
|
4485
4485
|
|
|
@@ -4493,11 +4493,11 @@ Check the top-level render call using <`+p+">.");var P="";u!=null&&n!==u&&(p=nul
|
|
|
4493
4493
|
|
|
4494
4494
|
%s
|
|
4495
4495
|
`,Hp?"An error occurred in the <"+Hp+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
4496
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},hn.deferredUpdates=function(n){var r=be.T,u=Kr();try{return Ti(32),be.T=null,n()}finally{Ti(u),be.T=r}},hn.discreteUpdates=function(n,r,u,p,b){var y=be.T,P=Kr();try{return Ti(2),be.T=null,n(r,u,p,b)}finally{Ti(P),be.T=y,Mn===Cr&&(CA=xn()+hM)}},hn.findAllNodes=Xh,hn.findBoundingRects=function(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");r=Xh(n,r),n=[];for(var u=0;u<r.length;u++)n.push(fl(r[u]));for(r=n.length-1;0<r;r--){u=n[r];for(var p=u.x,b=p+u.width,y=u.y,P=y+u.height,N=r-1;0<=N;N--)if(r!==N){var q=n[N],se=q.x,Se=se+q.width,Ee=q.y,
|
|
4496
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},hn.deferredUpdates=function(n){var r=be.T,u=Kr();try{return Ti(32),be.T=null,n()}finally{Ti(u),be.T=r}},hn.discreteUpdates=function(n,r,u,p,b){var y=be.T,P=Kr();try{return Ti(2),be.T=null,n(r,u,p,b)}finally{Ti(P),be.T=y,Mn===Cr&&(CA=xn()+hM)}},hn.findAllNodes=Xh,hn.findBoundingRects=function(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");r=Xh(n,r),n=[];for(var u=0;u<r.length;u++)n.push(fl(r[u]));for(r=n.length-1;0<r;r--){u=n[r];for(var p=u.x,b=p+u.width,y=u.y,P=y+u.height,N=r-1;0<=N;N--)if(r!==N){var q=n[N],se=q.x,Se=se+q.width,Ee=q.y,Be=Ee+q.height;if(p>=se&&y>=Ee&&b<=Se&&P<=Be){n.splice(r,1);break}else if(p!==se||u.width!==q.width||Be<y||Ee>P){if(!(y!==Ee||u.height!==q.height||Se<p||se>b)){se>p&&(q.width+=se-p,q.x=p),Se<b&&(q.width=b-se),n.splice(r,1);break}}else{Ee>y&&(q.height+=Ee-y,q.y=y),Be<P&&(q.height=P-Ee),n.splice(r,1);break}}}return n},hn.findHostInstance=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error("Unable to find node on an unmounted component."):(n=Object.keys(n).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+n));return n=O(r),n===null?null:Ur(n.stateNode)},hn.findHostInstanceWithNoPortals=function(n){return n=L(n),n=n!==null?H(n):null,n===null?null:Ur(n.stateNode)},hn.findHostInstanceWithWarning=function(n,r){var u=n._reactInternals;if(u===void 0)throw typeof n.render=="function"?Error("Unable to find node on an unmounted component."):(n=Object.keys(n).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+n));if(n=O(u),n===null)return null;if(n.mode&8){var p=V(u)||"Component";LE[p]||(LE[p]=!0,xt(n,function(){u.mode&8?console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",r,r,p):console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",r,r,p)}))}return Ur(n.stateNode)},hn.flushPassiveEffects=_c,hn.flushSyncFromReconciler=function(n){var r=Mn;Mn|=1;var u=be.T,p=Kr();try{if(Ti(2),be.T=null,n)return n()}finally{Ti(p),be.T=u,Mn=r,(Mn&(Rr|no))===Cr&&Bl(0)}},hn.flushSyncWork=Fd,hn.focusWithin=function(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");for(n=Ng(n),r=d0(n,r),r=Array.from(r),n=0;n<r.length;){var u=r[n++],p=u.tag;if(!qa(u)){if((p===5||p===26||p===27)&&fs(u.stateNode))return!0;for(u=u.child;u!==null;)r.push(u),u=u.sibling}}return!1},hn.getFindAllNodesFailureDescription=function(n,r){if(!ga)throw Error("Test selector API is not supported by this renderer.");var u=0,p=[];n=[Ng(n),0];for(var b=0;b<n.length;){var y=n[b++],P=y.tag,N=n[b++],q=r[N];if((P!==5&&P!==26&&P!==27||!qa(y))&&(zg(y,q)&&(p.push(jh(q)),N++,N>u&&(u=N)),N<r.length))for(y=y.child;y!==null;)n.push(y,N),y=y.sibling}if(u<r.length){for(n=[];u<r.length;u++)n.push(jh(r[u]));return`findAllNodes was able to match part of the selector:
|
|
4497
4497
|
`+(p.join(" > ")+`
|
|
4498
4498
|
|
|
4499
4499
|
No matching component was found for:
|
|
4500
|
-
`)+n.join(" > ")}return null},hn.getPublicRootInstance=function(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 27:case 5:return Ur(n.child.stateNode);default:return n.child.stateNode}},hn.injectIntoDevTools=function(){var n={bundleType:1,version:Us,rendererPackageName:Fs,currentDispatcherRef:be,reconcilerVersion:"19.2.0"};return Eo!==null&&(n.rendererConfig=Eo),n.overrideHookState=IE,n.overrideHookStateDeletePath=NE,n.overrideHookStateRenamePath=zE,n.overrideProps=BE,n.overridePropsDeletePath=UE,n.overridePropsRenamePath=FE,n.scheduleUpdate=OE,n.scheduleRetry=VE,n.setErrorHandler=HE,n.setSuspenseHandler=GE,n.scheduleRefresh=M,n.scheduleRoot=v,n.setRefreshHandler=x,n.getCurrentFiber=tp,Nt(n)},hn.isAlreadyRendering=Od,hn.observeVisibleRects=function(n,r,u,p){function b(){var se=Xh(n,r);y.forEach(function(Se){0>se.indexOf(Se)&&q(Se)}),se.forEach(function(Se){0>y.indexOf(Se)&&N(Se)})}if(!ga)throw Error("Test selector API is not supported by this renderer.");var y=Xh(n,r);u=Aa(y,u,p);var P=u.disconnect,N=u.observe,q=u.unobserve;return my.push(b),{disconnect:function(){var se=my.indexOf(b);0<=se&&my.splice(se,1),P()}}},hn.shouldError=function(n){return m(n)},hn.shouldSuspend=function(n){return f(n)},hn.startHostTransition=function(n,r,u,p){if(n.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var b=hg(n).queue;Gn(n),Nr(n,b,r,Vs,u===null?k:function(){be.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var y=hg(n);return y.next===null&&(y=n.alternate.memoizedState),Xc(n,y.next.queue,{},ds(n)),u(p)})},hn.updateContainer=function(n,r,u,p){var b=r.current,y=ds(b);return Gd(b,y,n,r,u,p),y},hn.updateContainerSync=B0,hn},s.exports.default=s.exports,Object.defineProperty(s.exports,"__esModule",{value:!0}))})(V2)),V2.exports}var G2;function MV(){return G2||(G2=1,process.env.NODE_ENV==="production"?vw.exports=xV():vw.exports=SV()),vw.exports}var wV=MV();const TV=bV(wV);function EV(s){const e=TV(s);return e.injectIntoDevTools(),e}const hP=0,Nm={},CV=/^three(?=[A-Z])/,uS=s=>`${s[0].toUpperCase()}${s.slice(1)}`;let RV=0;const PV=s=>typeof s=="function";function kV(s){if(PV(s)){const e=`${RV++}`;return Nm[e]=s,e}else Object.assign(Nm,s)}function pP(s,e){const t=uS(s),i=Nm[t];if(s!=="primitive"&&!i)throw new Error(`R3F: ${t} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(s==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function DV(s,e,t){var i;return s=uS(s)in Nm?s:s.replace(CV,""),pP(s,e),s==="primitive"&&(i=e.object)!=null&&i.__r3f&&delete e.object.__r3f,Ax(e.object,t,s,e)}function LV(s){if(!s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?yx(s.parent,s):Js(s.object)&&(s.object.visible=!1),s.isHidden=!0,Gm(s)}}function mP(s){if(s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?vx(s.parent,s):Js(s.object)&&s.props.visible!==!1&&(s.object.visible=!0),s.isHidden=!1,Gm(s)}}function $1(s,e,t){const i=e.root.getState();if(!(!s.parent&&s.object!==i.scene)){if(!e.object){var a,c;const d=Nm[uS(e.type)];e.object=(a=e.props.object)!=null?a:new d(...(c=e.props.args)!=null?c:[]),e.object.__r3f=e}if(Hu(e.object,e.props),e.props.attach)vx(s,e);else if(Js(e.object)&&Js(s.object)){const d=s.object.children.indexOf(t?.object);if(t&&d!==-1){const f=s.object.children.indexOf(e.object);if(f!==-1){s.object.children.splice(f,1);const m=f<d?d-1:d;s.object.children.splice(m,0,e.object)}else e.object.parent=s.object,s.object.children.splice(d,0,e.object),e.object.dispatchEvent({type:"added"}),s.object.dispatchEvent({type:"childadded",child:e.object})}else s.object.add(e.object)}for(const d of e.children)$1(e,d);Gm(e)}}function yw(s,e){e&&(e.parent=s,s.children.push(e),$1(s,e))}function W2(s,e,t){if(!e||!t)return;e.parent=s;const i=s.children.indexOf(t);i!==-1?s.children.splice(i,0,e):s.children.push(e),$1(s,e,t)}function gP(s){if(typeof s.dispose=="function"){const e=()=>{try{s.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():Yw.unstable_scheduleCallback(Yw.unstable_IdlePriority,e)}}function Qw(s,e,t){if(!e)return;e.parent=null;const i=s.children.indexOf(e);i!==-1&&s.children.splice(i,1),e.props.attach?yx(s,e):Js(e.object)&&Js(s.object)&&(s.object.remove(e.object),uV(_1(e),e.object));const a=e.props.dispose!==null&&t!==!1;for(let c=e.children.length-1;c>=0;c--){const d=e.children[c];Qw(e,d,a)}e.children.length=0,delete e.object.__r3f,a&&e.type!=="primitive"&&e.object.type!=="Scene"&&gP(e.object),t===void 0&&Gm(e)}function IV(s,e){for(const t of[s,s.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();const i=t.ref(e);typeof i=="function"&&(t.refCleanup=i)}else t.ref&&(t.ref.current=e)}const Tb=[];function NV(){for(const[t]of Tb){const i=t.parent;if(i){t.props.attach?yx(i,t):Js(t.object)&&Js(i.object)&&i.object.remove(t.object);for(const a of t.children)a.props.attach?yx(t,a):Js(a.object)&&Js(t.object)&&t.object.remove(a.object)}t.isHidden&&mP(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&gP(t.object)}for(const[t,i,a]of Tb){t.props=i;const c=t.parent;if(c){var s,e;const d=Nm[uS(t.type)],f=t.object;t.object=(s=t.props.object)!=null?s:new d(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,IV(a,t.object),cV(_1(t),f,t.object),Hu(t.object,t.props),t.props.attach?vx(c,t):Js(t.object)&&Js(c.object)&&c.object.add(t.object);for(const m of t.children)m.props.attach?vx(t,m):Js(m.object)&&Js(t.object)&&t.object.add(m.object);Gm(t)}}Tb.length=0}const bw=()=>{},j2={};let bb=hP;const zV=0,BV=4,Zw=EV({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:DV,removeChild:Qw,appendChild:yw,appendInitialChild:yw,insertBefore:W2,appendChildToContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||yw(t,e)},removeChildFromContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||Qw(t,e)},insertInContainerBefore(s,e,t){const i=s.getState().scene.__r3f;!e||!t||!i||W2(i,e,t)},getRootHostContext:()=>j2,getChildHostContext:()=>j2,commitUpdate(s,e,t,i,a){var c,d,f;pP(e,i);let m=!1;if((s.type==="primitive"&&t.object!==i.object||((c=i.args)==null?void 0:c.length)!==((d=t.args)==null?void 0:d.length)||(f=i.args)!=null&&f.some((v,M)=>{var x;return v!==((x=t.args)==null?void 0:x[M])}))&&(m=!0),m)Tb.push([s,{...i},a]);else{const v=sV(s,i);Object.keys(v).length&&(Object.assign(s.props,v),Hu(s.object,v))}(a.sibling===null||(a.flags&BV)===zV)&&NV()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:s=>s?.object,prepareForCommit:()=>null,preparePortalMount:s=>Ax(s.getState().scene,s,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:LV,unhideInstance:mP,createTextInstance:bw,hideTextInstance:bw,unhideTextInstance:bw,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:Vn.createContext(null),setCurrentUpdatePriority(s){bb=s},getCurrentUpdatePriority(){return bb},resolveUpdatePriority(){var s;if(bb!==hP)return bb;switch(typeof window<"u"&&((s=window.event)==null?void 0:s.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return vV;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return gV;default:return AV}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:yV.version,applyViewTransitionName(s,e,t){},restoreViewTransitionName(s,e){},cancelViewTransitionName(s,e,t){},cancelRootViewTransitionName(s){},restoreRootViewTransitionName(s){},InstanceMeasurement:null,measureInstance:s=>null,wasInstanceInViewport:s=>!0,hasInstanceChanged:(s,e)=>!1,hasInstanceAffectedParent:(s,e)=>!1,suspendOnActiveViewTransition(s,e){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(s){},createViewTransitionInstance:s=>null,getCurrentGestureOffset(s){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(s,e){return s},cloneMutableTextInstance(s){return s},cloneRootViewTransitionContainer(s){throw new Error("Not implemented.")},removeRootViewTransitionClone(s,e){throw new Error("Not implemented.")},createFragmentInstance:s=>null,updateFragmentInstanceFiber(s,e){},commitNewChildToFragmentInstance(s,e){},deleteChildFromFragmentInstance(s,e){},measureClonedInstance:s=>null,maySuspendCommitOnUpdate:(s,e,t)=>!1,maySuspendCommitInSyncRender:(s,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(s,e)=>null}),qf=new Map,ym={objects:"shallow",strict:!1};function UV(s,e){if(!e&&typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement&&s.parentElement){const{width:t,height:i,top:a,left:c}=s.parentElement.getBoundingClientRect();return{width:t,height:i,top:a,left:c}}else if(!e&&typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas)return{width:s.width,height:s.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function FV(s){const e=qf.get(s),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const a=typeof reportError=="function"?reportError:console.error,c=i||fV($w,q2),d=t||Zw.createContainer(c,mV,null,!1,null,"",a,a,a,null);e||qf.set(s,{fiber:d,store:c});let f,m,g=!1,v=null;return{async configure(M={}){let x;v=new Promise(Te=>x=Te);let{gl:S,size:w,scene:k,events:C,onCreated:T,shadows:D=!1,linear:z=!1,flat:L=!1,legacy:O=!1,orthographic:U=!1,frameloop:H="always",dpr:I=[1,2],performance:F,raycaster:V,camera:X,onPointerMissed:_}=M,K=c.getState(),le=K.gl;if(!K.gl){const Te={canvas:s,powerPreference:"high-performance",antialias:!0,alpha:!0},Fe=typeof S=="function"?await S(Te):S;U2(Fe)?le=Fe:le=new eP({...Te,...S}),K.set({gl:le})}let $=K.raycaster;$||K.set({raycaster:$=new GR});const{params:j,...Q}=V||{};if(pi.equ(Q,$,ym)||Hu($,{...Q}),pi.equ(j,$.params,ym)||Hu($,{params:{...$.params,...j}}),!K.camera||K.camera===m&&!pi.equ(m,X,ym)){m=X;const Te=X?.isCamera,Fe=Te?X:U?new Vm(0,0,0,0,.1,1e3):new kr(75,0,.1,1e3);Te||(Fe.position.z=5,X&&(Hu(Fe,X),Fe.manual||("aspect"in X||"left"in X||"right"in X||"bottom"in X||"top"in X)&&(Fe.manual=!0,Fe.updateProjectionMatrix())),!K.camera&&!(X!=null&&X.rotation)&&Fe.lookAt(0,0,0)),K.set({camera:Fe}),$.camera=Fe}if(!K.scene){let Te;k!=null&&k.isScene?(Te=k,Ax(Te,c,"",{})):(Te=new S1,Ax(Te,c,"",{}),k&&Hu(Te,k)),K.set({scene:Te})}C&&!K.events.handlers&&K.set({events:C(c)});const ne=UV(s,w);if(pi.equ(ne,K.size,ym)||K.setSize(ne.width,ne.height,ne.top,ne.left),I&&K.viewport.dpr!==lP(I)&&K.setDpr(I),K.frameloop!==H&&K.setFrameloop(H),K.onPointerMissed||K.set({onPointerMissed:_}),F&&!pi.equ(F,K.performance,ym)&&K.set(Te=>({performance:{...Te.performance,...F}})),!K.xr){var ce;const Te=(ht,ct)=>{const Pe=c.getState();Pe.frameloop!=="never"&&q2(ht,!0,Pe,ct)},Fe=()=>{const ht=c.getState();ht.gl.xr.enabled=ht.gl.xr.isPresenting,ht.gl.xr.setAnimationLoop(ht.gl.xr.isPresenting?Te:null),ht.gl.xr.isPresenting||$w(ht)},lt={connect(){const ht=c.getState().gl;ht.xr.addEventListener("sessionstart",Fe),ht.xr.addEventListener("sessionend",Fe)},disconnect(){const ht=c.getState().gl;ht.xr.removeEventListener("sessionstart",Fe),ht.xr.removeEventListener("sessionend",Fe)}};typeof((ce=le.xr)==null?void 0:ce.addEventListener)=="function"&<.connect(),K.set({xr:lt})}if(le.shadowMap){const Te=le.shadowMap.enabled,Fe=le.shadowMap.type;if(le.shadowMap.enabled=!!D,pi.boo(D))le.shadowMap.type=ZA;else if(pi.str(D)){var ye;const lt={basic:r3,percentage:wm,soft:ZA,variance:If};le.shadowMap.type=(ye=lt[D])!=null?ye:ZA}else pi.obj(D)&&Object.assign(le.shadowMap,D);(Te!==le.shadowMap.enabled||Fe!==le.shadowMap.type)&&(le.shadowMap.needsUpdate=!0)}return wn.enabled=!O,g||(le.outputColorSpace=z?Rm:ss,le.toneMapping=L?so:Ex),K.legacy!==O&&K.set(()=>({legacy:O})),K.linear!==z&&K.set(()=>({linear:z})),K.flat!==L&&K.set(()=>({flat:L})),S&&!pi.fun(S)&&!U2(S)&&!pi.equ(S,le,ym)&&Hu(le,S),f=T,g=!0,x(),this},render(M){return!g&&!v&&this.configure(),v.then(()=>{Zw.updateContainer(Z.jsx(OV,{store:c,children:M,onCreated:f,rootElement:s}),d,null,()=>{})}),c},unmount(){AP(s)}}}function OV({store:s,children:e,onCreated:t,rootElement:i}){return Lv(()=>{const a=s.getState();a.set(c=>({internal:{...c.internal,active:!0}})),t&&t(a),s.getState().events.connected||a.events.connect==null||a.events.connect(i)},[]),Z.jsx(dP.Provider,{value:s,children:e})}function AP(s,e){const t=qf.get(s),i=t?.fiber;if(i){const a=t?.store.getState();a&&(a.internal.active=!1),Zw.updateContainer(null,i,null,()=>{a&&setTimeout(()=>{try{var c,d,f,m;a.events.disconnect==null||a.events.disconnect(),(c=a.gl)==null||(d=c.renderLists)==null||d.dispose==null||d.dispose(),(f=a.gl)==null||f.forceContextLoss==null||f.forceContextLoss(),(m=a.gl)!=null&&m.xr&&a.xr.disconnect(),nV(a.scene),qf.delete(s)}catch{}},500)})}}const VV=new Set,HV=new Set,GV=new Set;function xw(s,e){if(s.size)for(const{callback:t}of s.values())t(e)}function ov(s,e){switch(s){case"before":return xw(VV,e);case"after":return xw(HV,e);case"tail":return xw(GV,e)}}let Sw,Mw;function Kw(s,e,t){let i=e.clock.getDelta();e.frameloop==="never"&&typeof s=="number"&&(i=s-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=s),Sw=e.internal.subscribers;for(let a=0;a<Sw.length;a++)Mw=Sw[a],Mw.ref.current(Mw.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let bx=!1,_w=!1,ww,X2,bm;function vP(s){X2=requestAnimationFrame(vP),bx=!0,ww=0,ov("before",s),_w=!0;for(const t of qf.values()){var e;bm=t.store.getState(),bm.internal.active&&(bm.frameloop==="always"||bm.internal.frames>0)&&!((e=bm.gl.xr)!=null&&e.isPresenting)&&(ww+=Kw(s,bm))}if(_w=!1,ov("after",s),ww===0)return ov("tail",s),bx=!1,cancelAnimationFrame(X2)}function $w(s,e=1){var t;if(!s)return qf.forEach(i=>$w(i.store.getState(),e));(t=s.gl.xr)!=null&&t.isPresenting||!s.internal.active||s.frameloop==="never"||(e>1?s.internal.frames=Math.min(60,s.internal.frames+e):_w?s.internal.frames=2:s.internal.frames=1,bx||(bx=!0,requestAnimationFrame(vP)))}function q2(s,e=!0,t,i){if(e&&ov("before",s),t)Kw(s,t,i);else for(const a of qf.values())Kw(s,a.store.getState());e&&ov("after",s)}const Tw={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function WV(s){const{handlePointer:e}=dV(s);return{priority:1,enabled:!0,compute(t,i,a){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Tw).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:a}=s.getState();(t=a.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(a.lastEvent.current)},connect:t=>{const{set:i,events:a}=s.getState();if(a.disconnect==null||a.disconnect(),i(c=>({events:{...c.events,connected:t}})),a.handlers)for(const c in a.handlers){const d=a.handlers[c],[f,m]=Tw[c];t.addEventListener(f,d,{passive:m})}},disconnect:()=>{const{set:t,events:i}=s.getState();if(i.connected){if(i.handlers)for(const a in i.handlers){const c=i.handlers[a],[d]=Tw[a];i.connected.removeEventListener(d,c)}t(a=>({events:{...a.events,connected:void 0}}))}}}}function Y2(s,e){let t;return(...i)=>{window.clearTimeout(t),t=window.setTimeout(()=>s(...i),e)}}function jV({debounce:s,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const a=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[c,d]=pe.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=pe.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:c,orientationHandler:null}),m=s?typeof s=="number"?s:s.scroll:null,g=s?typeof s=="number"?s:s.resize:null,v=pe.useRef(!1);pe.useEffect(()=>(v.current=!0,()=>void(v.current=!1)));const[M,x,S]=pe.useMemo(()=>{const T=()=>{if(!f.current.element)return;const{left:D,top:z,width:L,height:O,bottom:U,right:H,x:I,y:F}=f.current.element.getBoundingClientRect(),V={left:D,top:z,width:L,height:O,bottom:U,right:H,x:I,y:F};f.current.element instanceof HTMLElement&&i&&(V.height=f.current.element.offsetHeight,V.width=f.current.element.offsetWidth),Object.freeze(V),v.current&&!JV(f.current.lastBounds,V)&&d(f.current.lastBounds=V)};return[T,g?Y2(T,g):T,m?Y2(T,m):T]},[d,i,m,g]);function w(){f.current.scrollContainers&&(f.current.scrollContainers.forEach(T=>T.removeEventListener("scroll",S,!0)),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null),f.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",f.current.orientationHandler))}function k(){f.current.element&&(f.current.resizeObserver=new a(S),f.current.resizeObserver.observe(f.current.element),e&&f.current.scrollContainers&&f.current.scrollContainers.forEach(T=>T.addEventListener("scroll",S,{capture:!0,passive:!0})),f.current.orientationHandler=()=>{S()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",f.current.orientationHandler))}const C=T=>{!T||T===f.current.element||(w(),f.current.element=T,f.current.scrollContainers=yP(T),k())};return qV(S,!!e),XV(x),pe.useEffect(()=>{w(),k()},[e,S,x]),pe.useEffect(()=>w,[]),[C,c,M]}function XV(s){pe.useEffect(()=>{const e=s;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[s])}function qV(s,e){pe.useEffect(()=>{if(e){const t=s;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[s,e])}function yP(s){const e=[];if(!s||s===document.body)return e;const{overflow:t,overflowX:i,overflowY:a}=window.getComputedStyle(s);return[t,i,a].some(c=>c==="auto"||c==="scroll")&&e.push(s),[...e,...yP(s.parentElement)]}const YV=["x","y","top","bottom","left","right","width","height"],JV=(s,e)=>YV.every(t=>s[t]===e[t]);function QV({ref:s,children:e,fallback:t,resize:i,style:a,gl:c,events:d=WV,eventSource:f,eventPrefix:m,shadows:g,linear:v,flat:M,legacy:x,orthographic:S,frameloop:w,dpr:k,performance:C,raycaster:T,camera:D,scene:z,onPointerMissed:L,onCreated:O,...U}){Vn.useMemo(()=>kV(D4),[]);const H=$4(),[I,F]=jV({scroll:!0,debounce:{scroll:50,resize:0},...i}),V=Vn.useRef(null),X=Vn.useRef(null);Vn.useImperativeHandle(s,()=>V.current);const _=oP(L),[K,le]=Vn.useState(!1),[$,j]=Vn.useState(!1);if(K)throw K;if($)throw $;const Q=Vn.useRef(null);Lv(()=>{const ce=V.current;if(F.width>0&&F.height>0&&ce){Q.current||(Q.current=FV(ce));async function ye(){await Q.current.configure({gl:c,scene:z,events:d,shadows:g,linear:v,flat:M,legacy:x,orthographic:S,frameloop:w,dpr:k,performance:C,raycaster:T,camera:D,size:F,onPointerMissed:(...Te)=>_.current==null?void 0:_.current(...Te),onCreated:Te=>{Te.events.connect==null||Te.events.connect(f?K4(f)?f.current:f:X.current),m&&Te.setEvents({compute:(Fe,lt)=>{const ht=Fe[m+"X"],ct=Fe[m+"Y"];lt.pointer.set(ht/lt.size.width*2-1,-(ct/lt.size.height)*2+1),lt.raycaster.setFromCamera(lt.pointer,lt.camera)}}),O?.(Te)}}),Q.current.render(Z.jsx(H,{children:Z.jsx(tV,{set:j,children:Z.jsx(Vn.Suspense,{fallback:Z.jsx(eV,{set:le}),children:e??null})})}))}ye()}}),Vn.useEffect(()=>{const ce=V.current;if(ce)return()=>AP(ce)},[]);const ne=f?"none":"auto";return Z.jsx("div",{ref:X,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:ne,...a},...U,children:Z.jsx("div",{ref:I,style:{width:"100%",height:"100%"},children:Z.jsx("canvas",{ref:V,style:{display:"block"},children:t})})})}function ZV(s){return Z.jsx(rP,{children:Z.jsx(QV,{...s})})}const KV="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAIABJREFUeF6svVmPZdlVtR0nmyqX7d8FF3ADEq24AXGBLYMlLNngwhg3uIx709hCCMmiF3/Pxq7KLj6tfeI5+cSTc51I+F6/bxGRmRF7r2bOMccYc+19Tn/1V391++rVq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wkwymTVhrJN8PeL63fvjEWcGVtgHc2AQQDowl5MM8n7/HUPcSfgLT+d73/ve+0njWsuhnYqeRsxb/d2dAViKdhr08f/HhFmagLJmEVTQPhLJxg9VrADgdwv6rTsEwkTXp11XOK5mAQ0mV0zm2+huZxswrIZ0EJJYkx9xAQKPewVM20s1XbXrKeyMRdPiAsDE6hpDzI/NYxuCE/iuOapHwrnaTWr1LwMpOLs/X7+j4Mu6rE8b3Ja4BkLPqeezc2Cz8WlO3909PDy9hs9SkRgvc4a52/Oov3P+949+9KMzALi6Nihs5kyL1x1wXEzpHFVv155hYHWeywYsBZyUfhUWBtE6JrTT934DAH5CCv37NX4WF4pZLYYZ5fMAkg4oU0gniwEAF5fF7Dw4gQ2MzMMTYB9nOFcbAq6uvuezCTuNYdfKghYXnKtLS0Un/W0psM5X/6VdH4PmBACMaVd5dyBdV94JBdtrclnWES/OIYO5WcgkO9bPu8bOm7JFs2ezRp/TAOCv/w+By8nAK4xY6gAAAABJRU5ErkJggg==";let xb=null,Eb=null;function _V(){if(Eb)return Eb;if(xb)return xb;const s=new ER;return xb=new Promise((e,t)=>{s.load(KV,i=>{i.wrapS=Dc,i.wrapT=Dc,Eb=i,e(i)},void 0,t)}),xb}function $V({colors:s=["#03307a","#2792dc","#9bdfdf"],colorsRef:e,resizeDebounce:t=100,seed:i,agentState:a=null,volumeMode:c="auto",manualInput:d,manualOutput:f,inputVolumeRef:m,outputVolumeRef:g,getInputVolume:v,getOutputVolume:M,className:x="rqmii-orb"}){return Z.jsx("div",{className:x,children:Z.jsx(ZV,{resize:{debounce:t},gl:{alpha:!0,antialias:!0,premultipliedAlpha:!0,powerPreference:"high-performance"},fallback:null,children:Z.jsx(e5,{colors:s,colorsRef:e,seed:i,agentState:a,volumeMode:c,manualInput:d,manualOutput:f,inputVolumeRef:m,outputVolumeRef:g,getInputVolume:v,getOutputVolume:M})})})}function e5({colors:s,colorsRef:e,seed:t,agentState:i,volumeMode:a,manualInput:c,manualOutput:d,inputVolumeRef:f,outputVolumeRef:m,getInputVolume:g,getOutputVolume:v}){const{gl:M}=hV(),x=pe.useRef(null),S=pe.useRef(s),w=pe.useRef(new ut(s[0])),k=pe.useRef(new ut(s[1])),C=pe.useRef(new ut(s[2])),T=pe.useRef(.1),[D,z]=pe.useState(Eb);pe.useEffect(()=>{if(D)return;let K=!1;return Promise.resolve(_V()).then(le=>{K||z(le)}),()=>{K=!0}},[D]);const L=pe.useRef(i),O=pe.useRef(a),U=pe.useRef(c??0),H=pe.useRef(d??0);pe.useEffect(()=>{L.current=i},[i]),pe.useEffect(()=>{O.current=a},[a]),pe.useEffect(()=>{U.current=kf(c??f?.current??g?.()??0)},[c,f,g]),pe.useEffect(()=>{H.current=kf(d??m?.current??v?.()??0)},[d,m,v]);const I=pe.useMemo(()=>t5(t??Math.floor(Math.random()*2**32)),[t]),F=pe.useMemo(()=>new Float32Array(Array.from({length:7},()=>I()*Math.PI*2)),[I]);pe.useEffect(()=>{w.current=new ut(s[0]),k.current=new ut(s[1]),C.current=new ut(s[2])},[s]),pe.useEffect(()=>{const K=()=>{if(!x.current)return;const $=document.documentElement.classList.contains("dark");x.current.material.uniforms.uInverted.value=$?1:0};K();const le=new MutationObserver(K);return le.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>le.disconnect()},[]);const V=pe.useRef(0),X=pe.useRef(0);pV((K,le)=>{const $=x.current?.material;if(!$)return;const j=e?.current;j&&(j[0]&&w.current.set(j[0]),j[1]&&k.current.set(j[1]),j[2]&&C.current.set(j[2]));const Q=$.uniforms;Q.uTime.value+=le*.5;let ne=0,ce=.3;if(O.current==="manual")ne=kf(c??f?.current??g?.()??0),ce=kf(d??m?.current??v?.()??0);else if(L.current==="listening"){const Te=Q.uTime.value*2;ne=kf(.55+Math.sin(Te*3.2)*.35),ce=.45}else if(L.current==="talking"){const Te=Q.uTime.value*2;ne=kf(.65+Math.sin(Te*4.8)*.22),ce=kf(.75+Math.sin(Te*3.6)*.22)}V.current+=(ne-V.current)*.2,X.current+=(ce-X.current)*.2;const ye=.1+(1-Math.pow(X.current-1,2))*.9;T.current+=(ye-T.current)*.12,Q.uAnimation.value+=le*T.current,Q.uInputVolume.value=V.current,Q.uOutputVolume.value=X.current,Q.uColor1.value.lerp(w.current,.08),Q.uColor2.value.lerp(k.current,.08),Q.uColor3.value.lerp(C.current,.08)}),pe.useEffect(()=>{const K=M.domElement,le=$=>{$.preventDefault(),setTimeout(()=>{M.forceContextRestore()},1)};return K.addEventListener("webglcontextlost",le,!1),()=>K.removeEventListener("webglcontextlost",le,!1)},[M]);const _=pe.useMemo(()=>{if(!D)return null;D.wrapS=Dc,D.wrapT=Dc;const K=typeof document<"u"&&document.documentElement.classList.contains("dark");return{uColor1:new Ta(new ut(S.current[0])),uColor2:new Ta(new ut(S.current[1])),uColor3:new Ta(new ut(S.current[2])),uOffsets:{value:F},uPerlinTexture:new Ta(D),uTime:new Ta(0),uAnimation:new Ta(.1),uInverted:new Ta(K?1:0),uInputVolume:new Ta(0),uOutputVolume:new Ta(0),uOpacity:new Ta(1)}},[D,F]);return _?Z.jsxs("mesh",{ref:x,children:[Z.jsx("circleGeometry",{args:[3.5,64]}),Z.jsx("shaderMaterial",{uniforms:_,fragmentShader:i5,vertexShader:n5,transparent:!0})]}):null}function t5(s){return function(){s|=0,s=s+2654435769|0;let e=s^s>>>16;return e=Math.imul(e,569420461),e=e^e>>>15,e=Math.imul(e,1935289751),((e=e^e>>>15)>>>0)/4294967296}}function kf(s){return Number.isFinite(s)?Math.min(1,Math.max(0,s)):0}const n5=`
|
|
4500
|
+
`)+n.join(" > ")}return null},hn.getPublicRootInstance=function(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 27:case 5:return Ur(n.child.stateNode);default:return n.child.stateNode}},hn.injectIntoDevTools=function(){var n={bundleType:1,version:Us,rendererPackageName:Fs,currentDispatcherRef:be,reconcilerVersion:"19.2.0"};return Eo!==null&&(n.rendererConfig=Eo),n.overrideHookState=IE,n.overrideHookStateDeletePath=NE,n.overrideHookStateRenamePath=zE,n.overrideProps=BE,n.overridePropsDeletePath=UE,n.overridePropsRenamePath=FE,n.scheduleUpdate=OE,n.scheduleRetry=VE,n.setErrorHandler=HE,n.setSuspenseHandler=GE,n.scheduleRefresh=M,n.scheduleRoot=v,n.setRefreshHandler=x,n.getCurrentFiber=tp,Nt(n)},hn.isAlreadyRendering=Od,hn.observeVisibleRects=function(n,r,u,p){function b(){var se=Xh(n,r);y.forEach(function(Se){0>se.indexOf(Se)&&q(Se)}),se.forEach(function(Se){0>y.indexOf(Se)&&N(Se)})}if(!ga)throw Error("Test selector API is not supported by this renderer.");var y=Xh(n,r);u=Aa(y,u,p);var P=u.disconnect,N=u.observe,q=u.unobserve;return my.push(b),{disconnect:function(){var se=my.indexOf(b);0<=se&&my.splice(se,1),P()}}},hn.shouldError=function(n){return m(n)},hn.shouldSuspend=function(n){return f(n)},hn.startHostTransition=function(n,r,u,p){if(n.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var b=hg(n).queue;Gn(n),Nr(n,b,r,Vs,u===null?k:function(){be.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var y=hg(n);return y.next===null&&(y=n.alternate.memoizedState),Xc(n,y.next.queue,{},ds(n)),u(p)})},hn.updateContainer=function(n,r,u,p){var b=r.current,y=ds(b);return Gd(b,y,n,r,u,p),y},hn.updateContainerSync=B0,hn},s.exports.default=s.exports,Object.defineProperty(s.exports,"__esModule",{value:!0}))})(V2)),V2.exports}var G2;function MV(){return G2||(G2=1,process.env.NODE_ENV==="production"?vw.exports=xV():vw.exports=SV()),vw.exports}var wV=MV();const TV=bV(wV);function EV(s){const e=TV(s);return e.injectIntoDevTools(),e}const hP=0,Nm={},CV=/^three(?=[A-Z])/,uS=s=>`${s[0].toUpperCase()}${s.slice(1)}`;let RV=0;const PV=s=>typeof s=="function";function kV(s){if(PV(s)){const e=`${RV++}`;return Nm[e]=s,e}else Object.assign(Nm,s)}function pP(s,e){const t=uS(s),i=Nm[t];if(s!=="primitive"&&!i)throw new Error(`R3F: ${t} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(s==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function DV(s,e,t){var i;return s=uS(s)in Nm?s:s.replace(CV,""),pP(s,e),s==="primitive"&&(i=e.object)!=null&&i.__r3f&&delete e.object.__r3f,Ax(e.object,t,s,e)}function LV(s){if(!s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?yx(s.parent,s):Js(s.object)&&(s.object.visible=!1),s.isHidden=!0,Gm(s)}}function mP(s){if(s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?vx(s.parent,s):Js(s.object)&&s.props.visible!==!1&&(s.object.visible=!0),s.isHidden=!1,Gm(s)}}function $1(s,e,t){const i=e.root.getState();if(!(!s.parent&&s.object!==i.scene)){if(!e.object){var a,c;const d=Nm[uS(e.type)];e.object=(a=e.props.object)!=null?a:new d(...(c=e.props.args)!=null?c:[]),e.object.__r3f=e}if(Hu(e.object,e.props),e.props.attach)vx(s,e);else if(Js(e.object)&&Js(s.object)){const d=s.object.children.indexOf(t?.object);if(t&&d!==-1){const f=s.object.children.indexOf(e.object);if(f!==-1){s.object.children.splice(f,1);const m=f<d?d-1:d;s.object.children.splice(m,0,e.object)}else e.object.parent=s.object,s.object.children.splice(d,0,e.object),e.object.dispatchEvent({type:"added"}),s.object.dispatchEvent({type:"childadded",child:e.object})}else s.object.add(e.object)}for(const d of e.children)$1(e,d);Gm(e)}}function yw(s,e){e&&(e.parent=s,s.children.push(e),$1(s,e))}function W2(s,e,t){if(!e||!t)return;e.parent=s;const i=s.children.indexOf(t);i!==-1?s.children.splice(i,0,e):s.children.push(e),$1(s,e,t)}function gP(s){if(typeof s.dispose=="function"){const e=()=>{try{s.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():Yw.unstable_scheduleCallback(Yw.unstable_IdlePriority,e)}}function Qw(s,e,t){if(!e)return;e.parent=null;const i=s.children.indexOf(e);i!==-1&&s.children.splice(i,1),e.props.attach?yx(s,e):Js(e.object)&&Js(s.object)&&(s.object.remove(e.object),uV(_1(e),e.object));const a=e.props.dispose!==null&&t!==!1;for(let c=e.children.length-1;c>=0;c--){const d=e.children[c];Qw(e,d,a)}e.children.length=0,delete e.object.__r3f,a&&e.type!=="primitive"&&e.object.type!=="Scene"&&gP(e.object),t===void 0&&Gm(e)}function IV(s,e){for(const t of[s,s.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();const i=t.ref(e);typeof i=="function"&&(t.refCleanup=i)}else t.ref&&(t.ref.current=e)}const Tb=[];function NV(){for(const[t]of Tb){const i=t.parent;if(i){t.props.attach?yx(i,t):Js(t.object)&&Js(i.object)&&i.object.remove(t.object);for(const a of t.children)a.props.attach?yx(t,a):Js(a.object)&&Js(t.object)&&t.object.remove(a.object)}t.isHidden&&mP(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&gP(t.object)}for(const[t,i,a]of Tb){t.props=i;const c=t.parent;if(c){var s,e;const d=Nm[uS(t.type)],f=t.object;t.object=(s=t.props.object)!=null?s:new d(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,IV(a,t.object),cV(_1(t),f,t.object),Hu(t.object,t.props),t.props.attach?vx(c,t):Js(t.object)&&Js(c.object)&&c.object.add(t.object);for(const m of t.children)m.props.attach?vx(t,m):Js(m.object)&&Js(t.object)&&t.object.add(m.object);Gm(t)}}Tb.length=0}const bw=()=>{},j2={};let bb=hP;const zV=0,BV=4,Zw=EV({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:DV,removeChild:Qw,appendChild:yw,appendInitialChild:yw,insertBefore:W2,appendChildToContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||yw(t,e)},removeChildFromContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||Qw(t,e)},insertInContainerBefore(s,e,t){const i=s.getState().scene.__r3f;!e||!t||!i||W2(i,e,t)},getRootHostContext:()=>j2,getChildHostContext:()=>j2,commitUpdate(s,e,t,i,a){var c,d,f;pP(e,i);let m=!1;if((s.type==="primitive"&&t.object!==i.object||((c=i.args)==null?void 0:c.length)!==((d=t.args)==null?void 0:d.length)||(f=i.args)!=null&&f.some((v,M)=>{var x;return v!==((x=t.args)==null?void 0:x[M])}))&&(m=!0),m)Tb.push([s,{...i},a]);else{const v=sV(s,i);Object.keys(v).length&&(Object.assign(s.props,v),Hu(s.object,v))}(a.sibling===null||(a.flags&BV)===zV)&&NV()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:s=>s?.object,prepareForCommit:()=>null,preparePortalMount:s=>Ax(s.getState().scene,s,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:LV,unhideInstance:mP,createTextInstance:bw,hideTextInstance:bw,unhideTextInstance:bw,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:Vn.createContext(null),setCurrentUpdatePriority(s){bb=s},getCurrentUpdatePriority(){return bb},resolveUpdatePriority(){var s;if(bb!==hP)return bb;switch(typeof window<"u"&&((s=window.event)==null?void 0:s.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return vV;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return gV;default:return AV}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:yV.version,applyViewTransitionName(s,e,t){},restoreViewTransitionName(s,e){},cancelViewTransitionName(s,e,t){},cancelRootViewTransitionName(s){},restoreRootViewTransitionName(s){},InstanceMeasurement:null,measureInstance:s=>null,wasInstanceInViewport:s=>!0,hasInstanceChanged:(s,e)=>!1,hasInstanceAffectedParent:(s,e)=>!1,suspendOnActiveViewTransition(s,e){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(s){},createViewTransitionInstance:s=>null,getCurrentGestureOffset(s){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(s,e){return s},cloneMutableTextInstance(s){return s},cloneRootViewTransitionContainer(s){throw new Error("Not implemented.")},removeRootViewTransitionClone(s,e){throw new Error("Not implemented.")},createFragmentInstance:s=>null,updateFragmentInstanceFiber(s,e){},commitNewChildToFragmentInstance(s,e){},deleteChildFromFragmentInstance(s,e){},measureClonedInstance:s=>null,maySuspendCommitOnUpdate:(s,e,t)=>!1,maySuspendCommitInSyncRender:(s,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(s,e)=>null}),qf=new Map,ym={objects:"shallow",strict:!1};function UV(s,e){if(!e&&typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement&&s.parentElement){const{width:t,height:i,top:a,left:c}=s.parentElement.getBoundingClientRect();return{width:t,height:i,top:a,left:c}}else if(!e&&typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas)return{width:s.width,height:s.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function FV(s){const e=qf.get(s),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const a=typeof reportError=="function"?reportError:console.error,c=i||fV($w,q2),d=t||Zw.createContainer(c,mV,null,!1,null,"",a,a,a,null);e||qf.set(s,{fiber:d,store:c});let f,m,g=!1,v=null;return{async configure(M={}){let x;v=new Promise(Te=>x=Te);let{gl:S,size:w,scene:k,events:C,onCreated:T,shadows:D=!1,linear:z=!1,flat:L=!1,legacy:O=!1,orthographic:U=!1,frameloop:H="always",dpr:I=[1,2],performance:F,raycaster:V,camera:X,onPointerMissed:_}=M,K=c.getState(),le=K.gl;if(!K.gl){const Te={canvas:s,powerPreference:"high-performance",antialias:!0,alpha:!0},Fe=typeof S=="function"?await S(Te):S;U2(Fe)?le=Fe:le=new eP({...Te,...S}),K.set({gl:le})}let $=K.raycaster;$||K.set({raycaster:$=new GR});const{params:j,...Q}=V||{};if(pi.equ(Q,$,ym)||Hu($,{...Q}),pi.equ(j,$.params,ym)||Hu($,{params:{...$.params,...j}}),!K.camera||K.camera===m&&!pi.equ(m,X,ym)){m=X;const Te=X?.isCamera,Fe=Te?X:U?new Vm(0,0,0,0,.1,1e3):new kr(75,0,.1,1e3);Te||(Fe.position.z=5,X&&(Hu(Fe,X),Fe.manual||("aspect"in X||"left"in X||"right"in X||"bottom"in X||"top"in X)&&(Fe.manual=!0,Fe.updateProjectionMatrix())),!K.camera&&!(X!=null&&X.rotation)&&Fe.lookAt(0,0,0)),K.set({camera:Fe}),$.camera=Fe}if(!K.scene){let Te;k!=null&&k.isScene?(Te=k,Ax(Te,c,"",{})):(Te=new S1,Ax(Te,c,"",{}),k&&Hu(Te,k)),K.set({scene:Te})}C&&!K.events.handlers&&K.set({events:C(c)});const ne=UV(s,w);if(pi.equ(ne,K.size,ym)||K.setSize(ne.width,ne.height,ne.top,ne.left),I&&K.viewport.dpr!==lP(I)&&K.setDpr(I),K.frameloop!==H&&K.setFrameloop(H),K.onPointerMissed||K.set({onPointerMissed:_}),F&&!pi.equ(F,K.performance,ym)&&K.set(Te=>({performance:{...Te.performance,...F}})),!K.xr){var ce;const Te=(lt,ct)=>{const Pe=c.getState();Pe.frameloop!=="never"&&q2(lt,!0,Pe,ct)},Fe=()=>{const lt=c.getState();lt.gl.xr.enabled=lt.gl.xr.isPresenting,lt.gl.xr.setAnimationLoop(lt.gl.xr.isPresenting?Te:null),lt.gl.xr.isPresenting||$w(lt)},ft={connect(){const lt=c.getState().gl;lt.xr.addEventListener("sessionstart",Fe),lt.xr.addEventListener("sessionend",Fe)},disconnect(){const lt=c.getState().gl;lt.xr.removeEventListener("sessionstart",Fe),lt.xr.removeEventListener("sessionend",Fe)}};typeof((ce=le.xr)==null?void 0:ce.addEventListener)=="function"&&ft.connect(),K.set({xr:ft})}if(le.shadowMap){const Te=le.shadowMap.enabled,Fe=le.shadowMap.type;if(le.shadowMap.enabled=!!D,pi.boo(D))le.shadowMap.type=ZA;else if(pi.str(D)){var ye;const ft={basic:r3,percentage:wm,soft:ZA,variance:If};le.shadowMap.type=(ye=ft[D])!=null?ye:ZA}else pi.obj(D)&&Object.assign(le.shadowMap,D);(Te!==le.shadowMap.enabled||Fe!==le.shadowMap.type)&&(le.shadowMap.needsUpdate=!0)}return wn.enabled=!O,g||(le.outputColorSpace=z?Rm:ss,le.toneMapping=L?so:Ex),K.legacy!==O&&K.set(()=>({legacy:O})),K.linear!==z&&K.set(()=>({linear:z})),K.flat!==L&&K.set(()=>({flat:L})),S&&!pi.fun(S)&&!U2(S)&&!pi.equ(S,le,ym)&&Hu(le,S),f=T,g=!0,x(),this},render(M){return!g&&!v&&this.configure(),v.then(()=>{Zw.updateContainer(Z.jsx(OV,{store:c,children:M,onCreated:f,rootElement:s}),d,null,()=>{})}),c},unmount(){AP(s)}}}function OV({store:s,children:e,onCreated:t,rootElement:i}){return Lv(()=>{const a=s.getState();a.set(c=>({internal:{...c.internal,active:!0}})),t&&t(a),s.getState().events.connected||a.events.connect==null||a.events.connect(i)},[]),Z.jsx(dP.Provider,{value:s,children:e})}function AP(s,e){const t=qf.get(s),i=t?.fiber;if(i){const a=t?.store.getState();a&&(a.internal.active=!1),Zw.updateContainer(null,i,null,()=>{a&&setTimeout(()=>{try{var c,d,f,m;a.events.disconnect==null||a.events.disconnect(),(c=a.gl)==null||(d=c.renderLists)==null||d.dispose==null||d.dispose(),(f=a.gl)==null||f.forceContextLoss==null||f.forceContextLoss(),(m=a.gl)!=null&&m.xr&&a.xr.disconnect(),nV(a.scene),qf.delete(s)}catch{}},500)})}}const VV=new Set,HV=new Set,GV=new Set;function xw(s,e){if(s.size)for(const{callback:t}of s.values())t(e)}function ov(s,e){switch(s){case"before":return xw(VV,e);case"after":return xw(HV,e);case"tail":return xw(GV,e)}}let Sw,Mw;function Kw(s,e,t){let i=e.clock.getDelta();e.frameloop==="never"&&typeof s=="number"&&(i=s-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=s),Sw=e.internal.subscribers;for(let a=0;a<Sw.length;a++)Mw=Sw[a],Mw.ref.current(Mw.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let bx=!1,_w=!1,ww,X2,bm;function vP(s){X2=requestAnimationFrame(vP),bx=!0,ww=0,ov("before",s),_w=!0;for(const t of qf.values()){var e;bm=t.store.getState(),bm.internal.active&&(bm.frameloop==="always"||bm.internal.frames>0)&&!((e=bm.gl.xr)!=null&&e.isPresenting)&&(ww+=Kw(s,bm))}if(_w=!1,ov("after",s),ww===0)return ov("tail",s),bx=!1,cancelAnimationFrame(X2)}function $w(s,e=1){var t;if(!s)return qf.forEach(i=>$w(i.store.getState(),e));(t=s.gl.xr)!=null&&t.isPresenting||!s.internal.active||s.frameloop==="never"||(e>1?s.internal.frames=Math.min(60,s.internal.frames+e):_w?s.internal.frames=2:s.internal.frames=1,bx||(bx=!0,requestAnimationFrame(vP)))}function q2(s,e=!0,t,i){if(e&&ov("before",s),t)Kw(s,t,i);else for(const a of qf.values())Kw(s,a.store.getState());e&&ov("after",s)}const Tw={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function WV(s){const{handlePointer:e}=dV(s);return{priority:1,enabled:!0,compute(t,i,a){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Tw).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:a}=s.getState();(t=a.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(a.lastEvent.current)},connect:t=>{const{set:i,events:a}=s.getState();if(a.disconnect==null||a.disconnect(),i(c=>({events:{...c.events,connected:t}})),a.handlers)for(const c in a.handlers){const d=a.handlers[c],[f,m]=Tw[c];t.addEventListener(f,d,{passive:m})}},disconnect:()=>{const{set:t,events:i}=s.getState();if(i.connected){if(i.handlers)for(const a in i.handlers){const c=i.handlers[a],[d]=Tw[a];i.connected.removeEventListener(d,c)}t(a=>({events:{...a.events,connected:void 0}}))}}}}function Y2(s,e){let t;return(...i)=>{window.clearTimeout(t),t=window.setTimeout(()=>s(...i),e)}}function jV({debounce:s,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const a=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[c,d]=pe.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=pe.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:c,orientationHandler:null}),m=s?typeof s=="number"?s:s.scroll:null,g=s?typeof s=="number"?s:s.resize:null,v=pe.useRef(!1);pe.useEffect(()=>(v.current=!0,()=>void(v.current=!1)));const[M,x,S]=pe.useMemo(()=>{const T=()=>{if(!f.current.element)return;const{left:D,top:z,width:L,height:O,bottom:U,right:H,x:I,y:F}=f.current.element.getBoundingClientRect(),V={left:D,top:z,width:L,height:O,bottom:U,right:H,x:I,y:F};f.current.element instanceof HTMLElement&&i&&(V.height=f.current.element.offsetHeight,V.width=f.current.element.offsetWidth),Object.freeze(V),v.current&&!JV(f.current.lastBounds,V)&&d(f.current.lastBounds=V)};return[T,g?Y2(T,g):T,m?Y2(T,m):T]},[d,i,m,g]);function w(){f.current.scrollContainers&&(f.current.scrollContainers.forEach(T=>T.removeEventListener("scroll",S,!0)),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null),f.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",f.current.orientationHandler))}function k(){f.current.element&&(f.current.resizeObserver=new a(S),f.current.resizeObserver.observe(f.current.element),e&&f.current.scrollContainers&&f.current.scrollContainers.forEach(T=>T.addEventListener("scroll",S,{capture:!0,passive:!0})),f.current.orientationHandler=()=>{S()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",f.current.orientationHandler))}const C=T=>{!T||T===f.current.element||(w(),f.current.element=T,f.current.scrollContainers=yP(T),k())};return qV(S,!!e),XV(x),pe.useEffect(()=>{w(),k()},[e,S,x]),pe.useEffect(()=>w,[]),[C,c,M]}function XV(s){pe.useEffect(()=>{const e=s;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[s])}function qV(s,e){pe.useEffect(()=>{if(e){const t=s;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[s,e])}function yP(s){const e=[];if(!s||s===document.body)return e;const{overflow:t,overflowX:i,overflowY:a}=window.getComputedStyle(s);return[t,i,a].some(c=>c==="auto"||c==="scroll")&&e.push(s),[...e,...yP(s.parentElement)]}const YV=["x","y","top","bottom","left","right","width","height"],JV=(s,e)=>YV.every(t=>s[t]===e[t]);function QV({ref:s,children:e,fallback:t,resize:i,style:a,gl:c,events:d=WV,eventSource:f,eventPrefix:m,shadows:g,linear:v,flat:M,legacy:x,orthographic:S,frameloop:w,dpr:k,performance:C,raycaster:T,camera:D,scene:z,onPointerMissed:L,onCreated:O,...U}){Vn.useMemo(()=>kV(D4),[]);const H=$4(),[I,F]=jV({scroll:!0,debounce:{scroll:50,resize:0},...i}),V=Vn.useRef(null),X=Vn.useRef(null);Vn.useImperativeHandle(s,()=>V.current);const _=oP(L),[K,le]=Vn.useState(!1),[$,j]=Vn.useState(!1);if(K)throw K;if($)throw $;const Q=Vn.useRef(null);Lv(()=>{const ce=V.current;if(F.width>0&&F.height>0&&ce){Q.current||(Q.current=FV(ce));async function ye(){await Q.current.configure({gl:c,scene:z,events:d,shadows:g,linear:v,flat:M,legacy:x,orthographic:S,frameloop:w,dpr:k,performance:C,raycaster:T,camera:D,size:F,onPointerMissed:(...Te)=>_.current==null?void 0:_.current(...Te),onCreated:Te=>{Te.events.connect==null||Te.events.connect(f?K4(f)?f.current:f:X.current),m&&Te.setEvents({compute:(Fe,ft)=>{const lt=Fe[m+"X"],ct=Fe[m+"Y"];ft.pointer.set(lt/ft.size.width*2-1,-(ct/ft.size.height)*2+1),ft.raycaster.setFromCamera(ft.pointer,ft.camera)}}),O?.(Te)}}),Q.current.render(Z.jsx(H,{children:Z.jsx(tV,{set:j,children:Z.jsx(Vn.Suspense,{fallback:Z.jsx(eV,{set:le}),children:e??null})})}))}ye()}}),Vn.useEffect(()=>{const ce=V.current;if(ce)return()=>AP(ce)},[]);const ne=f?"none":"auto";return Z.jsx("div",{ref:X,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:ne,...a},...U,children:Z.jsx("div",{ref:I,style:{width:"100%",height:"100%"},children:Z.jsx("canvas",{ref:V,style:{display:"block"},children:t})})})}function ZV(s){return Z.jsx(rP,{children:Z.jsx(QV,{...s})})}const KV="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAIABJREFUeF6svVmPZdlVtR0nmyqX7d8FF3ADEq24AXGBLYMlLNngwhg3uIx709hCCMmiF3/Pxq7KLj6tfeI5+cSTc51I+F6/bxGRmRF7r2bOMccYc+19Tn/1V391++rVq5v134sXL26eP39+fF3/vXz58vjv9vb25nQ6Hf89fvz45unTp8d/77zzzs277757fP3Yxz52+X7925MnT24ePXp0s/7Htdc1nz17dvPRRx8dX7nX+vd1j/Xz/Lfuw3/rvlxr/dz6+TUuxvvhhx/e/OIXv7j8t/687rH+ff0s42ac77333s3HP/7x47/1/Ro7f8c81hzW/T1+xr7ute6x/lt/t+6zxrX+t8a5fm/N318Z//qZ9bOMnWuutVhzWuPlOlzL11nfe13X7/C77NX6ffaLa3htu5bsN3tOPDAn7z17wv6yRutniRfHD9diTF6ftcaOH+KJtZ/mudbL/zkO1jo4fomr7ovjl1hlXdc913yZO+PvV+/3sWE3N5f5Myb2k3F4Hdf6ef6sg8ezfr75s+bX3OH6ni/jcyxwf74e//aNb3zjlqQqAJBADgSCEQBYm8bGrUl4AgT7GhibsxITACB5SFISdS2O/2NzWBAHm5Py5z//+QUE1j3WPUkogGuNcSW7E95/Xt+zGet3CAYSbV2X5AcApsRt4nnsBluDocG2yd9AZVxNNu+VwdTjIQC87xP4O3lJIvbIgLL+zkWkCXAPSB49unkyFJEFvOs/4gkQYN0AF+Koyc74dwDg2AIA+ApYcy+SjkLj+ZATxFXXknHytQDocTR3PHcAln1u0WPfm/xrrZ38gJOT/x4ofPvb374HALtqwC9RAYyiHXirlKsdCUuCUj2p8iCjN4kNchV1EsEAFgCs/0hQKuMRvKdHN0+ePjmSm2Cj+psB8HdrTmsM3JMg8PhJXgOlF5pq0uTvtQDC9ff8z5XWa8Hfr2vDJKagnJiUf9fg7ORxYjmIywbYr4IyLMJsogUEMHYCsCdmkrskcJL7fjv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E0MsjYTezYjqF/mIlH97/jbnbMsgDg9r9/yAFzldiheCmMqtyas7Z3SXnQaZk3p/xTkU3WxHJgAAArtTgDBO22F5MaP6e66CwB4eDgnf297LdAwN/6cjC47vFyLAdFU38FW7W2K6wVfj9xeu+wMBvU2poo1AUl9BQOa46fGWKugaWhj6ExLjwdnPN2jQbfHO9+g+TWIbYZN1L/nNwj4a8ZCwkwymTVhrJN8PeL63fvjEWcGVtgHc2AQQDowl5MM8n7/HUPcSfgLT+d73/ve+0njWsuhnYqeRsxb/d2dAViKdhr08f/HhFmagLJmEVTQPhLJxg9VrADgdwv6rTsEwkTXp11XOK5mAQ0mV0zm2+huZxswrIZ0EJJYkx9xAQKPewVM20s1XbXrKeyMRdPiAsDE6hpDzI/NYxuCE/iuOapHwrnaTWr1LwMpOLs/X7+j4Mu6rE8b3Ja4BkLPqeezc2Cz8WlO3909PDy9hs9SkRgvc4a52/Oov3P+949+9KMzALi6Nihs5kyL1x1wXEzpHFVv155hYHWeywYsBZyUfhUWBtE6JrTT934DAH5CCv37NX4WF4pZLYYZ5fMAkg4oU0gniwEAF5fF7Dw4gQ2MzMMTYB9nOFcbAq6uvuezCTuNYdfKghYXnKtLS0Un/W0psM5X/6VdH4PmBACMaVd5dyBdV94JBdtrclnWES/OIYO5WcgkO9bPu8bOm7JFs2ezRp/TAOCv/w+By8nAK4xY6gAAAABJRU5ErkJggg==";let xb=null,Eb=null;function _V(){if(Eb)return Eb;if(xb)return xb;const s=new ER;return xb=new Promise((e,t)=>{s.load(KV,i=>{i.wrapS=Dc,i.wrapT=Dc,Eb=i,e(i)},void 0,t)}),xb}function $V({colors:s=["#03307a","#2792dc","#9bdfdf"],colorsRef:e,resizeDebounce:t=100,seed:i,agentState:a=null,volumeMode:c="auto",manualInput:d,manualOutput:f,inputVolumeRef:m,outputVolumeRef:g,getInputVolume:v,getOutputVolume:M,className:x="rqmii-orb"}){return Z.jsx("div",{className:x,children:Z.jsx(ZV,{resize:{debounce:t},gl:{alpha:!0,antialias:!0,premultipliedAlpha:!0,powerPreference:"high-performance"},fallback:null,children:Z.jsx(e5,{colors:s,colorsRef:e,seed:i,agentState:a,volumeMode:c,manualInput:d,manualOutput:f,inputVolumeRef:m,outputVolumeRef:g,getInputVolume:v,getOutputVolume:M})})})}function e5({colors:s,colorsRef:e,seed:t,agentState:i,volumeMode:a,manualInput:c,manualOutput:d,inputVolumeRef:f,outputVolumeRef:m,getInputVolume:g,getOutputVolume:v}){const{gl:M}=hV(),x=pe.useRef(null),S=pe.useRef(s),w=pe.useRef(new ut(s[0])),k=pe.useRef(new ut(s[1])),C=pe.useRef(new ut(s[2])),T=pe.useRef(.1),[D,z]=pe.useState(Eb);pe.useEffect(()=>{if(D)return;let K=!1;return Promise.resolve(_V()).then(le=>{K||z(le)}),()=>{K=!0}},[D]);const L=pe.useRef(i),O=pe.useRef(a),U=pe.useRef(c??0),H=pe.useRef(d??0);pe.useEffect(()=>{L.current=i},[i]),pe.useEffect(()=>{O.current=a},[a]),pe.useEffect(()=>{U.current=kf(c??f?.current??g?.()??0)},[c,f,g]),pe.useEffect(()=>{H.current=kf(d??m?.current??v?.()??0)},[d,m,v]);const I=pe.useMemo(()=>t5(t??Math.floor(Math.random()*2**32)),[t]),F=pe.useMemo(()=>new Float32Array(Array.from({length:7},()=>I()*Math.PI*2)),[I]);pe.useEffect(()=>{w.current=new ut(s[0]),k.current=new ut(s[1]),C.current=new ut(s[2])},[s]),pe.useEffect(()=>{const K=()=>{if(!x.current)return;const $=document.documentElement.classList.contains("dark");x.current.material.uniforms.uInverted.value=$?1:0};K();const le=new MutationObserver(K);return le.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>le.disconnect()},[]);const V=pe.useRef(0),X=pe.useRef(0);pV((K,le)=>{const $=x.current?.material;if(!$)return;const j=e?.current;j&&(j[0]&&w.current.set(j[0]),j[1]&&k.current.set(j[1]),j[2]&&C.current.set(j[2]));const Q=$.uniforms;Q.uTime.value+=le*.5;let ne=0,ce=.3;if(O.current==="manual")ne=kf(c??f?.current??g?.()??0),ce=kf(d??m?.current??v?.()??0);else if(L.current==="listening"){const Te=Q.uTime.value*2;ne=kf(.55+Math.sin(Te*3.2)*.35),ce=.45}else if(L.current==="talking"){const Te=Q.uTime.value*2;ne=kf(.65+Math.sin(Te*4.8)*.22),ce=kf(.75+Math.sin(Te*3.6)*.22)}V.current+=(ne-V.current)*.2,X.current+=(ce-X.current)*.2;const ye=.1+(1-Math.pow(X.current-1,2))*.9;T.current+=(ye-T.current)*.12,Q.uAnimation.value+=le*T.current,Q.uInputVolume.value=V.current,Q.uOutputVolume.value=X.current,Q.uColor1.value.lerp(w.current,.08),Q.uColor2.value.lerp(k.current,.08),Q.uColor3.value.lerp(C.current,.08)}),pe.useEffect(()=>{const K=M.domElement,le=$=>{$.preventDefault(),setTimeout(()=>{M.forceContextRestore()},1)};return K.addEventListener("webglcontextlost",le,!1),()=>K.removeEventListener("webglcontextlost",le,!1)},[M]);const _=pe.useMemo(()=>{if(!D)return null;D.wrapS=Dc,D.wrapT=Dc;const K=typeof document<"u"&&document.documentElement.classList.contains("dark");return{uColor1:new Ta(new ut(S.current[0])),uColor2:new Ta(new ut(S.current[1])),uColor3:new Ta(new ut(S.current[2])),uOffsets:{value:F},uPerlinTexture:new Ta(D),uTime:new Ta(0),uAnimation:new Ta(.1),uInverted:new Ta(K?1:0),uInputVolume:new Ta(0),uOutputVolume:new Ta(0),uOpacity:new Ta(1)}},[D,F]);return _?Z.jsxs("mesh",{ref:x,children:[Z.jsx("circleGeometry",{args:[3.5,64]}),Z.jsx("shaderMaterial",{uniforms:_,fragmentShader:i5,vertexShader:n5,transparent:!0})]}):null}function t5(s){return function(){s|=0,s=s+2654435769|0;let e=s^s>>>16;return e=Math.imul(e,569420461),e=e^e>>>15,e=Math.imul(e,1935289751),((e=e^e>>>15)>>>0)/4294967296}}function kf(s){return Number.isFinite(s)?Math.min(1,Math.max(0,s)):0}const n5=`
|
|
4501
4501
|
uniform float uTime;
|
|
4502
4502
|
uniform sampler2D uPerlinTexture;
|
|
4503
4503
|
varying vec2 vUv;
|
|
@@ -4618,5 +4618,5 @@ void main() {
|
|
|
4618
4618
|
color.a *= uOpacity;
|
|
4619
4619
|
gl_FragColor = color;
|
|
4620
4620
|
}
|
|
4621
|
-
`,Ec=()=>{};function Jn(...s){return s.filter(Boolean).join(" ")}function lo(s){return["ar","fa","ur","he"].includes(s)?"rqmii-chat-font-ar":"rqmii-chat-font-latin"}function J2(s){return s==="ar"?"rqmii-chat-font-ar":"rqmii-chat-font-latin"}function Zu(s){return["ar","fa","ur","he"].includes(s)?"rtl":"ltr"}function eT(s){const e=Math.floor(s/60).toString().padStart(2,"0"),t=(s%60).toString().padStart(2,"0");return`${e}:${t}`}function r5(s=!0){const[e,t]=pe.useState(0);return pe.useEffect(()=>{if(!s)return;const i=setInterval(()=>t(a=>a+1),1e3);return()=>clearInterval(i)},[s]),e}function s5(){const[s,e]=pe.useState(null);return pe.useEffect(()=>{const t=window.visualViewport;if(!t)return;const i=()=>e(t.height);return i(),t.addEventListener("resize",i),t.addEventListener("scroll",i),()=>{t.removeEventListener("resize",i),t.removeEventListener("scroll",i)}},[]),s}function a5(s,e){const t=pe.useRef([]);t.current=s.match(/\S+\s*/g)||[s];const[i,a]=pe.useState(()=>e?Math.min(1,t.current.length):t.current.length);return pe.useEffect(()=>{if(!e||!s){a(t.current.length);return}if(a(d=>Math.max(1,d)),t.current.length<=1)return;const c=setInterval(()=>{a(d=>d>=t.current.length?(clearInterval(c),d):d+1)},50);return()=>clearInterval(c)},[s,e]),t.current.slice(0,i).join("")}function o5(s){return s?.faceIndex===0&&s.faceImageUrl?s.faceImageUrl:s?.faceIndex===9?null:t3(s?.faceIndex||1)}function tT({language:s,languages:e,onChange:t}){const[i,a]=pe.useState(!1),c=pe.useRef(null),d=Cw(s),f=zm(e,s).map(m=>Cw(m)).filter(Boolean);return pe.useEffect(()=>{if(!i)return;const m=g=>{c.current?.contains(g.target)||a(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[i]),Z.jsxs("div",{className:"rqmii-chat-language",ref:c,children:[Z.jsxs("button",{type:"button",className:Jn("rqmii-chat-pill",J2(s)),onClick:()=>a(m=>!m),children:[Z.jsx("span",{children:d?.label||s}),Z.jsx(e3,{size:16})]}),i&&f.length>1&&Z.jsx("div",{className:"rqmii-chat-language-menu",children:f.map(m=>Z.jsx("button",{type:"button",className:Jn("rqmii-chat-language-item",J2(m.value),m.value===s&&"is-selected"),onClick:()=>{t(m.value),a(!1)},children:m.label},m.value))})]})}function Nc({language:s="en",brand:e="rqmii",agent:t}){const i=t?.widget?.appearance,a=i?.show_branding!==!1,c=i?.footer_content?.[s],d=!!c?.trim();return!a&&!d?Z.jsx("div",{style:{padding:11}}):Z.jsxs("div",{className:"rqmii-chat-footer",children:[a&&Z.jsxs("p",{children:["Powered by ",Z.jsx("strong",{children:s==="ar"?"رقمي":e})]}),d&&Z.jsx("p",{children:c})]})}function co({agent:s,size:e="large",active:t=!1,className:i=""}){const a=o5(s),c=s?.faceIndex===9,[d,f]=pe.useState(!a);return Z.jsx("div",{className:Jn("rqmii-agent-avatar",`rqmii-agent-avatar--${e}`,t&&"is-active",c&&"is-orb",i),children:c?Z.jsx($V,{className:"rqmii-agent-avatar-orb"}):a?Z.jsx("img",{src:a,alt:s?.name||"Agent",style:{opacity:d?1:0,transition:"opacity 200ms ease"},onLoad:()=>f(!0)}):null})}function nT({agent:s,onClick:e,className:t="",position:i="fixed",active:a=!1}){return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-open-button",i==="fixed"&&"is-fixed",t),onClick:e,"aria-label":"Open chat",children:Z.jsx(co,{agent:s,size:"button",active:a})})}function l5(){try{const s=window.AudioContext||window.webkitAudioContext;if(!s)return;const e=new s,t=e.currentTime,i=e.createOscillator(),a=e.createGain();i.type="sine",i.frequency.setValueAtTime(880,t),i.frequency.setValueAtTime(1180,t+.12),a.gain.setValueAtTime(1e-4,t),a.gain.exponentialRampToValueAtTime(.18,t+.02),a.gain.exponentialRampToValueAtTime(1e-4,t+.32),i.connect(a),a.connect(e.destination),i.start(t),i.stop(t+.34),i.onended=()=>{e.close()}}catch{}}function c5({message:s,delaySeconds:e,soundEnabled:t,language:i,buttonPosition:a="right",onClick:c}){const[d,f]=pe.useState(!1),m=s.trim();if(pe.useEffect(()=>{if(!m)return;const v=setTimeout(()=>{f(!0),t&&l5()},Math.max(0,e)*1e3);return()=>clearTimeout(v)},[m,e,t]),!d||!m)return null;const g=a==="right"?"is-right":"is-left";return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-welcome-bubble",g,lo(i)),dir:Zu(i),onClick:c,"aria-label":m,children:m})}function dS({language:s,placeholder:e,onSend:t,disabled:i=!1,variant:a="text"}){const[c,d]=pe.useState(""),f=pe.useRef(null),m=168,g=()=>{const v=c.trim();!v||i||(t(v),d(""),f.current&&(f.current.style.height="auto"))};return Z.jsxs("div",{className:Jn("rqmii-chat-input",lo(s),a==="voice"&&"is-voice"),children:[Z.jsx("textarea",{ref:f,value:c,disabled:i,rows:a==="compact"?2:3,dir:Zu(s),placeholder:e||$t(s,"sendMessage"),onChange:v=>{d(v.target.value);const M=f.current;M&&(M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,m)}px`)},onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),g())}}),Z.jsx("button",{type:"button",onClick:g,disabled:!c.trim()||i,"aria-label":$t(s,"send"),children:Z.jsx(gD,{size:20})})]})}function u5({text:s,streaming:e}){const t=a5(s,e);return Z.jsx(Z.Fragment,{children:t})}const e1=133,d5=e1+44,f5=767,QA=36,h5=8,Q2=QA+h5;function p5(){return typeof window>"u"?e1:window.innerWidth<=f5?d5:e1}function m5(s){return s==="rtl"?"right":"left"}function g5(s,e,t,i){if(!s.length)return null;const a=Math.max(...s.map(d=>d.offsetTop)),c=s.filter(d=>d.offsetTop>=a-.5);return t==="right"?c.find(d=>d.offsetLeft+d.offsetWidth>e-i)||null:c.find(d=>d.offsetLeft<i)||null}function Z2(s,e,t,i){for(let a=0;a<2;a++){const c=g5(s,e,t,i);if(!c)break;t==="right"?c.style.marginRight=`${i}px`:c.style.marginLeft=`${i}px`,c.style.maxWidth=`calc(100% - ${i}px)`}}function A5({suggestions:s,language:e,onClick:t}){const[i,a]=pe.useState(!1),[c,d]=pe.useState(!1),[f,m]=pe.useState(null),[g,v]=pe.useState(null),M=pe.useRef(null),x=pe.useRef([]),S=Zu(e||"en"),w=m5(S),k=C=>{C.forEach(T=>{T&&(T.style.maxWidth="",T.style.marginRight="",T.style.marginLeft="")})};return pe.useLayoutEffect(()=>{const C=M.current;if(!C||i)return;const T=()=>{const z=x.current;k(z);const L=C.clientWidth,O=p5(),U=()=>{for(let I=0;I<z.length;I++){const F=z[I];if(F&&F.offsetTop+F.offsetHeight>O+.5)return I}return null};let H=U();if(H!==null)for(let I=0;I<=z.length;I++){k(z);const F=z.slice(0,H).filter(X=>!!X);Z2(F,L,w,Q2);const V=U();if(V===null||V>=H)break;H=V}if(m(H),d(H!==null),H!==null){const I=z.slice(0,H).filter(V=>!!V),F=I.length?Math.max(...I.map(V=>V.offsetTop+V.offsetHeight)):QA;v(F-QA)}else v(null)};T();const D=typeof ResizeObserver<"u"?new ResizeObserver(T):null;return D?.observe(C),()=>{D?.disconnect(),k(x.current)}},[s,i,w]),pe.useLayoutEffect(()=>{const C=M.current;if(!C||!i)return;const T=x.current.filter(z=>!!z);k(x.current),Z2(T,C.clientWidth,w,Q2);const D=T.length?Math.max(...T.map(z=>z.offsetTop+z.offsetHeight)):QA;return v(D-QA),()=>{k(x.current)}},[i,s,w]),s.length?Z.jsx("div",{className:Jn("rqmii-suggested-messages",i&&"is-expanded",c&&"has-overflow"),dir:S,children:Z.jsxs("div",{ref:M,className:Jn("rqmii-suggested-messages-inner",i?"is-expanded":"is-collapsed"),children:[s.map((C,T)=>{const D=!i&&f!==null&&T>=f;return Z.jsx("button",{ref:z=>{x.current[T]=z},type:"button",className:"rqmii-suggested-message",onClick:()=>t(C),style:D?{visibility:"hidden"}:void 0,"aria-hidden":D||void 0,tabIndex:D?-1:void 0,children:C},T)}),c&&Z.jsx("button",{type:"button",className:Jn("rqmii-suggested-messages-toggle",w==="left"&&"is-start-left"),style:g!=null?{top:g,bottom:"auto"}:void 0,onClick:()=>a(C=>(C&&M.current&&(M.current.scrollTop=0),!C)),"aria-label":i?"Show less":"Show more","aria-expanded":i,children:i?Z.jsx(xD,{size:14}):Z.jsx(e3,{size:14})})]})}):null}function v5({language:s}){const e=Zu(s||"en");return Z.jsx("div",{className:"rqmii-chat-message-row",children:Z.jsxs("div",{className:"rqmii-chat-message rqmii-chat-typing-indicator",dir:e,children:[Z.jsx("span",{className:"rqmii-chat-typing-dot"}),Z.jsx("span",{className:"rqmii-chat-typing-dot"}),Z.jsx("span",{className:"rqmii-chat-typing-dot"})]})})}function iT({messages:s,partialTranscript:e,language:t,showTypingIndicator:i}){const a=pe.useRef(null),c=Zu(t||"en"),d=pe.useRef(s.length);return pe.useEffect(()=>{if(!a.current)return;const f=s.length!==d.current;d.current=s.length,a.current.scrollIntoView({behavior:f?"smooth":"instant",block:"end"})},[s,e]),Z.jsxs("div",{className:"rqmii-chat-messages",children:[s.map(f=>{const m=f.role==="user"||f.sender==="user";return Z.jsx("div",{className:Jn("rqmii-chat-message-row",m&&"is-user"),children:Z.jsx("div",{className:"rqmii-chat-message",dir:c,children:Z.jsx(u5,{text:f.text,streaming:f.streaming})})},f.id||`${f.role}-${f.text}`)}),i&&Z.jsx(v5,{language:t}),e&&Z.jsx("div",{className:"rqmii-chat-message-row is-user is-partial",children:Z.jsx("div",{className:"rqmii-chat-message",dir:c,children:e})}),Z.jsx("div",{ref:a})]})}function bP({message:s,onRetry:e,onClose:t,language:i="en"}){return Z.jsxs("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:[t&&Z.jsx("button",{type:"button",className:"rqmii-error-close",onClick:t,children:"×"}),Z.jsx("p",{children:s||$t(i,"connectionFailed")}),e&&Z.jsxs("button",{type:"button",className:"rqmii-chat-retry",onClick:e,children:[Z.jsx(DD,{size:16}),Z.jsx("span",{children:$t(i,"retry")})]})]})}const y5=5;function xP({rating:s,onRate:e,readonly:t,size:i=28}){const[a,c]=pe.useState(0),d=a||s;return Z.jsx("div",{className:"rqmii-chat-rating-stars",role:"radiogroup",children:Array.from({length:y5},(f,m)=>{const g=m+1,v=g<=d;return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-star",v&&"is-filled",t&&"is-readonly"),disabled:t,"aria-label":`${g}`,"aria-checked":g===s,role:"radio",onMouseEnter:()=>!t&&c(g),onMouseLeave:()=>!t&&c(0),onClick:()=>!t&&e?.(g),children:Z.jsx(ID,{size:i,fill:v?"currentColor":"none"})},g)})})}function SP({language:s,rating:e,endedBy:t,sessionId:i,interactive:a,showTellUsMore:c,onRate:d,onTellUsMore:f}){const m=e>0?$t(s,"ratingThankYou"):$t(s,"ratingQuestion"),g=t==="user"?$t(s,"youEnded"):$t(s,"agentEnded");return Z.jsxs("div",{className:Jn("rqmii-chat-rating",lo(s)),dir:Zu(s),children:[Z.jsx("div",{className:"rqmii-chat-rating-header",children:m}),Z.jsx(xP,{rating:e,onRate:d,readonly:!a}),c&&Z.jsx("button",{type:"button",className:"rqmii-chat-rating-more",onClick:f,children:$t(s,"tellUsMore")}),Z.jsxs("div",{className:"rqmii-chat-rating-meta",children:[Z.jsx("div",{children:g}),i&&Z.jsxs("div",{children:[$t(s,"sessionIdLabel")," ",Z.jsx("span",{className:"rqmii-chat-font-latin",children:i})]})]})]})}function MP({agent:s,language:e,rating:t,onBack:i,onMinimize:a,onSubmit:c}){const[d,f]=pe.useState(""),[m,g]=pe.useState(!1),v=d.trim().length>0&&!m,M=async()=>{if(v){g(!0);try{await c(d.trim())}finally{g(!1)}}};return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--feedback",lo(e)),dir:Zu(e),children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":"Back",children:Z.jsx(vD,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})})]}),Z.jsxs("div",{className:"rqmii-chat-feedback-body",children:[Z.jsx(co,{agent:s,size:"hero"}),Z.jsx(xP,{rating:t,readonly:!0}),Z.jsx("div",{className:"rqmii-chat-feedback-title",children:$t(e,"ratingThankYou")}),Z.jsx("div",{className:"rqmii-chat-feedback-subtitle",children:$t(e,"feedbackSubtitle")}),Z.jsx("textarea",{className:"rqmii-chat-feedback-input",value:d,dir:Zu(e),placeholder:$t(e,"feedbackPlaceholder"),onChange:x=>f(x.target.value)}),Z.jsx("div",{className:"rqmii-chat-feedback-actions",children:Z.jsx("button",{type:"button",className:"rqmii-chat-feedback-submit",onClick:M,disabled:!v,children:m?Z.jsx(Sx,{className:"rqmii-chat-spin",size:18}):$t(e,"submit")})})]}),Z.jsx(Nc,{language:e,agent:s})]})}function Wm(s){if(!(s==null||typeof window>"u"||window.innerWidth>=768))return{top:`${window.innerHeight-s}px`,bottom:0}}function b5({agent:s,language:e,languages:t,onLanguageChange:i,onClose:a,onSend:c,isVoiceEnabled:d=!1,isAudioPlaying:f=!1,isVoiceSetupLoading:m=!1,onStartVoice:g,visualViewportHeight:v,disabled:M=!1,error:x,suggestions:S,onSuggestionClick:w,compact:k=!1}){const C=Wm(v),T=k?"start":"hero",D=S&&S.length>0;return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--start",k&&"rqmii-chat-panel--start-compact",lo(e)),style:C,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),Z.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[Z.jsx(tT,{language:e,languages:t,onChange:i}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:Z.jsx(s1,{size:20})})]})]}),Z.jsxs("div",{className:"rqmii-chat-start-body",children:[d?Z.jsxs("div",{className:Jn("rqmii-chat-call-avatar-wrap",k&&"is-compact"),children:[Z.jsx(co,{agent:s,size:T,active:f}),Z.jsx("button",{type:"button",className:Jn("rqmii-chat-call-button",k&&"is-compact"),onClick:g,disabled:m,"aria-label":$t(e,"startVoice"),children:m?Z.jsx(Sx,{className:"rqmii-chat-spin",size:k?18:24}):Z.jsx(r1,{size:k?18:24})})]}):Z.jsx(co,{agent:s,size:T}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),x&&Z.jsx("div",{className:"rqmii-chat-error-text",children:x})]}),D&&Z.jsx("div",{className:"rqmii-chat-start-suggestions",children:Z.jsx(A5,{suggestions:S,language:e,onClick:z=>w?.(z)})}),Z.jsx(dS,{language:e,onSend:c,disabled:M}),Z.jsx(Nc,{language:e,agent:s})]})}function x5({agent:s,language:e,languages:t,onLanguageChange:i,onClose:a,onStartVoice:c,isVoiceSetupLoading:d=!1,isAudioPlaying:f,visualViewportHeight:m}){const g=Wm(m);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-start",lo(e)),style:g,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),Z.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[Z.jsx(tT,{language:e,languages:t,onChange:i}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:Z.jsx(s1,{size:20})})]})]}),Z.jsxs("div",{className:"rqmii-chat-call-body",children:[Z.jsxs("div",{className:"rqmii-chat-call-avatar-wrap",children:[Z.jsx(co,{agent:s,size:"hero",active:f}),Z.jsx("button",{type:"button",className:"rqmii-chat-call-button",onClick:c,disabled:d,"aria-label":$t(e,"startVoice"),children:d?Z.jsx(Sx,{className:"rqmii-chat-spin",size:24}):Z.jsx(r1,{size:24})})]}),Z.jsxs("div",{className:"rqmii-chat-agent-name",children:[$t(e,"call")," ",s.name]})]}),Z.jsx(Nc,{language:e,agent:s})]})}function S5({agent:s,language:e,onEndSession:t,onMinimize:i,messages:a,partialTranscript:c,onSend:d,isAudioPlaying:f,isVoiceEnabled:m,onToggleVoice:g,isListening:v,isSpeaking:M,isLoading:x,isAgentThinking:S,isAgentSpeaking:w,onStartVoice:k,elapsed:C,visualViewportHeight:T,waitingForResponse:D}){const z=wP({language:e,isListening:v,isLoading:x,isSpeaking:M,isAudioPlaying:f,isAgentThinking:S,isAgentSpeaking:w,persistentListening:!1}),L=Wm(T);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--conversation",lo(e)),style:L,children:[Z.jsxs("div",{className:"rqmii-chat-header",children:[Z.jsx(co,{agent:s,size:"header",active:f}),m&&z&&Z.jsx("div",{className:"rqmii-chat-header-status",children:Z.jsx("span",{children:z})}),Z.jsx("div",{className:"rqmii-chat-header-spacer"}),Z.jsxs("div",{className:"rqmii-chat-header-actions",children:[i&&Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})}),m&&Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",M&&"is-active"),onClick:g,"aria-label":v?$t(e,"stopVoice"):$t(e,"startVoice"),children:v?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]}),Z.jsx(iT,{messages:a,partialTranscript:c,language:e,showTypingIndicator:D}),m&&Z.jsx("div",{className:"rqmii-chat-session-counter",children:eT(C)}),Z.jsx(dS,{language:e,onSend:d}),Z.jsx(Nc,{language:e,agent:s})]})}function M5({agent:s,language:e,onEndSession:t,onMinimize:i,isListening:a,isLoading:c,isSpeaking:d,isAudioPlaying:f,isAgentThinking:m,isAgentSpeaking:g,onToggleVoice:v,elapsed:M,visualViewportHeight:x}){const S=wP({language:e,isListening:a,isLoading:c,isSpeaking:d,isAudioPlaying:f,isAgentThinking:m,isAgentSpeaking:g,persistentListening:!0}),w=Wm(x);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-call",lo(e)),style:w,children:[Z.jsxs("div",{className:"rqmii-chat-call-status",children:[Z.jsx("span",{className:Jn("rqmii-chat-live-dot",a&&"is-live")}),Z.jsx("span",{children:eT(M)}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,children:Z.jsx(wx,{size:20})})]}),Z.jsxs("div",{className:"rqmii-chat-voice-frame",children:[Z.jsx(co,{agent:s,size:"hero",active:f}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),Z.jsx("div",{className:Jn("rqmii-chat-status-pill",!S&&"is-empty"),children:S||$t(e,"listening")}),Z.jsxs("div",{className:"rqmii-chat-voice-actions",children:[Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",d&&"is-active"),onClick:v,children:a?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]}),Z.jsx(Nc,{language:e,agent:s})]})}function wP({language:s,isListening:e,isLoading:t,isSpeaking:i,isAudioPlaying:a,isAgentThinking:c,isAgentSpeaking:d,persistentListening:f=!1}){return t?$t(s,"loading"):i?$t(s,"listening"):a||d?$t(s,"talkToInterrupt"):c?$t(s,"processing"):e&&f?$t(s,"listening"):null}function w5({agent:s,language:e,onRestore:t,onClose:i,isListening:a,isAudioPlaying:c,isSpeaking:d,onToggleVoice:f,elapsed:m,visualViewportHeight:g,variant:v="voice"}){const M=Wm(g),x=v==="text";return Z.jsxs("div",{className:Jn("rqmii-chat-minimized",lo(e)),style:M,children:[Z.jsx(co,{agent:s,size:"minimized",active:c}),!x&&Z.jsx("span",{className:"rqmii-chat-minimized-time",children:eT(m)}),Z.jsxs("div",{className:"rqmii-chat-minimized-actions",children:[Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:t,"aria-label":$t(e,"maximize"),children:Z.jsx(wD,{size:20})}),!x&&Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",d&&"is-active"),onClick:f,"aria-label":a?$t(e,"stopVoice"):$t(e,"startVoice"),children:a?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:i,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]})}function TP({agent:s,language:e,languages:t,chatKind:i,messages:a,onLanguageChange:c,onMinimize:d,onStartNewVoice:f,onStartNewText:m,isVoiceSetupLoading:g=!1,visualViewportHeight:v,rating:M,endedBy:x,sessionId:S,ratingInteractive:w,showTellUsMore:k,onRate:C,onTellUsMore:T}){const D=Wm(v),z=S?Z.jsx(SP,{language:e,rating:M,endedBy:x,sessionId:S,interactive:w,showTellUsMore:k,onRate:C,onTellUsMore:T}):null,L=i==="voice"||i==="text_and_voice",O=i==="text"||i==="text_and_voice",U=Z.jsxs("div",{className:"rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended",children:[Z.jsx(tT,{language:e,languages:t,onChange:c}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:d,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})}),L&&Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button rqmii-chat-circle-button--call-start",onClick:f,disabled:g,"aria-label":$t(e,"startVoice"),children:g?Z.jsx(Sx,{className:"rqmii-chat-spin",size:20}):Z.jsx(r1,{size:20})})]});return i==="voice"?Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-call",lo(e)),style:D,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),U]}),Z.jsxs("div",{className:"rqmii-chat-voice-frame",children:[Z.jsx(co,{agent:s,size:"hero"}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),z]}),Z.jsx(Nc,{language:e,agent:s})]}):Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--conversation",lo(e)),style:D,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx(co,{agent:s,size:"header"}),U]}),Z.jsx(iT,{messages:a,language:e}),z,O&&Z.jsx(dS,{language:e,onSend:m}),Z.jsx(Nc,{language:e,agent:s})]})}function EP({agent:s,language:e,onClose:t}){const{streamingUrl:i,isCloudStreamConnected:a,cloudStreamError:c}=Yn.useRqmiiAvatar(),{isAvatarSpeaking:d}=Yn.useRqmiiAvatar(),{messages:f,sendTextMessage:m}=Yn.useRqmiiMessages();return Z.jsxs("div",{className:Jn("rqmii-avatar-panel",lo(e)),children:[Z.jsxs("div",{className:"rqmii-avatar-stream",children:[Z.jsx(Yn.RqmiiCloudAvatarPlayer,{autoConnect:!0,muted:!1}),!i&&Z.jsx("div",{className:"rqmii-avatar-overlay",children:$t(e,"loading")}),c&&Z.jsx("div",{className:"rqmii-avatar-overlay",children:$t(e,"connectionFailed")}),Z.jsxs("div",{className:"rqmii-avatar-controls",children:[Z.jsx(co,{agent:s,size:"header",active:d}),Z.jsx("div",{className:"rqmii-chat-header-spacer"}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",disabled:!a,children:Z.jsx(Mx,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,children:Z.jsx(s1,{size:20})})]})]}),s.useText&&Z.jsxs("div",{className:"rqmii-avatar-sidebar",children:[Z.jsx(iT,{messages:f,language:e}),Z.jsx(dS,{language:e,onSend:m,variant:"compact"}),Z.jsx(Nc,{language:e,agent:s})]})]})}function CP({language:s,config:e,onAccept:t,onDecline:i}){const a=e?.title?.[s]||$t(s,"consentTitle"),c=e?.body?.[s]||$t(s,"consentBody"),d=e?.acceptLabel?.[s]||$t(s,"consentAccept"),f=e?.declineLabel?.[s]||$t(s,"consentDecline"),m=e?.termsUrl?.[s],g=e?.privacyUrl?.[s];return Z.jsxs("div",{className:"rqmii-chat-panel rqmii-chat-panel--start",style:{justifyContent:"space-between"},children:[Z.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px",gap:"16px"},children:[Z.jsx("div",{style:{fontSize:"16px",fontWeight:600,color:"var(--rqmii-text)"},children:a}),Z.jsxs("div",{style:{fontSize:"13px",lineHeight:1.5,color:"var(--rqmii-muted)"},children:[c,(m||g)&&Z.jsxs("span",{children:[" ",m&&Z.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--rqmii-action)",textDecoration:"underline"},children:$t(s,"consentTermsLink")}),m&&g&&Z.jsxs("span",{children:[" ",$t(s,"close")?.toLowerCase()==="close"?"and":"و"," "]}),g&&Z.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--rqmii-action)",textDecoration:"underline"},children:$t(s,"consentPrivacyLink")}),"."]})]})]}),Z.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"12px",padding:"0 24px 24px"},children:[Z.jsx("button",{type:"button",className:"rqmii-chat-pill",onClick:i,style:{background:"transparent",border:"1px solid var(--rqmii-border)"},children:f}),Z.jsx("button",{type:"button",className:"rqmii-chat-pill",onClick:t,style:{background:"#fff",color:"#000"},children:d})]})]})}function T5(s){return s?typeof s=="string"?s:typeof s=="object"&&typeof s.text=="string"?s.text:"":""}function E5(s){return s==="text"||s==="voice"||s==="text_and_voice"}function rT({agent:s,language:e,languages:t,onLanguageChange:i=Ec,onEndSession:a=Ec,onMinimize:c,messages:d,onSendMessage:f,isPreview:m=!1,chatKind:g,sdk:v,renderPanel:M,messagesRef:x,initialText:S,autoStartVoice:w}){const[k,C]=pe.useState(!1),[T,D]=pe.useState(!1),[z,L]=pe.useState(!1),[O,U]=pe.useState(!1),[H,I]=pe.useState(!1),[F,V]=pe.useState(null),X=g||xx(s),K=r5(X==="voice"&&T||X==="text_and_voice"&&z),le=s5(),$=s.consent?.enabled&&!k&&!m,j=E5(X),Q=()=>C(!0),ne=()=>{c?c():a()},ce=lt=>{i(lt),m||v.changeSessionLanguage(lt)},ye=pe.useCallback(lt=>{if(V(null),I(!0),f){f(lt);return}v.sendTextMessage(lt)},[f,v]);pe.useEffect(()=>{x&&(x.current=v.messages)});const Te=pe.useRef(!1);if(pe.useEffect(()=>{Te.current||(S?(Te.current=!0,ye(S)):w&&(Te.current=!0,X==="voice"?D(!0):L(!0),v.isVoiceActive||v.startVoice()))},[]),pe.useEffect(()=>{H&&v.messages.length>0&&(I(!1),L(!0))},[H,v.messages]),pe.useEffect(()=>{H&&v.error&&(I(!1),V(v.error))},[H,v.error]),v.error&&!m&&z)return Z.jsx(bP,{message:v.error,language:e,onClose:a});if($)return Z.jsx(CP,{language:e,config:s.consent,onAccept:Q,onDecline:ne});const Fe={agent:s,language:e,languages:t,chatKind:X,sdk:v,isPreview:m,onLanguageChange:ce,onClose:a,onMinimize:j?()=>U(!0):void 0,onRestore:j?()=>U(!1):void 0,onSend:ye,voiceStarted:T,conversationStarted:z,isMinimized:O,elapsed:K,setVoiceStarted:D,setConversationStarted:L};return M?Z.jsx(Z.Fragment,{children:M(Fe)}):Z.jsx(C5,{...Fe,connecting:H,connectError:F,visualViewportHeight:le,onCloseWidget:c??a})}function C5({agent:s,language:e,languages:t,chatKind:i,sdk:a,onLanguageChange:c,onClose:d,onMinimize:f,onRestore:m,onSend:g,voiceStarted:v,conversationStarted:M,isMinimized:x,elapsed:S,setVoiceStarted:w,setConversationStarted:k,visualViewportHeight:C,connecting:T=!1,connectError:D=null,onCloseWidget:z}){const L=s.widget?.behavior?.typing_indicator_enabled??!0,O=i==="text"?a.waitingForResponse&&L:!1,U=a.messages;if(i==="avatar")return Z.jsx(EP,{agent:s,language:e,onClose:d});if(x)return Z.jsx(w5,{agent:s,language:e,onRestore:m,onClose:d,isListening:a.isVoiceActive,isAudioPlaying:a.isAudioPlaying,isSpeaking:a.vad.isSpeaking,onToggleVoice:a.toggleVoice,elapsed:S,visualViewportHeight:C,variant:i==="text"?"text":"voice"});if(i==="voice"&&v)return Z.jsx(M5,{agent:s,language:e,onEndSession:d,onMinimize:f,isListening:a.isVoiceActive,isLoading:a.vad.isLoading,isSpeaking:a.vad.isSpeaking,isAudioPlaying:a.isAudioPlaying,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,elapsed:S,visualViewportHeight:C});if(i==="voice")return Z.jsx(x5,{agent:s,language:e,languages:t,onLanguageChange:c,onClose:z,isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading,onStartVoice:()=>{w(!0),a.isVoiceActive||a.startVoice()},visualViewportHeight:C});if(!M&&a.messages.length===0&&!T){const H=s.conversation?.suggested_messages?.[e]?.filter(F=>F.trim())||void 0,I=F=>{i==="text_and_voice"?(k(!0),a.sendSuggestion?.(F)):g?.(F)};return Z.jsx(b5,{agent:s,language:e,languages:t,onLanguageChange:c,onClose:z,onSend:g,isVoiceEnabled:i==="text_and_voice",isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading,onStartVoice:()=>{k(!0),a.isVoiceActive||a.startVoice()},visualViewportHeight:C,disabled:T,error:D||void 0,suggestions:H,onSuggestionClick:I,compact:!!H})}return Z.jsx(S5,{agent:s,language:e,onEndSession:d,messages:U,partialTranscript:T5(a.partialTranscript),onSend:g,isAudioPlaying:a.isAudioPlaying,isVoiceEnabled:i==="text_and_voice",isListening:a.isVoiceActive,isSpeaking:a.vad.isSpeaking,isLoading:a.vad.isLoading,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,onStartVoice:a.startVoice,onMinimize:f,elapsed:S,visualViewportHeight:C,waitingForResponse:O})}const R5={isListening:!1,isLoading:!1,isSpeaking:!1,toggle:async()=>!1};function RP({isSessionReady:s,sendTextMessage:e,messages:t}){const[i,a]=pe.useState(null),[c,d]=pe.useState(null),f=pe.useCallback(()=>{a(m=>(m&&(s?e(m):d(m)),null))},[s,e]);return pe.useEffect(()=>{i&&t.length!==0&&f()},[t,i,f]),pe.useEffect(()=>{if(!i)return;const m=setTimeout(f,5e3);return()=>clearTimeout(m)},[i,f]),pe.useEffect(()=>{!c||!s||(e(c),d(null))},[s,c,e]),{pendingWelcomeText:i,pendingMessage:c,setPendingWelcomeText:a,setPendingMessage:d,sendPendingWelcomeText:f}}function sT({isSessionReady:s,signalClientReady:e}){const[t,i]=pe.useState(!1),a=pe.useRef(!1);return pe.useEffect(()=>{!s||a.current||!t||(a.current=!0,e(),i(!1))},[s,t,e]),{emitClientReady:pe.useCallback(()=>{s?(a.current=!0,e()):i(!0)},[s,e])}}const P5=300;function PP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,emitUserMessage:c,addLocalMessage:d,clearMessages:f}=Yn.useRqmiiMessages(),{changeSessionLanguage:m,clearSessionHistory:g,signalClientReady:v,error:M,isSessionReady:x,isAgentThinking:S,isAgentSpeaking:w}=Yn.useRqmiiConnection(),k=pe.useRef(!1),C=pe.useRef(null),T=pe.useRef(!1),[D,z]=pe.useState(!1),[L,O]=pe.useState(null),[U,H]=pe.useState(!1),I=pe.useRef(i.length);pe.useEffect(()=>{if(i.length>I.current){const $=i[i.length-1];$.role==="assistant"&&$.streaming&&H(!1)}I.current=i.length},[i]),pe.useEffect(()=>{if(!x||!D||T.current)return;const $=C.current;if($===null)return;T.current=!0,C.current=null,d("user",$),O(null),v();const j=setTimeout(()=>{c($),H(!0)},P5);return()=>clearTimeout(j)},[x,D,v,c,d]);const F=pe.useMemo(()=>L?[{id:"first-user",role:"user",text:L},...i]:i,[L,i]),V=pe.useCallback(()=>{O(null),f()},[f]),X={emitClientReady:v,sendMessage:$=>{a($)},queueForWelcome:Ec,enableVoice:Ec,disableVoice:Ec,language:s.language,isSessionReady:x,supportsVoice:!1,isVoiceActive:!1,chatKind:"text"},_=($,j)=>{s.onSessionStart?.(),k.current?(H(!0),j.sendMessage($)):(k.current=!0,O($),C.current=$,z(!0),H(!0))},K=$=>{s.onTextSend?s.onTextSend($,X):_($,X)},le={messages:F,sendTextMessage:K,clearMessages:V,clearSessionHistory:g,isAudioPlaying:!1,partialTranscript:null,changeSessionLanguage:m,error:M,isAgentThinking:S,isAgentSpeaking:w,isVoiceSetupLoading:!1,isVoiceActive:!1,vad:R5,startVoice:Ec,prepareVoice:Ec,toggleVoice:Ec,signalClientReady:v,waitingForResponse:U,sendSuggestion:K};return Z.jsx(rT,{...t,isPreview:e,chatKind:"text",sdk:le})}function kP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,clearMessages:c}=Yn.useRqmiiMessages(),{isAudioPlaying:d,partialTranscript:f}=Yn.useRqmiiVoice(),{changeSessionLanguage:m,clearSessionHistory:g,signalClientReady:v,error:M,isSessionReady:x,isAgentThinking:S,isAgentSpeaking:w}=Yn.useRqmiiConnection(),{setPendingWelcomeText:k,setPendingMessage:C}=RP({isSessionReady:x,sendTextMessage:a,messages:i}),{emitClientReady:T}=sT({isSessionReady:x,signalClientReady:v}),[D,z]=pe.useState(!1),L=Yn.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:O,isListening:U,toggle:H}=L,I=O,F=U||D;pe.useEffect(()=>{!D||!x||O||U||H()},[D,x,O,U,H]);const V=()=>{s.onSessionStart?.()},X={emitClientReady:T,sendMessage:Q=>{x?a(Q):C(Q)},queueForWelcome:Q=>k(Q),enableVoice:()=>z(!0),disableVoice:()=>{z(!1),U&&H()},language:s.language,isSessionReady:x,supportsVoice:!0,isVoiceActive:F,chatKind:"voice"},_=Q=>{V(),Q.enableVoice(),Q.emitClientReady()},K=Q=>{Q.isVoiceActive?Q.disableVoice():Q.enableVoice()},j={messages:i,sendTextMessage:()=>{},clearMessages:c,clearSessionHistory:g,isAudioPlaying:d,partialTranscript:f,changeSessionLanguage:m,error:M,isAgentThinking:S,isAgentSpeaking:w,isVoiceSetupLoading:I,isVoiceActive:F,vad:L,startVoice:()=>{s.onVoiceStart?s.onVoiceStart(X):_(X)},prepareVoice:()=>{},toggleVoice:()=>{s.onVoiceToggle?s.onVoiceToggle(X):K(X)},signalClientReady:v};return Z.jsx(rT,{...t,isPreview:e,chatKind:"voice",sdk:j})}const k5=300;function DP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,emitUserMessage:c,addLocalMessage:d,clearMessages:f}=Yn.useRqmiiMessages(),{isAudioPlaying:m,partialTranscript:g}=Yn.useRqmiiVoice(),{changeSessionLanguage:v,clearSessionHistory:M,signalClientReady:x,error:S,isSessionReady:w,isAgentThinking:k,isAgentSpeaking:C}=Yn.useRqmiiConnection(),{emitClientReady:T}=sT({isSessionReady:w,signalClientReady:x}),[D,z]=pe.useState(!1),L=pe.useRef(null),[O,U]=pe.useState(!1),H=pe.useRef(null),[I,F]=pe.useState(!1),V=pe.useRef(!1),X=pe.useRef(!1),_=pe.useRef(!1),[K,le]=pe.useState(null),[$,j]=pe.useState(!1),Q=pe.useRef(i.length);pe.useEffect(()=>{if(i.length>Q.current){const xe=i[i.length-1];xe.role==="assistant"&&xe.streaming&&j(!1)}Q.current=i.length},[i]);const ne=Yn.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:ce,isListening:ye,toggle:Te}=ne,Fe=ce,lt=ye||D;pe.useEffect(()=>{!D||!w||ce||ye||Te()},[D,w,ce,ye,Te]),pe.useEffect(()=>{if(!w||!O||_.current)return;const xe=L.current;if(xe===null)return;_.current=!0,L.current=null,d("user",xe),le(null),x();const Ue=setTimeout(()=>{c(xe),j(!0)},k5);return()=>clearTimeout(Ue)},[w,O,x,c,d]),pe.useEffect(()=>{if(!w||!I||V.current)return;const xe=H.current;xe!==null&&(V.current=!0,H.current=null,d("user",xe),c(xe),j(!0),F(!1))},[w,I,c,d]);const ht=pe.useMemo(()=>K?[{id:"first-user",role:"user",text:K},...i]:i,[K,i]),ct=pe.useCallback(()=>{le(null),f()},[f]),Pe=()=>{s.onSessionStart?.()},Xe={emitClientReady:T,sendMessage:xe=>{a(xe)},queueForWelcome:()=>{},enableVoice:()=>z(!0),disableVoice:()=>{z(!1),ye&&Te()},language:s.language,isSessionReady:w,supportsVoice:!0,isVoiceActive:lt,chatKind:"text_and_voice"},He=(xe,Ue)=>{Pe(),X.current?(j(!0),Ue.sendMessage(xe)):(X.current=!0,s.onStartText?.(),le(xe),L.current=xe,U(!0),j(!0))},pt=xe=>{Pe(),s.onStartVoice?.(),xe.enableVoice(),xe.emitClientReady()},Nt=xe=>{xe.isVoiceActive?xe.disableVoice():xe.enableVoice()},Be={messages:ht,sendTextMessage:xe=>{s.onTextSend?s.onTextSend(xe,Xe):He(xe,Xe)},clearMessages:ct,clearSessionHistory:M,isAudioPlaying:m,partialTranscript:g,changeSessionLanguage:v,error:S,isAgentThinking:k,isAgentSpeaking:C,isVoiceSetupLoading:Fe,isVoiceActive:lt,vad:ne,startVoice:()=>{s.onVoiceStart?s.onVoiceStart(Xe):pt(Xe)},prepareVoice:()=>{},toggleVoice:()=>{s.onVoiceToggle?s.onVoiceToggle(Xe):Nt(Xe)},signalClientReady:x,waitingForResponse:$,sendSuggestion:xe=>{Pe(),X.current=!0,z(!0),H.current=xe,F(!0)}};return Z.jsx(rT,{...t,isPreview:e,chatKind:s.textOnly?"text":"text_and_voice",sdk:Be})}function LP(s){const{isPreview:e=!1,agent:t,language:i,languages:a,onLanguageChange:c,onEndSession:d,onMinimize:f,messages:m,onSendMessage:g}=s,v=d||f||Ec,{messages:M,sendTextMessage:x,clearMessages:S}=Yn.useRqmiiMessages(),{changeSessionLanguage:w,clearSessionHistory:k,signalClientReady:C,error:T,isSessionReady:D,isAgentThinking:z,isAgentSpeaking:L}=Yn.useRqmiiConnection();return RP({isSessionReady:D,sendTextMessage:x,messages:M}),sT({isSessionReady:D,signalClientReady:C}),T&&!e?Z.jsx(bP,{message:T,language:i,onClose:v}):Z.jsx(EP,{agent:t,language:i,onClose:v})}function D5({agent:s,defaultOpen:e=!1,className:t="",preview:i=!1,ChatBoxComponent:a}){const[c,d]=pe.useState(e),[f,m]=pe.useState(s.defaultLanguage),g=pe.useMemo(()=>zm(s.languages,s.defaultLanguage),[s.defaultLanguage,s.languages]);return pe.useEffect(()=>{m(s.defaultLanguage)},[s.defaultLanguage]),Z.jsxs("div",{className:Jn("rqmii-chat-surface",i&&"is-preview",t),children:[!c&&Z.jsx(nT,{agent:s,onClick:()=>d(!0),position:i?"static":"fixed"}),c&&Z.jsx(a,{agent:s,language:f,languages:g,onLanguageChange:m,onClose:()=>d(!1),isPreview:i})]})}function L5({restUrl:s,identifier:e,fallbackAgent:t,withCredentials:i=!1,children:a,onError:c}){const[d,f]=pe.useState(()=>t?Of(t):null),[m,g]=pe.useState(null);return pe.useEffect(()=>{t&&(f(Of(t)),g(null))},[t]),pe.useEffect(()=>{if(!e||t)return;const v=new AbortController;return g(null),_2({restUrl:s,identifier:e,withCredentials:i,signal:v.signal}).then(f).catch(M=>{v.signal.aborted||(g(M),c?.(M))}),()=>v.abort()},[t,e,c,s,i]),m?Z.jsx("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:m.message||"Could not load agent"}):d?Z.jsx(Z.Fragment,{children:a(d)}):Z.jsx("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:"Loading"})}function t1({agent:s,language:e,languages:t,onLanguageChange:i,onEndSession:a,onMinimize:c,onStartText:d,onStartVoice:f,textOnly:m,messages:g,onSendMessage:v,isPreview:M,onSessionStart:x,initialText:S,autoStartVoice:w}){const k=xx(s),C={agent:s,language:e,languages:t,onLanguageChange:i,onEndSession:a,onMinimize:c,messages:g,onSendMessage:v,isPreview:M,onSessionStart:x,initialText:S,autoStartVoice:w};switch(k){case"avatar":return Z.jsx(LP,{...C});case"voice":return Z.jsx(kP,{...C});case"text_and_voice":return Z.jsx(DP,{...C,onStartText:d,onStartVoice:f,textOnly:m});case"text":default:return Z.jsx(PP,{...C})}}function I5({agent:s,language:e,languages:t,startMode:i,directive:a,open:c,onOpen:d,onLanguageChange:f,onMinimize:m,onStartNewSession:g,onSessionStart:v,onStartText:M,onStartVoice:x}){const{connectionState:S,isConnected:w,isSessionTerminated:k,creditExhausted:C,session:T,endSession:D,submitFeedback:z,interrupt:L}=Yn.useRqmiiConnection(),{messages:O}=Yn.useRqmiiMessages(),U=pe.useRef(!1),H=pe.useRef(null),[I,F]=pe.useState(null),[V,X]=pe.useState(0),[_,K]=pe.useState(!1),[le,$]=pe.useState(!1),[j,Q]=pe.useState(!1);pe.useEffect(()=>{w&&(U.current=!0)},[w]),pe.useEffect(()=>{if(I)return;let ct=null;k||S==="ended"?ct=H.current==="user"?"user_ended":"terminated":S==="failed"?C?ct="credits_exhausted":U.current?ct="connection_lost":ct="failed":C&&(ct="credits_exhausted"),ct&&F({sessionId:T.sessionId,endedBy:H.current??"agent",reason:ct})},[k,S,C,T.sessionId,I]);const ne=()=>{H.current="user",L(),D()},ce=I?.sessionId??null,ye=ct=>{_||(X(ct),ce&&z({sessionId:ce,rating:ct,endedBy:I?.endedBy}).catch(()=>{}),j||(Q(!0),$(!0)))},Te=async ct=>{if(ce)try{await z({sessionId:ce,feedback:ct,endedBy:I?.endedBy})}catch{}K(!0),$(!1)};if(!c)return Z.jsx(nT,{agent:s,onClick:d,active:S==="connected"});const Fe=xx(s),lt=s.agentType==="cloud_avatar"||s.agentType==="desktop_avatar",ht=i==="text";return lt?Z.jsx(t1,{agent:s,language:e,languages:t,onLanguageChange:f,onEndSession:ne,onMinimize:m,onSessionStart:v,onStartText:M,onStartVoice:x,textOnly:ht}):I?le&&ce?Z.jsx(MP,{agent:s,language:e,rating:V,onBack:()=>$(!1),onMinimize:m,onSubmit:Te}):Z.jsx(TP,{agent:s,language:e,languages:t,chatKind:Fe==="avatar"?"text":Fe,messages:O,onLanguageChange:f,onMinimize:m,onStartNewVoice:()=>g("voice"),onStartNewText:ct=>g("text",ct),rating:V,endedBy:I.endedBy,sessionId:ce,ratingInteractive:!_,showTellUsMore:j&&!_,onRate:ye,onTellUsMore:()=>$(!0)}):Z.jsx(t1,{agent:s,language:e,languages:t,onLanguageChange:f,onEndSession:ne,onMinimize:m,onSessionStart:v,onStartText:M,onStartVoice:x,textOnly:ht,initialText:a?.mode==="text"?a.text:void 0,autoStartVoice:a?.mode==="voice"})}function N5({wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:c,language:d,defaultOpen:f=!1,className:m="",pcmOptions:g,debug:v=!1,withCredentials:M=!1,onError:x,onInitialized:S,config:w,clientTools:k}){if([!!t,!!i,!!a].filter(Boolean).length>1)throw new Error("RqmiiAgentChat: only one of publicChatId, apiKey, or agentId may be provided");const T=t||i||a;return Z.jsx(L5,{restUrl:e,identifier:T,fallbackAgent:c,withCredentials:M,onError:x,children:D=>Z.jsx(z5,{wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:D,language:d,defaultOpen:f,className:m,pcmOptions:g,debug:v,withCredentials:M,onError:x,onInitialized:S,config:w,clientTools:k})})}function z5({wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:c,language:d,defaultOpen:f,className:m,pcmOptions:g,debug:v,withCredentials:M,onError:x,onInitialized:S,config:w,clientTools:k}){const[C,T]=pe.useState(f),[D,z]=pe.useState(!1),[L,O]=pe.useState(d||c.defaultLanguage),[U,H]=pe.useState("idle"),[I,F]=pe.useState(0),[V,X]=pe.useState(null),[_,K]=pe.useState(!1),le=c.agentType==="cloud_avatar"||c.agentType==="desktop_avatar",$=le,j=c.widget?.behavior,Q=c.welcomeMessages?.[L]||c.welcomeMessages?.[c.defaultLanguage]||"",ne=!C&&!_&&!$&&!!j?.welcome_bubble_enabled&&!!Q.trim(),ce=pe.useMemo(()=>zm(c.languages,c.defaultLanguage),[c.defaultLanguage,c.languages]),ye=pe.useMemo(()=>U==="text"?{...w??{},use_voice:!1,use_text:!0}:w,[w,U]),Te=pe.useMemo(()=>lD(c,ye),[c,ye]),Fe=!$&&Te.useVoice,lt=le?C:D,ht=pe.useMemo(()=>({...t?{publicChatId:t}:{},...i?{apiKey:i}:{},...a?{agentId:a}:{},language:L,config:ye}),[a,i,t,L,ye]),ct=pe.useRef(null),Pe=pe.useRef(!1),Xe=pe.useRef(I),He=Xe.current!==I;Xe.current=I,D&&(!Pe.current||He)&&(ct.current=ht),Pe.current=D,D||(ct.current=null);const pt=D&&ct.current?ct.current:ht;pe.useEffect(()=>{O(d||c.defaultLanguage)},[c.defaultLanguage,d]);const Nt=pe.useMemo(()=>x?xe=>{H("idle"),x(xe)}:xe=>{H("idle")},[x]),nt=()=>{H("text"),z(!0)},sn=()=>{H("voice"),z(!0)},Dt=()=>{T(!1)},Be=(xe,Ue)=>{X(xe==="text"?{mode:"text",text:Ue??""}:{mode:"voice"}),H(xe),z(!0),F(qe=>qe+1)};return Z.jsx(Yn.RqmiiAgentRoom,{wsUrl:s,restUrl:e,session:pt,connect:lt,enableAudio:Fe,pcmOptions:g,debug:v,withCredentials:M,onError:Nt,onInitialized:S,clientTools:k,children:Z.jsxs("div",{className:Jn("rqmii-chat-surface",c.widget?.appearance?.position==="left"&&"rqmii-position-left",m),children:[ne&&Z.jsx(c5,{message:Q,delaySeconds:j?.welcome_bubble_delay_seconds??3,soundEnabled:!!j?.welcome_bubble_sound_enabled,language:L,buttonPosition:c.widget?.appearance?.position==="left"?"left":"right",onClick:()=>K(!0)}),Z.jsx(I5,{agent:c,language:L,languages:ce,startMode:U,directive:V,open:C,onOpen:()=>{T(!0),K(!0)},onLanguageChange:O,onMinimize:Dt,onStartNewSession:Be,onSessionStart:()=>z(!0),onStartText:nt,onStartVoice:sn})]})},I)}function B5({agent:s,language:e,open:t=!0,className:i="",messages:a,onSendMessage:c,onClose:d}){const f=pe.useMemo(()=>Of(s),[s]),[m,g]=pe.useState(t),[v,M]=pe.useState(e||f.defaultLanguage),x=pe.useMemo(()=>zm(f.languages,f.defaultLanguage),[f.defaultLanguage,f.languages]);return pe.useEffect(()=>{e&&M(e)},[e]),pe.useEffect(()=>{g(t)},[t]),Z.jsx(Yn.RqmiiAgentProvider,{wsUrl:"",restUrl:"",enableAudio:!1,children:Z.jsx("div",{className:Jn("rqmii-chat-surface is-preview",i),children:m?Z.jsx(t1,{agent:f,language:v,languages:x,onLanguageChange:M,onEndSession:()=>{g(!1),d?.()},messages:a,onSendMessage:c,isPreview:!0}):null})})}exports.EpicPixelStreamingPlayer=Yn.EpicPixelStreamingPlayer;exports.RqmiiAgentRoom=Yn.RqmiiAgentRoom;exports.RqmiiCloudAvatarPlayer=Yn.RqmiiCloudAvatarPlayer;exports.ConsentDialog=CP;exports.EndedChatPanel=TP;exports.FeedbackPanel=MP;exports.RQMII_BUILTIN_FACES=Rw;exports.RQMII_CHAT_LANGUAGES=Cb;exports.RQMII_CHAT_LANGUAGE_VALUES=Ew;exports.RatingBar=SP;exports.RqmiiAgentAvatar=co;exports.RqmiiAgentChat=N5;exports.RqmiiAgentChatPreview=B5;exports.RqmiiAvatarChatBox=LP;exports.RqmiiChatFooter=Nc;exports.RqmiiChatOpenButton=nT;exports.RqmiiChatSurface=D5;exports.RqmiiTextAndVoiceChatBox=DP;exports.RqmiiTextChatBox=PP;exports.RqmiiVoiceChatBox=kP;exports.fetchAgentConfig=oD;exports.fetchAgentCustomization=_2;exports.fetchPublicAgent=aD;exports.getBuiltinFace=t3;exports.getChatLanguage=Cw;exports.getChatText=$t;exports.normalizeChatLanguages=zm;exports.normalizePublicAgent=Of;exports.resolveChatKind=xx;
|
|
4621
|
+
`,Ec=()=>{};function Jn(...s){return s.filter(Boolean).join(" ")}function lo(s){return["ar","fa","ur","he"].includes(s)?"rqmii-chat-font-ar":"rqmii-chat-font-latin"}function J2(s){return s==="ar"?"rqmii-chat-font-ar":"rqmii-chat-font-latin"}function Zu(s){return["ar","fa","ur","he"].includes(s)?"rtl":"ltr"}function eT(s){const e=Math.floor(s/60).toString().padStart(2,"0"),t=(s%60).toString().padStart(2,"0");return`${e}:${t}`}function r5(s=!0){const[e,t]=pe.useState(0);return pe.useEffect(()=>{if(!s)return;const i=setInterval(()=>t(a=>a+1),1e3);return()=>clearInterval(i)},[s]),e}function s5(){const[s,e]=pe.useState(null);return pe.useEffect(()=>{const t=window.visualViewport;if(!t)return;const i=()=>e(t.height);return i(),t.addEventListener("resize",i),t.addEventListener("scroll",i),()=>{t.removeEventListener("resize",i),t.removeEventListener("scroll",i)}},[]),s}function a5(s,e){const t=pe.useRef([]);t.current=s.match(/\S+\s*/g)||[s];const[i,a]=pe.useState(()=>e?Math.min(1,t.current.length):t.current.length);return pe.useEffect(()=>{if(!e||!s){a(t.current.length);return}if(a(d=>Math.max(1,d)),t.current.length<=1)return;const c=setInterval(()=>{a(d=>d>=t.current.length?(clearInterval(c),d):d+1)},50);return()=>clearInterval(c)},[s,e]),t.current.slice(0,i).join("")}function o5(s){return s?.faceIndex===0&&s.faceImageUrl?s.faceImageUrl:s?.faceIndex===9?null:t3(s?.faceIndex||1)}function tT({language:s,languages:e,onChange:t}){const[i,a]=pe.useState(!1),c=pe.useRef(null),d=Cw(s),f=zm(e,s).map(m=>Cw(m)).filter(Boolean);return pe.useEffect(()=>{if(!i)return;const m=g=>{c.current?.contains(g.target)||a(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[i]),Z.jsxs("div",{className:"rqmii-chat-language",ref:c,children:[Z.jsxs("button",{type:"button",className:Jn("rqmii-chat-pill",J2(s)),onClick:()=>a(m=>!m),children:[Z.jsx("span",{children:d?.label||s}),Z.jsx(e3,{size:16})]}),i&&f.length>1&&Z.jsx("div",{className:"rqmii-chat-language-menu",children:f.map(m=>Z.jsx("button",{type:"button",className:Jn("rqmii-chat-language-item",J2(m.value),m.value===s&&"is-selected"),onClick:()=>{t(m.value),a(!1)},children:m.label},m.value))})]})}function Nc({language:s="en",brand:e="rqmii",agent:t}){const i=t?.widget?.appearance,a=i?.show_branding!==!1,c=i?.footer_content?.[s],d=!!c?.trim();return!a&&!d?Z.jsx("div",{style:{padding:11}}):Z.jsxs("div",{className:"rqmii-chat-footer",children:[a&&Z.jsxs("p",{children:["Powered by ",Z.jsx("strong",{children:e})]}),d&&Z.jsx("p",{children:c})]})}function co({agent:s,size:e="large",active:t=!1,className:i=""}){const a=o5(s),c=s?.faceIndex===9,[d,f]=pe.useState(!a);return Z.jsx("div",{className:Jn("rqmii-agent-avatar",`rqmii-agent-avatar--${e}`,t&&"is-active",c&&"is-orb",i),children:c?Z.jsx($V,{className:"rqmii-agent-avatar-orb"}):a?Z.jsx("img",{src:a,alt:s?.name||"Agent",style:{opacity:d?1:0,transition:"opacity 200ms ease"},onLoad:()=>f(!0)}):null})}function nT({agent:s,onClick:e,className:t="",position:i="fixed",active:a=!1}){return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-open-button",i==="fixed"&&"is-fixed",t),onClick:e,"aria-label":"Open chat",children:Z.jsx(co,{agent:s,size:"button",active:a})})}function l5(){try{const s=window.AudioContext||window.webkitAudioContext;if(!s)return;const e=new s,t=e.currentTime,i=e.createOscillator(),a=e.createGain();i.type="sine",i.frequency.setValueAtTime(880,t),i.frequency.setValueAtTime(1180,t+.12),a.gain.setValueAtTime(1e-4,t),a.gain.exponentialRampToValueAtTime(.18,t+.02),a.gain.exponentialRampToValueAtTime(1e-4,t+.32),i.connect(a),a.connect(e.destination),i.start(t),i.stop(t+.34),i.onended=()=>{e.close()}}catch{}}function c5({message:s,delaySeconds:e,soundEnabled:t,language:i,buttonPosition:a="right",onClick:c}){const[d,f]=pe.useState(!1),m=s.trim();if(pe.useEffect(()=>{if(!m)return;const v=setTimeout(()=>{f(!0),t&&l5()},Math.max(0,e)*1e3);return()=>clearTimeout(v)},[m,e,t]),!d||!m)return null;const g=a==="right"?"is-right":"is-left";return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-welcome-bubble",g,lo(i)),dir:Zu(i),onClick:c,"aria-label":m,children:m})}function dS({language:s,placeholder:e,onSend:t,disabled:i=!1,variant:a="text"}){const[c,d]=pe.useState(""),f=pe.useRef(null),m=168,g=()=>{const v=c.trim();!v||i||(t(v),d(""),f.current&&(f.current.style.height="auto"))};return Z.jsxs("div",{className:Jn("rqmii-chat-input",lo(s),a==="voice"&&"is-voice"),children:[Z.jsx("textarea",{ref:f,value:c,disabled:i,rows:a==="compact"?2:3,dir:Zu(s),placeholder:e||$t(s,"sendMessage"),onChange:v=>{d(v.target.value);const M=f.current;M&&(M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,m)}px`)},onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),g())}}),Z.jsx("button",{type:"button",onClick:g,disabled:!c.trim()||i,"aria-label":$t(s,"send"),children:Z.jsx(gD,{size:20})})]})}function u5({text:s,streaming:e}){const t=a5(s,e);return Z.jsx(Z.Fragment,{children:t})}const e1=133,d5=e1+44,f5=767,QA=36,h5=8,Q2=QA+h5;function p5(){return typeof window>"u"?e1:window.innerWidth<=f5?d5:e1}function m5(s){return s==="rtl"?"right":"left"}function g5(s,e,t,i){if(!s.length)return null;const a=Math.max(...s.map(d=>d.offsetTop)),c=s.filter(d=>d.offsetTop>=a-.5);return t==="right"?c.find(d=>d.offsetLeft+d.offsetWidth>e-i)||null:c.find(d=>d.offsetLeft<i)||null}function Z2(s,e,t,i){for(let a=0;a<2;a++){const c=g5(s,e,t,i);if(!c)break;t==="right"?c.style.marginRight=`${i}px`:c.style.marginLeft=`${i}px`,c.style.maxWidth=`calc(100% - ${i}px)`}}function A5({suggestions:s,language:e,onClick:t}){const[i,a]=pe.useState(!1),[c,d]=pe.useState(!1),[f,m]=pe.useState(null),[g,v]=pe.useState(null),M=pe.useRef(null),x=pe.useRef([]),S=Zu(e||"en"),w=m5(S),k=C=>{C.forEach(T=>{T&&(T.style.maxWidth="",T.style.marginRight="",T.style.marginLeft="")})};return pe.useLayoutEffect(()=>{const C=M.current;if(!C||i)return;const T=()=>{const z=x.current;k(z);const L=C.clientWidth,O=p5(),U=()=>{for(let I=0;I<z.length;I++){const F=z[I];if(F&&F.offsetTop+F.offsetHeight>O+.5)return I}return null};let H=U();if(H!==null)for(let I=0;I<=z.length;I++){k(z);const F=z.slice(0,H).filter(X=>!!X);Z2(F,L,w,Q2);const V=U();if(V===null||V>=H)break;H=V}if(m(H),d(H!==null),H!==null){const I=z.slice(0,H).filter(V=>!!V),F=I.length?Math.max(...I.map(V=>V.offsetTop+V.offsetHeight)):QA;v(F-QA)}else v(null)};T();const D=typeof ResizeObserver<"u"?new ResizeObserver(T):null;return D?.observe(C),()=>{D?.disconnect(),k(x.current)}},[s,i,w]),pe.useLayoutEffect(()=>{const C=M.current;if(!C||!i)return;const T=x.current.filter(z=>!!z);k(x.current),Z2(T,C.clientWidth,w,Q2);const D=T.length?Math.max(...T.map(z=>z.offsetTop+z.offsetHeight)):QA;return v(D-QA),()=>{k(x.current)}},[i,s,w]),s.length?Z.jsx("div",{className:Jn("rqmii-suggested-messages",i&&"is-expanded",c&&"has-overflow"),dir:S,children:Z.jsxs("div",{ref:M,className:Jn("rqmii-suggested-messages-inner",i?"is-expanded":"is-collapsed"),children:[s.map((C,T)=>{const D=!i&&f!==null&&T>=f;return Z.jsx("button",{ref:z=>{x.current[T]=z},type:"button",className:"rqmii-suggested-message",onClick:()=>t(C),style:D?{visibility:"hidden"}:void 0,"aria-hidden":D||void 0,tabIndex:D?-1:void 0,children:C},T)}),c&&Z.jsx("button",{type:"button",className:Jn("rqmii-suggested-messages-toggle",w==="left"&&"is-start-left"),style:g!=null?{top:g,bottom:"auto"}:void 0,onClick:()=>a(C=>(C&&M.current&&(M.current.scrollTop=0),!C)),"aria-label":i?"Show less":"Show more","aria-expanded":i,children:i?Z.jsx(xD,{size:14}):Z.jsx(e3,{size:14})})]})}):null}function v5({language:s}){const e=Zu(s||"en");return Z.jsx("div",{className:"rqmii-chat-message-row",children:Z.jsxs("div",{className:"rqmii-chat-message rqmii-chat-typing-indicator",dir:e,children:[Z.jsx("span",{className:"rqmii-chat-typing-dot"}),Z.jsx("span",{className:"rqmii-chat-typing-dot"}),Z.jsx("span",{className:"rqmii-chat-typing-dot"})]})})}function iT({messages:s,partialTranscript:e,language:t,showTypingIndicator:i}){const a=pe.useRef(null),c=Zu(t||"en"),d=pe.useRef(s.length);return pe.useEffect(()=>{if(!a.current)return;const f=s.length!==d.current;d.current=s.length,a.current.scrollIntoView({behavior:f?"smooth":"instant",block:"end"})},[s,e]),Z.jsxs("div",{className:"rqmii-chat-messages",children:[s.map(f=>{const m=f.role==="user"||f.sender==="user";return Z.jsx("div",{className:Jn("rqmii-chat-message-row",m&&"is-user"),children:Z.jsx("div",{className:"rqmii-chat-message",dir:c,children:Z.jsx(u5,{text:f.text,streaming:f.streaming})})},f.id||`${f.role}-${f.text}`)}),i&&Z.jsx(v5,{language:t}),e&&Z.jsx("div",{className:"rqmii-chat-message-row is-user is-partial",children:Z.jsx("div",{className:"rqmii-chat-message",dir:c,children:e})}),Z.jsx("div",{ref:a})]})}function bP({message:s,onRetry:e,onClose:t,language:i="en"}){return Z.jsxs("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:[t&&Z.jsx("button",{type:"button",className:"rqmii-error-close",onClick:t,children:"×"}),Z.jsx("p",{children:s||$t(i,"connectionFailed")}),e&&Z.jsxs("button",{type:"button",className:"rqmii-chat-retry",onClick:e,children:[Z.jsx(DD,{size:16}),Z.jsx("span",{children:$t(i,"retry")})]})]})}const y5=5;function xP({rating:s,onRate:e,readonly:t,size:i=28}){const[a,c]=pe.useState(0),d=a||s;return Z.jsx("div",{className:"rqmii-chat-rating-stars",role:"radiogroup",children:Array.from({length:y5},(f,m)=>{const g=m+1,v=g<=d;return Z.jsx("button",{type:"button",className:Jn("rqmii-chat-star",v&&"is-filled",t&&"is-readonly"),disabled:t,"aria-label":`${g}`,"aria-checked":g===s,role:"radio",onMouseEnter:()=>!t&&c(g),onMouseLeave:()=>!t&&c(0),onClick:()=>!t&&e?.(g),children:Z.jsx(ID,{size:i,fill:v?"currentColor":"none"})},g)})})}function SP({language:s,rating:e,endedBy:t,sessionId:i,interactive:a,showTellUsMore:c,onRate:d,onTellUsMore:f}){const m=e>0?$t(s,"ratingThankYou"):$t(s,"ratingQuestion"),g=t==="user"?$t(s,"youEnded"):$t(s,"agentEnded");return Z.jsxs("div",{className:Jn("rqmii-chat-rating",lo(s)),dir:Zu(s),children:[Z.jsx("div",{className:"rqmii-chat-rating-header",children:m}),Z.jsx(xP,{rating:e,onRate:d,readonly:!a}),c&&Z.jsx("button",{type:"button",className:"rqmii-chat-rating-more",onClick:f,children:$t(s,"tellUsMore")}),Z.jsxs("div",{className:"rqmii-chat-rating-meta",children:[Z.jsx("div",{children:g}),i&&Z.jsxs("div",{children:[$t(s,"sessionIdLabel")," ",Z.jsx("span",{className:"rqmii-chat-font-latin",children:i})]})]})]})}function MP({agent:s,language:e,rating:t,onBack:i,onMinimize:a,onSubmit:c}){const[d,f]=pe.useState(""),[m,g]=pe.useState(!1),v=d.trim().length>0&&!m,M=async()=>{if(v){g(!0);try{await c(d.trim())}finally{g(!1)}}};return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--feedback",lo(e)),dir:Zu(e),children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":"Back",children:Z.jsx(vD,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})})]}),Z.jsxs("div",{className:"rqmii-chat-feedback-body",children:[Z.jsx(co,{agent:s,size:"hero"}),Z.jsx(xP,{rating:t,readonly:!0}),Z.jsx("div",{className:"rqmii-chat-feedback-title",children:$t(e,"ratingThankYou")}),Z.jsx("div",{className:"rqmii-chat-feedback-subtitle",children:$t(e,"feedbackSubtitle")}),Z.jsx("textarea",{className:"rqmii-chat-feedback-input",value:d,dir:Zu(e),placeholder:$t(e,"feedbackPlaceholder"),onChange:x=>f(x.target.value)}),Z.jsx("div",{className:"rqmii-chat-feedback-actions",children:Z.jsx("button",{type:"button",className:"rqmii-chat-feedback-submit",onClick:M,disabled:!v,children:m?Z.jsx(Sx,{className:"rqmii-chat-spin",size:18}):$t(e,"submit")})})]}),Z.jsx(Nc,{language:e,agent:s})]})}function Wm(s){if(!(s==null||typeof window>"u"||window.innerWidth>=768))return{top:`${window.innerHeight-s}px`,bottom:0}}function b5({agent:s,language:e,languages:t,onLanguageChange:i,onClose:a,onSend:c,isVoiceEnabled:d=!1,isAudioPlaying:f=!1,isVoiceSetupLoading:m=!1,onStartVoice:g,visualViewportHeight:v,disabled:M=!1,error:x,suggestions:S,onSuggestionClick:w,compact:k=!1}){const C=Wm(v),T=k?"start":"hero",D=S&&S.length>0;return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--start",k&&"rqmii-chat-panel--start-compact",lo(e)),style:C,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),Z.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[Z.jsx(tT,{language:e,languages:t,onChange:i}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:Z.jsx(s1,{size:20})})]})]}),Z.jsxs("div",{className:"rqmii-chat-start-body",children:[d?Z.jsxs("div",{className:Jn("rqmii-chat-call-avatar-wrap",k&&"is-compact"),children:[Z.jsx(co,{agent:s,size:T,active:f}),Z.jsx("button",{type:"button",className:Jn("rqmii-chat-call-button",k&&"is-compact"),onClick:g,disabled:m,"aria-label":$t(e,"startVoice"),children:m?Z.jsx(Sx,{className:"rqmii-chat-spin",size:k?18:24}):Z.jsx(r1,{size:k?18:24})})]}):Z.jsx(co,{agent:s,size:T}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),x&&Z.jsx("div",{className:"rqmii-chat-error-text",children:x})]}),D&&Z.jsx("div",{className:"rqmii-chat-start-suggestions",children:Z.jsx(A5,{suggestions:S,language:e,onClick:z=>w?.(z)})}),Z.jsx(dS,{language:e,onSend:c,disabled:M}),Z.jsx(Nc,{language:e,agent:s})]})}function x5({agent:s,language:e,languages:t,onLanguageChange:i,onClose:a,onStartVoice:c,isVoiceSetupLoading:d=!1,isAudioPlaying:f,visualViewportHeight:m}){const g=Wm(m);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-start",lo(e)),style:g,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),Z.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[Z.jsx(tT,{language:e,languages:t,onChange:i}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:Z.jsx(s1,{size:20})})]})]}),Z.jsxs("div",{className:"rqmii-chat-call-body",children:[Z.jsxs("div",{className:"rqmii-chat-call-avatar-wrap",children:[Z.jsx(co,{agent:s,size:"hero",active:f}),Z.jsx("button",{type:"button",className:"rqmii-chat-call-button",onClick:c,disabled:d,"aria-label":$t(e,"startVoice"),children:d?Z.jsx(Sx,{className:"rqmii-chat-spin",size:24}):Z.jsx(r1,{size:24})})]}),Z.jsxs("div",{className:"rqmii-chat-agent-name",children:[$t(e,"call")," ",s.name]})]}),Z.jsx(Nc,{language:e,agent:s})]})}function S5({agent:s,language:e,onEndSession:t,onMinimize:i,messages:a,partialTranscript:c,onSend:d,isAudioPlaying:f,isVoiceEnabled:m,onToggleVoice:g,isListening:v,isSpeaking:M,isLoading:x,isAgentThinking:S,isAgentSpeaking:w,onStartVoice:k,elapsed:C,visualViewportHeight:T,waitingForResponse:D}){const z=wP({language:e,isListening:v,isLoading:x,isSpeaking:M,isAudioPlaying:f,isAgentThinking:S,isAgentSpeaking:w,persistentListening:!1}),L=Wm(T);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--conversation",lo(e)),style:L,children:[Z.jsxs("div",{className:"rqmii-chat-header",children:[Z.jsx(co,{agent:s,size:"header",active:f}),m&&z&&Z.jsx("div",{className:"rqmii-chat-header-status",children:Z.jsx("span",{children:z})}),Z.jsx("div",{className:"rqmii-chat-header-spacer"}),Z.jsxs("div",{className:"rqmii-chat-header-actions",children:[i&&Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})}),m&&Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",M&&"is-active"),onClick:g,"aria-label":v?$t(e,"stopVoice"):$t(e,"startVoice"),children:v?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]}),Z.jsx(iT,{messages:a,partialTranscript:c,language:e,showTypingIndicator:D}),m&&Z.jsx("div",{className:"rqmii-chat-session-counter",children:eT(C)}),Z.jsx(dS,{language:e,onSend:d}),Z.jsx(Nc,{language:e,agent:s})]})}function M5({agent:s,language:e,onEndSession:t,onMinimize:i,isListening:a,isLoading:c,isSpeaking:d,isAudioPlaying:f,isAgentThinking:m,isAgentSpeaking:g,onToggleVoice:v,elapsed:M,visualViewportHeight:x}){const S=wP({language:e,isListening:a,isLoading:c,isSpeaking:d,isAudioPlaying:f,isAgentThinking:m,isAgentSpeaking:g,persistentListening:!0}),w=Wm(x);return Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-call",lo(e)),style:w,children:[Z.jsxs("div",{className:"rqmii-chat-call-status",children:[Z.jsx("span",{className:Jn("rqmii-chat-live-dot",a&&"is-live")}),Z.jsx("span",{children:eT(M)}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,children:Z.jsx(wx,{size:20})})]}),Z.jsxs("div",{className:"rqmii-chat-voice-frame",children:[Z.jsx(co,{agent:s,size:"hero",active:f}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),Z.jsx("div",{className:Jn("rqmii-chat-status-pill",!S&&"is-empty"),children:S||$t(e,"listening")}),Z.jsxs("div",{className:"rqmii-chat-voice-actions",children:[Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",d&&"is-active"),onClick:v,children:a?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]}),Z.jsx(Nc,{language:e,agent:s})]})}function wP({language:s,isListening:e,isLoading:t,isSpeaking:i,isAudioPlaying:a,isAgentThinking:c,isAgentSpeaking:d,persistentListening:f=!1}){return t?$t(s,"loading"):i?$t(s,"listening"):a||d?$t(s,"talkToInterrupt"):c?$t(s,"processing"):e&&f?$t(s,"listening"):null}function w5({agent:s,language:e,onRestore:t,onClose:i,isListening:a,isAudioPlaying:c,isSpeaking:d,onToggleVoice:f,elapsed:m,visualViewportHeight:g,variant:v="voice"}){const M=Wm(g),x=v==="text";return Z.jsxs("div",{className:Jn("rqmii-chat-minimized",lo(e)),style:M,children:[Z.jsx(co,{agent:s,size:"minimized",active:c}),!x&&Z.jsx("span",{className:"rqmii-chat-minimized-time",children:eT(m)}),Z.jsxs("div",{className:"rqmii-chat-minimized-actions",children:[Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:t,"aria-label":$t(e,"maximize"),children:Z.jsx(wD,{size:20})}),!x&&Z.jsx("button",{type:"button",className:Jn("rqmii-chat-circle-button",d&&"is-active"),onClick:f,"aria-label":a?$t(e,"stopVoice"):$t(e,"startVoice"),children:a?Z.jsx(Mx,{size:20}):Z.jsx(n1,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:i,"aria-label":$t(e,"endCall"),children:Z.jsx(i1,{size:20})})]})]})}function TP({agent:s,language:e,languages:t,chatKind:i,messages:a,onLanguageChange:c,onMinimize:d,onStartNewVoice:f,onStartNewText:m,isVoiceSetupLoading:g=!1,visualViewportHeight:v,rating:M,endedBy:x,sessionId:S,ratingInteractive:w,showTellUsMore:k,onRate:C,onTellUsMore:T}){const D=Wm(v),z=S&&s.widget?.behavior?.post_chat_rating_enabled?Z.jsx(SP,{language:e,rating:M,endedBy:x,sessionId:S,interactive:w,showTellUsMore:k,onRate:C,onTellUsMore:T}):null,L=i==="voice"||i==="text_and_voice",O=i==="text"||i==="text_and_voice",U=Z.jsxs("div",{className:"rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended",children:[Z.jsx(tT,{language:e,languages:t,onChange:c}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:d,"aria-label":$t(e,"minimize"),children:Z.jsx(wx,{size:20})}),L&&Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button rqmii-chat-circle-button--call-start",onClick:f,disabled:g,"aria-label":$t(e,"startVoice"),children:g?Z.jsx(Sx,{className:"rqmii-chat-spin",size:20}):Z.jsx(r1,{size:20})})]});return i==="voice"?Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--voice-call",lo(e)),style:D,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx("span",{}),U]}),Z.jsxs("div",{className:"rqmii-chat-voice-frame",children:[Z.jsx(co,{agent:s,size:"hero"}),Z.jsx("div",{className:"rqmii-chat-agent-name",children:s.name}),z]}),Z.jsx(Nc,{language:e,agent:s})]}):Z.jsxs("div",{className:Jn("rqmii-chat-panel rqmii-chat-panel--conversation",lo(e)),style:D,children:[Z.jsxs("div",{className:"rqmii-chat-topbar",children:[Z.jsx(co,{agent:s,size:"header"}),U]}),Z.jsx(iT,{messages:a,language:e}),z,O&&Z.jsx(dS,{language:e,onSend:m}),Z.jsx(Nc,{language:e,agent:s})]})}function EP({agent:s,language:e,onClose:t}){const{streamingUrl:i,isCloudStreamConnected:a,cloudStreamError:c}=Yn.useRqmiiAvatar(),{isAvatarSpeaking:d}=Yn.useRqmiiAvatar(),{messages:f,sendTextMessage:m}=Yn.useRqmiiMessages();return Z.jsxs("div",{className:Jn("rqmii-avatar-panel",lo(e)),children:[Z.jsxs("div",{className:"rqmii-avatar-stream",children:[Z.jsx(Yn.RqmiiCloudAvatarPlayer,{autoConnect:!0,muted:!1}),!i&&Z.jsx("div",{className:"rqmii-avatar-overlay",children:$t(e,"loading")}),c&&Z.jsx("div",{className:"rqmii-avatar-overlay",children:$t(e,"connectionFailed")}),Z.jsxs("div",{className:"rqmii-avatar-controls",children:[Z.jsx(co,{agent:s,size:"header",active:d}),Z.jsx("div",{className:"rqmii-chat-header-spacer"}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button",disabled:!a,children:Z.jsx(Mx,{size:20})}),Z.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:t,children:Z.jsx(s1,{size:20})})]})]}),s.useText&&Z.jsxs("div",{className:"rqmii-avatar-sidebar",children:[Z.jsx(iT,{messages:f,language:e}),Z.jsx(dS,{language:e,onSend:m,variant:"compact"}),Z.jsx(Nc,{language:e,agent:s})]})]})}function CP({language:s,config:e,onAccept:t,onDecline:i}){const a=e?.title?.[s]||$t(s,"consentTitle"),c=e?.body?.[s]||$t(s,"consentBody"),d=e?.acceptLabel?.[s]||$t(s,"consentAccept"),f=e?.declineLabel?.[s]||$t(s,"consentDecline"),m=e?.termsUrl?.[s],g=e?.privacyUrl?.[s];return Z.jsxs("div",{className:"rqmii-chat-panel rqmii-chat-panel--start",style:{justifyContent:"space-between"},children:[Z.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px",gap:"16px"},children:[Z.jsx("div",{style:{fontSize:"16px",fontWeight:600,color:"var(--rqmii-text)"},children:a}),Z.jsxs("div",{style:{fontSize:"13px",lineHeight:1.5,color:"var(--rqmii-muted)"},children:[c,(m||g)&&Z.jsxs("span",{children:[" ",m&&Z.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--rqmii-action)",textDecoration:"underline"},children:$t(s,"consentTermsLink")}),m&&g&&Z.jsxs("span",{children:[" ",$t(s,"close")?.toLowerCase()==="close"?"and":"و"," "]}),g&&Z.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--rqmii-action)",textDecoration:"underline"},children:$t(s,"consentPrivacyLink")}),"."]})]})]}),Z.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"12px",padding:"0 24px 24px"},children:[Z.jsx("button",{type:"button",className:"rqmii-chat-pill",onClick:i,style:{background:"transparent",border:"1px solid var(--rqmii-border)"},children:f}),Z.jsx("button",{type:"button",className:"rqmii-chat-pill",onClick:t,style:{background:"#fff",color:"#000"},children:d})]})]})}function T5(s){return s?typeof s=="string"?s:typeof s=="object"&&typeof s.text=="string"?s.text:"":""}function E5(s){return s==="text"||s==="voice"||s==="text_and_voice"}function rT({agent:s,language:e,languages:t,onLanguageChange:i=Ec,onEndSession:a=Ec,onMinimize:c,messages:d,onSendMessage:f,isPreview:m=!1,chatKind:g,sdk:v,renderPanel:M,messagesRef:x,initialText:S,autoStartVoice:w}){const[k,C]=pe.useState(!1),T=g||xx(s),[D,z]=pe.useState(()=>T==="voice"&&v.isSessionReady||T==="voice"&&!!w),[L,O]=pe.useState(()=>(T==="text"||T==="text_and_voice")&&v.isSessionReady||!!S||T==="text_and_voice"&&!!w),[U,H]=pe.useState(!1),[I,F]=pe.useState(!1),[V,X]=pe.useState(null),K=r5(T==="voice"&&D||T==="text_and_voice"&&L),le=s5(),$=s.consent?.enabled&&!k&&!m,j=E5(T),Q=()=>C(!0),ne=()=>{c?c():a()},ce=lt=>{i(lt),m||v.changeSessionLanguage(lt)},ye=pe.useCallback(lt=>{if(X(null),F(!0),f){f(lt);return}v.sendTextMessage(lt)},[f,v]);pe.useEffect(()=>{x&&(x.current=v.messages)});const Te=pe.useRef(!1);if(pe.useEffect(()=>{Te.current||(S?(Te.current=!0,ye(S)):w&&(Te.current=!0,X(null),F(!0),v.isVoiceActive||v.startVoice()))},[]),pe.useEffect(()=>{I&&v.isSessionReady&&(F(!1),T==="voice"?z(!0):O(!0))},[I,v.isSessionReady,T]),pe.useEffect(()=>{I&&v.error&&(F(!1),X(v.error))},[I,v.error]),v.error&&!m&&(L||D))return Z.jsx(bP,{message:v.error,language:e,onClose:a});if($)return Z.jsx(CP,{language:e,config:s.consent,onAccept:Q,onDecline:ne});const Fe=pe.useCallback(()=>{X(null),F(!0),v.isVoiceActive||v.startVoice()},[v]),ft={agent:s,language:e,languages:t,chatKind:T,sdk:v,isPreview:m,onLanguageChange:ce,onClose:a,onMinimize:j?()=>H(!0):void 0,onRestore:j?()=>H(!1):void 0,onSend:ye,voiceStarted:D,conversationStarted:L,isMinimized:U,elapsed:K,setVoiceStarted:z,setConversationStarted:O};return M?Z.jsx(Z.Fragment,{children:M(ft)}):Z.jsx(C5,{...ft,connecting:I,connectError:V,visualViewportHeight:le,onCloseWidget:c??a,initiateVoice:Fe})}function C5({agent:s,language:e,languages:t,chatKind:i,sdk:a,onLanguageChange:c,onClose:d,onMinimize:f,onRestore:m,onSend:g,voiceStarted:v,conversationStarted:M,isMinimized:x,elapsed:S,setVoiceStarted:w,setConversationStarted:k,visualViewportHeight:C,connecting:T=!1,connectError:D=null,onCloseWidget:z,initiateVoice:L}){const O=s.widget?.behavior?.typing_indicator_enabled??!0,U=i==="text"?a.waitingForResponse&&O:!1,H=a.messages;if(i==="avatar")return Z.jsx(EP,{agent:s,language:e,onClose:d});if(x)return Z.jsx(w5,{agent:s,language:e,onRestore:m,onClose:d,isListening:a.isVoiceActive,isAudioPlaying:a.isAudioPlaying,isSpeaking:a.vad.isSpeaking,onToggleVoice:a.toggleVoice,elapsed:S,visualViewportHeight:C,variant:i==="text"?"text":"voice"});if(i==="voice"&&v)return Z.jsx(M5,{agent:s,language:e,onEndSession:d,onMinimize:f,isListening:a.isVoiceActive,isLoading:a.vad.isLoading,isSpeaking:a.vad.isSpeaking,isAudioPlaying:a.isAudioPlaying,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,elapsed:S,visualViewportHeight:C});if(i==="voice")return Z.jsx(x5,{agent:s,language:e,languages:t,onLanguageChange:c,onClose:z,isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading||T,onStartVoice:L,visualViewportHeight:C});if(!M&&(a.messages.length===0||T)){const I=s.conversation?.suggested_messages?.[e]?.filter(V=>V.trim())||void 0,F=V=>{g?.(V)};return Z.jsx(b5,{agent:s,language:e,languages:t,onLanguageChange:c,onClose:z,onSend:g,isVoiceEnabled:i==="text_and_voice",isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading||T,onStartVoice:L,visualViewportHeight:C,disabled:T,error:D||void 0,suggestions:I,onSuggestionClick:F,compact:!!I})}return Z.jsx(S5,{agent:s,language:e,onEndSession:d,messages:H,partialTranscript:T5(a.partialTranscript),onSend:g,isAudioPlaying:a.isAudioPlaying,isVoiceEnabled:i==="text_and_voice",isListening:a.isVoiceActive,isSpeaking:a.vad.isSpeaking,isLoading:a.vad.isLoading,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,onStartVoice:a.startVoice,onMinimize:f,elapsed:S,visualViewportHeight:C,waitingForResponse:U})}const R5={isListening:!1,isLoading:!1,isSpeaking:!1,toggle:async()=>!1};function RP({isSessionReady:s,sendTextMessage:e,messages:t}){const[i,a]=pe.useState(null),[c,d]=pe.useState(null),f=pe.useCallback(()=>{a(m=>(m&&(s?e(m):d(m)),null))},[s,e]);return pe.useEffect(()=>{i&&t.length!==0&&f()},[t,i,f]),pe.useEffect(()=>{if(!i)return;const m=setTimeout(f,5e3);return()=>clearTimeout(m)},[i,f]),pe.useEffect(()=>{!c||!s||(e(c),d(null))},[s,c,e]),{pendingWelcomeText:i,pendingMessage:c,setPendingWelcomeText:a,setPendingMessage:d,sendPendingWelcomeText:f}}function sT({isSessionReady:s,signalClientReady:e}){const[t,i]=pe.useState(!1),[a,c]=pe.useState(void 0),d=pe.useRef(!1);return pe.useEffect(()=>{!s||d.current||!t||(d.current=!0,e(a),i(!1))},[s,t,a,e]),{emitClientReady:pe.useCallback(m=>{s?(d.current=!0,e(m)):(c(m),i(!0))},[s,e])}}const P5=300;function PP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,emitUserMessage:c,addLocalMessage:d,clearMessages:f}=Yn.useRqmiiMessages(),{changeSessionLanguage:m,clearSessionHistory:g,signalClientReady:v,error:M,isSessionReady:x,isAgentThinking:S,isAgentSpeaking:w}=Yn.useRqmiiConnection(),k=pe.useRef(!1),C=pe.useRef(null),T=pe.useRef(!1),[D,z]=pe.useState(!1),[L,O]=pe.useState(null),[U,H]=pe.useState(!1),I=pe.useRef(i.length);pe.useEffect(()=>{if(i.length>I.current){const $=i[i.length-1];$.role==="assistant"&&$.streaming&&H(!1)}I.current=i.length},[i]),pe.useEffect(()=>{if(!x||!D||T.current)return;const $=C.current;if($===null)return;T.current=!0,C.current=null,d("user",$),O(null);const j=s.agent.welcomeMessages?.[s.language];v(j?{welcomeMessage:j}:void 0);const Q=setTimeout(()=>{c($),H(!0)},P5);return()=>clearTimeout(Q)},[x,D,v,c,d]);const F=pe.useMemo(()=>L?[{id:"first-user",role:"user",text:L},...i]:i,[L,i]),V=pe.useCallback(()=>{O(null),f()},[f]),X={emitClientReady:v,sendMessage:$=>{a($)},queueForWelcome:Ec,enableVoice:Ec,disableVoice:Ec,language:s.language,isSessionReady:x,supportsVoice:!1,isVoiceActive:!1,chatKind:"text"},_=($,j)=>{s.onSessionStart?.(),k.current?(H(!0),j.sendMessage($)):(k.current=!0,O($),C.current=$,z(!0),H(!0))},K=$=>{s.onTextSend?s.onTextSend($,X):_($,X)},le={messages:F,sendTextMessage:K,clearMessages:V,clearSessionHistory:g,isAudioPlaying:!1,partialTranscript:null,changeSessionLanguage:m,error:M,isAgentThinking:S,isAgentSpeaking:w,isVoiceSetupLoading:!1,isVoiceActive:!1,isSessionReady:x,vad:R5,startVoice:Ec,prepareVoice:Ec,toggleVoice:Ec,signalClientReady:v,waitingForResponse:U,sendSuggestion:K};return Z.jsx(rT,{...t,isPreview:e,chatKind:"text",sdk:le})}function kP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,clearMessages:c}=Yn.useRqmiiMessages(),{isAudioPlaying:d,partialTranscript:f}=Yn.useRqmiiVoice(),{changeSessionLanguage:m,clearSessionHistory:g,signalClientReady:v,error:M,isSessionReady:x,isAgentThinking:S,isAgentSpeaking:w}=Yn.useRqmiiConnection(),{setPendingWelcomeText:k,setPendingMessage:C}=RP({isSessionReady:x,sendTextMessage:a,messages:i}),{emitClientReady:T}=sT({isSessionReady:x,signalClientReady:v}),[D,z]=pe.useState(!1),L=Yn.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:O,isListening:U,toggle:H}=L,I=O,F=U||D;pe.useEffect(()=>{!D||!x||O||U||H()},[D,x,O,U,H]);const V=()=>{s.onSessionStart?.()},X={emitClientReady:T,sendMessage:Q=>{x?a(Q):C(Q)},queueForWelcome:Q=>k(Q),enableVoice:()=>z(!0),disableVoice:()=>{z(!1),U&&H()},language:s.language,isSessionReady:x,supportsVoice:!0,isVoiceActive:F,chatKind:"voice"},_=Q=>{V(),Q.enableVoice();const ne=s.agent.welcomeMessages?.[s.language];Q.emitClientReady(ne?{welcomeMessage:ne}:void 0)},K=Q=>{Q.isVoiceActive?Q.disableVoice():Q.enableVoice()},j={messages:i,sendTextMessage:()=>{},clearMessages:c,clearSessionHistory:g,isAudioPlaying:d,partialTranscript:f,changeSessionLanguage:m,error:M,isAgentThinking:S,isAgentSpeaking:w,isVoiceSetupLoading:I,isVoiceActive:F,isSessionReady:x,vad:L,startVoice:()=>{s.onVoiceStart?s.onVoiceStart(X):_(X)},prepareVoice:()=>{},toggleVoice:()=>{s.onVoiceToggle?s.onVoiceToggle(X):K(X)},signalClientReady:v};return Z.jsx(rT,{...t,isPreview:e,chatKind:"voice",sdk:j})}const k5=300;function DP(s){const{isPreview:e=!1,...t}=s,{messages:i,sendTextMessage:a,emitUserMessage:c,addLocalMessage:d,clearMessages:f}=Yn.useRqmiiMessages(),{isAudioPlaying:m,partialTranscript:g}=Yn.useRqmiiVoice(),{changeSessionLanguage:v,clearSessionHistory:M,signalClientReady:x,error:S,isSessionReady:w,isAgentThinking:k,isAgentSpeaking:C}=Yn.useRqmiiConnection(),{emitClientReady:T}=sT({isSessionReady:w,signalClientReady:x}),[D,z]=pe.useState(!1),L=pe.useRef(null),[O,U]=pe.useState(!1),H=pe.useRef(null),[I,F]=pe.useState(!1),V=pe.useRef(!1),X=pe.useRef(!1),_=pe.useRef(!1),[K,le]=pe.useState(null),[$,j]=pe.useState(!1),Q=pe.useRef(i.length);pe.useEffect(()=>{if(i.length>Q.current){const xe=i[i.length-1];xe.role==="assistant"&&xe.streaming&&j(!1)}Q.current=i.length},[i]);const ne=Yn.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:ce,isListening:ye,toggle:Te}=ne,Fe=ce,ft=ye||D;pe.useEffect(()=>{!D||!w||ce||ye||Te()},[D,w,ce,ye,Te]),pe.useEffect(()=>{if(!w||!O||_.current)return;const xe=L.current;if(xe===null)return;_.current=!0,L.current=null,d("user",xe),le(null);const ze=s.agent.welcomeMessages?.[s.language];x(ze?{welcomeMessage:ze}:void 0);const je=setTimeout(()=>{c(xe),j(!0)},k5);return()=>clearTimeout(je)},[w,O,x,c,d]),pe.useEffect(()=>{if(!w||!I||V.current)return;const xe=H.current;xe!==null&&(V.current=!0,H.current=null,d("user",xe),c(xe),j(!0),F(!1))},[w,I,c,d]);const lt=pe.useMemo(()=>K?[{id:"first-user",role:"user",text:K},...i]:i,[K,i]),ct=pe.useCallback(()=>{le(null),f()},[f]),Pe=()=>{s.onSessionStart?.()},qe={emitClientReady:T,sendMessage:xe=>{a(xe)},queueForWelcome:()=>{},enableVoice:()=>z(!0),disableVoice:()=>{z(!1),ye&&Te()},language:s.language,isSessionReady:w,supportsVoice:!0,isVoiceActive:ft,chatKind:"text_and_voice"},He=(xe,ze)=>{Pe(),X.current?(j(!0),ze.sendMessage(xe)):(X.current=!0,s.onStartText?.(),le(xe),L.current=xe,U(!0),j(!0))},pt=xe=>{Pe(),s.onStartVoice?.(),xe.enableVoice();const ze=s.agent.welcomeMessages?.[s.language];xe.emitClientReady(ze?{welcomeMessage:ze}:void 0)},Nt=xe=>{xe.isVoiceActive?xe.disableVoice():xe.enableVoice()},Ue={messages:lt,sendTextMessage:xe=>{s.onTextSend?s.onTextSend(xe,qe):He(xe,qe)},clearMessages:ct,clearSessionHistory:M,isAudioPlaying:m,partialTranscript:g,changeSessionLanguage:v,error:S,isAgentThinking:k,isAgentSpeaking:C,isVoiceSetupLoading:Fe,isVoiceActive:ft,isSessionReady:w,vad:ne,startVoice:()=>{s.onVoiceStart?s.onVoiceStart(qe):pt(qe)},prepareVoice:()=>{},toggleVoice:()=>{s.onVoiceToggle?s.onVoiceToggle(qe):Nt(qe)},signalClientReady:x,waitingForResponse:$,sendSuggestion:xe=>{Pe(),X.current=!0,z(!0),H.current=xe,F(!0)}};return Z.jsx(rT,{...t,isPreview:e,chatKind:s.textOnly?"text":"text_and_voice",sdk:Ue})}function LP(s){const{isPreview:e=!1,agent:t,language:i,languages:a,onLanguageChange:c,onEndSession:d,onMinimize:f,messages:m,onSendMessage:g}=s,v=d||f||Ec,{messages:M,sendTextMessage:x,clearMessages:S}=Yn.useRqmiiMessages(),{changeSessionLanguage:w,clearSessionHistory:k,signalClientReady:C,error:T,isSessionReady:D,isAgentThinking:z,isAgentSpeaking:L}=Yn.useRqmiiConnection();return RP({isSessionReady:D,sendTextMessage:x,messages:M}),sT({isSessionReady:D,signalClientReady:C}),T&&!e?Z.jsx(bP,{message:T,language:i,onClose:v}):Z.jsx(EP,{agent:t,language:i,onClose:v})}function D5({agent:s,defaultOpen:e=!1,className:t="",preview:i=!1,ChatBoxComponent:a}){const[c,d]=pe.useState(e),[f,m]=pe.useState(s.defaultLanguage),g=pe.useMemo(()=>zm(s.languages,s.defaultLanguage),[s.defaultLanguage,s.languages]);return pe.useEffect(()=>{m(s.defaultLanguage)},[s.defaultLanguage]),Z.jsxs("div",{className:Jn("rqmii-chat-surface",i&&"is-preview",t),children:[!c&&Z.jsx(nT,{agent:s,onClick:()=>d(!0),position:i?"static":"fixed"}),c&&Z.jsx(a,{agent:s,language:f,languages:g,onLanguageChange:m,onClose:()=>d(!1),isPreview:i})]})}function L5({restUrl:s,identifier:e,fallbackAgent:t,withCredentials:i=!1,children:a,onError:c}){const[d,f]=pe.useState(()=>t?Of(t):null),[m,g]=pe.useState(null);return pe.useEffect(()=>{t&&(f(Of(t)),g(null))},[t]),pe.useEffect(()=>{if(!e||t)return;const v=new AbortController;return g(null),_2({restUrl:s,identifier:e,withCredentials:i,signal:v.signal}).then(f).catch(M=>{v.signal.aborted||(g(M),c?.(M))}),()=>v.abort()},[t,e,c,s,i]),m?Z.jsx("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:m.message||"Could not load agent"}):d?Z.jsx(Z.Fragment,{children:a(d)}):Z.jsx("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:"Loading"})}function t1({agent:s,language:e,languages:t,onLanguageChange:i,onEndSession:a,onMinimize:c,onStartText:d,onStartVoice:f,textOnly:m,messages:g,onSendMessage:v,isPreview:M,onSessionStart:x,initialText:S,autoStartVoice:w}){const k=xx(s),C={agent:s,language:e,languages:t,onLanguageChange:i,onEndSession:a,onMinimize:c,messages:g,onSendMessage:v,isPreview:M,onSessionStart:x,initialText:S,autoStartVoice:w};switch(k){case"avatar":return Z.jsx(LP,{...C});case"voice":return Z.jsx(kP,{...C});case"text_and_voice":return Z.jsx(DP,{...C,onStartText:d,onStartVoice:f,textOnly:m});case"text":default:return Z.jsx(PP,{...C})}}function I5({agent:s,language:e,languages:t,startMode:i,directive:a,open:c,onOpen:d,onLanguageChange:f,onMinimize:m,onStartNewSession:g,onSessionStart:v,onStartText:M,onStartVoice:x}){const{connectionState:S,isConnected:w,isSessionTerminated:k,creditExhausted:C,session:T,endSession:D,submitFeedback:z,interrupt:L}=Yn.useRqmiiConnection(),{messages:O}=Yn.useRqmiiMessages(),U=pe.useRef(!1),H=pe.useRef(null),[I,F]=pe.useState(null),[V,X]=pe.useState(0),[_,K]=pe.useState(!1),[le,$]=pe.useState(!1),[j,Q]=pe.useState(!1);pe.useEffect(()=>{w&&(U.current=!0)},[w]),pe.useEffect(()=>{if(I)return;let ct=null;k||S==="ended"?ct=H.current==="user"?"user_ended":"terminated":S==="failed"?C?ct="credits_exhausted":U.current?ct="connection_lost":ct="failed":C&&(ct="credits_exhausted"),ct&&F({sessionId:T.sessionId,endedBy:H.current??"agent",reason:ct})},[k,S,C,T.sessionId,I]);const ne=()=>{H.current="user",L(),D()},ce=I?.sessionId??null,ye=ct=>{_||(X(ct),ce&&z({sessionId:ce,rating:ct,endedBy:I?.endedBy}).catch(()=>{}),j||(Q(!0),$(!0)))},Te=async ct=>{if(ce)try{await z({sessionId:ce,feedback:ct,endedBy:I?.endedBy})}catch{}K(!0),$(!1)};if(!c)return Z.jsx(nT,{agent:s,onClick:d,active:S==="connected"});const Fe=xx(s),ft=s.agentType==="cloud_avatar"||s.agentType==="desktop_avatar",lt=i==="text";return ft?Z.jsx(t1,{agent:s,language:e,languages:t,onLanguageChange:f,onEndSession:ne,onMinimize:m,onSessionStart:v,onStartText:M,onStartVoice:x,textOnly:lt}):I?le&&ce?Z.jsx(MP,{agent:s,language:e,rating:V,onBack:()=>$(!1),onMinimize:m,onSubmit:Te}):Z.jsx(TP,{agent:s,language:e,languages:t,chatKind:Fe==="avatar"?"text":Fe,messages:O,onLanguageChange:f,onMinimize:m,onStartNewVoice:()=>g("voice"),onStartNewText:ct=>g("text",ct),rating:V,endedBy:I.endedBy,sessionId:ce,ratingInteractive:!_,showTellUsMore:j&&!_,onRate:ye,onTellUsMore:()=>$(!0)}):Z.jsx(t1,{agent:s,language:e,languages:t,onLanguageChange:f,onEndSession:ne,onMinimize:m,onSessionStart:v,onStartText:M,onStartVoice:x,textOnly:lt,initialText:a?.mode==="text"?a.text:void 0,autoStartVoice:a?.mode==="voice"})}function N5({wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:c,language:d,defaultOpen:f=!1,className:m="",pcmOptions:g,debug:v=!1,withCredentials:M=!1,onError:x,onInitialized:S,config:w,clientTools:k}){if([!!t,!!i,!!a].filter(Boolean).length>1)throw new Error("RqmiiAgentChat: only one of publicChatId, apiKey, or agentId may be provided");const T=t||i||a;return Z.jsx(L5,{restUrl:e,identifier:T,fallbackAgent:c,withCredentials:M,onError:x,children:D=>Z.jsx(z5,{wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:D,language:d,defaultOpen:f,className:m,pcmOptions:g,debug:v,withCredentials:M,onError:x,onInitialized:S,config:w,clientTools:k})})}function z5({wsUrl:s,restUrl:e,publicChatId:t,apiKey:i,agentId:a,agent:c,language:d,defaultOpen:f,className:m,pcmOptions:g,debug:v,withCredentials:M,onError:x,onInitialized:S,config:w,clientTools:k}){const[C,T]=pe.useState(f),[D,z]=pe.useState(!1),[L,O]=pe.useState(d||c.defaultLanguage),[U,H]=pe.useState("idle"),[I,F]=pe.useState(0),[V,X]=pe.useState(null),[_,K]=pe.useState(!1),le=c.agentType==="cloud_avatar"||c.agentType==="desktop_avatar",$=le,j=c.widget?.behavior,Q=c.welcomeMessages?.[L]||"",ne=!C&&!_&&!$&&!!j?.welcome_bubble_enabled&&!!Q.trim(),ce=pe.useMemo(()=>zm(c.languages,c.defaultLanguage),[c.defaultLanguage,c.languages]),ye=pe.useMemo(()=>U==="text"?{...w??{},use_voice:!1,use_text:!0}:w,[w,U]),Te=pe.useMemo(()=>lD(c,ye),[c,ye]),Fe=!$&&Te.useVoice,ft=le?C:D,lt=pe.useMemo(()=>({...t?{publicChatId:t}:{},...i?{apiKey:i}:{},...a?{agentId:a}:{},language:L,config:ye}),[a,i,t,L,ye]),ct=pe.useRef(null),Pe=pe.useRef(!1),qe=pe.useRef(I),He=qe.current!==I;qe.current=I,D&&(!Pe.current||He)&&(ct.current=lt),Pe.current=D,D||(ct.current=null);const pt=D&&ct.current?ct.current:lt;pe.useEffect(()=>{O(d||c.defaultLanguage)},[c.defaultLanguage,d]);const Nt=pe.useMemo(()=>x?xe=>{H("idle"),x(xe)}:xe=>{H("idle")},[x]),nt=()=>{H("text"),z(!0)},sn=()=>{H("voice"),z(!0)},Dt=()=>{T(!1)},Ue=(xe,ze)=>{X(xe==="text"?{mode:"text",text:ze??""}:{mode:"voice"}),H(xe),z(!0),F(je=>je+1)};return Z.jsx(Yn.RqmiiAgentRoom,{wsUrl:s,restUrl:e,session:pt,connect:ft,enableAudio:Fe,pcmOptions:g,debug:v,withCredentials:M,onError:Nt,onInitialized:S,clientTools:k,children:Z.jsxs("div",{className:Jn("rqmii-chat-surface",c.widget?.appearance?.position==="left"&&"rqmii-position-left",m),dir:"ltr",children:[ne&&Z.jsx(c5,{message:Q,delaySeconds:j?.welcome_bubble_delay_seconds??3,soundEnabled:!!j?.welcome_bubble_sound_enabled,language:L,buttonPosition:c.widget?.appearance?.position==="left"?"left":"right",onClick:()=>K(!0)}),Z.jsx(I5,{agent:c,language:L,languages:ce,startMode:U,directive:V,open:C,onOpen:()=>{T(!0),K(!0)},onLanguageChange:O,onMinimize:Dt,onStartNewSession:Ue,onSessionStart:()=>z(!0),onStartText:nt,onStartVoice:sn})]})},I)}function B5({agent:s,language:e,open:t=!0,className:i="",messages:a,onSendMessage:c,onClose:d}){const f=pe.useMemo(()=>Of(s),[s]),[m,g]=pe.useState(t),[v,M]=pe.useState(e||f.defaultLanguage),x=pe.useMemo(()=>zm(f.languages,f.defaultLanguage),[f.defaultLanguage,f.languages]);return pe.useEffect(()=>{e&&M(e)},[e]),pe.useEffect(()=>{g(t)},[t]),Z.jsx(Yn.RqmiiAgentProvider,{wsUrl:"",restUrl:"",enableAudio:!1,children:Z.jsx("div",{className:Jn("rqmii-chat-surface is-preview",i),dir:"ltr",children:m?Z.jsx(t1,{agent:f,language:v,languages:x,onLanguageChange:M,onEndSession:()=>{g(!1),d?.()},messages:a,onSendMessage:c,isPreview:!0}):null})})}exports.EpicPixelStreamingPlayer=Yn.EpicPixelStreamingPlayer;exports.RqmiiAgentRoom=Yn.RqmiiAgentRoom;exports.RqmiiCloudAvatarPlayer=Yn.RqmiiCloudAvatarPlayer;exports.ConsentDialog=CP;exports.EndedChatPanel=TP;exports.FeedbackPanel=MP;exports.RQMII_BUILTIN_FACES=Rw;exports.RQMII_CHAT_LANGUAGES=Cb;exports.RQMII_CHAT_LANGUAGE_VALUES=Ew;exports.RatingBar=SP;exports.RqmiiAgentAvatar=co;exports.RqmiiAgentChat=N5;exports.RqmiiAgentChatPreview=B5;exports.RqmiiAvatarChatBox=LP;exports.RqmiiChatFooter=Nc;exports.RqmiiChatOpenButton=nT;exports.RqmiiChatSurface=D5;exports.RqmiiTextAndVoiceChatBox=DP;exports.RqmiiTextChatBox=PP;exports.RqmiiVoiceChatBox=kP;exports.fetchAgentConfig=oD;exports.fetchAgentCustomization=_2;exports.fetchPublicAgent=aD;exports.getBuiltinFace=t3;exports.getChatLanguage=Cw;exports.getChatText=$t;exports.normalizeChatLanguages=zm;exports.normalizePublicAgent=Of;exports.resolveChatKind=xx;
|
|
4622
4622
|
//# sourceMappingURL=ui.cjs.map
|