1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70023,e=>{e.v({arrive:"headquarters-display-module__7isegW__arrive",processing:"headquarters-display-module__7isegW__processing",progress:"headquarters-display-module__7isegW__progress",status:"headquarters-display-module__7isegW__status"})},99369,e=>{"use strict";let t,r,a;var n=e.i(43476),i=e.i(46932),o=e.i(89309),s=e.i(1593),l=e.i(55667),c=e.i(31054),u=e.i(71645),h=e.i(75056),d=e.i(48546),f=e.i(71271),p=e.i(90072),v=e.i(71969),m=e.i(31067),g=e.i(94800);let y={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:` 2 varying vec2 vUv; 3 4 void main() { 5 6 vUv = uv; 7 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 8 9 } 10 `,fragmentShader:` 11 uniform sampler2D tDiffuse; 12 uniform float h; 13 14 varying vec2 vUv; 15 16 void main() { 17 18 vec4 sum = vec4( 0.0 ); 19 20 sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051; 21 sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918; 22 sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245; 23 sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531; 24 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633; 25 sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531; 26 sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245; 27 sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918; 28 sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051; 29 30 gl_FragColor = sum; 31 32 } 33 `},x={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:` 34 varying vec2 vUv; 35 36 void main() { 37 38 vUv = uv; 39 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 40 41 } 42 `,fragmentShader:` 43 44 uniform sampler2D tDiffuse; 45 uniform float v; 46 47 varying vec2 vUv; 48 49 void main() { 50 51 vec4 sum = vec4( 0.0 ); 52 53 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051; 54 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918; 55 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245; 56 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531; 57 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633; 58 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531; 59 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245; 60 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918; 61 sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051; 62 63 gl_FragColor = sum; 64 65 } 66 `},w=u.forwardRef(({scale:e=10,frames:t=1/0,opacity:r=1,width:a=1,height:n=1,blur:i=1,near:o=0,far:s=10,resolution:l=512,smooth:c=!0,color:h="#000000",depthWrite:f=!1,renderOrder:v,...w},b)=>{let M,j,S=u.useRef(null),_=(0,d.useThree)(e=>e.scene),E=(0,d.useThree)(e=>e.gl),C=u.useRef(null);a*=Array.isArray(e)?e[0]:e||1,n*=Array.isArray(e)?e[1]:e||1;let[T,A,U,R,F,I,k]=u.useMemo(()=>{let e=new p.WebGLRenderTarget(l,l),t=new p.WebGLRenderTarget(l,l);t.texture.generateMipmaps=e.texture.generateMipmaps=!1;let r=new p.PlaneGeometry(a,n).rotateX(Math.PI/2),i=new p.Mesh(r),o=new p.MeshDepthMaterial;o.depthTest=o.depthWrite=!1,o.onBeforeCompile=e=>{e.uniforms={...e.uniforms,ucolor:{value:new p.Color(h)}},e.fragmentShader=e.fragmentShader.replace("void main() {",`uniform vec3 ucolor; 67 void main() { 68 `),e.fragmentShader=e.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};let s=new p.ShaderMaterial(y),c=new p.ShaderMaterial(x);return c.depthTest=s.depthTest=!1,[e,r,o,i,s,c,t]},[l,a,n,e,h]),P=e=>{R.visible=!0,R.material=F,F.uniforms.tDiffuse.value=T.texture,F.uniforms.h.value=e/256,E.setRenderTarget(k),E.render(R,C.current),R.material=I,I.uniforms.tDiffuse.value=k.texture,I.uniforms.v.value=e/256,E.setRenderTarget(T),E.render(R,C.current),R.visible=!1},z=0;return(0,g.useFrame)(()=>{C.current&&(t===1/0||z<t)&&(z++,M=_.background,j=_.overrideMaterial,S.current.visible=!1,_.background=null,_.overrideMaterial=U,E.setRenderTarget(T),E.render(_,C.current),P(i),c&&P(.4*i),E.setRenderTarget(null),S.current.visible=!0,_.overrideMaterial=j,_.background=M)}),u.useImperativeHandle(b,()=>S.current,[]),u.createElement("group",(0,m.default)({"rotation-x":Math.PI/2},w,{ref:S}),u.createElement("mesh",{renderOrder:v,geometry:A,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},u.createElement("meshBasicMaterial",{transparent:!0,map:T.texture,opacity:r,depthWrite:f})),u.createElement("orthographicCamera",{ref:C,args:[-a/2,a/2,n/2,-n/2,o,s]}))});var b=e.i(33088),M=e.i(70950),M=M,j=M,S=e.i(8560),_=p;let E=parseInt(p.REVISION.replace(/\D+/g,""));class C extends _.Mesh{constructor(e,t){var r,a;const n=(e=>e&&e.isCubeTexture)(e),i=Math.floor(Math.log2((null!=(a=n?null==(r=e.image[0])?void 0:r.width:e.image.width)?a:1024)/4)),o=Math.pow(2,i),s=3*Math.max(o,112),l=` 69 varying vec3 vWorldPosition; 70 void main() 71 { 72 vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); 73 vWorldPosition = worldPosition.xyz; 74 75 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 76 } 77 `,c=[n?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/s}`,`#define CUBEUV_TEXEL_HEIGHT ${1/(4*o)}`,`#define CUBEUV_MAX_MIP ${i}.0`].join("\n")+` 78 #define ENVMAP_TYPE_CUBE_UV 79 varying vec3 vWorldPosition; 80 uniform float radius; 81 uniform float height; 82 uniform float angle; 83 #ifdef ENVMAP_TYPE_CUBE 84 uniform samplerCube map; 85 #else 86 uniform sampler2D map; 87 #endif 88 // From: https://www.shadertoy.com/view/4tsBD7 89 float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 90 { 91 float d = dot ( rd, n ); 92 93 if( d > 0.0 ) { return 1e6; } 94 95 vec3 o = ro - c; 96 float t = - dot( n, o ) / d; 97 vec3 q = o + rd * t; 98 99 return ( dot( q, q ) < r * r ) ? t : 1e6; 100 } 101 // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm 102 float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 103 { 104 vec3 oc = ro - ce; 105 float b = dot( oc, rd ); 106 float c = dot( oc, oc ) - ra * ra; 107 float h = b * b - c; 108 109 if( h < 0.0 ) { return -1.0; } 110 111 h = sqrt( h ); 112 113 return - b + h; 114 } 115 vec3 project() 116 { 117 vec3 p = normalize( vWorldPosition ); 118 vec3 camPos = cameraPosition; 119 camPos.y -= height; 120 float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); 121 if( intersection > 0.0 ) { 122 123 vec3 h = vec3( 0.0, - height, 0.0 ); 124 float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); 125 p = ( camPos + min( intersection, intersection2 ) * p ) / radius; 126 } else { 127 p = vec3( 0.0, 1.0, 0.0 ); 128 } 129 return p; 130 } 131 #include <common> 132 #include <cube_uv_reflection_fragment> 133 void main() 134 { 135 vec3 projectedWorldPosition = project(); 136 137 #ifdef ENVMAP_TYPE_CUBE 138 vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; 139 #else 140 vec3 direction = normalize( projectedWorldPosition ); 141 vec2 uv = equirectUv( direction ); 142 vec3 outcolor = texture2D( map, uv ).rgb; 143 #endif 144 gl_FragColor = vec4( outcolor, 1.0 ); 145 #include <tonemapping_fragment> 146 #include <${E>=154?"colorspace_fragment":"encodings_fragment"}> 147 } 148 `,u={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new _.IcosahedronGeometry(1,16),new _.ShaderMaterial({uniforms:u,fragmentShader:c,vertexShader:l,side:_.DoubleSide}))}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}var T=M,A=p;class U extends A.DataTextureLoader{constructor(e){super(e),this.type=A.HalfFloatType}parse(e){let t,r,a,n=function(e,t){switch(e){case 1:throw Error("THREE.RGBELoader: Read Error: "+(t||""));case 2:throw Error("THREE.RGBELoader: Write Error: "+(t||""));case 3:throw Error("THREE.RGBELoader: Bad File Format: "+(t||""));default:throw Error("THREE.RGBELoader: Memory Error: "+(t||""))}},i=function(e,t,r){t=t||1024;let a=e.pos,n=-1,i=0,o="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));for(;0>(n=s.indexOf("\n"))&&i<t&&a<e.byteLength;)o+=s,i+=s.length,a+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));return -1<n&&(!1!==r&&(e.pos+=i+n+1),o+s.slice(0,n))},o=new Uint8Array(e);o.pos=0;let s=function(e){let t,r,a=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*EXPOSURE\s*=\s
148*(\d+(\.\d+)?)\s*$/,s=/^\s*FORMAT=(\S+)\s*$/,l=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,c={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};for(!(e.pos>=e.byteLength)&&(t=i(e))||n(1,"no header found"),(r=t.match(/^#\?(\S+)/))||n(3,"bad initial token"),c.valid|=1,c.programtype=r[1],c.string+=t+"\n";!1!==(t=i(e));){if(c.string+=t+"\n","#"===t.charAt(0)){c.comments+=t+"\n";continue}if((r=t.match(a))&&(c.gamma=parseFloat(r[1])),(r=t.match(o))&&(c.exposure=parseFloat(r[1])),(r=t.match(s))&&(c.valid|=2,c.format=r[1]),(r=t.match(l))&&(c.valid|=4,c.height=parseInt(r[1],10),c.width=parseInt(r[2],10)),2&c.valid&&4&c.valid)break}return 2&c.valid||n(3,"missing format specifier"),4&c.valid||n(3,"missing image size specifier"),c}(o),l=s.width,c=s.height,u=function(e,t,r){if(t<8||t>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);t!==(e[2]<<8|e[3])&&n(3,"wrong scanline width");let a=new Uint8Array(4*t*r);a.length||n(4,"unable to allocate buffer space");let i=0,o=0,s=4*t,l=new Uint8Array(4),c=new Uint8Array(s),u=r;for(;u>0&&o<e.byteLength;){o+4>e.byteLength&&n(1),l[0]=e[o++],l[1]=e[o++],l[2]=e[o++],l[3]=e[o++],(2!=l[0]||2!=l[1]||(l[2]<<8|l[3])!=t)&&n(3,"bad rgbe scanline format");let r=0,h;for(;r<s&&o<e.byteLength;){let t=(h=e[o++])>128;if(t&&(h-=128),(0===h||r+h>s)&&n(3,"bad scanline data"),t){let t=e[o++];for(let e=0;e<h;e++)c[r++]=t}else c.set(e.subarray(o,o+h),r),r+=h,o+=h}for(let e=0;e<t;e++){let r=0;a[i]=c[e+r],r+=t,a[i+1]=c[e+r],r+=t,a[i+2]=c[e+r],r+=t,a[i+3]=c[e+r],i+=4}u--}return a}(o.subarray(o.pos),l,c);switch(this.type){case A.FloatType:let h=new Float32Array(4*(a=u.length/4));for(let e=0;e<a;e++)!function(e,t,r,a){let n=Math.pow(2,e[t+3]-128)/255;r[a+0]=e[t+0]*n,r[a+1]=e[t+1]*n,r[a+2]=e[t+2]*n,r[a+3]=1}(u,4*e,h,4*e);t=h,r=A.FloatType;break;case A.HalfFloatType:let d=new Uint16Array(4*(a=u.length/4));for(let e=0;e<a;e++)!function(e,t,r,a){let n=Math.pow(2,e[t+3]-128)/255;r[a+0]=A.DataUtils.toHalfFloat(Math.min(e[t+0]*n,65504)),r[a+1]=A.DataUtils.toHalfFloat(Math.min(e[t+1]*n,65504)),r[a+2]=A.DataUtils.toHalfFloat(Math.min(e[t+2]*n,65504)),r[a+3]=A.DataUtils.toHalfFloat(1)}(u,4*e,d,4*e);t=d,r=A.HalfFloatType;break;default:throw Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:l,height:c,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure,type:r}}setDataType(e){return this.type=e,this}load(e,t,r,a){return super.load(e,function(e,r){switch(e.type){case A.FloatType:case A.HalfFloatType:"colorSpace"in e?e.colorSpace="srgb-linear":e.encoding=3e3,e.minFilter=A.LinearFilter,e.magFilter=A.LinearFilter,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,r)},r,a)}}var R=p,F={},I=function(e,t,r,a,n){var i=new Worker(F[t]||(F[t]=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))));return i.onerror=function(e){return n(e.error,null)},i.onmessage=function(e){return n(null,e.data)},i.postMessage(r,a),i},k=Uint8Array,P=Uint16Array,z=Uint32Array,D=new k([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),O=new k([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),L=new k([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=function(e,t){for(var r=new P(31),a=0;a<31;++a)r[a]=t+=1<<e[a-1];for(var n=new z(r[30]),a=1;a<30;++a)for(var i=r[a];i<r[a+1];++i)n[i]=i-r[a]<<5|a;return[r,n]},N=B(D,2),W=N[0],H=N[1];W[28]=258,H[258]=28;for(var G=B(O,0),V=G[0],$=G[1],q=new P(32768),X=0;X<32768;++X){var Y=(43690&X)>>>1|(21845&X)<<1;Y=(61680&(Y=(52428&Y)>>>2|(13107&Y)<<2))>>>4|(3855&Y)<<4,q[X]=((65280&Y)>>>8|(255&Y)<<8)>>>1}for(var Z=function(e,t,r){for(var a,n=e.length,i=0,o=new P(t);i<n;++i)++o[e[i]-1];var s=new P(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(r){a=new P(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=s[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[q[h]>>>l]=c}else for(i=0,a=new P(n);i<n;++i)e[i]&&(a[i]=q[s[e[i]-1]++]>>>15-e[i]);return a},Q=new k(288),X=0;X<144;++X)Q[X]=8;for(var X=144;X<256;++X)Q[X]=9;for(var X=256;X<280;++X)Q[X]=7;for(var X=280;X<288;++X)Q[X]=8;for(var K=new k(32),X=0;X<32;++X)K[X]=5;var J=Z(Q,9,0),ee=Z(Q,9,1),et=Z(K,5,0),er=Z(K,5,1),ea=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},en=function(e,t,r){var a=t/8|0;return(e[a]|e[a+1]<<8)>>(7&t)&r},ei=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},eo=function(e){return(e/8|0)+(7&e&&1)},es=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var a=new(e instanceof P?P:e instanceof z?z:k)(r-t);return a.set(e.subarray(t,r)),a},el=function(e,t,r){var a=e.length;if(!a||r&&!r.l&&a<5)return t||new k(0);var n=!t||r,i=!r||r.i;r||(r={}),t||(t=new k(3*a));var o=function(e){var r=t.length;if(e>r){var a=new k(Math.max(2*r,e));a.set(t),t=a}},s=r.f||0,l=r.p||0,c=r.b||0,u=r.l,h=r.d,d=r.m,f=r.n,p=8*a;do{if(!u){r.f=s=en(e,l,1);var v=en(e,l+1,3);if(l+=3,v)if(1==v)u=ee,h=er,d=9,f=5;else if(2==v){var m=en(e,l,31)+257,g=en(e,l+10,15)+4,y=m+en(e,l+5,31)+1;l+=14;for(var x=new k(y),w=new k(19),b=0;b<g;++b)w[L[b]]=en(e,l+3*b,7);l+=3*g;
148for(var M=ea(w),j=(1<<M)-1,S=Z(w,M,1),b=0;b<y;){var _=S[en(e,l,j)];l+=15&_;var E=_>>>4;if(E<16)x[b++]=E;else{var C=0,T=0;for(16==E?(T=3+en(e,l,3),l+=2,C=x[b-1]):17==E?(T=3+en(e,l,7),l+=3):18==E&&(T=11+en(e,l,127),l+=7);T--;)x[b++]=C}}var A=x.subarray(0,m),U=x.subarray(m);d=ea(A),f=ea(U),u=Z(A,d,1),h=Z(U,f,1)}else throw"invalid block type";else{var E=eo(l)+4,R=e[E-4]|e[E-3]<<8,F=E+R;if(F>a){if(i)throw"unexpected EOF";break}n&&o(c+R),t.set(e.subarray(E,F),c),r.b=c+=R,r.p=l=8*F;continue}if(l>p){if(i)throw"unexpected EOF";break}}n&&o(c+131072);for(var I=(1<<d)-1,P=(1<<f)-1,z=l;;z=l){var C=u[ei(e,l)&I],B=C>>>4;if((l+=15&C)>p){if(i)throw"unexpected EOF";break}if(!C)throw"invalid length/literal";if(B<256)t[c++]=B;else if(256==B){z=l,u=null;break}else{var N=B-254;if(B>264){var b=B-257,H=D[b];N=en(e,l,(1<<H)-1)+W[b],l+=H}var G=h[ei(e,l)&P],$=G>>>4;if(!G)throw"invalid distance";l+=15&G;var U=V[$];if($>3){var H=O[$];U+=ei(e,l)&(1<<H)-1,l+=H}if(l>p){if(i)throw"unexpected EOF";break}n&&o(c+131072);for(var q=c+N;c<q;c+=4)t[c]=t[c-U],t[c+1]=t[c+1-U],t[c+2]=t[c+2-U],t[c+3]=t[c+3-U];c=q}}r.l=u,r.p=z,r.b=c,u&&(s=1,r.m=d,r.d=h,r.n=f)}while(!s)return c==t.length?t:es(t,0,c)},ec=function(e,t,r){r<<=7&t;var a=t/8|0;e[a]|=r,e[a+1]|=r>>>8},eu=function(e,t,r){r<<=7&t;var a=t/8|0;e[a]|=r,e[a+1]|=r>>>8,e[a+2]|=r>>>16},eh=function(e,t){for(var r=[],a=0;a<e.length;++a)e[a]&&r.push({s:a,f:e[a]});var n=r.length,i=r.slice();if(!n)return[ey,0];if(1==n){var o=new k(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var s=r[0],l=r[1],c=0,u=1,h=2;for(r[0]={s:-1,f:s.f+l.f,l:s,r:l};u!=n-1;)s=r[r[c].f<r[h].f?c++:h++],l=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:s.f+l.f,l:s,r:l};for(var d=i[0].s,a=1;a<n;++a)i[a].s>d&&(d=i[a].s);var f=new P(d+1),p=ed(r[u-1],f,0);if(p>t){var a=0,v=0,m=p-t,g=1<<m;for(i.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});a<n;++a){var y=i[a].s;if(f[y]>t)v+=g-(1<<p-f[y]),f[y]=t;else break}for(v>>>=m;v>0;){var x=i[a].s;f[x]<t?v-=1<<t-f[x]++-1:++a}for(;a>=0&&v;--a){var w=i[a].s;f[w]==t&&(--f[w],++v)}p=t}return[new k(f),p]},ed=function(e,t,r){return -1==e.s?Math.max(ed(e.l,t,r+1),ed(e.r,t,r+1)):t[e.s]=r},ef=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new P(++t),a=0,n=e[0],i=1,o=function(e){r[a++]=e},s=1;s<=t;++s)if(e[s]==n&&s!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=e[s]}return[r.subarray(0,a),t]},ep=function(e,t){for(var r=0,a=0;a<t.length;++a)r+=e[a]*t[a];return r},ev=function(e,t,r){var a=r.length,n=eo(t+2);e[n]=255&a,e[n+1]=a>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;i<a;++i)e[n+i+4]=r[i];return(n+4+a)*8},em=function(e,t,r,a,n,i,o,s,l,c,u){ec(t,u++,r),++n[256];for(var h,d,f,p,v=eh(n,15),m=v[0],g=v[1],y=eh(i,15),x=y[0],w=y[1],b=ef(m),M=b[0],j=b[1],S=ef(x),_=S[0],E=S[1],C=new P(19),T=0;T<M.length;++T)C[31&M[T]]++;for(var T=0;T<_.length;++T)C[31&_[T]]++;for(var A=eh(C,7),U=A[0],R=A[1],F=19;F>4&&!U[L[F-1]];--F);var I=c+5<<3,k=ep(n,Q)+ep(i,K)+o,z=ep(n,m)+ep(i,x)+o+14+3*F+ep(C,U)+(2*C[16]+3*C[17]+7*C[18]);if(I<=k&&I<=z)return ev(t,u,e.subarray(l,l+c));if(ec(t,u,1+(z<k)),u+=2,z<k){h=Z(m,g,0),d=m,f=Z(x,w,0),p=x;var B=Z(U,R,0);ec(t,u,j-257),ec(t,u+5,E-1),ec(t,u+10,F-4),u+=14;for(var T=0;T<F;++T)ec(t,u+3*T,U[L[T]]);u+=3*F;for(var N=[M,_],W=0;W<2;++W)for(var H=N[W],T=0;T<H.length;++T){var G=31&H[T];ec(t,u,B[G]),u+=U[G],G>15&&(ec(t,u,H[T]>>>5&127),u+=H[T]>>>12)}}else h=J,d=Q,f=et,p=K;for(var T=0;T<s;++T)if(a[T]>255){var G=a[T]>>>18&31;eu(t,u,h[G+257]),u+=d[G+257],G>7&&(ec(t,u,a[T]>>>23&31),u+=D[G]);var V=31&a[T];eu(t,u,f[V]),u+=p[V],V>3&&(eu(t,u,a[T]>>>5&8191),u+=O[V])}else eu(t,u,h[a[T]]),u+=d[a[T]];return eu(t,u,h[256]),u+d[256]},eg=new z([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ey=new k(0),ex=function(e,t,r,a,n,i){var o=e.length,s=new k(a+o+5*(1+Math.ceil(o/7e3))+n),l=s.subarray(a,s.length-n),c=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=ev(l,c,e.subarray(u,h)):(l[u]=i,c=ev(l,c,e.subarray(u,o)))}else{for(var d=eg[t-1],f=d>>>13,p=8191&d,v=(1<<r)-1,m=new P(32768),g=new P(v+1),y=Math.ceil(r/3),x=2*y,w=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<x)&v},b=new z(25e3),M=new P(288),j=new P(32),S=0,_=0,u=0,E=0,C=0,T=0;u<o;++u){var A=w(u),U=32767&u,R=g[A];
148if(m[U]=R,g[A]=U,C<=u){var F=o-u;if((S>7e3||E>24576)&&F>423){c=em(e,l,0,b,M,j,_,E,T,u-T,c),E=S=_=0,T=u;for(var I=0;I<286;++I)M[I]=0;for(var I=0;I<30;++I)j[I]=0}var L=2,B=0,N=p,W=U-R&32767;if(F>2&&A==w(u-W))for(var G=Math.min(f,F)-1,V=Math.min(32767,u),q=Math.min(258,F);W<=V&&--N&&U!=R;){if(e[u+L]==e[u+L-W]){for(var X=0;X<q&&e[u+X]==e[u+X-W];++X);if(X>L){if(L=X,B=W,X>G)break;for(var Y=Math.min(W,X-2),Z=0,I=0;I<Y;++I){var Q=u-W+I+32768&32767,K=m[Q],J=Q-K+32768&32767;J>Z&&(Z=J,R=Q)}}}R=m[U=R],W+=U-R+32768&32767}if(B){b[E++]=0x10000000|H[L]<<18|$[B];var ee=31&H[L],et=31&$[B];_+=D[ee]+O[et],++M[257+ee],++j[et],C=u+L,++S}else b[E++]=e[u],++M[e[u]]}}c=em(e,l,i,b,M,j,_,E,T,u-T,c),!i&&7&c&&(c=ev(l,c+1,ey))}return es(s,0,a+eo(c)+n)},ew=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,a=9;--a;)r=(1&r&&-0x12477ce0)^r>>>1;e[t]=r}return e}(),eb=function(){var e=-1;return{p:function(t){for(var r=e,a=0;a<t.length;++a)r=ew[255&r^t[a]]^r>>>8;e=r},d:function(){return~e}}},eM=function(){var e=1,t=0;return{p:function(r){for(var a=e,n=t,i=r.length,o=0;o!=i;){for(var s=Math.min(o+2655,i);o<s;++o)n+=a+=r[o];a=(65535&a)+15*(a>>16),n=(65535&n)+15*(n>>16)}e=a,t=n},d:function(){return e%=65521,t%=65521,(255&e)<<24|e>>>8<<16|(255&t)<<8|t>>>8}}},ej=function(e,t,r,a,n){return ex(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,a,!n)},eS=function(e,t){var r={};for(var a in e)r[a]=e[a];for(var a in t)r[a]=t[a];return r},e_=function(e,t,r){for(var a=e(),n=e.toString(),i=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/ /g,"").split(","),o=0;o<a.length;++o){var s=a[o],l=i[o];if("function"==typeof s){t+=";"+l+"=";var c=s.toString();if(s.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var h in t+=c,s.prototype)t+=";"+l+".prototype."+h+"="+s.prototype[h].toString();else t+=c}else r[l]=s}return[t,r]},eE=[],eC=function(e){var t=[];for(var r in e)(e[r]instanceof k||e[r]instanceof P||e[r]instanceof z)&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},eT=function(e,t,r,a){if(!eE[r]){for(var n,i="",o={},s=e.length-1,l=0;l<s;++l)i=(n=e_(e[l],i,o))[0],o=n[1];eE[r]=e_(e[s],i,o)}var c=eS({},eE[r][1]);return I(eE[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,c,eC(c),a)},eA=function(){return[k,P,z,D,O,L,W,V,ee,er,q,Z,ea,en,ei,eo,es,el,eJ,eI,ek]},eU=function(){return[k,P,z,D,O,L,H,$,J,Q,et,K,q,eg,ey,Z,ec,eu,eh,ed,ef,ep,ev,em,eo,es,ex,ej,eZ,eI]},eR=function(){return[eW,eH]},eF=function(){return[e$]},eI=function(e){return postMessage(e,[e.buffer])},ek=function(e){return e&&e.size&&new k(e.size)},eP=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}},ez=function(e,t,r,a,n){var i,o=eT(e,a,n,function(e,r){e?(o.terminate(),t.ondata.call(t,e)):(r[1]&&o.terminate(),t.ondata.call(t,e,r[0],r[1]))});o.postMessage(r),t.push=function(e,r){if(i)throw"stream finished";if(!t.ondata)throw"no stream handler";o.postMessage([e,i=r],[e.buffer])},t.terminate=function(){o.terminate()}},eD=function(e,t){return e[t]|e[t+1]<<8},eO=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},eL=function(e,t){return eO(e,t)+0x100000000*eO(e,t+4)},eB=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},eN=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&eB(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var a=0;a<=r.length;++a)e[a+10]=r.charCodeAt(a)}},eW=function(e){if(31!=e[0]||139!=e[1]||8!=e[2])throw"invalid gzip data";var t=e[3],r=10;4&t&&(r+=e[10]|(e[11]<<8)+2);for(var a=(t>>3&1)+(t>>4&1);a>0;a-=!e[r++]);return r+(2&t)},eH=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},eG=function(e){return 10+(e.filename&&e.filename.length+1||0)},eV=function(e,t){var r=t.level,a=0==r?0:r<6?1:9==r?3:2;e[0]=120,e[1]=a<<6|(a?32-2*a:1)},e$=function(e){if((15&e[0])!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function eq(e,t){return t||"function"!=typeof e||(t=e,e={}),this.ondata=t,e}var eX=function(){function e(e,t){t||"function"!=typeof e||(t=e,e={}),this.ondata=t,this.o=e||{}}return e.prototype.p=function(e,t){this.ondata(ej(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=t,this.p(e,t||!1)},e}(),eY=function(e,t){ez([eU,function(){return[eP,eX]}],this,eq.call(this,e,t),function(e){onmessage=eP(new eX(e.data))},6)};function eZ(e,t){return ej(e,t||{},0,0)}var eQ=function(){function e(e){this.s={},this.p=new k(0),this.ondata=e}return e.prototype.e=function(e){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var t=this.p.length,r=new k(t+e.length);r.set(this.p),r.set(e,t),this.p=r},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,r=el(this.p,this.o,this.s);this.ondata(es(r,t,this.s.b),this.d),this.o=es(r,this.s.b-32768),this.s.b=this.o.length,this.p=es(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),eK=function(e){this.ondata=e,ez([eA,function(){return[eP,eQ]}],this,0,function(){onmessage=eP(new eQ)},7)};function eJ(e,t){return el(e,t)}(function(){function e(e,t){this.c=eb(),this.l=0,this.v=1,eX.call(this,e,t)}e.prototype.push=function(e,t){eX.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var r=ej(e,this.o,this.v&&eG(this.o),t&&8,!t);this.v&&(eN(r,this.o),this.v=0),t&&(eB(r,r.length-8,this.c.d()),eB(r,r.length-4,this.l)),this.ondata(r,t)}})();var e0=function(){function e(e){this.v=1,eQ.call(this,e)}return e.prototype.push=function(e,t){if(eQ.prototype.e.call(this,e),this.v){var r=this.p.length>3?eW(this.p):4;if(r>=this.p.length&&!t)return;this.p=this.p.subarray(r),this.v=0}if(t){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}eQ.prototype.c.call(this,t)},e}(),e1=function(e){this.ondata=e,ez([eA,eR,function(){return[eP,eQ,e0]}],this,0,function(){onmessage=eP(new e0)},9)},e2=(function(){function e(e,t){this.c=eM(),this.v=1,eX.call(this,e,t)}e.prototype.push=function(e,t){eX.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var r=ej(e,this.o,this.v&&2,t&&4,!t);this.v&&(eV(r,this.o),this.v=0),t&&eB(r,r.length-4,this.c.d()),this.ondata(r,t)}}(),function(){function e(e){this.v=1,eQ.call(this,e)}return e.prototype.push=function(e,t){if(eQ.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}if(t){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}eQ.prototype.c.call(this,t)},e}()),e3=function(e){this.ondata=e,ez([eA,eF,function(){return[eP,eQ,e2]}],this,0,function(){onmessage=eP(new e2)},11)};function e5(e,t){return el((e$(e),e.subarray(2,-4)),t)}var e4=function(){function e(e){this.G=e0,this.I=eQ,this.Z=e2,this.ondata=e}return e.prototype.push=function(e,t){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var r=new k(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var a=this,n=function(){a.ondata.apply(a,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(n):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(n):new this.Z(n),this.s.push(this.p,t),this.p=null}}},e}();(function(e){this.G=e1,this.I=eK,this.Z=e3,this.ondata=e}).prototype.push=function(e,t){e4.prototype.push.call(this,e,t)};var e6="u">typeof TextEncoder&&new TextEncoder,e8="u">typeof TextDecoder&&new TextDecoder,e7=0;try{e8.decode(ey,{stream:!0}),e7=1}catch(e){}var e9=function(e){for(var t="",r=0;;){var a=e[r++],n=(a>127)+(a>223)+(a>239);if(r+n>e.length)return[t,es(e,r-1)];n?3==n?t+=String.fromCharCode(55296|(a=((15&a)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&a):1&n?t+=String.fromCharCode((31&a)<<6|63&e[r++]):t+=String.fromCharCode((1
1485&a)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(a)}};function te(e,t){if(t){for(var r=new k(e.length),a=0;a<e.length;++a)r[a]=e.charCodeAt(a);return r}if(e6)return e6.encode(e);for(var n=e.length,i=new k(e.length+(e.length>>1)),o=0,s=function(e){i[o++]=e},a=0;a<n;++a){if(o+5>i.length){var l=new k(o+8+(n-a<<1));l.set(i),i=l}var c=e.charCodeAt(a);c<128||t?s(c):(c<2048?s(192|c>>6):(c>55295&&c<57344?(s(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++a))>>18),s(128|c>>12&63)):s(224|c>>12),s(128|c>>6&63)),s(128|63&c))}return es(i,0,o)}(function(e){this.ondata=e,e7?this.t=new TextDecoder:this.p=ey}).prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(t=!!t,this.t){if(this.ondata(this.t.decode(e,{stream:!0}),t),t){if(this.t.decode().length)throw"invalid utf-8 data";this.t=null}return}if(!this.p)throw"stream finished";var r=new k(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length);var a=e9(r),n=a[0],i=a[1];if(t){if(i.length)throw"invalid utf-8 data";this.p=null}else this.p=i;this.ondata(n,t)},(function(e){this.ondata=e}).prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(this.d)throw"stream finished";this.ondata(te(e),this.d=t||!1)};var tt=function(e){return 1==e?3:e<6?2:+(9==e)},tr=function(e,t,r){for(var a=t+r;1!=eD(e,t);t+=4+eD(e,t+2))if(t+4>a)throw"invalid zip file";return[eL(e,t+12),eL(e,t+4),eL(e,t+20)]},ta=function(e){var t=0;if(e)for(var r in e){var a=e[r].length;if(a>65535)throw"extra field too long";t+=a+4}return t},tn=function(e,t,r,a,n,i,o,s){var l=a.length,c=r.extra,u=s&&s.length,h=ta(c);eB(e,t,null!=o?0x2014b50:0x4034b50),t+=4,null!=o&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(null==i&&8),e[t++]=n&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var d=new Date(null==r.mtime?Date.now():r.mtime),f=d.getFullYear()-1980;if(f<0||f>119)throw"date not in range 1980-2099";if(eB(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=i&&(eB(e,t,r.crc),eB(e,t+4,i),eB(e,t+8,r.size)),eB(e,t+12,l),eB(e,t+14,h),t+=16,null!=o&&(eB(e,t,u),eB(e,t+6,r.attrs),eB(e,t+10,o),t+=14),e.set(a,t),t+=l,h)for(var p in c){var v=c[p],m=v.length;eB(e,t,+p),eB(e,t+2,m),e.set(v,t+4),t+=4+m}return u&&(e.set(s,t),t+=u),t},ti=function(e,t,r,a,n){eB(e,t,0x6054b50),eB(e,t+8,r),eB(e,t+10,r),eB(e,t+12,a),eB(e,t+16,n)},to=function(){function e(e){this.filename=e,this.c=eb(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();function ts(e,t){var r=this;t||(t={}),to.call(this,e),this.d=new eX(t,function(e,t){r.ondata(null,e,t)}),this.compression=8,this.flag=tt(t.level)}function tl(e,t){var r=this;t||(t={}),to.call(this,e),this.d=new eY(t,function(e,t,a){r.ondata(e,t,a)}),this.compression=8,this.flag=tt(t.level),this.terminate=this.d.terminate}function tc(e){this.ondata=e,this.u=[],this.d=1}ts.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},ts.prototype.push=function(e,t){to.prototype.push.call(this,e,t)},tl.prototype.process=function(e,t){this.d.push(e,t)},tl.prototype.push=function(e,t){to.prototype.push.call(this,e,t)},tc.prototype.add=function(e){var t=this;if(2&this.d)throw"stream finished";var r=te(e.filename),a=r.length,n=e.comment,i=n&&te(n),o=a!=e.filename.length||i&&n.length!=i.length,s=a+ta(e.extra)+30;if(a>65535)throw"filename too long";var l=new k(s);tn(l,0,e,r,o);var c=[l],u=function(){for(var e=0,r=c;e<r.length;e++){var a=r[e];t.ondata(null,a,!1)}c=[]},h=this.d;this.d=0;var d=this.u.length,f=eS(e,{f:r,u:o,o:i,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),h){var e=t.u[d+1];e?e.r():t.d=1}h=1}}),p=0;e.ondata=function(r,a,n){if(r)t.ondata(r,a,n),t.terminate();else if(p+=a.length,c.push(a),n){var i=new k(16);eB(i,0,0x8074b50),eB(i,4,e.crc),eB(i,8,p),eB(i,12,e.size),c.push(i),f.c=p,f.b=s+p+16,f.crc=e.crc,f.size=e.size,h&&f.r(),h=1}else h&&u()},this.u.push(f)},tc.prototype.end=function(){var e=this;if(2&this.d){if(1&this.d)throw"stream finishing";throw"stream finished"}this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3},tc.prototype.e=function(){for(var e=0,t=0,r=0,a=0,n=this.u;a<n.length;a++){var i=n[a];r+=46+i.f.length+ta(i.extra)+(i.o?i.o.length:0)}for(var o=new k(r+22),s=0,l=this.u;s<l.length;s++){var i=l[s];tn(o,e,i,i.f,i.u,i.c,t,i.o),e+=46+i.f.length+ta(i.extra)+(i.o?i.o.length:0),t+=i.b}ti(o,e,this.u.length,r,t),this.ondata(null,o,!0),this.d=2},tc.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2};var tu=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();function th(){var e=this;this.i=new eQ(function(t,r){e.ondata(null,t,r)})}function td(e,t){var r=this;t<32e4?this.i=new eQ(function(e,t){r.ondata(null,e,t)}):(this.i=new eK(function(e,t,a){r.ondata(e,t,a)}),this.terminate=this.i.terminate)}function tf(e){this.onfile=e,this.k=[],this.o={0:tu},this.p=ey}th.prototype.push=function(e,t){try{this.i.push(e,t)}catch(r){this.ondata(r,e,t)}},th.compression=8,td.prototype.push=function(e,t){this.i.terminate&&(e=es(e,0)),this.i.push(e,t)}
148,td.compression=8,tf.prototype.push=function(e,t){var r=this;if(!this.onfile)throw"no callback";if(!this.p)throw"stream finished";if(this.c>0){var a=Math.min(this.c,e.length),n=e.subarray(0,a);if(this.c-=a,this.d?this.d.push(n,!this.c):this.k[0].push(n),(e=e.subarray(a)).length)return this.push(e,t)}else{var i=0,o=0,s=void 0,l=void 0;this.p.length?e.length?((l=new k(this.p.length+e.length)).set(this.p),l.set(e,this.p.length)):l=this.p:l=e;for(var c=l.length,u=this.c,h=u&&this.d,d=this;o<c-4&&"break"!==function(){var e=eO(l,o);if(0x4034b50==e){i=1,s=o,d.d=null,d.c=0;var t=eD(l,o+6),a=eD(l,o+8),n=8&t,h=eD(l,o+26),f=eD(l,o+28);if(c>o+30+h+f){var p,v,m=[];d.k.unshift(m),i=2;var g=eO(l,o+18),y=eO(l,o+22),x=function(e,t){if(t){for(var r="",a=0;a<e.length;a+=16384)r+=String.fromCharCode.apply(null,e.subarray(a,a+16384));return r}if(e8)return e8.decode(e);var n=e9(e),i=n[0];if(n[1].length)throw"invalid utf-8 data";return i}(l.subarray(o+30,o+=30+h),!(2048&t));0xffffffff==g?(g=(p=n?[-2]:tr(l,o,f))[0],y=p[1]):n&&(g=-1),o+=f,d.c=g;var w={name:x,compression:a,start:function(){if(!w.ondata)throw"no callback";if(g){var e=r.o[a];if(!e)throw"unknown compression type "+a;(v=g<0?new e(x):new e(x,g,y)).ondata=function(e,t,r){w.ondata(e,t,r)};for(var t=0;t<m.length;t++){var n=m[t];v.push(n,!1)}r.k[0]==m&&r.c?r.d=v:v.push(ey,!0)}else w.ondata(null,ey,!0)},terminate:function(){v&&v.terminate&&v.terminate()}};g>=0&&(w.size=g,w.originalSize=y),d.onfile(w)}return"break"}if(u){if(0x8074b50==e)return s=o+=12+(-2==u&&8),i=3,d.c=0,"break";else if(0x2014b50==e)return s=o-=4,i=3,d.c=0,"break"}}();++o);if(this.p=ey,u<0){var f=i?l.subarray(0,s-12-(-2==u&&8)-(0x8074b50==eO(l,s-16)&&4)):l.subarray(0,o);h?h.push(f,!!i):this.k[+(2==i)].push(f)}if(2&i)return this.push(l.subarray(o),t);this.p=l.subarray(o)}if(t){if(this.c)throw"invalid zip file";this.p=null}},tf.prototype.register=function(e){this.o[e.compression]=e};let tp=E>=152;class tv extends R.DataTextureLoader{constructor(e){super(e),this.type=R.HalfFloatType}parse(e){let t={l:0,c:0,lc:0};function r(e,r,a,n,i){for(;a<e;)r=r<<8|_(n,i),a+=8;t.l=r>>(a-=e)&(1<<e)-1,t.c=r,t.lc=a}let a=Array(59),n={c:0,lc:0};function i(e,t,r,a){e=e<<8|_(r,a),t+=8,n.c=e,n.lc=t}let o={c:0,lc:0};function s(e,t,r,a,s,l,c,u,h,d){if(e==t){a<8&&(i(r,a,s,c),r=n.c,a=n.lc);var f=r>>(a-=8),f=new Uint8Array([f])[0];if(h.value+f>d)return!1;for(var p=u[h.value-1];f-- >0;)u[h.value++]=p}else{if(!(h.value<d))return!1;u[h.value++]=e}o.c=r,o.lc=a}function l(e){var t=65535&e;return t>32767?t-65536:t}let c={a:0,b:0};function u(e,t){var r=l(e),a=l(t),n=r+(1&a)+(a>>1),i=n-a;c.a=n,c.b=i}function h(e,t){var r=65535&t,a=(65535&e)-(r>>1)&65535;c.a=r+a-32768&65535,c.b=a}function d(e,l,c,u,h,d){var f=c.value,p=S(l,c),v=S(l,c);c.value+=4;var m=S(l,c);if(c.value+=4,p<0||p>=65537||v<0||v>=65537)throw"Something wrong with HUF_ENCSIZE";for(var g=Array(65537),y=Array(16384),x=0;x<16384;x++)y[x]={},y[x].len=0,y[x].lit=0,y[x].p=null;var w=u-(c.value-f);if(!function(e,n,i,o,s,l,c){for(var u=0,h=0;s<=l;s++){if(i.value-i.value>o)return!1;r(6,u,h,e,i);var d=t.l;if(u=t.c,h=t.lc,c[s]=d,63==d){if(i.value-i.value>o)throw"Something wrong with hufUnpackEncTable";r(8,u,h,e,i);var f=t.l+6;if(u=t.c,h=t.lc,s+f>l+1)throw"Something wrong with hufUnpackEncTable";for(;f--;)c[s++]=0;s--}else if(d>=59){var f=d-59+2;if(s+f>l+1)throw"Something wrong with hufUnpackEncTable";for(;f--;)c[s++]=0;s--}}!function(e){for(var t=0;t<=58;++t)a[t]=0;for(var t=0;t<65537;++t)a[e[t]]+=1;for(var r=0,t=58;t>0;--t){var n=r+a[t]>>1;a[t]=r,r=n}for(var t=0;t<65537;++t){var i=e[t];i>0&&(e[t]=i|a[i]++<<6)}}(c)}(e,0,c,w,p,v,g),m>8*(u-(c.value-f)))throw"Something wrong with hufUncompress";!function(e,t,r,a){for(;t<=r;t++){var n=e[t]>>6,i=63&e[t];if(n>>i)throw"Invalid table entry";if(i>14){var o=a[n>>i-14];if(o.len)throw"Invalid table entry";if(o.lit++,o.p){var s=o.p;o.p=Array(o.lit);for(var l=0;l<o.lit-1;++l)o.p[l]=s[l]}else o.p=[,];o.p[o.lit-1]=t}else if(i)for(var c=0,l=1<<14-i;l>0;l--){var o=a[(n<<14-i)+c];if(o.len||o.p)throw"Invalid table entry";o.len=i,o.lit=t,c++}}}(g,p,v,y),function(e,t,r,a,l,c,u,h,d,f){for(var p=0,v=0,m=Math.trunc(l.value+(c+7)/8);l.value<m;)for(i(p,v,r,l),p=n.c,v=n.lc;v>=14;){var g=t[p>>v-14&16383];if(g.len)v-=g.len,s(g.lit,u,p,v,r,a,l,d,f,h),p=o.c,v=o.lc;else{if(!g.p)throw"hufDecode issues";for(y=0;y<g.lit;y++){for(var y,x=63&e[g.p[y]];v<x&&l.value<m;)i(p,v,r,l),p=n.c,v=n.lc;if(v>=x&&e[g.p[y]]>>6==(p>>v-x&(1<<x)-1)){v-=x,s(g.p[y],u,p,v,r,a,l,d,f,h),p=o.c,v=o.lc;break}}if(y==g.lit)throw"hufDecode issues"}}var w=8-c&7;for(p>>=w,v-=w;v>0;){var g=t[p<<14-v&16383];if(g.len)v-=g.len,s(g.lit,u,p,v,r,a,l,d,f,h),p=o.c,v=o.lc;else throw"hufDecode issues"}}(g,y,e,l,c,m,v,d,h,{value:0})}function f(e){for(var t=1;t<e.length;t++){var r=e[t-1]+e[t]-128;e[t]=r}}function p(e,t){for(var r=0,a=Math.floor((e.length+1)/2),n=0,i=e.length-1;!(n>i)&&(t[n++]=e[r++],!(n>i));){;t[n++]=e[a++]}}function v(e){for(var t=e.byteLength,r=[],a=0,n=new DataView(e);t>0;){var i=n.getInt8(a++);if(i<0){var o=-i;t-=o+1;for(var s=0;s<o;s++)r.push(n.getUint8(a++))}else{var o=i;t-=2;for(var l=n.getUint8(a++),s=0;s<o+1;s++)r.push(l)}}return r}function m(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function g(e){var t=new Uint8Array(v(e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size))),r=new
148Uint8Array(t.length);return f(t),p(t,r),new DataView(r.buffer)}function y(e){var t=e5(e.array.slice(e.offset.value,e.offset.value+e.size)),r=new Uint8Array(t.length);return f(t),p(t,r),new DataView(r.buffer)}function x(e){for(var t=e.viewer,r={value:e.offset.value},a=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),n=new Uint8Array(8192),i=0,o=Array(e.channels),s=0;s<e.channels;s++)o[s]={},o[s].start=i,o[s].end=o[s].start,o[s].nx=e.width,o[s].ny=e.lines,o[s].size=e.type,i+=o[s].nx*o[s].ny*o[s].size;var l=F(t,r),f=F(t,r);if(f>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(l<=f)for(var s=0;s<f-l+1;s++)n[s+l]=E(t,r);var p=new Uint16Array(65536),v=function(e,t){for(var r=0,a=0;a<65536;++a)(0==a||e[a>>3]&1<<(7&a))&&(t[r++]=a);for(var n=r-1;r<65536;)t[r++]=0;return n}(n,p),m=S(t,r);d(e.array,t,r,m,a,i);for(var s=0;s<e.channels;++s)for(var g=o[s],y=0;y<o[s].size;++y)!function(e,t,r,a,n,i,o){for(var s=o<16384,l=r>n?n:r,d=1;d<=l;)d<<=1;for(d>>=1,f=d,d>>=1;d>=1;){for(var f,p,v,m,g,y=0,x=0+i*(n-f),w=i*d,b=i*f,M=a*d,j=a*f;y<=x;y+=b){for(var S=y,_=y+a*(r-f);S<=_;S+=j){var E=S+M,C=S+w,T=C+M;s?(u(e[S+t],e[C+t]),p=c.a,m=c.b,u(e[E+t],e[T+t]),v=c.a,g=c.b,u(p,v),e[S+t]=c.a,e[E+t]=c.b,u(m,g)):(h(e[S+t],e[C+t]),p=c.a,m=c.b,h(e[E+t],e[T+t]),v=c.a,g=c.b,h(p,v),e[S+t]=c.a,e[E+t]=c.b,h(m,g)),e[C+t]=c.a,e[T+t]=c.b}if(r&d){var C=S+w;s?u(e[S+t],e[C+t]):h(e[S+t],e[C+t]),p=c.a,e[C+t]=c.b,e[S+t]=p}}if(n&d)for(var S=y,_=y+a*(r-f);S<=_;S+=j){var E=S+M;s?u(e[S+t],e[E+t]):h(e[S+t],e[E+t]),p=c.a,e[E+t]=c.b,e[S+t]=p}f=d,d>>=1}}(a,g.start+y,g.nx,g.size,g.ny,g.nx*g.size,v);for(var x=i,w=0;w<x;++w)a[w]=p[a[w]];for(var b=0,M=new Uint8Array(a.buffer.byteLength),j=0;j<e.lines;j++)for(var _=0;_<e.channels;_++){var g=o[_],C=g.nx*g.size,T=new Uint8Array(a.buffer,2*g.end,2*C);M.set(T,b),b+=2*C,g.end+=C}return new DataView(M.buffer)}function w(e){var t=e5(e.array.slice(e.offset.value,e.offset.value+e.size));let r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r),n=0,i=0,o=[,,,,];for(let r=0;r<e.lines;r++)for(let r=0;r<e.channels;r++){let r=0;switch(e.type){case 1:o[0]=n,o[1]=o[0]+e.width,n=o[1]+e.width;for(let n=0;n<e.width;++n)r+=t[o[0]++]<<8|t[o[1]++],a[i]=r,i++;break;case 2:o[0]=n,o[1]=o[0]+e.width,o[2]=o[1]+e.width,n=o[2]+e.width;for(let n=0;n<e.width;++n)r+=t[o[0]++]<<24|t[o[1]++]<<16|t[o[2]++]<<8,a[i]=r,i++}}return new DataView(a.buffer)}function b(e){var t=e.viewer,r={value:e.offset.value},a=new Uint8Array(e.width*e.lines*(e.channels*e.type*2)),n={version:C(t,r),unknownUncompressedSize:C(t,r),unknownCompressedSize:C(t,r),acCompressedSize:C(t,r),dcCompressedSize:C(t,r),rleCompressedSize:C(t,r),rleUncompressedSize:C(t,r),rleRawSize:C(t,r),totalAcUncompressedCount:C(t,r),totalDcUncompressedCount:C(t,r),acCompression:C(t,r)};if(n.version<2)throw"EXRLoader.parse: "+D.compression+" version "+n.version+" is unsupported";for(var i=[],o=F(t,r)-2;o>0;){var s=M(t.buffer,r),l=E(t,r),c=l>>2&3,u=new Int8Array([(l>>4)-1])[0],h=E(t,r);i.push({name:s,index:u,type:h,compression:c}),o-=s.length+3}for(var f=D.channels,p=Array(e.channels),m=0;m<e.channels;++m){var g=p[m]={},x=f[m];g.name=x.name,g.compression=0,g.decoded=!1,g.type=x.pixelType,g.pLinear=x.pLinear,g.width=e.width,g.height=e.lines}for(var w={idx:[,,,]},b=0;b<e.channels;++b)for(var g=p[b],m=0;m<i.length;++m){var j=i[m];g.name==j.name&&(g.compression=j.compression,j.index>=0&&(w.idx[j.index]=b),g.offset=b)}if(n.acCompressedSize>0)switch(n.acCompression){case 0:var S=new Uint16Array(n.totalAcUncompressedCount);d(e.array,t,r,n.acCompressedSize,S,n.totalAcUncompressedCount);break;case 1:var _=e.array.slice(r.value,r.value+n.totalAcUncompressedCount),T=e5(_),S=new Uint16Array(T.buffer);r.value+=n.totalAcUncompressedCount}if(n.dcCompressedSize>0){var A=new Uint16Array(y({array:e.array,offset:r,size:n.dcCompressedSize}).buffer);r.value+=n.dcCompressedSize}if(n.rleRawSize>0){var _=e.array.slice(r.value,r.value+n.rleCompressedSize),T=e5(_),I=v(T.buffer);r.value+=n.rleCompressedSize}for(var k=0,P=Array(p.length),m=0;m<P.length;++m)P[m]=[];for(var z=0;z<e.lines;++z)for(var O=0;O<p.length;++O)P[O].push(k),k+=p[O].width*e.type*2;!function(e,t,r,a,n,i){var o=new DataView(i.buffer),s=r[e.idx[0]].width,l=r[e.idx[0]].height,c=Math.floor(s/8),u=Math.ceil(s/8),h=Math.ceil(l/8),d=s-(u-1)*8,f=l-(h-1)*8,p={value:0},v=[,,,],m=[,,,],g=[,,,],y=[,,,],x=[,,,];for(let r=0;r<3;++r)x[r]=t[e.idx[r]],v[r]=r<1?0:v[r-1]+u*h,m[r]=new Float32Array(64),g[r]=new Uint16Array(64),y[r]=new Uint16Array(64*u);for(let t=0;t<h;++t){var w,b,M=8;t==h-1&&(M=f);var j=8;for(let e=0;e<u;++e){e==u-1&&(j=d);for(let e=0;e<3;++e){g[e].fill(0),g[e][0]=n[v[e]++],function(e,t,r){for(var a,n=1;n<64;)65280==(a=t[e.value])?n=64:a>>8==255?n+=255&a:(r[n]=a,n++),e.value++}(p,a,g[e]),w=g[e],(b=m[e])[0]=U(w[0]),b[1]=U(w[1]),b[2]=U(w[5]),b[3]=U(w[6]),b[4]=U(w[14]),b[5]=U(w[15]),b[6]=U(w[27]),b[7]=U(w[28]),b[8]=U(w[2]),b[9]=U(w[4]),b[10]=U(w[7]),b[11]=U(w[13]),b[12]=U(w[16]),b[13]=U(w[26]),b[14]=U(w[29]),b[15]=U(w[42]),b[16]=U(w[3]),b[17]=U(w[8]),b[18]=U(w[12]),b[19]=U(w[17]),b[20]=U(w[25]),b[21]=U(w[30]),b[22]=U(w[41]),b[23]=U(w[43]),b[24]=U(w[9]),b[25]=U(w[11]),b[26]=U(w[18]),b[27]=U(w[24]),b[28]=U(w[31]),b[29]=U(w[40]),b[30]=U(w[44]),b[31]=U(w[53]),b[32]=U(w[10]),b[33]=U(w[19]),b[34]=U(w[23]),b[35]=U(w[32]),b[36]=U(w[39]),b[37]=U(w[45]),b[38]=U(w[52]),b[39]=U(w[54]),b[40]=U(w[20]),b[41]=U(w[22]),b[42]=U(w[33]),b[43]=U(w[38]),b[44]=U(w[46]),b[45]=U(w[51]),b[46]=U(w[55]),b[47]=U(w[60]),b[48]=U(w[21]),b[49]=U(w[34]),b[50]=U(w[37]),b[51]=U(w[47]),b[52]=U(w[50]),b[53]=U(w[56]),b[54]=U(w[59]),b[55]=U(w[61]),b[56]=U(w[35]),b[57]=U(w[36]),b[58]=U(w[48]),b[59]=U(w[49]),b[60]=U(w[57]),b[61]=U(w[58]),b[62]=U(w[62]),b[63]=U(w[63]),function(e){let t=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),a=.5*Math.cos(3*3.14159/16),n=.5*Math.cos(3*3.14159/8);for(var i=[,,,,],o=[,,,,],s=[,,,,],l=[,,,,],c=0;c<8;++c){var u=8*c;i[0]=r*e[u+2],i[1]=n*e[u+2],i[2]=r*e[u+6],i[3]=n*e[u+6],o[0]=t*e[u+1]+a*e[u+3]+.2777854612564676*e[u+5]+.09754573032714427*e[u+7],o[1]=a*e[u+1]-.09754573032714427*e[u+3]-t*e[u+5]-.2777854612564676*e[u+7],o[2]=.2777854612564676*e[u+1]-t*e[u+3]+.09754573032714427*e[u+5]+a*e[u+7],o[3]=.09754573032714427*e[u+1]-.2777854612564676*e[u+3]+a*e[u+5]-t*e[u+7],s[0]=.35355362513961314*(e[u+0]+e[u+4]),s[3]=.35355362513961314*(e[u+0]-e[u+4]),s[1]=i[0]+i[3],s[2]=i[1]-i[2],l[0]=s[0]+s[1],l[1]=s[3]+s[2],l[2]=s[3]-s[2],l[3]=s[0]-s[1],e[u+0]=l[0]+o[0],e[u+1]=l[1]+o[1],e[u+2]=l[2]+o[2],e[u+3]=l[3]+o[3],e[u+4]=l[3]-o[3],e[u+5]=l[2]-o[2],e[u+6]=l[1]-o[1],e[u+7]=l[0]-o[0]}for(var h=0;h<8;++h)i[0]=r*e[16+h],i[1]=n*e[16+h],i[2]=r*e[48+h],i[3]=n*e[48+h],o[0]=t*e[8+h]+a*e[24+h]+.2777854612564676*e[40+h]+.09754573032714427*e[56+h],o[1]=a*e[8+h]-.09754573032714427*e[24+h]-t*e[40+h]-.2777854612564676*e[56+h],o[2]=.2777854612564676*e[8+h]-t*e[24+h]+.09754573032714427*e[40+h]+a*e[56+h],o[3]=.09754573032714427*e[8+h]-.2777854612564676*e[24+h]+a*e[40+h]-t*e[56+h],s[0]=.35355362513961314*(e[h]+e[32+h]),s[3]=.35355362513961314*(e[h]-e[32+h]),s[1]=i[0]+i[3],s[2]=i[1]-i[2],l[0]=s[0]+s[1],l[1]=s[3]+s[2],l[2]=s[3]-s[2],l[3]=s[0]-s[1],e[0+h]=l[0]+o[0],e[8+h]=l[1]+o[1],e[16+h]=l[2]+o[2],e[24+h]=l[3]+o[3],e[32+h]=l[3]-o[3],e[40+h]=l[2]-o[2],e[48+h]=l[1]-o[1],e[56+h]=l[0]-o[0]}(m[e])}for(var S=m,_=0;_<64;++_){var E=S[0][_],C=S[1][_],T=S[2][_];S[0][_]=E+1.5747*T,S[1][_]=E-.1873*C-.4682*T,S[2][_]=E+1.8556*C}for(let t=0;t<3;++t)!function(e,t,r){for(var a,n=0;n<64;++n){t[r+n]=R.DataUtils.toHalfFloat((a=e[n])<=1?Math.sign(a)*Math.pow(Math.abs(a),2.2):Math.sign(a)*Math.pow(9.025013291561939,Math.abs(a)-1))}}(m[t],y[t],64*e)}let i=0;for(let a=0;a<3;++a){let n=r[e.idx[a]].type;for(let e=8*t;e<8*t+M;++e){i=x[a][e];for(let t=0;t<c;++t){let r=64*t+(7&e)*8;o.setUint16(i+0*n,y[a][r+0],!0),o.setUint16(i+2*n,y[a][r+1],!0),o.setUint16(i+4*n,y[a][r+2],!0),o.setUint16(i+6*n,y[a][r+3],!0),o.setUint16(i+8*n,y[a][r+4],!0),o.setUint16(i+10*n,y[a][r+5],!0),o.setUint16(i+12*n,y[a][r+6],!0),o.setUint16(i+14*n,y[a][r+7],!0),i+=16*n}}if(c!=u)for(let e=8*t;e<8*t+M;++e){let t=x[a][e]+8*c*2*n,r=64*c+(7&e)*8;for(let e=0;e<j;++e)o.setUint16(t+2*e*n,y[a][r+e],!0)}}}for(var A=new Uint16Array(s),o=new DataView(i.buffer),F=0;F<3;
148++F){r[e.idx[F]].decoded=!0;var I=r[e.idx[F]].type;if(2==r[F].type)for(var k=0;k<l;++k){let e=x[F][k];for(var P=0;P<s;++P)A[P]=o.getUint16(e+2*P*I,!0);for(var P=0;P<s;++P)o.setFloat32(e+2*P*I,U(A[P]),!0)}}}(w,P,p,S,A,a);for(var m=0;m<p.length;++m){var g=p[m];if(!g.decoded)if(2===g.compression)for(var L=0,B=0,z=0;z<e.lines;++z){for(var N=P[m][L],W=0;W<g.width;++W){for(var H=0;H<2*g.type;++H)a[N++]=I[B+H*g.width*g.height];B++}L++}else throw"EXRLoader.parse: unsupported channel compression"}return new DataView(a.buffer)}function M(e,t){for(var r=new Uint8Array(e),a=0;0!=r[t.value+a];)a+=1;var n=new TextDecoder().decode(r.slice(t.value,t.value+a));return t.value=t.value+a+1,n}function j(e,t){var r=e.getInt32(t.value,!0);return t.value=t.value+4,r}function S(e,t){var r=e.getUint32(t.value,!0);return t.value=t.value+4,r}function _(e,t){var r=e[t.value];return t.value=t.value+1,r}function E(e,t){var r=e.getUint8(t.value);return t.value=t.value+1,r}let C=function(e,t){let r;return r="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,r};function T(e,t){var r=e.getFloat32(t.value,!0);return t.value+=4,r}function A(e,t){return R.DataUtils.toHalfFloat(T(e,t))}function U(e){var t=(31744&e)>>10,r=1023&e;return(e>>15?-1:1)*(t?31===t?r?NaN:1/0:Math.pow(2,t-15)*(1+r/1024):r/1024*6103515625e-14)}function F(e,t){var r=e.getUint16(t.value,!0);return t.value+=2,r}function I(e,t){return U(F(e,t))}let k=new DataView(e),P=new Uint8Array(e),z={value:0},D=function(e,t,r){let a={};if(0x1312f76!=e.getUint32(0,!0))throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";a.version=e.getUint8(4);let n=e.getUint8(5);a.spec={singleTile:!!(2&n),longName:!!(4&n),deepFormat:!!(8&n),multiPart:!!(16&n)},r.value=8;for(var i=!0;i;){var o=M(t,r);if(0==o)i=!1;else{var s=M(t,r),l=S(e,r),c=function(e,t,r,a,n){var i,o,s,l,c,u,h;if("string"===a||"stringvector"===a||"iccProfile"===a)return i=new TextDecoder().decode(new Uint8Array(t).slice(r.value,r.value+n)),r.value=r.value+n,i;if("chlist"===a)return function(e,t,r,a){for(var n=r.value,i=[];r.value<n+a-1;){var o=M(t,r),s=j(e,r),l=E(e,r);r.value+=3;var c=j(e,r),u=j(e,r);i.push({name:o,pixelType:s,pLinear:l,xSampling:c,ySampling:u})}return r.value+=1,i}(e,t,r,n);if("chromaticities"===a)return o=T(e,r),s=T(e,r),l=T(e,r),c=T(e,r),u=T(e,r),{redX:o,redY:s,greenX:l,greenY:c,blueX:u,blueY:T(e,r),whiteX:T(e,r),whiteY:T(e,r)};if("compression"===a)return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][E(e,r)];if("box2i"===a)return h=S(e,r),{xMin:h,yMin:S(e,r),xMax:S(e,r),yMax:S(e,r)};else if("lineOrder"===a)return["INCREASING_Y"][E(e,r)];else if("float"===a)return T(e,r);else if("v2f"===a)return[T(e,r),T(e,r)];else if("v3f"===a)return[T(e,r),T(e,r),T(e,r)];else if("int"===a)return j(e,r);else if("rational"===a)return[j(e,r),S(e,r)];else if("timecode"===a)return[S(e,r),S(e,r)];else return"preview"===a?(r.value+=n,"skipped"):(r.value+=n,void 0)}(e,t,r,s,l);void 0===c?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${s}'.`):a[o]=c}}if((-5&n)!=0)throw console.error("EXRHeader:",a),"THREE.EXRLoader: provided file is currently unsupported.";return a}(k,e,z),O=function(e,t,r,a,n){let i={size:0,viewer:t,array:r,offset:a,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:e.channels[0].pixelType,uncompress:null,getter:null,format:null,[tp?"colorSpace":"encoding"]:null};switch(e.compression){case"NO_COMPRESSION":i.lines=1,i.uncompress=m;break;case"RLE_COMPRESSION":i.lines=1,i.uncompress=g;break;case"ZIPS_COMPRESSION":i.lines=1,i.uncompress=y;break;case"ZIP_COMPRESSION":i.lines=16,i.uncompress=y;break;case"PIZ_COMPRESSION":i.lines=32,i.uncompress=x;break;case"PXR24_COMPRESSION":i.lines=16,i.uncompress=w;break;case"DWAA_COMPRESSION":i.lines=32,i.uncompress=b;break;case"DWAB_COMPRESSION":i.lines=256,i.uncompress=b;break;default:throw"EXRLoader.parse: "+e.compression+" is unsupported"}if(i.scanlineBlockSize=i.lines,1==i.type)switch(n){case R.FloatType:i.getter=I,i.inputSize=2;break;case R.HalfFloatType:i.getter=F,i.inputSize=2}else if(2==i.type)switch(n){case R.FloatType:i.getter=T,i.inputSize=4;break;case R.HalfFloatType:i.getter=A,i.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+i.type+" for "+e.compression+".";i.blockCount=(e.dataWindow.yMax+1)/i.scanlineBlockSize;for(var o=0;o<i.blockCount;o++)C(t,a);i.outputChannels=3==i.channels?4:i.channels;let s=i.width*i.height*i.outputChannels;switch(n){case R.FloatType:i.byteArray=new Float32Array(s),i.channels<i.outputChannels&&i.byteArray.fill(1,0,s);break;case R.HalfFloatType:i.byteArray=new Uint16Array(s),i.channels<i.outputChannels&&i.byteArray.fill(15360,0,s);break;default:console.error("THREE.EXRLoader: unsupported type: ",n)}
148return i.bytesPerLine=i.width*i.inputSize*i.channels,4==i.outputChannels?i.format=R.RGBAFormat:i.format=R.RedFormat,tp?i.colorSpace="srgb-linear":i.encoding=3e3,i}(D,k,P,z,this.type),L={value:0},B={R:0,G:1,B:2,A:3,Y:0};for(let e=0;e<O.height/O.scanlineBlockSize;e++){let t=S(k,z);O.size=S(k,z),O.lines=t+O.scanlineBlockSize>O.height?O.height-t:O.scanlineBlockSize;let r=O.size<O.lines*O.bytesPerLine?O.uncompress(O):m(O);z.value+=O.size;for(let t=0;t<O.scanlineBlockSize;t++){let a=t+e*O.scanlineBlockSize;if(a>=O.height)break;for(let e=0;e<O.channels;e++){let n=B[D.channels[e].name];for(let i=0;i<O.width;i++){L.value=(t*(O.channels*O.width)+e*O.width+i)*O.inputSize;let o=(O.height-1-a)*(O.width*O.outputChannels)+i*O.outputChannels+n;O.byteArray[o]=O.getter(r,L)}}}}return{header:D,width:O.width,height:O.height,data:O.byteArray,format:O.format,[tp?"colorSpace":"encoding"]:O[tp?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,r,a){return super.load(e,function(e,r){tp?e.colorSpace=r.colorSpace:e.encoding=r.encoding,e.minFilter=R.LinearFilter,e.magFilter=R.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,t&&t(e,r)},r,a)}}let tm=(e,t,r)=>{let a;switch(e){case p.UnsignedByteType:a=new Uint8ClampedArray(t*r*4);break;case p.HalfFloatType:a=new Uint16Array(t*r*4);break;case p.UnsignedIntType:a=new Uint32Array(t*r*4);break;case p.ByteType:a=new Int8Array(t*r*4);break;case p.ShortType:a=new Int16Array(t*r*4);break;case p.IntType:a=new Int32Array(t*r*4);break;case p.FloatType:a=new Float32Array(t*r*4);break;default:throw Error("Unsupported data type")}return a};class tg{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
148=e.colorSpace;const r={format:p.RGBAFormat,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:e.renderTargetOptions?.anisotropy!==void 0?e.renderTargetOptions?.anisotropy:1,generateMipmaps:e.renderTargetOptions?.generateMipmaps!==void 0&&e.renderTargetOptions?.generateMipmaps,magFilter:e.renderTargetOptions?.magFilter!==void 0?e.renderTargetOptions?.magFilter:p.LinearFilter,minFilter:e.renderTargetOptions?.minFilter!==void 0?e.renderTargetOptions?.minFilter:p.LinearFilter,samples:e.renderTargetOptions?.samples!==void 0?e.renderTargetOptions?.samples:void 0,wrapS:e.renderTargetOptions?.wrapS!==void 0?e.renderTargetOptions?.wrapS:p.ClampToEdgeWrapping,wrapT:e.renderTargetOptions?.wrapT!==void 0?e.renderTargetOptions?.wrapT:p.ClampToEdgeWrapping};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=tg.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new p.Scene,this._camera=new p.OrthographicCamera,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!((e,r,a,n)=>{if(void 0!==t)return t;let i=new p.WebGLRenderTarget(1,1,n);r.setRenderTarget(i);let o=new p.Mesh(new p.PlaneGeometry,new p.MeshBasicMaterial({color:0xffffff}));r.render(o,a),r.setRenderTarget(null);let s=tm(e,i.width,i.height);return r.readRenderTargetPixels(i,0,0,i.width,i.height,s),i.dispose(),o.geometry.dispose(),o.material.dispose(),t=0!==s[0]})(this._type,this._renderer,this._camera,r)){let e;this._type===p.HalfFloatType&&(e=this._renderer.extensions.has("EXT_color_buffer_float")?p.FloatType:void 0),void 0!==e?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${p.FloatType}`),this._type=e):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new p.Mesh(new p.PlaneGeometry,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new p.WebGLRenderTarget(this.width,this.height,r),this._renderTarget.texture.mapping=e.renderTargetOptions?.mapping!==void 0?e.renderTargetOptions?.mapping:p.UVMapping}static instantiateRenderer(){let e=new S.WebGLRenderer;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw Error("Can't read pixels in this browser");let e=tm(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){let t=new p.DataTexture(this.toArray(),this.width,this.height,p.RGBAFormat,this._type,e?.mapping||p.UVMapping,e?.wrapS||p.ClampToEdgeWrapping,e?.wrapT||p.ClampToEdgeWrapping,e?.magFilter||p.LinearFilter,e?.minFilter||p.LinearFilter,e?.anisotropy||1,p.LinearSRGBColorSpace);return t.generateMipmaps=e?.generateMipmaps!==void 0&&e?.generateMipmaps,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof p.ShaderMaterial&&Object.values(this.material.uniforms).forEach(e=>{e.value instanceof p.Texture&&e.value.dispose()}),Object.values(this.material).forEach(e=>{e instanceof p.Texture&&e.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}var ty=p;
148class tx extends Error{}class tw extends Error{}let tb=(e,t,r)=>{let a=RegExp(`${t}="([^"]*)"`,"i").exec(e);if(a)return a[1];let n=RegExp(`<${t}[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e);if(n){let e=n[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return e&&3===e.length?e.map(e=>e.replace(/<\/?rdf:li>/g,"")):n[1].trim()}if(void 0!==r)return r;throw Error(`Can't find ${t} in gainmap metadata`)};class tM{options;constructor(e){this.options={debug:!!e&&void 0!==e.debug&&e.debug,extractFII:!e||void 0===e.extractFII||e.extractFII,extractNonFII:!e||void 0===e.extractNonFII||e.extractNonFII}}extract(e){return new Promise((t,r)=>{let a,n=this.options.debug,i=new DataView(e.buffer);if(65496!==i.getUint16(0))return void r(Error("Not a valid jpeg"));let o=i.byteLength,s=2,l=0;for(;s<o;){if(++l>250)return void r(Error(`Found no marker after ${l} loops ðµ`));if(255!==i.getUint8(s))return void r(Error(`Not a valid marker at offset 0x${s.toString(16)}, found: 0x${i.getUint8(s).toString(16)}`));if(a=i.getUint8(s+1),n&&console.log(`Marker: ${a.toString(16)}`),226===a){n&&console.log("Found APP2 marker (0xffe2)");let e=s+4;if(0x4d504600===i.getUint32(e)){let a,n=e+4;if(18761===i.getUint16(n))a=!1;else{if(19789!==i.getUint16(n))return void r(Error("No valid endianness marker found in TIFF header"));a=!0}if(42!==i.getUint16(n+2,!a))return void r(Error("Not valid TIFF data! (no 0x002A marker)"));let o=i.getUint32(n+4,!a);if(o<8)return void r(Error("Not valid TIFF data! (First offset less than 8)"));let s=n+o,l=i.getUint16(s,!a),c=s+2,u=0;for(let e=c;e<c+12*l;e+=12)45057===i.getUint16(e,!a)&&(u=i.getUint32(e+8,!a));let h=s+2+12*l+4,d=[];for(let e=h;e<h+16*u;e+=16){let t={MPType:i.getUint32(e,!a),size:i.getUint32(e+4,!a),dataOffset:i.getUint32(e+8,!a),dependantImages:i.getUint32(e+12,!a),start:-1,end:-1,isFII:!1};t.dataOffset?(t.start=n+t.dataOffset,t.isFII=!1):(t.start=0,t.isFII=!0),t.end=t.start+t.size,d.push(t)}if(this.options.extractNonFII&&d.length){let e=new Blob([i]),r=[];for(let t of d){if(t.isFII&&!this.options.extractFII)continue;let a=e.slice(t.start,t.end+1,"image/jpeg");r.push(a)}t(r)}}}s+=2+i.getUint16(s+2)}})}}let tj=async e=>{let t=(e=>{let t,r=(t="u">typeof TextDecoder?new TextDecoder().decode(e):e.toString()).indexOf("<x:xmpmeta");for(;-1!==r;){let e=t.indexOf("x:xmpmeta>",r),a=t.slice(r,e+10);try{let e=tb(a,"hdrgm:GainMapMin","0"),t=tb(a,"hdrgm:GainMapMax"),r=tb(a,"hdrgm:Gamma","1"),n=tb(a,"hdrgm:OffsetSDR","0.015625"),i=tb(a,"hdrgm:OffsetHDR","0.015625"),o=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(a),s=o?o[1]:"0",l=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(a);if(!l)throw Error("Incomplete gainmap metadata");let c=l[1];return{gainMapMin:Array.isArray(e)?e.map(e=>parseFloat(e)):[parseFloat(e),parseFloat(e),parseFloat(e)],gainMapMax:Array.isArray(t)?t.map(e=>parseFloat(e)):[parseFloat(t),parseFloat(t),parseFloat(t)],gamma:Array.isArray(r)?r.map(e=>parseFloat(e)):[parseFloat(r),parseFloat(r),parseFloat(r)],offsetSdr:Array.isArray(n)?n.map(e=>parseFloat(e)):[parseFloat(n),parseFloat(n),parseFloat(n)],offsetHdr:Array.isArray(i)?i.map(e=>parseFloat(e)):[parseFloat(i),parseFloat(i),parseFloat(i)],hdrCapacityMin:parseFloat(s),hdrCapacityMax:parseFloat(c)}}catch(e){}r=t.indexOf("<x:xmpmeta",e)}})(e);if(!t)throw new tw("Gain map XMP metadata not found");let r=new tM({extractFII:!0,extractNonFII:!0}),a=await r.extract(e);if(2!==a.length)throw new tx("Gain map recovery image not found");return{sdr:new Uint8Array(await a[0].arrayBuffer()),gainMap:new Uint8Array(await a[1].arrayBuffer()),metadata:t}},tS=e=>new Promise((t,r)=>{let a=document.createElement("img");a.onload=()=>{t(a)},a.onerror=e=>{r(e)},a.src=URL.createObjectURL(e)});class t_ extends ty.Loader{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new ty.LoadingManager}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loa
148der will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");let e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new ty.Texture,sdr:new ty.Texture});return this._config.createQuadRenderer({width:16,height:16,type:ty.HalfFloatType,colorSpace:ty.LinearSRGBColorSpace,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,r){let a,n,i=t?new Blob([t],{type:"image/jpeg"}):void 0,o=new Blob([e],{type:"image/jpeg"}),s=!1;if("u"<typeof createImageBitmap){let e=await Promise.all([i?tS(i):Promise.resolve(void 0),tS(o)]);n=e[0],a=e[1],s="flipY"===r}else{let e=await Promise.all([i?createImageBitmap(i,{imageOrientation:r||"flipY"}):Promise.resolve(void 0),createImageBitmap(o,{imageOrientation:r||"flipY"})]);n=e[0],a=e[1]}return{sdrImage:a,gainMapImage:n,needsFlip:s}}createTextures(e,t,r){let a=new ty.Texture(t||new ImageData(2,2),ty.UVMapping,ty.ClampToEdgeWrapping,ty.ClampToEdgeWrapping,ty.LinearFilter,ty.LinearMipMapLinearFilter,ty.RGBAFormat,ty.UnsignedByteType,1,ty.LinearSRGBColorSpace);a.flipY=r,a.needsUpdate=!0;let n=new ty.Texture(e,ty.UVMapping,ty.ClampToEdgeWrapping,ty.ClampToEdgeWrapping,ty.LinearFilter,ty.LinearMipMapLinearFilter,ty.RGBAFormat,ty.UnsignedByteType,1,ty.SRGBColorSpace);return n.flipY=r,n.needsUpdate=!0,{gainMap:a,sdr:n}}updateQuadRenderer(e,t,r,a,n){e.width=t.width,e.height=t.height,e.material.gainMap=r,e.material.sdr=a,e.material.gainMapMin=n.gainMapMin,e.material.gainMapMax=n.gainMapMax,e.material.offsetHdr=n.offsetHdr,e.material.offsetSdr=n.offsetSdr,e.material.gamma=n.gamma,e.material.hdrCapacityMin=n.hdrCapacityMin,e.material.hdrCapacityMax=n.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,n.hdrCapacityMax),e.material.needsUpdate=!0}}var tE=p;let tC=` 149varying vec2 vUv; 150 151void main() { 152 vUv = uv; 153 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 154} 155`,tT=` 156// min half float value 157#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 ) 158// max half float value 159#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 ) 160 161uniform sampler2D sdr; 162uniform sampler2D gainMap; 163uniform vec3 gamma; 164uniform vec3 offsetHdr; 165uniform vec3 offsetSdr; 166uniform vec3 gainMapMin; 167uniform vec3 gainMapMax; 168uniform float weightFactor; 169 170varying vec2 vUv; 171 172void main() { 173 vec3 rgb = texture2D( sdr, vUv ).rgb; 174 vec3 recovery = texture2D( gainMap, vUv ).rgb; 175 vec3 logRecovery = pow( recovery, gamma ); 176 vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery; 177 vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr; 178 vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor )); 179 gl_FragColor = vec4( clampedHdrColor , 1.0 ); 180} 181`;class tA extends tE.ShaderMaterial{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:r,gainMapMin:a,gainMapMax:n,maxDisplayBoost:i,hdrCapacityMin:o,hdrCapacityMax:s,sdr:l,gainMap:c}){super({name:"GainMapDecoderMaterial",vertexShader:tC,fragmentShader:tT,uniforms:{sdr:{value:l},gainMap:{value:c},gamma:{value:new tE.Vector3(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new tE.Vector3().fromArray(t)},offsetSdr:{value:new tE.Vector3().fromArray(r)},gainMapMin:{value:new tE.Vector3().fromArray(a)},gainMapMax:{value:new tE.Vector3().fromArray(n)},weightFactor:{value:(Math.log2(i)-o)/(s-o)}},blending:tE.NoBlending,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=i,this._hdrCapacityMin=o,this._hdrCapacityMax=s,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){let e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){let t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){let e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}S.WebGLRenderer;class tU extends t_{constructor(e,t){super({renderer:e,createMaterial:e=>new tA(e),createQuadRenderer:e=>new tg(e)},t)}async render(e,t,r,a){let{sdrImage:n,gainMapImage:i,needsFlip:o}=await this.processImages(r,a,"flipY"),{gainMap:s,sdr:l}=this.createTextures(n,i,o);this.updateQuadRenderer(e,n,s,l,t),e.render()}}class tR extends tU{load([e,t,r],a,n,i){let o,s,l,c=this.prepareQuadRenderer(),u=async()=>
181{if(o&&s&&l){try{await this.render(c,l,o,s)}catch(a){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(r),"function"==typeof i&&i(a),c.disposeOnDemandRenderer();return}"function"==typeof a&&a(c),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(r),c.disposeOnDemandRenderer()}},h=!0,d=0,f=0,p=!0,v=0,m=0,g=!0,y=0,x=0,w=()=>{"function"==typeof n&&n(new ProgressEvent("progress",{lengthComputable:h&&p&&g,loaded:f+m+x,total:d+v+y}))};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(r);let b=new tE.FileLoader(this._internalLoadingManager);b.setResponseType("arraybuffer"),b.setRequestHeader(this.requestHeader),b.setPath(this.path),b.setWithCredentials(this.withCredentials),b.load(e,async e=>{if("string"==typeof e)throw Error("Invalid sdr buffer");o=e,await u()},e=>{h=e.lengthComputable,f=e.loaded,d=e.total,w()},t=>{this.manager.itemError(e),"function"==typeof i&&i(t)});let M=new tE.FileLoader(this._internalLoadingManager);M.setResponseType("arraybuffer"),M.setRequestHeader(this.requestHeader),M.setPath(this.path),M.setWithCredentials(this.withCredentials),M.load(t,async e=>{if("string"==typeof e)throw Error("Invalid gainmap buffer");s=e,await u()},e=>{p=e.lengthComputable,m=e.loaded,v=e.total,w()},e=>{this.manager.itemError(t),"function"==typeof i&&i(e)});let j=new tE.FileLoader(this._internalLoadingManager);return j.setRequestHeader(this.requestHeader),j.setPath(this.path),j.setWithCredentials(this.withCredentials),j.load(r,async e=>{if("string"!=typeof e)throw Error("Invalid metadata string");l=JSON.parse(e),await u()},e=>{g=e.lengthComputable,x=e.loaded,y=e.total,w()},e=>{this.manager.itemError(r),"function"==typeof i&&i(e)}),c}}class tF extends tU{load(e,t,r,a){let n=this.prepareQuadRenderer(),i=new tE.FileLoader(this._internalLoadingManager);return i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setPath(this.path),i.setWithCredentials(this.withCredentials),this.manager.itemStart(e),i.load(e,async r=>{let i,o,s;if("string"==typeof r)throw Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");let l=new Uint8Array(r);try{let e=await tj(l);i=e.sdr,o=e.gainMap,s=e.metadata}catch(t){if(t instanceof tw||t instanceof tx)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),s={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},i=l;else throw t}try{await this.render(n,s,i.buffer,o?.buffer)}catch(t){this.manager.itemError(e),"function"==typeof a&&a(t),n.disposeOnDemandRenderer();return}"function"==typeof t&&t(n),this.manager.itemEnd(e),n.disposeOnDemandRenderer()},r,t=>{this.manager.itemError(e),"function"==typeof a&&a(t)}),n}}let tI={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},tk="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",tP=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function tz({files:e=tP,path:t="",preset:r,colorSpace:a,extensions:n}={}){r&&(tL(r),e=tI[r],t=tk);let i=Array.isArray(e),{extension:o,isCubemap:s}=tB(e),l=tN(o);if(!l)throw Error("useEnvironment: Unrecognized file extension: "+e);let c=(0,d.useThree)(e=>e.gl);(0,u.useLayoutEffect)(()=>{("webp"===o||"jpg"===o||"jpeg"===o)&&c.domElement.addEventListener("webglcontextlost",function(){T.G.clear(l,i?[e]:e)},{once:!0})},[e,c.domElement]);let h=(0,T.G)(l,i?[e]:e,e=>{("webp"===o||"jpg"===o||"jpeg"===o)&&e.setRenderer(c),null==e.setPath||e.setPath(t),n&&n(e)}),f=i?h[0]:h;if("jpg"===o||"jpeg"===o||"webp"===o){var v;f=null==(v=f.renderTarget)?void 0:v.texture}return f.mapping=s?p.CubeReflectionMapping:p.EquirectangularReflectionMapping,f.colorSpace=null!=a?a:s?"srgb":"srgb-linear",f}let tD={files:tP,path:"",preset:void 0,extensions:void 0};tz.preload=e=>{let t={...tD,...e},{files:r,path:a=""}=t,{preset:n,extensions:i}=t;n&&(tL(n),r=tI[n],a=tk);let{extension:o}=tB(r);if("webp"===o||"jpg"===o||"jpeg"===o)throw Error("useEnvironment: Preloading gainmaps is not supported");let s=tN(o);if(!s)throw Error("useEnvironment: Unrecognized file extension: "+r);T.G.preload(s,Array.isArray(r)?[r]:r,e=>{null==e.setPath||e.setPath(a),i&&i(e)})};let tO={files:tP,preset:void 0};function tL(e){if(!(e in tI))throw Error("Preset must be one of: "+Object.keys(tI).join(", "))}function tB(e){var t;let r=Array.isArray(e)&&6===e.length,a=Array.isArray(e)&&3===e.length&&e.some(e=>e.endsWith("json")),n=Array.isArray(e)?e[0]:e;return{extension:r?"cube":a?"webp":n.startsWith("data:application/exr")?"exr":n.startsWith("data:application/hdr")?"hdr":n.startsWith("data:image/jpeg")?"jpg":null==(t=n.split(".").pop())||null==(t=t.split("?"))||null==(t=t.shift())?void 0:t.toLowerCase(),isCubemap:r,isGainmap:a}}function tN(e){return"cube"===e?p.CubeTextureLoader:"hdr"===e?U:"exr"===e?tv:"jpg"===e||"jpeg"===e?tF:"webp"===e?tR:null}function tW(e,t,r,a,n={}){var i,o,s,l,c;let u;n={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...n};let h=(u=c=t||r).current&&u.current.isScene?c.current:c,d=h.background,f=h.environment,p={backgroundBlurriness:h.backgroundBlurriness,backgroundIntensity:h.backgroundIntensity,backgroundRotation:null!=(i=null==(o=h.backgroundRotation)||null==o.clone?void 0:o.clone())?i:[0,0,0],environmentIntensity:h.environmentIntensity,environmentRotation:null!=(s=null==(l=h.environmentRotation)||null==l.clone?void 0:l.clone())?s:[0,0,0]};return"only"!==e&&(h.environment=a),e&&(h.background=a),(0,M.s)(h,n),()=>{"only"!==e&&(h.environment=f),e&&(h.background=d),(0,M.s)(h,p)}}function tH({scene:e,background:t=!1,map:r,...a}){let n=(0,d.useThree)(e=>e.scene);return u.useLayoutEffect(()=>{if(r)return tW(t,e,n,r,a)}),null}function tG({background:e=!1,scene:t,blur:r,backgroundBlurriness:a,backgroundIntensity:n,backgroundRotation:i,environmentIntensity:o,environmentRotation:s,...l}){let c=tz(l),h=(0,d.useThree)(e=>e.scene);return u.useLayoutEffect(()=>tW(e,t,h,c,{backgroundBlurriness:null!=r?r:a,backgroundIntensity:n,backgroundRotation:i,environmentIntensity:o,environmentRotation:s})),u.useEffect(()=>()=>{c.dispose()},[c]),null}function tV({children:e,near:t=.1,far:r=1e3,resolution:a=256,frames:n=1,map:i,background:o=!1,blur:s,backgroundBlurriness:l,backgroundIntensity:c,backgroundRotation:h,environmentIntensity:f,environmentRotation:v,scene:m,files:y,path:x,preset:w,extensions:M}){let j=(0,d.useThree)(e=>e.gl),_=(0,d.useThree)(e=>e.scene),E=u.useRef(null),[C]=u.useState(()=>new p.Scene),T=u.useMemo(()=>
181{let e=new S.WebGLCubeRenderTarget(a);return e.texture.type=p.HalfFloatType,e},[a]);u.useEffect(()=>()=>{T.dispose()},[T]),u.useLayoutEffect(()=>{if(1===n){let e=j.autoClear;j.autoClear=!0,E.current.update(j,C),j.autoClear=e}return tW(o,m,_,T.texture,{backgroundBlurriness:null!=s?s:l,backgroundIntensity:c,backgroundRotation:h,environmentIntensity:f,environmentRotation:v})},[e,C,T.texture,m,_,o,n,j]);let A=1;return(0,g.useFrame)(()=>{if(n===1/0||A<n){let e=j.autoClear;j.autoClear=!0,E.current.update(j,C),j.autoClear=e,A++}}),u.createElement(u.Fragment,null,(0,b.createPortal)(u.createElement(u.Fragment,null,e,u.createElement("cubeCamera",{ref:E,args:[t,r,T]}),y||w?u.createElement(tG,{background:!0,files:y,preset:w,path:x,extensions:M}):i?u.createElement(tH,{background:!0,map:i,extensions:M}):null),C))}function t$(e){var t,r,a,n;let i=tz(e),o=e.map||i;u.useMemo(()=>(0,j.e)({GroundProjectedEnvImpl:C}),[]),u.useEffect(()=>()=>{i.dispose()},[i]);let s=u.useMemo(()=>[o],[o]),l=null==(t=e.ground)?void 0:t.height,c=null==(r=e.ground)?void 0:r.radius,h=null!=(a=null==(n=e.ground)?void 0:n.scale)?a:1e3;return u.createElement(u.Fragment,null,u.createElement(tH,(0,m.default)({},e,{map:o})),u.createElement("groundProjectedEnvImpl",{args:s,scale:h,height:l,radius:c}))}function tq(e){return e.ground?u.createElement(t$,e):e.map?u.createElement(tH,e):e.children?u.createElement(tV,e):u.createElement(tG,e)}tz.clear=e=>{let t={...tO,...e},{files:r}=t,{preset:a}=t;a&&(tL(a),r=tI[a]);let{extension:n}=tB(r),i=tN(n);if(!i)throw Error("useEnvironment: Unrecognized file extension: "+r);T.G.clear(i,Array.isArray(r)?[r]:r)};var tX=e.i(88014);let tY=new p.Vector3,tZ=new p.Vector3,tQ=new p.Vector3,tK=new p.Vector2;function tJ(e,t,r){let a=tY.setFromMatrixPosition(e.matrixWorld);a.project(t);let n=r.width/2,i=r.height/2;return[a.x*n+n,-(a.y*i)+i]}let t0=e=>1e-10>Math.abs(e)?0:e;function t1(e,t,r=""){let a="matrix3d(";for(let r=0;16!==r;r++)a+=t0(t[r]*e.elements[r])+(15!==r?",":")");return r+a}let t2=(r=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>t1(e,r)),t3=(a=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>t1(e,a(t),"translate(-50%,-50%)")),t5=u.forwardRef(({children:e,eps:t=.001,style:r,className:a,prepend:n,center:i,fullscreen:o,portal:s,distanceFactor:l,sprite:c=!1,transform:h=!1,occlude:f,onOcclude:v,castShadow:y,receiveShadow:x,material:w,geometry:b,zIndexRange:M=[0x1000037,0],calculatePosition:j=tJ,as:S="div",wrapperClass:_,pointerEvents:E="auto",...C},T)=>{let{gl:A,camera:U,scene:R,size:F,raycaster:I,events:k,viewport:P}=(0,d.useThree)(),[z]=u.useState(()=>document.createElement(S)),D=u.useRef(null),O=u.useRef(null),L=u.useRef(0),B=u.useRef([0,0]),N=u.useRef(null),W=u.useRef(null),H=(null==s?void 0:s.current)||k.connected||A.domElement.parentNode,G=u.useRef(null),V=u.useRef(!1),$=u.useMemo(()=>{var e;return f&&"blending"!==f||Array.isArray(f)&&f.length&&(e=f[0])&&"object"==typeof e&&"current"in e},[f]);u.useLayoutEffect(()=>{let e=A.domElement;f&&"blending"===f?(e.style.zIndex=`${Math.floor(M[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[f]),u.useLayoutEffect(()=>{if(O.current){let e=D.current=tX.createRoot(z);if(R.updateMatrixWorld(),h)z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=j(O.current,U,F);z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return H&&(n?H.prepend(z):H.appendChild(z)),()=>{H&&H.removeChild(z),e.unmount()}}},[H,h]),u.useLayoutEffect(()=>{_&&(z.className=_)},[_]);let q=u.useMemo(()=>h?{position:"absolute",top:0,left:0,width:F.width,height:F.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:i?"translate3d(-50%,-50%,0)":"none",...o&&{top:-F.height/2,left:-F.width/2,width:F.width,height:F.height},...r},[r,i,o,F,h]),X=u.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);u.useLayoutEffect(()=>{var t,n;V.current=!1,h?null==(t=D.current)||t.render(u.createElement("div",{ref:N,style:q},u.createElement("div",{ref:W,style:X},u.createElement("div",{ref:T,className:a,style:r,children:e})))):null==(n=D.current)||n.render(u.createElement("div",{ref:T,style:q,className:a,children:e}))});let Y=u.useRef(!0);(0,g.useFrame)(e=>{if(O.current){U.updateMatrixWorld(),O.current.updateWorldMatrix(!0,!1);let e=h?B.current:j(O.current,U,F);if(h||Math.abs(L.current-U.zoom)>t||Math.abs(B.current[0]-e[0])>t||Math.abs(B.current[1]-e[1])>t){var r;let t,a,n,i,o=(r=O.current,t=tY.setFromMatrixPosition(r.matrixWorld),a=tZ.setFromMatrixPosition(U.matrixWorld),n=t.sub(a),i=U.getWorldDirection(tQ),n.angleTo(i)>Math.PI/2),s=!1;$&&(Array.isArray(f)?s=f.map(e=>e.current):"blending"!==f&&(s=[R]));let u=Y.current;s?Y.current=function(e,t,r,a){let n=tY.setFromMatrixPosition(e.matrixWorld),i=n.clone();i.project(t),tK.set(i.x,i.y),r.setFromCamera(tK,t);let o=r.intersectObjects(a,!0);if(o.length){let e=o[0].distance;return n.distanceTo(r.ray.origin)<e}return!0}(O.current,U,I,s)&&!o:Y.current=!o,u!==Y.current&&(v?v(!Y.current):z.style.display=Y.current?"block":"none");let d=Math.floor(M[0]/2),m=f?$?[M[0],d]:[d-1,0]:M;if(z.style.zIndex=`${function(e,t,r){if(t instanceof p.PerspectiveCamera||t instanceof p.Orthogra
181phicCamera){let a=tY.setFromMatrixPosition(e.matrixWorld),n=tZ.setFromMatrixPosition(t.matrixWorld),i=a.distanceTo(n),o=(r[1]-r[0])/(t.far-t.near),s=r[1]-o*t.far;return Math.round(o*i+s)}}(O.current,U,m)}`,h){let[e,t]=[F.width/2,F.height/2],r=U.projectionMatrix.elements[5]*t,{isOrthographicCamera:a,top:n,left:i,bottom:o,right:s}=U,u=t2(U.matrixWorldInverse),h=a?`scale(${r})translate(${t0(-(s+i)/2)}px,${t0((n+o)/2)}px)`:`translateZ(${r}px)`,d=O.current.matrixWorld;c&&((d=U.matrixWorldInverse.clone().transpose().copyPosition(d).scale(O.current.scale)).elements[3]=d.elements[7]=d.elements[11]=0,d.elements[15]=1),z.style.width=F.width+"px",z.style.height=F.height+"px",z.style.perspective=a?"":`${r}px`,N.current&&W.current&&(N.current.style.transform=`${h}${u}translate(${e}px,${t}px)`,W.current.style.transform=t3(d,1/((l||10)/400)))}else{let t=void 0===l?1:function(e,t){if(t instanceof p.OrthographicCamera)return t.zoom;if(!(t instanceof p.PerspectiveCamera))return 1;{let r=tY.setFromMatrixPosition(e.matrixWorld),a=tZ.setFromMatrixPosition(t.matrixWorld);return 1/(2*Math.tan(t.fov*Math.PI/180/2)*r.distanceTo(a))}}(O.current,U)*l;z.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}B.current=e,L.current=U.zoom}}if(!$&&G.current&&!V.current)if(h){if(N.current){let e=N.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){let{isOrthographicCamera:t}=U;if(t||b)C.scale&&(Array.isArray(C.scale)?C.scale instanceof p.Vector3?G.current.scale.copy(C.scale.clone().divideScalar(1)):G.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):G.current.scale.setScalar(1/C.scale));else{let t=(l||10)/400,r=e.clientWidth*t,a=e.clientHeight*t;G.current.scale.set(r,a,1)}V.current=!0}}}else{let t=z.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){let e=1/P.factor,r=t.clientWidth*e,a=t.clientHeight*e;G.current.scale.set(r,a,1),V.current=!0}G.current.lookAt(e.camera.position)}});let Z=u.useMemo(()=>({vertexShader:h?void 0:` 182 /* 183 This shader is from the THREE's SpriteMaterial. 184 We need to turn the backing plane into a Sprite 185 (make it always face the camera) if "transfrom" 186 is false. 187 */ 188 #include <common> 189 190 void main() { 191 vec2 center = vec2(0., 1.); 192 float rotation = 0.0; 193 194 // This is somewhat arbitrary, but it seems to work well 195 // Need to figure out how to derive this dynamically if it even matters 196 float size = 0.03; 197 198 vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); 199 vec2 scale; 200 scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); 201 scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); 202 203 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 204 if ( isPerspective ) scale *= - mvPosition.z; 205 206 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; 207 vec2 rotatedPosition; 208 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 209 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 210 mvPosition.xy += rotatedPosition; 211 212 gl_Position = projectionMatrix * mvPosition; 213 } 214 `,fragmentShader:` 215 void main() { 216 gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); 217 } 218 `}),[h]);return u.createElement("group",(0,m.default)({},C,{ref:O}),f&&!$&&u.createElement("mesh",{castShadow:y,receiveShadow:x,ref:G},b||u.createElement("planeGeometry",null),w||u.createElement("shaderMaterial",{side:p.DoubleSide,vertexShader:Z.vertexShader,fragmentShader:Z.fragmentShader})))});var M=M;let t4=u.forwardRef(({light:e,args:t,map:r,toneMapped:a=!1,color:n="white",form:i="rect",intensity:o=1,scale:s=1,target:l=[0,0,0],children:c,...h},d)=>{let f=u.useRef(null);return u.useImperativeHandle(d,()=>f.current,[]),u.useLayoutEffect(()=>{c||h.material||((0,M.s)(f.current.material,{color:n}),f.current.material.color.multiplyScalar(o))},[n,o,c,h.material]),u.useLayoutEffect(()=>{h.rotation||f.current.quaternion.identity(),l&&!h.rotation&&("boolean"==typeof l?f.current.lookAt(0,0,0):f.current.lookAt(Array.isArray(l)?new p.Vector3(...l):l))},[l,h.rotation]),s=Array.isArray(s)&&2===s.length?[s[0],s[1],1]:s,u.createElement("mesh",(0,m.default)({ref:f,scale:s},h),"circle"===i?u.createElement("ringGeometry",{args:t||[0,.5,64]}):"ring"===i?u.createElement("ringGeometry",{args:t||[.25,.5,64]}):"rect"===i||"plane"===i?u.createElement("planeGeometry",{args:t||[1,1]}):"box"===i?u.createElement("boxGeometry",{args:t||[1,1,1]}):u.createElement(i,{args:t}),c||u.createElement("meshBasicMaterial",{toneMapped:a,map:r,side:p.DoubleSide}),e&&u.createElement("pointLight",(0,m.default)({castShadow:!0}
218,e)))}),t6=u.forwardRef(function({args:[e=1,t=1,r=1]=[],radius:a=.05,steps:n=1,smoothness:i=4,bevelSegments:o=4,creaseAngle:s=.4,children:l,...c},h){return u.createElement("mesh",(0,m.default)({ref:h},c),u.createElement(t8,{args:[e,t,r],radius:a,steps:n,smoothness:i,bevelSegments:o,creaseAngle:s}),l)}),t8=u.forwardRef(function({args:[e=1,t=1,r=1]=[],radius:a=.05,steps:n=1,smoothness:i=4,bevelSegments:o=4,creaseAngle:s=.4,...l},c){let h=u.useMemo(()=>{let r,n;return r=new p.Shape,n=a-1e-5,r.absarc(1e-5,1e-5,1e-5,-Math.PI/2,-Math.PI,!0),r.absarc(1e-5,t-2*n,1e-5,Math.PI,Math.PI/2,!0),r.absarc(e-2*n,t-2*n,1e-5,Math.PI/2,0,!0),r.absarc(e-2*n,1e-5,1e-5,0,-Math.PI/2,!0),r},[e,t,a]),d=u.useMemo(()=>({depth:r-2*a,bevelEnabled:!0,bevelSegments:2*o,steps:n,bevelSize:a-1e-5,bevelThickness:a,curveSegments:i}),[r,a,i,o,n]),f=u.useRef(null);return u.useLayoutEffect(()=>{f.current&&(f.current.center(),function(e,t=Math.PI/3){let r=Math.cos(t),a=(1+1e-10)*100,n=[new p.Vector3,new p.Vector3,new p.Vector3],i=new p.Vector3,o=new p.Vector3,s=new p.Vector3,l=new p.Vector3;function c(e){let t=~~(e.x*a),r=~~(e.y*a),n=~~(e.z*a);return`${t},${r},${n}`}let u=e.index?e.toNonIndexed():e,h=u.attributes.position,d={};for(let e=0,t=h.count/3;e<t;e++){let t=3*e,r=n[0].fromBufferAttribute(h,t+0),a=n[1].fromBufferAttribute(h,t+1),s=n[2].fromBufferAttribute(h,t+2);i.subVectors(s,a),o.subVectors(r,a);let l=new p.Vector3().crossVectors(i,o).normalize();for(let e=0;e<3;e++){let t=c(n[e]);t in d||(d[t]=[]),d[t].push(l)}}let f=new Float32Array(3*h.count),v=new p.BufferAttribute(f,3,!1);for(let e=0,t=h.count/3;e<t;e++){let t=3*e,a=n[0].fromBufferAttribute(h,t+0),u=n[1].fromBufferAttribute(h,t+1),f=n[2].fromBufferAttribute(h,t+2);i.subVectors(f,u),o.subVectors(a,u),s.crossVectors(i,o).normalize();for(let e=0;e<3;e++){let a=d[c(n[e])];l.set(0,0,0);for(let e=0,t=a.length;e<t;e++){let t=a[e];s.dot(t)>r&&l.add(t)}l.normalize(),v.setXYZ(t+e,l.x,l.y,l.z)}}u.setAttribute("normal",v)}(f.current,s))},[h,d,s]),u.useImperativeHandle(c,()=>f.current),u.createElement("extrudeGeometry",(0,m.default)({ref:f,args:[h,d]},l))});var t7=e.i(72328),t9=e.i(70023),re=e.i(10289),rt=e.i(93886),rr=e.i(52008),ra=e.i(83086),rn=e.i(94771),ri=e.i(19656),ro=e.i(44089),rs=e.i(70960),rl=e.i(79151),rc=e.i(78790),ru=e.i(37058);let rh={meta:{cachedAt:0,ttlSeconds:0,projectIds:[]},projects:{total:7,ready:6,building:1,failed:0,pending:0,archived:0},annotations:{total:129,open:36,inReview:12,resolved:80,wontFix:1,reopened:0,unread:4,assignedToMe:8,bySeverity:{critical:2,high:17,normal:96,low:14},byType:{point:94,area:18,console:10,network:7},openCritical:2,duplicates:6,withScreenshots:108},ai:{fixesReady:94,fixesPending:23,fixesFailed:8,suggestedFixes:32},builds:{total:140,success:132,failed:6,building:1,queued:1,cancelled:0,last7Days:28,cacheHits:90,avgDurationSeconds:42},sessions:{total:200,active:0,ended:200,uniqueReviewers:12,byType:{hosted:120,extension:60,guest:20}},sla:{totalBreaches:0,bySeverity:{critical:0,high:0,normal:0,low:0}},team:{totalMembers:12,developers:7,clients:4,guests:1,totalComments:240},integrations:{total:10,connectedProjects:7,byProvider:{github:7}},tickets:{total:48,open:12,resolved:36,cancelled:0}},rd=[{type:"header",content:"@@ Navigation / accessible labels @@"},{type:"unchanged",content:"const navigation = [",lineNum:{old:137,new:137}},{type:"unchanged",content:" {",lineNum:{old:138,new:138}},{type:"removed",content:" title: 'Certificates',",lineNum:{old:139}},{type:"added",content:" title: 'Our Certificates',",lineNum:{new:139}},{type:"unchanged",content:" href: '/certificates',",lineNum:{old:140,new:140}},{type:"unchanged",content:" },",lineNum:{old:141,new:141}},{type:"unchanged",content:"];",lineNum:{old:142,new:142}}];function rf({kind:e}){let t=(0,t7.useReducedMotion)(),[r,a]=(0,u.useState)(0);(0,u.useEffect)(()=>{if(!1!==t)return;let e=window.setInterval(()=>{document.hidden||a(e=>(e+1)%4)},8e3);return()=>window.clearInterval(e)},[t]);let i="Overview"===e,o="AI Investigation"===e,s="Annotations"===e;return(0,n.jsx)("div",{className:"dark","aria-hidden":"true",inert:!0,style:{width:1e3,height:633,overflow:"hidden",background:"#030709",color:"#e8f4f8",pointerEvents:"none",filter:"brightness(0.62) saturate(0.85)"},children:(0,n.jsxs)("div",{className:"flex h-full",children:[(0,n.jsxs)("aside",{className:"w-40 shrink-0 border-r border-white/10 bg-cyan-950/10 p-5",children:[(0,n.jsxs)("div",{className:"mb-10 text-xl font-semibold text-cyan-400",children:["claron",(0,n.jsx)("span",{className:"text-sm",children:".dev"})]}),(0,n.jsx)("div",{className:"space-y-5 text-sm text-zinc-400",children:[[rr.Layers,"Overview"],[re.Bug,"Annotations"],[rt.Film,"Replays"],[ra.Sparkles,"AI Fixes"]].map(([e,t])=>(0,n.jsxs)("div",{className:`flex items-center gap-2 ${String(t)===(i?"Overview":o?"AI Fixes":s?"Annotations":"Replays")?"text-cyan-400":""}`,children:[(0,n.jsx)(e,{size:16}),String(t)]},String(t)))})]}),(0,n.jsxs)("main",{className:"relative min-w-0 flex-1",children:[(0,n.jsxs)("header",{className:"flex h-12 items-center justify-between border-b border-white/10 px-6",children:[(0,n.jsx)("span",{className:"text-xs text-cyan-400",children:"WORKSPACE ONLINE"}),(0,n.jsx)(rc.Badge,{variant:"cyan",children:"Demo workspace"})]}),(0,n.jsxs)("div",{className:"px-6 py-5",children:[(0,n.jsx)("h2",{className:"text-3xl font-semibold",children:e}),(0,n.jsx)("p",{className:"mt-2 text-sm text-zinc-400",children:i?"Monitor projects, review feedback, and track automated resolutions.":o?"Review the proposed fix and verify every change.":s?"Capture feedback. Investigate. Resolve.":"Review recorded sessions with full interaction context."})]}),i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ri.DashboardStats,{loading:!1,stats:rh,projectsCount:7}
218),(0,n.jsx)(ro.DashboardAnalytics,{loading:!1,stats:rh})]}):o?(0,n.jsxs)("div",{className:"space-y-5 px-6",children:[(0,n.jsxs)(rl.Card,{variant:"ai",className:"flex items-center justify-between p-4",children:[(0,n.jsxs)("span",{className:"flex items-center gap-3",children:[(0,n.jsx)(ra.Sparkles,{size:20}),"AI Fix Suggestion"]}),(0,n.jsx)(rc.Badge,{variant:"emerald",children:"95% confidence"})]}),(0,n.jsx)(rs.DiffViewer,{title:"src/components/Navigation.tsx",lines:rd}),(0,n.jsxs)(rl.Card,{variant:"node",className:"flex items-center gap-3 p-4",children:[(0,n.jsx)(rn.CheckCheck,{size:20}),"Checks passed · Awaiting human verification"]})]}):(0,n.jsxs)("div",{className:"space-y-4 px-6",children:[(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(rc.Badge,{variant:"cyan",children:s?"All sources":"All projects"}),(0,n.jsx)(rc.Badge,{children:s?"By status":"Recorded sessions"})]}),(0,n.jsx)(ru.DataList,{rows:(s?["Review navigation labels","Capture screenshot evidence","Verify keyboard navigation","Review AI suggestion","Confirm resolution"]:["Navigation review · 3m 52s","Checkout validation · 1m 24s","Mobile menu · 2m 07s","Search interactions · 48s","Account settings · 1m 16s"]).map((e,t)=>({label:e,value:(0,n.jsx)(rc.Badge,{variant:0===t?"amber":"emerald",children:0===t?"In review":"Completed"})}))}),(0,n.jsx)(rl.Card,{variant:"primary",className:"p-4",children:(0,n.jsx)(ru.DataList,{rows:[{label:s?"Screenshot evidence":"Interaction path",value:"Captured"},{label:"Console & network",value:"Available"},{label:"Human verification",value:"Required"}]})})]}),(0,n.jsxs)("div",{className:"absolute inset-x-0 bottom-0 border-t border-cyan-900/50 bg-[#03090d] px-6 py-3",children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center justify-between text-xs text-zinc-400",children:[(0,n.jsx)("span",{className:t9.default.status,children:(o?["Inspecting source context","Preparing suggested fix","Running verification checks","Ready for human review"]:i?["Receiving annotation evidence","Linking replay context","Investigating source changes","Preparing review handoff"]:["Capturing interaction events","Linking console and network","Indexing screenshot evidence","Session ready for review"])[r]},r),(0,n.jsx)("span",{className:"text-cyan-400",children:"DEMO ACTIVITY"})]}),(0,n.jsx)("div",{className:"h-0.5 overflow-hidden bg-cyan-950",children:(0,n.jsx)("div",{className:`h-full bg-cyan-400 ${t9.default.progress}`},r)})]})]})]})})}function rp(){let e=(0,t7.useReducedMotion)(),t=(0,d.useThree)(e=>e.invalidate),r=(0,u.useRef)(0),a=(0,u.useRef)(null),i=(0,u.useRef)([]);return(0,u.useEffect)(()=>{let e=()=>{document.hidden||t()};return document.addEventListener("visibilitychange",e),t(),()=>document.removeEventListener("visibilitychange",e)},[t,e]),(0,g.useFrame)((n,o)=>{if(!1!==e||document.hidden)return;r.current+=Math.min(o,.05);let s=r.current;a.current&&(a.current.rotation.y=.16*s),i.current.forEach((e,t)=>{if(!e)return;let r=(s/7+t/4)%1;e.position.y=-.4+3.3*r,e.material.opacity=.85*Math.sin(r*Math.PI)}),t()}),(0,n.jsxs)("group",{children:[(0,n.jsx)("group",{ref:a,position:[0,-1.459,0],children:[0,Math.PI].map(e=>(0,n.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],children:[(0,n.jsx)("ringGeometry",{args:[1.91,1.927,40,1,e,.7]}),(0,n.jsx)("meshBasicMaterial",{color:"#86e8ff",transparent:!0,opacity:.7,depthWrite:!1})]},e))}),[-4.1,-2.1,2.1,4.1].map((e,t)=>(0,n.jsxs)("mesh",{ref:e=>{i.current[t]=e},position:[e,.4+.6*t,-2.455],children:[(0,n.jsx)("boxGeometry",{args:[.025,.24,.012]}),(0,n.jsx)("meshBasicMaterial",{color:"#b8efff",transparent:!0,opacity:.55,depthWrite:!1})]},e))]})}let rv="varying vec2 vUv; void main(){vUv=uv;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}";function rm({count:e=150}){let t=(0,t7.useReducedMotion)(),r=(0,u.useRef)(null),[a]=(0,u.useState)(()=>(function(e){let t=[];for(let r=0;r<e;r++)t.push({pos:[(Math.random()-.5)*25,-2+10*Math.random(),-1-5*Math.random()],speed:.05+.1*Math.random(),offset:Math.random()*Math.PI*2,scale:.003+.012*Math.random()});return t})(e)),i=(0,u.useMemo)(()=>new p.Matrix4,[]),o=(0,u.useMemo)(()=>new p.Vector3,[]);return(0,g.useFrame)(n=>{if(!r.current||!1!==t)return;
218let s=.3*n.clock.elapsedTime;for(let t=0;t<e;t++){let e=a[t],n=e.pos[0]+.6*Math.sin(s*e.speed+e.offset),l=e.pos[1]+.4*Math.cos(s*e.speed*.8+e.offset);i.makeTranslation(n,l,e.pos[2]),o.set(e.scale,e.scale,e.scale),i.scale(o),r.current.setMatrixAt(t,i)}r.current.instanceMatrix.needsUpdate=!0}),(0,n.jsxs)("instancedMesh",{ref:r,args:[void 0,void 0,e],children:[(0,n.jsx)("sphereGeometry",{args:[1,4,4]}),(0,n.jsx)("meshBasicMaterial",{color:"#2a7b93",transparent:!0,opacity:.3,blending:p.AdditiveBlending,depthWrite:!1})]})}function rg(){let e=(0,u.useRef)(null),[t]=(0,u.useState)(()=>({uTime:{value:0}})),r=(0,t7.useReducedMotion)();return(0,g.useFrame)(t=>{!1===r&&e.current&&(e.current.uniforms.uTime.value=.1*t.clock.elapsedTime)}),(0,n.jsxs)("mesh",{position:[0,2,-4],children:[(0,n.jsx)("planeGeometry",{args:[30,20]}),(0,n.jsx)("shaderMaterial",{ref:e,uniforms:t,transparent:!0,depthWrite:!1,blending:p.AdditiveBlending,vertexShader:rv,fragmentShader:` 219 varying vec2 vUv; uniform float uTime; 220 void main(){ 221 vec2 uv = (vUv - 0.5) * 2.0; // -1 to 1 222 float t = uTime; 223 224 // Create angled light rays 225 float angle = 0.15; // slight outward tilt 226 float x = uv.x * cos(angle) - uv.y * sin(angle); 227 228 // Rays using combined sine waves for an organic, shifting look 229 float rays = 0.0; 230 rays += sin(x * 8.0 + t * 2.0) * 0.5 + 0.5; 231 rays += sin(x * 18.0 - t * 1.5) * 0.5 + 0.5; 232 rays += sin(x * 3.0 + t * 0.5) * 0.5 + 0.5; 233 rays /= 3.0; // normalize 234 235 // Sharpen rays 236 rays = pow(rays, 3.0); 237 238 // Fade vertically (stronger at top, fades completely at bottom floor) 239 float verticalFade = smoothstep(-0.8, 1.0, uv.y); 240 241 // Mask out the absolute center so rays appear mostly on the sides to frame the architecture 242 float centerMask = smoothstep(0.0, 0.4, abs(uv.x)); 243 244 // Dark, subtle moody teal color 245 vec3 rayColor = vec3(0.01, 0.08, 0.15); 246 247 gl_FragColor = vec4(rayColor * rays * verticalFade * centerMask, 1.0); 248 }`})]})}function ry(){let e=(0,u.useRef)(null),[t]=(0,u.useState)(()=>({uTime:{value:0}})),r=(0,t7.useReducedMotion)();return(0,g.useFrame)(t=>{!1===r&&e.current&&(e.current.uniforms.uTime.value=.1*t.clock.elapsedTime)}),(0,n.jsxs)("mesh",{position:[0,2,-8],children:[(0,n.jsx)("planeGeometry",{args:[50,30]}),(0,n.jsx)("shaderMaterial",{ref:e,uniforms:t,depthWrite:!1,transparent:!0,vertexShader:rv,fragmentShader:` 249 varying vec2 vUv; 250 uniform float uTime; 251 252 // Classic 2D Simplex Noise 253 vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } 254 vec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } 255 vec3 permute(vec3 x) { return mod289(((x*34.0)+1.0)*x); } 256 float snoise(vec2 v) { 257 const vec4 C = vec4(0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439); 258 vec2 i = floor(v + dot(v, C.yy) ); 259 vec2 x0 = v - i + dot(i, C.xx); 260 vec2 i1; i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); 261 vec4 x12 = x0.xyxy + C.xxzz; 262 x12.xy -= i1; 263 i = mod289(i); 264 vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 )) + i.x + vec3(0.0, i1.x, 1.0 )); 265 vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); 266 m = m*m ; m = m*m ; 267 vec3 x = 2.0 * fract(p * C.www) - 1.0; 268 vec3 h = abs(x) - 0.5; 269 vec3 ox = floor(x + 0.5); 270 vec3 a0 = x - ox; 271 m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); 272 vec3 g; 273 g.x = a0.x * x0.x + h.x * x0.y; 274 g.yz = a0.yz * x12.xz + h.yz * x12.yw; 275 return 130.0 * dot(m, g); 276 } 277 278 void main() { 279 vec2 uv = vUv; 280 float t = uTime; 281 282 // Base luxury midnight blue (very dark) 283 vec3 color = vec3(0.005, 0.01, 0.015); 284 285 // Smooth, large scale fluid noise for the aurora effect 286 float n1 = snoise(uv * 1.5 + vec2(t * 0.15, t * 0.1)); 287 float n2 = snoise(uv * 2.5 - vec2(t * 0.1, -t * 0.2)); 288 float n3 = snoise(uv * 4.0 + vec2(sin(t*0.2), cos(t*0.2))); 289 290 float fluid = (n1 + n2 * 0.5 + n3 * 0.25); 291 292 // Normalize fluid to roughly 0-1 293 fluid = fluid * 0.5 + 0.5; 294 // Increase contrast 295 fluid = smoothstep(0.1, 0.9, fluid); 296 297 // Deeper, richer cyan/teal palette 298 vec3 deepTeal = vec3(0.005, 0.04, 0.08); 299 vec3 midCyan = vec3(0.01, 0.15, 0.25); 300 vec3 highlight = vec3(0.02, 0.3, 0.4); 301 302 color = mix(color, deepTeal, smoothstep(0.1, 0.5, fluid)); 303 color = mix(color, midCyan, smoothstep(0.4, 0.8, fluid) * 0.6); 304 color = mix(color, highlight, smoothstep(0.7, 1.0, fluid) * 0.4); 305 306 // Add a radial vignette to ground it and focus attention on center 307 float dist = length(uv - 0.5); 308 float vignette = smoothstep(0.8, 0.2, dist); 309 color *= vignette * 1.5; 310 311 // Smooth fade to floor (y=0 in UV space is the bottom edge of the plane) 312 float floorFade = smoothstep(0.0, 0.2, uv.y); 313 color *= floorFade; 314 315 gl_FragColor = vec4(color, 1.0); 316 } 317 `})]})}function rx(){let e=(0,u.useMemo)(()=>{let e=new p.Object3D;return e.position.set(0,-.7,.25),e},[]);return(0,n.jsxs)("group",{children:[(0,n.jsxs)("mesh",{position:[0,2,-10],children:[(0,n.jsx)("planeGeometry",{args:[60,40]}),(0,n.jsx)("meshBasicMaterial",{color:"#010204",depthWrite:!1})]}),(0,n.jsx)(ry,{}),(0,n.jsx)(rg,{}),(0,n.jsx)(rm,{count:150}),(0,n.jsx)("primitive",{object:e}),(0,n.jsx)("spotLight",{position:[0,3.35,1.3],target:e,color:"#d2f5ff",intensity:14,angle:.43,penumbra:.85,distance:8,decay:2}),(0,n.jsxs)("mesh",{position:[0,.75,-.25],children:[(0,n.jsx)("planeGeometry",{args:[4.6,5]}),(0,n.jsx)("shaderMaterial",{transparent:!0,depthWrite:!1,blending:p.AdditiveBlending,vertexShader:rv,fragmentShader:`varying vec2 vUv; void main(){ 318 float down=1.-vUv.y; 319 float width=.045+down*.44; 320 float beam=1.-smoothstep(width*.35,width,abs(vUv.x-.5)); 321 float fade=smoothstep(0.,.18,vUv.y)*(1.-smoothstep(.88,1.,vUv.y)); 322 // Darker, richer cyan glow behind the mascot 323 gl_FragColor=vec4(.15,.45,.65,beam*fade*.04); 324 }`})]})]})}let rw="#00a9d8";function rb({at:e,size:t,color:r="#14232d",roughness:a=.36,metalness:i=.48}){return(0,n.jsx)(t6,{position:e,args:t,radius:Math.min(.06,...t.map(e=>e/3)),smoothness:5,children:(0,n.jsx)("meshStandardMaterial",{color:r,roughness:a,metalness:i})})}function rM({at:e,width:t,kind:r,angle:a=0}){let i=633*t/1e3;return(0,n.jsxs)("group",{position:e,rotation:[0,a,0],children:[(0,n.jsx)(rb,{at:[0,0,-.04],size:[t+.15,i+.15,.12],color:"#070e14"}),(0,n.jsx)(rb,{at:[0,0,0],size:[t+.035,i+.035,.13],color:"#305569"}),(0,n.jsx)(rj,{at:[0,-i/2-.038,.066],size:[.12*t,.006,.005]}),(0,n.jsx)(t5,{transform:!0,position:[0,0,.074],distanceFactor:400*t/1e3,occlude:"blending",geometry:(0,n.jsx)("planeGeometry",{args:[t,i]}),pointerEvents:"none",style:{width:1e3,height:633,pointerEvents:"none"},children:(0,n.jsx)(rf,{kind:r})})]})}function rj({at:e,size:t}){return(0,n.jsxs)("mesh",{position:e,children:[(0,n.jsx)("boxGeometry",{args:t}),(0,n.jsx)("meshBasicMaterial",{color:rw})]})}function rS(){return(0,n.jsxs)("mesh",{position:[0,-1.573,0],rotation:[-Math.PI/2,0,0],children:[(0,n.jsx)("planeGeometry",{args:[6.4,6.4]}),(0,n.jsx)("shaderMaterial",{transparent:!0,depthWrite:!1,vertexShader:"varying vec2 vUv; void main(){vUv=uv;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}",fragmentShader:"varying vec2 vUv; void main(){float r=length(vUv-.5)*6.4; float glow=exp(-pow((r-2.03)/.43,2.));gl_FragColor=vec4(0.0,.56,.72,glow*.22);}"})]})}function r_(){return(0,n.jsxs)("group",{children:[(0,n.jsx)(rp,{}),(0,n.jsx)(rx,{}),(0,n.jsx)("color",{attach:"background",args:["#03070c"]}),(0,n.jsx)("ambientLight",{intensity:.1}),(0,n.jsx)("hemisphereLight",{args:["#b6e9fa","#07131d",.45]}),(0,n.jsx)("directionalLight",{position:[-3,5,5],intensity:1.15,color:"#c7eeff"}),(0,n.jsx)("pointLight",{position:[0,2,-1],intensity:7,color:rw,distance:8}),(0,n.jsx)("pointLight",{position:[-3.6,.4,.4],intensity:5,color:"#78daef",distance:5}),(0,n.jsx)("pointLight",{position:[2.8,2.6,-.6],intensity:3,color:"#d4f5ff",distance:5}),(0,n.jsxs)(tq,{resolution:128,frames:1,children:[(0,n.jsx)(t4,{position:[-4,5,4],rotation:[Math.PI/4,-.4,0],scale:[6,3,1],intensity:3,color:"#d8f4ff"}),(0,n.jsx)(t4,{position:[4,2,0],rotation:[0,-Math.PI/2,0],scale:[2,5,1],intensity:2,color:rw}),(0,n.jsx)(t4,{position:[0,4,-3],scale:[6,.5,1],intensity:2,color:"#7fe3ff"})]}
324),(0,n.jsx)(rb,{at:[0,.9,-2.9],size:[9,5.3,.25],color:"#09141e"}),(0,n.jsx)(rb,{at:[0,-1.68,2],size:[18,.2,13],color:"#091923",roughness:.24,metalness:.65}),(0,n.jsx)(rS,{}),(0,n.jsx)(rb,{at:[-4.5,1,-.8],size:[.22,5.6,4.4],color:"#0b1821"}),(0,n.jsx)(rb,{at:[4.5,1,-.8],size:[.22,5.6,4.4],color:"#0b1821"}),(0,n.jsx)(rb,{at:[0,3.55,-1.7],size:[9,.18,2.4],color:"#182e3b"}),(0,n.jsx)(rb,{at:[0,3.43,-.53],size:[8.65,.035,.035],color:"#7798a7",roughness:.2,metalness:.8}),[-4.365,4.365].map(e=>(0,n.jsxs)("group",{children:[(0,n.jsx)(rb,{at:[e,1.15,-.65],size:[.028,3.65,2.85],color:"#071018",roughness:.68,metalness:.18}),[-1.8,-.8,.2].map(t=>(0,n.jsx)(rb,{at:[.998*e,1.15,t],size:[.03,3.55,.014],color:"#314652",roughness:.3},t))]},`wall-inset-${e}`)),Array.from({length:19},(e,t)=>(0,n.jsx)(rb,{at:[-4.05+.45*t,1.05,-2.69],size:[.055,4.65,.18],color:"#1a2b35"},`fin-${t}`)),[-2.9,2.9].map(e=>(0,n.jsxs)("group",{children:[(0,n.jsx)(rb,{at:[e,3.43,-1.25],size:[.38,.09,2.8],color:"#040b10"}),(0,n.jsxs)("mesh",{position:[e,3.375,-1.25],children:[(0,n.jsx)("boxGeometry",{args:[.16,.015,2.5]}),(0,n.jsx)("meshBasicMaterial",{color:"#b8edf5"})]})]},`ceiling-${e}`)),[-3,-1.5,0,1.5,3].map(e=>(0,n.jsx)(rb,{at:[e,-1.577,1.5],size:[.008,.002,8],color:"#203644"},`floor-${e}`)),[-1,1].map(e=>(0,n.jsx)("group",{children:[.9,1.5,2.1].map(t=>(0,n.jsx)(rj,{at:[2.7*e,-1.574,t],size:[.045,.005,.22]},t))},`floor-guides-${e}`)),(0,n.jsx)(rj,{at:[-4.36,-1.43,-.7],size:[.02,.016,4]}),(0,n.jsx)(rj,{at:[4.36,-1.43,-.7],size:[.02,.016,4]}),[-4.1,-2.1,2.1,4.1].map(e=>(0,n.jsxs)("group",{children:[(0,n.jsx)(rb,{at:[e,1,-2.65],size:[.18,5.3,.32],color:"#172c39"}),(0,n.jsx)(rj,{at:[e,1.25,-2.47],size:[.018,3.5,.01]})]},e)),(0,n.jsx)(rj,{at:[0,3.1,-2.52],size:[8,.028,.03]}),(0,n.jsx)(rj,{at:[0,-1.47,-2.5],size:[8.2,.018,.03]}),(0,n.jsx)(rM,{at:[0,1.35,-2.53],width:3.75,kind:"Overview"}),(0,n.jsx)(rM,{at:[-3.03,1.05,-2.05],width:1.85,kind:"AI Investigation",angle:.18}),(0,n.jsx)(rM,{at:[3.03,.9,-2.05],width:1.85,kind:"Session Replay",angle:-.18}),(0,n.jsx)(rb,{at:[0,-.65,-2.13],size:[7.7,.09,.82],color:"#294452"}),(0,n.jsx)(rj,{at:[0,-.69,-1.7],size:[7.5,.013,.015]}),[-3.05,3.05].map((e,t)=>(0,n.jsxs)("group",{children:[(0,n.jsx)(rb,{at:[e,-1.16,-1.8],size:[1.4,.78,.65],color:"#09131b"}),(0,n.jsx)(rb,{at:[e,-.7,-1.45],size:[1.9,.085,1.25],color:"#355260"}),(0,n.jsx)(rb,{at:[e,-.65,-1.01],size:[1.48,.016,.18],color:"#071117",roughness:.6,metalness:.1}),Array.from({length:12},(t,r)=>(0,n.jsx)(rb,{at:[e-.6+.11*r,-.636,-1.01],size:[.075,.01,.09],color:"#42616e",roughness:.55},`console-key-${r}`)),(0,n.jsx)(rj,{at:[e,-.751,-.86],size:[1.72,.014,.015]}),(0,n.jsx)("group",{position:[e,-.5,-1.25],rotation:[-.45,0,0],children:(0,n.jsx)(rM,{at:[0,0,0],width:1.32,kind:0===t?"Annotations":"AI Investigation"})}),[0,1,2].map(t=>(0,n.jsxs)("group",{children:[(0,n.jsx)(rb,{at:[e,-.93-.14*t,-1.385],size:[1.32,.085,.025],color:"#09131b"}),(0,n.jsx)(rj,{at:[e-.53,-.93-.14*t,-1.367],size:[.05,.012,.005]})]},t))]},e)),(0,n.jsxs)("mesh",{position:[0,-1.555,0],children:[(0,n.jsx)("cylinderGeometry",{args:[2.07,2.1,.04,128]}),(0,n.jsx)("meshStandardMaterial",{color:"#061018",roughness:.4,metalness:.65})]}),(0,n.jsxs)("mesh",{position:[0,-1.523,0],children:[(0,n.jsx)("cylinderGeometry",{args:[1.988,1.988,.012,128]}),(0,n.jsx)("meshBasicMaterial",{color:"#0086a9"})]}),(0,n.jsxs)("mesh",{position:[0,-1.52,0],children:[(0,n.jsx)("cylinderGeometry",{args:[1.95,2,.1,128]}),(0,n.jsx)("meshPhysicalMaterial",{color:"#142b38",roughness:.25,metalness:.7,clearcoat:.35,clearcoatRoughness:.3})]}),(0,n.jsx)(w,{position:[0,-1.454,0],opacity:.8,scale:4.2,blur:2.5,far:3.5,resolution:256,color:"#00070b"}),(0,n.jsxs)("mesh",{position:[0,-1.462,0],rotation:[-Math.PI/2,0,0],children:[(0,n.jsx)("ringGeometry",{args:[1.87,1.885,80]}),(0,n.jsx)("meshBasicMaterial",{color:rw})]}),[0,1,2,3].map(e=>(0,n.jsxs)("mesh",{position:[0,-1.461,0],rotation:[-Math.PI/2,0,0],children:[(0,n.jsx)("ringGeometry",{args:[1.79,1.805,24,1,e*Math.PI/2+.18,.32]}),(0,n.jsx)("meshBasicMaterial",{color:"#9cdae8"})]},`platform-index-${e}`)),(0,n.jsxs)("mesh",{position:[0,-1.457,.05],rotation:[-Math.PI/2,0,0],children:[(0,n.jsx)("planeGeometry",{args:[3.7,2]}),(0,n.jsx)("shaderMaterial",{transparent:!0,depthWrite:!1,vertexShader:"varying vec2 vUv; void main(){vUv=uv;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}",fragmentShader:"varying vec2 vUv; void main(){float r=length((vUv-0.5)*2.0);gl_FragColor=vec4(0.,0.,0.,(1.-smoothstep(0.1,1.,r))*0.65);}"})]})]})}function rE(){let e=(0,d.useThree)(e=>e.size);
324return(0,n.jsx)(f.OrthographicCamera,{makeDefault:!0,position:[1.5,2.5,10],onUpdate:e=>e.lookAt(0,.85,-.6),zoom:1.01*Math.min(e.width/10.4,e.height/7.6),near:.1,far:40})}class rC extends u.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?null:this.props.children}}function rT({expression:e="neutral"}){return(0,n.jsx)(rC,{children:(0,n.jsx)("div",{className:"relative h-full w-full",children:(0,n.jsxs)(h.Canvas,{orthographic:!0,camera:{position:[0,0,8],zoom:160,near:.1,far:40},dpr:[1,2],frameloop:"demand",gl:{antialias:!0,alpha:!0},onCreated:({gl:e})=>{e.toneMapping=p.NoToneMapping},style:{position:"absolute",inset:0,width:"100%",height:"100%"},children:[(0,n.jsx)(rE,{}),(0,n.jsx)(r_,{}),(0,n.jsx)("group",{scale:.82,position:[0,-.25,.25],children:(0,n.jsx)(v.FoldedPebble,{expression:e,showThoughtBubble:!1,spotlight:.8})})]})})})}function rA(){let{expression:e}=(0,c.useAuthMascot)(),{isLoaded:t}=(0,o.useLoading)();return(0,n.jsxs)(i.motion.div,{className:"hidden lg:flex lg:w-[70%] h-full relative bg-[#03050c] shrink-0 overflow-hidden items-center justify-center",initial:{opacity:0}
324,animate:t?{opacity:1}:{opacity:0},transition:{duration:.8},children:[(0,n.jsx)("div",{className:"absolute inset-0",children:(0,n.jsx)(rT,{expression:e})}),(0,n.jsx)("div",{className:"absolute inset-y-0 right-0 z-30 w-px bg-linear-to-b from-transparent via-white/10 to-transparent"})]})}function rU({children:e}){let t=(0,s.useIsMobile)();return(0,n.jsx)(c.AuthMascotProvider,{children:(0,n.jsxs)("main",{className:"w-full min-h-dvh h-dvh flex flex-col lg:flex-row bg-background text-foreground selection:bg-cyan-500/30 selection:text-cyan-50 overflow-hidden",children:[(0,n.jsx)(rA,{}),(0,n.jsxs)("div",{className:"w-full lg:w-[30%] h-full overflow-hidden relative flex flex-col bg-background z-20 shrink-0",children:[!t&&(0,n.jsxs)("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none lg:hidden",children:[(0,n.jsx)("div",{className:"absolute top-[-20%] left-[-10%] w-full h-[55%] bg-cyan-900/10 blur-[120px] rounded-full mix-blend-screen"}),(0,n.jsx)("div",{className:"absolute bottom-[-20%] right-[-10%] w-full h-[55%] bg-emerald-900/10 blur-[120px] rounded-full mix-blend-screen"})]}),(0,n.jsx)(l.ReactLenis,{options:{lerp:.01,duration:5,smoothWheel:!0,syncTouch:!0},className:"relative z-10 w-full h-full overflow-y-auto overflow-x-hidden [scrollbar-width:none] [scrollbar-gutter:stable]",children:(0,n.jsx)("div",{className:"min-h-full flex flex-col px-6 py-8 lg:px-8 xl:px-12",children:(0,n.jsx)("div",{className:"w-full max-w-100 m-auto",children:e})})})]})]})})}e.s(["default",()=>rU],99369)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.