diff --git a/gsplat/.gitignore b/gsplat/.gitignore index a547bf3..0b719e7 100644 --- a/gsplat/.gitignore +++ b/gsplat/.gitignore @@ -7,15 +7,15 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* -node_modules -dist -dist-ssr -*.local +# node_modules +# dist +# dist-ssr +# *.local # Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea +# .vscode/* +# !.vscode/extensions.json +# .idea .DS_Store *.suo *.ntvs* diff --git a/gsplat/dist/assets/index-tpU-sv1l.js b/gsplat/dist/assets/index-tpU-sv1l.js new file mode 100644 index 0000000..e93a757 --- /dev/null +++ b/gsplat/dist/assets/index-tpU-sv1l.js @@ -0,0 +1,129 @@ +(function(){const F=document.createElement("link").relList;if(F&&F.supports&&F.supports("modulepreload"))return;for(const Q of document.querySelectorAll('link[rel="modulepreload"]'))U(Q);new MutationObserver(Q=>{for(const A of Q)if(A.type==="childList")for(const d of A.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&U(d)}).observe(document,{childList:!0,subtree:!0});function l(Q){const A={};return Q.integrity&&(A.integrity=Q.integrity),Q.referrerPolicy&&(A.referrerPolicy=Q.referrerPolicy),Q.crossOrigin==="use-credentials"?A.credentials="include":Q.crossOrigin==="anonymous"?A.credentials="omit":A.credentials="same-origin",A}function U(Q){if(Q.ep)return;Q.ep=!0;const A=l(Q);fetch(Q.href,A)}})();class g{constructor(F=0,l=0,U=0){this.x=F,this.y=l,this.z=U}equals(F){return this.x===F.x&&this.y===F.y&&this.z===F.z}add(F){return typeof F=="number"?new g(this.x+F,this.y+F,this.z+F):new g(this.x+F.x,this.y+F.y,this.z+F.z)}subtract(F){return typeof F=="number"?new g(this.x-F,this.y-F,this.z-F):new g(this.x-F.x,this.y-F.y,this.z-F.z)}multiply(F){return typeof F=="number"?new g(this.x*F,this.y*F,this.z*F):F instanceof g?new g(this.x*F.x,this.y*F.y,this.z*F.z):new g(this.x*F.buffer[0]+this.y*F.buffer[4]+this.z*F.buffer[8]+F.buffer[12],this.x*F.buffer[1]+this.y*F.buffer[5]+this.z*F.buffer[9]+F.buffer[13],this.x*F.buffer[2]+this.y*F.buffer[6]+this.z*F.buffer[10]+F.buffer[14])}cross(F){const l=this.y*F.z-this.z*F.y,U=this.z*F.x-this.x*F.z,Q=this.x*F.y-this.y*F.x;return new g(l,U,Q)}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z}lerp(F,l){return new g(this.x+(F.x-this.x)*l,this.y+(F.y-this.y)*l,this.z+(F.z-this.z)*l)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distanceTo(F){return Math.sqrt((this.x-F.x)**2+(this.y-F.y)**2+(this.z-F.z)**2)}normalize(){const F=this.magnitude();return new g(this.x/F,this.y/F,this.z/F)}flat(){return[this.x,this.y,this.z]}clone(){return new g(this.x,this.y,this.z)}toString(){return`[${this.flat().join(", ")}]`}static One(F=1){return new g(F,F,F)}}class P{constructor(F=0,l=0,U=0,Q=1){this.x=F,this.y=l,this.z=U,this.w=Q}equals(F){return this.x===F.x&&this.y===F.y&&this.z===F.z&&this.w===F.w}normalize(){const F=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return new P(this.x/F,this.y/F,this.z/F,this.w/F)}multiply(F){const l=this.w,U=this.x,Q=this.y,A=this.z,d=F.w,V=F.x,t=F.y,B=F.z;return new P(l*V+U*d+Q*B-A*t,l*t-U*B+Q*d+A*V,l*B+U*t-Q*V+A*d,l*d-U*V-Q*t-A*B)}inverse(){const F=this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w;return new P(-this.x/F,-this.y/F,-this.z/F,this.w/F)}apply(F){const l=new P(F.x,F.y,F.z,0),U=new P(-this.x,-this.y,-this.z,this.w),Q=this.multiply(l).multiply(U);return new g(Q.x,Q.y,Q.z)}flat(){return[this.x,this.y,this.z,this.w]}clone(){return new P(this.x,this.y,this.z,this.w)}static FromEuler(F){const l=F.x/2,U=F.y/2,Q=F.z/2,A=Math.cos(U),d=Math.sin(U),V=Math.cos(l),t=Math.sin(l),B=Math.cos(Q),e=Math.sin(Q);return new P(A*t*B+d*V*e,d*V*B-A*t*e,A*V*e-d*t*B,A*V*B+d*t*e)}toEuler(){const F=2*(this.w*this.x+this.y*this.z),l=1-2*(this.x*this.x+this.y*this.y),U=Math.atan2(F,l);let Q;const A=2*(this.w*this.y-this.z*this.x);Q=Math.abs(A)>=1?Math.sign(A)*Math.PI/2:Math.asin(A);const d=2*(this.w*this.z+this.x*this.y),V=1-2*(this.y*this.y+this.z*this.z),t=Math.atan2(d,V);return new g(U,Q,t)}static FromMatrix3(F){const l=F.buffer,U=l[0]+l[4]+l[8];let Q,A,d,V;if(U>0){const t=.5/Math.sqrt(U+1);V=.25/t,Q=(l[7]-l[5])*t,A=(l[2]-l[6])*t,d=(l[3]-l[1])*t}else if(l[0]>l[4]&&l[0]>l[8]){const t=2*Math.sqrt(1+l[0]-l[4]-l[8]);V=(l[7]-l[5])/t,Q=.25*t,A=(l[1]+l[3])/t,d=(l[2]+l[6])/t}else if(l[4]>l[8]){const t=2*Math.sqrt(1+l[4]-l[0]-l[8]);V=(l[2]-l[6])/t,Q=(l[1]+l[3])/t,A=.25*t,d=(l[5]+l[7])/t}else{const t=2*Math.sqrt(1+l[8]-l[0]-l[4]);V=(l[3]-l[1])/t,Q=(l[2]+l[6])/t,A=(l[5]+l[7])/t,d=.25*t}return new P(Q,A,d,V)}static FromAxisAngle(F,l){const U=l/2,Q=Math.sin(U),A=Math.cos(U);return new P(F.x*Q,F.y*Q,F.z*Q,A)}toString(){return`[${this.flat().join(", ")}]`}}class oF{constructor(){const F=new Map;this.addEventListener=(l,U)=>{F.has(l)||F.set(l,new Set),F.get(l).add(U)},this.removeEventListener=(l,U)=>{F.has(l)&&F.get(l).delete(U)},this.hasEventListener=(l,U)=>!!F.has(l)&&F.get(l).has(U),this.dispatchEvent=l=>{if(F.has(l.type))for(const U of F.get(l.type))U(l)}}}class QF{constructor(F=1,l=0,U=0,Q=0,A=0,d=1,V=0,t=0,B=0,e=0,s=1,h=0,m=0,p=0,S=0,o=1){this.buffer=[F,l,U,Q,A,d,V,t,B,e,s,h,m,p,S,o]}equals(F){if(this.buffer.length!==F.buffer.length)return!1;if(this.buffer===F.buffer)return!0;for(let l=0;l{},this.applyPosition=()=>{this.position=new g},this.applyRotation=()=>{this.rotation=new P},this.applyScale=()=>{this.scale=new g(1,1,1)}}_updateMatrix(){this._transform=QF.Compose(this._position,this._rotation,this._scale)}get position(){return this._position}set position(F){this._position.equals(F)||(this._position=F,this.positionChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get rotation(){return this._rotation}set rotation(F){this._rotation.equals(F)||(this._rotation=F,this.rotationChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get scale(){return this._scale}set scale(F){this._scale.equals(F)||(this._scale=F,this.scaleChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get forward(){let F=new g(0,0,1);return F=this.rotation.apply(F),F}get transform(){return this._transform}}class lF{constructor(F=1,l=0,U=0,Q=0,A=1,d=0,V=0,t=0,B=1){this.buffer=[F,l,U,Q,A,d,V,t,B]}equals(F){if(this.buffer.length!==F.buffer.length)return!1;if(this.buffer===F.buffer)return!0;for(let l=0;l{for(let V=0;V{const V=lF.RotationFromQuaternion(d).buffer;for(let t=0;t{for(let V=0;V{const d=new Uint8Array(this.vertexCount*VF.RowLength),V=new Float32Array(d.buffer),t=new Uint8Array(d.buffer);for(let B=0;B{console.assert(d.byteLength===3*this.vertexCount*4,`Expected ${3*this.vertexCount*4} bytes, got ${d.byteLength} bytes`),this._positions=new Float32Array(d),this._rotations=new Float32Array(V),this._scales=new Float32Array(t),this._colors=new Uint8Array(B),this._selection=new Uint8Array(e),this.detached=!1}}static Deserialize(F){const l=F.length/VF.RowLength,U=new Float32Array(3*l),Q=new Float32Array(4*l),A=new Float32Array(3*l),d=new Uint8Array(4*l),V=new Float32Array(F.buffer),t=new Uint8Array(F.buffer);for(let B=0;B{this.data.translate(this.position),this.position=new g},this.applyRotation=()=>{this.data.rotate(this.rotation),this.rotation=new P},this.applyScale=()=>{this.data.scale(this.scale),this.scale=new g(1,1,1)}}saveToFile(F=null){if(!document)return;if(!F){const A=new Date;F=`splat-${A.getFullYear()}-${A.getMonth()+1}-${A.getDate()}.splat`}this.applyRotation(),this.applyScale(),this.applyPosition();const l=this.data.serialize(),U=new Blob([l],{type:"application/octet-stream"}),Q=document.createElement("a");Q.download=F,Q.href=URL.createObjectURL(U),Q.click()}get data(){return this._data}get selected(){return this._selected}set selected(F){this._selected!==F&&(this._selected=F,this.selectedChanged=!0,this.dispatchEvent(this._changeEvent))}}class LF{constructor(){this._fx=1132,this._fy=1132,this._near=.1,this._far=100,this._width=512,this._height=512,this._projectionMatrix=new QF,this._viewMatrix=new QF,this._viewProj=new QF,this._updateProjectionMatrix=()=>{this._projectionMatrix=new QF(2*this.fx/this.width,0,0,0,0,-2*this.fy/this.height,0,0,0,0,this.far/(this.far-this.near),1,0,0,-this.far*this.near/(this.far-this.near),0),this._viewProj=this.projectionMatrix.multiply(this.viewMatrix)},this.update=(F,l)=>{const U=lF.RotationFromQuaternion(l).buffer,Q=F.flat();this._viewMatrix=new QF(U[0],U[1],U[2],0,U[3],U[4],U[5],0,U[6],U[7],U[8],0,-Q[0]*U[0]-Q[1]*U[3]-Q[2]*U[6],-Q[0]*U[1]-Q[1]*U[4]-Q[2]*U[7],-Q[0]*U[2]-Q[1]*U[5]-Q[2]*U[8],1),this._viewProj=this.projectionMatrix.multiply(this.viewMatrix)},this.setSize=(F,l)=>{this._width=F,this._height=l,this._updateProjectionMatrix()}}get fx(){return this._fx}set fx(F){this._fx!==F&&(this._fx=F,this._updateProjectionMatrix())}get fy(){return this._fy}set fy(F){this._fy!==F&&(this._fy=F,this._updateProjectionMatrix())}get near(){return this._near}set near(F){this._near!==F&&(this._near=F,this._updateProjectionMatrix())}get far(){return this._far}set far(F){this._far!==F&&(this._far=F,this._updateProjectionMatrix())}get width(){return this._width}get height(){return this._height}get projectionMatrix(){return this._projectionMatrix}get viewMatrix(){return this._viewMatrix}get viewProj(){return this._viewProj}}class FF{constructor(F=0,l=0,U=0,Q=0){this.x=F,this.y=l,this.z=U,this.w=Q}equals(F){return this.x===F.x&&this.y===F.y&&this.z===F.z&&this.w===F.w}add(F){return typeof F=="number"?new FF(this.x+F,this.y+F,this.z+F,this.w+F):new FF(this.x+F.x,this.y+F.y,this.z+F.z,this.w+F.w)}subtract(F){return typeof F=="number"?new FF(this.x-F,this.y-F,this.z-F,this.w-F):new FF(this.x-F.x,this.y-F.y,this.z-F.z,this.w-F.w)}multiply(F){return typeof F=="number"?new FF(this.x*F,this.y*F,this.z*F,this.w*F):F instanceof FF?new FF(this.x*F.x,this.y*F.y,this.z*F.z,this.w*F.w):new FF(this.x*F.buffer[0]+this.y*F.buffer[4]+this.z*F.buffer[8]+this.w*F.buffer[12],this.x*F.buffer[1]+this.y*F.buffer[5]+this.z*F.buffer[9]+this.w*F.buffer[13],this.x*F.buffer[2]+this.y*F.buffer[6]+this.z*F.buffer[10]+this.w*F.buffer[14],this.x*F.buffer[3]+this.y*F.buffer[7]+this.z*F.buffer[11]+this.w*F.buffer[15])}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z+this.w*F.w}lerp(F,l){return new FF(this.x+(F.x-this.x)*l,this.y+(F.y-this.y)*l,this.z+(F.z-this.z)*l,this.w+(F.w-this.w)*l)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}distanceTo(F){return Math.sqrt((this.x-F.x)**2+(this.y-F.y)**2+(this.z-F.z)**2+(this.w-F.w)**2)}normalize(){const F=this.magnitude();return new FF(this.x/F,this.y/F,this.z/F,this.w/F)}flat(){return[this.x,this.y,this.z,this.w]}clone(){return new FF(this.x,this.y,this.z,this.w)}toString(){return`[${this.flat().join(", ")}]`}}class PF extends NF{constructor(F=void 0){super(),this._data=F||new LF,this._position=new g(0,0,-5),this.update=()=>{this.data.update(this.position,this.rotation)},this.screenPointToRay=(l,U)=>{const Q=new FF(l,U,-1,1),A=this._data.projectionMatrix.invert(),d=Q.multiply(A),V=this._data.viewMatrix.invert(),t=d.multiply(V);return new g(t.x/t.w,t.y/t.w,t.z/t.w).subtract(this.position).normalize()}}get data(){return this._data}}class _F extends oF{constructor(){super(),this._objects=[],this.addObject=F=>{this.objects.push(F),this.dispatchEvent(new KF(F))},this.removeObject=F=>{const l=this.objects.indexOf(F);if(l<0)throw new Error("Object not found in scene");this.objects.splice(l,1),this.dispatchEvent(new jF(F))},this.findObject=F=>{for(const l of this.objects)if(F(l))return l},this.findObjectOfType=F=>{for(const l of this.objects)if(l instanceof F)return l},this.reset=()=>{const F=this.objects.slice();for(const l of F)this.removeObject(l)},this.reset()}saveToFile(F=null){if(!document)return;if(!F){const t=new Date;F=`scene-${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}.splat`}const l=[];let U=0;for(const t of this.objects)if(t.applyRotation(),t.applyScale(),t.applyPosition(),t instanceof ZF){const B=t.data.serialize();l.push(B),U+=t.data.vertexCount}const Q=new Uint8Array(U*VF.RowLength);let A=0;for(const t of l)Q.set(t,A),A+=t.length;const d=new Blob([Q.buffer],{type:"application/octet-stream"}),V=document.createElement("a");V.download=F,V.href=URL.createObjectURL(d),V.click()}get objects(){return this._objects}}class qF{static async LoadAsync(F,l,U,Q=!1){const A=await fetch(F,{mode:"cors",credentials:"omit",cache:Q?"force-cache":"default"});if(A.status!=200)throw new Error(A.status+" Unable to load "+A.url);const d=A.body.getReader(),V=parseInt(A.headers.get("content-length")),t=new Uint8Array(V);let B=0;for(;;){const{done:h,value:m}=await d.read();if(h)break;t.set(m,B),B+=m.length,U==null||U(B/V)}const e=VF.Deserialize(t),s=new ZF(e);return l.addObject(s),s}static async LoadFromFileAsync(F,l,U){const Q=new FileReader;let A=new ZF;return Q.onload=d=>{const V=new Uint8Array(d.target.result),t=VF.Deserialize(V);A=new ZF(t),l.addObject(A)},Q.onprogress=d=>{U==null||U(d.loaded/d.total)},Q.readAsArrayBuffer(F),await new Promise(d=>{Q.onloadend=()=>{d()}}),A}}function $F(X,F,l){var U=F===void 0?null:F,Q=function(t,B){var e=atob(t);if(B){for(var s=new Uint8Array(e.length),h=0,m=e.length;h{U.useProgram(this._program),this._resize()},this.initialize=()=>{console.assert(!this._initialized,"ShaderProgram already initialized"),U.useProgram(this._program),this._initialize();for(const d of this.passes)d.initialize(this);this._initialized=!0,this._started=!0},this.render=(d,V)=>{U.useProgram(this._program),this._scene===d&&this._camera===V||(this.dispose(),this._scene=d,this._camera=V,this.initialize());for(const t of this.passes)t.render();this._render()},this.dispose=()=>{if(this._initialized){U.useProgram(this._program);for(const d of this.passes)d.dispose();this._dispose(),this._scene=null,this._camera=null,this._initialized=!1}}}get renderer(){return this._renderer}get scene(){return this._scene}get camera(){return this._camera}get program(){return this._program}get passes(){return this._passes}get started(){return this._started}}var lU=GF("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJdPW5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PntyZWFkeVByb21pc2VSZXNvbHZlPXJlc29sdmU7cmVhZHlQcm9taXNlUmVqZWN0PXJlamVjdDt9KTt2YXIgbW9kdWxlT3ZlcnJpZGVzPU9iamVjdC5hc3NpZ24oe30sTW9kdWxlKTt2YXIgc2NyaXB0RGlyZWN0b3J5PSIiO2Z1bmN0aW9uIGxvY2F0ZUZpbGUocGF0aCl7aWYoTW9kdWxlWyJsb2NhdGVGaWxlIl0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gICAgICByZXNwb25zZS53b3JsZFBvc2l0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFJvdGF0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFNjYWxlcy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS5wb3NpdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5yb3RhdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5zY2FsZXMsCiAgICAgICAgICByZXNwb25zZS5jb2xvcnMsCiAgICAgICAgICByZXNwb25zZS5zZWxlY3Rpb24sCiAgICAgIF0pOwogICAgICBydW5uaW5nID0gZmFsc2U7CiAgfTsKICBjb25zdCBwYWNrVGhyb3R0bGVkID0gKCkgPT4gewogICAgICBpZiAodXBkYXRlUXVldWUubGVuZ3RoID09PSAwKQogICAgICAgICAgcmV0dXJuOwogICAgICBpZiAoIXJ1bm5pbmcpIHsKICAgICAgICAgIHJ1bm5pbmcgPSB0cnVlOwogICAgICAgICAgY29uc3Qgc3BsYXQgPSB1cGRhdGVRdWV1ZS5zaGlmdCgpOwogICAgICAgICAgcGFjayhzcGxhdCk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zcGxhdCkgewogICAgICAgICAgY29uc3Qgc3BsYXQgPSBlLmRhdGEuc3BsYXQ7CiAgICAgICAgICBmb3IgKGNvbnN0IFtpbmRleCwgZXhpc3RpbmddIG9mIHVwZGF0ZVF1ZXVlLmVudHJpZXMoKSkgewogICAgICAgICAgICAgIGlmIChleGlzdGluZy5vZmZzZXQgPT09IHNwbGF0Lm9mZnNldCkgewogICAgICAgICAgICAgICAgICB1cGRhdGVRdWV1ZVtpbmRleF0gPSBzcGxhdDsKICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHVwZGF0ZVF1ZXVlLnB1c2goc3BsYXQpOwogICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPURhdGFXb3JrZXIuanMubWFwCgo=",null,!1),QU=function(X={}){var F,l,U=X;U.ready=new Promise((Z,n)=>{F=Z,l=n});var Q,A=Object.assign({},U),d="";d=(d=self.location.href).indexOf("blob:")!==0?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Q=Z=>{var n=new XMLHttpRequest;return n.open("GET",Z,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)},U.print||console.log.bind(console);var V,t,B=U.printErr||console.error.bind(console);function e(Z){if(eF(Z))return function(n){for(var W=atob(n),R=new Uint8Array(W.length),c=0;cZ.startsWith(aF);function w(Z){return Promise.resolve().then(()=>function(n){if(n==$&&V)return new Uint8Array(V);var W=e(n);if(W)return W;if(Q)return Q(n);throw"both async and sync fetching of the wasm failed"}(Z))}function a(Z,n,W,R){return function(c,i,J){return w(c).then(b=>WebAssembly.instantiate(b,i)).then(b=>b).then(J,b=>{B(`failed to asynchronously prepare wasm: ${b}`),T(b)})}(n,W,R)}eF($="data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxk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V9pbmZvRQDMDAAAaAsAAFwLAAAAAAAA3AsAAAIAAAADAAAABAAAAAUAAAAGAAAATjEwX19jeHhhYml2MTIzX19mdW5kYW1lbnRhbF90eXBlX2luZm9FAMwMAAC0CwAA/AoAAHYAAACgCwAA6AsAAGIAAACgCwAA9AsAAGMAAACgCwAAAAwAAGgAAACgCwAADAwAAGEAAACgCwAAGAwAAHMAAACgCwAAJAwAAHQAAACgCwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=")||(WF=$,$=U.locateFile?U.locateFile(WF,d):d+WF);var r=Z=>{for(;Z.length>0;)Z.shift()(U)};U.noExitRuntime;var Y,H,O=Z=>{for(var n="",W=Z;h[W];)n+=Y[h[W++]];return n},tF={},M={},L=Z=>{throw new H(Z)};function D(Z,n,W={}){if(!("argPackAdvance"in n))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(R,c,i={}){var J=c.name;if(R||L(`type "${J}" must have a positive integer typeid pointer`),M.hasOwnProperty(R)){if(i.ignoreDuplicateRegistrations)return;L(`Cannot register type '${J}' twice`)}if(M[R]=c,tF.hasOwnProperty(R)){var b=tF[R];delete tF[R],b.forEach(I=>I())}}(Z,n,W)}function UF(){this.allocated=[void 0],this.freelist=[]}var j=new UF,hF=()=>{for(var Z=0,n=j.reserved;n(Z||L("Cannot use deleted val. handle = "+Z),j.get(Z).value),YF=Z=>{switch(Z){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return j.allocate({refcount:1,value:Z})}};function JF(Z){return this.fromWireType(S[Z>>2])}var yF=(Z,n)=>{switch(n){case 4:return function(W){return this.fromWireType(y[W>>2])};case 8:return function(W){return this.fromWireType(G[W>>3])};default:throw new TypeError(`invalid float width (${n}): ${Z}`)}},kF=(Z,n,W)=>{switch(n){case 1:return W?R=>s[R>>0]:R=>h[R>>0];case 2:return W?R=>m[R>>1]:R=>p[R>>1];case 4:return W?R=>S[R>>2]:R=>o[R>>2];default:throw new TypeError(`invalid integer width (${n}): ${Z}`)}};function uF(Z){return this.fromWireType(o[Z>>2])}var IF=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,TF=(Z,n)=>Z?((W,R,c)=>{for(var i=R+c,J=R;W[J]&&!(J>=i);)++J;if(J-R>16&&W.buffer&&IF)return IF.decode(W.subarray(R,J));for(var b="";R>10,56320|1023&x)}}else b+=String.fromCharCode((31&I)<<6|N)}else b+=String.fromCharCode(I)}return b})(h,Z,n):"",bF=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,HF=(Z,n)=>{for(var W=Z,R=W>>1,c=R+n/2;!(R>=c)&&p[R];)++R;if((W=R<<1)-Z>32&&bF)return bF.decode(h.subarray(Z,W));for(var i="",J=0;!(J>=n/2);++J){var b=m[Z+2*J>>1];if(b==0)break;i+=String.fromCharCode(b)}return i},DF=(Z,n,W)=>{if(W??(W=2147483647),W<2)return 0;for(var R=n,c=(W-=2)<2*Z.length?W/2:Z.length,i=0;i>1]=J,n+=2}return m[n>>1]=0,n-R},xF=Z=>2*Z.length,zF=(Z,n)=>{for(var W=0,R="";!(W>=n/4);){var c=S[Z+4*W>>2];if(c==0)break;if(++W,c>=65536){var i=c-65536;R+=String.fromCharCode(55296|i>>10,56320|1023&i)}else R+=String.fromCharCode(c)}return R},wF=(Z,n,W)=>{if(W??(W=2147483647),W<4)return 0;for(var R=n,c=R+W-4,i=0;i=55296&&J<=57343&&(J=65536+((1023&J)<<10)|1023&Z.charCodeAt(++i)),S[n>>2]=J,(n+=4)+4>c)break}return S[n>>2]=0,n-R},MF=Z=>{for(var n=0,W=0;W=55296&&R<=57343&&++W,n+=4}return n},vF=Z=>{var n=(Z-t.buffer.byteLength+65535)/65536;try{return t.grow(n),z(),1}catch{}};(()=>{for(var Z=new Array(256),n=0;n<256;++n)Z[n]=String.fromCharCode(n);Y=Z})(),H=U.BindingError=class extends Error{constructor(Z){super(Z),this.name="BindingError"}},U.InternalError=class extends Error{constructor(Z){super(Z),this.name="InternalError"}},Object.assign(UF.prototype,{get(Z){return this.allocated[Z]},has(Z){return this.allocated[Z]!==void 0},allocate(Z){var n=this.freelist.pop()||this.allocated.length;return this.allocated[n]=Z,n},free(Z){this.allocated[Z]=void 0,this.freelist.push(Z)}}),j.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),j.reserved=j.allocated.length,U.count_emval_handles=hF;var fF={f:(Z,n,W,R,c)=>{},i:(Z,n,W,R)=>{D(Z,{name:n=O(n),fromWireType:function(c){return!!c},toWireType:function(c,i){return i?W:R},argPackAdvance:8,readValueFromPointer:function(c){return this.fromWireType(h[c])},destructorFunction:null})},h:(Z,n)=>{D(Z,{name:n=O(n),fromWireType:W=>{var R=SF(W);return(c=>{c>=j.reserved&&--j.get(c).refcount==0&&j.free(c)})(W),R},toWireType:(W,R)=>YF(R),argPackAdvance:8,readValueFromPointer:JF,destructorFunction:null})},e:(Z,n,W)=>{D(Z,{name:n=O(n),fromWireType:R=>R,toWireType:(R,c)=>c,argPackAdvance:8,readValueFromPointer:yF(n,W),destructorFunction:null})},b:(Z,n,W,R,c)=>{n=O(n);var i=I=>I;if(R===0){var J=32-8*W;i=I=>I<>>J}var b=n.includes("unsigned");D(Z,{name:n,fromWireType:i,toWireType:b?function(I,N){return this.name,N>>>0}:function(I,N){return this.name,N},argPackAdvance:8,readValueFromPointer:kF(n,W,R!==0),destructorFunction:null})},a:(Z,n,W)=>{var R=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][n];function c(i){var J=o[i>>2],b=o[i+4>>2];return new R(s.buffer,b,J)}D(Z,{name:W=O(W),fromWireType:c,argPackAdvance:8,readValueFromPointer:c},{ignoreDuplicateRegistrations:!0})},d:(Z,n)=>{var W=(n=O(n))==="std::string";D(Z,{name:n,fromWireType(R){var c,i=o[R>>2],J=R+4;if(W)for(var b=J,I=0;I<=i;++I){var N=J+I;if(I==i||h[N]==0){var v=TF(b,N-b);c===void 0?c=v:(c+="\0",c+=v),b=N+1}}else{var x=new Array(i);for(I=0;I{for(var u=0,E=0;E=55296&&BF<=57343?(u+=4,++E):u+=3}return u})(c):c.length;var b=sF(4+i+1),I=b+4;if(o[b>>2]=i,W&&J)((x,u,E,BF)=>{if(!(BF>0))return 0;for(var RF=E+BF-1,iF=0;iF=55296&&f<=57343&&(f=65536+((1023&f)<<10)|1023&x.charCodeAt(++iF)),f<=127){if(E>=RF)break;u[E++]=f}else if(f<=2047){if(E+1>=RF)break;u[E++]=192|f>>6,u[E++]=128|63&f}else if(f<=65535){if(E+2>=RF)break;u[E++]=224|f>>12,u[E++]=128|f>>6&63,u[E++]=128|63&f}else{if(E+3>=RF)break;u[E++]=240|f>>18,u[E++]=128|f>>12&63,u[E++]=128|f>>6&63,u[E++]=128|63&f}}u[E]=0})(c,h,I,i+1);else if(J)for(var N=0;N255&&(AF(I),L("String has UTF-16 code units that do not fit in 8 bits")),h[I+N]=v}else for(N=0;N{var R,c,i,J,b;W=O(W),n===2?(R=HF,c=DF,J=xF,i=()=>p,b=1):n===4&&(R=zF,c=wF,J=MF,i=()=>o,b=2),D(Z,{name:W,fromWireType:I=>{for(var N,v=o[I>>2],x=i(),u=I+4,E=0;E<=v;++E){var BF=I+4+E*n;if(E==v||x[BF>>b]==0){var RF=R(u,BF-u);N===void 0?N=RF:(N+="\0",N+=RF),u=BF+n}}return AF(I),N},toWireType:(I,N)=>{typeof N!="string"&&L(`Cannot pass non-string to C++ string type ${W}`);var v=J(N),x=sF(4+v+n);return o[x>>2]=v>>b,c(N,x+4,v+n),I!==null&&I.push(AF,x),x},argPackAdvance:8,readValueFromPointer:JF,destructorFunction(I){AF(I)}})},j:(Z,n)=>{D(Z,{isVoid:!0,name:n=O(n),argPackAdvance:0,fromWireType:()=>{},toWireType:(W,R)=>{}})},g:Z=>{var n=h.length,W=2147483648;if((Z>>>=0)>W)return!1;for(var R,c,i=1;i<=4;i*=2){var J=n*(1+.2/i);J=Math.min(J,Z+100663296);var b=Math.min(W,(R=Math.max(Z,J))+((c=65536)-R%c)%c);if(vF(b))return!0}return!1}},nF=function(){var W;var Z={a:fF};function n(R,c){var i;return nF=R.exports,t=nF.k,z(),i=nF.l,_.unshift(i),function(J){var I;if(k--,(I=U.monitorRunDependencies)==null||I.call(U,k),k==0&&C){var b=C;C=null,b()}}(),nF}if(k++,(W=U.monitorRunDependencies)==null||W.call(U,k),U.instantiateWasm)try{return U.instantiateWasm(Z,n)}catch(R){B(`Module.instantiateWasm callback failed with error: ${R}`),l(R)}return a(0,$,Z,function(R){n(R.instance)}).catch(l),{}}();U._pack=(Z,n,W,R,c,i,J,b,I,N,v)=>(U._pack=nF.m)(Z,n,W,R,c,i,J,b,I,N,v);var cF,sF=U._malloc=Z=>(sF=U._malloc=nF.o)(Z),AF=U._free=Z=>(AF=U._free=nF.p)(Z);function mF(){function Z(){cF||(cF=!0,U.calledRun=!0,K||(r(_),F(U),U.onRuntimeInitialized&&U.onRuntimeInitialized(),function(){if(U.postRun)for(typeof U.postRun=="function"&&(U.postRun=[U.postRun]);U.postRun.length;)n=U.postRun.shift(),dF.unshift(n);var n;r(dF)}()))}k>0||(function(){if(U.preRun)for(typeof U.preRun=="function"&&(U.preRun=[U.preRun]);U.preRun.length;)n=U.preRun.shift(),q.unshift(n);var n;r(q)}(),k>0||(U.setStatus?(U.setStatus("Running..."),setTimeout(function(){setTimeout(function(){U.setStatus("")},1),Z()},1)):Z()))}if(C=function Z(){cF||mF(),cF||(C=Z)},U.preInit)for(typeof U.preInit=="function"&&(U.preInit=[U.preInit]);U.preInit.length>0;)U.preInit.pop()();return mF(),X.ready};class BU{constructor(F){this.dataChanged=!1,this.transformsChanged=!1,this._updating=new Set,this._dirty=new Set;let l=0,U=0;this._splatIndices=new Map,this._offsets=new Map;const Q=new Map;for(const B of F.objects)B instanceof ZF&&(this._splatIndices.set(B,U),this._offsets.set(B,l),Q.set(l,B),l+=B.data.vertexCount,U++);this._vertexCount=l,this._width=2048,this._height=Math.ceil(2*this.vertexCount/this.width),this._data=new Uint32Array(this.width*this.height*4),this._transformsWidth=5,this._transformsHeight=Q.size,this._transforms=new Float32Array(this._transformsWidth*this._transformsHeight*4),this._transformIndicesWidth=1024,this._transformIndicesHeight=Math.ceil(this.vertexCount/this._transformIndicesWidth),this._transformIndices=new Uint32Array(this._transformIndicesWidth*this._transformIndicesHeight),this._positions=new Float32Array(3*this.vertexCount),this._rotations=new Float32Array(4*this.vertexCount),this._scales=new Float32Array(3*this.vertexCount),this._worker=new lU;const A=B=>{const e=this._splatIndices.get(B);this._transforms.set(B.transform.buffer,20*e),this._transforms[20*e+16]=B.selected?1:0,B.positionChanged=!1,B.rotationChanged=!1,B.scaleChanged=!1,B.selectedChanged=!1,this.transformsChanged=!0};let d;this._worker.onmessage=B=>{if(B.data.response){const e=B.data.response,s=Q.get(e.offset);A(s);const h=this._splatIndices.get(s);for(let m=0;m{if(!d)return void async function(){for(;!d;)await new Promise(C=>setTimeout(C,0))}().then(()=>{V(B)});A(B);const e=d._malloc(3*B.data.vertexCount*4),s=d._malloc(4*B.data.vertexCount*4),h=d._malloc(3*B.data.vertexCount*4),m=d._malloc(4*B.data.vertexCount),p=d._malloc(B.data.vertexCount),S=d._malloc(8*B.data.vertexCount*4),o=d._malloc(3*B.data.vertexCount*4),y=d._malloc(4*B.data.vertexCount*4),G=d._malloc(3*B.data.vertexCount*4);d.HEAPF32.set(B.data.positions,e/4),d.HEAPF32.set(B.data.rotations,s/4),d.HEAPF32.set(B.data.scales,h/4),d.HEAPU8.set(B.data.colors,m),d.HEAPU8.set(B.data.selection,p),d._pack(B.selected,B.data.vertexCount,e,s,h,m,p,S,o,y,G);const K=new Uint32Array(d.HEAPU32.buffer,S,8*B.data.vertexCount),z=new Float32Array(d.HEAPF32.buffer,o,3*B.data.vertexCount),q=new Float32Array(d.HEAPF32.buffer,y,4*B.data.vertexCount),_=new Float32Array(d.HEAPF32.buffer,G,3*B.data.vertexCount),dF=this._splatIndices.get(B),k=this._offsets.get(B);for(let C=0;C{if((B.positionChanged||B.rotationChanged||B.scaleChanged||B.selectedChanged)&&A(B),!B.data.changed||B.data.detached)return;const e={position:new Float32Array(B.position.flat()),rotation:new Float32Array(B.rotation.flat()),scale:new Float32Array(B.scale.flat()),selected:B.selected,vertexCount:B.data.vertexCount,positions:B.data.positions,rotations:B.data.rotations,scales:B.data.scales,colors:B.data.colors,selection:B.data.selection,offset:this._offsets.get(B)};this._worker.postMessage({splat:e},[e.position.buffer,e.rotation.buffer,e.scale.buffer,e.positions.buffer,e.rotations.buffer,e.scales.buffer,e.colors.buffer,e.selection.buffer]),this._updating.add(B),B.data.detached=!0};this.getSplat=B=>{let e=null;for(const[s,h]of this._offsets){if(!(B>=h))break;e=s}return e},this.getLocalIndex=(B,e)=>e-this._offsets.get(B),this.markDirty=B=>{this._dirty.add(B)},this.rebuild=()=>{for(const B of this._dirty)t(B);this._dirty.clear()},this.dispose=()=>{this._worker.terminate()};for(const B of this._splatIndices.keys())V(B)}get offsets(){return this._offsets}get data(){return this._data}get width(){return this._width}get height(){return this._height}get transforms(){return this._transforms}get transformsWidth(){return this._transformsWidth}get transformsHeight(){return this._transformsHeight}get transformIndices(){return this._transformIndices}get transformIndicesWidth(){return this._transformIndicesWidth}get transformIndicesHeight(){return this._transformIndicesHeight}get positions(){return this._positions}get rotations(){return this._rotations}get scales(){return this._scales}get vertexCount(){return this._vertexCount}get needsRebuild(){return this._dirty.size>0}get updating(){return this._updating.size>0}}class rF{constructor(F=0,l=0,U=0,Q=255){this.r=F,this.g=l,this.b=U,this.a=Q}flat(){return[this.r,this.g,this.b,this.a]}flatNorm(){return[this.r/255,this.g/255,this.b/255,this.a/255]}toHexString(){return"#"+this.flat().map(F=>F.toString(16).padStart(2,"0")).join("")}toString(){return`[${this.flat().join(", ")}]`}}class XF extends UU{constructor(F,l){super(F,l),this._outlineThickness=10,this._outlineColor=new rF(255,165,0,255),this._renderData=null,this._depthIndex=null,this._chunks=null,this._splatTexture=null;const U=F.canvas,Q=F.gl;let A,d,V,t,B,e,s,h,m,p,S,o,y,G,K,z;this._resize=()=>{this._camera&&(this._camera.data.setSize(U.width,U.height),this._camera.update(),d=Q.getUniformLocation(this.program,"projection"),Q.uniformMatrix4fv(d,!1,this._camera.data.projectionMatrix.buffer),V=Q.getUniformLocation(this.program,"viewport"),Q.uniform2fv(V,new Float32Array([U.width,U.height])))};const q=()=>{A=new FU,A.onmessage=C=>{if(C.data.depthIndex){const{depthIndex:T,chunks:$}=C.data;this._depthIndex=T,this._chunks=$,Q.bindBuffer(Q.ARRAY_BUFFER,z),Q.bufferData(Q.ARRAY_BUFFER,T,Q.STATIC_DRAW)}}};this._initialize=()=>{if(this._scene&&this._camera){this._resize(),this._scene.addEventListener("objectAdded",_),this._scene.addEventListener("objectRemoved",dF);for(const C of this._scene.objects)C instanceof ZF&&C.addEventListener("objectChanged",k);this._renderData=new BU(this._scene),t=Q.getUniformLocation(this.program,"focal"),Q.uniform2fv(t,new Float32Array([this._camera.data.fx,this._camera.data.fy])),B=Q.getUniformLocation(this.program,"view"),Q.uniformMatrix4fv(B,!1,this._camera.data.viewMatrix.buffer),m=Q.getUniformLocation(this.program,"outlineThickness"),Q.uniform1f(m,this.outlineThickness),p=Q.getUniformLocation(this.program,"outlineColor"),Q.uniform4fv(p,new Float32Array(this.outlineColor.flatNorm())),this._splatTexture=Q.createTexture(),e=Q.getUniformLocation(this.program,"u_texture"),Q.uniform1i(e,0),y=Q.createTexture(),s=Q.getUniformLocation(this.program,"u_transforms"),Q.uniform1i(s,1),G=Q.createTexture(),h=Q.getUniformLocation(this.program,"u_transformIndices"),Q.uniform1i(h,2),K=Q.createBuffer(),Q.bindBuffer(Q.ARRAY_BUFFER,K),Q.bufferData(Q.ARRAY_BUFFER,new Float32Array([-2,-2,2,-2,2,2,-2,2]),Q.STATIC_DRAW),S=Q.getAttribLocation(this.program,"position"),Q.enableVertexAttribArray(S),Q.vertexAttribPointer(S,2,Q.FLOAT,!1,0,0),z=Q.createBuffer(),o=Q.getAttribLocation(this.program,"index"),Q.enableVertexAttribArray(o),Q.bindBuffer(Q.ARRAY_BUFFER,z),q()}else console.error("Cannot render without scene and camera")};const _=C=>{const T=C;T.object instanceof ZF&&T.object.addEventListener("objectChanged",k),this.dispose()},dF=C=>{const T=C;T.object instanceof ZF&&T.object.removeEventListener("objectChanged",k),this.dispose()},k=C=>{const T=C;T.object instanceof ZF&&this._renderData&&this._renderData.markDirty(T.object)};this._render=()=>{if(this._scene&&this._camera&&this.renderData){if(this._camera.update(),A.postMessage({viewProj:this._camera.data.viewProj}),this.renderData.needsRebuild&&this.renderData.rebuild(),this.renderData.dataChanged||this.renderData.transformsChanged){this.renderData.dataChanged&&(Q.activeTexture(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_2D,this.splatTexture),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.NEAREST),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.NEAREST),Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA32UI,this.renderData.width,this.renderData.height,0,Q.RGBA_INTEGER,Q.UNSIGNED_INT,this.renderData.data)),this.renderData.transformsChanged&&(Q.activeTexture(Q.TEXTURE1),Q.bindTexture(Q.TEXTURE_2D,y),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.NEAREST),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.NEAREST),Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA32F,this.renderData.transformsWidth,this.renderData.transformsHeight,0,Q.RGBA,Q.FLOAT,this.renderData.transforms),Q.activeTexture(Q.TEXTURE2),Q.bindTexture(Q.TEXTURE_2D,G),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.NEAREST),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.NEAREST),Q.texImage2D(Q.TEXTURE_2D,0,Q.R32UI,this.renderData.transformIndicesWidth,this.renderData.transformIndicesHeight,0,Q.RED_INTEGER,Q.UNSIGNED_INT,this.renderData.transformIndices));const C=new Float32Array(this.renderData.positions.slice().buffer),T=new Float32Array(this.renderData.transforms.slice().buffer),$=new Uint32Array(this.renderData.transformIndices.slice().buffer);A.postMessage({sortData:{positions:C,transforms:T,transformIndices:$,vertexCount:this.renderData.vertexCount}},[C.buffer,T.buffer,$.buffer]),this.renderData.dataChanged=!1,this.renderData.transformsChanged=!1}Q.viewport(0,0,U.width,U.height),Q.clearColor(0,0,0,0),Q.clear(Q.COLOR_BUFFER_BIT),Q.disable(Q.DEPTH_TEST),Q.enable(Q.BLEND),Q.blendFuncSeparate(Q.ONE_MINUS_DST_ALPHA,Q.ONE,Q.ONE_MINUS_DST_ALPHA,Q.ONE),Q.blendEquationSeparate(Q.FUNC_ADD,Q.FUNC_ADD),Q.uniformMatrix4fv(d,!1,this._camera.data.projectionMatrix.buffer),Q.uniformMatrix4fv(B,!1,this._camera.data.viewMatrix.buffer),Q.bindBuffer(Q.ARRAY_BUFFER,K),Q.vertexAttribPointer(S,2,Q.FLOAT,!1,0,0),Q.bindBuffer(Q.ARRAY_BUFFER,z),Q.vertexAttribIPointer(o,1,Q.INT,0,0),Q.vertexAttribDivisor(o,1),Q.drawArraysInstanced(Q.TRIANGLE_FAN,0,4,this.renderData.vertexCount)}else console.error("Cannot render without scene and camera")},this._dispose=()=>{if(this._scene&&this._camera&&this.renderData){this._scene.removeEventListener("objectAdded",_),this._scene.removeEventListener("objectRemoved",dF);for(const C of this._scene.objects)C instanceof ZF&&C.removeEventListener("objectChanged",k);A.terminate(),this.renderData.dispose(),Q.deleteTexture(this.splatTexture),Q.deleteTexture(y),Q.deleteTexture(G),Q.deleteBuffer(z),Q.deleteBuffer(K)}else console.error("Cannot dispose without scene and camera")},this._setOutlineThickness=C=>{this._outlineThickness=C,this._initialized&&Q.uniform1f(m,C)},this._setOutlineColor=C=>{this._outlineColor=C,this._initialized&&Q.uniform4fv(p,new Float32Array(C.flatNorm()))}}get renderData(){return this._renderData}get depthIndex(){return this._depthIndex}get chunks(){return this._chunks}get splatTexture(){return this._splatTexture}get outlineThickness(){return this._outlineThickness}set outlineThickness(F){this._setOutlineThickness(F)}get outlineColor(){return this._outlineColor}set outlineColor(F){this._setOutlineColor(F)}_getVertexSource(){return`#version 300 es +precision highp float; +precision highp int; + +uniform highp usampler2D u_texture; +uniform highp sampler2D u_transforms; +uniform highp usampler2D u_transformIndices; +uniform mat4 projection, view; +uniform vec2 focal; +uniform vec2 viewport; + +uniform bool useDepthFade; +uniform float depthFade; + +in vec2 position; +in int index; + +out vec4 vColor; +out vec2 vPosition; +out float vSize; +out float vSelected; + +void main () { + uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0); + float selected = float((cen.w >> 24) & 0xffu); + + uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x; + mat4 transform = mat4( + texelFetch(u_transforms, ivec2(0, transformIndex), 0), + texelFetch(u_transforms, ivec2(1, transformIndex), 0), + texelFetch(u_transforms, ivec2(2, transformIndex), 0), + texelFetch(u_transforms, ivec2(3, transformIndex), 0) + ); + + if (selected < 0.5) { + selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x; + } + + mat4 viewTransform = view * transform; + + vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1); + vec4 pos2d = projection * cam; + + float clip = 1.2 * pos2d.w; + if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) { + gl_Position = vec4(0.0, 0.0, 2.0, 1.0); + return; + } + + uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0); + vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z); + mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y); + + mat3 J = mat3( + focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), + 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), + 0., 0., 0. + ); + + mat3 T = transpose(mat3(viewTransform)) * J; + mat3 cov2d = transpose(T) * Vrk * T; + + float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0; + float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1])); + float lambda1 = mid + radius, lambda2 = mid - radius; + + if (lambda2 < 0.0) return; + vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0])); + vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector; + vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x); + + vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0; + vPosition = position; + vSize = length(majorAxis); + vSelected = selected; + + float scalingFactor = 1.0; + + if (useDepthFade) { + float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0; + float near = 0.1; float far = 100.0; + float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near)); + float start = max(normalizedDepth - 0.1, 0.0); + float end = min(normalizedDepth + 0.1, 1.0); + scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0); + } + + vec2 vCenter = vec2(pos2d) / pos2d.w; + gl_Position = vec4( + vCenter + + position.x * majorAxis * scalingFactor / viewport + + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0); +} +`}_getFragmentSource(){return`#version 300 es +precision highp float; + +uniform float outlineThickness; +uniform vec4 outlineColor; + +in vec4 vColor; +in vec2 vPosition; +in float vSize; +in float vSelected; + +out vec4 fragColor; + +void main () { + float A = -dot(vPosition, vPosition); + + if (A < -4.0) discard; + + if (vSelected < 0.5) { + float B = exp(A) * vColor.a; + fragColor = vec4(B * vColor.rgb, B); + return; + } + + float outlineThreshold = -4.0 + (outlineThickness / vSize); + + if (A < outlineThreshold) { + fragColor = outlineColor; + } + else { + float B = exp(A) * vColor.a; + fragColor = vec4(B * vColor.rgb, B); + } +} +`}}class dU{constructor(F=1){let l,U,Q,A,d=0,V=!1;this.initialize=t=>{if(!(t instanceof XF))throw new Error("FadeInPass requires a RenderProgram");d=t.started?1:0,V=!0,l=t,U=t.renderer.gl,Q=U.getUniformLocation(l.program,"useDepthFade"),U.uniform1i(Q,1),A=U.getUniformLocation(l.program,"depthFade"),U.uniform1f(A,d)},this.render=()=>{var t;V&&!(!((t=l.renderData)===null||t===void 0)&&t.updating)&&(U.useProgram(l.program),d=Math.min(d+.01*F,1),d>=1&&(V=!1,U.uniform1i(Q,0)),U.uniform1f(A,d))}}dispose(){}}class tU{constructor(F=null,l=null){this._backgroundColor=new rF;const U=F||document.createElement("canvas");F||(U.style.display="block",U.style.boxSizing="border-box",U.style.width="100%",U.style.height="100%",U.style.margin="0",U.style.padding="0",document.body.appendChild(U)),U.style.background=this._backgroundColor.toHexString(),this._canvas=U,this._gl=U.getContext("webgl2",{antialias:!1});const Q=l||[];l||Q.push(new dU),this._renderProgram=new XF(this,Q);const A=[this._renderProgram];this.resize=()=>{const d=U.clientWidth,V=U.clientHeight;U.width===d&&U.height===V||this.setSize(d,V)},this.setSize=(d,V)=>{U.width=d,U.height=V,this._gl.viewport(0,0,U.width,U.height);for(const t of A)t.resize()},this.render=(d,V)=>{for(const t of A)t.render(d,V)},this.dispose=()=>{for(const d of A)d.dispose()},this.addProgram=d=>{A.push(d)},this.removeProgram=d=>{const V=A.indexOf(d);if(V<0)throw new Error("Program not found");A.splice(V,1)},this.resize()}get canvas(){return this._canvas}get gl(){return this._gl}get renderProgram(){return this._renderProgram}get backgroundColor(){return this._backgroundColor}set backgroundColor(F){this._backgroundColor=F,this._canvas.style.background=F.toHexString()}}class ZU{constructor(F,l,U=.5,Q=.5,A=5,d=!0,V=new g){this.minAngle=-90,this.maxAngle=90,this.minZoom=.1,this.maxZoom=30,this.orbitSpeed=1,this.panSpeed=1,this.zoomSpeed=1,this.dampening=.12,this.setCameraTarget=()=>{};let t=V.clone(),B=t.clone(),e=U,s=Q,h=A,m=!1,p=!1,S=0,o=0,y=0;const G={};let K=!1;F.addEventListener("objectChanged",()=>{if(K)return;const a=F.rotation.toEuler();e=-a.y,s=-a.x;const r=F.position.x-h*Math.sin(e)*Math.cos(s),Y=F.position.y+h*Math.sin(s),H=F.position.z+h*Math.cos(e)*Math.cos(s);B=new g(r,Y,H)}),this.setCameraTarget=a=>{const r=a.x-F.position.x,Y=a.y-F.position.y,H=a.z-F.position.z;h=Math.sqrt(r*r+Y*Y+H*H),s=Math.atan2(Y,Math.sqrt(r*r+H*H)),e=-Math.atan2(r,H),B=new g(a.x,a.y,a.z)};const z=()=>.1+.9*(h-this.minZoom)/(this.maxZoom-this.minZoom),q=a=>{G[a.code]=!0,a.code==="ArrowUp"&&(G.KeyW=!0),a.code==="ArrowDown"&&(G.KeyS=!0),a.code==="ArrowLeft"&&(G.KeyA=!0),a.code==="ArrowRight"&&(G.KeyD=!0)},_=a=>{G[a.code]=!1,a.code==="ArrowUp"&&(G.KeyW=!1),a.code==="ArrowDown"&&(G.KeyS=!1),a.code==="ArrowLeft"&&(G.KeyA=!1),a.code==="ArrowRight"&&(G.KeyD=!1)},dF=a=>{w(a),m=!0,p=a.button===2,o=a.clientX,y=a.clientY,window.addEventListener("mouseup",k)},k=a=>{w(a),m=!1,p=!1,window.removeEventListener("mouseup",k)},C=a=>{if(w(a),!m||!F)return;const r=a.clientX-o,Y=a.clientY-y;if(p){const H=z(),O=-r*this.panSpeed*.01*H,tF=-Y*this.panSpeed*.01*H,M=lF.RotationFromQuaternion(F.rotation).buffer,L=new g(M[0],M[3],M[6]),D=new g(M[1],M[4],M[7]);B=B.add(L.multiply(O)),B=B.add(D.multiply(tF))}else e-=r*this.orbitSpeed*.003,s+=Y*this.orbitSpeed*.003,s=Math.min(Math.max(s,this.minAngle*Math.PI/180),this.maxAngle*Math.PI/180);o=a.clientX,y=a.clientY},T=a=>{w(a);const r=z();h+=a.deltaY*this.zoomSpeed*.025*r,h=Math.min(Math.max(h,this.minZoom),this.maxZoom)},$=a=>{if(w(a),a.touches.length===1)m=!0,p=!1,o=a.touches[0].clientX,y=a.touches[0].clientY,S=0;else if(a.touches.length===2){m=!0,p=!0,o=(a.touches[0].clientX+a.touches[1].clientX)/2,y=(a.touches[0].clientY+a.touches[1].clientY)/2;const r=a.touches[0].clientX-a.touches[1].clientX,Y=a.touches[0].clientY-a.touches[1].clientY;S=Math.sqrt(r*r+Y*Y)}},WF=a=>{w(a),m=!1,p=!1},aF=a=>{if(w(a),m&&F)if(p){const r=z(),Y=a.touches[0].clientX-a.touches[1].clientX,H=a.touches[0].clientY-a.touches[1].clientY,O=Math.sqrt(Y*Y+H*H);h+=(S-O)*this.zoomSpeed*.1*r,h=Math.min(Math.max(h,this.minZoom),this.maxZoom),S=O;const tF=(a.touches[0].clientX+a.touches[1].clientX)/2,M=(a.touches[0].clientY+a.touches[1].clientY)/2,L=tF-o,D=M-y,UF=lF.RotationFromQuaternion(F.rotation).buffer,j=new g(UF[0],UF[3],UF[6]),hF=new g(UF[1],UF[4],UF[7]);B=B.add(j.multiply(-L*this.panSpeed*.025*r)),B=B.add(hF.multiply(-D*this.panSpeed*.025*r)),o=tF,y=M}else{const r=a.touches[0].clientX-o,Y=a.touches[0].clientY-y;e-=r*this.orbitSpeed*.003,s+=Y*this.orbitSpeed*.003,s=Math.min(Math.max(s,this.minAngle*Math.PI/180),this.maxAngle*Math.PI/180),o=a.touches[0].clientX,y=a.touches[0].clientY}},eF=(a,r,Y)=>(1-Y)*a+Y*r;this.update=()=>{K=!0,U=eF(U,e,this.dampening),Q=eF(Q,s,this.dampening),A=eF(A,h,this.dampening),t=t.lerp(B,this.dampening);const a=t.x+A*Math.sin(U)*Math.cos(Q),r=t.y-A*Math.sin(Q),Y=t.z-A*Math.cos(U)*Math.cos(Q);F.position=new g(a,r,Y);const H=t.subtract(F.position).normalize(),O=Math.asin(-H.y),tF=Math.atan2(H.x,H.z);F.rotation=P.FromEuler(new g(O,tF,0));const M=.025,L=.01,D=lF.RotationFromQuaternion(F.rotation).buffer,UF=new g(-D[2],-D[5],-D[8]),j=new g(D[0],D[3],D[6]);G.KeyS&&(B=B.add(UF.multiply(M))),G.KeyW&&(B=B.subtract(UF.multiply(M))),G.KeyA&&(B=B.subtract(j.multiply(M))),G.KeyD&&(B=B.add(j.multiply(M))),G.KeyE&&(e+=L),G.KeyQ&&(e-=L),G.KeyR&&(s+=L),G.KeyF&&(s-=L),K=!1};const w=a=>{a.preventDefault(),a.stopPropagation()};this.dispose=()=>{l.removeEventListener("dragenter",w),l.removeEventListener("dragover",w),l.removeEventListener("dragleave",w),l.removeEventListener("contextmenu",w),l.removeEventListener("mousedown",dF),l.removeEventListener("mousemove",C),l.removeEventListener("wheel",T),l.removeEventListener("touchstart",$),l.removeEventListener("touchend",WF),l.removeEventListener("touchmove",aF),d&&(window.removeEventListener("keydown",q),window.removeEventListener("keyup",_))},d&&(window.addEventListener("keydown",q),window.addEventListener("keyup",_)),l.addEventListener("dragenter",w),l.addEventListener("dragover",w),l.addEventListener("dragleave",w),l.addEventListener("contextmenu",w),l.addEventListener("mousedown",dF),l.addEventListener("mousemove",C),l.addEventListener("wheel",T),l.addEventListener("touchstart",$),l.addEventListener("touchend",WF),l.addEventListener("touchmove",aF),this.update()}}const EF=document.getElementById("canvas"),VU=document.getElementById("progress-dialog"),AU=document.getElementById("progress-indicator"),CF=new tU(EF),gF=new _F,pF=new PF,nU=new ZU(pF,EF);async function RU(){const X="https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat";await qF.LoadAsync(X,gF,U=>AU.value=U*100),VU.close();const F=()=>{CF.setSize(window.innerWidth,window.innerHeight)},l=()=>{nU.update(),CF.render(gF,pF),requestAnimationFrame(l)};F(),window.addEventListener("resize",F),requestAnimationFrame(l)}RU(); diff --git a/gsplat/dist/assets/index-yUtX4ct4.css b/gsplat/dist/assets/index-yUtX4ct4.css new file mode 100644 index 0000000..6dc576d --- /dev/null +++ b/gsplat/dist/assets/index-yUtX4ct4.css @@ -0,0 +1 @@ +body,html{margin:0;padding:0;overflow:hidden;background-color:#000}canvas{width:100vw;height:100vh}dialog{width:100%;text-align:center;max-width:20em;color:#fff;background-color:#000;border:none;position:relative;transform:translate(-50%,-50%)}#progress-container{position:absolute;top:50%;left:50%}progress{width:100%;height:1em;border:none;background-color:#fff;color:#eee}progress::-webkit-progress-bar{background-color:#333}progress::-webkit-progress-value{background-color:#eee}progress::-moz-progress-bar{background-color:#eee} diff --git a/gsplat/dist/index.html b/gsplat/dist/index.html new file mode 100644 index 0000000..8793b49 --- /dev/null +++ b/gsplat/dist/index.html @@ -0,0 +1,26 @@ + + + + + + + + gsplat.js - Viewer Demo + + + + + +
+ +

+ +

+ +
+
+ + + + + \ No newline at end of file diff --git a/gsplat/dist/vite.svg b/gsplat/dist/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/gsplat/dist/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gsplat/node_modules/.bin/esbuild b/gsplat/node_modules/.bin/esbuild new file mode 120000 index 0000000..c83ac07 --- /dev/null +++ b/gsplat/node_modules/.bin/esbuild @@ -0,0 +1 @@ +../esbuild/bin/esbuild \ No newline at end of file diff --git a/gsplat/node_modules/.bin/nanoid b/gsplat/node_modules/.bin/nanoid new file mode 120000 index 0000000..e2be547 --- /dev/null +++ b/gsplat/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/gsplat/node_modules/.bin/rollup b/gsplat/node_modules/.bin/rollup new file mode 120000 index 0000000..5939621 --- /dev/null +++ b/gsplat/node_modules/.bin/rollup @@ -0,0 +1 @@ +../rollup/dist/bin/rollup \ No newline at end of file diff --git a/gsplat/node_modules/.bin/tsc b/gsplat/node_modules/.bin/tsc new file mode 120000 index 0000000..0863208 --- /dev/null +++ b/gsplat/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/gsplat/node_modules/.bin/tsserver b/gsplat/node_modules/.bin/tsserver new file mode 120000 index 0000000..f8f8f1a --- /dev/null +++ b/gsplat/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/gsplat/node_modules/.bin/vite b/gsplat/node_modules/.bin/vite new file mode 120000 index 0000000..6d1e3be --- /dev/null +++ b/gsplat/node_modules/.bin/vite @@ -0,0 +1 @@ +../vite/bin/vite.js \ No newline at end of file diff --git a/gsplat/node_modules/.package-lock.json b/gsplat/node_modules/.package-lock.json new file mode 100644 index 0000000..8af6bf7 --- /dev/null +++ b/gsplat/node_modules/.package-lock.json @@ -0,0 +1,252 @@ +{ + "name": "gsplat", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz", + "integrity": "sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", + "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", + "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.10", + "@esbuild/android-arm": "0.19.10", + "@esbuild/android-arm64": "0.19.10", + "@esbuild/android-x64": "0.19.10", + "@esbuild/darwin-arm64": "0.19.10", + "@esbuild/darwin-x64": "0.19.10", + "@esbuild/freebsd-arm64": "0.19.10", + "@esbuild/freebsd-x64": "0.19.10", + "@esbuild/linux-arm": "0.19.10", + "@esbuild/linux-arm64": "0.19.10", + "@esbuild/linux-ia32": "0.19.10", + "@esbuild/linux-loong64": "0.19.10", + "@esbuild/linux-mips64el": "0.19.10", + "@esbuild/linux-ppc64": "0.19.10", + "@esbuild/linux-riscv64": "0.19.10", + "@esbuild/linux-s390x": "0.19.10", + "@esbuild/linux-x64": "0.19.10", + "@esbuild/netbsd-x64": "0.19.10", + "@esbuild/openbsd-x64": "0.19.10", + "@esbuild/sunos-x64": "0.19.10", + "@esbuild/win32-arm64": "0.19.10", + "@esbuild/win32-ia32": "0.19.10", + "@esbuild/win32-x64": "0.19.10" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gsplat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gsplat/-/gsplat-1.0.1.tgz", + "integrity": "sha512-PSp7ir0ZZ9QU7rMaUI2hizT8pIyCv5FviT9P4NIVhLgWrfHQ8UA9lFeQlnaXBPhzy1DKN19NYYEOmrXWFmW63Q==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", + "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.9.1", + "@rollup/rollup-android-arm64": "4.9.1", + "@rollup/rollup-darwin-arm64": "4.9.1", + "@rollup/rollup-darwin-x64": "4.9.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", + "@rollup/rollup-linux-arm64-gnu": "4.9.1", + "@rollup/rollup-linux-arm64-musl": "4.9.1", + "@rollup/rollup-linux-riscv64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-musl": "4.9.1", + "@rollup/rollup-win32-arm64-msvc": "4.9.1", + "@rollup/rollup-win32-ia32-msvc": "4.9.1", + "@rollup/rollup-win32-x64-msvc": "4.9.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", + "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.32", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + } + } +} diff --git a/gsplat/node_modules/.vite/deps/_metadata.json b/gsplat/node_modules/.vite/deps/_metadata.json new file mode 100644 index 0000000..b85475a --- /dev/null +++ b/gsplat/node_modules/.vite/deps/_metadata.json @@ -0,0 +1,15 @@ +{ + "hash": "41f03cf4", + "configHash": "bfeeef1a", + "lockfileHash": "fc5ff04f", + "browserHash": "da368eb0", + "optimized": { + "gsplat": { + "src": "../../gsplat/dist/index.js", + "file": "gsplat.js", + "fileHash": "76536de9", + "needsInterop": false + } + }, + "chunks": {} +} \ No newline at end of file diff --git a/gsplat/node_modules/.vite/deps/gsplat.js b/gsplat/node_modules/.vite/deps/gsplat.js new file mode 100644 index 0000000..9f818d2 --- /dev/null +++ b/gsplat/node_modules/.vite/deps/gsplat.js @@ -0,0 +1,2027 @@ +// node_modules/gsplat/dist/index.js +var A = class _A { + constructor(A2 = 0, Q2 = 0, F2 = 0) { + this.x = A2, this.y = Q2, this.z = F2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && this.z === A2.z); + } + add(Q2) { + return "number" == typeof Q2 ? new _A(this.x + Q2, this.y + Q2, this.z + Q2) : new _A(this.x + Q2.x, this.y + Q2.y, this.z + Q2.z); + } + subtract(Q2) { + return "number" == typeof Q2 ? new _A(this.x - Q2, this.y - Q2, this.z - Q2) : new _A(this.x - Q2.x, this.y - Q2.y, this.z - Q2.z); + } + multiply(Q2) { + return "number" == typeof Q2 ? new _A(this.x * Q2, this.y * Q2, this.z * Q2) : Q2 instanceof _A ? new _A(this.x * Q2.x, this.y * Q2.y, this.z * Q2.z) : new _A(this.x * Q2.buffer[0] + this.y * Q2.buffer[4] + this.z * Q2.buffer[8] + Q2.buffer[12], this.x * Q2.buffer[1] + this.y * Q2.buffer[5] + this.z * Q2.buffer[9] + Q2.buffer[13], this.x * Q2.buffer[2] + this.y * Q2.buffer[6] + this.z * Q2.buffer[10] + Q2.buffer[14]); + } + cross(Q2) { + const F2 = this.y * Q2.z - this.z * Q2.y, B2 = this.z * Q2.x - this.x * Q2.z, U2 = this.x * Q2.y - this.y * Q2.x; + return new _A(F2, B2, U2); + } + dot(A2) { + return this.x * A2.x + this.y * A2.y + this.z * A2.z; + } + lerp(Q2, F2) { + return new _A(this.x + (Q2.x - this.x) * F2, this.y + (Q2.y - this.y) * F2, this.z + (Q2.z - this.z) * F2); + } + magnitude() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + } + distanceTo(A2) { + return Math.sqrt((this.x - A2.x) ** 2 + (this.y - A2.y) ** 2 + (this.z - A2.z) ** 2); + } + normalize() { + const Q2 = this.magnitude(); + return new _A(this.x / Q2, this.y / Q2, this.z / Q2); + } + flat() { + return [this.x, this.y, this.z]; + } + clone() { + return new _A(this.x, this.y, this.z); + } + toString() { + return `[${this.flat().join(", ")}]`; + } + static One(Q2 = 1) { + return new _A(Q2, Q2, Q2); + } +}; +var Q = class _Q { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 1) { + this.x = A2, this.y = Q2, this.z = F2, this.w = B2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && (this.z === A2.z && this.w === A2.w)); + } + normalize() { + const A2 = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + return new _Q(this.x / A2, this.y / A2, this.z / A2, this.w / A2); + } + multiply(A2) { + const F2 = this.w, B2 = this.x, U2 = this.y, l2 = this.z, t2 = A2.w, d2 = A2.x, n2 = A2.y, V2 = A2.z; + return new _Q(F2 * d2 + B2 * t2 + U2 * V2 - l2 * n2, F2 * n2 - B2 * V2 + U2 * t2 + l2 * d2, F2 * V2 + B2 * n2 - U2 * d2 + l2 * t2, F2 * t2 - B2 * d2 - U2 * n2 - l2 * V2); + } + inverse() { + const A2 = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + return new _Q(-this.x / A2, -this.y / A2, -this.z / A2, this.w / A2); + } + apply(F2) { + const B2 = new _Q(F2.x, F2.y, F2.z, 0), U2 = new _Q(-this.x, -this.y, -this.z, this.w), l2 = this.multiply(B2).multiply(U2); + return new A(l2.x, l2.y, l2.z); + } + flat() { + return [this.x, this.y, this.z, this.w]; + } + clone() { + return new _Q(this.x, this.y, this.z, this.w); + } + static FromEuler(A2) { + const F2 = A2.x / 2, B2 = A2.y / 2, U2 = A2.z / 2, l2 = Math.cos(B2), t2 = Math.sin(B2), d2 = Math.cos(F2), n2 = Math.sin(F2), V2 = Math.cos(U2), Z2 = Math.sin(U2); + return new _Q(l2 * n2 * V2 + t2 * d2 * Z2, t2 * d2 * V2 - l2 * n2 * Z2, l2 * d2 * Z2 - t2 * n2 * V2, l2 * d2 * V2 + t2 * n2 * Z2); + } + toEuler() { + const Q2 = 2 * (this.w * this.x + this.y * this.z), F2 = 1 - 2 * (this.x * this.x + this.y * this.y), B2 = Math.atan2(Q2, F2); + let U2; + const l2 = 2 * (this.w * this.y - this.z * this.x); + U2 = Math.abs(l2) >= 1 ? Math.sign(l2) * Math.PI / 2 : Math.asin(l2); + const t2 = 2 * (this.w * this.z + this.x * this.y), d2 = 1 - 2 * (this.y * this.y + this.z * this.z), n2 = Math.atan2(t2, d2); + return new A(B2, U2, n2); + } + static FromMatrix3(A2) { + const F2 = A2.buffer, B2 = F2[0] + F2[4] + F2[8]; + let U2, l2, t2, d2; + if (B2 > 0) { + const A3 = 0.5 / Math.sqrt(B2 + 1); + d2 = 0.25 / A3, U2 = (F2[7] - F2[5]) * A3, l2 = (F2[2] - F2[6]) * A3, t2 = (F2[3] - F2[1]) * A3; + } else if (F2[0] > F2[4] && F2[0] > F2[8]) { + const A3 = 2 * Math.sqrt(1 + F2[0] - F2[4] - F2[8]); + d2 = (F2[7] - F2[5]) / A3, U2 = 0.25 * A3, l2 = (F2[1] + F2[3]) / A3, t2 = (F2[2] + F2[6]) / A3; + } else if (F2[4] > F2[8]) { + const A3 = 2 * Math.sqrt(1 + F2[4] - F2[0] - F2[8]); + d2 = (F2[2] - F2[6]) / A3, U2 = (F2[1] + F2[3]) / A3, l2 = 0.25 * A3, t2 = (F2[5] + F2[7]) / A3; + } else { + const A3 = 2 * Math.sqrt(1 + F2[8] - F2[0] - F2[4]); + d2 = (F2[3] - F2[1]) / A3, U2 = (F2[2] + F2[6]) / A3, l2 = (F2[5] + F2[7]) / A3, t2 = 0.25 * A3; + } + return new _Q(U2, l2, t2, d2); + } + static FromAxisAngle(A2, F2) { + const B2 = F2 / 2, U2 = Math.sin(B2), l2 = Math.cos(B2); + return new _Q(A2.x * U2, A2.y * U2, A2.z * U2, l2); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var F = class { + constructor() { + const A2 = /* @__PURE__ */ new Map(); + this.addEventListener = (Q2, F2) => { + A2.has(Q2) || A2.set(Q2, /* @__PURE__ */ new Set()), A2.get(Q2).add(F2); + }, this.removeEventListener = (Q2, F2) => { + A2.has(Q2) && A2.get(Q2).delete(F2); + }, this.hasEventListener = (Q2, F2) => !!A2.has(Q2) && A2.get(Q2).has(F2), this.dispatchEvent = (Q2) => { + if (A2.has(Q2.type)) + for (const F2 of A2.get(Q2.type)) + F2(Q2); + }; + } +}; +var B = class _B { + constructor(A2 = 1, Q2 = 0, F2 = 0, B2 = 0, U2 = 0, l2 = 1, t2 = 0, d2 = 0, n2 = 0, V2 = 0, Z2 = 1, e2 = 0, I2 = 0, R2 = 0, a2 = 0, g2 = 1) { + this.buffer = [A2, Q2, F2, B2, U2, l2, t2, d2, n2, V2, Z2, e2, I2, R2, a2, g2]; + } + equals(A2) { + if (this.buffer.length !== A2.buffer.length) + return false; + if (this.buffer === A2.buffer) + return true; + for (let Q2 = 0; Q2 < this.buffer.length; Q2++) + if (this.buffer[Q2] !== A2.buffer[Q2]) + return false; + return true; + } + multiply(A2) { + const Q2 = this.buffer, F2 = A2.buffer; + return new _B(F2[0] * Q2[0] + F2[1] * Q2[4] + F2[2] * Q2[8] + F2[3] * Q2[12], F2[0] * Q2[1] + F2[1] * Q2[5] + F2[2] * Q2[9] + F2[3] * Q2[13], F2[0] * Q2[2] + F2[1] * Q2[6] + F2[2] * Q2[10] + F2[3] * Q2[14], F2[0] * Q2[3] + F2[1] * Q2[7] + F2[2] * Q2[11] + F2[3] * Q2[15], F2[4] * Q2[0] + F2[5] * Q2[4] + F2[6] * Q2[8] + F2[7] * Q2[12], F2[4] * Q2[1] + F2[5] * Q2[5] + F2[6] * Q2[9] + F2[7] * Q2[13], F2[4] * Q2[2] + F2[5] * Q2[6] + F2[6] * Q2[10] + F2[7] * Q2[14], F2[4] * Q2[3] + F2[5] * Q2[7] + F2[6] * Q2[11] + F2[7] * Q2[15], F2[8] * Q2[0] + F2[9] * Q2[4] + F2[10] * Q2[8] + F2[11] * Q2[12], F2[8] * Q2[1] + F2[9] * Q2[5] + F2[10] * Q2[9] + F2[11] * Q2[13], F2[8] * Q2[2] + F2[9] * Q2[6] + F2[10] * Q2[10] + F2[11] * Q2[14], F2[8] * Q2[3] + F2[9] * Q2[7] + F2[10] * Q2[11] + F2[11] * Q2[15], F2[12] * Q2[0] + F2[13] * Q2[4] + F2[14] * Q2[8] + F2[15] * Q2[12], F2[12] * Q2[1] + F2[13] * Q2[5] + F2[14] * Q2[9] + F2[15] * Q2[13], F2[12] * Q2[2] + F2[13] * Q2[6] + F2[14] * Q2[10] + F2[15] * Q2[14], F2[12] * Q2[3] + F2[13] * Q2[7] + F2[14] * Q2[11] + F2[15] * Q2[15]); + } + clone() { + const A2 = this.buffer; + return new _B(A2[0], A2[1], A2[2], A2[3], A2[4], A2[5], A2[6], A2[7], A2[8], A2[9], A2[10], A2[11], A2[12], A2[13], A2[14], A2[15]); + } + determinant() { + const A2 = this.buffer; + return A2[12] * A2[9] * A2[6] * A2[3] - A2[8] * A2[13] * A2[6] * A2[3] - A2[12] * A2[5] * A2[10] * A2[3] + A2[4] * A2[13] * A2[10] * A2[3] + A2[8] * A2[5] * A2[14] * A2[3] - A2[4] * A2[9] * A2[14] * A2[3] - A2[12] * A2[9] * A2[2] * A2[7] + A2[8] * A2[13] * A2[2] * A2[7] + A2[12] * A2[1] * A2[10] * A2[7] - A2[0] * A2[13] * A2[10] * A2[7] - A2[8] * A2[1] * A2[14] * A2[7] + A2[0] * A2[9] * A2[14] * A2[7] + A2[12] * A2[5] * A2[2] * A2[11] - A2[4] * A2[13] * A2[2] * A2[11] - A2[12] * A2[1] * A2[6] * A2[11] + A2[0] * A2[13] * A2[6] * A2[11] + A2[4] * A2[1] * A2[14] * A2[11] - A2[0] * A2[5] * A2[14] * A2[11] - A2[8] * A2[5] * A2[2] * A2[15] + A2[4] * A2[9] * A2[2] * A2[15] + A2[8] * A2[1] * A2[6] * A2[15] - A2[0] * A2[9] * A2[6] * A2[15] - A2[4] * A2[1] * A2[10] * A2[15] + A2[0] * A2[5] * A2[10] * A2[15]; + } + invert() { + const A2 = this.buffer, Q2 = this.determinant(); + if (0 === Q2) + throw new Error("Matrix is not invertible."); + const F2 = 1 / Q2; + return new _B(F2 * (A2[5] * A2[10] * A2[15] - A2[5] * A2[11] * A2[14] - A2[9] * A2[6] * A2[15] + A2[9] * A2[7] * A2[14] + A2[13] * A2[6] * A2[11] - A2[13] * A2[7] * A2[10]), F2 * (-A2[1] * A2[10] * A2[15] + A2[1] * A2[11] * A2[14] + A2[9] * A2[2] * A2[15] - A2[9] * A2[3] * A2[14] - A2[13] * A2[2] * A2[11] + A2[13] * A2[3] * A2[10]), F2 * (A2[1] * A2[6] * A2[15] - A2[1] * A2[7] * A2[14] - A2[5] * A2[2] * A2[15] + A2[5] * A2[3] * A2[14] + A2[13] * A2[2] * A2[7] - A2[13] * A2[3] * A2[6]), F2 * (-A2[1] * A2[6] * A2[11] + A2[1] * A2[7] * A2[10] + A2[5] * A2[2] * A2[11] - A2[5] * A2[3] * A2[10] - A2[9] * A2[2] * A2[7] + A2[9] * A2[3] * A2[6]), F2 * (-A2[4] * A2[10] * A2[15] + A2[4] * A2[11] * A2[14] + A2[8] * A2[6] * A2[15] - A2[8] * A2[7] * A2[14] - A2[12] * A2[6] * A2[11] + A2[12] * A2[7] * A2[10]), F2 * (A2[0] * A2[10] * A2[15] - A2[0] * A2[11] * A2[14] - A2[8] * A2[2] * A2[15] + A2[8] * A2[3] * A2[14] + A2[12] * A2[2] * A2[11] - A2[12] * A2[3] * A2[10]), F2 * (-A2[0] * A2[6] * A2[15] + A2[0] * A2[7] * A2[14] + A2[4] * A2[2] * A2[15] - A2[4] * A2[3] * A2[14] - A2[12] * A2[2] * A2[7] + A2[12] * A2[3] * A2[6]), F2 * (A2[0] * A2[6] * A2[11] - A2[0] * A2[7] * A2[10] - A2[4] * A2[2] * A2[11] + A2[4] * A2[3] * A2[10] + A2[8] * A2[2] * A2[7] - A2[8] * A2[3] * A2[6]), F2 * (A2[4] * A2[9] * A2[15] - A2[4] * A2[11] * A2[13] - A2[8] * A2[5] * A2[15] + A2[8] * A2[7] * A2[13] + A2[12] * A2[5] * A2[11] - A2[12] * A2[7] * A2[9]), F2 * (-A2[0] * A2[9] * A2[15] + A2[0] * A2[11] * A2[13] + A2[8] * A2[1] * A2[15] - A2[8] * A2[3] * A2[13] - A2[12] * A2[1] * A2[11] + A2[12] * A2[3] * A2[9]), F2 * (A2[0] * A2[5] * A2[15] - A2[0] * A2[7] * A2[13] - A2[4] * A2[1] * A2[15] + A2[4] * A2[3] * A2[13] + A2[12] * A2[1] * A2[7] - A2[12] * A2[3] * A2[5]), F2 * (-A2[0] * A2[5] * A2[11] + A2[0] * A2[7] * A2[9] + A2[4] * A2[1] * A2[11] - A2[4] * A2[3] * A2[9] - A2[8] * A2[1] * A2[7] + A2[8] * A2[3] * A2[5]), F2 * (-A2[4] * A2[9] * A2[14] + A2[4] * A2[10] * A2[13] + A2[8] * A2[5] * A2[14] - A2[8] * A2[6] * A2[13] - A2[12] * A2[5] * A2[10] + A2[12] * A2[6] * A2[9]), F2 * (A2[0] * A2[9] * A2[14] - A2[0] * A2[10] * A2[13] - A2[8] * A2[1] * A2[14] + A2[8] * A2[2] * A2[13] + A2[12] * A2[1] * A2[10] - A2[12] * A2[2] * A2[9]), F2 * (-A2[0] * A2[5] * A2[14] + A2[0] * A2[6] * A2[13] + A2[4] * A2[1] * A2[14] - A2[4] * A2[2] * A2[13] - A2[12] * A2[1] * A2[6] + A2[12] * A2[2] * A2[5]), F2 * (A2[0] * A2[5] * A2[10] - A2[0] * A2[6] * A2[9] - A2[4] * A2[1] * A2[10] + A2[4] * A2[2] * A2[9] + A2[8] * A2[1] * A2[6] - A2[8] * A2[2] * A2[5])); + } + static Compose(A2, Q2, F2) { + const U2 = Q2.x, l2 = Q2.y, t2 = Q2.z, d2 = Q2.w, n2 = U2 + U2, V2 = l2 + l2, Z2 = t2 + t2, e2 = U2 * n2, I2 = U2 * V2, R2 = U2 * Z2, a2 = l2 * V2, g2 = l2 * Z2, i2 = t2 * Z2, W2 = d2 * n2, c2 = d2 * V2, C2 = d2 * Z2, h2 = F2.x, s2 = F2.y, o2 = F2.z; + return new _B((1 - (a2 + i2)) * h2, (I2 + C2) * h2, (R2 - c2) * h2, 0, (I2 - C2) * s2, (1 - (e2 + i2)) * s2, (g2 + W2) * s2, 0, (R2 + c2) * o2, (g2 - W2) * o2, (1 - (e2 + a2)) * o2, 0, A2.x, A2.y, A2.z, 1); + } + toString() { + return `[${this.buffer.join(", ")}]`; + } +}; +var U = class extends Event { + constructor(A2) { + super("objectAdded"), this.object = A2; + } +}; +var l = class extends Event { + constructor(A2) { + super("objectRemoved"), this.object = A2; + } +}; +var t = class extends Event { + constructor(A2) { + super("objectChanged"), this.object = A2; + } +}; +var d = class extends F { + constructor() { + super(), this.positionChanged = false, this.rotationChanged = false, this.scaleChanged = false, this._position = new A(), this._rotation = new Q(), this._scale = new A(1, 1, 1), this._transform = new B(), this._changeEvent = new t(this), this.update = () => { + }, this.applyPosition = () => { + this.position = new A(); + }, this.applyRotation = () => { + this.rotation = new Q(); + }, this.applyScale = () => { + this.scale = new A(1, 1, 1); + }; + } + _updateMatrix() { + this._transform = B.Compose(this._position, this._rotation, this._scale); + } + get position() { + return this._position; + } + set position(A2) { + this._position.equals(A2) || (this._position = A2, this.positionChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get rotation() { + return this._rotation; + } + set rotation(A2) { + this._rotation.equals(A2) || (this._rotation = A2, this.rotationChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get scale() { + return this._scale; + } + set scale(A2) { + this._scale.equals(A2) || (this._scale = A2, this.scaleChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get forward() { + let Q2 = new A(0, 0, 1); + return Q2 = this.rotation.apply(Q2), Q2; + } + get transform() { + return this._transform; + } +}; +var n = class _n { + constructor(A2 = 1, Q2 = 0, F2 = 0, B2 = 0, U2 = 1, l2 = 0, t2 = 0, d2 = 0, n2 = 1) { + this.buffer = [A2, Q2, F2, B2, U2, l2, t2, d2, n2]; + } + equals(A2) { + if (this.buffer.length !== A2.buffer.length) + return false; + if (this.buffer === A2.buffer) + return true; + for (let Q2 = 0; Q2 < this.buffer.length; Q2++) + if (this.buffer[Q2] !== A2.buffer[Q2]) + return false; + return true; + } + multiply(A2) { + const Q2 = this.buffer, F2 = A2.buffer; + return new _n(F2[0] * Q2[0] + F2[3] * Q2[1] + F2[6] * Q2[2], F2[1] * Q2[0] + F2[4] * Q2[1] + F2[7] * Q2[2], F2[2] * Q2[0] + F2[5] * Q2[1] + F2[8] * Q2[2], F2[0] * Q2[3] + F2[3] * Q2[4] + F2[6] * Q2[5], F2[1] * Q2[3] + F2[4] * Q2[4] + F2[7] * Q2[5], F2[2] * Q2[3] + F2[5] * Q2[4] + F2[8] * Q2[5], F2[0] * Q2[6] + F2[3] * Q2[7] + F2[6] * Q2[8], F2[1] * Q2[6] + F2[4] * Q2[7] + F2[7] * Q2[8], F2[2] * Q2[6] + F2[5] * Q2[7] + F2[8] * Q2[8]); + } + clone() { + const A2 = this.buffer; + return new _n(A2[0], A2[1], A2[2], A2[3], A2[4], A2[5], A2[6], A2[7], A2[8]); + } + static Eye(A2 = 1) { + return new _n(A2, 0, 0, 0, A2, 0, 0, 0, A2); + } + static Diagonal(A2) { + return new _n(A2.x, 0, 0, 0, A2.y, 0, 0, 0, A2.z); + } + static RotationFromQuaternion(A2) { + return new _n(1 - 2 * A2.y * A2.y - 2 * A2.z * A2.z, 2 * A2.x * A2.y - 2 * A2.z * A2.w, 2 * A2.x * A2.z + 2 * A2.y * A2.w, 2 * A2.x * A2.y + 2 * A2.z * A2.w, 1 - 2 * A2.x * A2.x - 2 * A2.z * A2.z, 2 * A2.y * A2.z - 2 * A2.x * A2.w, 2 * A2.x * A2.z - 2 * A2.y * A2.w, 2 * A2.y * A2.z + 2 * A2.x * A2.w, 1 - 2 * A2.x * A2.x - 2 * A2.y * A2.y); + } + static RotationFromEuler(A2) { + const Q2 = Math.cos(A2.x), F2 = Math.sin(A2.x), B2 = Math.cos(A2.y), U2 = Math.sin(A2.y), l2 = Math.cos(A2.z), t2 = Math.sin(A2.z); + return new _n(...[B2 * l2 + U2 * F2 * t2, -B2 * t2 + U2 * F2 * l2, U2 * Q2, Q2 * t2, Q2 * l2, -F2, -U2 * l2 + B2 * F2 * t2, U2 * t2 + B2 * F2 * l2, B2 * Q2]); + } + toString() { + return `[${this.buffer.join(", ")}]`; + } +}; +var V = class _V { + constructor(A2 = 0, F2 = null, B2 = null, U2 = null, l2 = null) { + this.changed = false, this.detached = false, this._vertexCount = A2, this._positions = F2 || new Float32Array(0), this._rotations = B2 || new Float32Array(0), this._scales = U2 || new Float32Array(0), this._colors = l2 || new Uint8Array(0), this._selection = new Uint8Array(this.vertexCount), this.translate = (A3) => { + for (let Q2 = 0; Q2 < this.vertexCount; Q2++) + this.positions[3 * Q2 + 0] += A3.x, this.positions[3 * Q2 + 1] += A3.y, this.positions[3 * Q2 + 2] += A3.z; + this.changed = true; + }, this.rotate = (A3) => { + const F3 = n.RotationFromQuaternion(A3).buffer; + for (let B3 = 0; B3 < this.vertexCount; B3++) { + const U3 = this.positions[3 * B3 + 0], l3 = this.positions[3 * B3 + 1], t2 = this.positions[3 * B3 + 2]; + this.positions[3 * B3 + 0] = F3[0] * U3 + F3[1] * l3 + F3[2] * t2, this.positions[3 * B3 + 1] = F3[3] * U3 + F3[4] * l3 + F3[5] * t2, this.positions[3 * B3 + 2] = F3[6] * U3 + F3[7] * l3 + F3[8] * t2; + const d2 = new Q(this.rotations[4 * B3 + 1], this.rotations[4 * B3 + 2], this.rotations[4 * B3 + 3], this.rotations[4 * B3 + 0]), n2 = A3.multiply(d2); + this.rotations[4 * B3 + 1] = n2.x, this.rotations[4 * B3 + 2] = n2.y, this.rotations[4 * B3 + 3] = n2.z, this.rotations[4 * B3 + 0] = n2.w; + } + this.changed = true; + }, this.scale = (A3) => { + for (let Q2 = 0; Q2 < this.vertexCount; Q2++) + this.positions[3 * Q2 + 0] *= A3.x, this.positions[3 * Q2 + 1] *= A3.y, this.positions[3 * Q2 + 2] *= A3.z, this.scales[3 * Q2 + 0] *= A3.x, this.scales[3 * Q2 + 1] *= A3.y, this.scales[3 * Q2 + 2] *= A3.z; + this.changed = true; + }, this.serialize = () => { + const A3 = new Uint8Array(this.vertexCount * _V.RowLength), Q2 = new Float32Array(A3.buffer), F3 = new Uint8Array(A3.buffer); + for (let A4 = 0; A4 < this.vertexCount; A4++) + Q2[8 * A4 + 0] = this.positions[3 * A4 + 0], Q2[8 * A4 + 1] = this.positions[3 * A4 + 1], Q2[8 * A4 + 2] = this.positions[3 * A4 + 2], F3[32 * A4 + 24 + 0] = this.colors[4 * A4 + 0], F3[32 * A4 + 24 + 1] = this.colors[4 * A4 + 1], F3[32 * A4 + 24 + 2] = this.colors[4 * A4 + 2], F3[32 * A4 + 24 + 3] = this.colors[4 * A4 + 3], Q2[8 * A4 + 3 + 0] = this.scales[3 * A4 + 0], Q2[8 * A4 + 3 + 1] = this.scales[3 * A4 + 1], Q2[8 * A4 + 3 + 2] = this.scales[3 * A4 + 2], F3[32 * A4 + 28 + 0] = 128 * this.rotations[4 * A4 + 0] + 128 & 255, F3[32 * A4 + 28 + 1] = 128 * this.rotations[4 * A4 + 1] + 128 & 255, F3[32 * A4 + 28 + 2] = 128 * this.rotations[4 * A4 + 2] + 128 & 255, F3[32 * A4 + 28 + 3] = 128 * this.rotations[4 * A4 + 3] + 128 & 255; + return A3; + }, this.reattach = (A3, Q2, F3, B3, U3) => { + console.assert(A3.byteLength === 3 * this.vertexCount * 4, `Expected ${3 * this.vertexCount * 4} bytes, got ${A3.byteLength} bytes`), this._positions = new Float32Array(A3), this._rotations = new Float32Array(Q2), this._scales = new Float32Array(F3), this._colors = new Uint8Array(B3), this._selection = new Uint8Array(U3), this.detached = false; + }; + } + static Deserialize(A2) { + const Q2 = A2.length / _V.RowLength, F2 = new Float32Array(3 * Q2), B2 = new Float32Array(4 * Q2), U2 = new Float32Array(3 * Q2), l2 = new Uint8Array(4 * Q2), t2 = new Float32Array(A2.buffer), d2 = new Uint8Array(A2.buffer); + for (let A3 = 0; A3 < Q2; A3++) + F2[3 * A3 + 0] = t2[8 * A3 + 0], F2[3 * A3 + 1] = t2[8 * A3 + 1], F2[3 * A3 + 2] = t2[8 * A3 + 2], B2[4 * A3 + 0] = (d2[32 * A3 + 28 + 0] - 128) / 128, B2[4 * A3 + 1] = (d2[32 * A3 + 28 + 1] - 128) / 128, B2[4 * A3 + 2] = (d2[32 * A3 + 28 + 2] - 128) / 128, B2[4 * A3 + 3] = (d2[32 * A3 + 28 + 3] - 128) / 128, U2[3 * A3 + 0] = t2[8 * A3 + 3 + 0], U2[3 * A3 + 1] = t2[8 * A3 + 3 + 1], U2[3 * A3 + 2] = t2[8 * A3 + 3 + 2], l2[4 * A3 + 0] = d2[32 * A3 + 24 + 0], l2[4 * A3 + 1] = d2[32 * A3 + 24 + 1], l2[4 * A3 + 2] = d2[32 * A3 + 24 + 2], l2[4 * A3 + 3] = d2[32 * A3 + 24 + 3]; + return new _V(Q2, F2, B2, U2, l2); + } + get vertexCount() { + return this._vertexCount; + } + get positions() { + return this._positions; + } + get rotations() { + return this._rotations; + } + get scales() { + return this._scales; + } + get colors() { + return this._colors; + } + get selection() { + return this._selection; + } +}; +V.RowLength = 32; +var Z = class extends d { + constructor(F2 = void 0) { + super(), this.selectedChanged = false, this._selected = false, this._data = F2 || new V(), this.applyPosition = () => { + this.data.translate(this.position), this.position = new A(); + }, this.applyRotation = () => { + this.data.rotate(this.rotation), this.rotation = new Q(); + }, this.applyScale = () => { + this.data.scale(this.scale), this.scale = new A(1, 1, 1); + }; + } + saveToFile(A2 = null) { + if (!document) + return; + if (!A2) { + const Q3 = /* @__PURE__ */ new Date(); + A2 = `splat-${Q3.getFullYear()}-${Q3.getMonth() + 1}-${Q3.getDate()}.splat`; + } + this.applyRotation(), this.applyScale(), this.applyPosition(); + const Q2 = this.data.serialize(), F2 = new Blob([Q2], { type: "application/octet-stream" }), B2 = document.createElement("a"); + B2.download = A2, B2.href = URL.createObjectURL(F2), B2.click(); + } + get data() { + return this._data; + } + get selected() { + return this._selected; + } + set selected(A2) { + this._selected !== A2 && (this._selected = A2, this.selectedChanged = true, this.dispatchEvent(this._changeEvent)); + } +}; +var e = class { + constructor() { + this._fx = 1132, this._fy = 1132, this._near = 0.1, this._far = 100, this._width = 512, this._height = 512, this._projectionMatrix = new B(), this._viewMatrix = new B(), this._viewProj = new B(), this._updateProjectionMatrix = () => { + this._projectionMatrix = new B(2 * this.fx / this.width, 0, 0, 0, 0, -2 * this.fy / this.height, 0, 0, 0, 0, this.far / (this.far - this.near), 1, 0, 0, -this.far * this.near / (this.far - this.near), 0), this._viewProj = this.projectionMatrix.multiply(this.viewMatrix); + }, this.update = (A2, Q2) => { + const F2 = n.RotationFromQuaternion(Q2).buffer, U2 = A2.flat(); + this._viewMatrix = new B(F2[0], F2[1], F2[2], 0, F2[3], F2[4], F2[5], 0, F2[6], F2[7], F2[8], 0, -U2[0] * F2[0] - U2[1] * F2[3] - U2[2] * F2[6], -U2[0] * F2[1] - U2[1] * F2[4] - U2[2] * F2[7], -U2[0] * F2[2] - U2[1] * F2[5] - U2[2] * F2[8], 1), this._viewProj = this.projectionMatrix.multiply(this.viewMatrix); + }, this.setSize = (A2, Q2) => { + this._width = A2, this._height = Q2, this._updateProjectionMatrix(); + }; + } + get fx() { + return this._fx; + } + set fx(A2) { + this._fx !== A2 && (this._fx = A2, this._updateProjectionMatrix()); + } + get fy() { + return this._fy; + } + set fy(A2) { + this._fy !== A2 && (this._fy = A2, this._updateProjectionMatrix()); + } + get near() { + return this._near; + } + set near(A2) { + this._near !== A2 && (this._near = A2, this._updateProjectionMatrix()); + } + get far() { + return this._far; + } + set far(A2) { + this._far !== A2 && (this._far = A2, this._updateProjectionMatrix()); + } + get width() { + return this._width; + } + get height() { + return this._height; + } + get projectionMatrix() { + return this._projectionMatrix; + } + get viewMatrix() { + return this._viewMatrix; + } + get viewProj() { + return this._viewProj; + } +}; +var I = class _I { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 0) { + this.x = A2, this.y = Q2, this.z = F2, this.w = B2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && (this.z === A2.z && this.w === A2.w)); + } + add(A2) { + return "number" == typeof A2 ? new _I(this.x + A2, this.y + A2, this.z + A2, this.w + A2) : new _I(this.x + A2.x, this.y + A2.y, this.z + A2.z, this.w + A2.w); + } + subtract(A2) { + return "number" == typeof A2 ? new _I(this.x - A2, this.y - A2, this.z - A2, this.w - A2) : new _I(this.x - A2.x, this.y - A2.y, this.z - A2.z, this.w - A2.w); + } + multiply(A2) { + return "number" == typeof A2 ? new _I(this.x * A2, this.y * A2, this.z * A2, this.w * A2) : A2 instanceof _I ? new _I(this.x * A2.x, this.y * A2.y, this.z * A2.z, this.w * A2.w) : new _I(this.x * A2.buffer[0] + this.y * A2.buffer[4] + this.z * A2.buffer[8] + this.w * A2.buffer[12], this.x * A2.buffer[1] + this.y * A2.buffer[5] + this.z * A2.buffer[9] + this.w * A2.buffer[13], this.x * A2.buffer[2] + this.y * A2.buffer[6] + this.z * A2.buffer[10] + this.w * A2.buffer[14], this.x * A2.buffer[3] + this.y * A2.buffer[7] + this.z * A2.buffer[11] + this.w * A2.buffer[15]); + } + dot(A2) { + return this.x * A2.x + this.y * A2.y + this.z * A2.z + this.w * A2.w; + } + lerp(A2, Q2) { + return new _I(this.x + (A2.x - this.x) * Q2, this.y + (A2.y - this.y) * Q2, this.z + (A2.z - this.z) * Q2, this.w + (A2.w - this.w) * Q2); + } + magnitude() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + } + distanceTo(A2) { + return Math.sqrt((this.x - A2.x) ** 2 + (this.y - A2.y) ** 2 + (this.z - A2.z) ** 2 + (this.w - A2.w) ** 2); + } + normalize() { + const A2 = this.magnitude(); + return new _I(this.x / A2, this.y / A2, this.z / A2, this.w / A2); + } + flat() { + return [this.x, this.y, this.z, this.w]; + } + clone() { + return new _I(this.x, this.y, this.z, this.w); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var R = class extends d { + constructor(Q2 = void 0) { + super(), this._data = Q2 || new e(), this._position = new A(0, 0, -5), this.update = () => { + this.data.update(this.position, this.rotation); + }, this.screenPointToRay = (Q3, F2) => { + const B2 = new I(Q3, F2, -1, 1), U2 = this._data.projectionMatrix.invert(), l2 = B2.multiply(U2), t2 = this._data.viewMatrix.invert(), d2 = l2.multiply(t2); + return new A(d2.x / d2.w, d2.y / d2.w, d2.z / d2.w).subtract(this.position).normalize(); + }; + } + get data() { + return this._data; + } +}; +var a = class extends F { + constructor() { + super(), this._objects = [], this.addObject = (A2) => { + this.objects.push(A2), this.dispatchEvent(new U(A2)); + }, this.removeObject = (A2) => { + const Q2 = this.objects.indexOf(A2); + if (Q2 < 0) + throw new Error("Object not found in scene"); + this.objects.splice(Q2, 1), this.dispatchEvent(new l(A2)); + }, this.findObject = (A2) => { + for (const Q2 of this.objects) + if (A2(Q2)) + return Q2; + }, this.findObjectOfType = (A2) => { + for (const Q2 of this.objects) + if (Q2 instanceof A2) + return Q2; + }, this.reset = () => { + const A2 = this.objects.slice(); + for (const Q2 of A2) + this.removeObject(Q2); + }, this.reset(); + } + saveToFile(A2 = null) { + if (!document) + return; + if (!A2) { + const Q3 = /* @__PURE__ */ new Date(); + A2 = `scene-${Q3.getFullYear()}-${Q3.getMonth() + 1}-${Q3.getDate()}.splat`; + } + const Q2 = []; + let F2 = 0; + for (const A3 of this.objects) + if (A3.applyRotation(), A3.applyScale(), A3.applyPosition(), A3 instanceof Z) { + const B3 = A3.data.serialize(); + Q2.push(B3), F2 += A3.data.vertexCount; + } + const B2 = new Uint8Array(F2 * V.RowLength); + let U2 = 0; + for (const A3 of Q2) + B2.set(A3, U2), U2 += A3.length; + const l2 = new Blob([B2.buffer], { type: "application/octet-stream" }), t2 = document.createElement("a"); + t2.download = A2, t2.href = URL.createObjectURL(l2), t2.click(); + } + get objects() { + return this._objects; + } +}; +var g = class { + static async LoadAsync(A2, Q2, F2, B2 = false) { + const U2 = await fetch(A2, { mode: "cors", credentials: "omit", cache: B2 ? "force-cache" : "default" }); + if (200 != U2.status) + throw new Error(U2.status + " Unable to load " + U2.url); + const l2 = U2.body.getReader(), t2 = parseInt(U2.headers.get("content-length")), d2 = new Uint8Array(t2); + let n2 = 0; + for (; ; ) { + const { done: A3, value: Q3 } = await l2.read(); + if (A3) + break; + d2.set(Q3, n2), n2 += Q3.length, null == F2 || F2(n2 / t2); + } + const e2 = V.Deserialize(d2), I2 = new Z(e2); + return Q2.addObject(I2), I2; + } + static async LoadFromFileAsync(A2, Q2, F2) { + const B2 = new FileReader(); + let U2 = new Z(); + return B2.onload = (A3) => { + const F3 = new Uint8Array(A3.target.result), B3 = V.Deserialize(F3); + U2 = new Z(B3), Q2.addObject(U2); + }, B2.onprogress = (A3) => { + null == F2 || F2(A3.loaded / A3.total); + }, B2.readAsArrayBuffer(A2), await new Promise((A3) => { + B2.onloadend = () => { + A3(); + }; + }), U2; + } +}; +var i = class { + static async LoadAsync(A2, Q2, F2, B2 = "", U2 = false) { + const l2 = await fetch(A2, { mode: "cors", credentials: "omit", cache: U2 ? "force-cache" : "default" }); + if (200 != l2.status) + throw new Error(l2.status + " Unable to load " + l2.url); + const t2 = l2.body.getReader(), d2 = parseInt(l2.headers.get("content-length")), n2 = new Uint8Array(d2); + let e2 = 0; + for (; ; ) { + const { done: A3, value: Q3 } = await t2.read(); + if (A3) + break; + n2.set(Q3, e2), e2 += Q3.length, null == F2 || F2(e2 / d2); + } + if (112 !== n2[0] || 108 !== n2[1] || 121 !== n2[2] || 10 !== n2[3]) + throw new Error("Invalid PLY file"); + const I2 = new Uint8Array(this._ParsePLYBuffer(n2.buffer, B2)), R2 = V.Deserialize(I2), a2 = new Z(R2); + return Q2.addObject(a2), a2; + } + static async LoadFromFileAsync(A2, Q2, F2, B2 = "") { + const U2 = new FileReader(); + let l2 = new Z(); + return U2.onload = (A3) => { + const F3 = new Uint8Array(this._ParsePLYBuffer(A3.target.result, B2)), U3 = V.Deserialize(F3); + l2 = new Z(U3), Q2.addObject(l2); + }, U2.onprogress = (A3) => { + null == F2 || F2(A3.loaded / A3.total); + }, U2.readAsArrayBuffer(A2), await new Promise((A3) => { + U2.onloadend = () => { + A3(); + }; + }), l2; + } + static _ParsePLYBuffer(F2, B2) { + const U2 = new Uint8Array(F2), l2 = new TextDecoder().decode(U2.slice(0, 10240)), t2 = "end_header\n", d2 = l2.indexOf(t2); + if (d2 < 0) + throw new Error("Unable to read .ply file header"); + const n2 = parseInt(/element vertex (\d+)\n/.exec(l2)[1]); + let Z2 = 0; + const e2 = { double: 8, int: 4, uint: 4, float: 4, short: 2, ushort: 2, uchar: 1 }, I2 = []; + for (const A2 of l2.slice(0, d2).split("\n").filter((A3) => A3.startsWith("property "))) { + const [Q2, F3, B3] = A2.split(" "); + if (I2.push({ name: B3, type: F3, offset: Z2 }), !e2[F3]) + throw new Error(`Unsupported property type: ${F3}`); + Z2 += e2[F3]; + } + const R2 = new DataView(F2, d2 + 11), a2 = new ArrayBuffer(V.RowLength * n2), g2 = Q.FromEuler(new A(Math.PI / 2, 0, 0)); + for (let A2 = 0; A2 < n2; A2++) { + const F3 = new Float32Array(a2, A2 * V.RowLength, 3), U3 = new Float32Array(a2, A2 * V.RowLength + 12, 3), l3 = new Uint8ClampedArray(a2, A2 * V.RowLength + 24, 4), t3 = new Uint8ClampedArray(a2, A2 * V.RowLength + 28, 4); + let d3 = 255, n3 = 0, e3 = 0, i2 = 0; + I2.forEach((Q2) => { + let B3; + switch (Q2.type) { + case "float": + B3 = R2.getFloat32(Q2.offset + A2 * Z2, true); + break; + case "int": + B3 = R2.getInt32(Q2.offset + A2 * Z2, true); + break; + default: + throw new Error(`Unsupported property type: ${Q2.type}`); + } + switch (Q2.name) { + case "x": + F3[0] = B3; + break; + case "y": + F3[1] = B3; + break; + case "z": + F3[2] = B3; + break; + case "scale_0": + U3[0] = Math.exp(B3); + break; + case "scale_1": + U3[1] = Math.exp(B3); + break; + case "scale_2": + U3[2] = Math.exp(B3); + break; + case "red": + l3[0] = B3; + break; + case "green": + l3[1] = B3; + break; + case "blue": + l3[2] = B3; + break; + case "f_dc_0": + l3[0] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_1": + l3[1] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_2": + l3[2] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_3": + l3[3] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "opacity": + l3[3] = 1 / (1 + Math.exp(-B3)) * 255; + break; + case "rot_0": + d3 = B3; + break; + case "rot_1": + n3 = B3; + break; + case "rot_2": + e3 = B3; + break; + case "rot_3": + i2 = B3; + } + }); + let W2 = new Q(n3, e3, i2, d3); + switch (B2) { + case "polycam": { + const A3 = F3[1]; + F3[1] = -F3[2], F3[2] = A3, W2 = g2.multiply(W2); + break; + } + case "": + break; + default: + throw new Error(`Unsupported format: ${B2}`); + } + W2 = W2.normalize(), t3[0] = 128 * W2.w + 128, t3[1] = 128 * W2.x + 128, t3[2] = 128 * W2.y + 128, t3[3] = 128 * W2.z + 128; + } + return a2; + } +}; +function W(A2, Q2, F2) { + var B2 = void 0 === Q2 ? null : Q2, U2 = function(A3, Q3) { + var F3 = atob(A3); + if (Q3) { + for (var B3 = new Uint8Array(F3.length), U3 = 0, l3 = F3.length; U3 < l3; ++U3) + B3[U3] = F3.charCodeAt(U3); + return String.fromCharCode.apply(null, new Uint16Array(B3.buffer)); + } + return F3; + }(A2, void 0 !== F2 && F2), l2 = U2.indexOf("\n", 10) + 1, t2 = U2.substring(l2) + (B2 ? "//# sourceMappingURL=" + B2 : ""), d2 = new Blob([t2], { type: "application/javascript" }); + return URL.createObjectURL(d2); +} +function c(A2, Q2, F2) { + var B2; + return function(U2) { + return B2 = B2 || W(A2, Q2, F2), new Worker(B2, U2); + }; +} +i.SH_C0 = 0.28209479177387814; +var C = c("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJdPW5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PntyZWFkeVByb21pc2VSZXNvbHZlPXJlc29sdmU7cmVhZHlQcm9taXNlUmVqZWN0PXJlamVjdDt9KTt2YXIgbW9kdWxlT3ZlcnJpZGVzPU9iamVjdC5hc3NpZ24oe30sTW9kdWxlKTt2YXIgc2NyaXB0RGlyZWN0b3J5PSIiO2Z1bmN0aW9uIGxvY2F0ZUZpbGUocGF0aCl7aWYoTW9kdWxlWyJsb2NhdGVGaWxlIl0pe3JldHVybiBNb2R1b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pZXdQcm9qOwogICAgICAgICAgcnVuU29ydChsYXN0Vmlldyk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgaWYgKGxhc3RWaWV3ICE9PSB2aWV3UHJvaikgewogICAgICAgICAgICAgICAgICB0aHJvdHRsZWRTb3J0KCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zb3J0RGF0YSkgewogICAgICAgICAgc29ydERhdGEgPSBlLmRhdGEuc29ydERhdGE7CiAgICAgICAgICBhbGxvY2F0ZUJ1ZmZlcnMoKTsKICAgICAgfQogICAgICBpZiAoYWxsb2NhdGluZyB8fCAhc29ydERhdGEpCiAgICAgICAgICByZXR1cm47CiAgICAgIGlmIChlLmRhdGEudmlld1Byb2opIHsKICAgICAgICAgIHZpZXdQcm9qID0gZS5kYXRhLnZpZXdQcm9qOwogICAgICAgICAgdGhyb3R0bGVkU29ydCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPVNvcnRXb3JrZXIuanMubWFwCgo=", null, false); +var h = class { + constructor(A2, Q2) { + this._scene = null, this._camera = null, this._started = false, this._initialized = false, this._renderer = A2; + const F2 = A2.gl; + this._program = F2.createProgram(), this._passes = Q2 || []; + const B2 = F2.createShader(F2.VERTEX_SHADER); + F2.shaderSource(B2, this._getVertexSource()), F2.compileShader(B2), F2.getShaderParameter(B2, F2.COMPILE_STATUS) || console.error(F2.getShaderInfoLog(B2)); + const U2 = F2.createShader(F2.FRAGMENT_SHADER); + F2.shaderSource(U2, this._getFragmentSource()), F2.compileShader(U2), F2.getShaderParameter(U2, F2.COMPILE_STATUS) || console.error(F2.getShaderInfoLog(U2)), F2.attachShader(this.program, B2), F2.attachShader(this.program, U2), F2.linkProgram(this.program), F2.getProgramParameter(this.program, F2.LINK_STATUS) || console.error(F2.getProgramInfoLog(this.program)), this.resize = () => { + F2.useProgram(this._program), this._resize(); + }, this.initialize = () => { + console.assert(!this._initialized, "ShaderProgram already initialized"), F2.useProgram(this._program), this._initialize(); + for (const A3 of this.passes) + A3.initialize(this); + this._initialized = true, this._started = true; + }, this.render = (A3, Q3) => { + F2.useProgram(this._program), this._scene === A3 && this._camera === Q3 || (this.dispose(), this._scene = A3, this._camera = Q3, this.initialize()); + for (const A4 of this.passes) + A4.render(); + this._render(); + }, this.dispose = () => { + if (this._initialized) { + F2.useProgram(this._program); + for (const A3 of this.passes) + A3.dispose(); + this._dispose(), this._scene = null, this._camera = null, this._initialized = false; + } + }; + } + get renderer() { + return this._renderer; + } + get scene() { + return this._scene; + } + get camera() { + return this._camera; + } + get program() { + return this._program; + } + get passes() { + return this._passes; + } + get started() { + return this._started; + } +}; +var s = c("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJdPW5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PntyZWFkeVByb21pc2VSZXNvbHZlPXJlc29sdmU7cmVhZHlQcm9taXNlUmVqZWN0PXJlamVjdDt9KTt2YXIgbW9kdWxlT3ZlcnJpZGVzPU9iamVjdC5hc3NpZ24oe30sTW9kdWxlKTt2YXIgc2NyaXB0RGlyZWN0b3J5PSIiO2Z1bmN0aW9uIGxvY2F0ZUZpbGUocGF0aCl7aWYoTW9kdWxlWyJsb2NhdGVGaWxlIl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AgICAgICByZXNwb25zZS53b3JsZFBvc2l0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFJvdGF0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFNjYWxlcy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS5wb3NpdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5yb3RhdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5zY2FsZXMsCiAgICAgICAgICByZXNwb25zZS5jb2xvcnMsCiAgICAgICAgICByZXNwb25zZS5zZWxlY3Rpb24sCiAgICAgIF0pOwogICAgICBydW5uaW5nID0gZmFsc2U7CiAgfTsKICBjb25zdCBwYWNrVGhyb3R0bGVkID0gKCkgPT4gewogICAgICBpZiAodXBkYXRlUXVldWUubGVuZ3RoID09PSAwKQogICAgICAgICAgcmV0dXJuOwogICAgICBpZiAoIXJ1bm5pbmcpIHsKICAgICAgICAgIHJ1bm5pbmcgPSB0cnVlOwogICAgICAgICAgY29uc3Qgc3BsYXQgPSB1cGRhdGVRdWV1ZS5zaGlmdCgpOwogICAgICAgICAgcGFjayhzcGxhdCk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zcGxhdCkgewogICAgICAgICAgY29uc3Qgc3BsYXQgPSBlLmRhdGEuc3BsYXQ7CiAgICAgICAgICBmb3IgKGNvbnN0IFtpbmRleCwgZXhpc3RpbmddIG9mIHVwZGF0ZVF1ZXVlLmVudHJpZXMoKSkgewogICAgICAgICAgICAgIGlmIChleGlzdGluZy5vZmZzZXQgPT09IHNwbGF0Lm9mZnNldCkgewogICAgICAgICAgICAgICAgICB1cGRhdGVRdWV1ZVtpbmRleF0gPSBzcGxhdDsKICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHVwZGF0ZVF1ZXVlLnB1c2goc3BsYXQpOwogICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPURhdGFXb3JrZXIuanMubWFwCgo=", null, false); +var o = function(A2 = {}) { + var Q2, F2, B2 = A2; + B2.ready = new Promise((A3, B3) => { + Q2 = A3, F2 = B3; + }); + var U2, l2 = Object.assign({}, B2), t2 = ""; + t2 = 0 !== (t2 = self.location.href).indexOf("blob:") ? t2.substr(0, t2.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", U2 = (A3) => { + var Q3 = new XMLHttpRequest(); + return Q3.open("GET", A3, false), Q3.responseType = "arraybuffer", Q3.send(null), new Uint8Array(Q3.response); + }, B2.print || console.log.bind(console); + var d2, n2, V2 = B2.printErr || console.error.bind(console); + function Z2(A3) { + if (X2(A3)) + return function(A4) { + for (var Q3 = atob(A4), F3 = new Uint8Array(Q3.length), B3 = 0; B3 < Q3.length; ++B3) + F3[B3] = Q3.charCodeAt(B3); + return F3; + }(A3.slice(G2.length)); + } + Object.assign(B2, l2), l2 = null, B2.arguments && B2.arguments, B2.thisProgram && B2.thisProgram, B2.quit && B2.quit, B2.wasmBinary && (d2 = B2.wasmBinary), "object" != typeof WebAssembly && E2("no native wasm support detected"); + var e2, I2, R2, a2, g2, i2, W2, c2, C2 = false; + function h2() { + var A3 = n2.buffer; + B2.HEAP8 = e2 = new Int8Array(A3), B2.HEAP16 = R2 = new Int16Array(A3), B2.HEAPU8 = I2 = new Uint8Array(A3), B2.HEAPU16 = a2 = new Uint16Array(A3), B2.HEAP32 = g2 = new Int32Array(A3), B2.HEAPU32 = i2 = new Uint32Array(A3), B2.HEAPF32 = W2 = new Float32Array(A3), B2.HEAPF64 = c2 = new Float64Array(A3); + } + var s2 = [], o2 = [], J2 = [], b2 = 0, r2 = null; + function E2(A3) { + var _a; + (_a = B2.onAbort) == null ? void 0 : _a.call(B2, A3), V2(A3 = "Aborted(" + A3 + ")"), C2 = true, A3 += ". Build with -sASSERTIONS for more info."; + var Q3 = new WebAssembly.RuntimeError(A3); + throw F2(Q3), Q3; + } + var m2, N2, G2 = "data:application/octet-stream;base64,", X2 = (A3) => A3.startsWith(G2); + function Y2(A3) { + return Promise.resolve().then(() => function(A4) { + if (A4 == m2 && d2) + return new Uint8Array(d2); + var Q3 = Z2(A4); + if (Q3) + return Q3; + if (U2) + return U2(A4); + throw "both async and sync fetching of the wasm failed"; + }(A3)); + } + function y2(A3, Q3, F3, B3) { + return function(A4, Q4, F4) { + return Y2(A4).then((A5) => WebAssembly.instantiate(A5, Q4)).then((A5) => A5).then(F4, (A5) => { + V2(`failed to asynchronously prepare wasm: ${A5}`), E2(A5); + }); + }(Q3, F3, B3); + } + X2(m2 = "data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxkGAWsCAAFsAA4BbQAZAW4BAAFvABgBcAAPCRUBAEEBCw8RIw0WFiINIRocHw0bHR4K6VAacQEBfyACRQRAIAAoAgQgASgCBEYPCyAAIAFGBEBBAQ8LAkAgACgCBCICLQAAIgBFIAAgASgCBCIBLQAAIgNHcg0AA0AgAS0AASEDIAItAAEiAEUNASABQQFqIQEgAkEBaiECIAAgA0YNAAsLIAAgA0YLTwECf0G4GigCAC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CwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=") || (N2 = m2, m2 = B2.locateFile ? B2.locateFile(N2, t2) : t2 + N2); + var p = (A3) => { + for (; A3.length > 0; ) + A3.shift()(B2); + }; + B2.noExitRuntime; + var S, k, u = (A3) => { + for (var Q3 = "", F3 = A3; I2[F3]; ) + Q3 += S[I2[F3++]]; + return Q3; + }, T = {}, D = {}, H = (A3) => { + throw new k(A3); + }; + function w(A3, Q3, F3 = {}) { + if (!("argPackAdvance" in Q3)) + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + return function(A4, Q4, F4 = {}) { + var B3 = Q4.name; + if (A4 || H(`type "${B3}" must have a positive integer typeid pointer`), D.hasOwnProperty(A4)) { + if (F4.ignoreDuplicateRegistrations) + return; + H(`Cannot register type '${B3}' twice`); + } + if (D[A4] = Q4, T.hasOwnProperty(A4)) { + var U3 = T[A4]; + delete T[A4], U3.forEach((A5) => A5()); + } + }(A3, Q3, F3); + } + function x() { + this.allocated = [void 0], this.freelist = []; + } + var f = new x(), M = () => { + for (var A3 = 0, Q3 = f.reserved; Q3 < f.allocated.length; ++Q3) + void 0 !== f.allocated[Q3] && ++A3; + return A3; + }, z = (A3) => (A3 || H("Cannot use deleted val. handle = " + A3), f.get(A3).value), v = (A3) => { + switch (A3) { + case void 0: + return 1; + case null: + return 2; + case true: + return 3; + case false: + return 4; + default: + return f.allocate({ refcount: 1, value: A3 }); + } + }; + function K(A3) { + return this.fromWireType(g2[A3 >> 2]); + } + var j = (A3, Q3) => { + switch (Q3) { + case 4: + return function(A4) { + return this.fromWireType(W2[A4 >> 2]); + }; + case 8: + return function(A4) { + return this.fromWireType(c2[A4 >> 3]); + }; + default: + throw new TypeError(`invalid float width (${Q3}): ${A3}`); + } + }, O = (A3, Q3, F3) => { + switch (Q3) { + case 1: + return F3 ? (A4) => e2[A4 >> 0] : (A4) => I2[A4 >> 0]; + case 2: + return F3 ? (A4) => R2[A4 >> 1] : (A4) => a2[A4 >> 1]; + case 4: + return F3 ? (A4) => g2[A4 >> 2] : (A4) => i2[A4 >> 2]; + default: + throw new TypeError(`invalid integer width (${Q3}): ${A3}`); + } + }; + function L(A3) { + return this.fromWireType(i2[A3 >> 2]); + } + var P = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, _ = (A3, Q3) => A3 ? ((A4, Q4, F3) => { + for (var B3 = Q4 + F3, U3 = Q4; A4[U3] && !(U3 >= B3); ) + ++U3; + if (U3 - Q4 > 16 && A4.buffer && P) + return P.decode(A4.subarray(Q4, U3)); + for (var l3 = ""; Q4 < U3; ) { + var t3 = A4[Q4++]; + if (128 & t3) { + var d3 = 63 & A4[Q4++]; + if (192 != (224 & t3)) { + var n3 = 63 & A4[Q4++]; + if ((t3 = 224 == (240 & t3) ? (15 & t3) << 12 | d3 << 6 | n3 : (7 & t3) << 18 | d3 << 12 | n3 << 6 | 63 & A4[Q4++]) < 65536) + l3 += String.fromCharCode(t3); + else { + var V3 = t3 - 65536; + l3 += String.fromCharCode(55296 | V3 >> 10, 56320 | 1023 & V3); + } + } else + l3 += String.fromCharCode((31 & t3) << 6 | d3); + } else + l3 += String.fromCharCode(t3); + } + return l3; + })(I2, A3, Q3) : "", q = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, $ = (A3, Q3) => { + for (var F3 = A3, B3 = F3 >> 1, U3 = B3 + Q3 / 2; !(B3 >= U3) && a2[B3]; ) + ++B3; + if ((F3 = B3 << 1) - A3 > 32 && q) + return q.decode(I2.subarray(A3, F3)); + for (var l3 = "", t3 = 0; !(t3 >= Q3 / 2); ++t3) { + var d3 = R2[A3 + 2 * t3 >> 1]; + if (0 == d3) + break; + l3 += String.fromCharCode(d3); + } + return l3; + }, AA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 2) + return 0; + for (var B3 = Q3, U3 = (F3 -= 2) < 2 * A3.length ? F3 / 2 : A3.length, l3 = 0; l3 < U3; ++l3) { + var t3 = A3.charCodeAt(l3); + R2[Q3 >> 1] = t3, Q3 += 2; + } + return R2[Q3 >> 1] = 0, Q3 - B3; + }, QA = (A3) => 2 * A3.length, FA = (A3, Q3) => { + for (var F3 = 0, B3 = ""; !(F3 >= Q3 / 4); ) { + var U3 = g2[A3 + 4 * F3 >> 2]; + if (0 == U3) + break; + if (++F3, U3 >= 65536) { + var l3 = U3 - 65536; + B3 += String.fromCharCode(55296 | l3 >> 10, 56320 | 1023 & l3); + } else + B3 += String.fromCharCode(U3); + } + return B3; + }, BA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 4) + return 0; + for (var B3 = Q3, U3 = B3 + F3 - 4, l3 = 0; l3 < A3.length; ++l3) { + var t3 = A3.charCodeAt(l3); + if (t3 >= 55296 && t3 <= 57343 && (t3 = 65536 + ((1023 & t3) << 10) | 1023 & A3.charCodeAt(++l3)), g2[Q3 >> 2] = t3, (Q3 += 4) + 4 > U3) + break; + } + return g2[Q3 >> 2] = 0, Q3 - B3; + }, UA = (A3) => { + for (var Q3 = 0, F3 = 0; F3 < A3.length; ++F3) { + var B3 = A3.charCodeAt(F3); + B3 >= 55296 && B3 <= 57343 && ++F3, Q3 += 4; + } + return Q3; + }, lA = (A3) => { + var Q3 = (A3 - n2.buffer.byteLength + 65535) / 65536; + try { + return n2.grow(Q3), h2(), 1; + } catch (A4) { + } + }; + (() => { + for (var A3 = new Array(256), Q3 = 0; Q3 < 256; ++Q3) + A3[Q3] = String.fromCharCode(Q3); + S = A3; + })(), k = B2.BindingError = class extends Error { + constructor(A3) { + super(A3), this.name = "BindingError"; + } + }, B2.InternalError = class extends Error { + constructor(A3) { + super(A3), this.name = "InternalError"; + } + }, Object.assign(x.prototype, { get(A3) { + return this.allocated[A3]; + }, has(A3) { + return void 0 !== this.allocated[A3]; + }, allocate(A3) { + var Q3 = this.freelist.pop() || this.allocated.length; + return this.allocated[Q3] = A3, Q3; + }, free(A3) { + this.allocated[A3] = void 0, this.freelist.push(A3); + } }), f.allocated.push({ value: void 0 }, { value: null }, { value: true }, { value: false }), f.reserved = f.allocated.length, B2.count_emval_handles = M; + var tA = { f: (A3, Q3, F3, B3, U3) => { + }, i: (A3, Q3, F3, B3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: function(A4) { + return !!A4; + }, toWireType: function(A4, Q4) { + return Q4 ? F3 : B3; + }, argPackAdvance: 8, readValueFromPointer: function(A4) { + return this.fromWireType(I2[A4]); + }, destructorFunction: null }); + }, h: (A3, Q3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: (A4) => { + var Q4 = z(A4); + return ((A5) => { + A5 >= f.reserved && 0 == --f.get(A5).refcount && f.free(A5); + })(A4), Q4; + }, toWireType: (A4, Q4) => v(Q4), argPackAdvance: 8, readValueFromPointer: K, destructorFunction: null }); + }, e: (A3, Q3, F3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: (A4) => A4, toWireType: (A4, Q4) => Q4, argPackAdvance: 8, readValueFromPointer: j(Q3, F3), destructorFunction: null }); + }, b: (A3, Q3, F3, B3, U3) => { + Q3 = u(Q3); + var l3 = (A4) => A4; + if (0 === B3) { + var t3 = 32 - 8 * F3; + l3 = (A4) => A4 << t3 >>> t3; + } + var d3 = Q3.includes("unsigned"); + w(A3, { name: Q3, fromWireType: l3, toWireType: d3 ? function(A4, Q4) { + return this.name, Q4 >>> 0; + } : function(A4, Q4) { + return this.name, Q4; + }, argPackAdvance: 8, readValueFromPointer: O(Q3, F3, 0 !== B3), destructorFunction: null }); + }, a: (A3, Q3, F3) => { + var B3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][Q3]; + function U3(A4) { + var Q4 = i2[A4 >> 2], F4 = i2[A4 + 4 >> 2]; + return new B3(e2.buffer, F4, Q4); + } + w(A3, { name: F3 = u(F3), fromWireType: U3, argPackAdvance: 8, readValueFromPointer: U3 }, { ignoreDuplicateRegistrations: true }); + }, d: (A3, Q3) => { + var F3 = "std::string" === (Q3 = u(Q3)); + w(A3, { name: Q3, fromWireType(A4) { + var Q4, B3 = i2[A4 >> 2], U3 = A4 + 4; + if (F3) + for (var l3 = U3, t3 = 0; t3 <= B3; ++t3) { + var d3 = U3 + t3; + if (t3 == B3 || 0 == I2[d3]) { + var n3 = _(l3, d3 - l3); + void 0 === Q4 ? Q4 = n3 : (Q4 += String.fromCharCode(0), Q4 += n3), l3 = d3 + 1; + } + } + else { + var V3 = new Array(B3); + for (t3 = 0; t3 < B3; ++t3) + V3[t3] = String.fromCharCode(I2[U3 + t3]); + Q4 = V3.join(""); + } + return ZA(A4), Q4; + }, toWireType(A4, Q4) { + var B3; + Q4 instanceof ArrayBuffer && (Q4 = new Uint8Array(Q4)); + var U3 = "string" == typeof Q4; + U3 || Q4 instanceof Uint8Array || Q4 instanceof Uint8ClampedArray || Q4 instanceof Int8Array || H("Cannot pass non-string to std::string"), B3 = F3 && U3 ? ((A5) => { + for (var Q5 = 0, F4 = 0; F4 < A5.length; ++F4) { + var B4 = A5.charCodeAt(F4); + B4 <= 127 ? Q5++ : B4 <= 2047 ? Q5 += 2 : B4 >= 55296 && B4 <= 57343 ? (Q5 += 4, ++F4) : Q5 += 3; + } + return Q5; + })(Q4) : Q4.length; + var l3 = VA(4 + B3 + 1), t3 = l3 + 4; + if (i2[l3 >> 2] = B3, F3 && U3) + ((A5, Q5, F4, B4) => { + if (!(B4 > 0)) + return 0; + for (var U4 = F4 + B4 - 1, l4 = 0; l4 < A5.length; ++l4) { + var t4 = A5.charCodeAt(l4); + if (t4 >= 55296 && t4 <= 57343 && (t4 = 65536 + ((1023 & t4) << 10) | 1023 & A5.charCodeAt(++l4)), t4 <= 127) { + if (F4 >= U4) + break; + Q5[F4++] = t4; + } else if (t4 <= 2047) { + if (F4 + 1 >= U4) + break; + Q5[F4++] = 192 | t4 >> 6, Q5[F4++] = 128 | 63 & t4; + } else if (t4 <= 65535) { + if (F4 + 2 >= U4) + break; + Q5[F4++] = 224 | t4 >> 12, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } else { + if (F4 + 3 >= U4) + break; + Q5[F4++] = 240 | t4 >> 18, Q5[F4++] = 128 | t4 >> 12 & 63, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } + } + Q5[F4] = 0; + })(Q4, I2, t3, B3 + 1); + else if (U3) + for (var d3 = 0; d3 < B3; ++d3) { + var n3 = Q4.charCodeAt(d3); + n3 > 255 && (ZA(t3), H("String has UTF-16 code units that do not fit in 8 bits")), I2[t3 + d3] = n3; + } + else + for (d3 = 0; d3 < B3; ++d3) + I2[t3 + d3] = Q4[d3]; + return null !== A4 && A4.push(ZA, l3), l3; + }, argPackAdvance: 8, readValueFromPointer: L, destructorFunction(A4) { + ZA(A4); + } }); + }, c: (A3, Q3, F3) => { + var B3, U3, l3, t3, d3; + F3 = u(F3), 2 === Q3 ? (B3 = $, U3 = AA, t3 = QA, l3 = () => a2, d3 = 1) : 4 === Q3 && (B3 = FA, U3 = BA, t3 = UA, l3 = () => i2, d3 = 2), w(A3, { name: F3, fromWireType: (A4) => { + for (var F4, U4 = i2[A4 >> 2], t4 = l3(), n3 = A4 + 4, V3 = 0; V3 <= U4; ++V3) { + var Z3 = A4 + 4 + V3 * Q3; + if (V3 == U4 || 0 == t4[Z3 >> d3]) { + var e3 = B3(n3, Z3 - n3); + void 0 === F4 ? F4 = e3 : (F4 += String.fromCharCode(0), F4 += e3), n3 = Z3 + Q3; + } + } + return ZA(A4), F4; + }, toWireType: (A4, B4) => { + "string" != typeof B4 && H(`Cannot pass non-string to C++ string type ${F3}`); + var l4 = t3(B4), n3 = VA(4 + l4 + Q3); + return i2[n3 >> 2] = l4 >> d3, U3(B4, n3 + 4, l4 + Q3), null !== A4 && A4.push(ZA, n3), n3; + }, argPackAdvance: 8, readValueFromPointer: K, destructorFunction(A4) { + ZA(A4); + } }); + }, j: (A3, Q3) => { + w(A3, { isVoid: true, name: Q3 = u(Q3), argPackAdvance: 0, fromWireType: () => { + }, toWireType: (A4, Q4) => { + } }); + }, g: (A3) => { + var Q3 = I2.length, F3 = 2147483648; + if ((A3 >>>= 0) > F3) + return false; + for (var B3, U3, l3 = 1; l3 <= 4; l3 *= 2) { + var t3 = Q3 * (1 + 0.2 / l3); + t3 = Math.min(t3, A3 + 100663296); + var d3 = Math.min(F3, (B3 = Math.max(A3, t3)) + ((U3 = 65536) - B3 % U3) % U3); + if (lA(d3)) + return true; + } + return false; + } }, dA = function() { + var _a; + var A3 = { a: tA }; + function Q3(A4, Q4) { + var F3; + return dA = A4.exports, n2 = dA.k, h2(), F3 = dA.l, o2.unshift(F3), function(A5) { + var _a2; + if (b2--, (_a2 = B2.monitorRunDependencies) == null ? void 0 : _a2.call(B2, b2), 0 == b2 && r2) { + var Q5 = r2; + r2 = null, Q5(); + } + }(), dA; + } + if (b2++, (_a = B2.monitorRunDependencies) == null ? void 0 : _a.call(B2, b2), B2.instantiateWasm) + try { + return B2.instantiateWasm(A3, Q3); + } catch (A4) { + V2(`Module.instantiateWasm callback failed with error: ${A4}`), F2(A4); + } + return y2(0, m2, A3, function(A4) { + Q3(A4.instance); + }).catch(F2), {}; + }(); + B2._pack = (A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3) => (B2._pack = dA.m)(A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3); + var nA, VA = B2._malloc = (A3) => (VA = B2._malloc = dA.o)(A3), ZA = B2._free = (A3) => (ZA = B2._free = dA.p)(A3); + function eA() { + function A3() { + nA || (nA = true, B2.calledRun = true, C2 || (p(o2), Q2(B2), B2.onRuntimeInitialized && B2.onRuntimeInitialized(), function() { + if (B2.postRun) + for ("function" == typeof B2.postRun && (B2.postRun = [B2.postRun]); B2.postRun.length; ) + A4 = B2.postRun.shift(), J2.unshift(A4); + var A4; + p(J2); + }())); + } + b2 > 0 || (function() { + if (B2.preRun) + for ("function" == typeof B2.preRun && (B2.preRun = [B2.preRun]); B2.preRun.length; ) + A4 = B2.preRun.shift(), s2.unshift(A4); + var A4; + p(s2); + }(), b2 > 0 || (B2.setStatus ? (B2.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + B2.setStatus(""); + }, 1), A3(); + }, 1)) : A3())); + } + if (r2 = function A3() { + nA || eA(), nA || (r2 = A3); + }, B2.preInit) + for ("function" == typeof B2.preInit && (B2.preInit = [B2.preInit]); B2.preInit.length > 0; ) + B2.preInit.pop()(); + return eA(), A2.ready; +}; +var J = class { + constructor(A2) { + this.dataChanged = false, this.transformsChanged = false, this._updating = /* @__PURE__ */ new Set(), this._dirty = /* @__PURE__ */ new Set(); + let Q2 = 0, F2 = 0; + this._splatIndices = /* @__PURE__ */ new Map(), this._offsets = /* @__PURE__ */ new Map(); + const B2 = /* @__PURE__ */ new Map(); + for (const U3 of A2.objects) + U3 instanceof Z && (this._splatIndices.set(U3, F2), this._offsets.set(U3, Q2), B2.set(Q2, U3), Q2 += U3.data.vertexCount, F2++); + this._vertexCount = Q2, this._width = 2048, this._height = Math.ceil(2 * this.vertexCount / this.width), this._data = new Uint32Array(this.width * this.height * 4), this._transformsWidth = 5, this._transformsHeight = B2.size, this._transforms = new Float32Array(this._transformsWidth * this._transformsHeight * 4), this._transformIndicesWidth = 1024, this._transformIndicesHeight = Math.ceil(this.vertexCount / this._transformIndicesWidth), this._transformIndices = new Uint32Array(this._transformIndicesWidth * this._transformIndicesHeight), this._positions = new Float32Array(3 * this.vertexCount), this._rotations = new Float32Array(4 * this.vertexCount), this._scales = new Float32Array(3 * this.vertexCount), this._worker = new s(); + const U2 = (A3) => { + const Q3 = this._splatIndices.get(A3); + this._transforms.set(A3.transform.buffer, 20 * Q3), this._transforms[20 * Q3 + 16] = A3.selected ? 1 : 0, A3.positionChanged = false, A3.rotationChanged = false, A3.scaleChanged = false, A3.selectedChanged = false, this.transformsChanged = true; + }; + let l2; + this._worker.onmessage = (A3) => { + if (A3.data.response) { + const Q3 = A3.data.response, F3 = B2.get(Q3.offset); + U2(F3); + const l3 = this._splatIndices.get(F3); + for (let A4 = 0; A4 < F3.data.vertexCount; A4++) + this._transformIndices[Q3.offset + A4] = l3; + this._data.set(Q3.data, 8 * Q3.offset), F3.data.reattach(Q3.positions, Q3.rotations, Q3.scales, Q3.colors, Q3.selection), this._positions.set(Q3.worldPositions, 3 * Q3.offset), this._rotations.set(Q3.worldRotations, 4 * Q3.offset), this._scales.set(Q3.worldScales, 3 * Q3.offset), this._updating.delete(F3), F3.selectedChanged = false, this.dataChanged = true; + } + }, async function() { + l2 = await o(); + }(); + const t2 = (A3) => { + if (!l2) + return void async function() { + for (; !l2; ) + await new Promise((A4) => setTimeout(A4, 0)); + }().then(() => { + t2(A3); + }); + U2(A3); + const Q3 = l2._malloc(3 * A3.data.vertexCount * 4), F3 = l2._malloc(4 * A3.data.vertexCount * 4), B3 = l2._malloc(3 * A3.data.vertexCount * 4), d3 = l2._malloc(4 * A3.data.vertexCount), n2 = l2._malloc(A3.data.vertexCount), V2 = l2._malloc(8 * A3.data.vertexCount * 4), Z2 = l2._malloc(3 * A3.data.vertexCount * 4), e2 = l2._malloc(4 * A3.data.vertexCount * 4), I2 = l2._malloc(3 * A3.data.vertexCount * 4); + l2.HEAPF32.set(A3.data.positions, Q3 / 4), l2.HEAPF32.set(A3.data.rotations, F3 / 4), l2.HEAPF32.set(A3.data.scales, B3 / 4), l2.HEAPU8.set(A3.data.colors, d3), l2.HEAPU8.set(A3.data.selection, n2), l2._pack(A3.selected, A3.data.vertexCount, Q3, F3, B3, d3, n2, V2, Z2, e2, I2); + const R2 = new Uint32Array(l2.HEAPU32.buffer, V2, 8 * A3.data.vertexCount), a2 = new Float32Array(l2.HEAPF32.buffer, Z2, 3 * A3.data.vertexCount), g2 = new Float32Array(l2.HEAPF32.buffer, e2, 4 * A3.data.vertexCount), i2 = new Float32Array(l2.HEAPF32.buffer, I2, 3 * A3.data.vertexCount), W2 = this._splatIndices.get(A3), c2 = this._offsets.get(A3); + for (let Q4 = 0; Q4 < A3.data.vertexCount; Q4++) + this._transformIndices[c2 + Q4] = W2; + this._data.set(R2, 8 * c2), this._positions.set(a2, 3 * c2), this._rotations.set(g2, 4 * c2), this._scales.set(i2, 3 * c2), l2._free(Q3), l2._free(F3), l2._free(B3), l2._free(d3), l2._free(n2), l2._free(V2), l2._free(Z2), l2._free(e2), l2._free(I2), this.dataChanged = true; + }, d2 = (A3) => { + if ((A3.positionChanged || A3.rotationChanged || A3.scaleChanged || A3.selectedChanged) && U2(A3), !A3.data.changed || A3.data.detached) + return; + const Q3 = { position: new Float32Array(A3.position.flat()), rotation: new Float32Array(A3.rotation.flat()), scale: new Float32Array(A3.scale.flat()), selected: A3.selected, vertexCount: A3.data.vertexCount, positions: A3.data.positions, rotations: A3.data.rotations, scales: A3.data.scales, colors: A3.data.colors, selection: A3.data.selection, offset: this._offsets.get(A3) }; + this._worker.postMessage({ splat: Q3 }, [Q3.position.buffer, Q3.rotation.buffer, Q3.scale.buffer, Q3.positions.buffer, Q3.rotations.buffer, Q3.scales.buffer, Q3.colors.buffer, Q3.selection.buffer]), this._updating.add(A3), A3.data.detached = true; + }; + this.getSplat = (A3) => { + let Q3 = null; + for (const [F3, B3] of this._offsets) { + if (!(A3 >= B3)) + break; + Q3 = F3; + } + return Q3; + }, this.getLocalIndex = (A3, Q3) => Q3 - this._offsets.get(A3), this.markDirty = (A3) => { + this._dirty.add(A3); + }, this.rebuild = () => { + for (const A3 of this._dirty) + d2(A3); + this._dirty.clear(); + }, this.dispose = () => { + this._worker.terminate(); + }; + for (const A3 of this._splatIndices.keys()) + t2(A3); + } + get offsets() { + return this._offsets; + } + get data() { + return this._data; + } + get width() { + return this._width; + } + get height() { + return this._height; + } + get transforms() { + return this._transforms; + } + get transformsWidth() { + return this._transformsWidth; + } + get transformsHeight() { + return this._transformsHeight; + } + get transformIndices() { + return this._transformIndices; + } + get transformIndicesWidth() { + return this._transformIndicesWidth; + } + get transformIndicesHeight() { + return this._transformIndicesHeight; + } + get positions() { + return this._positions; + } + get rotations() { + return this._rotations; + } + get scales() { + return this._scales; + } + get vertexCount() { + return this._vertexCount; + } + get needsRebuild() { + return this._dirty.size > 0; + } + get updating() { + return this._updating.size > 0; + } +}; +var b = class { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 255) { + this.r = A2, this.g = Q2, this.b = F2, this.a = B2; + } + flat() { + return [this.r, this.g, this.b, this.a]; + } + flatNorm() { + return [this.r / 255, this.g / 255, this.b / 255, this.a / 255]; + } + toHexString() { + return "#" + this.flat().map((A2) => A2.toString(16).padStart(2, "0")).join(""); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var r = class extends h { + constructor(A2, Q2) { + super(A2, Q2), this._outlineThickness = 10, this._outlineColor = new b(255, 165, 0, 255), this._renderData = null, this._depthIndex = null, this._chunks = null, this._splatTexture = null; + const F2 = A2.canvas, B2 = A2.gl; + let U2, l2, t2, d2, n2, V2, e2, I2, R2, a2, g2, i2, W2, c2, h2, s2; + this._resize = () => { + this._camera && (this._camera.data.setSize(F2.width, F2.height), this._camera.update(), l2 = B2.getUniformLocation(this.program, "projection"), B2.uniformMatrix4fv(l2, false, this._camera.data.projectionMatrix.buffer), t2 = B2.getUniformLocation(this.program, "viewport"), B2.uniform2fv(t2, new Float32Array([F2.width, F2.height]))); + }; + const o2 = () => { + U2 = new C(), U2.onmessage = (A3) => { + if (A3.data.depthIndex) { + const { depthIndex: Q3, chunks: F3 } = A3.data; + this._depthIndex = Q3, this._chunks = F3, B2.bindBuffer(B2.ARRAY_BUFFER, s2), B2.bufferData(B2.ARRAY_BUFFER, Q3, B2.STATIC_DRAW); + } + }; + }; + this._initialize = () => { + if (this._scene && this._camera) { + this._resize(), this._scene.addEventListener("objectAdded", r2), this._scene.addEventListener("objectRemoved", E2); + for (const A3 of this._scene.objects) + A3 instanceof Z && A3.addEventListener("objectChanged", m2); + this._renderData = new J(this._scene), d2 = B2.getUniformLocation(this.program, "focal"), B2.uniform2fv(d2, new Float32Array([this._camera.data.fx, this._camera.data.fy])), n2 = B2.getUniformLocation(this.program, "view"), B2.uniformMatrix4fv(n2, false, this._camera.data.viewMatrix.buffer), R2 = B2.getUniformLocation(this.program, "outlineThickness"), B2.uniform1f(R2, this.outlineThickness), a2 = B2.getUniformLocation(this.program, "outlineColor"), B2.uniform4fv(a2, new Float32Array(this.outlineColor.flatNorm())), this._splatTexture = B2.createTexture(), V2 = B2.getUniformLocation(this.program, "u_texture"), B2.uniform1i(V2, 0), W2 = B2.createTexture(), e2 = B2.getUniformLocation(this.program, "u_transforms"), B2.uniform1i(e2, 1), c2 = B2.createTexture(), I2 = B2.getUniformLocation(this.program, "u_transformIndices"), B2.uniform1i(I2, 2), h2 = B2.createBuffer(), B2.bindBuffer(B2.ARRAY_BUFFER, h2), B2.bufferData(B2.ARRAY_BUFFER, new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]), B2.STATIC_DRAW), g2 = B2.getAttribLocation(this.program, "position"), B2.enableVertexAttribArray(g2), B2.vertexAttribPointer(g2, 2, B2.FLOAT, false, 0, 0), s2 = B2.createBuffer(), i2 = B2.getAttribLocation(this.program, "index"), B2.enableVertexAttribArray(i2), B2.bindBuffer(B2.ARRAY_BUFFER, s2), o2(); + } else + console.error("Cannot render without scene and camera"); + }; + const r2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && Q3.object.addEventListener("objectChanged", m2), this.dispose(); + }, E2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && Q3.object.removeEventListener("objectChanged", m2), this.dispose(); + }, m2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && this._renderData && this._renderData.markDirty(Q3.object); + }; + this._render = () => { + if (this._scene && this._camera && this.renderData) { + if (this._camera.update(), U2.postMessage({ viewProj: this._camera.data.viewProj }), this.renderData.needsRebuild && this.renderData.rebuild(), this.renderData.dataChanged || this.renderData.transformsChanged) { + this.renderData.dataChanged && (B2.activeTexture(B2.TEXTURE0), B2.bindTexture(B2.TEXTURE_2D, this.splatTexture), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.RGBA32UI, this.renderData.width, this.renderData.height, 0, B2.RGBA_INTEGER, B2.UNSIGNED_INT, this.renderData.data)), this.renderData.transformsChanged && (B2.activeTexture(B2.TEXTURE1), B2.bindTexture(B2.TEXTURE_2D, W2), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.RGBA32F, this.renderData.transformsWidth, this.renderData.transformsHeight, 0, B2.RGBA, B2.FLOAT, this.renderData.transforms), B2.activeTexture(B2.TEXTURE2), B2.bindTexture(B2.TEXTURE_2D, c2), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.R32UI, this.renderData.transformIndicesWidth, this.renderData.transformIndicesHeight, 0, B2.RED_INTEGER, B2.UNSIGNED_INT, this.renderData.transformIndices)); + const A3 = new Float32Array(this.renderData.positions.slice().buffer), Q3 = new Float32Array(this.renderData.transforms.slice().buffer), F3 = new Uint32Array(this.renderData.transformIndices.slice().buffer); + U2.postMessage({ sortData: { positions: A3, transforms: Q3, transformIndices: F3, vertexCount: this.renderData.vertexCount } }, [A3.buffer, Q3.buffer, F3.buffer]), this.renderData.dataChanged = false, this.renderData.transformsChanged = false; + } + B2.viewport(0, 0, F2.width, F2.height), B2.clearColor(0, 0, 0, 0), B2.clear(B2.COLOR_BUFFER_BIT), B2.disable(B2.DEPTH_TEST), B2.enable(B2.BLEND), B2.blendFuncSeparate(B2.ONE_MINUS_DST_ALPHA, B2.ONE, B2.ONE_MINUS_DST_ALPHA, B2.ONE), B2.blendEquationSeparate(B2.FUNC_ADD, B2.FUNC_ADD), B2.uniformMatrix4fv(l2, false, this._camera.data.projectionMatrix.buffer), B2.uniformMatrix4fv(n2, false, this._camera.data.viewMatrix.buffer), B2.bindBuffer(B2.ARRAY_BUFFER, h2), B2.vertexAttribPointer(g2, 2, B2.FLOAT, false, 0, 0), B2.bindBuffer(B2.ARRAY_BUFFER, s2), B2.vertexAttribIPointer(i2, 1, B2.INT, 0, 0), B2.vertexAttribDivisor(i2, 1), B2.drawArraysInstanced(B2.TRIANGLE_FAN, 0, 4, this.renderData.vertexCount); + } else + console.error("Cannot render without scene and camera"); + }, this._dispose = () => { + if (this._scene && this._camera && this.renderData) { + this._scene.removeEventListener("objectAdded", r2), this._scene.removeEventListener("objectRemoved", E2); + for (const A3 of this._scene.objects) + A3 instanceof Z && A3.removeEventListener("objectChanged", m2); + U2.terminate(), this.renderData.dispose(), B2.deleteTexture(this.splatTexture), B2.deleteTexture(W2), B2.deleteTexture(c2), B2.deleteBuffer(s2), B2.deleteBuffer(h2); + } else + console.error("Cannot dispose without scene and camera"); + }, this._setOutlineThickness = (A3) => { + this._outlineThickness = A3, this._initialized && B2.uniform1f(R2, A3); + }, this._setOutlineColor = (A3) => { + this._outlineColor = A3, this._initialized && B2.uniform4fv(a2, new Float32Array(A3.flatNorm())); + }; + } + get renderData() { + return this._renderData; + } + get depthIndex() { + return this._depthIndex; + } + get chunks() { + return this._chunks; + } + get splatTexture() { + return this._splatTexture; + } + get outlineThickness() { + return this._outlineThickness; + } + set outlineThickness(A2) { + this._setOutlineThickness(A2); + } + get outlineColor() { + return this._outlineColor; + } + set outlineColor(A2) { + this._setOutlineColor(A2); + } + _getVertexSource() { + return "#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n"; + } + _getFragmentSource() { + return "#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n"; + } +}; +var E = class { + constructor(A2 = 1) { + let Q2, F2, B2, U2, l2 = 0, t2 = false; + this.initialize = (A3) => { + if (!(A3 instanceof r)) + throw new Error("FadeInPass requires a RenderProgram"); + l2 = A3.started ? 1 : 0, t2 = true, Q2 = A3, F2 = A3.renderer.gl, B2 = F2.getUniformLocation(Q2.program, "useDepthFade"), F2.uniform1i(B2, 1), U2 = F2.getUniformLocation(Q2.program, "depthFade"), F2.uniform1f(U2, l2); + }, this.render = () => { + var d2; + t2 && !(null === (d2 = Q2.renderData) || void 0 === d2 ? void 0 : d2.updating) && (F2.useProgram(Q2.program), l2 = Math.min(l2 + 0.01 * A2, 1), l2 >= 1 && (t2 = false, F2.uniform1i(B2, 0)), F2.uniform1f(U2, l2)); + }; + } + dispose() { + } +}; +var m = class { + constructor(A2 = null, Q2 = null) { + this._backgroundColor = new b(); + const F2 = A2 || document.createElement("canvas"); + A2 || (F2.style.display = "block", F2.style.boxSizing = "border-box", F2.style.width = "100%", F2.style.height = "100%", F2.style.margin = "0", F2.style.padding = "0", document.body.appendChild(F2)), F2.style.background = this._backgroundColor.toHexString(), this._canvas = F2, this._gl = F2.getContext("webgl2", { antialias: false }); + const B2 = Q2 || []; + Q2 || B2.push(new E()), this._renderProgram = new r(this, B2); + const U2 = [this._renderProgram]; + this.resize = () => { + const A3 = F2.clientWidth, Q3 = F2.clientHeight; + F2.width === A3 && F2.height === Q3 || this.setSize(A3, Q3); + }, this.setSize = (A3, Q3) => { + F2.width = A3, F2.height = Q3, this._gl.viewport(0, 0, F2.width, F2.height); + for (const A4 of U2) + A4.resize(); + }, this.render = (A3, Q3) => { + for (const F3 of U2) + F3.render(A3, Q3); + }, this.dispose = () => { + for (const A3 of U2) + A3.dispose(); + }, this.addProgram = (A3) => { + U2.push(A3); + }, this.removeProgram = (A3) => { + const Q3 = U2.indexOf(A3); + if (Q3 < 0) + throw new Error("Program not found"); + U2.splice(Q3, 1); + }, this.resize(); + } + get canvas() { + return this._canvas; + } + get gl() { + return this._gl; + } + get renderProgram() { + return this._renderProgram; + } + get backgroundColor() { + return this._backgroundColor; + } + set backgroundColor(A2) { + this._backgroundColor = A2, this._canvas.style.background = A2.toHexString(); + } +}; +var N = class { + constructor(F2, B2, U2 = 0.5, l2 = 0.5, t2 = 5, d2 = true, V2 = new A()) { + this.minAngle = -90, this.maxAngle = 90, this.minZoom = 0.1, this.maxZoom = 30, this.orbitSpeed = 1, this.panSpeed = 1, this.zoomSpeed = 1, this.dampening = 0.12, this.setCameraTarget = () => { + }; + let Z2 = V2.clone(), e2 = Z2.clone(), I2 = U2, R2 = l2, a2 = t2, g2 = false, i2 = false, W2 = 0, c2 = 0, C2 = 0; + const h2 = {}; + let s2 = false; + F2.addEventListener("objectChanged", () => { + if (s2) + return; + const Q2 = F2.rotation.toEuler(); + I2 = -Q2.y, R2 = -Q2.x; + const B3 = F2.position.x - a2 * Math.sin(I2) * Math.cos(R2), U3 = F2.position.y + a2 * Math.sin(R2), l3 = F2.position.z + a2 * Math.cos(I2) * Math.cos(R2); + e2 = new A(B3, U3, l3); + }), this.setCameraTarget = (Q2) => { + const B3 = Q2.x - F2.position.x, U3 = Q2.y - F2.position.y, l3 = Q2.z - F2.position.z; + a2 = Math.sqrt(B3 * B3 + U3 * U3 + l3 * l3), R2 = Math.atan2(U3, Math.sqrt(B3 * B3 + l3 * l3)), I2 = -Math.atan2(B3, l3), e2 = new A(Q2.x, Q2.y, Q2.z); + }; + const o2 = () => 0.1 + 0.9 * (a2 - this.minZoom) / (this.maxZoom - this.minZoom), J2 = (A2) => { + h2[A2.code] = true, "ArrowUp" === A2.code && (h2.KeyW = true), "ArrowDown" === A2.code && (h2.KeyS = true), "ArrowLeft" === A2.code && (h2.KeyA = true), "ArrowRight" === A2.code && (h2.KeyD = true); + }, b2 = (A2) => { + h2[A2.code] = false, "ArrowUp" === A2.code && (h2.KeyW = false), "ArrowDown" === A2.code && (h2.KeyS = false), "ArrowLeft" === A2.code && (h2.KeyA = false), "ArrowRight" === A2.code && (h2.KeyD = false); + }, r2 = (A2) => { + p(A2), g2 = true, i2 = 2 === A2.button, c2 = A2.clientX, C2 = A2.clientY, window.addEventListener("mouseup", E2); + }, E2 = (A2) => { + p(A2), g2 = false, i2 = false, window.removeEventListener("mouseup", E2); + }, m2 = (Q2) => { + if (p(Q2), !g2 || !F2) + return; + const B3 = Q2.clientX - c2, U3 = Q2.clientY - C2; + if (i2) { + const Q3 = o2(), l3 = -B3 * this.panSpeed * 0.01 * Q3, t3 = -U3 * this.panSpeed * 0.01 * Q3, d3 = n.RotationFromQuaternion(F2.rotation).buffer, V3 = new A(d3[0], d3[3], d3[6]), Z3 = new A(d3[1], d3[4], d3[7]); + e2 = e2.add(V3.multiply(l3)), e2 = e2.add(Z3.multiply(t3)); + } else + I2 -= B3 * this.orbitSpeed * 3e-3, R2 += U3 * this.orbitSpeed * 3e-3, R2 = Math.min(Math.max(R2, this.minAngle * Math.PI / 180), this.maxAngle * Math.PI / 180); + c2 = Q2.clientX, C2 = Q2.clientY; + }, N2 = (A2) => { + p(A2); + const Q2 = o2(); + a2 += A2.deltaY * this.zoomSpeed * 0.025 * Q2, a2 = Math.min(Math.max(a2, this.minZoom), this.maxZoom); + }, G2 = (A2) => { + if (p(A2), 1 === A2.touches.length) + g2 = true, i2 = false, c2 = A2.touches[0].clientX, C2 = A2.touches[0].clientY, W2 = 0; + else if (2 === A2.touches.length) { + g2 = true, i2 = true, c2 = (A2.touches[0].clientX + A2.touches[1].clientX) / 2, C2 = (A2.touches[0].clientY + A2.touches[1].clientY) / 2; + const Q2 = A2.touches[0].clientX - A2.touches[1].clientX, F3 = A2.touches[0].clientY - A2.touches[1].clientY; + W2 = Math.sqrt(Q2 * Q2 + F3 * F3); + } + }, X2 = (A2) => { + p(A2), g2 = false, i2 = false; + }, Y2 = (Q2) => { + if (p(Q2), g2 && F2) + if (i2) { + const B3 = o2(), U3 = Q2.touches[0].clientX - Q2.touches[1].clientX, l3 = Q2.touches[0].clientY - Q2.touches[1].clientY, t3 = Math.sqrt(U3 * U3 + l3 * l3); + a2 += (W2 - t3) * this.zoomSpeed * 0.1 * B3, a2 = Math.min(Math.max(a2, this.minZoom), this.maxZoom), W2 = t3; + const d3 = (Q2.touches[0].clientX + Q2.touches[1].clientX) / 2, V3 = (Q2.touches[0].clientY + Q2.touches[1].clientY) / 2, Z3 = d3 - c2, I3 = V3 - C2, R3 = n.RotationFromQuaternion(F2.rotation).buffer, g3 = new A(R3[0], R3[3], R3[6]), i3 = new A(R3[1], R3[4], R3[7]); + e2 = e2.add(g3.multiply(-Z3 * this.panSpeed * 0.025 * B3)), e2 = e2.add(i3.multiply(-I3 * this.panSpeed * 0.025 * B3)), c2 = d3, C2 = V3; + } else { + const A2 = Q2.touches[0].clientX - c2, F3 = Q2.touches[0].clientY - C2; + I2 -= A2 * this.orbitSpeed * 3e-3, R2 += F3 * this.orbitSpeed * 3e-3, R2 = Math.min(Math.max(R2, this.minAngle * Math.PI / 180), this.maxAngle * Math.PI / 180), c2 = Q2.touches[0].clientX, C2 = Q2.touches[0].clientY; + } + }, y2 = (A2, Q2, F3) => (1 - F3) * A2 + F3 * Q2; + this.update = () => { + s2 = true, U2 = y2(U2, I2, this.dampening), l2 = y2(l2, R2, this.dampening), t2 = y2(t2, a2, this.dampening), Z2 = Z2.lerp(e2, this.dampening); + const B3 = Z2.x + t2 * Math.sin(U2) * Math.cos(l2), d3 = Z2.y - t2 * Math.sin(l2), V3 = Z2.z - t2 * Math.cos(U2) * Math.cos(l2); + F2.position = new A(B3, d3, V3); + const g3 = Z2.subtract(F2.position).normalize(), i3 = Math.asin(-g3.y), W3 = Math.atan2(g3.x, g3.z); + F2.rotation = Q.FromEuler(new A(i3, W3, 0)); + const c3 = 0.025, C3 = 0.01, o3 = n.RotationFromQuaternion(F2.rotation).buffer, J3 = new A(-o3[2], -o3[5], -o3[8]), b3 = new A(o3[0], o3[3], o3[6]); + h2.KeyS && (e2 = e2.add(J3.multiply(c3))), h2.KeyW && (e2 = e2.subtract(J3.multiply(c3))), h2.KeyA && (e2 = e2.subtract(b3.multiply(c3))), h2.KeyD && (e2 = e2.add(b3.multiply(c3))), h2.KeyE && (I2 += C3), h2.KeyQ && (I2 -= C3), h2.KeyR && (R2 += C3), h2.KeyF && (R2 -= C3), s2 = false; + }; + const p = (A2) => { + A2.preventDefault(), A2.stopPropagation(); + }; + this.dispose = () => { + B2.removeEventListener("dragenter", p), B2.removeEventListener("dragover", p), B2.removeEventListener("dragleave", p), B2.removeEventListener("contextmenu", p), B2.removeEventListener("mousedown", r2), B2.removeEventListener("mousemove", m2), B2.removeEventListener("wheel", N2), B2.removeEventListener("touchstart", G2), B2.removeEventListener("touchend", X2), B2.removeEventListener("touchmove", Y2), d2 && (window.removeEventListener("keydown", J2), window.removeEventListener("keyup", b2)); + }, d2 && (window.addEventListener("keydown", J2), window.addEventListener("keyup", b2)), B2.addEventListener("dragenter", p), B2.addEventListener("dragover", p), B2.addEventListener("dragleave", p), B2.addEventListener("contextmenu", p), B2.addEventListener("mousedown", r2), B2.addEventListener("mousemove", m2), B2.addEventListener("wheel", N2), B2.addEventListener("touchstart", G2), B2.addEventListener("touchend", X2), B2.addEventListener("touchmove", Y2), this.update(); + } +}; +var G = class { + constructor(A2, Q2) { + this.normal = A2, this.point = Q2; + } + intersect(A2, Q2) { + const F2 = this.normal.dot(Q2); + if (Math.abs(F2) < 1e-4) + return null; + const B2 = this.normal.dot(this.point.subtract(A2)) / F2; + return B2 < 0 ? null : A2.add(Q2.multiply(B2)); + } +}; +var X = class { + initialize(A2) { + } + render() { + } + dispose() { + } +}; +var Y = function(A2 = {}) { + var Q2, F2, B2 = A2; + B2.ready = new Promise((A3, B3) => { + Q2 = A3, F2 = B3; + }); + var U2 = Object.assign({}, B2), l2 = ""; + "undefined" != typeof document && document.currentScript && (l2 = document.currentScript.src), l2 = 0 !== l2.indexOf("blob:") ? l2.substr(0, l2.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", B2.print || console.log.bind(console); + var t2, d2, n2 = B2.printErr || console.error.bind(console); + function V2(A3) { + if (G2(A3)) + return function(A4) { + for (var Q3 = atob(A4), F3 = new Uint8Array(Q3.length), B3 = 0; B3 < Q3.length; ++B3) + F3[B3] = Q3.charCodeAt(B3); + return F3; + }(A3.slice(N2.length)); + } + Object.assign(B2, U2), U2 = null, B2.arguments && B2.arguments, B2.thisProgram && B2.thisProgram, B2.quit && B2.quit, B2.wasmBinary && (t2 = B2.wasmBinary), "object" != typeof WebAssembly && r2("no native wasm support detected"); + var Z2, e2, I2, R2, a2, g2, i2, W2, c2 = false; + function C2() { + var A3 = d2.buffer; + B2.HEAP8 = Z2 = new Int8Array(A3), B2.HEAP16 = I2 = new Int16Array(A3), B2.HEAPU8 = e2 = new Uint8Array(A3), B2.HEAPU16 = R2 = new Uint16Array(A3), B2.HEAP32 = a2 = new Int32Array(A3), B2.HEAPU32 = g2 = new Uint32Array(A3), B2.HEAPF32 = i2 = new Float32Array(A3), B2.HEAPF64 = W2 = new Float64Array(A3); + } + var h2 = [], s2 = [], o2 = [], J2 = 0, b2 = null; + function r2(A3) { + var _a; + (_a = B2.onAbort) == null ? void 0 : _a.call(B2, A3), n2(A3 = "Aborted(" + A3 + ")"), c2 = true, A3 += ". Build with -sASSERTIONS for more info."; + var Q3 = new WebAssembly.RuntimeError(A3); + throw F2(Q3), Q3; + } + var E2, m2, N2 = "data:application/octet-stream;base64,", G2 = (A3) => A3.startsWith(N2); + function X2(A3) { + return Promise.resolve().then(() => function(A4) { + if (A4 == E2 && t2) + return new Uint8Array(t2); + var Q3 = V2(A4); + if (Q3) + return Q3; + throw "both async and sync fetching of the wasm failed"; + }(A3)); + } + function Y2(A3, Q3, F3, B3) { + return function(A4, Q4, F4) { + return X2(A4).then((A5) => WebAssembly.instantiate(A5, Q4)).then((A5) => A5).then(F4, (A5) => { + n2(`failed to asynchronously prepare wasm: ${A5}`), r2(A5); + }); + }(Q3, F3, B3); + } + G2(E2 = "data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAAQcBBAQLAwMCAgAADAYGBAUBcAEQEAUHAQGAAoCAAgYIAX8BQfCfBAsHGQYBawIAAWwADQFtABkBbgEAAW8AGAFwAA4JFQEAQQELDw8XDBUVIgwhGhwfDBsdHgrfUxlxAQF/IAJFBEAgACgCBCABKAIERg8LIAAgAUYEQEEBDwsCQCAAKAIEIgItAAAiAEUgACABKAIEIgEtAAAiA0dyDQADQCABLQABIQM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kDAAAYAoAAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWZFRQAApAwAAIgKAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lkRUUAAKQMAACwCgAATjEwX19jeHhhYml2MTE2X19zaGltX3R5cGVfaW5mb0UAAAAAzAwAANgKAAAwDQAATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAAAAzAwAAAgLAAD8CgAATjEwX19jeHhhYml2MTE3X19wYmFzZV90eXBlX2luZm9FAAAAzAwAADgLAAD8CgAATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UAzAwAAGgLAABcCwAAAAAAANwLAAACAAAAAwAAAAQAAAAFAAAABgAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQDMDAAAtAsAAPwKAAB2AAAAoAsAAOgLAABiAAAAoAsAAPQLAABjAAAAoAsAAAAMAABoAAAAoAsAAAwMAABhAAAAoAsAABgMAABzAAAAoAsAACQMAAB0AAAAoAsAADAMAABpAAAAoAsAADwMAABqAAAAoAsAAEgMAABsAAAAoAsAAFQMAABtAAAAoAsAAGAMAAB4AAAAoAsAAGwMAAB5AAAAoAsAAHgMAABmAAAAoAsAAIQMAABkAAAAoAsAAJAMAAAAAAAALAsAAAIAAAAHAAAABAAAAAUAAAAIAAAACQAAAAoAAAALAAAAAAAAABQNAAACAAAADAAAAAQAAAAFAAAACAAAAA0AAAAOAAAADwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B") || (m2 = E2, E2 = B2.locateFile ? B2.locateFile(m2, l2) : l2 + m2); + var y2 = (A3) => { + for (; A3.length > 0; ) + A3.shift()(B2); + }; + B2.noExitRuntime; + var p, S, k = (A3) => { + for (var Q3 = "", F3 = A3; e2[F3]; ) + Q3 += p[e2[F3++]]; + return Q3; + }, u = {}, T = {}, D = (A3) => { + throw new S(A3); + }; + function H(A3, Q3, F3 = {}) { + if (!("argPackAdvance" in Q3)) + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + return function(A4, Q4, F4 = {}) { + var B3 = Q4.name; + if (A4 || D(`type "${B3}" must have a positive integer typeid pointer`), T.hasOwnProperty(A4)) { + if (F4.ignoreDuplicateRegistrations) + return; + D(`Cannot register type '${B3}' twice`); + } + if (T[A4] = Q4, u.hasOwnProperty(A4)) { + var U3 = u[A4]; + delete u[A4], U3.forEach((A5) => A5()); + } + }(A3, Q3, F3); + } + function w() { + this.allocated = [void 0], this.freelist = []; + } + var x = new w(), f = () => { + for (var A3 = 0, Q3 = x.reserved; Q3 < x.allocated.length; ++Q3) + void 0 !== x.allocated[Q3] && ++A3; + return A3; + }, M = (A3) => (A3 || D("Cannot use deleted val. handle = " + A3), x.get(A3).value), z = (A3) => { + switch (A3) { + case void 0: + return 1; + case null: + return 2; + case true: + return 3; + case false: + return 4; + default: + return x.allocate({ refcount: 1, value: A3 }); + } + }; + function v(A3) { + return this.fromWireType(a2[A3 >> 2]); + } + var K = (A3, Q3) => { + switch (Q3) { + case 4: + return function(A4) { + return this.fromWireType(i2[A4 >> 2]); + }; + case 8: + return function(A4) { + return this.fromWireType(W2[A4 >> 3]); + }; + default: + throw new TypeError(`invalid float width (${Q3}): ${A3}`); + } + }, j = (A3, Q3, F3) => { + switch (Q3) { + case 1: + return F3 ? (A4) => Z2[A4 >> 0] : (A4) => e2[A4 >> 0]; + case 2: + return F3 ? (A4) => I2[A4 >> 1] : (A4) => R2[A4 >> 1]; + case 4: + return F3 ? (A4) => a2[A4 >> 2] : (A4) => g2[A4 >> 2]; + default: + throw new TypeError(`invalid integer width (${Q3}): ${A3}`); + } + }; + function O(A3) { + return this.fromWireType(g2[A3 >> 2]); + } + var L = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, P = (A3, Q3) => A3 ? ((A4, Q4, F3) => { + for (var B3 = Q4 + F3, U3 = Q4; A4[U3] && !(U3 >= B3); ) + ++U3; + if (U3 - Q4 > 16 && A4.buffer && L) + return L.decode(A4.subarray(Q4, U3)); + for (var l3 = ""; Q4 < U3; ) { + var t3 = A4[Q4++]; + if (128 & t3) { + var d3 = 63 & A4[Q4++]; + if (192 != (224 & t3)) { + var n3 = 63 & A4[Q4++]; + if ((t3 = 224 == (240 & t3) ? (15 & t3) << 12 | d3 << 6 | n3 : (7 & t3) << 18 | d3 << 12 | n3 << 6 | 63 & A4[Q4++]) < 65536) + l3 += String.fromCharCode(t3); + else { + var V3 = t3 - 65536; + l3 += String.fromCharCode(55296 | V3 >> 10, 56320 | 1023 & V3); + } + } else + l3 += String.fromCharCode((31 & t3) << 6 | d3); + } else + l3 += String.fromCharCode(t3); + } + return l3; + })(e2, A3, Q3) : "", _ = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, q = (A3, Q3) => { + for (var F3 = A3, B3 = F3 >> 1, U3 = B3 + Q3 / 2; !(B3 >= U3) && R2[B3]; ) + ++B3; + if ((F3 = B3 << 1) - A3 > 32 && _) + return _.decode(e2.subarray(A3, F3)); + for (var l3 = "", t3 = 0; !(t3 >= Q3 / 2); ++t3) { + var d3 = I2[A3 + 2 * t3 >> 1]; + if (0 == d3) + break; + l3 += String.fromCharCode(d3); + } + return l3; + }, $ = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 2) + return 0; + for (var B3 = Q3, U3 = (F3 -= 2) < 2 * A3.length ? F3 / 2 : A3.length, l3 = 0; l3 < U3; ++l3) { + var t3 = A3.charCodeAt(l3); + I2[Q3 >> 1] = t3, Q3 += 2; + } + return I2[Q3 >> 1] = 0, Q3 - B3; + }, AA = (A3) => 2 * A3.length, QA = (A3, Q3) => { + for (var F3 = 0, B3 = ""; !(F3 >= Q3 / 4); ) { + var U3 = a2[A3 + 4 * F3 >> 2]; + if (0 == U3) + break; + if (++F3, U3 >= 65536) { + var l3 = U3 - 65536; + B3 += String.fromCharCode(55296 | l3 >> 10, 56320 | 1023 & l3); + } else + B3 += String.fromCharCode(U3); + } + return B3; + }, FA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 4) + return 0; + for (var B3 = Q3, U3 = B3 + F3 - 4, l3 = 0; l3 < A3.length; ++l3) { + var t3 = A3.charCodeAt(l3); + if (t3 >= 55296 && t3 <= 57343 && (t3 = 65536 + ((1023 & t3) << 10) | 1023 & A3.charCodeAt(++l3)), a2[Q3 >> 2] = t3, (Q3 += 4) + 4 > U3) + break; + } + return a2[Q3 >> 2] = 0, Q3 - B3; + }, BA = (A3) => { + for (var Q3 = 0, F3 = 0; F3 < A3.length; ++F3) { + var B3 = A3.charCodeAt(F3); + B3 >= 55296 && B3 <= 57343 && ++F3, Q3 += 4; + } + return Q3; + }, UA = (A3) => { + var Q3 = (A3 - d2.buffer.byteLength + 65535) / 65536; + try { + return d2.grow(Q3), C2(), 1; + } catch (A4) { + } + }; + (() => { + for (var A3 = new Array(256), Q3 = 0; Q3 < 256; ++Q3) + A3[Q3] = String.fromCharCode(Q3); + p = A3; + })(), S = B2.BindingError = class extends Error { + constructor(A3) { + super(A3), this.name = "BindingError"; + } + }, B2.InternalError = class extends Error { + constructor(A3) { + super(A3), this.name = "InternalError"; + } + }, Object.assign(w.prototype, { get(A3) { + return this.allocated[A3]; + }, has(A3) { + return void 0 !== this.allocated[A3]; + }, allocate(A3) { + var Q3 = this.freelist.pop() || this.allocated.length; + return this.allocated[Q3] = A3, Q3; + }, free(A3) { + this.allocated[A3] = void 0, this.freelist.push(A3); + } }), x.allocated.push({ value: void 0 }, { value: null }, { value: true }, { value: false }), x.reserved = x.allocated.length, B2.count_emval_handles = f; + var lA = { f: (A3, Q3, F3, B3, U3) => { + }, i: (A3, Q3, F3, B3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: function(A4) { + return !!A4; + }, toWireType: function(A4, Q4) { + return Q4 ? F3 : B3; + }, argPackAdvance: 8, readValueFromPointer: function(A4) { + return this.fromWireType(e2[A4]); + }, destructorFunction: null }); + }, h: (A3, Q3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: (A4) => { + var Q4 = M(A4); + return ((A5) => { + A5 >= x.reserved && 0 == --x.get(A5).refcount && x.free(A5); + })(A4), Q4; + }, toWireType: (A4, Q4) => z(Q4), argPackAdvance: 8, readValueFromPointer: v, destructorFunction: null }); + }, e: (A3, Q3, F3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: (A4) => A4, toWireType: (A4, Q4) => Q4, argPackAdvance: 8, readValueFromPointer: K(Q3, F3), destructorFunction: null }); + }, b: (A3, Q3, F3, B3, U3) => { + Q3 = k(Q3); + var l3 = (A4) => A4; + if (0 === B3) { + var t3 = 32 - 8 * F3; + l3 = (A4) => A4 << t3 >>> t3; + } + var d3 = Q3.includes("unsigned"); + H(A3, { name: Q3, fromWireType: l3, toWireType: d3 ? function(A4, Q4) { + return this.name, Q4 >>> 0; + } : function(A4, Q4) { + return this.name, Q4; + }, argPackAdvance: 8, readValueFromPointer: j(Q3, F3, 0 !== B3), destructorFunction: null }); + }, a: (A3, Q3, F3) => { + var B3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][Q3]; + function U3(A4) { + var Q4 = g2[A4 >> 2], F4 = g2[A4 + 4 >> 2]; + return new B3(Z2.buffer, F4, Q4); + } + H(A3, { name: F3 = k(F3), fromWireType: U3, argPackAdvance: 8, readValueFromPointer: U3 }, { ignoreDuplicateRegistrations: true }); + }, d: (A3, Q3) => { + var F3 = "std::string" === (Q3 = k(Q3)); + H(A3, { name: Q3, fromWireType(A4) { + var Q4, B3 = g2[A4 >> 2], U3 = A4 + 4; + if (F3) + for (var l3 = U3, t3 = 0; t3 <= B3; ++t3) { + var d3 = U3 + t3; + if (t3 == B3 || 0 == e2[d3]) { + var n3 = P(l3, d3 - l3); + void 0 === Q4 ? Q4 = n3 : (Q4 += String.fromCharCode(0), Q4 += n3), l3 = d3 + 1; + } + } + else { + var V3 = new Array(B3); + for (t3 = 0; t3 < B3; ++t3) + V3[t3] = String.fromCharCode(e2[U3 + t3]); + Q4 = V3.join(""); + } + return VA(A4), Q4; + }, toWireType(A4, Q4) { + var B3; + Q4 instanceof ArrayBuffer && (Q4 = new Uint8Array(Q4)); + var U3 = "string" == typeof Q4; + U3 || Q4 instanceof Uint8Array || Q4 instanceof Uint8ClampedArray || Q4 instanceof Int8Array || D("Cannot pass non-string to std::string"), B3 = F3 && U3 ? ((A5) => { + for (var Q5 = 0, F4 = 0; F4 < A5.length; ++F4) { + var B4 = A5.charCodeAt(F4); + B4 <= 127 ? Q5++ : B4 <= 2047 ? Q5 += 2 : B4 >= 55296 && B4 <= 57343 ? (Q5 += 4, ++F4) : Q5 += 3; + } + return Q5; + })(Q4) : Q4.length; + var l3 = nA(4 + B3 + 1), t3 = l3 + 4; + if (g2[l3 >> 2] = B3, F3 && U3) + ((A5, Q5, F4, B4) => { + if (!(B4 > 0)) + return 0; + for (var U4 = F4 + B4 - 1, l4 = 0; l4 < A5.length; ++l4) { + var t4 = A5.charCodeAt(l4); + if (t4 >= 55296 && t4 <= 57343 && (t4 = 65536 + ((1023 & t4) << 10) | 1023 & A5.charCodeAt(++l4)), t4 <= 127) { + if (F4 >= U4) + break; + Q5[F4++] = t4; + } else if (t4 <= 2047) { + if (F4 + 1 >= U4) + break; + Q5[F4++] = 192 | t4 >> 6, Q5[F4++] = 128 | 63 & t4; + } else if (t4 <= 65535) { + if (F4 + 2 >= U4) + break; + Q5[F4++] = 224 | t4 >> 12, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } else { + if (F4 + 3 >= U4) + break; + Q5[F4++] = 240 | t4 >> 18, Q5[F4++] = 128 | t4 >> 12 & 63, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } + } + Q5[F4] = 0; + })(Q4, e2, t3, B3 + 1); + else if (U3) + for (var d3 = 0; d3 < B3; ++d3) { + var n3 = Q4.charCodeAt(d3); + n3 > 255 && (VA(t3), D("String has UTF-16 code units that do not fit in 8 bits")), e2[t3 + d3] = n3; + } + else + for (d3 = 0; d3 < B3; ++d3) + e2[t3 + d3] = Q4[d3]; + return null !== A4 && A4.push(VA, l3), l3; + }, argPackAdvance: 8, readValueFromPointer: O, destructorFunction(A4) { + VA(A4); + } }); + }, c: (A3, Q3, F3) => { + var B3, U3, l3, t3, d3; + F3 = k(F3), 2 === Q3 ? (B3 = q, U3 = $, t3 = AA, l3 = () => R2, d3 = 1) : 4 === Q3 && (B3 = QA, U3 = FA, t3 = BA, l3 = () => g2, d3 = 2), H(A3, { name: F3, fromWireType: (A4) => { + for (var F4, U4 = g2[A4 >> 2], t4 = l3(), n3 = A4 + 4, V3 = 0; V3 <= U4; ++V3) { + var Z3 = A4 + 4 + V3 * Q3; + if (V3 == U4 || 0 == t4[Z3 >> d3]) { + var e3 = B3(n3, Z3 - n3); + void 0 === F4 ? F4 = e3 : (F4 += String.fromCharCode(0), F4 += e3), n3 = Z3 + Q3; + } + } + return VA(A4), F4; + }, toWireType: (A4, B4) => { + "string" != typeof B4 && D(`Cannot pass non-string to C++ string type ${F3}`); + var l4 = t3(B4), n3 = nA(4 + l4 + Q3); + return g2[n3 >> 2] = l4 >> d3, U3(B4, n3 + 4, l4 + Q3), null !== A4 && A4.push(VA, n3), n3; + }, argPackAdvance: 8, readValueFromPointer: v, destructorFunction(A4) { + VA(A4); + } }); + }, j: (A3, Q3) => { + H(A3, { isVoid: true, name: Q3 = k(Q3), argPackAdvance: 0, fromWireType: () => { + }, toWireType: (A4, Q4) => { + } }); + }, g: (A3) => { + var Q3 = e2.length, F3 = 2147483648; + if ((A3 >>>= 0) > F3) + return false; + for (var B3, U3, l3 = 1; l3 <= 4; l3 *= 2) { + var t3 = Q3 * (1 + 0.2 / l3); + t3 = Math.min(t3, A3 + 100663296); + var d3 = Math.min(F3, (B3 = Math.max(A3, t3)) + ((U3 = 65536) - B3 % U3) % U3); + if (UA(d3)) + return true; + } + return false; + } }, tA = function() { + var _a; + var A3 = { a: lA }; + function Q3(A4, Q4) { + var F3; + return tA = A4.exports, d2 = tA.k, C2(), F3 = tA.l, s2.unshift(F3), function(A5) { + var _a2; + if (J2--, (_a2 = B2.monitorRunDependencies) == null ? void 0 : _a2.call(B2, J2), 0 == J2 && b2) { + var Q5 = b2; + b2 = null, Q5(); + } + }(), tA; + } + if (J2++, (_a = B2.monitorRunDependencies) == null ? void 0 : _a.call(B2, J2), B2.instantiateWasm) + try { + return B2.instantiateWasm(A3, Q3); + } catch (A4) { + n2(`Module.instantiateWasm callback failed with error: ${A4}`), F2(A4); + } + return Y2(0, E2, A3, function(A4) { + Q3(A4.instance); + }).catch(F2), {}; + }(); + B2._evaluate = (A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3, I3, R3) => (B2._evaluate = tA.m)(A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3, I3, R3); + var dA, nA = B2._malloc = (A3) => (nA = B2._malloc = tA.o)(A3), VA = B2._free = (A3) => (VA = B2._free = tA.p)(A3); + function ZA() { + function A3() { + dA || (dA = true, B2.calledRun = true, c2 || (y2(s2), Q2(B2), B2.onRuntimeInitialized && B2.onRuntimeInitialized(), function() { + if (B2.postRun) + for ("function" == typeof B2.postRun && (B2.postRun = [B2.postRun]); B2.postRun.length; ) + A4 = B2.postRun.shift(), o2.unshift(A4); + var A4; + y2(o2); + }())); + } + J2 > 0 || (function() { + if (B2.preRun) + for ("function" == typeof B2.preRun && (B2.preRun = [B2.preRun]); B2.preRun.length; ) + A4 = B2.preRun.shift(), h2.unshift(A4); + var A4; + y2(h2); + }(), J2 > 0 || (B2.setStatus ? (B2.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + B2.setStatus(""); + }, 1), A3(); + }, 1)) : A3())); + } + if (b2 = function A3() { + dA || ZA(), dA || (b2 = A3); + }, B2.preInit) + for ("function" == typeof B2.preInit && (B2.preInit = [B2.preInit]); B2.preInit.length > 0; ) + B2.preInit.pop()(); + return ZA(), A2.ready; +}; +var y = class { + constructor(A2) { + let Q2; + (async () => { + Q2 = await Y(); + })(); + let F2, B2, U2, l2, t2, d2, n2, V2, Z2, e2, I2, R2 = 0, a2 = 0; + this.testPoint = (g2, i2) => { + if (!Q2) + throw new Error("Wasm module not loaded"); + if (!A2.camera) + throw new Error("Camera not set"); + if (!A2.renderData || !A2.depthIndex || !A2.chunks) + throw new Error("Render data not set"); + const W2 = A2.renderData, c2 = A2.depthIndex, C2 = A2.chunks, h2 = Math.pow(2, Math.ceil(Math.log2(W2.vertexCount))); + var s2; + (s2 = h2) > R2 && (R2 > 0 && (Q2._free(F2), Q2._free(U2), Q2._free(l2), Q2._free(t2), Q2._free(d2), Q2._free(n2), Q2._free(V2), Q2._free(Z2), Q2._free(e2), Q2._free(I2)), R2 = s2, F2 = Q2._malloc(64), U2 = Q2._malloc(4 * R2), l2 = Q2._malloc(3 * R2 * 4), t2 = Q2._malloc(4 * R2 * 4), d2 = Q2._malloc(3 * R2 * 4), n2 = Q2._malloc(4 * R2), V2 = Q2._malloc(R2), Z2 = Q2._malloc(12), e2 = Q2._malloc(12), I2 = Q2._malloc(4)); + const o2 = Math.pow(2, Math.ceil(Math.log2(W2.transforms.length / 20))); + var J2; + (J2 = o2) > a2 && (a2 > 0 && Q2._free(B2), a2 = J2, B2 = Q2._malloc(20 * a2 * 4)); + const b2 = (g2 + 1) / 2, r2 = (i2 + 1) / 2, E2 = Math.floor(15 * b2) + 15 * Math.floor(15 * r2), m2 = A2.camera, N2 = m2.screenPointToRay(g2, i2); + Q2.HEAPF32.set(m2.data.viewMatrix.buffer, F2 / 4), Q2.HEAPU32.set(W2.transformIndices, U2 / 4), Q2.HEAPF32.set(W2.positions, l2 / 4), Q2.HEAPF32.set(W2.rotations, t2 / 4), Q2.HEAPF32.set(W2.scales, d2 / 4), Q2.HEAPU32.set(c2, n2 / 4), Q2.HEAPU8.set(C2, V2), Q2.HEAPF32.set(m2.position.flat(), Z2 / 4), Q2.HEAPF32.set(N2.flat(), e2 / 4), Q2.HEAPF32.set(W2.transforms, B2 / 4), Q2._evaluate(F2, B2, U2, l2, t2, d2, n2, V2, W2.vertexCount, E2, Z2, e2, I2); + const G2 = Q2.HEAPU32[I2 / 4]; + if (4294967295 !== G2) { + return W2.getSplat(G2); + } + return null; + }; + } +}; +export { + R as Camera, + e as CameraData, + b as Color32, + E as FadeInPass, + y as IntersectionTester, + g as Loader, + n as Matrix3, + B as Matrix4, + d as Object3D, + N as OrbitControls, + i as PLYLoader, + G as Plane, + Q as Quaternion, + J as RenderData, + r as RenderProgram, + a as Scene, + X as ShaderPass, + h as ShaderProgram, + Z as Splat, + V as SplatData, + A as Vector3, + I as Vector4, + m as WebGLRenderer +}; +//# sourceMappingURL=gsplat.js.map diff --git a/gsplat/node_modules/.vite/deps/gsplat.js.map b/gsplat/node_modules/.vite/deps/gsplat.js.map new file mode 100644 index 0000000..a6d8080 --- /dev/null +++ b/gsplat/node_modules/.vite/deps/gsplat.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../gsplat/src/math/Vector3.ts", "../../gsplat/src/math/Quaternion.ts", "../../gsplat/src/events/EventDispatcher.ts", "../../gsplat/src/math/Matrix4.ts", "../../gsplat/src/events/Events.ts", "../../gsplat/src/core/Object3D.ts", "../../gsplat/src/math/Matrix3.ts", "../../gsplat/src/splats/SplatData.ts", "../../gsplat/src/splats/Splat.ts", "../../gsplat/src/cameras/CameraData.ts", "../../gsplat/src/math/Vector4.ts", "../../gsplat/src/cameras/Camera.ts", "../../gsplat/src/core/Scene.ts", "../../gsplat/src/loaders/Loader.ts", "../../gsplat/src/loaders/PLYLoader.ts", "../../gsplat/src/renderers/webgl/programs/ShaderProgram.ts", "../../gsplat/src/wasm/data.js", "../../gsplat/src/renderers/webgl/utils/RenderData.ts", "../../gsplat/src/math/Color32.ts", "../../gsplat/src/renderers/webgl/programs/RenderProgram.ts", "../../gsplat/src/renderers/webgl/passes/FadeInPass.ts", "../../gsplat/src/renderers/WebGLRenderer.ts", "../../gsplat/src/controls/OrbitControls.ts", "../../gsplat/src/math/Plane.ts", "../../gsplat/src/renderers/webgl/passes/ShaderPass.ts", "../../gsplat/src/wasm/intersect.js", "../../gsplat/src/renderers/webgl/utils/IntersectionTester.ts"], + "sourcesContent": ["import { Matrix4 } from \"./Matrix4\";\n\nclass Vector3 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n equals(v: Vector3): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector3;\n add(v: Vector3): Vector3;\n add(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x + v, this.y + v, this.z + v);\n } else {\n return new Vector3(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n }\n\n subtract(v: number): Vector3;\n subtract(v: Vector3): Vector3;\n subtract(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x - v, this.y - v, this.z - v);\n } else {\n return new Vector3(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n }\n\n multiply(v: number): Vector3;\n multiply(v: Vector3): Vector3;\n multiply(v: Matrix4): Vector3;\n multiply(v: number | Vector3 | Matrix4): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x * v, this.y * v, this.z * v);\n } else if (v instanceof Vector3) {\n return new Vector3(this.x * v.x, this.y * v.y, this.z * v.z);\n } else {\n return new Vector3(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + v.buffer[14],\n );\n }\n }\n\n cross(v: Vector3): Vector3 {\n const x = this.y * v.z - this.z * v.y;\n const y = this.z * v.x - this.x * v.z;\n const z = this.x * v.y - this.y * v.x;\n\n return new Vector3(x, y, z);\n }\n\n dot(v: Vector3): number {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n\n lerp(v: Vector3, t: number): Vector3 {\n return new Vector3(this.x + (v.x - this.x) * t, this.y + (v.y - this.y) * t, this.z + (v.z - this.z) * t);\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n\n distanceTo(v: Vector3): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2);\n }\n\n normalize(): Vector3 {\n const length = this.magnitude();\n\n return new Vector3(this.x / length, this.y / length, this.z / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z];\n }\n\n clone(): Vector3 {\n return new Vector3(this.x, this.y, this.z);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n\n static One(value: number = 1): Vector3 {\n return new Vector3(value, value, value);\n }\n}\n\nexport { Vector3 };\n", "import { Matrix3 } from \"./Matrix3\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Quaternion {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 1) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(q: Quaternion): boolean {\n if (this.x !== q.x) {\n return false;\n }\n if (this.y !== q.y) {\n return false;\n }\n if (this.z !== q.z) {\n return false;\n }\n if (this.w !== q.w) {\n return false;\n }\n\n return true;\n }\n\n normalize(): Quaternion {\n const l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n return new Quaternion(this.x / l, this.y / l, this.z / l, this.w / l);\n }\n\n multiply(q: Quaternion): Quaternion {\n const w1 = this.w,\n x1 = this.x,\n y1 = this.y,\n z1 = this.z;\n const w2 = q.w,\n x2 = q.x,\n y2 = q.y,\n z2 = q.z;\n\n return new Quaternion(\n w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2,\n w1 * y2 - x1 * z2 + y1 * w2 + z1 * x2,\n w1 * z2 + x1 * y2 - y1 * x2 + z1 * w2,\n w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2,\n );\n }\n\n inverse(): Quaternion {\n const l = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n return new Quaternion(-this.x / l, -this.y / l, -this.z / l, this.w / l);\n }\n\n apply(v: Vector3): Vector3 {\n const vecQuat = new Quaternion(v.x, v.y, v.z, 0);\n const conjugate = new Quaternion(-this.x, -this.y, -this.z, this.w);\n const rotatedQuat = this.multiply(vecQuat).multiply(conjugate);\n return new Vector3(rotatedQuat.x, rotatedQuat.y, rotatedQuat.z);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Quaternion {\n return new Quaternion(this.x, this.y, this.z, this.w);\n }\n\n static FromEuler(e: Vector3): Quaternion {\n const halfX = e.x / 2;\n const halfY = e.y / 2;\n const halfZ = e.z / 2;\n const cy = Math.cos(halfY);\n const sy = Math.sin(halfY);\n const cp = Math.cos(halfX);\n const sp = Math.sin(halfX);\n const cz = Math.cos(halfZ);\n const sz = Math.sin(halfZ);\n\n const q = new Quaternion(\n cy * sp * cz + sy * cp * sz,\n sy * cp * cz - cy * sp * sz,\n cy * cp * sz - sy * sp * cz,\n cy * cp * cz + sy * sp * sz,\n );\n return q;\n }\n\n toEuler(): Vector3 {\n const sinr_cosp = 2 * (this.w * this.x + this.y * this.z);\n const cosr_cosp = 1 - 2 * (this.x * this.x + this.y * this.y);\n const x = Math.atan2(sinr_cosp, cosr_cosp);\n\n let y;\n const sinp = 2 * (this.w * this.y - this.z * this.x);\n if (Math.abs(sinp) >= 1) {\n y = (Math.sign(sinp) * Math.PI) / 2;\n } else {\n y = Math.asin(sinp);\n }\n\n const siny_cosp = 2 * (this.w * this.z + this.x * this.y);\n const cosy_cosp = 1 - 2 * (this.y * this.y + this.z * this.z);\n const z = Math.atan2(siny_cosp, cosy_cosp);\n\n return new Vector3(x, y, z);\n }\n\n static FromMatrix3(matrix: Matrix3): Quaternion {\n const m = matrix.buffer;\n const trace = m[0] + m[4] + m[8];\n let x, y, z, w;\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n w = 0.25 / s;\n x = (m[7] - m[5]) * s;\n y = (m[2] - m[6]) * s;\n z = (m[3] - m[1]) * s;\n } else if (m[0] > m[4] && m[0] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[0] - m[4] - m[8]);\n w = (m[7] - m[5]) / s;\n x = 0.25 * s;\n y = (m[1] + m[3]) / s;\n z = (m[2] + m[6]) / s;\n } else if (m[4] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[4] - m[0] - m[8]);\n w = (m[2] - m[6]) / s;\n x = (m[1] + m[3]) / s;\n y = 0.25 * s;\n z = (m[5] + m[7]) / s;\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m[8] - m[0] - m[4]);\n w = (m[3] - m[1]) / s;\n x = (m[2] + m[6]) / s;\n y = (m[5] + m[7]) / s;\n z = 0.25 * s;\n }\n return new Quaternion(x, y, z, w);\n }\n\n static FromAxisAngle(axis: Vector3, angle: number): Quaternion {\n const halfAngle = angle / 2;\n const sin = Math.sin(halfAngle);\n const cos = Math.cos(halfAngle);\n return new Quaternion(axis.x * sin, axis.y * sin, axis.z * sin, cos);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Quaternion };\n", "class EventDispatcher {\n addEventListener: (type: string, listener: (event: Event) => void) => void;\n removeEventListener: (type: string, listener: (event: Event) => void) => void;\n hasEventListener: (type: string, listener: (event: Event) => void) => boolean;\n dispatchEvent: (event: Event) => void;\n\n constructor() {\n const listeners = new Map void>>();\n\n this.addEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n listeners.set(type, new Set());\n }\n\n listeners.get(type)!.add(listener);\n };\n\n this.removeEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return;\n }\n\n listeners.get(type)!.delete(listener);\n };\n\n this.hasEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return false;\n }\n\n return listeners.get(type)!.has(listener);\n };\n\n this.dispatchEvent = (event: Event) => {\n if (!listeners.has(event.type)) {\n return;\n }\n\n for (const listener of listeners.get(event.type)!) {\n listener(event);\n }\n };\n }\n}\n\nexport { EventDispatcher };\n", "import { Quaternion } from \"./Quaternion\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Matrix4 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0, n14: number = 0, \n n21: number = 0, n22: number = 1, n23: number = 0, n24: number = 0, \n n31: number = 0, n32: number = 0, n33: number = 1, n34: number = 0, \n n41: number = 0, n42: number = 0, n43: number = 0, n44: number = 1) {\n this.buffer = [\n n11, n12, n13, n14, \n n21, n22, n23, n24, \n n31, n32, n33, n34, \n n41, n42, n43, n44\n ];\n }\n\n equals(m: Matrix4): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(m: Matrix4): Matrix4 {\n const a = this.buffer;\n const b = m.buffer;\n return new Matrix4(\n b[0] * a[0] + b[1] * a[4] + b[2] * a[8] + b[3] * a[12],\n b[0] * a[1] + b[1] * a[5] + b[2] * a[9] + b[3] * a[13],\n b[0] * a[2] + b[1] * a[6] + b[2] * a[10] + b[3] * a[14],\n b[0] * a[3] + b[1] * a[7] + b[2] * a[11] + b[3] * a[15],\n b[4] * a[0] + b[5] * a[4] + b[6] * a[8] + b[7] * a[12],\n b[4] * a[1] + b[5] * a[5] + b[6] * a[9] + b[7] * a[13],\n b[4] * a[2] + b[5] * a[6] + b[6] * a[10] + b[7] * a[14],\n b[4] * a[3] + b[5] * a[7] + b[6] * a[11] + b[7] * a[15],\n b[8] * a[0] + b[9] * a[4] + b[10] * a[8] + b[11] * a[12],\n b[8] * a[1] + b[9] * a[5] + b[10] * a[9] + b[11] * a[13],\n b[8] * a[2] + b[9] * a[6] + b[10] * a[10] + b[11] * a[14],\n b[8] * a[3] + b[9] * a[7] + b[10] * a[11] + b[11] * a[15],\n b[12] * a[0] + b[13] * a[4] + b[14] * a[8] + b[15] * a[12],\n b[12] * a[1] + b[13] * a[5] + b[14] * a[9] + b[15] * a[13],\n b[12] * a[2] + b[13] * a[6] + b[14] * a[10] + b[15] * a[14],\n b[12] * a[3] + b[13] * a[7] + b[14] * a[11] + b[15] * a[15],\n );\n }\n\n clone(): Matrix4 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix4(\n e[0], e[1], e[2], e[3], \n e[4], e[5], e[6], e[7], \n e[8], e[9], e[10], e[11], \n e[12], e[13], e[14], e[15]\n );\n }\n\n determinant(): number {\n const e = this.buffer;\n // prettier-ignore\n return (\n e[12] * e[9] * e[6] * e[3] - e[8] * e[13] * e[6] * e[3] - e[12] * e[5] * e[10] * e[3] + e[4] * e[13] * e[10] * e[3] +\n e[8] * e[5] * e[14] * e[3] - e[4] * e[9] * e[14] * e[3] - e[12] * e[9] * e[2] * e[7] + e[8] * e[13] * e[2] * e[7] +\n e[12] * e[1] * e[10] * e[7] - e[0] * e[13] * e[10] * e[7] - e[8] * e[1] * e[14] * e[7] + e[0] * e[9] * e[14] * e[7] +\n e[12] * e[5] * e[2] * e[11] - e[4] * e[13] * e[2] * e[11] - e[12] * e[1] * e[6] * e[11] + e[0] * e[13] * e[6] * e[11] +\n e[4] * e[1] * e[14] * e[11] - e[0] * e[5] * e[14] * e[11] - e[8] * e[5] * e[2] * e[15] + e[4] * e[9] * e[2] * e[15] +\n e[8] * e[1] * e[6] * e[15] - e[0] * e[9] * e[6] * e[15] - e[4] * e[1] * e[10] * e[15] + e[0] * e[5] * e[10] * e[15]\n );\n }\n\n invert(): Matrix4 {\n const e = this.buffer;\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible.\");\n }\n const invDet = 1 / det;\n // prettier-ignore\n return new Matrix4(\n invDet * (\n e[5] * e[10] * e[15] - e[5] * e[11] * e[14] - e[9] * e[6] * e[15] + e[9] * e[7] * e[14] + e[13] * e[6] * e[11] - e[13] * e[7] * e[10]\n ),\n invDet * (\n -e[1] * e[10] * e[15] + e[1] * e[11] * e[14] + e[9] * e[2] * e[15] - e[9] * e[3] * e[14] - e[13] * e[2] * e[11] + e[13] * e[3] * e[10]\n ),\n invDet * (\n e[1] * e[6] * e[15] - e[1] * e[7] * e[14] - e[5] * e[2] * e[15] + e[5] * e[3] * e[14] + e[13] * e[2] * e[7] - e[13] * e[3] * e[6]\n ),\n invDet * (\n -e[1] * e[6] * e[11] + e[1] * e[7] * e[10] + e[5] * e[2] * e[11] - e[5] * e[3] * e[10] - e[9] * e[2] * e[7] + e[9] * e[3] * e[6]\n ),\n invDet * (\n -e[4] * e[10] * e[15] + e[4] * e[11] * e[14] + e[8] * e[6] * e[15] - e[8] * e[7] * e[14] - e[12] * e[6] * e[11] + e[12] * e[7] * e[10]\n ),\n invDet * (\n e[0] * e[10] * e[15] - e[0] * e[11] * e[14] - e[8] * e[2] * e[15] + e[8] * e[3] * e[14] + e[12] * e[2] * e[11] - e[12] * e[3] * e[10]\n ),\n invDet * (\n -e[0] * e[6] * e[15] + e[0] * e[7] * e[14] + e[4] * e[2] * e[15] - e[4] * e[3] * e[14] - e[12] * e[2] * e[7] + e[12] * e[3] * e[6]\n ),\n invDet * (\n e[0] * e[6] * e[11] - e[0] * e[7] * e[10] - e[4] * e[2] * e[11] + e[4] * e[3] * e[10] + e[8] * e[2] * e[7] - e[8] * e[3] * e[6]\n ),\n invDet * (\n e[4] * e[9] * e[15] - e[4] * e[11] * e[13] - e[8] * e[5] * e[15] + e[8] * e[7] * e[13] + e[12] * e[5] * e[11] - e[12] * e[7] * e[9]\n ),\n invDet * (\n -e[0] * e[9] * e[15] + e[0] * e[11] * e[13] + e[8] * e[1] * e[15] - e[8] * e[3] * e[13] - e[12] * e[1] * e[11] + e[12] * e[3] * e[9]\n ),\n invDet * (\n e[0] * e[5] * e[15] - e[0] * e[7] * e[13] - e[4] * e[1] * e[15] + e[4] * e[3] * e[13] + e[12] * e[1] * e[7] - e[12] * e[3] * e[5]\n ),\n invDet * (\n -e[0] * e[5] * e[11] + e[0] * e[7] * e[9] + e[4] * e[1] * e[11] - e[4] * e[3] * e[9] - e[8] * e[1] * e[7] + e[8] * e[3] * e[5]\n ),\n invDet * (\n -e[4] * e[9] * e[14] + e[4] * e[10] * e[13] + e[8] * e[5] * e[14] - e[8] * e[6] * e[13] - e[12] * e[5] * e[10] + e[12] * e[6] * e[9]\n ),\n invDet * (\n e[0] * e[9] * e[14] - e[0] * e[10] * e[13] - e[8] * e[1] * e[14] + e[8] * e[2] * e[13] + e[12] * e[1] * e[10] - e[12] * e[2] * e[9]\n ),\n invDet * (\n -e[0] * e[5] * e[14] + e[0] * e[6] * e[13] + e[4] * e[1] * e[14] - e[4] * e[2] * e[13] - e[12] * e[1] * e[6] + e[12] * e[2] * e[5]\n ),\n invDet * (\n e[0] * e[5] * e[10] - e[0] * e[6] * e[9] - e[4] * e[1] * e[10] + e[4] * e[2] * e[9] + e[8] * e[1] * e[6] - e[8] * e[2] * e[5]\n ),\n );\n }\n\n static Compose(position: Vector3, rotation: Quaternion, scale: Vector3): Matrix4 {\n const x = rotation.x,\n y = rotation.y,\n z = rotation.z,\n w = rotation.w;\n const x2 = x + x,\n y2 = y + y,\n z2 = z + z;\n const xx = x * x2,\n xy = x * y2,\n xz = x * z2;\n const yy = y * y2,\n yz = y * z2,\n zz = z * z2;\n const wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n const sx = scale.x,\n sy = scale.y,\n sz = scale.z;\n // prettier-ignore\n return new Matrix4(\n (1 - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1 - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1 - (xx + yy)) * sz, 0,\n position.x, position.y, position.z, 1\n );\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix4 };\n", "import { Object3D } from \"../core/Object3D\";\n\nclass ObjectAddedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectAdded\");\n }\n}\n\nclass ObjectRemovedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectRemoved\");\n }\n}\n\nclass ObjectChangedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectChanged\");\n }\n}\n\nexport { ObjectAddedEvent, ObjectRemovedEvent, ObjectChangedEvent };\n", "import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { ObjectChangedEvent } from \"../events/Events\";\n\nabstract class Object3D extends EventDispatcher {\n public positionChanged: boolean = false;\n public rotationChanged: boolean = false;\n public scaleChanged: boolean = false;\n\n protected _position: Vector3 = new Vector3();\n protected _rotation: Quaternion = new Quaternion();\n protected _scale: Vector3 = new Vector3(1, 1, 1);\n protected _transform: Matrix4 = new Matrix4();\n\n protected _changeEvent = new ObjectChangedEvent(this);\n\n update: () => void;\n applyPosition: () => void;\n applyRotation: () => void;\n applyScale: () => void;\n\n constructor() {\n super();\n\n this.update = () => {};\n\n this.applyPosition = () => {\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n protected _updateMatrix() {\n this._transform = Matrix4.Compose(this._position, this._rotation, this._scale);\n }\n\n get position() {\n return this._position;\n }\n\n set position(position: Vector3) {\n if (!this._position.equals(position)) {\n this._position = position;\n this.positionChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get rotation() {\n return this._rotation;\n }\n\n set rotation(rotation: Quaternion) {\n if (!this._rotation.equals(rotation)) {\n this._rotation = rotation;\n this.rotationChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get scale() {\n return this._scale;\n }\n\n set scale(scale: Vector3) {\n if (!this._scale.equals(scale)) {\n this._scale = scale;\n this.scaleChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get forward() {\n let forward = new Vector3(0, 0, 1);\n forward = this.rotation.apply(forward);\n return forward;\n }\n\n get transform() {\n return this._transform;\n }\n}\n\nexport { Object3D };\n", "import { Quaternion } from \"./Quaternion\";\nimport type { Vector3 } from \"./Vector3\";\n\nclass Matrix3 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0,\n n21: number = 0, n22: number = 1, n23: number = 0,\n n31: number = 0, n32: number = 0, n33: number = 1) {\n this.buffer = [\n n11, n12, n13,\n n21, n22, n23,\n n31, n32, n33\n ];\n }\n\n equals(m: Matrix3): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(v: Matrix3): Matrix3 {\n const a = this.buffer;\n const b = v.buffer;\n return new Matrix3(\n b[0] * a[0] + b[3] * a[1] + b[6] * a[2],\n b[1] * a[0] + b[4] * a[1] + b[7] * a[2],\n b[2] * a[0] + b[5] * a[1] + b[8] * a[2],\n b[0] * a[3] + b[3] * a[4] + b[6] * a[5],\n b[1] * a[3] + b[4] * a[4] + b[7] * a[5],\n b[2] * a[3] + b[5] * a[4] + b[8] * a[5],\n b[0] * a[6] + b[3] * a[7] + b[6] * a[8],\n b[1] * a[6] + b[4] * a[7] + b[7] * a[8],\n b[2] * a[6] + b[5] * a[7] + b[8] * a[8],\n );\n }\n\n clone(): Matrix3 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix3(\n e[0], e[1], e[2],\n e[3], e[4], e[5],\n e[6], e[7], e[8]\n );\n }\n\n static Eye(v: number = 1): Matrix3 {\n return new Matrix3(v, 0, 0, 0, v, 0, 0, 0, v);\n }\n\n static Diagonal(v: Vector3): Matrix3 {\n return new Matrix3(v.x, 0, 0, 0, v.y, 0, 0, 0, v.z);\n }\n\n static RotationFromQuaternion(q: Quaternion): Matrix3 {\n const matrix = new Matrix3(\n 1 - 2 * q.y * q.y - 2 * q.z * q.z,\n 2 * q.x * q.y - 2 * q.z * q.w,\n 2 * q.x * q.z + 2 * q.y * q.w,\n 2 * q.x * q.y + 2 * q.z * q.w,\n 1 - 2 * q.x * q.x - 2 * q.z * q.z,\n 2 * q.y * q.z - 2 * q.x * q.w,\n 2 * q.x * q.z - 2 * q.y * q.w,\n 2 * q.y * q.z + 2 * q.x * q.w,\n 1 - 2 * q.x * q.x - 2 * q.y * q.y,\n );\n return matrix;\n }\n\n static RotationFromEuler(m: Vector3): Matrix3 {\n const cx = Math.cos(m.x);\n const sx = Math.sin(m.x);\n const cy = Math.cos(m.y);\n const sy = Math.sin(m.y);\n const cz = Math.cos(m.z);\n const sz = Math.sin(m.z);\n\n const rotationMatrix = [\n cy * cz + sy * sx * sz,\n -cy * sz + sy * sx * cz,\n sy * cx,\n cx * sz,\n cx * cz,\n -sx,\n -sy * cz + cy * sx * sz,\n sy * sz + cy * sx * cz,\n cy * cx,\n ];\n\n return new Matrix3(...rotationMatrix);\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix3 };\n", "import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\n\nclass SplatData {\n static RowLength = 3 * 4 + 3 * 4 + 4 + 4;\n\n public changed = false;\n public detached = false;\n\n private _vertexCount: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _colors: Uint8Array;\n private _selection: Uint8Array;\n\n translate: (translation: Vector3) => void;\n rotate: (rotation: Quaternion) => void;\n scale: (scale: Vector3) => void;\n serialize: () => Uint8Array;\n reattach: (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => void;\n\n constructor(\n vertexCount: number = 0,\n positions: Float32Array | null = null,\n rotations: Float32Array | null = null,\n scales: Float32Array | null = null,\n colors: Uint8Array | null = null,\n ) {\n this._vertexCount = vertexCount;\n this._positions = positions || new Float32Array(0);\n this._rotations = rotations || new Float32Array(0);\n this._scales = scales || new Float32Array(0);\n this._colors = colors || new Uint8Array(0);\n this._selection = new Uint8Array(this.vertexCount);\n\n this.translate = (translation: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] += translation.x;\n this.positions[3 * i + 1] += translation.y;\n this.positions[3 * i + 2] += translation.z;\n }\n\n this.changed = true;\n };\n\n this.rotate = (rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n for (let i = 0; i < this.vertexCount; i++) {\n const x = this.positions[3 * i + 0];\n const y = this.positions[3 * i + 1];\n const z = this.positions[3 * i + 2];\n\n this.positions[3 * i + 0] = R[0] * x + R[1] * y + R[2] * z;\n this.positions[3 * i + 1] = R[3] * x + R[4] * y + R[5] * z;\n this.positions[3 * i + 2] = R[6] * x + R[7] * y + R[8] * z;\n\n const currentRotation = new Quaternion(\n this.rotations[4 * i + 1],\n this.rotations[4 * i + 2],\n this.rotations[4 * i + 3],\n this.rotations[4 * i + 0],\n );\n\n const newRot = rotation.multiply(currentRotation);\n this.rotations[4 * i + 1] = newRot.x;\n this.rotations[4 * i + 2] = newRot.y;\n this.rotations[4 * i + 3] = newRot.z;\n this.rotations[4 * i + 0] = newRot.w;\n }\n\n this.changed = true;\n };\n\n this.scale = (scale: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] *= scale.x;\n this.positions[3 * i + 1] *= scale.y;\n this.positions[3 * i + 2] *= scale.z;\n\n this.scales[3 * i + 0] *= scale.x;\n this.scales[3 * i + 1] *= scale.y;\n this.scales[3 * i + 2] *= scale.z;\n }\n\n this.changed = true;\n };\n\n this.serialize = () => {\n const data = new Uint8Array(this.vertexCount * SplatData.RowLength);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < this.vertexCount; i++) {\n f_buffer[8 * i + 0] = this.positions[3 * i + 0];\n f_buffer[8 * i + 1] = this.positions[3 * i + 1];\n f_buffer[8 * i + 2] = this.positions[3 * i + 2];\n\n u_buffer[32 * i + 24 + 0] = this.colors[4 * i + 0];\n u_buffer[32 * i + 24 + 1] = this.colors[4 * i + 1];\n u_buffer[32 * i + 24 + 2] = this.colors[4 * i + 2];\n u_buffer[32 * i + 24 + 3] = this.colors[4 * i + 3];\n\n f_buffer[8 * i + 3 + 0] = this.scales[3 * i + 0];\n f_buffer[8 * i + 3 + 1] = this.scales[3 * i + 1];\n f_buffer[8 * i + 3 + 2] = this.scales[3 * i + 2];\n\n u_buffer[32 * i + 28 + 0] = (this.rotations[4 * i + 0] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 1] = (this.rotations[4 * i + 1] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 2] = (this.rotations[4 * i + 2] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 3] = (this.rotations[4 * i + 3] * 128 + 128) & 0xff;\n }\n\n return data;\n };\n\n this.reattach = (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => {\n console.assert(\n positions.byteLength === this.vertexCount * 3 * 4,\n `Expected ${this.vertexCount * 3 * 4} bytes, got ${positions.byteLength} bytes`,\n );\n this._positions = new Float32Array(positions);\n this._rotations = new Float32Array(rotations);\n this._scales = new Float32Array(scales);\n this._colors = new Uint8Array(colors);\n this._selection = new Uint8Array(selection);\n this.detached = false;\n };\n }\n\n static Deserialize(data: Uint8Array): SplatData {\n const vertexCount = data.length / SplatData.RowLength;\n const positions = new Float32Array(3 * vertexCount);\n const rotations = new Float32Array(4 * vertexCount);\n const scales = new Float32Array(3 * vertexCount);\n const colors = new Uint8Array(4 * vertexCount);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < vertexCount; i++) {\n positions[3 * i + 0] = f_buffer[8 * i + 0];\n positions[3 * i + 1] = f_buffer[8 * i + 1];\n positions[3 * i + 2] = f_buffer[8 * i + 2];\n\n rotations[4 * i + 0] = (u_buffer[32 * i + 28 + 0] - 128) / 128;\n rotations[4 * i + 1] = (u_buffer[32 * i + 28 + 1] - 128) / 128;\n rotations[4 * i + 2] = (u_buffer[32 * i + 28 + 2] - 128) / 128;\n rotations[4 * i + 3] = (u_buffer[32 * i + 28 + 3] - 128) / 128;\n\n scales[3 * i + 0] = f_buffer[8 * i + 3 + 0];\n scales[3 * i + 1] = f_buffer[8 * i + 3 + 1];\n scales[3 * i + 2] = f_buffer[8 * i + 3 + 2];\n\n colors[4 * i + 0] = u_buffer[32 * i + 24 + 0];\n colors[4 * i + 1] = u_buffer[32 * i + 24 + 1];\n colors[4 * i + 2] = u_buffer[32 * i + 24 + 2];\n colors[4 * i + 3] = u_buffer[32 * i + 24 + 3];\n }\n\n return new SplatData(vertexCount, positions, rotations, scales, colors);\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get colors() {\n return this._colors;\n }\n\n get selection() {\n return this._selection;\n }\n}\n\nexport { SplatData };\n", "import { SplatData } from \"./SplatData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\n\nclass Splat extends Object3D {\n public selectedChanged: boolean = false;\n\n private _data: SplatData;\n private _selected: boolean = false;\n\n constructor(splat: SplatData | undefined = undefined) {\n super();\n\n this._data = splat || new SplatData();\n\n this.applyPosition = () => {\n this.data.translate(this.position);\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.data.rotate(this.rotation);\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.data.scale(this.scale);\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `splat-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n this.applyRotation();\n this.applyScale();\n this.applyPosition();\n\n const buffer = this.data.serialize();\n const blob = new Blob([buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get data() {\n return this._data;\n }\n\n get selected() {\n return this._selected;\n }\n\n set selected(selected: boolean) {\n if (this._selected !== selected) {\n this._selected = selected;\n this.selectedChanged = true;\n this.dispatchEvent(this._changeEvent);\n }\n }\n}\n\nexport { Splat };\n", "import { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass CameraData {\n private _fx: number = 1132;\n private _fy: number = 1132;\n private _near: number = 0.1;\n private _far: number = 100;\n\n private _width: number = 512;\n private _height: number = 512;\n\n private _projectionMatrix: Matrix4 = new Matrix4();\n private _viewMatrix: Matrix4 = new Matrix4();\n private _viewProj: Matrix4 = new Matrix4();\n\n update: (position: Vector3, rotation: Quaternion) => void;\n setSize: (width: number, height: number) => void;\n\n private _updateProjectionMatrix: () => void;\n\n constructor() {\n this._updateProjectionMatrix = () => {\n // prettier-ignore\n this._projectionMatrix = new Matrix4(\n 2 * this.fx / this.width, 0, 0, 0,\n 0, -2 * this.fy / this.height, 0, 0,\n 0, 0, this.far / (this.far - this.near), 1,\n 0, 0, -(this.far * this.near) / (this.far - this.near), 0\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.update = (position: Vector3, rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n const t = position.flat();\n\n // prettier-ignore\n this._viewMatrix = new Matrix4(\n R[0], R[1], R[2], 0,\n R[3], R[4], R[5], 0,\n R[6], R[7], R[8], 0,\n -t[0] * R[0] - t[1] * R[3] - t[2] * R[6],\n -t[0] * R[1] - t[1] * R[4] - t[2] * R[7],\n -t[0] * R[2] - t[1] * R[5] - t[2] * R[8],\n 1,\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.setSize = (width: number, height: number) => {\n this._width = width;\n this._height = height;\n this._updateProjectionMatrix();\n };\n }\n\n get fx() {\n return this._fx;\n }\n\n set fx(fx: number) {\n if (this._fx !== fx) {\n this._fx = fx;\n this._updateProjectionMatrix();\n }\n }\n\n get fy() {\n return this._fy;\n }\n\n set fy(fy: number) {\n if (this._fy !== fy) {\n this._fy = fy;\n this._updateProjectionMatrix();\n }\n }\n\n get near() {\n return this._near;\n }\n\n set near(near: number) {\n if (this._near !== near) {\n this._near = near;\n this._updateProjectionMatrix();\n }\n }\n\n get far() {\n return this._far;\n }\n\n set far(far: number) {\n if (this._far !== far) {\n this._far = far;\n this._updateProjectionMatrix();\n }\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get projectionMatrix() {\n return this._projectionMatrix;\n }\n\n get viewMatrix() {\n return this._viewMatrix;\n }\n\n get viewProj() {\n return this._viewProj;\n }\n}\n\nexport { CameraData };\n", "import { Matrix4 } from \"./Matrix4\";\n\nclass Vector4 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(v: Vector4): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n if (this.w !== v.w) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector4;\n add(v: Vector4): Vector4;\n add(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x + v, this.y + v, this.z + v, this.w + v);\n } else {\n return new Vector4(this.x + v.x, this.y + v.y, this.z + v.z, this.w + v.w);\n }\n }\n\n subtract(v: number): Vector4;\n subtract(v: Vector4): Vector4;\n subtract(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x - v, this.y - v, this.z - v, this.w - v);\n } else {\n return new Vector4(this.x - v.x, this.y - v.y, this.z - v.z, this.w - v.w);\n }\n }\n\n multiply(v: number): Vector4;\n multiply(v: Vector4): Vector4;\n multiply(v: Matrix4): Vector4;\n multiply(v: number | Vector4 | Matrix4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x * v, this.y * v, this.z * v, this.w * v);\n } else if (v instanceof Vector4) {\n return new Vector4(this.x * v.x, this.y * v.y, this.z * v.z, this.w * v.w);\n } else {\n return new Vector4(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + this.w * v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + this.w * v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + this.w * v.buffer[14],\n this.x * v.buffer[3] + this.y * v.buffer[7] + this.z * v.buffer[11] + this.w * v.buffer[15],\n );\n }\n }\n\n dot(v: Vector4): number {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n }\n\n lerp(v: Vector4, t: number): Vector4 {\n return new Vector4(\n this.x + (v.x - this.x) * t,\n this.y + (v.y - this.y) * t,\n this.z + (v.z - this.z) * t,\n this.w + (v.w - this.w) * t,\n );\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n\n distanceTo(v: Vector4): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2 + (this.w - v.w) ** 2);\n }\n\n normalize(): Vector4 {\n const length = this.magnitude();\n\n return new Vector4(this.x / length, this.y / length, this.z / length, this.w / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Vector4 {\n return new Vector4(this.x, this.y, this.z, this.w);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Vector4 };\n", "import { CameraData } from \"./CameraData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Vector4 } from \"../math/Vector4\";\n\nclass Camera extends Object3D {\n private _data: CameraData;\n\n screenPointToRay: (x: number, y: number) => Vector3;\n\n constructor(camera: CameraData | undefined = undefined) {\n super();\n\n this._data = camera ? camera : new CameraData();\n this._position = new Vector3(0, 0, -5);\n\n this.update = () => {\n this.data.update(this.position, this.rotation);\n };\n\n this.screenPointToRay = (x: number, y: number) => {\n const clipSpaceCoords = new Vector4(x, y, -1, 1);\n const inverseProjectionMatrix = this._data.projectionMatrix.invert();\n const cameraSpaceCoords = clipSpaceCoords.multiply(inverseProjectionMatrix);\n const inverseViewMatrix = this._data.viewMatrix.invert();\n const worldSpaceCoords = cameraSpaceCoords.multiply(inverseViewMatrix);\n const worldSpacePosition = new Vector3(\n worldSpaceCoords.x / worldSpaceCoords.w,\n worldSpaceCoords.y / worldSpaceCoords.w,\n worldSpaceCoords.z / worldSpaceCoords.w,\n );\n const direction = worldSpacePosition.subtract(this.position).normalize();\n return direction;\n };\n }\n\n get data() {\n return this._data;\n }\n}\n\nexport { Camera };\n", "import { Object3D } from \"./Object3D\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { ObjectAddedEvent, ObjectRemovedEvent } from \"../events/Events\";\n\nclass Scene extends EventDispatcher {\n private _objects: Object3D[] = [];\n\n addObject: (object: Object3D) => void;\n removeObject: (object: Object3D) => void;\n findObject: (predicate: (object: Object3D) => boolean) => Object3D | undefined;\n findObjectOfType: (type: { new (): T }) => T | undefined;\n reset: () => void;\n\n constructor() {\n super();\n\n this.addObject = (object: Object3D) => {\n this.objects.push(object);\n this.dispatchEvent(new ObjectAddedEvent(object));\n };\n\n this.removeObject = (object: Object3D) => {\n const index = this.objects.indexOf(object);\n if (index < 0) {\n throw new Error(\"Object not found in scene\");\n }\n this.objects.splice(index, 1);\n this.dispatchEvent(new ObjectRemovedEvent(object));\n };\n\n this.findObject = (predicate: (object: Object3D) => boolean) => {\n for (const object of this.objects) {\n if (predicate(object)) {\n return object;\n }\n }\n return undefined;\n };\n\n this.findObjectOfType = (type: { new (): T }) => {\n for (const object of this.objects) {\n if (object instanceof type) {\n return object;\n }\n }\n return undefined;\n };\n\n this.reset = () => {\n const objectsToRemove = this.objects.slice();\n for (const object of objectsToRemove) {\n this.removeObject(object);\n }\n };\n\n this.reset();\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `scene-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n const buffers: Uint8Array[] = [];\n let vertexCount = 0;\n\n for (const object of this.objects) {\n object.applyRotation();\n object.applyScale();\n object.applyPosition();\n if (object instanceof Splat) {\n const buffer = object.data.serialize();\n buffers.push(buffer);\n vertexCount += object.data.vertexCount;\n }\n }\n\n const data = new Uint8Array(vertexCount * SplatData.RowLength);\n let offset = 0;\n for (const buffer of buffers) {\n data.set(buffer, offset);\n offset += buffer.length;\n }\n\n const blob = new Blob([data.buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get objects() {\n return this._objects;\n }\n}\n\nexport { Scene };\n", "import type { Scene } from \"../core/Scene\";\nimport { Splat } from \"../splats/Splat\";\nimport { SplatData } from \"../splats/SplatData\";\n\nclass Loader {\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const buffer = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(file: File, scene: Scene, onProgress?: (progress: number) => void): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(e.target!.result as ArrayBuffer);\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n}\n\nexport { Loader };\n", "import { Scene } from \"../core/Scene\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\n\nclass PLYLoader {\n static SH_C0 = 0.28209479177387814;\n\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const plyData = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n plyData.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n if (plyData[0] !== 112 || plyData[1] !== 108 || plyData[2] !== 121 || plyData[3] !== 10) {\n throw new Error(\"Invalid PLY file\");\n }\n\n const buffer = new Uint8Array(this._ParsePLYBuffer(plyData.buffer, format));\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(\n file: File,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n ): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(this._ParsePLYBuffer(e.target!.result as ArrayBuffer, format));\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n\n private static _ParsePLYBuffer(inputBuffer: ArrayBuffer, format: string): ArrayBuffer {\n type PlyProperty = {\n name: string;\n type: string;\n offset: number;\n };\n\n const ubuf = new Uint8Array(inputBuffer);\n const headerText = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));\n const header_end = \"end_header\\n\";\n const header_end_index = headerText.indexOf(header_end);\n if (header_end_index < 0) throw new Error(\"Unable to read .ply file header\");\n\n const vertexCount = parseInt(/element vertex (\\d+)\\n/.exec(headerText)![1]);\n\n let rowOffset = 0;\n const offsets: Record = {\n double: 8,\n int: 4,\n uint: 4,\n float: 4,\n short: 2,\n ushort: 2,\n uchar: 1,\n };\n\n const properties: PlyProperty[] = [];\n for (const prop of headerText\n .slice(0, header_end_index)\n .split(\"\\n\")\n .filter((k) => k.startsWith(\"property \"))) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_p, type, name] = prop.split(\" \");\n properties.push({ name, type, offset: rowOffset });\n if (!offsets[type]) throw new Error(`Unsupported property type: ${type}`);\n rowOffset += offsets[type];\n }\n\n const dataView = new DataView(inputBuffer, header_end_index + header_end.length);\n const buffer = new ArrayBuffer(SplatData.RowLength * vertexCount);\n\n const q_polycam = Quaternion.FromEuler(new Vector3(Math.PI / 2, 0, 0));\n\n for (let i = 0; i < vertexCount; i++) {\n const position = new Float32Array(buffer, i * SplatData.RowLength, 3);\n const scale = new Float32Array(buffer, i * SplatData.RowLength + 12, 3);\n const rgba = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 24, 4);\n const rot = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 28, 4);\n\n let r0: number = 255;\n let r1: number = 0;\n let r2: number = 0;\n let r3: number = 0;\n\n properties.forEach((property) => {\n let value;\n switch (property.type) {\n case \"float\":\n value = dataView.getFloat32(property.offset + i * rowOffset, true);\n break;\n case \"int\":\n value = dataView.getInt32(property.offset + i * rowOffset, true);\n break;\n default:\n throw new Error(`Unsupported property type: ${property.type}`);\n }\n\n switch (property.name) {\n case \"x\":\n position[0] = value;\n break;\n case \"y\":\n position[1] = value;\n break;\n case \"z\":\n position[2] = value;\n break;\n case \"scale_0\":\n scale[0] = Math.exp(value);\n break;\n case \"scale_1\":\n scale[1] = Math.exp(value);\n break;\n case \"scale_2\":\n scale[2] = Math.exp(value);\n break;\n case \"red\":\n rgba[0] = value;\n break;\n case \"green\":\n rgba[1] = value;\n break;\n case \"blue\":\n rgba[2] = value;\n break;\n case \"f_dc_0\":\n rgba[0] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_1\":\n rgba[1] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_2\":\n rgba[2] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_3\":\n rgba[3] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"opacity\":\n rgba[3] = (1 / (1 + Math.exp(-value))) * 255;\n break;\n case \"rot_0\":\n r0 = value;\n break;\n case \"rot_1\":\n r1 = value;\n break;\n case \"rot_2\":\n r2 = value;\n break;\n case \"rot_3\":\n r3 = value;\n break;\n }\n });\n\n let q = new Quaternion(r1, r2, r3, r0);\n\n switch (format) {\n case \"polycam\": {\n const temp = position[1];\n position[1] = -position[2];\n position[2] = temp;\n q = q_polycam.multiply(q);\n break;\n }\n case \"\":\n break;\n default:\n throw new Error(`Unsupported format: ${format}`);\n }\n\n q = q.normalize();\n rot[0] = q.w * 128 + 128;\n rot[1] = q.x * 128 + 128;\n rot[2] = q.y * 128 + 128;\n rot[3] = q.z * 128 + 128;\n }\n\n return buffer;\n }\n}\n\nexport { PLYLoader };\n", "import { Camera } from \"../../../cameras/Camera\";\nimport { Scene } from \"../../../core/Scene\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\n\nabstract class ShaderProgram {\n private _renderer: WebGLRenderer;\n private _program: WebGLProgram;\n private _passes: ShaderPass[];\n\n protected _scene: Scene | null = null;\n protected _camera: Camera | null = null;\n protected _started: boolean = false;\n protected _initialized: boolean = false;\n\n protected abstract _initialize: () => void;\n protected abstract _resize: () => void;\n protected abstract _render: () => void;\n protected abstract _dispose: () => void;\n\n initialize: () => void;\n resize: () => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n this._renderer = renderer;\n const gl = renderer.gl;\n\n this._program = gl.createProgram() as WebGLProgram;\n this._passes = passes || [];\n\n const vertexShader = gl.createShader(gl.VERTEX_SHADER) as WebGLShader;\n gl.shaderSource(vertexShader, this._getVertexSource());\n gl.compileShader(vertexShader);\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(vertexShader));\n }\n\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER) as WebGLShader;\n gl.shaderSource(fragmentShader, this._getFragmentSource());\n gl.compileShader(fragmentShader);\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(fragmentShader));\n }\n\n gl.attachShader(this.program, vertexShader);\n gl.attachShader(this.program, fragmentShader);\n gl.linkProgram(this.program);\n if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {\n console.error(gl.getProgramInfoLog(this.program));\n }\n\n this.resize = () => {\n gl.useProgram(this._program);\n\n this._resize();\n };\n\n this.initialize = () => {\n console.assert(!this._initialized, \"ShaderProgram already initialized\");\n\n gl.useProgram(this._program);\n\n this._initialize();\n for (const pass of this.passes) {\n pass.initialize(this);\n }\n\n this._initialized = true;\n this._started = true;\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n gl.useProgram(this._program);\n\n if (this._scene !== scene || this._camera !== camera) {\n this.dispose();\n this._scene = scene;\n this._camera = camera;\n this.initialize();\n }\n\n for (const pass of this.passes) {\n pass.render();\n }\n\n this._render();\n };\n\n this.dispose = () => {\n if (!this._initialized) return;\n\n gl.useProgram(this._program);\n\n for (const pass of this.passes) {\n pass.dispose();\n }\n\n this._dispose();\n\n this._scene = null;\n this._camera = null;\n this._initialized = false;\n };\n }\n\n get renderer() {\n return this._renderer;\n }\n\n get scene() {\n return this._scene;\n }\n\n get camera() {\n return this._camera;\n }\n\n get program() {\n return this._program;\n }\n\n get passes() {\n return this._passes;\n }\n\n get started() {\n return this._started;\n }\n\n protected abstract _getVertexSource(): string;\n protected abstract _getFragmentSource(): string;\n}\n\nexport { ShaderProgram };\n", "\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxkGAWsCAAFsAA4BbQAZAW4BAAFvABgBcAAPCRUBAEEBCw8RIw0WFiINIRocHw0bHR4K6VAacQEBfyACRQRAIAAoAgQgASgCBEYPCyAAIAFGBEBBAQ8LAkAgACgCBCICLQAAIgBFIAAgASgCBCIBLQAAIgNHcg0AA0AgAS0AASEDIAItAAEiAEUNASABQQFqIQEgAkEBaiECIAAgA0YNAAsLIAAgA0YLTwECf0G4GigCACIBIABBB2pBeHEiAmohAAJAIAJBACAAIAFNG0UEQCAAPwBBEHRNDQEgABAGDQELQcgaQTA2AgBBfw8LQbgaIAA2AgAgAQsOACAAEBcgARAXQRB0cgsGACAAEA8LKQBBwBpBATYCAEHEGkEANgIAEBFBxBpBvBooAgA2AgBBvBpBwBo2AgAL0gsBB38CQCAARQ0AIABBCGsiAiAAQQRrKAIAIgFBeHEiAGohBQJAIAFBAXENACABQQJxRQ0BIAIgAigCACIBayICQdwaKAIASQ0BIAAgAWohAAJAAkBB4BooAgAgAk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sDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _pack=Module[\"_pack\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)=>(_pack=Module[\"_pack\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;", "import { Scene } from \"../../../core/Scene\";\nimport { Splat } from \"../../../splats/Splat\";\nimport DataWorker from \"web-worker:./DataWorker.ts\";\nimport loadWasm from \"../../../wasm/data\";\n\nclass RenderData {\n public dataChanged = false;\n public transformsChanged = false;\n\n private _splatIndices: Map;\n private _offsets: Map;\n private _data: Uint32Array;\n private _width: number;\n private _height: number;\n private _transforms: Float32Array;\n private _transformsWidth: number;\n private _transformsHeight: number;\n private _transformIndices: Uint32Array;\n private _transformIndicesWidth: number;\n private _transformIndicesHeight: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _vertexCount: number;\n private _updating: Set = new Set();\n private _dirty: Set = new Set();\n private _worker: Worker;\n\n getSplat: (index: number) => Splat | null;\n getLocalIndex: (splat: Splat, index: number) => number;\n markDirty: (splat: Splat) => void;\n rebuild: () => void;\n dispose: () => void;\n\n constructor(scene: Scene) {\n let vertexCount = 0;\n let splatIndex = 0;\n this._splatIndices = new Map();\n this._offsets = new Map();\n const lookup = new Map();\n for (const object of scene.objects) {\n if (object instanceof Splat) {\n this._splatIndices.set(object, splatIndex);\n this._offsets.set(object, vertexCount);\n lookup.set(vertexCount, object);\n vertexCount += object.data.vertexCount;\n splatIndex++;\n }\n }\n\n this._vertexCount = vertexCount;\n this._width = 2048;\n this._height = Math.ceil((2 * this.vertexCount) / this.width);\n this._data = new Uint32Array(this.width * this.height * 4);\n\n this._transformsWidth = 5;\n this._transformsHeight = lookup.size;\n this._transforms = new Float32Array(this._transformsWidth * this._transformsHeight * 4);\n\n this._transformIndicesWidth = 1024;\n this._transformIndicesHeight = Math.ceil(this.vertexCount / this._transformIndicesWidth);\n this._transformIndices = new Uint32Array(this._transformIndicesWidth * this._transformIndicesHeight);\n\n this._positions = new Float32Array(this.vertexCount * 3);\n this._rotations = new Float32Array(this.vertexCount * 4);\n this._scales = new Float32Array(this.vertexCount * 3);\n\n this._worker = new DataWorker();\n\n const updateTransform = (splat: Splat) => {\n const splatIndex = this._splatIndices.get(splat) as number;\n this._transforms.set(splat.transform.buffer, splatIndex * 20);\n this._transforms[splatIndex * 20 + 16] = splat.selected ? 1 : 0;\n splat.positionChanged = false;\n splat.rotationChanged = false;\n splat.scaleChanged = false;\n splat.selectedChanged = false;\n this.transformsChanged = true;\n };\n\n this._worker.onmessage = (e) => {\n if (e.data.response) {\n const response = e.data.response;\n const splat = lookup.get(response.offset) as Splat;\n updateTransform(splat);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[response.offset + i] = splatIndex;\n }\n\n this._data.set(response.data, response.offset * 8);\n splat.data.reattach(\n response.positions,\n response.rotations,\n response.scales,\n response.colors,\n response.selection,\n );\n\n this._positions.set(response.worldPositions, response.offset * 3);\n this._rotations.set(response.worldRotations, response.offset * 4);\n this._scales.set(response.worldScales, response.offset * 3);\n\n this._updating.delete(splat);\n\n splat.selectedChanged = false;\n\n this.dataChanged = true;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n async function initWasm() {\n wasmModule = await loadWasm();\n }\n\n initWasm();\n\n async function waitForWasm() {\n while (!wasmModule) {\n await new Promise((resolve) => setTimeout(resolve, 0));\n }\n }\n\n const buildImmediate = (splat: Splat) => {\n if (!wasmModule) {\n waitForWasm().then(() => {\n buildImmediate(splat);\n });\n return;\n }\n\n updateTransform(splat);\n\n const positionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const rotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const scalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const colorsPtr = wasmModule._malloc(4 * splat.data.vertexCount);\n const selectionPtr = wasmModule._malloc(splat.data.vertexCount);\n const dataPtr = wasmModule._malloc(8 * splat.data.vertexCount * 4);\n const worldPositionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const worldRotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const worldScalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n\n wasmModule.HEAPF32.set(splat.data.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.scales, scalesPtr / 4);\n wasmModule.HEAPU8.set(splat.data.colors, colorsPtr);\n wasmModule.HEAPU8.set(splat.data.selection, selectionPtr);\n\n wasmModule._pack(\n splat.selected,\n splat.data.vertexCount,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n colorsPtr,\n selectionPtr,\n dataPtr,\n worldPositionsPtr,\n worldRotationsPtr,\n worldScalesPtr,\n );\n\n const outData = new Uint32Array(wasmModule.HEAPU32.buffer, dataPtr, splat.data.vertexCount * 8);\n const worldPositions = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldPositionsPtr,\n splat.data.vertexCount * 3,\n );\n const worldRotations = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldRotationsPtr,\n splat.data.vertexCount * 4,\n );\n const worldScales = new Float32Array(wasmModule.HEAPF32.buffer, worldScalesPtr, splat.data.vertexCount * 3);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n const offset = this._offsets.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[offset + i] = splatIndex;\n }\n this._data.set(outData, offset * 8);\n this._positions.set(worldPositions, offset * 3);\n this._rotations.set(worldRotations, offset * 4);\n this._scales.set(worldScales, offset * 3);\n\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(colorsPtr);\n wasmModule._free(selectionPtr);\n wasmModule._free(dataPtr);\n wasmModule._free(worldPositionsPtr);\n wasmModule._free(worldRotationsPtr);\n wasmModule._free(worldScalesPtr);\n\n this.dataChanged = true;\n };\n\n const build = (splat: Splat) => {\n if (splat.positionChanged || splat.rotationChanged || splat.scaleChanged || splat.selectedChanged) {\n updateTransform(splat);\n }\n\n if (!splat.data.changed || splat.data.detached) return;\n\n const serializedSplat = {\n position: new Float32Array(splat.position.flat()),\n rotation: new Float32Array(splat.rotation.flat()),\n scale: new Float32Array(splat.scale.flat()),\n selected: splat.selected,\n vertexCount: splat.data.vertexCount,\n positions: splat.data.positions,\n rotations: splat.data.rotations,\n scales: splat.data.scales,\n colors: splat.data.colors,\n selection: splat.data.selection,\n offset: this._offsets.get(splat) as number,\n };\n\n this._worker.postMessage(\n {\n splat: serializedSplat,\n },\n [\n serializedSplat.position.buffer,\n serializedSplat.rotation.buffer,\n serializedSplat.scale.buffer,\n serializedSplat.positions.buffer,\n serializedSplat.rotations.buffer,\n serializedSplat.scales.buffer,\n serializedSplat.colors.buffer,\n serializedSplat.selection.buffer,\n ],\n );\n\n this._updating.add(splat);\n\n splat.data.detached = true;\n };\n\n this.getSplat = (index: number) => {\n let splat = null;\n for (const [key, value] of this._offsets) {\n if (index >= value) {\n splat = key;\n } else {\n break;\n }\n }\n return splat;\n };\n\n this.getLocalIndex = (splat: Splat, index: number) => {\n const offset = this._offsets.get(splat) as number;\n return index - offset;\n };\n\n this.markDirty = (splat: Splat) => {\n this._dirty.add(splat);\n };\n\n this.rebuild = () => {\n for (const splat of this._dirty) {\n build(splat);\n }\n\n this._dirty.clear();\n };\n\n this.dispose = () => {\n this._worker.terminate();\n };\n\n for (const splat of this._splatIndices.keys()) {\n buildImmediate(splat);\n }\n }\n\n get offsets() {\n return this._offsets;\n }\n\n get data() {\n return this._data;\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get transforms() {\n return this._transforms;\n }\n\n get transformsWidth() {\n return this._transformsWidth;\n }\n\n get transformsHeight() {\n return this._transformsHeight;\n }\n\n get transformIndices() {\n return this._transformIndices;\n }\n\n get transformIndicesWidth() {\n return this._transformIndicesWidth;\n }\n\n get transformIndicesHeight() {\n return this._transformIndicesHeight;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get needsRebuild() {\n return this._dirty.size > 0;\n }\n\n get updating() {\n return this._updating.size > 0;\n }\n}\n\nexport { RenderData };\n", "class Color32 {\n public readonly r: number;\n public readonly g: number;\n public readonly b: number;\n public readonly a: number;\n\n constructor(r: number = 0, g: number = 0, b: number = 0, a: number = 255) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n flat(): number[] {\n return [this.r, this.g, this.b, this.a];\n }\n\n flatNorm(): number[] {\n return [this.r / 255, this.g / 255, this.b / 255, this.a / 255];\n }\n\n toHexString(): string {\n return (\n \"#\" +\n this.flat()\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n );\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Color32 };\n", "import SortWorker from \"web-worker:../utils/SortWorker.ts\";\n\nimport { ShaderProgram } from \"./ShaderProgram\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\nimport { RenderData } from \"../utils/RenderData\";\nimport { Color32 } from \"../../../math/Color32\";\nimport { ObjectAddedEvent, ObjectChangedEvent, ObjectRemovedEvent } from \"../../../events/Events\";\nimport { Splat } from \"../../../splats/Splat\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\n\nconst vertexShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n`;\n\nconst fragmentShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n`;\n\nclass RenderProgram extends ShaderProgram {\n private _outlineThickness: number = 10.0;\n private _outlineColor: Color32 = new Color32(255, 165, 0, 255);\n private _renderData: RenderData | null = null;\n private _depthIndex: Uint32Array | null = null;\n private _chunks: Uint8Array | null = null;\n private _splatTexture: WebGLTexture | null = null;\n\n protected _initialize: () => void;\n protected _resize: () => void;\n protected _render: () => void;\n protected _dispose: () => void;\n\n private _setOutlineThickness: (value: number) => void;\n private _setOutlineColor: (value: Color32) => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n super(renderer, passes);\n\n const canvas = renderer.canvas;\n const gl = renderer.gl;\n\n let worker: Worker;\n\n let u_projection: WebGLUniformLocation;\n let u_viewport: WebGLUniformLocation;\n let u_focal: WebGLUniformLocation;\n let u_view: WebGLUniformLocation;\n let u_texture: WebGLUniformLocation;\n let u_transforms: WebGLUniformLocation;\n let u_transformIndices: WebGLUniformLocation;\n\n let u_outlineThickness: WebGLUniformLocation;\n let u_outlineColor: WebGLUniformLocation;\n\n let positionAttribute: number;\n let indexAttribute: number;\n\n let transformsTexture: WebGLTexture;\n let transformIndicesTexture: WebGLTexture;\n\n let vertexBuffer: WebGLBuffer;\n let indexBuffer: WebGLBuffer;\n\n this._resize = () => {\n if (!this._camera) return;\n\n this._camera.data.setSize(canvas.width, canvas.height);\n this._camera.update();\n\n u_projection = gl.getUniformLocation(this.program, \"projection\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n\n u_viewport = gl.getUniformLocation(this.program, \"viewport\") as WebGLUniformLocation;\n gl.uniform2fv(u_viewport, new Float32Array([canvas.width, canvas.height]));\n };\n\n const createWorker = () => {\n worker = new SortWorker();\n worker.onmessage = (e) => {\n if (e.data.depthIndex) {\n const { depthIndex, chunks } = e.data;\n this._depthIndex = depthIndex;\n this._chunks = chunks;\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, depthIndex, gl.STATIC_DRAW);\n }\n };\n };\n\n this._initialize = () => {\n if (!this._scene || !this._camera) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._resize();\n\n this._scene.addEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.addEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n this._renderData = new RenderData(this._scene);\n\n u_focal = gl.getUniformLocation(this.program, \"focal\") as WebGLUniformLocation;\n gl.uniform2fv(u_focal, new Float32Array([this._camera.data.fx, this._camera.data.fy]));\n\n u_view = gl.getUniformLocation(this.program, \"view\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n u_outlineThickness = gl.getUniformLocation(this.program, \"outlineThickness\") as WebGLUniformLocation;\n gl.uniform1f(u_outlineThickness, this.outlineThickness);\n\n u_outlineColor = gl.getUniformLocation(this.program, \"outlineColor\") as WebGLUniformLocation;\n gl.uniform4fv(u_outlineColor, new Float32Array(this.outlineColor.flatNorm()));\n\n this._splatTexture = gl.createTexture() as WebGLTexture;\n u_texture = gl.getUniformLocation(this.program, \"u_texture\") as WebGLUniformLocation;\n gl.uniform1i(u_texture, 0);\n\n transformsTexture = gl.createTexture() as WebGLTexture;\n u_transforms = gl.getUniformLocation(this.program, \"u_transforms\") as WebGLUniformLocation;\n gl.uniform1i(u_transforms, 1);\n\n transformIndicesTexture = gl.createTexture() as WebGLTexture;\n u_transformIndices = gl.getUniformLocation(this.program, \"u_transformIndices\") as WebGLUniformLocation;\n gl.uniform1i(u_transformIndices, 2);\n\n vertexBuffer = gl.createBuffer() as WebGLBuffer;\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]), gl.STATIC_DRAW);\n\n positionAttribute = gl.getAttribLocation(this.program, \"position\");\n gl.enableVertexAttribArray(positionAttribute);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n indexBuffer = gl.createBuffer() as WebGLBuffer;\n indexAttribute = gl.getAttribLocation(this.program, \"index\");\n gl.enableVertexAttribArray(indexAttribute);\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n\n createWorker();\n };\n\n const handleObjectAdded = (event: Event) => {\n const e = event as ObjectAddedEvent;\n\n if (e.object instanceof Splat) {\n e.object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectRemoved = (event: Event) => {\n const e = event as ObjectRemovedEvent;\n\n if (e.object instanceof Splat) {\n e.object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectChanged = (event: Event) => {\n const e = event as ObjectChangedEvent;\n\n if (e.object instanceof Splat && this._renderData) {\n this._renderData.markDirty(e.object);\n }\n };\n\n this._render = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._camera.update();\n worker.postMessage({ viewProj: this._camera.data.viewProj });\n\n if (this.renderData.needsRebuild) {\n this.renderData.rebuild();\n }\n\n if (this.renderData.dataChanged || this.renderData.transformsChanged) {\n if (this.renderData.dataChanged) {\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.splatTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32UI,\n this.renderData.width,\n this.renderData.height,\n 0,\n gl.RGBA_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.data,\n );\n }\n\n if (this.renderData.transformsChanged) {\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, transformsTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32F,\n this.renderData.transformsWidth,\n this.renderData.transformsHeight,\n 0,\n gl.RGBA,\n gl.FLOAT,\n this.renderData.transforms,\n );\n\n gl.activeTexture(gl.TEXTURE2);\n gl.bindTexture(gl.TEXTURE_2D, transformIndicesTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.R32UI,\n this.renderData.transformIndicesWidth,\n this.renderData.transformIndicesHeight,\n 0,\n gl.RED_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.transformIndices,\n );\n }\n\n const detachedPositions = new Float32Array(this.renderData.positions.slice().buffer);\n const detachedTransforms = new Float32Array(this.renderData.transforms.slice().buffer);\n const detachedTransformIndices = new Uint32Array(this.renderData.transformIndices.slice().buffer);\n worker.postMessage(\n {\n sortData: {\n positions: detachedPositions,\n transforms: detachedTransforms,\n transformIndices: detachedTransformIndices,\n vertexCount: this.renderData.vertexCount,\n },\n },\n [detachedPositions.buffer, detachedTransforms.buffer, detachedTransformIndices.buffer],\n );\n\n this.renderData.dataChanged = false;\n this.renderData.transformsChanged = false;\n }\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(gl.ONE_MINUS_DST_ALPHA, gl.ONE, gl.ONE_MINUS_DST_ALPHA, gl.ONE);\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.vertexAttribIPointer(indexAttribute, 1, gl.INT, 0, 0);\n gl.vertexAttribDivisor(indexAttribute, 1);\n\n gl.drawArraysInstanced(gl.TRIANGLE_FAN, 0, 4, this.renderData.vertexCount);\n };\n\n this._dispose = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot dispose without scene and camera\");\n return;\n }\n\n this._scene.removeEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.removeEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n worker.terminate();\n this.renderData.dispose();\n\n gl.deleteTexture(this.splatTexture);\n gl.deleteTexture(transformsTexture);\n gl.deleteTexture(transformIndicesTexture);\n\n gl.deleteBuffer(indexBuffer);\n gl.deleteBuffer(vertexBuffer);\n };\n\n this._setOutlineThickness = (value: number) => {\n this._outlineThickness = value;\n if (this._initialized) {\n gl.uniform1f(u_outlineThickness, value);\n }\n };\n\n this._setOutlineColor = (value: Color32) => {\n this._outlineColor = value;\n if (this._initialized) {\n gl.uniform4fv(u_outlineColor, new Float32Array(value.flatNorm()));\n }\n };\n }\n\n get renderData() {\n return this._renderData;\n }\n\n get depthIndex() {\n return this._depthIndex;\n }\n\n get chunks() {\n return this._chunks;\n }\n\n get splatTexture() {\n return this._splatTexture;\n }\n\n get outlineThickness() {\n return this._outlineThickness;\n }\n\n set outlineThickness(value: number) {\n this._setOutlineThickness(value);\n }\n\n get outlineColor() {\n return this._outlineColor;\n }\n\n set outlineColor(value: Color32) {\n this._setOutlineColor(value);\n }\n\n protected _getVertexSource() {\n return vertexShaderSource;\n }\n\n protected _getFragmentSource() {\n return fragmentShaderSource;\n }\n}\n\nexport { RenderProgram };\n", "import { RenderProgram } from \"../programs/RenderProgram\";\nimport { ShaderProgram } from \"../programs/ShaderProgram\";\nimport { ShaderPass } from \"./ShaderPass\";\n\nclass FadeInPass implements ShaderPass {\n initialize: (program: ShaderProgram) => void;\n render: () => void;\n\n constructor(speed: number = 1.0) {\n let value = 0.0;\n let active = false;\n\n let renderProgram: RenderProgram;\n let gl: WebGL2RenderingContext;\n let u_useDepthFade: WebGLUniformLocation;\n let u_depthFade: WebGLUniformLocation;\n\n this.initialize = (program: ShaderProgram) => {\n if (!(program instanceof RenderProgram)) {\n throw new Error(\"FadeInPass requires a RenderProgram\");\n }\n\n value = program.started ? 1.0 : 0.0;\n active = true;\n renderProgram = program;\n gl = program.renderer.gl;\n\n u_useDepthFade = gl.getUniformLocation(renderProgram.program, \"useDepthFade\") as WebGLUniformLocation;\n gl.uniform1i(u_useDepthFade, 1);\n\n u_depthFade = gl.getUniformLocation(renderProgram.program, \"depthFade\") as WebGLUniformLocation;\n gl.uniform1f(u_depthFade, value);\n };\n\n this.render = () => {\n if (!active || renderProgram.renderData?.updating) return;\n gl.useProgram(renderProgram.program);\n value = Math.min(value + speed * 0.01, 1.0);\n if (value >= 1.0) {\n active = false;\n gl.uniform1i(u_useDepthFade, 0);\n }\n gl.uniform1f(u_depthFade, value);\n };\n }\n\n dispose() {}\n}\n\nexport { FadeInPass };\n", "import type { Scene } from \"../core/Scene\";\nimport { FadeInPass } from \"./webgl/passes/FadeInPass\";\nimport { Camera } from \"../cameras/Camera\";\nimport { Color32 } from \"../math/Color32\";\nimport { ShaderProgram } from \"./webgl/programs/ShaderProgram\";\nimport { RenderProgram } from \"./webgl/programs/RenderProgram\";\nimport { ShaderPass } from \"./webgl/passes/ShaderPass\";\n\nexport class WebGLRenderer {\n private _canvas: HTMLCanvasElement;\n private _gl: WebGL2RenderingContext;\n private _backgroundColor: Color32 = new Color32();\n private _renderProgram: RenderProgram;\n\n addProgram: (program: ShaderProgram) => void;\n removeProgram: (program: ShaderProgram) => void;\n resize: () => void;\n setSize: (width: number, height: number) => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(optionalCanvas: HTMLCanvasElement | null = null, optionalRenderPasses: ShaderPass[] | null = null) {\n const canvas: HTMLCanvasElement = optionalCanvas || document.createElement(\"canvas\");\n if (!optionalCanvas) {\n canvas.style.display = \"block\";\n canvas.style.boxSizing = \"border-box\";\n canvas.style.width = \"100%\";\n canvas.style.height = \"100%\";\n canvas.style.margin = \"0\";\n canvas.style.padding = \"0\";\n document.body.appendChild(canvas);\n }\n canvas.style.background = this._backgroundColor.toHexString();\n this._canvas = canvas;\n\n this._gl = canvas.getContext(\"webgl2\", { antialias: false }) as WebGL2RenderingContext;\n\n const renderPasses = optionalRenderPasses || [];\n if (!optionalRenderPasses) {\n renderPasses.push(new FadeInPass());\n }\n\n this._renderProgram = new RenderProgram(this, renderPasses);\n const programs = [this._renderProgram] as ShaderProgram[];\n\n this.resize = () => {\n const width = canvas.clientWidth;\n const height = canvas.clientHeight;\n if (canvas.width !== width || canvas.height !== height) {\n this.setSize(width, height);\n }\n };\n\n this.setSize = (width: number, height: number) => {\n canvas.width = width;\n canvas.height = height;\n this._gl.viewport(0, 0, canvas.width, canvas.height);\n for (const program of programs) {\n program.resize();\n }\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n for (const program of programs) {\n program.render(scene, camera);\n }\n };\n\n this.dispose = () => {\n for (const program of programs) {\n program.dispose();\n }\n };\n\n this.addProgram = (program: ShaderProgram) => {\n programs.push(program);\n };\n\n this.removeProgram = (program: ShaderProgram) => {\n const index = programs.indexOf(program);\n if (index < 0) {\n throw new Error(\"Program not found\");\n }\n programs.splice(index, 1);\n };\n\n this.resize();\n }\n\n get canvas() {\n return this._canvas;\n }\n\n get gl() {\n return this._gl;\n }\n\n get renderProgram() {\n return this._renderProgram;\n }\n\n get backgroundColor() {\n return this._backgroundColor;\n }\n\n set backgroundColor(value: Color32) {\n this._backgroundColor = value;\n this._canvas.style.background = value.toHexString();\n }\n}\n", "import { Camera } from \"../cameras/Camera\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass OrbitControls {\n minAngle: number = -90;\n maxAngle: number = 90;\n minZoom: number = 0.1;\n maxZoom: number = 30;\n orbitSpeed: number = 1;\n panSpeed: number = 1;\n zoomSpeed: number = 1;\n dampening: number = 0.12;\n setCameraTarget: (newTarget: Vector3) => void = () => {};\n update: () => void;\n dispose: () => void;\n\n constructor(\n camera: Camera,\n canvas: HTMLElement,\n alpha: number = 0.5,\n beta: number = 0.5,\n radius: number = 5,\n enableKeyboardControls: boolean = true,\n inputTarget: Vector3 = new Vector3(),\n ) {\n let target = inputTarget.clone();\n\n let desiredTarget = target.clone();\n let desiredAlpha = alpha;\n let desiredBeta = beta;\n let desiredRadius = radius;\n\n let dragging = false;\n let panning = false;\n let lastDist = 0;\n let lastX = 0;\n let lastY = 0;\n\n const keys: { [key: string]: boolean } = {};\n\n let isUpdatingCamera = false;\n\n const onCameraChange = () => {\n if (isUpdatingCamera) return;\n\n const eulerRotation = camera.rotation.toEuler();\n desiredAlpha = -eulerRotation.y;\n desiredBeta = -eulerRotation.x;\n\n const x = camera.position.x - desiredRadius * Math.sin(desiredAlpha) * Math.cos(desiredBeta);\n const y = camera.position.y + desiredRadius * Math.sin(desiredBeta);\n const z = camera.position.z + desiredRadius * Math.cos(desiredAlpha) * Math.cos(desiredBeta);\n\n desiredTarget = new Vector3(x, y, z);\n };\n\n camera.addEventListener(\"objectChanged\", onCameraChange);\n\n this.setCameraTarget = (newTarget: Vector3) => {\n const dx = newTarget.x - camera.position.x;\n const dy = newTarget.y - camera.position.y;\n const dz = newTarget.z - camera.position.z;\n desiredRadius = Math.sqrt(dx * dx + dy * dy + dz * dz);\n desiredBeta = Math.atan2(dy, Math.sqrt(dx * dx + dz * dz));\n desiredAlpha = -Math.atan2(dx, dz);\n desiredTarget = new Vector3(newTarget.x, newTarget.y, newTarget.z);\n };\n\n const computeZoomNorm = () => {\n return 0.1 + (0.9 * (desiredRadius - this.minZoom)) / (this.maxZoom - this.minZoom);\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n keys[e.code] = true;\n // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = true;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = true;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = true;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = true;\n };\n\n const onKeyUp = (e: KeyboardEvent) => {\n keys[e.code] = false; // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = false;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = false;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = false;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = false;\n };\n\n const onMouseDown = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = true;\n panning = e.button === 2;\n lastX = e.clientX;\n lastY = e.clientY;\n window.addEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseUp = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n window.removeEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseMove = (e: MouseEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n const dx = e.clientX - lastX;\n const dy = e.clientY - lastY;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n const panX = -dx * this.panSpeed * 0.01 * zoomNorm;\n const panY = -dy * this.panSpeed * 0.01 * zoomNorm;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(panX));\n desiredTarget = desiredTarget.add(up.multiply(panY));\n } else {\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n }\n\n lastX = e.clientX;\n lastY = e.clientY;\n };\n\n const onWheel = (e: WheelEvent) => {\n preventDefault(e);\n\n const zoomNorm = computeZoomNorm();\n desiredRadius += e.deltaY * this.zoomSpeed * 0.025 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n };\n\n const onTouchStart = (e: TouchEvent) => {\n preventDefault(e);\n\n if (e.touches.length === 1) {\n dragging = true;\n panning = false;\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n lastDist = 0;\n } else if (e.touches.length === 2) {\n dragging = true;\n panning = true;\n lastX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n lastY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n lastDist = Math.sqrt(distX * distX + distY * distY);\n }\n };\n\n const onTouchEnd = (e: TouchEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n };\n\n const onTouchMove = (e: TouchEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n const dist = Math.sqrt(distX * distX + distY * distY);\n const delta = lastDist - dist;\n desiredRadius += delta * this.zoomSpeed * 0.1 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n lastDist = dist;\n\n const touchX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n const touchY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const dx = touchX - lastX;\n const dy = touchY - lastY;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(-dx * this.panSpeed * 0.025 * zoomNorm));\n desiredTarget = desiredTarget.add(up.multiply(-dy * this.panSpeed * 0.025 * zoomNorm));\n lastX = touchX;\n lastY = touchY;\n } else {\n const dx = e.touches[0].clientX - lastX;\n const dy = e.touches[0].clientY - lastY;\n\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n }\n };\n\n const lerp = (a: number, b: number, t: number) => {\n return (1 - t) * a + t * b;\n };\n\n this.update = () => {\n isUpdatingCamera = true;\n\n alpha = lerp(alpha, desiredAlpha, this.dampening);\n beta = lerp(beta, desiredBeta, this.dampening);\n radius = lerp(radius, desiredRadius, this.dampening);\n target = target.lerp(desiredTarget, this.dampening);\n\n const x = target.x + radius * Math.sin(alpha) * Math.cos(beta);\n const y = target.y - radius * Math.sin(beta);\n const z = target.z - radius * Math.cos(alpha) * Math.cos(beta);\n camera.position = new Vector3(x, y, z);\n\n const direction = target.subtract(camera.position).normalize();\n const rx = Math.asin(-direction.y);\n const ry = Math.atan2(direction.x, direction.z);\n camera.rotation = Quaternion.FromEuler(new Vector3(rx, ry, 0));\n\n const moveSpeed = 0.025;\n const rotateSpeed = 0.01;\n\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const forward = new Vector3(-R[2], -R[5], -R[8]);\n const right = new Vector3(R[0], R[3], R[6]);\n\n if (keys[\"KeyS\"]) desiredTarget = desiredTarget.add(forward.multiply(moveSpeed));\n if (keys[\"KeyW\"]) desiredTarget = desiredTarget.subtract(forward.multiply(moveSpeed));\n if (keys[\"KeyA\"]) desiredTarget = desiredTarget.subtract(right.multiply(moveSpeed));\n if (keys[\"KeyD\"]) desiredTarget = desiredTarget.add(right.multiply(moveSpeed));\n\n // Add rotation with 'e' and 'q' for horizontal rotation\n if (keys[\"KeyE\"]) desiredAlpha += rotateSpeed;\n if (keys[\"KeyQ\"]) desiredAlpha -= rotateSpeed;\n\n // Add rotation with 'r' and 'f' for vertical rotation\n if (keys[\"KeyR\"]) desiredBeta += rotateSpeed;\n if (keys[\"KeyF\"]) desiredBeta -= rotateSpeed;\n\n isUpdatingCamera = false;\n };\n\n const preventDefault = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n this.dispose = () => {\n canvas.removeEventListener(\"dragenter\", preventDefault);\n canvas.removeEventListener(\"dragover\", preventDefault);\n canvas.removeEventListener(\"dragleave\", preventDefault);\n canvas.removeEventListener(\"contextmenu\", preventDefault);\n\n canvas.removeEventListener(\"mousedown\", onMouseDown);\n canvas.removeEventListener(\"mousemove\", onMouseMove);\n canvas.removeEventListener(\"wheel\", onWheel);\n\n canvas.removeEventListener(\"touchstart\", onTouchStart);\n canvas.removeEventListener(\"touchend\", onTouchEnd);\n canvas.removeEventListener(\"touchmove\", onTouchMove);\n\n if (enableKeyboardControls) {\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"keyup\", onKeyUp);\n }\n };\n\n if (enableKeyboardControls) {\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"keyup\", onKeyUp);\n }\n\n canvas.addEventListener(\"dragenter\", preventDefault);\n canvas.addEventListener(\"dragover\", preventDefault);\n canvas.addEventListener(\"dragleave\", preventDefault);\n canvas.addEventListener(\"contextmenu\", preventDefault);\n\n canvas.addEventListener(\"mousedown\", onMouseDown);\n canvas.addEventListener(\"mousemove\", onMouseMove);\n canvas.addEventListener(\"wheel\", onWheel);\n\n canvas.addEventListener(\"touchstart\", onTouchStart);\n canvas.addEventListener(\"touchend\", onTouchEnd);\n canvas.addEventListener(\"touchmove\", onTouchMove);\n\n this.update();\n }\n}\n\nexport { OrbitControls };\n", "import { Vector3 } from \"./Vector3\";\n\nclass Plane {\n public readonly normal: Vector3;\n public readonly point: Vector3;\n\n constructor(normal: Vector3, point: Vector3) {\n this.normal = normal;\n this.point = point;\n }\n\n intersect(origin: Vector3, direction: Vector3): Vector3 | null {\n const denominator = this.normal.dot(direction);\n\n if (Math.abs(denominator) < 0.0001) {\n return null;\n }\n\n const t = this.normal.dot(this.point.subtract(origin)) / denominator;\n\n if (t < 0) {\n return null;\n }\n\n return origin.add(direction.multiply(t));\n }\n}\n\nexport { Plane };\n", "import { ShaderProgram } from \"../programs/ShaderProgram\";\n\nclass ShaderPass {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n initialize(program: ShaderProgram) {}\n render() {}\n dispose() {}\n}\n\nexport { ShaderPass };\n", "\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAAQcBBAQLAwMCAgAADAYGBAUBcAEQEAUHAQGAAoCAAgYIAX8BQfCfBAsHGQYBawIAAWwADQFtABkBbgEAAW8AGAFwAA4JFQEAQQELDw8XDBUVIgwhGhwfDBsdHgrfUxlxAQF/IAJFBEAgACgCBCABKAIERg8LIAAgAUYEQEEBDwsCQCAAKAIEIgItAAAiAEUgACABKAIEIgEtAAAiA0dyDQADQCABLQABIQMgAi0AASIARQ0BIAFBAWohASACQQFqIQIgACADRg0ACwsgACADRgtPAQJ/QbgaKAIAIgEgAEEHakF4cSICaiEAAkAgAkEAIAAgAU0bRQRAIAA/AEEQdE0NASAAEAYNAQtB+BtBMDYCAEF/DwtBuBogADYCACABCwYAIAAQ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AAAAAzAwAANgKAAAwDQAATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAAAAzAwAAAgLAAD8CgAATjEwX19jeHhhYml2MTE3X19wYmFzZV90eXBlX2luZm9FAAAAzAwAADgLAAD8CgAATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UAzAwAAGgLAABcCwAAAAAAANwLAAACAAAAAwAAAAQAAAAFAAAABgAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQDMDAAAtAsAAPwKAAB2AAAAoAsAAOgLAABiAAAAoAsAAPQLAABjAAAAoAsAAAAMAABoAAAAoAsAAAwMAABhAAAAoAsAABgMAABzAAAAoAsAACQMAAB0AAAAoAsAADAMAABpAAAAoAsAADwMAABqAAAAoAsAAEgMAABsAAAAoAsAAFQMAABtAAAAoAsAAGAMAAB4AAAAoAsAAGwMAAB5AAAAoAsAAHgMAABmAAAAoAsAAIQMAABkAAAAoAsAAJAMAAAAAAAALAsAAAIAAAAHAAAABAAAAAUAAAAIAAAACQAAAAoAAAALAAAAAAAAABQNAAACAAAADAAAAAQAAAAFAAAACAAAAA0AAAAOAAAADwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _evaluate=Module[\"_evaluate\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)=>(_evaluate=Module[\"_evaluate\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;", "import { Splat } from \"../../../splats/Splat\";\nimport { RenderProgram } from \"../programs/RenderProgram\";\n\nimport loadWasm from \"../../../wasm/intersect\";\n\nclass IntersectionTester {\n testPoint: (x: number, y: number) => Splat | null;\n\n constructor(renderProgram: RenderProgram) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n const initWasm = async () => {\n wasmModule = await loadWasm();\n };\n\n initWasm();\n\n let allocatedVertexCount: number = 0;\n let allocatedTransformCount: number = 0;\n\n let viewPtr: number;\n let transformsPtr: number;\n let transformIndicesPtr: number;\n let positionsPtr: number;\n let rotationsPtr: number;\n let scalesPtr: number;\n let depthIndexPtr: number;\n let chunksPtr: number;\n let originPtr: number;\n let directionPtr: number;\n let resultPtr: number;\n\n const allocateVertices = (vertexCount: number) => {\n if (vertexCount > allocatedVertexCount) {\n if (allocatedVertexCount > 0) {\n wasmModule._free(viewPtr);\n wasmModule._free(transformIndicesPtr);\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(depthIndexPtr);\n wasmModule._free(chunksPtr);\n wasmModule._free(originPtr);\n wasmModule._free(directionPtr);\n wasmModule._free(resultPtr);\n }\n\n allocatedVertexCount = vertexCount;\n\n viewPtr = wasmModule._malloc(16 * 4);\n transformIndicesPtr = wasmModule._malloc(allocatedVertexCount * 4);\n positionsPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n rotationsPtr = wasmModule._malloc(4 * allocatedVertexCount * 4);\n scalesPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n depthIndexPtr = wasmModule._malloc(allocatedVertexCount * 4);\n chunksPtr = wasmModule._malloc(allocatedVertexCount);\n originPtr = wasmModule._malloc(3 * 4);\n directionPtr = wasmModule._malloc(3 * 4);\n resultPtr = wasmModule._malloc(4);\n }\n };\n\n const allocateTransforms = (transformCount: number) => {\n if (transformCount > allocatedTransformCount) {\n if (allocatedTransformCount > 0) {\n wasmModule._free(transformsPtr);\n }\n\n allocatedTransformCount = transformCount;\n\n transformsPtr = wasmModule._malloc(20 * allocatedTransformCount * 4);\n }\n };\n\n this.testPoint = (x: number, y: number) => {\n if (!wasmModule) {\n throw new Error(\"Wasm module not loaded\");\n }\n\n if (!renderProgram.camera) {\n throw new Error(\"Camera not set\");\n }\n\n if (!renderProgram.renderData || !renderProgram.depthIndex || !renderProgram.chunks) {\n throw new Error(\"Render data not set\");\n }\n\n const renderData = renderProgram.renderData;\n const depthIndex = renderProgram.depthIndex;\n const chunks = renderProgram.chunks;\n\n const targetAllocatedVertexCount = Math.pow(2, Math.ceil(Math.log2(renderData.vertexCount)));\n allocateVertices(targetAllocatedVertexCount);\n\n const targetAllocatedTransformCount = Math.pow(2, Math.ceil(Math.log2(renderData.transforms.length / 20)));\n allocateTransforms(targetAllocatedTransformCount);\n\n const normalizedX = (x + 1) / 2;\n const normalizedY = (y + 1) / 2;\n const chunk = Math.floor(normalizedX * 15) + Math.floor(normalizedY * 15) * 15;\n\n const camera = renderProgram.camera;\n const ray = camera.screenPointToRay(x, y);\n\n wasmModule.HEAPF32.set(camera.data.viewMatrix.buffer, viewPtr / 4);\n wasmModule.HEAPU32.set(renderData.transformIndices, transformIndicesPtr / 4);\n wasmModule.HEAPF32.set(renderData.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(renderData.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(renderData.scales, scalesPtr / 4);\n wasmModule.HEAPU32.set(depthIndex, depthIndexPtr / 4);\n wasmModule.HEAPU8.set(chunks, chunksPtr);\n wasmModule.HEAPF32.set(camera.position.flat(), originPtr / 4);\n wasmModule.HEAPF32.set(ray.flat(), directionPtr / 4);\n wasmModule.HEAPF32.set(renderData.transforms, transformsPtr / 4);\n\n wasmModule._evaluate(\n viewPtr,\n transformsPtr,\n transformIndicesPtr,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n depthIndexPtr,\n chunksPtr,\n renderData.vertexCount,\n chunk,\n originPtr,\n directionPtr,\n resultPtr,\n );\n\n const result = wasmModule.HEAPU32[resultPtr / 4];\n if (result !== 0xffffffff) {\n const splat = renderData.getSplat(result) as Splat;\n return splat;\n }\n\n return null;\n };\n }\n}\n\nexport { IntersectionTester };\n"], + "mappings": ";AAEA,IAAMA,IAAN,MAAMA,GAAAA;EAKF,YAAYC,KAAY,GAAGC,KAAY,GAAGC,KAAY,GAAA;AAClDC,SAAKH,IAAIA,IACTG,KAAKF,IAAIA,IACTE,KAAKD,IAAIA;EACZ;EAED,OAAOE,IAAAA;AACH,WAAID,KAAKH,MAAMI,GAAEJ,MAGbG,KAAKF,MAAMG,GAAEH,KAGbE,KAAKD,MAAME,GAAEF;EAKpB;EAID,IAAIE,IAAAA;AACA,WAAiB,YAAA,OAANA,KACA,IAAIL,GAAQI,KAAKH,IAAII,IAAGD,KAAKF,IAAIG,IAAGD,KAAKD,IAAIE,EAAAA,IAE7C,IAAIL,GAAQI,KAAKH,IAAII,GAAEJ,GAAGG,KAAKF,IAAIG,GAAEH,GAAGE,KAAKD,IAAIE,GAAEF,CAAAA;EAEjE;EAID,SAASE,IAAAA;AACL,WAAiB,YAAA,OAANA,KACA,IAAIL,GAAQI,KAAKH,IAAII,IAAGD,KAAKF,IAAIG,IAAGD,KAAKD,IAAIE,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AI;EAElB;AAAA;", + "names": ["Vector3", "x", "y", "z", "this", "v", "buffer", "t", "magnitude", "Math", "sqrt", "normalize", "length", "flat", "clone", "toString", "join", "value", "Quaternion", "w", "q", "l", "w1", "x1", "y1", "z1", "w2", "x2", "y2", "z2", "inverse", "vecQuat", "conjugate", "rotatedQuat", "multiply", "e", "halfX", "halfY", "halfZ", "cy", "cos", "sy", "sin", "cp", "sp", "cz", "sz", "toEuler", "sinr_cosp", "cosr_cosp", "atan2", "sinp", "abs", "sign", "PI", "asin", "siny_cosp", "cosy_cosp", "matrix", "m", "trace", "s", "axis", "angle", "halfAngle", "EventDispatcher", "constructor", "listeners", "Map", "addEventListener", "type", "listener", "has", "set", "Set", "get", "add", "removeEventListener", "delete", "hasEventListener", "dispatchEvent", "event", "Matrix4", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34", "n41", "n42", "n43", "n44", "i", "a", "b", "determinant", "invert", "det", "Error", "invDet", "position", "rotation", "scale", "xx", "xy", "xz", "yy", "yz", "zz", "wx", "wy", "wz", "sx", "ObjectAddedEvent", "Event", "object", "super", "ObjectRemovedEvent", "ObjectChangedEvent", "Object3D", "positionChanged", "rotationChanged", "scaleChanged", "_position", "_rotation", "_scale", "_transform", "_changeEvent", "update", "applyPosition", "applyRotation", "applyScale", "_updateMatrix", "Compose", "equals", "forward", "apply", "transform", "Matrix3", "cx", "SplatData", "vertexCount", "positions", "rotations", "scales", "colors", "changed", "detached", "_vertexCount", "_positions", "Float32Array", "_rotations", "_scales", "_colors", "Uint8Array", "_selection", "translate", "translation", "rotate", "R", "RotationFromQuaternion", "currentRotation", "newRot", "serialize", "data", "RowLength", "f_buffer", "u_buffer", "reattach", "selection", "console", "assert", "byteLength", "Splat", "splat", "undefined", "selectedChanged", "_selected", "_data", "name", "document", "now", "Date", "getFullYear", "getMonth", "getDate", "blob", "Blob", "link", "createElement", "download", "href", "URL", "createObjectURL", "click", "selected", "CameraData", "_fx", "_fy", "_near", "_far", "_width", "_height", "_projectionMatrix", "_viewMatrix", "_viewProj", "_updateProjectionMatrix", "fx", "width", "fy", "height", "far", "near", "projectionMatrix", "viewMatrix", "setSize", "viewProj", "Vector4", "Camera", "camera", "screenPointToRay", "clipSpaceCoords", "inverseProjectionMatrix", "cameraSpaceCoords", "inverseViewMatrix", "worldSpaceCoords", "subtract", "Scene", "_objects", "addObject", "objects", "push", "removeObject", "index", "indexOf", "splice", "findObject", "predicate", "findObjectOfType", "reset", "objectsToRemove", "slice", "buffers", "offset", "Loader", "url", "scene", "onProgress", "useCache", "req", "fetch", "mode", "credentials", "cache", "status", "reader", "body", "getReader", "contentLength", "parseInt", "headers", "bytesRead", "done", "read", "Deserialize", "file", "FileReader", "onload", "target", "result", "onprogress", "loaded", "total", "readAsArrayBuffer", "Promise", "resolve", "onloadend", "PLYLoader", "format", "plyData", "_ParsePLYBuffer", "inputBuffer", "ubuf", "headerText", "TextDecoder", "decode", "header_end", "header_end_index", "exec", "rowOffset", "offsets", "double", "int", "uint", "float", "short", "ushort", "uchar", "properties", "prop", "split", "filter", "k", "startsWith", "_p", "dataView", "DataView", "ArrayBuffer", "q_polycam", "FromEuler", "rgba", "Uint8ClampedArray", "rot", "r0", "r1", "r2", "r3", "forEach", "property", "getFloat32", "getInt32", "exp", "SH_C0", "temp", "A", "Q", "F", "B", "U", "d", "ShaderProgram", "renderer", "passes", "_scene", "_camera", "_started", "_initialized", "_renderer", "gl", "_program", "createProgram", "_passes", "vertexShader", "createShader", "VERTEX_SHADER", "shaderSource", "_getVertexSource", "compileShader", "getShaderParameter", "COMPILE_STATUS", "error", "getShaderInfoLog", "fragmentShader", "FRAGMENT_SHADER", "_getFragmentSource", "attachShader", "program", "linkProgram", "getProgramParameter", "LINK_STATUS", "getProgramInfoLog", "resize", "useProgram", "_resize", "initialize", "_initialize", "pass", "render", "dispose", "_render", "_dispose", "started", "loadWasm", "moduleArg", "readyPromiseResolve", "readyPromiseReject", "Module", "reject", "readBinary", "moduleOverrides", "Object", "assign", "scriptDirectory", "self", "location", "substr", "replace", "lastIndexOf", "xhr", "XMLHttpRequest", "open", "responseType", "send", "response", "log", "bind", "wasmBinary", "wasmMemory", "err", "tryParseAsDataURI", "filename", "isDataURI", "decoded", "atob", "bytes", "charCodeAt", "dataURIPrefix", "WebAssembly", "abort", "HEAP8", "HEAPU8", "HEAP16", "HEAPU16", "HEAP32", "HEAPU32", "HEAPF32", "HEAPF64", "ABORT", "updateMemoryViews", "Int8Array", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float64Array", "__ATPRERUN__", "__ATINIT__", "__ATPOSTRUN__", "runDependencies", "dependenciesFulfilled", "what", "RuntimeError", "wasmBinaryFile", "path", "getBinaryPromise", "binaryFile", "then", "binary", "instantiateAsync", "imports", "callback", "receiver", "instantiate", "instance", "reason", "callRuntimeCallbacks", "callbacks", "shift", "embind_charCodes", "BindingError", "readLatin1String", "ptr", "ret", "c", "awaitingDependencies", "registeredTypes", "throwBindingError", "message", "registerType", "rawType", "registeredInstance", "options", "TypeError", "hasOwnProperty", "ignoreDuplicateRegistrations", "cb", "HandleAllocator", "allocated", "freelist", "emval_handles", "count_emval_handles", "count", "reserved", "Emval", "handle", "allocate", "refcount", "simpleReadValueFromPointer", "pointer", "floatReadValueFromPointer", "integerReadValueFromPointer", "signed", "readPointer", "UTF8Decoder", "UTF8ToString", "maxBytesToRead", "heapOrArray", "idx", "endIdx", "endPtr", "subarray", "str", "u0", "u1", "u2", "String", "fromCharCode", "ch", "UTF16Decoder", "UTF16ToString", "maxIdx", "codeUnit", "stringToUTF16", "outPtr", "maxBytesToWrite", "startPtr", "numCharsToWrite", "lengthBytesUTF16", "UTF32ToString", "utf32", "stringToUTF32", "lengthBytesUTF32", "len", "growMemory", "size", "pages", "grow", "codes", "Array", "embind_init_charCodes", "prototype", "id", "pop", "wasmImports", "f", "primitiveType", "minRange", "maxRange", "trueValue", "falseValue", "fromWireType", "wt", "toWireType", "destructors", "o", "argPackAdvance", "readValueFromPointer", "destructorFunction", "h", "rv", "free", "bitshift", "isUnsignedType", "includes", "dataTypeIndex", "TA", "decodeMemoryView", "stdStringIsUTF8", "payload", "decodeStartPtr", "currentBytePtr", "stringSegment", "_free", "valueIsOfTypeString", "base", "_malloc", "heap", "outIdx", "u", "startIdx", "charCode", "charSize", "decodeString", "encodeString", "getHeap", "lengthBytesUTF", "HEAP", "j", "isVoid", "g", "requestedSize", "oldSize", "maxHeapSize", "multiple", "cutDown", "overGrownHeapSize", "min", "newSize", "max", "wasmExports", "info", "receiveInstance", "module", "exports", "unshift", "_a", "removeRunDependency", "catch", "createWasm", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "calledRun", "run", "doRun", "postRun", "preRun", "setTimeout", "runCaller", "ready", "RenderData", "dataChanged", "transformsChanged", "_updating", "_dirty", "splatIndex", "_splatIndices", "_offsets", "lookup", "ceil", "_transformsWidth", "_transformsHeight", "_transforms", "_transformIndicesWidth", "_transformIndicesHeight", "_transformIndices", "_worker", "DataWorker", "updateTransform", "wasmModule", "onmessage", "worldPositions", "worldRotations", "worldScales", "async", "initWasm", "buildImmediate", "waitForWasm", "positionsPtr", "rotationsPtr", "scalesPtr", "colorsPtr", "selectionPtr", "dataPtr", "worldPositionsPtr", "worldRotationsPtr", "worldScalesPtr", "_pack", "outData", "build", "serializedSplat", "postMessage", "getSplat", "key", "getLocalIndex", "markDirty", "rebuild", "clear", "terminate", "keys", "transforms", "transformsWidth", "transformsHeight", "transformIndices", "transformIndicesWidth", "transformIndicesHeight", "needsRebuild", "updating", "Color32", "r", "flatNorm", "toHexString", "map", "padStart", "RenderProgram", "_outlineThickness", "_outlineColor", "_renderData", "_depthIndex", "_chunks", "_splatTexture", "canvas", "worker", "u_projection", "u_viewport", "u_focal", "u_view", "u_texture", "u_transforms", "u_transformIndices", "u_outlineThickness", "u_outlineColor", "positionAttribute", "indexAttribute", "transformsTexture", "transformIndicesTexture", "vertexBuffer", "indexBuffer", "getUniformLocation", "uniformMatrix4fv", "uniform2fv", "createWorker", "SortWorker", "depthIndex", "chunks", "bindBuffer", "ARRAY_BUFFER", "bufferData", "STATIC_DRAW", "handleObjectAdded", "handleObjectRemoved", "handleObjectChanged", "uniform1f", "outlineThickness", "uniform4fv", "outlineColor", "createTexture", "uniform1i", "createBuffer", "getAttribLocation", "enableVertexAttribArray", "vertexAttribPointer", "FLOAT", "renderData", "activeTexture", "TEXTURE0", "bindTexture", "TEXTURE_2D", "splatTexture", "texParameteri", "TEXTURE_WRAP_S", "CLAMP_TO_EDGE", "TEXTURE_WRAP_T", "TEXTURE_MIN_FILTER", "NEAREST", "TEXTURE_MAG_FILTER", "texImage2D", "RGBA32UI", "RGBA_INTEGER", "UNSIGNED_INT", "TEXTURE1", "RGBA32F", "RGBA", "TEXTURE2", "R32UI", "RED_INTEGER", "detachedPositions", "detachedTransforms", "detachedTransformIndices", "sortData", "viewport", "clearColor", "COLOR_BUFFER_BIT", "disable", "DEPTH_TEST", "enable", "BLEND", "blendFuncSeparate", "ONE_MINUS_DST_ALPHA", "ONE", "blendEquationSeparate", "FUNC_ADD", "vertexAttribIPointer", "INT", "vertexAttribDivisor", "drawArraysInstanced", "TRIANGLE_FAN", "deleteTexture", "deleteBuffer", "_setOutlineThickness", "_setOutlineColor", "FadeInPass", "speed", "renderProgram", "u_useDepthFade", "u_depthFade", "active", "WebGLRenderer", "optionalCanvas", "optionalRenderPasses", "_backgroundColor", "style", "display", "boxSizing", "margin", "padding", "appendChild", "background", "_canvas", "_gl", "getContext", "antialias", "renderPasses", "_renderProgram", "programs", "clientWidth", "clientHeight", "addProgram", "removeProgram", "backgroundColor", "OrbitControls", "alpha", "beta", "radius", "enableKeyboardControls", "inputTarget", "minAngle", "maxAngle", "minZoom", "maxZoom", "orbitSpeed", "panSpeed", "zoomSpeed", "dampening", "setCameraTarget", "desiredTarget", "desiredAlpha", "desiredBeta", "desiredRadius", "dragging", "panning", "lastDist", "lastX", "lastY", "isUpdatingCamera", "eulerRotation", "newTarget", "dx", "dy", "dz", "computeZoomNorm", "onKeyDown", "code", "onKeyUp", "onMouseDown", "preventDefault", "button", "clientX", "clientY", "window", "onMouseUp", "onMouseMove", "zoomNorm", "panX", "panY", "right", "up", "onWheel", "deltaY", "onTouchStart", "touches", "distX", "distY", "onTouchEnd", "onTouchMove", "dist", "touchX", "touchY", "lerp", "direction", "rx", "ry", "moveSpeed", "rotateSpeed", "stopPropagation", "Plane", "normal", "point", "origin", "denominator", "dot", "ShaderPass", "currentScript", "src", "a11", "a12", "IntersectionTester", "viewPtr", "transformsPtr", "transformIndicesPtr", "depthIndexPtr", "chunksPtr", "originPtr", "directionPtr", "resultPtr", "allocatedVertexCount", "allocatedTransformCount", "testPoint", "targetAllocatedVertexCount", "pow", "log2", "targetAllocatedTransformCount", "transformCount", "normalizedX", "normalizedY", "chunk", "floor", "ray", "_evaluate"] +} diff --git a/gsplat/node_modules/.vite/deps/package.json b/gsplat/node_modules/.vite/deps/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/gsplat/node_modules/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js b/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js new file mode 100644 index 0000000..9f818d2 --- /dev/null +++ b/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js @@ -0,0 +1,2027 @@ +// node_modules/gsplat/dist/index.js +var A = class _A { + constructor(A2 = 0, Q2 = 0, F2 = 0) { + this.x = A2, this.y = Q2, this.z = F2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && this.z === A2.z); + } + add(Q2) { + return "number" == typeof Q2 ? new _A(this.x + Q2, this.y + Q2, this.z + Q2) : new _A(this.x + Q2.x, this.y + Q2.y, this.z + Q2.z); + } + subtract(Q2) { + return "number" == typeof Q2 ? new _A(this.x - Q2, this.y - Q2, this.z - Q2) : new _A(this.x - Q2.x, this.y - Q2.y, this.z - Q2.z); + } + multiply(Q2) { + return "number" == typeof Q2 ? new _A(this.x * Q2, this.y * Q2, this.z * Q2) : Q2 instanceof _A ? new _A(this.x * Q2.x, this.y * Q2.y, this.z * Q2.z) : new _A(this.x * Q2.buffer[0] + this.y * Q2.buffer[4] + this.z * Q2.buffer[8] + Q2.buffer[12], this.x * Q2.buffer[1] + this.y * Q2.buffer[5] + this.z * Q2.buffer[9] + Q2.buffer[13], this.x * Q2.buffer[2] + this.y * Q2.buffer[6] + this.z * Q2.buffer[10] + Q2.buffer[14]); + } + cross(Q2) { + const F2 = this.y * Q2.z - this.z * Q2.y, B2 = this.z * Q2.x - this.x * Q2.z, U2 = this.x * Q2.y - this.y * Q2.x; + return new _A(F2, B2, U2); + } + dot(A2) { + return this.x * A2.x + this.y * A2.y + this.z * A2.z; + } + lerp(Q2, F2) { + return new _A(this.x + (Q2.x - this.x) * F2, this.y + (Q2.y - this.y) * F2, this.z + (Q2.z - this.z) * F2); + } + magnitude() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + } + distanceTo(A2) { + return Math.sqrt((this.x - A2.x) ** 2 + (this.y - A2.y) ** 2 + (this.z - A2.z) ** 2); + } + normalize() { + const Q2 = this.magnitude(); + return new _A(this.x / Q2, this.y / Q2, this.z / Q2); + } + flat() { + return [this.x, this.y, this.z]; + } + clone() { + return new _A(this.x, this.y, this.z); + } + toString() { + return `[${this.flat().join(", ")}]`; + } + static One(Q2 = 1) { + return new _A(Q2, Q2, Q2); + } +}; +var Q = class _Q { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 1) { + this.x = A2, this.y = Q2, this.z = F2, this.w = B2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && (this.z === A2.z && this.w === A2.w)); + } + normalize() { + const A2 = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + return new _Q(this.x / A2, this.y / A2, this.z / A2, this.w / A2); + } + multiply(A2) { + const F2 = this.w, B2 = this.x, U2 = this.y, l2 = this.z, t2 = A2.w, d2 = A2.x, n2 = A2.y, V2 = A2.z; + return new _Q(F2 * d2 + B2 * t2 + U2 * V2 - l2 * n2, F2 * n2 - B2 * V2 + U2 * t2 + l2 * d2, F2 * V2 + B2 * n2 - U2 * d2 + l2 * t2, F2 * t2 - B2 * d2 - U2 * n2 - l2 * V2); + } + inverse() { + const A2 = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + return new _Q(-this.x / A2, -this.y / A2, -this.z / A2, this.w / A2); + } + apply(F2) { + const B2 = new _Q(F2.x, F2.y, F2.z, 0), U2 = new _Q(-this.x, -this.y, -this.z, this.w), l2 = this.multiply(B2).multiply(U2); + return new A(l2.x, l2.y, l2.z); + } + flat() { + return [this.x, this.y, this.z, this.w]; + } + clone() { + return new _Q(this.x, this.y, this.z, this.w); + } + static FromEuler(A2) { + const F2 = A2.x / 2, B2 = A2.y / 2, U2 = A2.z / 2, l2 = Math.cos(B2), t2 = Math.sin(B2), d2 = Math.cos(F2), n2 = Math.sin(F2), V2 = Math.cos(U2), Z2 = Math.sin(U2); + return new _Q(l2 * n2 * V2 + t2 * d2 * Z2, t2 * d2 * V2 - l2 * n2 * Z2, l2 * d2 * Z2 - t2 * n2 * V2, l2 * d2 * V2 + t2 * n2 * Z2); + } + toEuler() { + const Q2 = 2 * (this.w * this.x + this.y * this.z), F2 = 1 - 2 * (this.x * this.x + this.y * this.y), B2 = Math.atan2(Q2, F2); + let U2; + const l2 = 2 * (this.w * this.y - this.z * this.x); + U2 = Math.abs(l2) >= 1 ? Math.sign(l2) * Math.PI / 2 : Math.asin(l2); + const t2 = 2 * (this.w * this.z + this.x * this.y), d2 = 1 - 2 * (this.y * this.y + this.z * this.z), n2 = Math.atan2(t2, d2); + return new A(B2, U2, n2); + } + static FromMatrix3(A2) { + const F2 = A2.buffer, B2 = F2[0] + F2[4] + F2[8]; + let U2, l2, t2, d2; + if (B2 > 0) { + const A3 = 0.5 / Math.sqrt(B2 + 1); + d2 = 0.25 / A3, U2 = (F2[7] - F2[5]) * A3, l2 = (F2[2] - F2[6]) * A3, t2 = (F2[3] - F2[1]) * A3; + } else if (F2[0] > F2[4] && F2[0] > F2[8]) { + const A3 = 2 * Math.sqrt(1 + F2[0] - F2[4] - F2[8]); + d2 = (F2[7] - F2[5]) / A3, U2 = 0.25 * A3, l2 = (F2[1] + F2[3]) / A3, t2 = (F2[2] + F2[6]) / A3; + } else if (F2[4] > F2[8]) { + const A3 = 2 * Math.sqrt(1 + F2[4] - F2[0] - F2[8]); + d2 = (F2[2] - F2[6]) / A3, U2 = (F2[1] + F2[3]) / A3, l2 = 0.25 * A3, t2 = (F2[5] + F2[7]) / A3; + } else { + const A3 = 2 * Math.sqrt(1 + F2[8] - F2[0] - F2[4]); + d2 = (F2[3] - F2[1]) / A3, U2 = (F2[2] + F2[6]) / A3, l2 = (F2[5] + F2[7]) / A3, t2 = 0.25 * A3; + } + return new _Q(U2, l2, t2, d2); + } + static FromAxisAngle(A2, F2) { + const B2 = F2 / 2, U2 = Math.sin(B2), l2 = Math.cos(B2); + return new _Q(A2.x * U2, A2.y * U2, A2.z * U2, l2); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var F = class { + constructor() { + const A2 = /* @__PURE__ */ new Map(); + this.addEventListener = (Q2, F2) => { + A2.has(Q2) || A2.set(Q2, /* @__PURE__ */ new Set()), A2.get(Q2).add(F2); + }, this.removeEventListener = (Q2, F2) => { + A2.has(Q2) && A2.get(Q2).delete(F2); + }, this.hasEventListener = (Q2, F2) => !!A2.has(Q2) && A2.get(Q2).has(F2), this.dispatchEvent = (Q2) => { + if (A2.has(Q2.type)) + for (const F2 of A2.get(Q2.type)) + F2(Q2); + }; + } +}; +var B = class _B { + constructor(A2 = 1, Q2 = 0, F2 = 0, B2 = 0, U2 = 0, l2 = 1, t2 = 0, d2 = 0, n2 = 0, V2 = 0, Z2 = 1, e2 = 0, I2 = 0, R2 = 0, a2 = 0, g2 = 1) { + this.buffer = [A2, Q2, F2, B2, U2, l2, t2, d2, n2, V2, Z2, e2, I2, R2, a2, g2]; + } + equals(A2) { + if (this.buffer.length !== A2.buffer.length) + return false; + if (this.buffer === A2.buffer) + return true; + for (let Q2 = 0; Q2 < this.buffer.length; Q2++) + if (this.buffer[Q2] !== A2.buffer[Q2]) + return false; + return true; + } + multiply(A2) { + const Q2 = this.buffer, F2 = A2.buffer; + return new _B(F2[0] * Q2[0] + F2[1] * Q2[4] + F2[2] * Q2[8] + F2[3] * Q2[12], F2[0] * Q2[1] + F2[1] * Q2[5] + F2[2] * Q2[9] + F2[3] * Q2[13], F2[0] * Q2[2] + F2[1] * Q2[6] + F2[2] * Q2[10] + F2[3] * Q2[14], F2[0] * Q2[3] + F2[1] * Q2[7] + F2[2] * Q2[11] + F2[3] * Q2[15], F2[4] * Q2[0] + F2[5] * Q2[4] + F2[6] * Q2[8] + F2[7] * Q2[12], F2[4] * Q2[1] + F2[5] * Q2[5] + F2[6] * Q2[9] + F2[7] * Q2[13], F2[4] * Q2[2] + F2[5] * Q2[6] + F2[6] * Q2[10] + F2[7] * Q2[14], F2[4] * Q2[3] + F2[5] * Q2[7] + F2[6] * Q2[11] + F2[7] * Q2[15], F2[8] * Q2[0] + F2[9] * Q2[4] + F2[10] * Q2[8] + F2[11] * Q2[12], F2[8] * Q2[1] + F2[9] * Q2[5] + F2[10] * Q2[9] + F2[11] * Q2[13], F2[8] * Q2[2] + F2[9] * Q2[6] + F2[10] * Q2[10] + F2[11] * Q2[14], F2[8] * Q2[3] + F2[9] * Q2[7] + F2[10] * Q2[11] + F2[11] * Q2[15], F2[12] * Q2[0] + F2[13] * Q2[4] + F2[14] * Q2[8] + F2[15] * Q2[12], F2[12] * Q2[1] + F2[13] * Q2[5] + F2[14] * Q2[9] + F2[15] * Q2[13], F2[12] * Q2[2] + F2[13] * Q2[6] + F2[14] * Q2[10] + F2[15] * Q2[14], F2[12] * Q2[3] + F2[13] * Q2[7] + F2[14] * Q2[11] + F2[15] * Q2[15]); + } + clone() { + const A2 = this.buffer; + return new _B(A2[0], A2[1], A2[2], A2[3], A2[4], A2[5], A2[6], A2[7], A2[8], A2[9], A2[10], A2[11], A2[12], A2[13], A2[14], A2[15]); + } + determinant() { + const A2 = this.buffer; + return A2[12] * A2[9] * A2[6] * A2[3] - A2[8] * A2[13] * A2[6] * A2[3] - A2[12] * A2[5] * A2[10] * A2[3] + A2[4] * A2[13] * A2[10] * A2[3] + A2[8] * A2[5] * A2[14] * A2[3] - A2[4] * A2[9] * A2[14] * A2[3] - A2[12] * A2[9] * A2[2] * A2[7] + A2[8] * A2[13] * A2[2] * A2[7] + A2[12] * A2[1] * A2[10] * A2[7] - A2[0] * A2[13] * A2[10] * A2[7] - A2[8] * A2[1] * A2[14] * A2[7] + A2[0] * A2[9] * A2[14] * A2[7] + A2[12] * A2[5] * A2[2] * A2[11] - A2[4] * A2[13] * A2[2] * A2[11] - A2[12] * A2[1] * A2[6] * A2[11] + A2[0] * A2[13] * A2[6] * A2[11] + A2[4] * A2[1] * A2[14] * A2[11] - A2[0] * A2[5] * A2[14] * A2[11] - A2[8] * A2[5] * A2[2] * A2[15] + A2[4] * A2[9] * A2[2] * A2[15] + A2[8] * A2[1] * A2[6] * A2[15] - A2[0] * A2[9] * A2[6] * A2[15] - A2[4] * A2[1] * A2[10] * A2[15] + A2[0] * A2[5] * A2[10] * A2[15]; + } + invert() { + const A2 = this.buffer, Q2 = this.determinant(); + if (0 === Q2) + throw new Error("Matrix is not invertible."); + const F2 = 1 / Q2; + return new _B(F2 * (A2[5] * A2[10] * A2[15] - A2[5] * A2[11] * A2[14] - A2[9] * A2[6] * A2[15] + A2[9] * A2[7] * A2[14] + A2[13] * A2[6] * A2[11] - A2[13] * A2[7] * A2[10]), F2 * (-A2[1] * A2[10] * A2[15] + A2[1] * A2[11] * A2[14] + A2[9] * A2[2] * A2[15] - A2[9] * A2[3] * A2[14] - A2[13] * A2[2] * A2[11] + A2[13] * A2[3] * A2[10]), F2 * (A2[1] * A2[6] * A2[15] - A2[1] * A2[7] * A2[14] - A2[5] * A2[2] * A2[15] + A2[5] * A2[3] * A2[14] + A2[13] * A2[2] * A2[7] - A2[13] * A2[3] * A2[6]), F2 * (-A2[1] * A2[6] * A2[11] + A2[1] * A2[7] * A2[10] + A2[5] * A2[2] * A2[11] - A2[5] * A2[3] * A2[10] - A2[9] * A2[2] * A2[7] + A2[9] * A2[3] * A2[6]), F2 * (-A2[4] * A2[10] * A2[15] + A2[4] * A2[11] * A2[14] + A2[8] * A2[6] * A2[15] - A2[8] * A2[7] * A2[14] - A2[12] * A2[6] * A2[11] + A2[12] * A2[7] * A2[10]), F2 * (A2[0] * A2[10] * A2[15] - A2[0] * A2[11] * A2[14] - A2[8] * A2[2] * A2[15] + A2[8] * A2[3] * A2[14] + A2[12] * A2[2] * A2[11] - A2[12] * A2[3] * A2[10]), F2 * (-A2[0] * A2[6] * A2[15] + A2[0] * A2[7] * A2[14] + A2[4] * A2[2] * A2[15] - A2[4] * A2[3] * A2[14] - A2[12] * A2[2] * A2[7] + A2[12] * A2[3] * A2[6]), F2 * (A2[0] * A2[6] * A2[11] - A2[0] * A2[7] * A2[10] - A2[4] * A2[2] * A2[11] + A2[4] * A2[3] * A2[10] + A2[8] * A2[2] * A2[7] - A2[8] * A2[3] * A2[6]), F2 * (A2[4] * A2[9] * A2[15] - A2[4] * A2[11] * A2[13] - A2[8] * A2[5] * A2[15] + A2[8] * A2[7] * A2[13] + A2[12] * A2[5] * A2[11] - A2[12] * A2[7] * A2[9]), F2 * (-A2[0] * A2[9] * A2[15] + A2[0] * A2[11] * A2[13] + A2[8] * A2[1] * A2[15] - A2[8] * A2[3] * A2[13] - A2[12] * A2[1] * A2[11] + A2[12] * A2[3] * A2[9]), F2 * (A2[0] * A2[5] * A2[15] - A2[0] * A2[7] * A2[13] - A2[4] * A2[1] * A2[15] + A2[4] * A2[3] * A2[13] + A2[12] * A2[1] * A2[7] - A2[12] * A2[3] * A2[5]), F2 * (-A2[0] * A2[5] * A2[11] + A2[0] * A2[7] * A2[9] + A2[4] * A2[1] * A2[11] - A2[4] * A2[3] * A2[9] - A2[8] * A2[1] * A2[7] + A2[8] * A2[3] * A2[5]), F2 * (-A2[4] * A2[9] * A2[14] + A2[4] * A2[10] * A2[13] + A2[8] * A2[5] * A2[14] - A2[8] * A2[6] * A2[13] - A2[12] * A2[5] * A2[10] + A2[12] * A2[6] * A2[9]), F2 * (A2[0] * A2[9] * A2[14] - A2[0] * A2[10] * A2[13] - A2[8] * A2[1] * A2[14] + A2[8] * A2[2] * A2[13] + A2[12] * A2[1] * A2[10] - A2[12] * A2[2] * A2[9]), F2 * (-A2[0] * A2[5] * A2[14] + A2[0] * A2[6] * A2[13] + A2[4] * A2[1] * A2[14] - A2[4] * A2[2] * A2[13] - A2[12] * A2[1] * A2[6] + A2[12] * A2[2] * A2[5]), F2 * (A2[0] * A2[5] * A2[10] - A2[0] * A2[6] * A2[9] - A2[4] * A2[1] * A2[10] + A2[4] * A2[2] * A2[9] + A2[8] * A2[1] * A2[6] - A2[8] * A2[2] * A2[5])); + } + static Compose(A2, Q2, F2) { + const U2 = Q2.x, l2 = Q2.y, t2 = Q2.z, d2 = Q2.w, n2 = U2 + U2, V2 = l2 + l2, Z2 = t2 + t2, e2 = U2 * n2, I2 = U2 * V2, R2 = U2 * Z2, a2 = l2 * V2, g2 = l2 * Z2, i2 = t2 * Z2, W2 = d2 * n2, c2 = d2 * V2, C2 = d2 * Z2, h2 = F2.x, s2 = F2.y, o2 = F2.z; + return new _B((1 - (a2 + i2)) * h2, (I2 + C2) * h2, (R2 - c2) * h2, 0, (I2 - C2) * s2, (1 - (e2 + i2)) * s2, (g2 + W2) * s2, 0, (R2 + c2) * o2, (g2 - W2) * o2, (1 - (e2 + a2)) * o2, 0, A2.x, A2.y, A2.z, 1); + } + toString() { + return `[${this.buffer.join(", ")}]`; + } +}; +var U = class extends Event { + constructor(A2) { + super("objectAdded"), this.object = A2; + } +}; +var l = class extends Event { + constructor(A2) { + super("objectRemoved"), this.object = A2; + } +}; +var t = class extends Event { + constructor(A2) { + super("objectChanged"), this.object = A2; + } +}; +var d = class extends F { + constructor() { + super(), this.positionChanged = false, this.rotationChanged = false, this.scaleChanged = false, this._position = new A(), this._rotation = new Q(), this._scale = new A(1, 1, 1), this._transform = new B(), this._changeEvent = new t(this), this.update = () => { + }, this.applyPosition = () => { + this.position = new A(); + }, this.applyRotation = () => { + this.rotation = new Q(); + }, this.applyScale = () => { + this.scale = new A(1, 1, 1); + }; + } + _updateMatrix() { + this._transform = B.Compose(this._position, this._rotation, this._scale); + } + get position() { + return this._position; + } + set position(A2) { + this._position.equals(A2) || (this._position = A2, this.positionChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get rotation() { + return this._rotation; + } + set rotation(A2) { + this._rotation.equals(A2) || (this._rotation = A2, this.rotationChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get scale() { + return this._scale; + } + set scale(A2) { + this._scale.equals(A2) || (this._scale = A2, this.scaleChanged = true, this._updateMatrix(), this.dispatchEvent(this._changeEvent)); + } + get forward() { + let Q2 = new A(0, 0, 1); + return Q2 = this.rotation.apply(Q2), Q2; + } + get transform() { + return this._transform; + } +}; +var n = class _n { + constructor(A2 = 1, Q2 = 0, F2 = 0, B2 = 0, U2 = 1, l2 = 0, t2 = 0, d2 = 0, n2 = 1) { + this.buffer = [A2, Q2, F2, B2, U2, l2, t2, d2, n2]; + } + equals(A2) { + if (this.buffer.length !== A2.buffer.length) + return false; + if (this.buffer === A2.buffer) + return true; + for (let Q2 = 0; Q2 < this.buffer.length; Q2++) + if (this.buffer[Q2] !== A2.buffer[Q2]) + return false; + return true; + } + multiply(A2) { + const Q2 = this.buffer, F2 = A2.buffer; + return new _n(F2[0] * Q2[0] + F2[3] * Q2[1] + F2[6] * Q2[2], F2[1] * Q2[0] + F2[4] * Q2[1] + F2[7] * Q2[2], F2[2] * Q2[0] + F2[5] * Q2[1] + F2[8] * Q2[2], F2[0] * Q2[3] + F2[3] * Q2[4] + F2[6] * Q2[5], F2[1] * Q2[3] + F2[4] * Q2[4] + F2[7] * Q2[5], F2[2] * Q2[3] + F2[5] * Q2[4] + F2[8] * Q2[5], F2[0] * Q2[6] + F2[3] * Q2[7] + F2[6] * Q2[8], F2[1] * Q2[6] + F2[4] * Q2[7] + F2[7] * Q2[8], F2[2] * Q2[6] + F2[5] * Q2[7] + F2[8] * Q2[8]); + } + clone() { + const A2 = this.buffer; + return new _n(A2[0], A2[1], A2[2], A2[3], A2[4], A2[5], A2[6], A2[7], A2[8]); + } + static Eye(A2 = 1) { + return new _n(A2, 0, 0, 0, A2, 0, 0, 0, A2); + } + static Diagonal(A2) { + return new _n(A2.x, 0, 0, 0, A2.y, 0, 0, 0, A2.z); + } + static RotationFromQuaternion(A2) { + return new _n(1 - 2 * A2.y * A2.y - 2 * A2.z * A2.z, 2 * A2.x * A2.y - 2 * A2.z * A2.w, 2 * A2.x * A2.z + 2 * A2.y * A2.w, 2 * A2.x * A2.y + 2 * A2.z * A2.w, 1 - 2 * A2.x * A2.x - 2 * A2.z * A2.z, 2 * A2.y * A2.z - 2 * A2.x * A2.w, 2 * A2.x * A2.z - 2 * A2.y * A2.w, 2 * A2.y * A2.z + 2 * A2.x * A2.w, 1 - 2 * A2.x * A2.x - 2 * A2.y * A2.y); + } + static RotationFromEuler(A2) { + const Q2 = Math.cos(A2.x), F2 = Math.sin(A2.x), B2 = Math.cos(A2.y), U2 = Math.sin(A2.y), l2 = Math.cos(A2.z), t2 = Math.sin(A2.z); + return new _n(...[B2 * l2 + U2 * F2 * t2, -B2 * t2 + U2 * F2 * l2, U2 * Q2, Q2 * t2, Q2 * l2, -F2, -U2 * l2 + B2 * F2 * t2, U2 * t2 + B2 * F2 * l2, B2 * Q2]); + } + toString() { + return `[${this.buffer.join(", ")}]`; + } +}; +var V = class _V { + constructor(A2 = 0, F2 = null, B2 = null, U2 = null, l2 = null) { + this.changed = false, this.detached = false, this._vertexCount = A2, this._positions = F2 || new Float32Array(0), this._rotations = B2 || new Float32Array(0), this._scales = U2 || new Float32Array(0), this._colors = l2 || new Uint8Array(0), this._selection = new Uint8Array(this.vertexCount), this.translate = (A3) => { + for (let Q2 = 0; Q2 < this.vertexCount; Q2++) + this.positions[3 * Q2 + 0] += A3.x, this.positions[3 * Q2 + 1] += A3.y, this.positions[3 * Q2 + 2] += A3.z; + this.changed = true; + }, this.rotate = (A3) => { + const F3 = n.RotationFromQuaternion(A3).buffer; + for (let B3 = 0; B3 < this.vertexCount; B3++) { + const U3 = this.positions[3 * B3 + 0], l3 = this.positions[3 * B3 + 1], t2 = this.positions[3 * B3 + 2]; + this.positions[3 * B3 + 0] = F3[0] * U3 + F3[1] * l3 + F3[2] * t2, this.positions[3 * B3 + 1] = F3[3] * U3 + F3[4] * l3 + F3[5] * t2, this.positions[3 * B3 + 2] = F3[6] * U3 + F3[7] * l3 + F3[8] * t2; + const d2 = new Q(this.rotations[4 * B3 + 1], this.rotations[4 * B3 + 2], this.rotations[4 * B3 + 3], this.rotations[4 * B3 + 0]), n2 = A3.multiply(d2); + this.rotations[4 * B3 + 1] = n2.x, this.rotations[4 * B3 + 2] = n2.y, this.rotations[4 * B3 + 3] = n2.z, this.rotations[4 * B3 + 0] = n2.w; + } + this.changed = true; + }, this.scale = (A3) => { + for (let Q2 = 0; Q2 < this.vertexCount; Q2++) + this.positions[3 * Q2 + 0] *= A3.x, this.positions[3 * Q2 + 1] *= A3.y, this.positions[3 * Q2 + 2] *= A3.z, this.scales[3 * Q2 + 0] *= A3.x, this.scales[3 * Q2 + 1] *= A3.y, this.scales[3 * Q2 + 2] *= A3.z; + this.changed = true; + }, this.serialize = () => { + const A3 = new Uint8Array(this.vertexCount * _V.RowLength), Q2 = new Float32Array(A3.buffer), F3 = new Uint8Array(A3.buffer); + for (let A4 = 0; A4 < this.vertexCount; A4++) + Q2[8 * A4 + 0] = this.positions[3 * A4 + 0], Q2[8 * A4 + 1] = this.positions[3 * A4 + 1], Q2[8 * A4 + 2] = this.positions[3 * A4 + 2], F3[32 * A4 + 24 + 0] = this.colors[4 * A4 + 0], F3[32 * A4 + 24 + 1] = this.colors[4 * A4 + 1], F3[32 * A4 + 24 + 2] = this.colors[4 * A4 + 2], F3[32 * A4 + 24 + 3] = this.colors[4 * A4 + 3], Q2[8 * A4 + 3 + 0] = this.scales[3 * A4 + 0], Q2[8 * A4 + 3 + 1] = this.scales[3 * A4 + 1], Q2[8 * A4 + 3 + 2] = this.scales[3 * A4 + 2], F3[32 * A4 + 28 + 0] = 128 * this.rotations[4 * A4 + 0] + 128 & 255, F3[32 * A4 + 28 + 1] = 128 * this.rotations[4 * A4 + 1] + 128 & 255, F3[32 * A4 + 28 + 2] = 128 * this.rotations[4 * A4 + 2] + 128 & 255, F3[32 * A4 + 28 + 3] = 128 * this.rotations[4 * A4 + 3] + 128 & 255; + return A3; + }, this.reattach = (A3, Q2, F3, B3, U3) => { + console.assert(A3.byteLength === 3 * this.vertexCount * 4, `Expected ${3 * this.vertexCount * 4} bytes, got ${A3.byteLength} bytes`), this._positions = new Float32Array(A3), this._rotations = new Float32Array(Q2), this._scales = new Float32Array(F3), this._colors = new Uint8Array(B3), this._selection = new Uint8Array(U3), this.detached = false; + }; + } + static Deserialize(A2) { + const Q2 = A2.length / _V.RowLength, F2 = new Float32Array(3 * Q2), B2 = new Float32Array(4 * Q2), U2 = new Float32Array(3 * Q2), l2 = new Uint8Array(4 * Q2), t2 = new Float32Array(A2.buffer), d2 = new Uint8Array(A2.buffer); + for (let A3 = 0; A3 < Q2; A3++) + F2[3 * A3 + 0] = t2[8 * A3 + 0], F2[3 * A3 + 1] = t2[8 * A3 + 1], F2[3 * A3 + 2] = t2[8 * A3 + 2], B2[4 * A3 + 0] = (d2[32 * A3 + 28 + 0] - 128) / 128, B2[4 * A3 + 1] = (d2[32 * A3 + 28 + 1] - 128) / 128, B2[4 * A3 + 2] = (d2[32 * A3 + 28 + 2] - 128) / 128, B2[4 * A3 + 3] = (d2[32 * A3 + 28 + 3] - 128) / 128, U2[3 * A3 + 0] = t2[8 * A3 + 3 + 0], U2[3 * A3 + 1] = t2[8 * A3 + 3 + 1], U2[3 * A3 + 2] = t2[8 * A3 + 3 + 2], l2[4 * A3 + 0] = d2[32 * A3 + 24 + 0], l2[4 * A3 + 1] = d2[32 * A3 + 24 + 1], l2[4 * A3 + 2] = d2[32 * A3 + 24 + 2], l2[4 * A3 + 3] = d2[32 * A3 + 24 + 3]; + return new _V(Q2, F2, B2, U2, l2); + } + get vertexCount() { + return this._vertexCount; + } + get positions() { + return this._positions; + } + get rotations() { + return this._rotations; + } + get scales() { + return this._scales; + } + get colors() { + return this._colors; + } + get selection() { + return this._selection; + } +}; +V.RowLength = 32; +var Z = class extends d { + constructor(F2 = void 0) { + super(), this.selectedChanged = false, this._selected = false, this._data = F2 || new V(), this.applyPosition = () => { + this.data.translate(this.position), this.position = new A(); + }, this.applyRotation = () => { + this.data.rotate(this.rotation), this.rotation = new Q(); + }, this.applyScale = () => { + this.data.scale(this.scale), this.scale = new A(1, 1, 1); + }; + } + saveToFile(A2 = null) { + if (!document) + return; + if (!A2) { + const Q3 = /* @__PURE__ */ new Date(); + A2 = `splat-${Q3.getFullYear()}-${Q3.getMonth() + 1}-${Q3.getDate()}.splat`; + } + this.applyRotation(), this.applyScale(), this.applyPosition(); + const Q2 = this.data.serialize(), F2 = new Blob([Q2], { type: "application/octet-stream" }), B2 = document.createElement("a"); + B2.download = A2, B2.href = URL.createObjectURL(F2), B2.click(); + } + get data() { + return this._data; + } + get selected() { + return this._selected; + } + set selected(A2) { + this._selected !== A2 && (this._selected = A2, this.selectedChanged = true, this.dispatchEvent(this._changeEvent)); + } +}; +var e = class { + constructor() { + this._fx = 1132, this._fy = 1132, this._near = 0.1, this._far = 100, this._width = 512, this._height = 512, this._projectionMatrix = new B(), this._viewMatrix = new B(), this._viewProj = new B(), this._updateProjectionMatrix = () => { + this._projectionMatrix = new B(2 * this.fx / this.width, 0, 0, 0, 0, -2 * this.fy / this.height, 0, 0, 0, 0, this.far / (this.far - this.near), 1, 0, 0, -this.far * this.near / (this.far - this.near), 0), this._viewProj = this.projectionMatrix.multiply(this.viewMatrix); + }, this.update = (A2, Q2) => { + const F2 = n.RotationFromQuaternion(Q2).buffer, U2 = A2.flat(); + this._viewMatrix = new B(F2[0], F2[1], F2[2], 0, F2[3], F2[4], F2[5], 0, F2[6], F2[7], F2[8], 0, -U2[0] * F2[0] - U2[1] * F2[3] - U2[2] * F2[6], -U2[0] * F2[1] - U2[1] * F2[4] - U2[2] * F2[7], -U2[0] * F2[2] - U2[1] * F2[5] - U2[2] * F2[8], 1), this._viewProj = this.projectionMatrix.multiply(this.viewMatrix); + }, this.setSize = (A2, Q2) => { + this._width = A2, this._height = Q2, this._updateProjectionMatrix(); + }; + } + get fx() { + return this._fx; + } + set fx(A2) { + this._fx !== A2 && (this._fx = A2, this._updateProjectionMatrix()); + } + get fy() { + return this._fy; + } + set fy(A2) { + this._fy !== A2 && (this._fy = A2, this._updateProjectionMatrix()); + } + get near() { + return this._near; + } + set near(A2) { + this._near !== A2 && (this._near = A2, this._updateProjectionMatrix()); + } + get far() { + return this._far; + } + set far(A2) { + this._far !== A2 && (this._far = A2, this._updateProjectionMatrix()); + } + get width() { + return this._width; + } + get height() { + return this._height; + } + get projectionMatrix() { + return this._projectionMatrix; + } + get viewMatrix() { + return this._viewMatrix; + } + get viewProj() { + return this._viewProj; + } +}; +var I = class _I { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 0) { + this.x = A2, this.y = Q2, this.z = F2, this.w = B2; + } + equals(A2) { + return this.x === A2.x && (this.y === A2.y && (this.z === A2.z && this.w === A2.w)); + } + add(A2) { + return "number" == typeof A2 ? new _I(this.x + A2, this.y + A2, this.z + A2, this.w + A2) : new _I(this.x + A2.x, this.y + A2.y, this.z + A2.z, this.w + A2.w); + } + subtract(A2) { + return "number" == typeof A2 ? new _I(this.x - A2, this.y - A2, this.z - A2, this.w - A2) : new _I(this.x - A2.x, this.y - A2.y, this.z - A2.z, this.w - A2.w); + } + multiply(A2) { + return "number" == typeof A2 ? new _I(this.x * A2, this.y * A2, this.z * A2, this.w * A2) : A2 instanceof _I ? new _I(this.x * A2.x, this.y * A2.y, this.z * A2.z, this.w * A2.w) : new _I(this.x * A2.buffer[0] + this.y * A2.buffer[4] + this.z * A2.buffer[8] + this.w * A2.buffer[12], this.x * A2.buffer[1] + this.y * A2.buffer[5] + this.z * A2.buffer[9] + this.w * A2.buffer[13], this.x * A2.buffer[2] + this.y * A2.buffer[6] + this.z * A2.buffer[10] + this.w * A2.buffer[14], this.x * A2.buffer[3] + this.y * A2.buffer[7] + this.z * A2.buffer[11] + this.w * A2.buffer[15]); + } + dot(A2) { + return this.x * A2.x + this.y * A2.y + this.z * A2.z + this.w * A2.w; + } + lerp(A2, Q2) { + return new _I(this.x + (A2.x - this.x) * Q2, this.y + (A2.y - this.y) * Q2, this.z + (A2.z - this.z) * Q2, this.w + (A2.w - this.w) * Q2); + } + magnitude() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + } + distanceTo(A2) { + return Math.sqrt((this.x - A2.x) ** 2 + (this.y - A2.y) ** 2 + (this.z - A2.z) ** 2 + (this.w - A2.w) ** 2); + } + normalize() { + const A2 = this.magnitude(); + return new _I(this.x / A2, this.y / A2, this.z / A2, this.w / A2); + } + flat() { + return [this.x, this.y, this.z, this.w]; + } + clone() { + return new _I(this.x, this.y, this.z, this.w); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var R = class extends d { + constructor(Q2 = void 0) { + super(), this._data = Q2 || new e(), this._position = new A(0, 0, -5), this.update = () => { + this.data.update(this.position, this.rotation); + }, this.screenPointToRay = (Q3, F2) => { + const B2 = new I(Q3, F2, -1, 1), U2 = this._data.projectionMatrix.invert(), l2 = B2.multiply(U2), t2 = this._data.viewMatrix.invert(), d2 = l2.multiply(t2); + return new A(d2.x / d2.w, d2.y / d2.w, d2.z / d2.w).subtract(this.position).normalize(); + }; + } + get data() { + return this._data; + } +}; +var a = class extends F { + constructor() { + super(), this._objects = [], this.addObject = (A2) => { + this.objects.push(A2), this.dispatchEvent(new U(A2)); + }, this.removeObject = (A2) => { + const Q2 = this.objects.indexOf(A2); + if (Q2 < 0) + throw new Error("Object not found in scene"); + this.objects.splice(Q2, 1), this.dispatchEvent(new l(A2)); + }, this.findObject = (A2) => { + for (const Q2 of this.objects) + if (A2(Q2)) + return Q2; + }, this.findObjectOfType = (A2) => { + for (const Q2 of this.objects) + if (Q2 instanceof A2) + return Q2; + }, this.reset = () => { + const A2 = this.objects.slice(); + for (const Q2 of A2) + this.removeObject(Q2); + }, this.reset(); + } + saveToFile(A2 = null) { + if (!document) + return; + if (!A2) { + const Q3 = /* @__PURE__ */ new Date(); + A2 = `scene-${Q3.getFullYear()}-${Q3.getMonth() + 1}-${Q3.getDate()}.splat`; + } + const Q2 = []; + let F2 = 0; + for (const A3 of this.objects) + if (A3.applyRotation(), A3.applyScale(), A3.applyPosition(), A3 instanceof Z) { + const B3 = A3.data.serialize(); + Q2.push(B3), F2 += A3.data.vertexCount; + } + const B2 = new Uint8Array(F2 * V.RowLength); + let U2 = 0; + for (const A3 of Q2) + B2.set(A3, U2), U2 += A3.length; + const l2 = new Blob([B2.buffer], { type: "application/octet-stream" }), t2 = document.createElement("a"); + t2.download = A2, t2.href = URL.createObjectURL(l2), t2.click(); + } + get objects() { + return this._objects; + } +}; +var g = class { + static async LoadAsync(A2, Q2, F2, B2 = false) { + const U2 = await fetch(A2, { mode: "cors", credentials: "omit", cache: B2 ? "force-cache" : "default" }); + if (200 != U2.status) + throw new Error(U2.status + " Unable to load " + U2.url); + const l2 = U2.body.getReader(), t2 = parseInt(U2.headers.get("content-length")), d2 = new Uint8Array(t2); + let n2 = 0; + for (; ; ) { + const { done: A3, value: Q3 } = await l2.read(); + if (A3) + break; + d2.set(Q3, n2), n2 += Q3.length, null == F2 || F2(n2 / t2); + } + const e2 = V.Deserialize(d2), I2 = new Z(e2); + return Q2.addObject(I2), I2; + } + static async LoadFromFileAsync(A2, Q2, F2) { + const B2 = new FileReader(); + let U2 = new Z(); + return B2.onload = (A3) => { + const F3 = new Uint8Array(A3.target.result), B3 = V.Deserialize(F3); + U2 = new Z(B3), Q2.addObject(U2); + }, B2.onprogress = (A3) => { + null == F2 || F2(A3.loaded / A3.total); + }, B2.readAsArrayBuffer(A2), await new Promise((A3) => { + B2.onloadend = () => { + A3(); + }; + }), U2; + } +}; +var i = class { + static async LoadAsync(A2, Q2, F2, B2 = "", U2 = false) { + const l2 = await fetch(A2, { mode: "cors", credentials: "omit", cache: U2 ? "force-cache" : "default" }); + if (200 != l2.status) + throw new Error(l2.status + " Unable to load " + l2.url); + const t2 = l2.body.getReader(), d2 = parseInt(l2.headers.get("content-length")), n2 = new Uint8Array(d2); + let e2 = 0; + for (; ; ) { + const { done: A3, value: Q3 } = await t2.read(); + if (A3) + break; + n2.set(Q3, e2), e2 += Q3.length, null == F2 || F2(e2 / d2); + } + if (112 !== n2[0] || 108 !== n2[1] || 121 !== n2[2] || 10 !== n2[3]) + throw new Error("Invalid PLY file"); + const I2 = new Uint8Array(this._ParsePLYBuffer(n2.buffer, B2)), R2 = V.Deserialize(I2), a2 = new Z(R2); + return Q2.addObject(a2), a2; + } + static async LoadFromFileAsync(A2, Q2, F2, B2 = "") { + const U2 = new FileReader(); + let l2 = new Z(); + return U2.onload = (A3) => { + const F3 = new Uint8Array(this._ParsePLYBuffer(A3.target.result, B2)), U3 = V.Deserialize(F3); + l2 = new Z(U3), Q2.addObject(l2); + }, U2.onprogress = (A3) => { + null == F2 || F2(A3.loaded / A3.total); + }, U2.readAsArrayBuffer(A2), await new Promise((A3) => { + U2.onloadend = () => { + A3(); + }; + }), l2; + } + static _ParsePLYBuffer(F2, B2) { + const U2 = new Uint8Array(F2), l2 = new TextDecoder().decode(U2.slice(0, 10240)), t2 = "end_header\n", d2 = l2.indexOf(t2); + if (d2 < 0) + throw new Error("Unable to read .ply file header"); + const n2 = parseInt(/element vertex (\d+)\n/.exec(l2)[1]); + let Z2 = 0; + const e2 = { double: 8, int: 4, uint: 4, float: 4, short: 2, ushort: 2, uchar: 1 }, I2 = []; + for (const A2 of l2.slice(0, d2).split("\n").filter((A3) => A3.startsWith("property "))) { + const [Q2, F3, B3] = A2.split(" "); + if (I2.push({ name: B3, type: F3, offset: Z2 }), !e2[F3]) + throw new Error(`Unsupported property type: ${F3}`); + Z2 += e2[F3]; + } + const R2 = new DataView(F2, d2 + 11), a2 = new ArrayBuffer(V.RowLength * n2), g2 = Q.FromEuler(new A(Math.PI / 2, 0, 0)); + for (let A2 = 0; A2 < n2; A2++) { + const F3 = new Float32Array(a2, A2 * V.RowLength, 3), U3 = new Float32Array(a2, A2 * V.RowLength + 12, 3), l3 = new Uint8ClampedArray(a2, A2 * V.RowLength + 24, 4), t3 = new Uint8ClampedArray(a2, A2 * V.RowLength + 28, 4); + let d3 = 255, n3 = 0, e3 = 0, i2 = 0; + I2.forEach((Q2) => { + let B3; + switch (Q2.type) { + case "float": + B3 = R2.getFloat32(Q2.offset + A2 * Z2, true); + break; + case "int": + B3 = R2.getInt32(Q2.offset + A2 * Z2, true); + break; + default: + throw new Error(`Unsupported property type: ${Q2.type}`); + } + switch (Q2.name) { + case "x": + F3[0] = B3; + break; + case "y": + F3[1] = B3; + break; + case "z": + F3[2] = B3; + break; + case "scale_0": + U3[0] = Math.exp(B3); + break; + case "scale_1": + U3[1] = Math.exp(B3); + break; + case "scale_2": + U3[2] = Math.exp(B3); + break; + case "red": + l3[0] = B3; + break; + case "green": + l3[1] = B3; + break; + case "blue": + l3[2] = B3; + break; + case "f_dc_0": + l3[0] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_1": + l3[1] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_2": + l3[2] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "f_dc_3": + l3[3] = 255 * (0.5 + this.SH_C0 * B3); + break; + case "opacity": + l3[3] = 1 / (1 + Math.exp(-B3)) * 255; + break; + case "rot_0": + d3 = B3; + break; + case "rot_1": + n3 = B3; + break; + case "rot_2": + e3 = B3; + break; + case "rot_3": + i2 = B3; + } + }); + let W2 = new Q(n3, e3, i2, d3); + switch (B2) { + case "polycam": { + const A3 = F3[1]; + F3[1] = -F3[2], F3[2] = A3, W2 = g2.multiply(W2); + break; + } + case "": + break; + default: + throw new Error(`Unsupported format: ${B2}`); + } + W2 = W2.normalize(), t3[0] = 128 * W2.w + 128, t3[1] = 128 * W2.x + 128, t3[2] = 128 * W2.y + 128, t3[3] = 128 * W2.z + 128; + } + return a2; + } +}; +function W(A2, Q2, F2) { + var B2 = void 0 === Q2 ? null : Q2, U2 = function(A3, Q3) { + var F3 = atob(A3); + if (Q3) { + for (var B3 = new Uint8Array(F3.length), U3 = 0, l3 = F3.length; U3 < l3; ++U3) + B3[U3] = F3.charCodeAt(U3); + return String.fromCharCode.apply(null, new Uint16Array(B3.buffer)); + } + return F3; + }(A2, void 0 !== F2 && F2), l2 = U2.indexOf("\n", 10) + 1, t2 = U2.substring(l2) + (B2 ? "//# sourceMappingURL=" + B2 : ""), d2 = new Blob([t2], { type: "application/javascript" }); + return URL.createObjectURL(d2); +} +function c(A2, Q2, F2) { + var B2; + return function(U2) { + return B2 = B2 || W(A2, Q2, F2), new Worker(B2, U2); + }; +} +i.SH_C0 = 0.28209479177387814; +var C = c("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJdPW5ldyBQcm9taXNlK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hJbmRleCwgY2h1bmtzOiBkZXRhY2hlZENodW5rcyB9LCBbCiAgICAgICAgICBkZXRhY2hlZERlcHRoSW5kZXguYnVmZmVyLAogICAgICAgICAgZGV0YWNoZWRDaHVua3MuYnVmZmVyLAogICAgICBdKTsKICB9OwogIGNvbnN0IHRocm90dGxlZFNvcnQgPSAoKSA9PiB7CiAgICAgIGlmICghcnVubmluZykgewogICAgICAgICAgcnVubmluZyA9IHRydWU7CiAgICAgICAgICBjb25zdCBsYXN0VmlldyA9IHZpZXdQcm9qOwogICAgICAgICAgcnVuU29ydChsYXN0Vmlldyk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgaWYgKGxhc3RWaWV3ICE9PSB2aWV3UHJvaikgewogICAgICAgICAgICAgICAgICB0aHJvdHRsZWRTb3J0KCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zb3J0RGF0YSkgewogICAgICAgICAgc29ydERhdGEgPSBlLmRhdGEuc29ydERhdGE7CiAgICAgICAgICBhbGxvY2F0ZUJ1ZmZlcnMoKTsKICAgICAgfQogICAgICBpZiAoYWxsb2NhdGluZyB8fCAhc29ydERhdGEpCiAgICAgICAgICByZXR1cm47CiAgICAgIGlmIChlLmRhdGEudmlld1Byb2opIHsKICAgICAgICAgIHZpZXdQcm9qID0gZS5kYXRhLnZpZXdQcm9qOwogICAgICAgICAgdGhyb3R0bGVkU29ydCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPVNvcnRXb3JrZXIuanMubWFwCgo=", null, false); +var h = class { + constructor(A2, Q2) { + this._scene = null, this._camera = null, this._started = false, this._initialized = false, this._renderer = A2; + const F2 = A2.gl; + this._program = F2.createProgram(), this._passes = Q2 || []; + const B2 = F2.createShader(F2.VERTEX_SHADER); + F2.shaderSource(B2, this._getVertexSource()), F2.compileShader(B2), F2.getShaderParameter(B2, F2.COMPILE_STATUS) || console.error(F2.getShaderInfoLog(B2)); + const U2 = F2.createShader(F2.FRAGMENT_SHADER); + F2.shaderSource(U2, this._getFragmentSource()), F2.compileShader(U2), F2.getShaderParameter(U2, F2.COMPILE_STATUS) || console.error(F2.getShaderInfoLog(U2)), F2.attachShader(this.program, B2), F2.attachShader(this.program, U2), F2.linkProgram(this.program), F2.getProgramParameter(this.program, F2.LINK_STATUS) || console.error(F2.getProgramInfoLog(this.program)), this.resize = () => { + F2.useProgram(this._program), this._resize(); + }, this.initialize = () => { + console.assert(!this._initialized, "ShaderProgram already initialized"), F2.useProgram(this._program), this._initialize(); + for (const A3 of this.passes) + A3.initialize(this); + this._initialized = true, this._started = true; + }, this.render = (A3, Q3) => { + F2.useProgram(this._program), this._scene === A3 && this._camera === Q3 || (this.dispose(), this._scene = A3, this._camera = Q3, this.initialize()); + for (const A4 of this.passes) + A4.render(); + this._render(); + }, this.dispose = () => { + if (this._initialized) { + F2.useProgram(this._program); + for (const A3 of this.passes) + A3.dispose(); + this._dispose(), this._scene = null, this._camera = null, this._initialized = false; + } + }; + } + get renderer() { + return this._renderer; + } + get scene() { + return this._scene; + } + get camera() { + return this._camera; + } + get program() { + return this._program; + } + get passes() { + return this._passes; + } + get started() { + return this._started; + } +}; +var s = c("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJ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sCiAgICAgICAgICBzY2FsZXM6IHNwbGF0LnNjYWxlcy5idWZmZXIsCiAgICAgICAgICBjb2xvcnM6IHNwbGF0LmNvbG9ycy5idWZmZXIsCiAgICAgICAgICBzZWxlY3Rpb246IHNwbGF0LnNlbGVjdGlvbi5idWZmZXIsCiAgICAgIH07CiAgICAgIHNlbGYucG9zdE1lc3NhZ2UoeyByZXNwb25zZTogcmVzcG9uc2UgfSwgWwogICAgICAgICAgcmVzcG9uc2UuZGF0YS5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFBvc2l0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFJvdGF0aW9ucy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS53b3JsZFNjYWxlcy5idWZmZXIsCiAgICAgICAgICByZXNwb25zZS5wb3NpdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5yb3RhdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5zY2FsZXMsCiAgICAgICAgICByZXNwb25zZS5jb2xvcnMsCiAgICAgICAgICByZXNwb25zZS5zZWxlY3Rpb24sCiAgICAgIF0pOwogICAgICBydW5uaW5nID0gZmFsc2U7CiAgfTsKICBjb25zdCBwYWNrVGhyb3R0bGVkID0gKCkgPT4gewogICAgICBpZiAodXBkYXRlUXVldWUubGVuZ3RoID09PSAwKQogICAgICAgICAgcmV0dXJuOwogICAgICBpZiAoIXJ1bm5pbmcpIHsKICAgICAgICAgIHJ1bm5pbmcgPSB0cnVlOwogICAgICAgICAgY29uc3Qgc3BsYXQgPSB1cGRhdGVRdWV1ZS5zaGlmdCgpOwogICAgICAgICAgcGFjayhzcGxhdCk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zcGxhdCkgewogICAgICAgICAgY29uc3Qgc3BsYXQgPSBlLmRhdGEuc3BsYXQ7CiAgICAgICAgICBmb3IgKGNvbnN0IFtpbmRleCwgZXhpc3RpbmddIG9mIHVwZGF0ZVF1ZXVlLmVudHJpZXMoKSkgewogICAgICAgICAgICAgIGlmIChleGlzdGluZy5vZmZzZXQgPT09IHNwbGF0Lm9mZnNldCkgewogICAgICAgICAgICAgICAgICB1cGRhdGVRdWV1ZVtpbmRleF0gPSBzcGxhdDsKICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHVwZGF0ZVF1ZXVlLnB1c2goc3BsYXQpOwogICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPURhdGFXb3JrZXIuanMubWFwCgo=", null, false); +var o = function(A2 = {}) { + var Q2, F2, B2 = A2; + B2.ready = new Promise((A3, B3) => { + Q2 = A3, F2 = B3; + }); + var U2, l2 = Object.assign({}, B2), t2 = ""; + t2 = 0 !== (t2 = self.location.href).indexOf("blob:") ? t2.substr(0, t2.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", U2 = (A3) => { + var Q3 = new XMLHttpRequest(); + return Q3.open("GET", A3, false), Q3.responseType = "arraybuffer", Q3.send(null), new Uint8Array(Q3.response); + }, B2.print || console.log.bind(console); + var d2, n2, V2 = B2.printErr || console.error.bind(console); + function Z2(A3) { + if (X2(A3)) + return function(A4) { + for (var Q3 = atob(A4), F3 = new Uint8Array(Q3.length), B3 = 0; B3 < Q3.length; ++B3) + F3[B3] = Q3.charCodeAt(B3); + return F3; + }(A3.slice(G2.length)); + } + Object.assign(B2, l2), l2 = null, B2.arguments && B2.arguments, B2.thisProgram && B2.thisProgram, B2.quit && B2.quit, B2.wasmBinary && (d2 = B2.wasmBinary), "object" != typeof WebAssembly && E2("no native wasm support detected"); + var e2, I2, R2, a2, g2, i2, W2, c2, C2 = false; + function h2() { + var A3 = n2.buffer; + B2.HEAP8 = e2 = new Int8Array(A3), B2.HEAP16 = R2 = new Int16Array(A3), B2.HEAPU8 = I2 = new Uint8Array(A3), B2.HEAPU16 = a2 = new Uint16Array(A3), B2.HEAP32 = g2 = new Int32Array(A3), B2.HEAPU32 = i2 = new Uint32Array(A3), B2.HEAPF32 = W2 = new Float32Array(A3), B2.HEAPF64 = c2 = new Float64Array(A3); + } + var s2 = [], o2 = [], J2 = [], b2 = 0, r2 = null; + function E2(A3) { + var _a; + (_a = B2.onAbort) == null ? void 0 : _a.call(B2, A3), V2(A3 = "Aborted(" + A3 + ")"), C2 = true, A3 += ". Build with -sASSERTIONS for more info."; + var Q3 = new WebAssembly.RuntimeError(A3); + throw F2(Q3), Q3; + } + var m2, N2, G2 = "data:application/octet-stream;base64,", X2 = (A3) => A3.startsWith(G2); + function Y2(A3) { + return Promise.resolve().then(() => function(A4) { + if (A4 == m2 && d2) + return new Uint8Array(d2); + var Q3 = Z2(A4); + if (Q3) + return Q3; + if (U2) + return U2(A4); + throw "both async and sync fetching of the wasm failed"; + }(A3)); + } + function y2(A3, Q3, F3, B3) { + return function(A4, Q4, F4) { + return Y2(A4).then((A5) => WebAssembly.instantiate(A5, Q4)).then((A5) => A5).then(F4, (A5) => { + V2(`failed to asynchronously prepare wasm: ${A5}`), E2(A5); + }); + }(Q3, F3, B3); + } + X2(m2 = "data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNA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AsAAPwKAABOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQDMDAAAaAsAAFwLAAAAAAAA3AsAAAIAAAADAAAABAAAAAUAAAAGAAAATjEwX19jeHhhYml2MTIzX19mdW5kYW1lbnRhbF90eXBlX2luZm9FAMwMAAC0CwAA/AoAAHYAAACgCwAA6AsAAGIAAACgCwAA9AsAAGMAAACgCwAAAAwAAGgAAACgCwAADAwAAGEAAACgCwAAGAwAAHMAAACgCwAAJAwAAHQAAACgCwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=") || (N2 = m2, m2 = B2.locateFile ? B2.locateFile(N2, t2) : t2 + N2); + var p = (A3) => { + for (; A3.length > 0; ) + A3.shift()(B2); + }; + B2.noExitRuntime; + var S, k, u = (A3) => { + for (var Q3 = "", F3 = A3; I2[F3]; ) + Q3 += S[I2[F3++]]; + return Q3; + }, T = {}, D = {}, H = (A3) => { + throw new k(A3); + }; + function w(A3, Q3, F3 = {}) { + if (!("argPackAdvance" in Q3)) + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + return function(A4, Q4, F4 = {}) { + var B3 = Q4.name; + if (A4 || H(`type "${B3}" must have a positive integer typeid pointer`), D.hasOwnProperty(A4)) { + if (F4.ignoreDuplicateRegistrations) + return; + H(`Cannot register type '${B3}' twice`); + } + if (D[A4] = Q4, T.hasOwnProperty(A4)) { + var U3 = T[A4]; + delete T[A4], U3.forEach((A5) => A5()); + } + }(A3, Q3, F3); + } + function x() { + this.allocated = [void 0], this.freelist = []; + } + var f = new x(), M = () => { + for (var A3 = 0, Q3 = f.reserved; Q3 < f.allocated.length; ++Q3) + void 0 !== f.allocated[Q3] && ++A3; + return A3; + }, z = (A3) => (A3 || H("Cannot use deleted val. handle = " + A3), f.get(A3).value), v = (A3) => { + switch (A3) { + case void 0: + return 1; + case null: + return 2; + case true: + return 3; + case false: + return 4; + default: + return f.allocate({ refcount: 1, value: A3 }); + } + }; + function K(A3) { + return this.fromWireType(g2[A3 >> 2]); + } + var j = (A3, Q3) => { + switch (Q3) { + case 4: + return function(A4) { + return this.fromWireType(W2[A4 >> 2]); + }; + case 8: + return function(A4) { + return this.fromWireType(c2[A4 >> 3]); + }; + default: + throw new TypeError(`invalid float width (${Q3}): ${A3}`); + } + }, O = (A3, Q3, F3) => { + switch (Q3) { + case 1: + return F3 ? (A4) => e2[A4 >> 0] : (A4) => I2[A4 >> 0]; + case 2: + return F3 ? (A4) => R2[A4 >> 1] : (A4) => a2[A4 >> 1]; + case 4: + return F3 ? (A4) => g2[A4 >> 2] : (A4) => i2[A4 >> 2]; + default: + throw new TypeError(`invalid integer width (${Q3}): ${A3}`); + } + }; + function L(A3) { + return this.fromWireType(i2[A3 >> 2]); + } + var P = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, _ = (A3, Q3) => A3 ? ((A4, Q4, F3) => { + for (var B3 = Q4 + F3, U3 = Q4; A4[U3] && !(U3 >= B3); ) + ++U3; + if (U3 - Q4 > 16 && A4.buffer && P) + return P.decode(A4.subarray(Q4, U3)); + for (var l3 = ""; Q4 < U3; ) { + var t3 = A4[Q4++]; + if (128 & t3) { + var d3 = 63 & A4[Q4++]; + if (192 != (224 & t3)) { + var n3 = 63 & A4[Q4++]; + if ((t3 = 224 == (240 & t3) ? (15 & t3) << 12 | d3 << 6 | n3 : (7 & t3) << 18 | d3 << 12 | n3 << 6 | 63 & A4[Q4++]) < 65536) + l3 += String.fromCharCode(t3); + else { + var V3 = t3 - 65536; + l3 += String.fromCharCode(55296 | V3 >> 10, 56320 | 1023 & V3); + } + } else + l3 += String.fromCharCode((31 & t3) << 6 | d3); + } else + l3 += String.fromCharCode(t3); + } + return l3; + })(I2, A3, Q3) : "", q = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, $ = (A3, Q3) => { + for (var F3 = A3, B3 = F3 >> 1, U3 = B3 + Q3 / 2; !(B3 >= U3) && a2[B3]; ) + ++B3; + if ((F3 = B3 << 1) - A3 > 32 && q) + return q.decode(I2.subarray(A3, F3)); + for (var l3 = "", t3 = 0; !(t3 >= Q3 / 2); ++t3) { + var d3 = R2[A3 + 2 * t3 >> 1]; + if (0 == d3) + break; + l3 += String.fromCharCode(d3); + } + return l3; + }, AA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 2) + return 0; + for (var B3 = Q3, U3 = (F3 -= 2) < 2 * A3.length ? F3 / 2 : A3.length, l3 = 0; l3 < U3; ++l3) { + var t3 = A3.charCodeAt(l3); + R2[Q3 >> 1] = t3, Q3 += 2; + } + return R2[Q3 >> 1] = 0, Q3 - B3; + }, QA = (A3) => 2 * A3.length, FA = (A3, Q3) => { + for (var F3 = 0, B3 = ""; !(F3 >= Q3 / 4); ) { + var U3 = g2[A3 + 4 * F3 >> 2]; + if (0 == U3) + break; + if (++F3, U3 >= 65536) { + var l3 = U3 - 65536; + B3 += String.fromCharCode(55296 | l3 >> 10, 56320 | 1023 & l3); + } else + B3 += String.fromCharCode(U3); + } + return B3; + }, BA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 4) + return 0; + for (var B3 = Q3, U3 = B3 + F3 - 4, l3 = 0; l3 < A3.length; ++l3) { + var t3 = A3.charCodeAt(l3); + if (t3 >= 55296 && t3 <= 57343 && (t3 = 65536 + ((1023 & t3) << 10) | 1023 & A3.charCodeAt(++l3)), g2[Q3 >> 2] = t3, (Q3 += 4) + 4 > U3) + break; + } + return g2[Q3 >> 2] = 0, Q3 - B3; + }, UA = (A3) => { + for (var Q3 = 0, F3 = 0; F3 < A3.length; ++F3) { + var B3 = A3.charCodeAt(F3); + B3 >= 55296 && B3 <= 57343 && ++F3, Q3 += 4; + } + return Q3; + }, lA = (A3) => { + var Q3 = (A3 - n2.buffer.byteLength + 65535) / 65536; + try { + return n2.grow(Q3), h2(), 1; + } catch (A4) { + } + }; + (() => { + for (var A3 = new Array(256), Q3 = 0; Q3 < 256; ++Q3) + A3[Q3] = String.fromCharCode(Q3); + S = A3; + })(), k = B2.BindingError = class extends Error { + constructor(A3) { + super(A3), this.name = "BindingError"; + } + }, B2.InternalError = class extends Error { + constructor(A3) { + super(A3), this.name = "InternalError"; + } + }, Object.assign(x.prototype, { get(A3) { + return this.allocated[A3]; + }, has(A3) { + return void 0 !== this.allocated[A3]; + }, allocate(A3) { + var Q3 = this.freelist.pop() || this.allocated.length; + return this.allocated[Q3] = A3, Q3; + }, free(A3) { + this.allocated[A3] = void 0, this.freelist.push(A3); + } }), f.allocated.push({ value: void 0 }, { value: null }, { value: true }, { value: false }), f.reserved = f.allocated.length, B2.count_emval_handles = M; + var tA = { f: (A3, Q3, F3, B3, U3) => { + }, i: (A3, Q3, F3, B3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: function(A4) { + return !!A4; + }, toWireType: function(A4, Q4) { + return Q4 ? F3 : B3; + }, argPackAdvance: 8, readValueFromPointer: function(A4) { + return this.fromWireType(I2[A4]); + }, destructorFunction: null }); + }, h: (A3, Q3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: (A4) => { + var Q4 = z(A4); + return ((A5) => { + A5 >= f.reserved && 0 == --f.get(A5).refcount && f.free(A5); + })(A4), Q4; + }, toWireType: (A4, Q4) => v(Q4), argPackAdvance: 8, readValueFromPointer: K, destructorFunction: null }); + }, e: (A3, Q3, F3) => { + w(A3, { name: Q3 = u(Q3), fromWireType: (A4) => A4, toWireType: (A4, Q4) => Q4, argPackAdvance: 8, readValueFromPointer: j(Q3, F3), destructorFunction: null }); + }, b: (A3, Q3, F3, B3, U3) => { + Q3 = u(Q3); + var l3 = (A4) => A4; + if (0 === B3) { + var t3 = 32 - 8 * F3; + l3 = (A4) => A4 << t3 >>> t3; + } + var d3 = Q3.includes("unsigned"); + w(A3, { name: Q3, fromWireType: l3, toWireType: d3 ? function(A4, Q4) { + return this.name, Q4 >>> 0; + } : function(A4, Q4) { + return this.name, Q4; + }, argPackAdvance: 8, readValueFromPointer: O(Q3, F3, 0 !== B3), destructorFunction: null }); + }, a: (A3, Q3, F3) => { + var B3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][Q3]; + function U3(A4) { + var Q4 = i2[A4 >> 2], F4 = i2[A4 + 4 >> 2]; + return new B3(e2.buffer, F4, Q4); + } + w(A3, { name: F3 = u(F3), fromWireType: U3, argPackAdvance: 8, readValueFromPointer: U3 }, { ignoreDuplicateRegistrations: true }); + }, d: (A3, Q3) => { + var F3 = "std::string" === (Q3 = u(Q3)); + w(A3, { name: Q3, fromWireType(A4) { + var Q4, B3 = i2[A4 >> 2], U3 = A4 + 4; + if (F3) + for (var l3 = U3, t3 = 0; t3 <= B3; ++t3) { + var d3 = U3 + t3; + if (t3 == B3 || 0 == I2[d3]) { + var n3 = _(l3, d3 - l3); + void 0 === Q4 ? Q4 = n3 : (Q4 += String.fromCharCode(0), Q4 += n3), l3 = d3 + 1; + } + } + else { + var V3 = new Array(B3); + for (t3 = 0; t3 < B3; ++t3) + V3[t3] = String.fromCharCode(I2[U3 + t3]); + Q4 = V3.join(""); + } + return ZA(A4), Q4; + }, toWireType(A4, Q4) { + var B3; + Q4 instanceof ArrayBuffer && (Q4 = new Uint8Array(Q4)); + var U3 = "string" == typeof Q4; + U3 || Q4 instanceof Uint8Array || Q4 instanceof Uint8ClampedArray || Q4 instanceof Int8Array || H("Cannot pass non-string to std::string"), B3 = F3 && U3 ? ((A5) => { + for (var Q5 = 0, F4 = 0; F4 < A5.length; ++F4) { + var B4 = A5.charCodeAt(F4); + B4 <= 127 ? Q5++ : B4 <= 2047 ? Q5 += 2 : B4 >= 55296 && B4 <= 57343 ? (Q5 += 4, ++F4) : Q5 += 3; + } + return Q5; + })(Q4) : Q4.length; + var l3 = VA(4 + B3 + 1), t3 = l3 + 4; + if (i2[l3 >> 2] = B3, F3 && U3) + ((A5, Q5, F4, B4) => { + if (!(B4 > 0)) + return 0; + for (var U4 = F4 + B4 - 1, l4 = 0; l4 < A5.length; ++l4) { + var t4 = A5.charCodeAt(l4); + if (t4 >= 55296 && t4 <= 57343 && (t4 = 65536 + ((1023 & t4) << 10) | 1023 & A5.charCodeAt(++l4)), t4 <= 127) { + if (F4 >= U4) + break; + Q5[F4++] = t4; + } else if (t4 <= 2047) { + if (F4 + 1 >= U4) + break; + Q5[F4++] = 192 | t4 >> 6, Q5[F4++] = 128 | 63 & t4; + } else if (t4 <= 65535) { + if (F4 + 2 >= U4) + break; + Q5[F4++] = 224 | t4 >> 12, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } else { + if (F4 + 3 >= U4) + break; + Q5[F4++] = 240 | t4 >> 18, Q5[F4++] = 128 | t4 >> 12 & 63, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } + } + Q5[F4] = 0; + })(Q4, I2, t3, B3 + 1); + else if (U3) + for (var d3 = 0; d3 < B3; ++d3) { + var n3 = Q4.charCodeAt(d3); + n3 > 255 && (ZA(t3), H("String has UTF-16 code units that do not fit in 8 bits")), I2[t3 + d3] = n3; + } + else + for (d3 = 0; d3 < B3; ++d3) + I2[t3 + d3] = Q4[d3]; + return null !== A4 && A4.push(ZA, l3), l3; + }, argPackAdvance: 8, readValueFromPointer: L, destructorFunction(A4) { + ZA(A4); + } }); + }, c: (A3, Q3, F3) => { + var B3, U3, l3, t3, d3; + F3 = u(F3), 2 === Q3 ? (B3 = $, U3 = AA, t3 = QA, l3 = () => a2, d3 = 1) : 4 === Q3 && (B3 = FA, U3 = BA, t3 = UA, l3 = () => i2, d3 = 2), w(A3, { name: F3, fromWireType: (A4) => { + for (var F4, U4 = i2[A4 >> 2], t4 = l3(), n3 = A4 + 4, V3 = 0; V3 <= U4; ++V3) { + var Z3 = A4 + 4 + V3 * Q3; + if (V3 == U4 || 0 == t4[Z3 >> d3]) { + var e3 = B3(n3, Z3 - n3); + void 0 === F4 ? F4 = e3 : (F4 += String.fromCharCode(0), F4 += e3), n3 = Z3 + Q3; + } + } + return ZA(A4), F4; + }, toWireType: (A4, B4) => { + "string" != typeof B4 && H(`Cannot pass non-string to C++ string type ${F3}`); + var l4 = t3(B4), n3 = VA(4 + l4 + Q3); + return i2[n3 >> 2] = l4 >> d3, U3(B4, n3 + 4, l4 + Q3), null !== A4 && A4.push(ZA, n3), n3; + }, argPackAdvance: 8, readValueFromPointer: K, destructorFunction(A4) { + ZA(A4); + } }); + }, j: (A3, Q3) => { + w(A3, { isVoid: true, name: Q3 = u(Q3), argPackAdvance: 0, fromWireType: () => { + }, toWireType: (A4, Q4) => { + } }); + }, g: (A3) => { + var Q3 = I2.length, F3 = 2147483648; + if ((A3 >>>= 0) > F3) + return false; + for (var B3, U3, l3 = 1; l3 <= 4; l3 *= 2) { + var t3 = Q3 * (1 + 0.2 / l3); + t3 = Math.min(t3, A3 + 100663296); + var d3 = Math.min(F3, (B3 = Math.max(A3, t3)) + ((U3 = 65536) - B3 % U3) % U3); + if (lA(d3)) + return true; + } + return false; + } }, dA = function() { + var _a; + var A3 = { a: tA }; + function Q3(A4, Q4) { + var F3; + return dA = A4.exports, n2 = dA.k, h2(), F3 = dA.l, o2.unshift(F3), function(A5) { + var _a2; + if (b2--, (_a2 = B2.monitorRunDependencies) == null ? void 0 : _a2.call(B2, b2), 0 == b2 && r2) { + var Q5 = r2; + r2 = null, Q5(); + } + }(), dA; + } + if (b2++, (_a = B2.monitorRunDependencies) == null ? void 0 : _a.call(B2, b2), B2.instantiateWasm) + try { + return B2.instantiateWasm(A3, Q3); + } catch (A4) { + V2(`Module.instantiateWasm callback failed with error: ${A4}`), F2(A4); + } + return y2(0, m2, A3, function(A4) { + Q3(A4.instance); + }).catch(F2), {}; + }(); + B2._pack = (A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3) => (B2._pack = dA.m)(A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3); + var nA, VA = B2._malloc = (A3) => (VA = B2._malloc = dA.o)(A3), ZA = B2._free = (A3) => (ZA = B2._free = dA.p)(A3); + function eA() { + function A3() { + nA || (nA = true, B2.calledRun = true, C2 || (p(o2), Q2(B2), B2.onRuntimeInitialized && B2.onRuntimeInitialized(), function() { + if (B2.postRun) + for ("function" == typeof B2.postRun && (B2.postRun = [B2.postRun]); B2.postRun.length; ) + A4 = B2.postRun.shift(), J2.unshift(A4); + var A4; + p(J2); + }())); + } + b2 > 0 || (function() { + if (B2.preRun) + for ("function" == typeof B2.preRun && (B2.preRun = [B2.preRun]); B2.preRun.length; ) + A4 = B2.preRun.shift(), s2.unshift(A4); + var A4; + p(s2); + }(), b2 > 0 || (B2.setStatus ? (B2.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + B2.setStatus(""); + }, 1), A3(); + }, 1)) : A3())); + } + if (r2 = function A3() { + nA || eA(), nA || (r2 = A3); + }, B2.preInit) + for ("function" == typeof B2.preInit && (B2.preInit = [B2.preInit]); B2.preInit.length > 0; ) + B2.preInit.pop()(); + return eA(), A2.ready; +}; +var J = class { + constructor(A2) { + this.dataChanged = false, this.transformsChanged = false, this._updating = /* @__PURE__ */ new Set(), this._dirty = /* @__PURE__ */ new Set(); + let Q2 = 0, F2 = 0; + this._splatIndices = /* @__PURE__ */ new Map(), this._offsets = /* @__PURE__ */ new Map(); + const B2 = /* @__PURE__ */ new Map(); + for (const U3 of A2.objects) + U3 instanceof Z && (this._splatIndices.set(U3, F2), this._offsets.set(U3, Q2), B2.set(Q2, U3), Q2 += U3.data.vertexCount, F2++); + this._vertexCount = Q2, this._width = 2048, this._height = Math.ceil(2 * this.vertexCount / this.width), this._data = new Uint32Array(this.width * this.height * 4), this._transformsWidth = 5, this._transformsHeight = B2.size, this._transforms = new Float32Array(this._transformsWidth * this._transformsHeight * 4), this._transformIndicesWidth = 1024, this._transformIndicesHeight = Math.ceil(this.vertexCount / this._transformIndicesWidth), this._transformIndices = new Uint32Array(this._transformIndicesWidth * this._transformIndicesHeight), this._positions = new Float32Array(3 * this.vertexCount), this._rotations = new Float32Array(4 * this.vertexCount), this._scales = new Float32Array(3 * this.vertexCount), this._worker = new s(); + const U2 = (A3) => { + const Q3 = this._splatIndices.get(A3); + this._transforms.set(A3.transform.buffer, 20 * Q3), this._transforms[20 * Q3 + 16] = A3.selected ? 1 : 0, A3.positionChanged = false, A3.rotationChanged = false, A3.scaleChanged = false, A3.selectedChanged = false, this.transformsChanged = true; + }; + let l2; + this._worker.onmessage = (A3) => { + if (A3.data.response) { + const Q3 = A3.data.response, F3 = B2.get(Q3.offset); + U2(F3); + const l3 = this._splatIndices.get(F3); + for (let A4 = 0; A4 < F3.data.vertexCount; A4++) + this._transformIndices[Q3.offset + A4] = l3; + this._data.set(Q3.data, 8 * Q3.offset), F3.data.reattach(Q3.positions, Q3.rotations, Q3.scales, Q3.colors, Q3.selection), this._positions.set(Q3.worldPositions, 3 * Q3.offset), this._rotations.set(Q3.worldRotations, 4 * Q3.offset), this._scales.set(Q3.worldScales, 3 * Q3.offset), this._updating.delete(F3), F3.selectedChanged = false, this.dataChanged = true; + } + }, async function() { + l2 = await o(); + }(); + const t2 = (A3) => { + if (!l2) + return void async function() { + for (; !l2; ) + await new Promise((A4) => setTimeout(A4, 0)); + }().then(() => { + t2(A3); + }); + U2(A3); + const Q3 = l2._malloc(3 * A3.data.vertexCount * 4), F3 = l2._malloc(4 * A3.data.vertexCount * 4), B3 = l2._malloc(3 * A3.data.vertexCount * 4), d3 = l2._malloc(4 * A3.data.vertexCount), n2 = l2._malloc(A3.data.vertexCount), V2 = l2._malloc(8 * A3.data.vertexCount * 4), Z2 = l2._malloc(3 * A3.data.vertexCount * 4), e2 = l2._malloc(4 * A3.data.vertexCount * 4), I2 = l2._malloc(3 * A3.data.vertexCount * 4); + l2.HEAPF32.set(A3.data.positions, Q3 / 4), l2.HEAPF32.set(A3.data.rotations, F3 / 4), l2.HEAPF32.set(A3.data.scales, B3 / 4), l2.HEAPU8.set(A3.data.colors, d3), l2.HEAPU8.set(A3.data.selection, n2), l2._pack(A3.selected, A3.data.vertexCount, Q3, F3, B3, d3, n2, V2, Z2, e2, I2); + const R2 = new Uint32Array(l2.HEAPU32.buffer, V2, 8 * A3.data.vertexCount), a2 = new Float32Array(l2.HEAPF32.buffer, Z2, 3 * A3.data.vertexCount), g2 = new Float32Array(l2.HEAPF32.buffer, e2, 4 * A3.data.vertexCount), i2 = new Float32Array(l2.HEAPF32.buffer, I2, 3 * A3.data.vertexCount), W2 = this._splatIndices.get(A3), c2 = this._offsets.get(A3); + for (let Q4 = 0; Q4 < A3.data.vertexCount; Q4++) + this._transformIndices[c2 + Q4] = W2; + this._data.set(R2, 8 * c2), this._positions.set(a2, 3 * c2), this._rotations.set(g2, 4 * c2), this._scales.set(i2, 3 * c2), l2._free(Q3), l2._free(F3), l2._free(B3), l2._free(d3), l2._free(n2), l2._free(V2), l2._free(Z2), l2._free(e2), l2._free(I2), this.dataChanged = true; + }, d2 = (A3) => { + if ((A3.positionChanged || A3.rotationChanged || A3.scaleChanged || A3.selectedChanged) && U2(A3), !A3.data.changed || A3.data.detached) + return; + const Q3 = { position: new Float32Array(A3.position.flat()), rotation: new Float32Array(A3.rotation.flat()), scale: new Float32Array(A3.scale.flat()), selected: A3.selected, vertexCount: A3.data.vertexCount, positions: A3.data.positions, rotations: A3.data.rotations, scales: A3.data.scales, colors: A3.data.colors, selection: A3.data.selection, offset: this._offsets.get(A3) }; + this._worker.postMessage({ splat: Q3 }, [Q3.position.buffer, Q3.rotation.buffer, Q3.scale.buffer, Q3.positions.buffer, Q3.rotations.buffer, Q3.scales.buffer, Q3.colors.buffer, Q3.selection.buffer]), this._updating.add(A3), A3.data.detached = true; + }; + this.getSplat = (A3) => { + let Q3 = null; + for (const [F3, B3] of this._offsets) { + if (!(A3 >= B3)) + break; + Q3 = F3; + } + return Q3; + }, this.getLocalIndex = (A3, Q3) => Q3 - this._offsets.get(A3), this.markDirty = (A3) => { + this._dirty.add(A3); + }, this.rebuild = () => { + for (const A3 of this._dirty) + d2(A3); + this._dirty.clear(); + }, this.dispose = () => { + this._worker.terminate(); + }; + for (const A3 of this._splatIndices.keys()) + t2(A3); + } + get offsets() { + return this._offsets; + } + get data() { + return this._data; + } + get width() { + return this._width; + } + get height() { + return this._height; + } + get transforms() { + return this._transforms; + } + get transformsWidth() { + return this._transformsWidth; + } + get transformsHeight() { + return this._transformsHeight; + } + get transformIndices() { + return this._transformIndices; + } + get transformIndicesWidth() { + return this._transformIndicesWidth; + } + get transformIndicesHeight() { + return this._transformIndicesHeight; + } + get positions() { + return this._positions; + } + get rotations() { + return this._rotations; + } + get scales() { + return this._scales; + } + get vertexCount() { + return this._vertexCount; + } + get needsRebuild() { + return this._dirty.size > 0; + } + get updating() { + return this._updating.size > 0; + } +}; +var b = class { + constructor(A2 = 0, Q2 = 0, F2 = 0, B2 = 255) { + this.r = A2, this.g = Q2, this.b = F2, this.a = B2; + } + flat() { + return [this.r, this.g, this.b, this.a]; + } + flatNorm() { + return [this.r / 255, this.g / 255, this.b / 255, this.a / 255]; + } + toHexString() { + return "#" + this.flat().map((A2) => A2.toString(16).padStart(2, "0")).join(""); + } + toString() { + return `[${this.flat().join(", ")}]`; + } +}; +var r = class extends h { + constructor(A2, Q2) { + super(A2, Q2), this._outlineThickness = 10, this._outlineColor = new b(255, 165, 0, 255), this._renderData = null, this._depthIndex = null, this._chunks = null, this._splatTexture = null; + const F2 = A2.canvas, B2 = A2.gl; + let U2, l2, t2, d2, n2, V2, e2, I2, R2, a2, g2, i2, W2, c2, h2, s2; + this._resize = () => { + this._camera && (this._camera.data.setSize(F2.width, F2.height), this._camera.update(), l2 = B2.getUniformLocation(this.program, "projection"), B2.uniformMatrix4fv(l2, false, this._camera.data.projectionMatrix.buffer), t2 = B2.getUniformLocation(this.program, "viewport"), B2.uniform2fv(t2, new Float32Array([F2.width, F2.height]))); + }; + const o2 = () => { + U2 = new C(), U2.onmessage = (A3) => { + if (A3.data.depthIndex) { + const { depthIndex: Q3, chunks: F3 } = A3.data; + this._depthIndex = Q3, this._chunks = F3, B2.bindBuffer(B2.ARRAY_BUFFER, s2), B2.bufferData(B2.ARRAY_BUFFER, Q3, B2.STATIC_DRAW); + } + }; + }; + this._initialize = () => { + if (this._scene && this._camera) { + this._resize(), this._scene.addEventListener("objectAdded", r2), this._scene.addEventListener("objectRemoved", E2); + for (const A3 of this._scene.objects) + A3 instanceof Z && A3.addEventListener("objectChanged", m2); + this._renderData = new J(this._scene), d2 = B2.getUniformLocation(this.program, "focal"), B2.uniform2fv(d2, new Float32Array([this._camera.data.fx, this._camera.data.fy])), n2 = B2.getUniformLocation(this.program, "view"), B2.uniformMatrix4fv(n2, false, this._camera.data.viewMatrix.buffer), R2 = B2.getUniformLocation(this.program, "outlineThickness"), B2.uniform1f(R2, this.outlineThickness), a2 = B2.getUniformLocation(this.program, "outlineColor"), B2.uniform4fv(a2, new Float32Array(this.outlineColor.flatNorm())), this._splatTexture = B2.createTexture(), V2 = B2.getUniformLocation(this.program, "u_texture"), B2.uniform1i(V2, 0), W2 = B2.createTexture(), e2 = B2.getUniformLocation(this.program, "u_transforms"), B2.uniform1i(e2, 1), c2 = B2.createTexture(), I2 = B2.getUniformLocation(this.program, "u_transformIndices"), B2.uniform1i(I2, 2), h2 = B2.createBuffer(), B2.bindBuffer(B2.ARRAY_BUFFER, h2), B2.bufferData(B2.ARRAY_BUFFER, new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]), B2.STATIC_DRAW), g2 = B2.getAttribLocation(this.program, "position"), B2.enableVertexAttribArray(g2), B2.vertexAttribPointer(g2, 2, B2.FLOAT, false, 0, 0), s2 = B2.createBuffer(), i2 = B2.getAttribLocation(this.program, "index"), B2.enableVertexAttribArray(i2), B2.bindBuffer(B2.ARRAY_BUFFER, s2), o2(); + } else + console.error("Cannot render without scene and camera"); + }; + const r2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && Q3.object.addEventListener("objectChanged", m2), this.dispose(); + }, E2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && Q3.object.removeEventListener("objectChanged", m2), this.dispose(); + }, m2 = (A3) => { + const Q3 = A3; + Q3.object instanceof Z && this._renderData && this._renderData.markDirty(Q3.object); + }; + this._render = () => { + if (this._scene && this._camera && this.renderData) { + if (this._camera.update(), U2.postMessage({ viewProj: this._camera.data.viewProj }), this.renderData.needsRebuild && this.renderData.rebuild(), this.renderData.dataChanged || this.renderData.transformsChanged) { + this.renderData.dataChanged && (B2.activeTexture(B2.TEXTURE0), B2.bindTexture(B2.TEXTURE_2D, this.splatTexture), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.RGBA32UI, this.renderData.width, this.renderData.height, 0, B2.RGBA_INTEGER, B2.UNSIGNED_INT, this.renderData.data)), this.renderData.transformsChanged && (B2.activeTexture(B2.TEXTURE1), B2.bindTexture(B2.TEXTURE_2D, W2), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.RGBA32F, this.renderData.transformsWidth, this.renderData.transformsHeight, 0, B2.RGBA, B2.FLOAT, this.renderData.transforms), B2.activeTexture(B2.TEXTURE2), B2.bindTexture(B2.TEXTURE_2D, c2), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_S, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_WRAP_T, B2.CLAMP_TO_EDGE), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MIN_FILTER, B2.NEAREST), B2.texParameteri(B2.TEXTURE_2D, B2.TEXTURE_MAG_FILTER, B2.NEAREST), B2.texImage2D(B2.TEXTURE_2D, 0, B2.R32UI, this.renderData.transformIndicesWidth, this.renderData.transformIndicesHeight, 0, B2.RED_INTEGER, B2.UNSIGNED_INT, this.renderData.transformIndices)); + const A3 = new Float32Array(this.renderData.positions.slice().buffer), Q3 = new Float32Array(this.renderData.transforms.slice().buffer), F3 = new Uint32Array(this.renderData.transformIndices.slice().buffer); + U2.postMessage({ sortData: { positions: A3, transforms: Q3, transformIndices: F3, vertexCount: this.renderData.vertexCount } }, [A3.buffer, Q3.buffer, F3.buffer]), this.renderData.dataChanged = false, this.renderData.transformsChanged = false; + } + B2.viewport(0, 0, F2.width, F2.height), B2.clearColor(0, 0, 0, 0), B2.clear(B2.COLOR_BUFFER_BIT), B2.disable(B2.DEPTH_TEST), B2.enable(B2.BLEND), B2.blendFuncSeparate(B2.ONE_MINUS_DST_ALPHA, B2.ONE, B2.ONE_MINUS_DST_ALPHA, B2.ONE), B2.blendEquationSeparate(B2.FUNC_ADD, B2.FUNC_ADD), B2.uniformMatrix4fv(l2, false, this._camera.data.projectionMatrix.buffer), B2.uniformMatrix4fv(n2, false, this._camera.data.viewMatrix.buffer), B2.bindBuffer(B2.ARRAY_BUFFER, h2), B2.vertexAttribPointer(g2, 2, B2.FLOAT, false, 0, 0), B2.bindBuffer(B2.ARRAY_BUFFER, s2), B2.vertexAttribIPointer(i2, 1, B2.INT, 0, 0), B2.vertexAttribDivisor(i2, 1), B2.drawArraysInstanced(B2.TRIANGLE_FAN, 0, 4, this.renderData.vertexCount); + } else + console.error("Cannot render without scene and camera"); + }, this._dispose = () => { + if (this._scene && this._camera && this.renderData) { + this._scene.removeEventListener("objectAdded", r2), this._scene.removeEventListener("objectRemoved", E2); + for (const A3 of this._scene.objects) + A3 instanceof Z && A3.removeEventListener("objectChanged", m2); + U2.terminate(), this.renderData.dispose(), B2.deleteTexture(this.splatTexture), B2.deleteTexture(W2), B2.deleteTexture(c2), B2.deleteBuffer(s2), B2.deleteBuffer(h2); + } else + console.error("Cannot dispose without scene and camera"); + }, this._setOutlineThickness = (A3) => { + this._outlineThickness = A3, this._initialized && B2.uniform1f(R2, A3); + }, this._setOutlineColor = (A3) => { + this._outlineColor = A3, this._initialized && B2.uniform4fv(a2, new Float32Array(A3.flatNorm())); + }; + } + get renderData() { + return this._renderData; + } + get depthIndex() { + return this._depthIndex; + } + get chunks() { + return this._chunks; + } + get splatTexture() { + return this._splatTexture; + } + get outlineThickness() { + return this._outlineThickness; + } + set outlineThickness(A2) { + this._setOutlineThickness(A2); + } + get outlineColor() { + return this._outlineColor; + } + set outlineColor(A2) { + this._setOutlineColor(A2); + } + _getVertexSource() { + return "#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n"; + } + _getFragmentSource() { + return "#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n"; + } +}; +var E = class { + constructor(A2 = 1) { + let Q2, F2, B2, U2, l2 = 0, t2 = false; + this.initialize = (A3) => { + if (!(A3 instanceof r)) + throw new Error("FadeInPass requires a RenderProgram"); + l2 = A3.started ? 1 : 0, t2 = true, Q2 = A3, F2 = A3.renderer.gl, B2 = F2.getUniformLocation(Q2.program, "useDepthFade"), F2.uniform1i(B2, 1), U2 = F2.getUniformLocation(Q2.program, "depthFade"), F2.uniform1f(U2, l2); + }, this.render = () => { + var d2; + t2 && !(null === (d2 = Q2.renderData) || void 0 === d2 ? void 0 : d2.updating) && (F2.useProgram(Q2.program), l2 = Math.min(l2 + 0.01 * A2, 1), l2 >= 1 && (t2 = false, F2.uniform1i(B2, 0)), F2.uniform1f(U2, l2)); + }; + } + dispose() { + } +}; +var m = class { + constructor(A2 = null, Q2 = null) { + this._backgroundColor = new b(); + const F2 = A2 || document.createElement("canvas"); + A2 || (F2.style.display = "block", F2.style.boxSizing = "border-box", F2.style.width = "100%", F2.style.height = "100%", F2.style.margin = "0", F2.style.padding = "0", document.body.appendChild(F2)), F2.style.background = this._backgroundColor.toHexString(), this._canvas = F2, this._gl = F2.getContext("webgl2", { antialias: false }); + const B2 = Q2 || []; + Q2 || B2.push(new E()), this._renderProgram = new r(this, B2); + const U2 = [this._renderProgram]; + this.resize = () => { + const A3 = F2.clientWidth, Q3 = F2.clientHeight; + F2.width === A3 && F2.height === Q3 || this.setSize(A3, Q3); + }, this.setSize = (A3, Q3) => { + F2.width = A3, F2.height = Q3, this._gl.viewport(0, 0, F2.width, F2.height); + for (const A4 of U2) + A4.resize(); + }, this.render = (A3, Q3) => { + for (const F3 of U2) + F3.render(A3, Q3); + }, this.dispose = () => { + for (const A3 of U2) + A3.dispose(); + }, this.addProgram = (A3) => { + U2.push(A3); + }, this.removeProgram = (A3) => { + const Q3 = U2.indexOf(A3); + if (Q3 < 0) + throw new Error("Program not found"); + U2.splice(Q3, 1); + }, this.resize(); + } + get canvas() { + return this._canvas; + } + get gl() { + return this._gl; + } + get renderProgram() { + return this._renderProgram; + } + get backgroundColor() { + return this._backgroundColor; + } + set backgroundColor(A2) { + this._backgroundColor = A2, this._canvas.style.background = A2.toHexString(); + } +}; +var N = class { + constructor(F2, B2, U2 = 0.5, l2 = 0.5, t2 = 5, d2 = true, V2 = new A()) { + this.minAngle = -90, this.maxAngle = 90, this.minZoom = 0.1, this.maxZoom = 30, this.orbitSpeed = 1, this.panSpeed = 1, this.zoomSpeed = 1, this.dampening = 0.12, this.setCameraTarget = () => { + }; + let Z2 = V2.clone(), e2 = Z2.clone(), I2 = U2, R2 = l2, a2 = t2, g2 = false, i2 = false, W2 = 0, c2 = 0, C2 = 0; + const h2 = {}; + let s2 = false; + F2.addEventListener("objectChanged", () => { + if (s2) + return; + const Q2 = F2.rotation.toEuler(); + I2 = -Q2.y, R2 = -Q2.x; + const B3 = F2.position.x - a2 * Math.sin(I2) * Math.cos(R2), U3 = F2.position.y + a2 * Math.sin(R2), l3 = F2.position.z + a2 * Math.cos(I2) * Math.cos(R2); + e2 = new A(B3, U3, l3); + }), this.setCameraTarget = (Q2) => { + const B3 = Q2.x - F2.position.x, U3 = Q2.y - F2.position.y, l3 = Q2.z - F2.position.z; + a2 = Math.sqrt(B3 * B3 + U3 * U3 + l3 * l3), R2 = Math.atan2(U3, Math.sqrt(B3 * B3 + l3 * l3)), I2 = -Math.atan2(B3, l3), e2 = new A(Q2.x, Q2.y, Q2.z); + }; + const o2 = () => 0.1 + 0.9 * (a2 - this.minZoom) / (this.maxZoom - this.minZoom), J2 = (A2) => { + h2[A2.code] = true, "ArrowUp" === A2.code && (h2.KeyW = true), "ArrowDown" === A2.code && (h2.KeyS = true), "ArrowLeft" === A2.code && (h2.KeyA = true), "ArrowRight" === A2.code && (h2.KeyD = true); + }, b2 = (A2) => { + h2[A2.code] = false, "ArrowUp" === A2.code && (h2.KeyW = false), "ArrowDown" === A2.code && (h2.KeyS = false), "ArrowLeft" === A2.code && (h2.KeyA = false), "ArrowRight" === A2.code && (h2.KeyD = false); + }, r2 = (A2) => { + p(A2), g2 = true, i2 = 2 === A2.button, c2 = A2.clientX, C2 = A2.clientY, window.addEventListener("mouseup", E2); + }, E2 = (A2) => { + p(A2), g2 = false, i2 = false, window.removeEventListener("mouseup", E2); + }, m2 = (Q2) => { + if (p(Q2), !g2 || !F2) + return; + const B3 = Q2.clientX - c2, U3 = Q2.clientY - C2; + if (i2) { + const Q3 = o2(), l3 = -B3 * this.panSpeed * 0.01 * Q3, t3 = -U3 * this.panSpeed * 0.01 * Q3, d3 = n.RotationFromQuaternion(F2.rotation).buffer, V3 = new A(d3[0], d3[3], d3[6]), Z3 = new A(d3[1], d3[4], d3[7]); + e2 = e2.add(V3.multiply(l3)), e2 = e2.add(Z3.multiply(t3)); + } else + I2 -= B3 * this.orbitSpeed * 3e-3, R2 += U3 * this.orbitSpeed * 3e-3, R2 = Math.min(Math.max(R2, this.minAngle * Math.PI / 180), this.maxAngle * Math.PI / 180); + c2 = Q2.clientX, C2 = Q2.clientY; + }, N2 = (A2) => { + p(A2); + const Q2 = o2(); + a2 += A2.deltaY * this.zoomSpeed * 0.025 * Q2, a2 = Math.min(Math.max(a2, this.minZoom), this.maxZoom); + }, G2 = (A2) => { + if (p(A2), 1 === A2.touches.length) + g2 = true, i2 = false, c2 = A2.touches[0].clientX, C2 = A2.touches[0].clientY, W2 = 0; + else if (2 === A2.touches.length) { + g2 = true, i2 = true, c2 = (A2.touches[0].clientX + A2.touches[1].clientX) / 2, C2 = (A2.touches[0].clientY + A2.touches[1].clientY) / 2; + const Q2 = A2.touches[0].clientX - A2.touches[1].clientX, F3 = A2.touches[0].clientY - A2.touches[1].clientY; + W2 = Math.sqrt(Q2 * Q2 + F3 * F3); + } + }, X2 = (A2) => { + p(A2), g2 = false, i2 = false; + }, Y2 = (Q2) => { + if (p(Q2), g2 && F2) + if (i2) { + const B3 = o2(), U3 = Q2.touches[0].clientX - Q2.touches[1].clientX, l3 = Q2.touches[0].clientY - Q2.touches[1].clientY, t3 = Math.sqrt(U3 * U3 + l3 * l3); + a2 += (W2 - t3) * this.zoomSpeed * 0.1 * B3, a2 = Math.min(Math.max(a2, this.minZoom), this.maxZoom), W2 = t3; + const d3 = (Q2.touches[0].clientX + Q2.touches[1].clientX) / 2, V3 = (Q2.touches[0].clientY + Q2.touches[1].clientY) / 2, Z3 = d3 - c2, I3 = V3 - C2, R3 = n.RotationFromQuaternion(F2.rotation).buffer, g3 = new A(R3[0], R3[3], R3[6]), i3 = new A(R3[1], R3[4], R3[7]); + e2 = e2.add(g3.multiply(-Z3 * this.panSpeed * 0.025 * B3)), e2 = e2.add(i3.multiply(-I3 * this.panSpeed * 0.025 * B3)), c2 = d3, C2 = V3; + } else { + const A2 = Q2.touches[0].clientX - c2, F3 = Q2.touches[0].clientY - C2; + I2 -= A2 * this.orbitSpeed * 3e-3, R2 += F3 * this.orbitSpeed * 3e-3, R2 = Math.min(Math.max(R2, this.minAngle * Math.PI / 180), this.maxAngle * Math.PI / 180), c2 = Q2.touches[0].clientX, C2 = Q2.touches[0].clientY; + } + }, y2 = (A2, Q2, F3) => (1 - F3) * A2 + F3 * Q2; + this.update = () => { + s2 = true, U2 = y2(U2, I2, this.dampening), l2 = y2(l2, R2, this.dampening), t2 = y2(t2, a2, this.dampening), Z2 = Z2.lerp(e2, this.dampening); + const B3 = Z2.x + t2 * Math.sin(U2) * Math.cos(l2), d3 = Z2.y - t2 * Math.sin(l2), V3 = Z2.z - t2 * Math.cos(U2) * Math.cos(l2); + F2.position = new A(B3, d3, V3); + const g3 = Z2.subtract(F2.position).normalize(), i3 = Math.asin(-g3.y), W3 = Math.atan2(g3.x, g3.z); + F2.rotation = Q.FromEuler(new A(i3, W3, 0)); + const c3 = 0.025, C3 = 0.01, o3 = n.RotationFromQuaternion(F2.rotation).buffer, J3 = new A(-o3[2], -o3[5], -o3[8]), b3 = new A(o3[0], o3[3], o3[6]); + h2.KeyS && (e2 = e2.add(J3.multiply(c3))), h2.KeyW && (e2 = e2.subtract(J3.multiply(c3))), h2.KeyA && (e2 = e2.subtract(b3.multiply(c3))), h2.KeyD && (e2 = e2.add(b3.multiply(c3))), h2.KeyE && (I2 += C3), h2.KeyQ && (I2 -= C3), h2.KeyR && (R2 += C3), h2.KeyF && (R2 -= C3), s2 = false; + }; + const p = (A2) => { + A2.preventDefault(), A2.stopPropagation(); + }; + this.dispose = () => { + B2.removeEventListener("dragenter", p), B2.removeEventListener("dragover", p), B2.removeEventListener("dragleave", p), B2.removeEventListener("contextmenu", p), B2.removeEventListener("mousedown", r2), B2.removeEventListener("mousemove", m2), B2.removeEventListener("wheel", N2), B2.removeEventListener("touchstart", G2), B2.removeEventListener("touchend", X2), B2.removeEventListener("touchmove", Y2), d2 && (window.removeEventListener("keydown", J2), window.removeEventListener("keyup", b2)); + }, d2 && (window.addEventListener("keydown", J2), window.addEventListener("keyup", b2)), B2.addEventListener("dragenter", p), B2.addEventListener("dragover", p), B2.addEventListener("dragleave", p), B2.addEventListener("contextmenu", p), B2.addEventListener("mousedown", r2), B2.addEventListener("mousemove", m2), B2.addEventListener("wheel", N2), B2.addEventListener("touchstart", G2), B2.addEventListener("touchend", X2), B2.addEventListener("touchmove", Y2), this.update(); + } +}; +var G = class { + constructor(A2, Q2) { + this.normal = A2, this.point = Q2; + } + intersect(A2, Q2) { + const F2 = this.normal.dot(Q2); + if (Math.abs(F2) < 1e-4) + return null; + const B2 = this.normal.dot(this.point.subtract(A2)) / F2; + return B2 < 0 ? null : A2.add(Q2.multiply(B2)); + } +}; +var X = class { + initialize(A2) { + } + render() { + } + dispose() { + } +}; +var Y = function(A2 = {}) { + var Q2, F2, B2 = A2; + B2.ready = new Promise((A3, B3) => { + Q2 = A3, F2 = B3; + }); + var U2 = Object.assign({}, B2), l2 = ""; + "undefined" != typeof document && document.currentScript && (l2 = document.currentScript.src), l2 = 0 !== l2.indexOf("blob:") ? l2.substr(0, l2.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", B2.print || console.log.bind(console); + var t2, d2, n2 = B2.printErr || console.error.bind(console); + function V2(A3) { + if (G2(A3)) + return function(A4) { + for (var Q3 = atob(A4), F3 = new Uint8Array(Q3.length), B3 = 0; B3 < Q3.length; ++B3) + F3[B3] = Q3.charCodeAt(B3); + return F3; + }(A3.slice(N2.length)); + } + Object.assign(B2, U2), U2 = null, B2.arguments && B2.arguments, B2.thisProgram && B2.thisProgram, B2.quit && B2.quit, B2.wasmBinary && (t2 = B2.wasmBinary), "object" != typeof WebAssembly && r2("no native wasm support detected"); + var Z2, e2, I2, R2, a2, g2, i2, W2, c2 = false; + function C2() { + var A3 = d2.buffer; + B2.HEAP8 = Z2 = new Int8Array(A3), B2.HEAP16 = I2 = new Int16Array(A3), B2.HEAPU8 = e2 = new Uint8Array(A3), B2.HEAPU16 = R2 = new Uint16Array(A3), B2.HEAP32 = a2 = new Int32Array(A3), B2.HEAPU32 = g2 = new Uint32Array(A3), B2.HEAPF32 = i2 = new Float32Array(A3), B2.HEAPF64 = W2 = new Float64Array(A3); + } + var h2 = [], s2 = [], o2 = [], J2 = 0, b2 = null; + function r2(A3) { + var _a; + (_a = B2.onAbort) == null ? void 0 : _a.call(B2, A3), n2(A3 = "Aborted(" + A3 + ")"), c2 = true, A3 += ". Build with -sASSERTIONS for more info."; + var Q3 = new WebAssembly.RuntimeError(A3); + throw F2(Q3), Q3; + } + var E2, m2, N2 = "data:application/octet-stream;base64,", G2 = (A3) => A3.startsWith(N2); + function X2(A3) { + return Promise.resolve().then(() => function(A4) { + if (A4 == E2 && t2) + return new Uint8Array(t2); + var Q3 = V2(A4); + if (Q3) + return Q3; + throw "both async and sync fetching of the wasm failed"; + }(A3)); + } + function Y2(A3, Q3, F3, B3) { + return function(A4, Q4, F4) { + return X2(A4).then((A5) => WebAssembly.instantiate(A5, Q4)).then((A5) => A5).then(F4, (A5) => { + n2(`failed to asynchronously prepare wasm: ${A5}`), r2(A5); + }); + }(Q3, F3, B3); + } + G2(E2 = "data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQ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CyADQQFHDQEgAUEBNgIgDwsgASACNgIUIAEgAzYCICABIAEoAihBAWo2AigCQCABKAIkQQFHDQAgASgCGEECRw0AIAFBAToANgsgAUEENgIsCwvyAQAgACABKAIIIAQQCgRAIAEgAiADEBEPCwJAIAAgASgCACAEEAoEQAJAIAIgASgCEEcEQCABKAIUIAJHDQELIANBAUcNAiABQQE2AiAPCyABIAM2AiACQCABKAIsQQRGDQAgAUEAOwE0IAAoAggiACABIAIgAkEBIAQgACgCACgCFBEDACABLQA1BEAgAUEDNgIsIAEtADRFDQEMAwsgAUEENgIsCyABIAI2AhQgASABKAIoQQFqNgIoIAEoAiRBAUcNASABKAIYQQJHDQEgAUEBOgA2DwsgACgCCCIAIAEgAiADIAQgACgCACgCGBECAAsLMQAgACABKAIIQQAQCgRAIAEgAiADEBQPCyAAKAIIIgAgASACIAMgACgCACgCHBEAAAsYACAAIAEoAghBABAKBEAgASACIAMQFAsLgAMBBH8jAEHwAGsiAiQAIAAoAgAiA0EEaygCACEEIANBCGsoAgAhBSACQgA3AlAgAkIANwJYIAJCADcCYCACQgA3AGcgAkIANwJIIAJBADYCRCACQfwVNgJAIAIgADYCPCACIAE2AjggACAFaiEDAkAgBCABQQAQCgRAQQAgAyAFGyEADAELIAAgA04EQCACQgA3AC8gAkIANwIYIAJCADcCICACQgA3AiggAkIANwIQIAJBADYCDCACIAE2AgggAiAANgIEIAIgBDYCACACQQE2AjAgBCACIAMgA0EBQQAgBCgCACgCFBEDACACKAIYDQELQQAhACAEIAJBOGogA0EBQQAgBCgCACgCGBECAAJAAkAgAigCXA4CAAECCyACKAJMQQAgAigCWEEBRhtBACACKAJUQQFGG0EAIAIoAmBBAUYbIQAMAQsgAigCUEEBRwRAIAIoAmANASACKAJUQQFHDQEgAigCWEEBRw0BCyACKAJIIQALIAJB8ABqJAAgAAu1AQEEfyMAQUBqIgMkAAJ/QQEgACABQQAQCg0AGkEAIAFFDQAaQQAgAUGsFhAgIgFFDQAaIANBDGohBEE0IQUDQ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OAAAADwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B") || (m2 = E2, E2 = B2.locateFile ? B2.locateFile(m2, l2) : l2 + m2); + var y2 = (A3) => { + for (; A3.length > 0; ) + A3.shift()(B2); + }; + B2.noExitRuntime; + var p, S, k = (A3) => { + for (var Q3 = "", F3 = A3; e2[F3]; ) + Q3 += p[e2[F3++]]; + return Q3; + }, u = {}, T = {}, D = (A3) => { + throw new S(A3); + }; + function H(A3, Q3, F3 = {}) { + if (!("argPackAdvance" in Q3)) + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + return function(A4, Q4, F4 = {}) { + var B3 = Q4.name; + if (A4 || D(`type "${B3}" must have a positive integer typeid pointer`), T.hasOwnProperty(A4)) { + if (F4.ignoreDuplicateRegistrations) + return; + D(`Cannot register type '${B3}' twice`); + } + if (T[A4] = Q4, u.hasOwnProperty(A4)) { + var U3 = u[A4]; + delete u[A4], U3.forEach((A5) => A5()); + } + }(A3, Q3, F3); + } + function w() { + this.allocated = [void 0], this.freelist = []; + } + var x = new w(), f = () => { + for (var A3 = 0, Q3 = x.reserved; Q3 < x.allocated.length; ++Q3) + void 0 !== x.allocated[Q3] && ++A3; + return A3; + }, M = (A3) => (A3 || D("Cannot use deleted val. handle = " + A3), x.get(A3).value), z = (A3) => { + switch (A3) { + case void 0: + return 1; + case null: + return 2; + case true: + return 3; + case false: + return 4; + default: + return x.allocate({ refcount: 1, value: A3 }); + } + }; + function v(A3) { + return this.fromWireType(a2[A3 >> 2]); + } + var K = (A3, Q3) => { + switch (Q3) { + case 4: + return function(A4) { + return this.fromWireType(i2[A4 >> 2]); + }; + case 8: + return function(A4) { + return this.fromWireType(W2[A4 >> 3]); + }; + default: + throw new TypeError(`invalid float width (${Q3}): ${A3}`); + } + }, j = (A3, Q3, F3) => { + switch (Q3) { + case 1: + return F3 ? (A4) => Z2[A4 >> 0] : (A4) => e2[A4 >> 0]; + case 2: + return F3 ? (A4) => I2[A4 >> 1] : (A4) => R2[A4 >> 1]; + case 4: + return F3 ? (A4) => a2[A4 >> 2] : (A4) => g2[A4 >> 2]; + default: + throw new TypeError(`invalid integer width (${Q3}): ${A3}`); + } + }; + function O(A3) { + return this.fromWireType(g2[A3 >> 2]); + } + var L = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, P = (A3, Q3) => A3 ? ((A4, Q4, F3) => { + for (var B3 = Q4 + F3, U3 = Q4; A4[U3] && !(U3 >= B3); ) + ++U3; + if (U3 - Q4 > 16 && A4.buffer && L) + return L.decode(A4.subarray(Q4, U3)); + for (var l3 = ""; Q4 < U3; ) { + var t3 = A4[Q4++]; + if (128 & t3) { + var d3 = 63 & A4[Q4++]; + if (192 != (224 & t3)) { + var n3 = 63 & A4[Q4++]; + if ((t3 = 224 == (240 & t3) ? (15 & t3) << 12 | d3 << 6 | n3 : (7 & t3) << 18 | d3 << 12 | n3 << 6 | 63 & A4[Q4++]) < 65536) + l3 += String.fromCharCode(t3); + else { + var V3 = t3 - 65536; + l3 += String.fromCharCode(55296 | V3 >> 10, 56320 | 1023 & V3); + } + } else + l3 += String.fromCharCode((31 & t3) << 6 | d3); + } else + l3 += String.fromCharCode(t3); + } + return l3; + })(e2, A3, Q3) : "", _ = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, q = (A3, Q3) => { + for (var F3 = A3, B3 = F3 >> 1, U3 = B3 + Q3 / 2; !(B3 >= U3) && R2[B3]; ) + ++B3; + if ((F3 = B3 << 1) - A3 > 32 && _) + return _.decode(e2.subarray(A3, F3)); + for (var l3 = "", t3 = 0; !(t3 >= Q3 / 2); ++t3) { + var d3 = I2[A3 + 2 * t3 >> 1]; + if (0 == d3) + break; + l3 += String.fromCharCode(d3); + } + return l3; + }, $ = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 2) + return 0; + for (var B3 = Q3, U3 = (F3 -= 2) < 2 * A3.length ? F3 / 2 : A3.length, l3 = 0; l3 < U3; ++l3) { + var t3 = A3.charCodeAt(l3); + I2[Q3 >> 1] = t3, Q3 += 2; + } + return I2[Q3 >> 1] = 0, Q3 - B3; + }, AA = (A3) => 2 * A3.length, QA = (A3, Q3) => { + for (var F3 = 0, B3 = ""; !(F3 >= Q3 / 4); ) { + var U3 = a2[A3 + 4 * F3 >> 2]; + if (0 == U3) + break; + if (++F3, U3 >= 65536) { + var l3 = U3 - 65536; + B3 += String.fromCharCode(55296 | l3 >> 10, 56320 | 1023 & l3); + } else + B3 += String.fromCharCode(U3); + } + return B3; + }, FA = (A3, Q3, F3) => { + if (F3 ?? (F3 = 2147483647), F3 < 4) + return 0; + for (var B3 = Q3, U3 = B3 + F3 - 4, l3 = 0; l3 < A3.length; ++l3) { + var t3 = A3.charCodeAt(l3); + if (t3 >= 55296 && t3 <= 57343 && (t3 = 65536 + ((1023 & t3) << 10) | 1023 & A3.charCodeAt(++l3)), a2[Q3 >> 2] = t3, (Q3 += 4) + 4 > U3) + break; + } + return a2[Q3 >> 2] = 0, Q3 - B3; + }, BA = (A3) => { + for (var Q3 = 0, F3 = 0; F3 < A3.length; ++F3) { + var B3 = A3.charCodeAt(F3); + B3 >= 55296 && B3 <= 57343 && ++F3, Q3 += 4; + } + return Q3; + }, UA = (A3) => { + var Q3 = (A3 - d2.buffer.byteLength + 65535) / 65536; + try { + return d2.grow(Q3), C2(), 1; + } catch (A4) { + } + }; + (() => { + for (var A3 = new Array(256), Q3 = 0; Q3 < 256; ++Q3) + A3[Q3] = String.fromCharCode(Q3); + p = A3; + })(), S = B2.BindingError = class extends Error { + constructor(A3) { + super(A3), this.name = "BindingError"; + } + }, B2.InternalError = class extends Error { + constructor(A3) { + super(A3), this.name = "InternalError"; + } + }, Object.assign(w.prototype, { get(A3) { + return this.allocated[A3]; + }, has(A3) { + return void 0 !== this.allocated[A3]; + }, allocate(A3) { + var Q3 = this.freelist.pop() || this.allocated.length; + return this.allocated[Q3] = A3, Q3; + }, free(A3) { + this.allocated[A3] = void 0, this.freelist.push(A3); + } }), x.allocated.push({ value: void 0 }, { value: null }, { value: true }, { value: false }), x.reserved = x.allocated.length, B2.count_emval_handles = f; + var lA = { f: (A3, Q3, F3, B3, U3) => { + }, i: (A3, Q3, F3, B3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: function(A4) { + return !!A4; + }, toWireType: function(A4, Q4) { + return Q4 ? F3 : B3; + }, argPackAdvance: 8, readValueFromPointer: function(A4) { + return this.fromWireType(e2[A4]); + }, destructorFunction: null }); + }, h: (A3, Q3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: (A4) => { + var Q4 = M(A4); + return ((A5) => { + A5 >= x.reserved && 0 == --x.get(A5).refcount && x.free(A5); + })(A4), Q4; + }, toWireType: (A4, Q4) => z(Q4), argPackAdvance: 8, readValueFromPointer: v, destructorFunction: null }); + }, e: (A3, Q3, F3) => { + H(A3, { name: Q3 = k(Q3), fromWireType: (A4) => A4, toWireType: (A4, Q4) => Q4, argPackAdvance: 8, readValueFromPointer: K(Q3, F3), destructorFunction: null }); + }, b: (A3, Q3, F3, B3, U3) => { + Q3 = k(Q3); + var l3 = (A4) => A4; + if (0 === B3) { + var t3 = 32 - 8 * F3; + l3 = (A4) => A4 << t3 >>> t3; + } + var d3 = Q3.includes("unsigned"); + H(A3, { name: Q3, fromWireType: l3, toWireType: d3 ? function(A4, Q4) { + return this.name, Q4 >>> 0; + } : function(A4, Q4) { + return this.name, Q4; + }, argPackAdvance: 8, readValueFromPointer: j(Q3, F3, 0 !== B3), destructorFunction: null }); + }, a: (A3, Q3, F3) => { + var B3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][Q3]; + function U3(A4) { + var Q4 = g2[A4 >> 2], F4 = g2[A4 + 4 >> 2]; + return new B3(Z2.buffer, F4, Q4); + } + H(A3, { name: F3 = k(F3), fromWireType: U3, argPackAdvance: 8, readValueFromPointer: U3 }, { ignoreDuplicateRegistrations: true }); + }, d: (A3, Q3) => { + var F3 = "std::string" === (Q3 = k(Q3)); + H(A3, { name: Q3, fromWireType(A4) { + var Q4, B3 = g2[A4 >> 2], U3 = A4 + 4; + if (F3) + for (var l3 = U3, t3 = 0; t3 <= B3; ++t3) { + var d3 = U3 + t3; + if (t3 == B3 || 0 == e2[d3]) { + var n3 = P(l3, d3 - l3); + void 0 === Q4 ? Q4 = n3 : (Q4 += String.fromCharCode(0), Q4 += n3), l3 = d3 + 1; + } + } + else { + var V3 = new Array(B3); + for (t3 = 0; t3 < B3; ++t3) + V3[t3] = String.fromCharCode(e2[U3 + t3]); + Q4 = V3.join(""); + } + return VA(A4), Q4; + }, toWireType(A4, Q4) { + var B3; + Q4 instanceof ArrayBuffer && (Q4 = new Uint8Array(Q4)); + var U3 = "string" == typeof Q4; + U3 || Q4 instanceof Uint8Array || Q4 instanceof Uint8ClampedArray || Q4 instanceof Int8Array || D("Cannot pass non-string to std::string"), B3 = F3 && U3 ? ((A5) => { + for (var Q5 = 0, F4 = 0; F4 < A5.length; ++F4) { + var B4 = A5.charCodeAt(F4); + B4 <= 127 ? Q5++ : B4 <= 2047 ? Q5 += 2 : B4 >= 55296 && B4 <= 57343 ? (Q5 += 4, ++F4) : Q5 += 3; + } + return Q5; + })(Q4) : Q4.length; + var l3 = nA(4 + B3 + 1), t3 = l3 + 4; + if (g2[l3 >> 2] = B3, F3 && U3) + ((A5, Q5, F4, B4) => { + if (!(B4 > 0)) + return 0; + for (var U4 = F4 + B4 - 1, l4 = 0; l4 < A5.length; ++l4) { + var t4 = A5.charCodeAt(l4); + if (t4 >= 55296 && t4 <= 57343 && (t4 = 65536 + ((1023 & t4) << 10) | 1023 & A5.charCodeAt(++l4)), t4 <= 127) { + if (F4 >= U4) + break; + Q5[F4++] = t4; + } else if (t4 <= 2047) { + if (F4 + 1 >= U4) + break; + Q5[F4++] = 192 | t4 >> 6, Q5[F4++] = 128 | 63 & t4; + } else if (t4 <= 65535) { + if (F4 + 2 >= U4) + break; + Q5[F4++] = 224 | t4 >> 12, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } else { + if (F4 + 3 >= U4) + break; + Q5[F4++] = 240 | t4 >> 18, Q5[F4++] = 128 | t4 >> 12 & 63, Q5[F4++] = 128 | t4 >> 6 & 63, Q5[F4++] = 128 | 63 & t4; + } + } + Q5[F4] = 0; + })(Q4, e2, t3, B3 + 1); + else if (U3) + for (var d3 = 0; d3 < B3; ++d3) { + var n3 = Q4.charCodeAt(d3); + n3 > 255 && (VA(t3), D("String has UTF-16 code units that do not fit in 8 bits")), e2[t3 + d3] = n3; + } + else + for (d3 = 0; d3 < B3; ++d3) + e2[t3 + d3] = Q4[d3]; + return null !== A4 && A4.push(VA, l3), l3; + }, argPackAdvance: 8, readValueFromPointer: O, destructorFunction(A4) { + VA(A4); + } }); + }, c: (A3, Q3, F3) => { + var B3, U3, l3, t3, d3; + F3 = k(F3), 2 === Q3 ? (B3 = q, U3 = $, t3 = AA, l3 = () => R2, d3 = 1) : 4 === Q3 && (B3 = QA, U3 = FA, t3 = BA, l3 = () => g2, d3 = 2), H(A3, { name: F3, fromWireType: (A4) => { + for (var F4, U4 = g2[A4 >> 2], t4 = l3(), n3 = A4 + 4, V3 = 0; V3 <= U4; ++V3) { + var Z3 = A4 + 4 + V3 * Q3; + if (V3 == U4 || 0 == t4[Z3 >> d3]) { + var e3 = B3(n3, Z3 - n3); + void 0 === F4 ? F4 = e3 : (F4 += String.fromCharCode(0), F4 += e3), n3 = Z3 + Q3; + } + } + return VA(A4), F4; + }, toWireType: (A4, B4) => { + "string" != typeof B4 && D(`Cannot pass non-string to C++ string type ${F3}`); + var l4 = t3(B4), n3 = nA(4 + l4 + Q3); + return g2[n3 >> 2] = l4 >> d3, U3(B4, n3 + 4, l4 + Q3), null !== A4 && A4.push(VA, n3), n3; + }, argPackAdvance: 8, readValueFromPointer: v, destructorFunction(A4) { + VA(A4); + } }); + }, j: (A3, Q3) => { + H(A3, { isVoid: true, name: Q3 = k(Q3), argPackAdvance: 0, fromWireType: () => { + }, toWireType: (A4, Q4) => { + } }); + }, g: (A3) => { + var Q3 = e2.length, F3 = 2147483648; + if ((A3 >>>= 0) > F3) + return false; + for (var B3, U3, l3 = 1; l3 <= 4; l3 *= 2) { + var t3 = Q3 * (1 + 0.2 / l3); + t3 = Math.min(t3, A3 + 100663296); + var d3 = Math.min(F3, (B3 = Math.max(A3, t3)) + ((U3 = 65536) - B3 % U3) % U3); + if (UA(d3)) + return true; + } + return false; + } }, tA = function() { + var _a; + var A3 = { a: lA }; + function Q3(A4, Q4) { + var F3; + return tA = A4.exports, d2 = tA.k, C2(), F3 = tA.l, s2.unshift(F3), function(A5) { + var _a2; + if (J2--, (_a2 = B2.monitorRunDependencies) == null ? void 0 : _a2.call(B2, J2), 0 == J2 && b2) { + var Q5 = b2; + b2 = null, Q5(); + } + }(), tA; + } + if (J2++, (_a = B2.monitorRunDependencies) == null ? void 0 : _a.call(B2, J2), B2.instantiateWasm) + try { + return B2.instantiateWasm(A3, Q3); + } catch (A4) { + n2(`Module.instantiateWasm callback failed with error: ${A4}`), F2(A4); + } + return Y2(0, E2, A3, function(A4) { + Q3(A4.instance); + }).catch(F2), {}; + }(); + B2._evaluate = (A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3, I3, R3) => (B2._evaluate = tA.m)(A3, Q3, F3, U3, l3, t3, d3, n3, V3, Z3, e3, I3, R3); + var dA, nA = B2._malloc = (A3) => (nA = B2._malloc = tA.o)(A3), VA = B2._free = (A3) => (VA = B2._free = tA.p)(A3); + function ZA() { + function A3() { + dA || (dA = true, B2.calledRun = true, c2 || (y2(s2), Q2(B2), B2.onRuntimeInitialized && B2.onRuntimeInitialized(), function() { + if (B2.postRun) + for ("function" == typeof B2.postRun && (B2.postRun = [B2.postRun]); B2.postRun.length; ) + A4 = B2.postRun.shift(), o2.unshift(A4); + var A4; + y2(o2); + }())); + } + J2 > 0 || (function() { + if (B2.preRun) + for ("function" == typeof B2.preRun && (B2.preRun = [B2.preRun]); B2.preRun.length; ) + A4 = B2.preRun.shift(), h2.unshift(A4); + var A4; + y2(h2); + }(), J2 > 0 || (B2.setStatus ? (B2.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + B2.setStatus(""); + }, 1), A3(); + }, 1)) : A3())); + } + if (b2 = function A3() { + dA || ZA(), dA || (b2 = A3); + }, B2.preInit) + for ("function" == typeof B2.preInit && (B2.preInit = [B2.preInit]); B2.preInit.length > 0; ) + B2.preInit.pop()(); + return ZA(), A2.ready; +}; +var y = class { + constructor(A2) { + let Q2; + (async () => { + Q2 = await Y(); + })(); + let F2, B2, U2, l2, t2, d2, n2, V2, Z2, e2, I2, R2 = 0, a2 = 0; + this.testPoint = (g2, i2) => { + if (!Q2) + throw new Error("Wasm module not loaded"); + if (!A2.camera) + throw new Error("Camera not set"); + if (!A2.renderData || !A2.depthIndex || !A2.chunks) + throw new Error("Render data not set"); + const W2 = A2.renderData, c2 = A2.depthIndex, C2 = A2.chunks, h2 = Math.pow(2, Math.ceil(Math.log2(W2.vertexCount))); + var s2; + (s2 = h2) > R2 && (R2 > 0 && (Q2._free(F2), Q2._free(U2), Q2._free(l2), Q2._free(t2), Q2._free(d2), Q2._free(n2), Q2._free(V2), Q2._free(Z2), Q2._free(e2), Q2._free(I2)), R2 = s2, F2 = Q2._malloc(64), U2 = Q2._malloc(4 * R2), l2 = Q2._malloc(3 * R2 * 4), t2 = Q2._malloc(4 * R2 * 4), d2 = Q2._malloc(3 * R2 * 4), n2 = Q2._malloc(4 * R2), V2 = Q2._malloc(R2), Z2 = Q2._malloc(12), e2 = Q2._malloc(12), I2 = Q2._malloc(4)); + const o2 = Math.pow(2, Math.ceil(Math.log2(W2.transforms.length / 20))); + var J2; + (J2 = o2) > a2 && (a2 > 0 && Q2._free(B2), a2 = J2, B2 = Q2._malloc(20 * a2 * 4)); + const b2 = (g2 + 1) / 2, r2 = (i2 + 1) / 2, E2 = Math.floor(15 * b2) + 15 * Math.floor(15 * r2), m2 = A2.camera, N2 = m2.screenPointToRay(g2, i2); + Q2.HEAPF32.set(m2.data.viewMatrix.buffer, F2 / 4), Q2.HEAPU32.set(W2.transformIndices, U2 / 4), Q2.HEAPF32.set(W2.positions, l2 / 4), Q2.HEAPF32.set(W2.rotations, t2 / 4), Q2.HEAPF32.set(W2.scales, d2 / 4), Q2.HEAPU32.set(c2, n2 / 4), Q2.HEAPU8.set(C2, V2), Q2.HEAPF32.set(m2.position.flat(), Z2 / 4), Q2.HEAPF32.set(N2.flat(), e2 / 4), Q2.HEAPF32.set(W2.transforms, B2 / 4), Q2._evaluate(F2, B2, U2, l2, t2, d2, n2, V2, W2.vertexCount, E2, Z2, e2, I2); + const G2 = Q2.HEAPU32[I2 / 4]; + if (4294967295 !== G2) { + return W2.getSplat(G2); + } + return null; + }; + } +}; +export { + R as Camera, + e as CameraData, + b as Color32, + E as FadeInPass, + y as IntersectionTester, + g as Loader, + n as Matrix3, + B as Matrix4, + d as Object3D, + N as OrbitControls, + i as PLYLoader, + G as Plane, + Q as Quaternion, + J as RenderData, + r as RenderProgram, + a as Scene, + X as ShaderPass, + h as ShaderProgram, + Z as Splat, + V as SplatData, + A as Vector3, + I as Vector4, + m as WebGLRenderer +}; +//# sourceMappingURL=gsplat.js.map diff --git a/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js.map b/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js.map new file mode 100644 index 0000000..a6d8080 --- /dev/null +++ b/gsplat/node_modules/.vite/deps_temp_ef60226a/gsplat.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../gsplat/src/math/Vector3.ts", "../../gsplat/src/math/Quaternion.ts", "../../gsplat/src/events/EventDispatcher.ts", "../../gsplat/src/math/Matrix4.ts", "../../gsplat/src/events/Events.ts", "../../gsplat/src/core/Object3D.ts", "../../gsplat/src/math/Matrix3.ts", "../../gsplat/src/splats/SplatData.ts", "../../gsplat/src/splats/Splat.ts", "../../gsplat/src/cameras/CameraData.ts", "../../gsplat/src/math/Vector4.ts", "../../gsplat/src/cameras/Camera.ts", "../../gsplat/src/core/Scene.ts", "../../gsplat/src/loaders/Loader.ts", "../../gsplat/src/loaders/PLYLoader.ts", "../../gsplat/src/renderers/webgl/programs/ShaderProgram.ts", "../../gsplat/src/wasm/data.js", "../../gsplat/src/renderers/webgl/utils/RenderData.ts", "../../gsplat/src/math/Color32.ts", "../../gsplat/src/renderers/webgl/programs/RenderProgram.ts", "../../gsplat/src/renderers/webgl/passes/FadeInPass.ts", "../../gsplat/src/renderers/WebGLRenderer.ts", "../../gsplat/src/controls/OrbitControls.ts", "../../gsplat/src/math/Plane.ts", "../../gsplat/src/renderers/webgl/passes/ShaderPass.ts", "../../gsplat/src/wasm/intersect.js", "../../gsplat/src/renderers/webgl/utils/IntersectionTester.ts"], + "sourcesContent": ["import { Matrix4 } from \"./Matrix4\";\n\nclass Vector3 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n equals(v: Vector3): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector3;\n add(v: Vector3): Vector3;\n add(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x + v, this.y + v, this.z + v);\n } else {\n return new Vector3(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n }\n\n subtract(v: number): Vector3;\n subtract(v: Vector3): Vector3;\n subtract(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x - v, this.y - v, this.z - v);\n } else {\n return new Vector3(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n }\n\n multiply(v: number): Vector3;\n multiply(v: Vector3): Vector3;\n multiply(v: Matrix4): Vector3;\n multiply(v: number | Vector3 | Matrix4): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x * v, this.y * v, this.z * v);\n } else if (v instanceof Vector3) {\n return new Vector3(this.x * v.x, this.y * v.y, this.z * v.z);\n } else {\n return new Vector3(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + v.buffer[14],\n );\n }\n }\n\n cross(v: Vector3): Vector3 {\n const x = this.y * v.z - this.z * v.y;\n const y = this.z * v.x - this.x * v.z;\n const z = this.x * v.y - this.y * v.x;\n\n return new Vector3(x, y, z);\n }\n\n dot(v: Vector3): number {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n\n lerp(v: Vector3, t: number): Vector3 {\n return new Vector3(this.x + (v.x - this.x) * t, this.y + (v.y - this.y) * t, this.z + (v.z - this.z) * t);\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n\n distanceTo(v: Vector3): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2);\n }\n\n normalize(): Vector3 {\n const length = this.magnitude();\n\n return new Vector3(this.x / length, this.y / length, this.z / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z];\n }\n\n clone(): Vector3 {\n return new Vector3(this.x, this.y, this.z);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n\n static One(value: number = 1): Vector3 {\n return new Vector3(value, value, value);\n }\n}\n\nexport { Vector3 };\n", "import { Matrix3 } from \"./Matrix3\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Quaternion {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 1) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(q: Quaternion): boolean {\n if (this.x !== q.x) {\n return false;\n }\n if (this.y !== q.y) {\n return false;\n }\n if (this.z !== q.z) {\n return false;\n }\n if (this.w !== q.w) {\n return false;\n }\n\n return true;\n }\n\n normalize(): Quaternion {\n const l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n return new Quaternion(this.x / l, this.y / l, this.z / l, this.w / l);\n }\n\n multiply(q: Quaternion): Quaternion {\n const w1 = this.w,\n x1 = this.x,\n y1 = this.y,\n z1 = this.z;\n const w2 = q.w,\n x2 = q.x,\n y2 = q.y,\n z2 = q.z;\n\n return new Quaternion(\n w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2,\n w1 * y2 - x1 * z2 + y1 * w2 + z1 * x2,\n w1 * z2 + x1 * y2 - y1 * x2 + z1 * w2,\n w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2,\n );\n }\n\n inverse(): Quaternion {\n const l = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n return new Quaternion(-this.x / l, -this.y / l, -this.z / l, this.w / l);\n }\n\n apply(v: Vector3): Vector3 {\n const vecQuat = new Quaternion(v.x, v.y, v.z, 0);\n const conjugate = new Quaternion(-this.x, -this.y, -this.z, this.w);\n const rotatedQuat = this.multiply(vecQuat).multiply(conjugate);\n return new Vector3(rotatedQuat.x, rotatedQuat.y, rotatedQuat.z);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Quaternion {\n return new Quaternion(this.x, this.y, this.z, this.w);\n }\n\n static FromEuler(e: Vector3): Quaternion {\n const halfX = e.x / 2;\n const halfY = e.y / 2;\n const halfZ = e.z / 2;\n const cy = Math.cos(halfY);\n const sy = Math.sin(halfY);\n const cp = Math.cos(halfX);\n const sp = Math.sin(halfX);\n const cz = Math.cos(halfZ);\n const sz = Math.sin(halfZ);\n\n const q = new Quaternion(\n cy * sp * cz + sy * cp * sz,\n sy * cp * cz - cy * sp * sz,\n cy * cp * sz - sy * sp * cz,\n cy * cp * cz + sy * sp * sz,\n );\n return q;\n }\n\n toEuler(): Vector3 {\n const sinr_cosp = 2 * (this.w * this.x + this.y * this.z);\n const cosr_cosp = 1 - 2 * (this.x * this.x + this.y * this.y);\n const x = Math.atan2(sinr_cosp, cosr_cosp);\n\n let y;\n const sinp = 2 * (this.w * this.y - this.z * this.x);\n if (Math.abs(sinp) >= 1) {\n y = (Math.sign(sinp) * Math.PI) / 2;\n } else {\n y = Math.asin(sinp);\n }\n\n const siny_cosp = 2 * (this.w * this.z + this.x * this.y);\n const cosy_cosp = 1 - 2 * (this.y * this.y + this.z * this.z);\n const z = Math.atan2(siny_cosp, cosy_cosp);\n\n return new Vector3(x, y, z);\n }\n\n static FromMatrix3(matrix: Matrix3): Quaternion {\n const m = matrix.buffer;\n const trace = m[0] + m[4] + m[8];\n let x, y, z, w;\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n w = 0.25 / s;\n x = (m[7] - m[5]) * s;\n y = (m[2] - m[6]) * s;\n z = (m[3] - m[1]) * s;\n } else if (m[0] > m[4] && m[0] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[0] - m[4] - m[8]);\n w = (m[7] - m[5]) / s;\n x = 0.25 * s;\n y = (m[1] + m[3]) / s;\n z = (m[2] + m[6]) / s;\n } else if (m[4] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[4] - m[0] - m[8]);\n w = (m[2] - m[6]) / s;\n x = (m[1] + m[3]) / s;\n y = 0.25 * s;\n z = (m[5] + m[7]) / s;\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m[8] - m[0] - m[4]);\n w = (m[3] - m[1]) / s;\n x = (m[2] + m[6]) / s;\n y = (m[5] + m[7]) / s;\n z = 0.25 * s;\n }\n return new Quaternion(x, y, z, w);\n }\n\n static FromAxisAngle(axis: Vector3, angle: number): Quaternion {\n const halfAngle = angle / 2;\n const sin = Math.sin(halfAngle);\n const cos = Math.cos(halfAngle);\n return new Quaternion(axis.x * sin, axis.y * sin, axis.z * sin, cos);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Quaternion };\n", "class EventDispatcher {\n addEventListener: (type: string, listener: (event: Event) => void) => void;\n removeEventListener: (type: string, listener: (event: Event) => void) => void;\n hasEventListener: (type: string, listener: (event: Event) => void) => boolean;\n dispatchEvent: (event: Event) => void;\n\n constructor() {\n const listeners = new Map void>>();\n\n this.addEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n listeners.set(type, new Set());\n }\n\n listeners.get(type)!.add(listener);\n };\n\n this.removeEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return;\n }\n\n listeners.get(type)!.delete(listener);\n };\n\n this.hasEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return false;\n }\n\n return listeners.get(type)!.has(listener);\n };\n\n this.dispatchEvent = (event: Event) => {\n if (!listeners.has(event.type)) {\n return;\n }\n\n for (const listener of listeners.get(event.type)!) {\n listener(event);\n }\n };\n }\n}\n\nexport { EventDispatcher };\n", "import { Quaternion } from \"./Quaternion\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Matrix4 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0, n14: number = 0, \n n21: number = 0, n22: number = 1, n23: number = 0, n24: number = 0, \n n31: number = 0, n32: number = 0, n33: number = 1, n34: number = 0, \n n41: number = 0, n42: number = 0, n43: number = 0, n44: number = 1) {\n this.buffer = [\n n11, n12, n13, n14, \n n21, n22, n23, n24, \n n31, n32, n33, n34, \n n41, n42, n43, n44\n ];\n }\n\n equals(m: Matrix4): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(m: Matrix4): Matrix4 {\n const a = this.buffer;\n const b = m.buffer;\n return new Matrix4(\n b[0] * a[0] + b[1] * a[4] + b[2] * a[8] + b[3] * a[12],\n b[0] * a[1] + b[1] * a[5] + b[2] * a[9] + b[3] * a[13],\n b[0] * a[2] + b[1] * a[6] + b[2] * a[10] + b[3] * a[14],\n b[0] * a[3] + b[1] * a[7] + b[2] * a[11] + b[3] * a[15],\n b[4] * a[0] + b[5] * a[4] + b[6] * a[8] + b[7] * a[12],\n b[4] * a[1] + b[5] * a[5] + b[6] * a[9] + b[7] * a[13],\n b[4] * a[2] + b[5] * a[6] + b[6] * a[10] + b[7] * a[14],\n b[4] * a[3] + b[5] * a[7] + b[6] * a[11] + b[7] * a[15],\n b[8] * a[0] + b[9] * a[4] + b[10] * a[8] + b[11] * a[12],\n b[8] * a[1] + b[9] * a[5] + b[10] * a[9] + b[11] * a[13],\n b[8] * a[2] + b[9] * a[6] + b[10] * a[10] + b[11] * a[14],\n b[8] * a[3] + b[9] * a[7] + b[10] * a[11] + b[11] * a[15],\n b[12] * a[0] + b[13] * a[4] + b[14] * a[8] + b[15] * a[12],\n b[12] * a[1] + b[13] * a[5] + b[14] * a[9] + b[15] * a[13],\n b[12] * a[2] + b[13] * a[6] + b[14] * a[10] + b[15] * a[14],\n b[12] * a[3] + b[13] * a[7] + b[14] * a[11] + b[15] * a[15],\n );\n }\n\n clone(): Matrix4 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix4(\n e[0], e[1], e[2], e[3], \n e[4], e[5], e[6], e[7], \n e[8], e[9], e[10], e[11], \n e[12], e[13], e[14], e[15]\n );\n }\n\n determinant(): number {\n const e = this.buffer;\n // prettier-ignore\n return (\n e[12] * e[9] * e[6] * e[3] - e[8] * e[13] * e[6] * e[3] - e[12] * e[5] * e[10] * e[3] + e[4] * e[13] * e[10] * e[3] +\n e[8] * e[5] * e[14] * e[3] - e[4] * e[9] * e[14] * e[3] - e[12] * e[9] * e[2] * e[7] + e[8] * e[13] * e[2] * e[7] +\n e[12] * e[1] * e[10] * e[7] - e[0] * e[13] * e[10] * e[7] - e[8] * e[1] * e[14] * e[7] + e[0] * e[9] * e[14] * e[7] +\n e[12] * e[5] * e[2] * e[11] - e[4] * e[13] * e[2] * e[11] - e[12] * e[1] * e[6] * e[11] + e[0] * e[13] * e[6] * e[11] +\n e[4] * e[1] * e[14] * e[11] - e[0] * e[5] * e[14] * e[11] - e[8] * e[5] * e[2] * e[15] + e[4] * e[9] * e[2] * e[15] +\n e[8] * e[1] * e[6] * e[15] - e[0] * e[9] * e[6] * e[15] - e[4] * e[1] * e[10] * e[15] + e[0] * e[5] * e[10] * e[15]\n );\n }\n\n invert(): Matrix4 {\n const e = this.buffer;\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible.\");\n }\n const invDet = 1 / det;\n // prettier-ignore\n return new Matrix4(\n invDet * (\n e[5] * e[10] * e[15] - e[5] * e[11] * e[14] - e[9] * e[6] * e[15] + e[9] * e[7] * e[14] + e[13] * e[6] * e[11] - e[13] * e[7] * e[10]\n ),\n invDet * (\n -e[1] * e[10] * e[15] + e[1] * e[11] * e[14] + e[9] * e[2] * e[15] - e[9] * e[3] * e[14] - e[13] * e[2] * e[11] + e[13] * e[3] * e[10]\n ),\n invDet * (\n e[1] * e[6] * e[15] - e[1] * e[7] * e[14] - e[5] * e[2] * e[15] + e[5] * e[3] * e[14] + e[13] * e[2] * e[7] - e[13] * e[3] * e[6]\n ),\n invDet * (\n -e[1] * e[6] * e[11] + e[1] * e[7] * e[10] + e[5] * e[2] * e[11] - e[5] * e[3] * e[10] - e[9] * e[2] * e[7] + e[9] * e[3] * e[6]\n ),\n invDet * (\n -e[4] * e[10] * e[15] + e[4] * e[11] * e[14] + e[8] * e[6] * e[15] - e[8] * e[7] * e[14] - e[12] * e[6] * e[11] + e[12] * e[7] * e[10]\n ),\n invDet * (\n e[0] * e[10] * e[15] - e[0] * e[11] * e[14] - e[8] * e[2] * e[15] + e[8] * e[3] * e[14] + e[12] * e[2] * e[11] - e[12] * e[3] * e[10]\n ),\n invDet * (\n -e[0] * e[6] * e[15] + e[0] * e[7] * e[14] + e[4] * e[2] * e[15] - e[4] * e[3] * e[14] - e[12] * e[2] * e[7] + e[12] * e[3] * e[6]\n ),\n invDet * (\n e[0] * e[6] * e[11] - e[0] * e[7] * e[10] - e[4] * e[2] * e[11] + e[4] * e[3] * e[10] + e[8] * e[2] * e[7] - e[8] * e[3] * e[6]\n ),\n invDet * (\n e[4] * e[9] * e[15] - e[4] * e[11] * e[13] - e[8] * e[5] * e[15] + e[8] * e[7] * e[13] + e[12] * e[5] * e[11] - e[12] * e[7] * e[9]\n ),\n invDet * (\n -e[0] * e[9] * e[15] + e[0] * e[11] * e[13] + e[8] * e[1] * e[15] - e[8] * e[3] * e[13] - e[12] * e[1] * e[11] + e[12] * e[3] * e[9]\n ),\n invDet * (\n e[0] * e[5] * e[15] - e[0] * e[7] * e[13] - e[4] * e[1] * e[15] + e[4] * e[3] * e[13] + e[12] * e[1] * e[7] - e[12] * e[3] * e[5]\n ),\n invDet * (\n -e[0] * e[5] * e[11] + e[0] * e[7] * e[9] + e[4] * e[1] * e[11] - e[4] * e[3] * e[9] - e[8] * e[1] * e[7] + e[8] * e[3] * e[5]\n ),\n invDet * (\n -e[4] * e[9] * e[14] + e[4] * e[10] * e[13] + e[8] * e[5] * e[14] - e[8] * e[6] * e[13] - e[12] * e[5] * e[10] + e[12] * e[6] * e[9]\n ),\n invDet * (\n e[0] * e[9] * e[14] - e[0] * e[10] * e[13] - e[8] * e[1] * e[14] + e[8] * e[2] * e[13] + e[12] * e[1] * e[10] - e[12] * e[2] * e[9]\n ),\n invDet * (\n -e[0] * e[5] * e[14] + e[0] * e[6] * e[13] + e[4] * e[1] * e[14] - e[4] * e[2] * e[13] - e[12] * e[1] * e[6] + e[12] * e[2] * e[5]\n ),\n invDet * (\n e[0] * e[5] * e[10] - e[0] * e[6] * e[9] - e[4] * e[1] * e[10] + e[4] * e[2] * e[9] + e[8] * e[1] * e[6] - e[8] * e[2] * e[5]\n ),\n );\n }\n\n static Compose(position: Vector3, rotation: Quaternion, scale: Vector3): Matrix4 {\n const x = rotation.x,\n y = rotation.y,\n z = rotation.z,\n w = rotation.w;\n const x2 = x + x,\n y2 = y + y,\n z2 = z + z;\n const xx = x * x2,\n xy = x * y2,\n xz = x * z2;\n const yy = y * y2,\n yz = y * z2,\n zz = z * z2;\n const wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n const sx = scale.x,\n sy = scale.y,\n sz = scale.z;\n // prettier-ignore\n return new Matrix4(\n (1 - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1 - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1 - (xx + yy)) * sz, 0,\n position.x, position.y, position.z, 1\n );\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix4 };\n", "import { Object3D } from \"../core/Object3D\";\n\nclass ObjectAddedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectAdded\");\n }\n}\n\nclass ObjectRemovedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectRemoved\");\n }\n}\n\nclass ObjectChangedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectChanged\");\n }\n}\n\nexport { ObjectAddedEvent, ObjectRemovedEvent, ObjectChangedEvent };\n", "import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { ObjectChangedEvent } from \"../events/Events\";\n\nabstract class Object3D extends EventDispatcher {\n public positionChanged: boolean = false;\n public rotationChanged: boolean = false;\n public scaleChanged: boolean = false;\n\n protected _position: Vector3 = new Vector3();\n protected _rotation: Quaternion = new Quaternion();\n protected _scale: Vector3 = new Vector3(1, 1, 1);\n protected _transform: Matrix4 = new Matrix4();\n\n protected _changeEvent = new ObjectChangedEvent(this);\n\n update: () => void;\n applyPosition: () => void;\n applyRotation: () => void;\n applyScale: () => void;\n\n constructor() {\n super();\n\n this.update = () => {};\n\n this.applyPosition = () => {\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n protected _updateMatrix() {\n this._transform = Matrix4.Compose(this._position, this._rotation, this._scale);\n }\n\n get position() {\n return this._position;\n }\n\n set position(position: Vector3) {\n if (!this._position.equals(position)) {\n this._position = position;\n this.positionChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get rotation() {\n return this._rotation;\n }\n\n set rotation(rotation: Quaternion) {\n if (!this._rotation.equals(rotation)) {\n this._rotation = rotation;\n this.rotationChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get scale() {\n return this._scale;\n }\n\n set scale(scale: Vector3) {\n if (!this._scale.equals(scale)) {\n this._scale = scale;\n this.scaleChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get forward() {\n let forward = new Vector3(0, 0, 1);\n forward = this.rotation.apply(forward);\n return forward;\n }\n\n get transform() {\n return this._transform;\n }\n}\n\nexport { Object3D };\n", "import { Quaternion } from \"./Quaternion\";\nimport type { Vector3 } from \"./Vector3\";\n\nclass Matrix3 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0,\n n21: number = 0, n22: number = 1, n23: number = 0,\n n31: number = 0, n32: number = 0, n33: number = 1) {\n this.buffer = [\n n11, n12, n13,\n n21, n22, n23,\n n31, n32, n33\n ];\n }\n\n equals(m: Matrix3): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(v: Matrix3): Matrix3 {\n const a = this.buffer;\n const b = v.buffer;\n return new Matrix3(\n b[0] * a[0] + b[3] * a[1] + b[6] * a[2],\n b[1] * a[0] + b[4] * a[1] + b[7] * a[2],\n b[2] * a[0] + b[5] * a[1] + b[8] * a[2],\n b[0] * a[3] + b[3] * a[4] + b[6] * a[5],\n b[1] * a[3] + b[4] * a[4] + b[7] * a[5],\n b[2] * a[3] + b[5] * a[4] + b[8] * a[5],\n b[0] * a[6] + b[3] * a[7] + b[6] * a[8],\n b[1] * a[6] + b[4] * a[7] + b[7] * a[8],\n b[2] * a[6] + b[5] * a[7] + b[8] * a[8],\n );\n }\n\n clone(): Matrix3 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix3(\n e[0], e[1], e[2],\n e[3], e[4], e[5],\n e[6], e[7], e[8]\n );\n }\n\n static Eye(v: number = 1): Matrix3 {\n return new Matrix3(v, 0, 0, 0, v, 0, 0, 0, v);\n }\n\n static Diagonal(v: Vector3): Matrix3 {\n return new Matrix3(v.x, 0, 0, 0, v.y, 0, 0, 0, v.z);\n }\n\n static RotationFromQuaternion(q: Quaternion): Matrix3 {\n const matrix = new Matrix3(\n 1 - 2 * q.y * q.y - 2 * q.z * q.z,\n 2 * q.x * q.y - 2 * q.z * q.w,\n 2 * q.x * q.z + 2 * q.y * q.w,\n 2 * q.x * q.y + 2 * q.z * q.w,\n 1 - 2 * q.x * q.x - 2 * q.z * q.z,\n 2 * q.y * q.z - 2 * q.x * q.w,\n 2 * q.x * q.z - 2 * q.y * q.w,\n 2 * q.y * q.z + 2 * q.x * q.w,\n 1 - 2 * q.x * q.x - 2 * q.y * q.y,\n );\n return matrix;\n }\n\n static RotationFromEuler(m: Vector3): Matrix3 {\n const cx = Math.cos(m.x);\n const sx = Math.sin(m.x);\n const cy = Math.cos(m.y);\n const sy = Math.sin(m.y);\n const cz = Math.cos(m.z);\n const sz = Math.sin(m.z);\n\n const rotationMatrix = [\n cy * cz + sy * sx * sz,\n -cy * sz + sy * sx * cz,\n sy * cx,\n cx * sz,\n cx * cz,\n -sx,\n -sy * cz + cy * sx * sz,\n sy * sz + cy * sx * cz,\n cy * cx,\n ];\n\n return new Matrix3(...rotationMatrix);\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix3 };\n", "import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\n\nclass SplatData {\n static RowLength = 3 * 4 + 3 * 4 + 4 + 4;\n\n public changed = false;\n public detached = false;\n\n private _vertexCount: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _colors: Uint8Array;\n private _selection: Uint8Array;\n\n translate: (translation: Vector3) => void;\n rotate: (rotation: Quaternion) => void;\n scale: (scale: Vector3) => void;\n serialize: () => Uint8Array;\n reattach: (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => void;\n\n constructor(\n vertexCount: number = 0,\n positions: Float32Array | null = null,\n rotations: Float32Array | null = null,\n scales: Float32Array | null = null,\n colors: Uint8Array | null = null,\n ) {\n this._vertexCount = vertexCount;\n this._positions = positions || new Float32Array(0);\n this._rotations = rotations || new Float32Array(0);\n this._scales = scales || new Float32Array(0);\n this._colors = colors || new Uint8Array(0);\n this._selection = new Uint8Array(this.vertexCount);\n\n this.translate = (translation: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] += translation.x;\n this.positions[3 * i + 1] += translation.y;\n this.positions[3 * i + 2] += translation.z;\n }\n\n this.changed = true;\n };\n\n this.rotate = (rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n for (let i = 0; i < this.vertexCount; i++) {\n const x = this.positions[3 * i + 0];\n const y = this.positions[3 * i + 1];\n const z = this.positions[3 * i + 2];\n\n this.positions[3 * i + 0] = R[0] * x + R[1] * y + R[2] * z;\n this.positions[3 * i + 1] = R[3] * x + R[4] * y + R[5] * z;\n this.positions[3 * i + 2] = R[6] * x + R[7] * y + R[8] * z;\n\n const currentRotation = new Quaternion(\n this.rotations[4 * i + 1],\n this.rotations[4 * i + 2],\n this.rotations[4 * i + 3],\n this.rotations[4 * i + 0],\n );\n\n const newRot = rotation.multiply(currentRotation);\n this.rotations[4 * i + 1] = newRot.x;\n this.rotations[4 * i + 2] = newRot.y;\n this.rotations[4 * i + 3] = newRot.z;\n this.rotations[4 * i + 0] = newRot.w;\n }\n\n this.changed = true;\n };\n\n this.scale = (scale: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] *= scale.x;\n this.positions[3 * i + 1] *= scale.y;\n this.positions[3 * i + 2] *= scale.z;\n\n this.scales[3 * i + 0] *= scale.x;\n this.scales[3 * i + 1] *= scale.y;\n this.scales[3 * i + 2] *= scale.z;\n }\n\n this.changed = true;\n };\n\n this.serialize = () => {\n const data = new Uint8Array(this.vertexCount * SplatData.RowLength);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < this.vertexCount; i++) {\n f_buffer[8 * i + 0] = this.positions[3 * i + 0];\n f_buffer[8 * i + 1] = this.positions[3 * i + 1];\n f_buffer[8 * i + 2] = this.positions[3 * i + 2];\n\n u_buffer[32 * i + 24 + 0] = this.colors[4 * i + 0];\n u_buffer[32 * i + 24 + 1] = this.colors[4 * i + 1];\n u_buffer[32 * i + 24 + 2] = this.colors[4 * i + 2];\n u_buffer[32 * i + 24 + 3] = this.colors[4 * i + 3];\n\n f_buffer[8 * i + 3 + 0] = this.scales[3 * i + 0];\n f_buffer[8 * i + 3 + 1] = this.scales[3 * i + 1];\n f_buffer[8 * i + 3 + 2] = this.scales[3 * i + 2];\n\n u_buffer[32 * i + 28 + 0] = (this.rotations[4 * i + 0] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 1] = (this.rotations[4 * i + 1] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 2] = (this.rotations[4 * i + 2] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 3] = (this.rotations[4 * i + 3] * 128 + 128) & 0xff;\n }\n\n return data;\n };\n\n this.reattach = (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => {\n console.assert(\n positions.byteLength === this.vertexCount * 3 * 4,\n `Expected ${this.vertexCount * 3 * 4} bytes, got ${positions.byteLength} bytes`,\n );\n this._positions = new Float32Array(positions);\n this._rotations = new Float32Array(rotations);\n this._scales = new Float32Array(scales);\n this._colors = new Uint8Array(colors);\n this._selection = new Uint8Array(selection);\n this.detached = false;\n };\n }\n\n static Deserialize(data: Uint8Array): SplatData {\n const vertexCount = data.length / SplatData.RowLength;\n const positions = new Float32Array(3 * vertexCount);\n const rotations = new Float32Array(4 * vertexCount);\n const scales = new Float32Array(3 * vertexCount);\n const colors = new Uint8Array(4 * vertexCount);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < vertexCount; i++) {\n positions[3 * i + 0] = f_buffer[8 * i + 0];\n positions[3 * i + 1] = f_buffer[8 * i + 1];\n positions[3 * i + 2] = f_buffer[8 * i + 2];\n\n rotations[4 * i + 0] = (u_buffer[32 * i + 28 + 0] - 128) / 128;\n rotations[4 * i + 1] = (u_buffer[32 * i + 28 + 1] - 128) / 128;\n rotations[4 * i + 2] = (u_buffer[32 * i + 28 + 2] - 128) / 128;\n rotations[4 * i + 3] = (u_buffer[32 * i + 28 + 3] - 128) / 128;\n\n scales[3 * i + 0] = f_buffer[8 * i + 3 + 0];\n scales[3 * i + 1] = f_buffer[8 * i + 3 + 1];\n scales[3 * i + 2] = f_buffer[8 * i + 3 + 2];\n\n colors[4 * i + 0] = u_buffer[32 * i + 24 + 0];\n colors[4 * i + 1] = u_buffer[32 * i + 24 + 1];\n colors[4 * i + 2] = u_buffer[32 * i + 24 + 2];\n colors[4 * i + 3] = u_buffer[32 * i + 24 + 3];\n }\n\n return new SplatData(vertexCount, positions, rotations, scales, colors);\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get colors() {\n return this._colors;\n }\n\n get selection() {\n return this._selection;\n }\n}\n\nexport { SplatData };\n", "import { SplatData } from \"./SplatData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\n\nclass Splat extends Object3D {\n public selectedChanged: boolean = false;\n\n private _data: SplatData;\n private _selected: boolean = false;\n\n constructor(splat: SplatData | undefined = undefined) {\n super();\n\n this._data = splat || new SplatData();\n\n this.applyPosition = () => {\n this.data.translate(this.position);\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.data.rotate(this.rotation);\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.data.scale(this.scale);\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `splat-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n this.applyRotation();\n this.applyScale();\n this.applyPosition();\n\n const buffer = this.data.serialize();\n const blob = new Blob([buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get data() {\n return this._data;\n }\n\n get selected() {\n return this._selected;\n }\n\n set selected(selected: boolean) {\n if (this._selected !== selected) {\n this._selected = selected;\n this.selectedChanged = true;\n this.dispatchEvent(this._changeEvent);\n }\n }\n}\n\nexport { Splat };\n", "import { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass CameraData {\n private _fx: number = 1132;\n private _fy: number = 1132;\n private _near: number = 0.1;\n private _far: number = 100;\n\n private _width: number = 512;\n private _height: number = 512;\n\n private _projectionMatrix: Matrix4 = new Matrix4();\n private _viewMatrix: Matrix4 = new Matrix4();\n private _viewProj: Matrix4 = new Matrix4();\n\n update: (position: Vector3, rotation: Quaternion) => void;\n setSize: (width: number, height: number) => void;\n\n private _updateProjectionMatrix: () => void;\n\n constructor() {\n this._updateProjectionMatrix = () => {\n // prettier-ignore\n this._projectionMatrix = new Matrix4(\n 2 * this.fx / this.width, 0, 0, 0,\n 0, -2 * this.fy / this.height, 0, 0,\n 0, 0, this.far / (this.far - this.near), 1,\n 0, 0, -(this.far * this.near) / (this.far - this.near), 0\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.update = (position: Vector3, rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n const t = position.flat();\n\n // prettier-ignore\n this._viewMatrix = new Matrix4(\n R[0], R[1], R[2], 0,\n R[3], R[4], R[5], 0,\n R[6], R[7], R[8], 0,\n -t[0] * R[0] - t[1] * R[3] - t[2] * R[6],\n -t[0] * R[1] - t[1] * R[4] - t[2] * R[7],\n -t[0] * R[2] - t[1] * R[5] - t[2] * R[8],\n 1,\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.setSize = (width: number, height: number) => {\n this._width = width;\n this._height = height;\n this._updateProjectionMatrix();\n };\n }\n\n get fx() {\n return this._fx;\n }\n\n set fx(fx: number) {\n if (this._fx !== fx) {\n this._fx = fx;\n this._updateProjectionMatrix();\n }\n }\n\n get fy() {\n return this._fy;\n }\n\n set fy(fy: number) {\n if (this._fy !== fy) {\n this._fy = fy;\n this._updateProjectionMatrix();\n }\n }\n\n get near() {\n return this._near;\n }\n\n set near(near: number) {\n if (this._near !== near) {\n this._near = near;\n this._updateProjectionMatrix();\n }\n }\n\n get far() {\n return this._far;\n }\n\n set far(far: number) {\n if (this._far !== far) {\n this._far = far;\n this._updateProjectionMatrix();\n }\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get projectionMatrix() {\n return this._projectionMatrix;\n }\n\n get viewMatrix() {\n return this._viewMatrix;\n }\n\n get viewProj() {\n return this._viewProj;\n }\n}\n\nexport { CameraData };\n", "import { Matrix4 } from \"./Matrix4\";\n\nclass Vector4 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(v: Vector4): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n if (this.w !== v.w) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector4;\n add(v: Vector4): Vector4;\n add(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x + v, this.y + v, this.z + v, this.w + v);\n } else {\n return new Vector4(this.x + v.x, this.y + v.y, this.z + v.z, this.w + v.w);\n }\n }\n\n subtract(v: number): Vector4;\n subtract(v: Vector4): Vector4;\n subtract(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x - v, this.y - v, this.z - v, this.w - v);\n } else {\n return new Vector4(this.x - v.x, this.y - v.y, this.z - v.z, this.w - v.w);\n }\n }\n\n multiply(v: number): Vector4;\n multiply(v: Vector4): Vector4;\n multiply(v: Matrix4): Vector4;\n multiply(v: number | Vector4 | Matrix4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x * v, this.y * v, this.z * v, this.w * v);\n } else if (v instanceof Vector4) {\n return new Vector4(this.x * v.x, this.y * v.y, this.z * v.z, this.w * v.w);\n } else {\n return new Vector4(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + this.w * v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + this.w * v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + this.w * v.buffer[14],\n this.x * v.buffer[3] + this.y * v.buffer[7] + this.z * v.buffer[11] + this.w * v.buffer[15],\n );\n }\n }\n\n dot(v: Vector4): number {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n }\n\n lerp(v: Vector4, t: number): Vector4 {\n return new Vector4(\n this.x + (v.x - this.x) * t,\n this.y + (v.y - this.y) * t,\n this.z + (v.z - this.z) * t,\n this.w + (v.w - this.w) * t,\n );\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n\n distanceTo(v: Vector4): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2 + (this.w - v.w) ** 2);\n }\n\n normalize(): Vector4 {\n const length = this.magnitude();\n\n return new Vector4(this.x / length, this.y / length, this.z / length, this.w / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Vector4 {\n return new Vector4(this.x, this.y, this.z, this.w);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Vector4 };\n", "import { CameraData } from \"./CameraData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Vector4 } from \"../math/Vector4\";\n\nclass Camera extends Object3D {\n private _data: CameraData;\n\n screenPointToRay: (x: number, y: number) => Vector3;\n\n constructor(camera: CameraData | undefined = undefined) {\n super();\n\n this._data = camera ? camera : new CameraData();\n this._position = new Vector3(0, 0, -5);\n\n this.update = () => {\n this.data.update(this.position, this.rotation);\n };\n\n this.screenPointToRay = (x: number, y: number) => {\n const clipSpaceCoords = new Vector4(x, y, -1, 1);\n const inverseProjectionMatrix = this._data.projectionMatrix.invert();\n const cameraSpaceCoords = clipSpaceCoords.multiply(inverseProjectionMatrix);\n const inverseViewMatrix = this._data.viewMatrix.invert();\n const worldSpaceCoords = cameraSpaceCoords.multiply(inverseViewMatrix);\n const worldSpacePosition = new Vector3(\n worldSpaceCoords.x / worldSpaceCoords.w,\n worldSpaceCoords.y / worldSpaceCoords.w,\n worldSpaceCoords.z / worldSpaceCoords.w,\n );\n const direction = worldSpacePosition.subtract(this.position).normalize();\n return direction;\n };\n }\n\n get data() {\n return this._data;\n }\n}\n\nexport { Camera };\n", "import { Object3D } from \"./Object3D\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { ObjectAddedEvent, ObjectRemovedEvent } from \"../events/Events\";\n\nclass Scene extends EventDispatcher {\n private _objects: Object3D[] = [];\n\n addObject: (object: Object3D) => void;\n removeObject: (object: Object3D) => void;\n findObject: (predicate: (object: Object3D) => boolean) => Object3D | undefined;\n findObjectOfType: (type: { new (): T }) => T | undefined;\n reset: () => void;\n\n constructor() {\n super();\n\n this.addObject = (object: Object3D) => {\n this.objects.push(object);\n this.dispatchEvent(new ObjectAddedEvent(object));\n };\n\n this.removeObject = (object: Object3D) => {\n const index = this.objects.indexOf(object);\n if (index < 0) {\n throw new Error(\"Object not found in scene\");\n }\n this.objects.splice(index, 1);\n this.dispatchEvent(new ObjectRemovedEvent(object));\n };\n\n this.findObject = (predicate: (object: Object3D) => boolean) => {\n for (const object of this.objects) {\n if (predicate(object)) {\n return object;\n }\n }\n return undefined;\n };\n\n this.findObjectOfType = (type: { new (): T }) => {\n for (const object of this.objects) {\n if (object instanceof type) {\n return object;\n }\n }\n return undefined;\n };\n\n this.reset = () => {\n const objectsToRemove = this.objects.slice();\n for (const object of objectsToRemove) {\n this.removeObject(object);\n }\n };\n\n this.reset();\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `scene-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n const buffers: Uint8Array[] = [];\n let vertexCount = 0;\n\n for (const object of this.objects) {\n object.applyRotation();\n object.applyScale();\n object.applyPosition();\n if (object instanceof Splat) {\n const buffer = object.data.serialize();\n buffers.push(buffer);\n vertexCount += object.data.vertexCount;\n }\n }\n\n const data = new Uint8Array(vertexCount * SplatData.RowLength);\n let offset = 0;\n for (const buffer of buffers) {\n data.set(buffer, offset);\n offset += buffer.length;\n }\n\n const blob = new Blob([data.buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get objects() {\n return this._objects;\n }\n}\n\nexport { Scene };\n", "import type { Scene } from \"../core/Scene\";\nimport { Splat } from \"../splats/Splat\";\nimport { SplatData } from \"../splats/SplatData\";\n\nclass Loader {\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const buffer = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(file: File, scene: Scene, onProgress?: (progress: number) => void): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(e.target!.result as ArrayBuffer);\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n}\n\nexport { Loader };\n", "import { Scene } from \"../core/Scene\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\n\nclass PLYLoader {\n static SH_C0 = 0.28209479177387814;\n\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const plyData = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n plyData.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n if (plyData[0] !== 112 || plyData[1] !== 108 || plyData[2] !== 121 || plyData[3] !== 10) {\n throw new Error(\"Invalid PLY file\");\n }\n\n const buffer = new Uint8Array(this._ParsePLYBuffer(plyData.buffer, format));\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(\n file: File,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n ): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(this._ParsePLYBuffer(e.target!.result as ArrayBuffer, format));\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n\n private static _ParsePLYBuffer(inputBuffer: ArrayBuffer, format: string): ArrayBuffer {\n type PlyProperty = {\n name: string;\n type: string;\n offset: number;\n };\n\n const ubuf = new Uint8Array(inputBuffer);\n const headerText = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));\n const header_end = \"end_header\\n\";\n const header_end_index = headerText.indexOf(header_end);\n if (header_end_index < 0) throw new Error(\"Unable to read .ply file header\");\n\n const vertexCount = parseInt(/element vertex (\\d+)\\n/.exec(headerText)![1]);\n\n let rowOffset = 0;\n const offsets: Record = {\n double: 8,\n int: 4,\n uint: 4,\n float: 4,\n short: 2,\n ushort: 2,\n uchar: 1,\n };\n\n const properties: PlyProperty[] = [];\n for (const prop of headerText\n .slice(0, header_end_index)\n .split(\"\\n\")\n .filter((k) => k.startsWith(\"property \"))) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_p, type, name] = prop.split(\" \");\n properties.push({ name, type, offset: rowOffset });\n if (!offsets[type]) throw new Error(`Unsupported property type: ${type}`);\n rowOffset += offsets[type];\n }\n\n const dataView = new DataView(inputBuffer, header_end_index + header_end.length);\n const buffer = new ArrayBuffer(SplatData.RowLength * vertexCount);\n\n const q_polycam = Quaternion.FromEuler(new Vector3(Math.PI / 2, 0, 0));\n\n for (let i = 0; i < vertexCount; i++) {\n const position = new Float32Array(buffer, i * SplatData.RowLength, 3);\n const scale = new Float32Array(buffer, i * SplatData.RowLength + 12, 3);\n const rgba = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 24, 4);\n const rot = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 28, 4);\n\n let r0: number = 255;\n let r1: number = 0;\n let r2: number = 0;\n let r3: number = 0;\n\n properties.forEach((property) => {\n let value;\n switch (property.type) {\n case \"float\":\n value = dataView.getFloat32(property.offset + i * rowOffset, true);\n break;\n case \"int\":\n value = dataView.getInt32(property.offset + i * rowOffset, true);\n break;\n default:\n throw new Error(`Unsupported property type: ${property.type}`);\n }\n\n switch (property.name) {\n case \"x\":\n position[0] = value;\n break;\n case \"y\":\n position[1] = value;\n break;\n case \"z\":\n position[2] = value;\n break;\n case \"scale_0\":\n scale[0] = Math.exp(value);\n break;\n case \"scale_1\":\n scale[1] = Math.exp(value);\n break;\n case \"scale_2\":\n scale[2] = Math.exp(value);\n break;\n case \"red\":\n rgba[0] = value;\n break;\n case \"green\":\n rgba[1] = value;\n break;\n case \"blue\":\n rgba[2] = value;\n break;\n case \"f_dc_0\":\n rgba[0] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_1\":\n rgba[1] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_2\":\n rgba[2] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_3\":\n rgba[3] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"opacity\":\n rgba[3] = (1 / (1 + Math.exp(-value))) * 255;\n break;\n case \"rot_0\":\n r0 = value;\n break;\n case \"rot_1\":\n r1 = value;\n break;\n case \"rot_2\":\n r2 = value;\n break;\n case \"rot_3\":\n r3 = value;\n break;\n }\n });\n\n let q = new Quaternion(r1, r2, r3, r0);\n\n switch (format) {\n case \"polycam\": {\n const temp = position[1];\n position[1] = -position[2];\n position[2] = temp;\n q = q_polycam.multiply(q);\n break;\n }\n case \"\":\n break;\n default:\n throw new Error(`Unsupported format: ${format}`);\n }\n\n q = q.normalize();\n rot[0] = q.w * 128 + 128;\n rot[1] = q.x * 128 + 128;\n rot[2] = q.y * 128 + 128;\n rot[3] = q.z * 128 + 128;\n }\n\n return buffer;\n }\n}\n\nexport { PLYLoader };\n", "import { Camera } from \"../../../cameras/Camera\";\nimport { Scene } from \"../../../core/Scene\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\n\nabstract class ShaderProgram {\n private _renderer: WebGLRenderer;\n private _program: WebGLProgram;\n private _passes: ShaderPass[];\n\n protected _scene: Scene | null = null;\n protected _camera: Camera | null = null;\n protected _started: boolean = false;\n protected _initialized: boolean = false;\n\n protected abstract _initialize: () => void;\n protected abstract _resize: () => void;\n protected abstract _render: () => void;\n protected abstract _dispose: () => void;\n\n initialize: () => void;\n resize: () => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n this._renderer = renderer;\n const gl = renderer.gl;\n\n this._program = gl.createProgram() as WebGLProgram;\n this._passes = passes || [];\n\n const vertexShader = gl.createShader(gl.VERTEX_SHADER) as WebGLShader;\n gl.shaderSource(vertexShader, this._getVertexSource());\n gl.compileShader(vertexShader);\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(vertexShader));\n }\n\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER) as WebGLShader;\n gl.shaderSource(fragmentShader, this._getFragmentSource());\n gl.compileShader(fragmentShader);\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(fragmentShader));\n }\n\n gl.attachShader(this.program, vertexShader);\n gl.attachShader(this.program, fragmentShader);\n gl.linkProgram(this.program);\n if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {\n console.error(gl.getProgramInfoLog(this.program));\n }\n\n this.resize = () => {\n gl.useProgram(this._program);\n\n this._resize();\n };\n\n this.initialize = () => {\n console.assert(!this._initialized, \"ShaderProgram already initialized\");\n\n gl.useProgram(this._program);\n\n this._initialize();\n for (const pass of this.passes) {\n pass.initialize(this);\n }\n\n this._initialized = true;\n this._started = true;\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n gl.useProgram(this._program);\n\n if (this._scene !== scene || this._camera !== camera) {\n this.dispose();\n this._scene = scene;\n this._camera = camera;\n this.initialize();\n }\n\n for (const pass of this.passes) {\n pass.render();\n }\n\n this._render();\n };\n\n this.dispose = () => {\n if (!this._initialized) return;\n\n gl.useProgram(this._program);\n\n for (const pass of this.passes) {\n pass.dispose();\n }\n\n this._dispose();\n\n this._scene = null;\n this._camera = null;\n this._initialized = false;\n };\n }\n\n get renderer() {\n return this._renderer;\n }\n\n get scene() {\n return this._scene;\n }\n\n get camera() {\n return this._camera;\n }\n\n get program() {\n return this._program;\n }\n\n get passes() {\n return this._passes;\n }\n\n get started() {\n return this._started;\n }\n\n protected abstract _getVertexSource(): string;\n protected abstract _getFragmentSource(): string;\n}\n\nexport { ShaderProgram };\n", "\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxkGAWsCAAFsAA4BbQAZAW4BAAFvABgBcAAPCRUBAEEBCw8RIw0WFiINIRocHw0bHR4K6VAacQEBfyACRQRAIAAoAgQgASgCBEYPCyAAIAFGBEBBAQ8LAkAgACgCBCICLQAAIgBFIAAgASgCBCIBLQAAIgNHcg0AA0AgAS0AASEDIAItAAEiAEUNASABQQFqIQEgAkEBaiECIAAgA0YNAAsLIAAgA0YL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JAwAAHQAAACgCwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _pack=Module[\"_pack\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)=>(_pack=Module[\"_pack\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;", "import { Scene } from \"../../../core/Scene\";\nimport { Splat } from \"../../../splats/Splat\";\nimport DataWorker from \"web-worker:./DataWorker.ts\";\nimport loadWasm from \"../../../wasm/data\";\n\nclass RenderData {\n public dataChanged = false;\n public transformsChanged = false;\n\n private _splatIndices: Map;\n private _offsets: Map;\n private _data: Uint32Array;\n private _width: number;\n private _height: number;\n private _transforms: Float32Array;\n private _transformsWidth: number;\n private _transformsHeight: number;\n private _transformIndices: Uint32Array;\n private _transformIndicesWidth: number;\n private _transformIndicesHeight: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _vertexCount: number;\n private _updating: Set = new Set();\n private _dirty: Set = new Set();\n private _worker: Worker;\n\n getSplat: (index: number) => Splat | null;\n getLocalIndex: (splat: Splat, index: number) => number;\n markDirty: (splat: Splat) => void;\n rebuild: () => void;\n dispose: () => void;\n\n constructor(scene: Scene) {\n let vertexCount = 0;\n let splatIndex = 0;\n this._splatIndices = new Map();\n this._offsets = new Map();\n const lookup = new Map();\n for (const object of scene.objects) {\n if (object instanceof Splat) {\n this._splatIndices.set(object, splatIndex);\n this._offsets.set(object, vertexCount);\n lookup.set(vertexCount, object);\n vertexCount += object.data.vertexCount;\n splatIndex++;\n }\n }\n\n this._vertexCount = vertexCount;\n this._width = 2048;\n this._height = Math.ceil((2 * this.vertexCount) / this.width);\n this._data = new Uint32Array(this.width * this.height * 4);\n\n this._transformsWidth = 5;\n this._transformsHeight = lookup.size;\n this._transforms = new Float32Array(this._transformsWidth * this._transformsHeight * 4);\n\n this._transformIndicesWidth = 1024;\n this._transformIndicesHeight = Math.ceil(this.vertexCount / this._transformIndicesWidth);\n this._transformIndices = new Uint32Array(this._transformIndicesWidth * this._transformIndicesHeight);\n\n this._positions = new Float32Array(this.vertexCount * 3);\n this._rotations = new Float32Array(this.vertexCount * 4);\n this._scales = new Float32Array(this.vertexCount * 3);\n\n this._worker = new DataWorker();\n\n const updateTransform = (splat: Splat) => {\n const splatIndex = this._splatIndices.get(splat) as number;\n this._transforms.set(splat.transform.buffer, splatIndex * 20);\n this._transforms[splatIndex * 20 + 16] = splat.selected ? 1 : 0;\n splat.positionChanged = false;\n splat.rotationChanged = false;\n splat.scaleChanged = false;\n splat.selectedChanged = false;\n this.transformsChanged = true;\n };\n\n this._worker.onmessage = (e) => {\n if (e.data.response) {\n const response = e.data.response;\n const splat = lookup.get(response.offset) as Splat;\n updateTransform(splat);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[response.offset + i] = splatIndex;\n }\n\n this._data.set(response.data, response.offset * 8);\n splat.data.reattach(\n response.positions,\n response.rotations,\n response.scales,\n response.colors,\n response.selection,\n );\n\n this._positions.set(response.worldPositions, response.offset * 3);\n this._rotations.set(response.worldRotations, response.offset * 4);\n this._scales.set(response.worldScales, response.offset * 3);\n\n this._updating.delete(splat);\n\n splat.selectedChanged = false;\n\n this.dataChanged = true;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n async function initWasm() {\n wasmModule = await loadWasm();\n }\n\n initWasm();\n\n async function waitForWasm() {\n while (!wasmModule) {\n await new Promise((resolve) => setTimeout(resolve, 0));\n }\n }\n\n const buildImmediate = (splat: Splat) => {\n if (!wasmModule) {\n waitForWasm().then(() => {\n buildImmediate(splat);\n });\n return;\n }\n\n updateTransform(splat);\n\n const positionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const rotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const scalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const colorsPtr = wasmModule._malloc(4 * splat.data.vertexCount);\n const selectionPtr = wasmModule._malloc(splat.data.vertexCount);\n const dataPtr = wasmModule._malloc(8 * splat.data.vertexCount * 4);\n const worldPositionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const worldRotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const worldScalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n\n wasmModule.HEAPF32.set(splat.data.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.scales, scalesPtr / 4);\n wasmModule.HEAPU8.set(splat.data.colors, colorsPtr);\n wasmModule.HEAPU8.set(splat.data.selection, selectionPtr);\n\n wasmModule._pack(\n splat.selected,\n splat.data.vertexCount,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n colorsPtr,\n selectionPtr,\n dataPtr,\n worldPositionsPtr,\n worldRotationsPtr,\n worldScalesPtr,\n );\n\n const outData = new Uint32Array(wasmModule.HEAPU32.buffer, dataPtr, splat.data.vertexCount * 8);\n const worldPositions = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldPositionsPtr,\n splat.data.vertexCount * 3,\n );\n const worldRotations = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldRotationsPtr,\n splat.data.vertexCount * 4,\n );\n const worldScales = new Float32Array(wasmModule.HEAPF32.buffer, worldScalesPtr, splat.data.vertexCount * 3);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n const offset = this._offsets.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[offset + i] = splatIndex;\n }\n this._data.set(outData, offset * 8);\n this._positions.set(worldPositions, offset * 3);\n this._rotations.set(worldRotations, offset * 4);\n this._scales.set(worldScales, offset * 3);\n\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(colorsPtr);\n wasmModule._free(selectionPtr);\n wasmModule._free(dataPtr);\n wasmModule._free(worldPositionsPtr);\n wasmModule._free(worldRotationsPtr);\n wasmModule._free(worldScalesPtr);\n\n this.dataChanged = true;\n };\n\n const build = (splat: Splat) => {\n if (splat.positionChanged || splat.rotationChanged || splat.scaleChanged || splat.selectedChanged) {\n updateTransform(splat);\n }\n\n if (!splat.data.changed || splat.data.detached) return;\n\n const serializedSplat = {\n position: new Float32Array(splat.position.flat()),\n rotation: new Float32Array(splat.rotation.flat()),\n scale: new Float32Array(splat.scale.flat()),\n selected: splat.selected,\n vertexCount: splat.data.vertexCount,\n positions: splat.data.positions,\n rotations: splat.data.rotations,\n scales: splat.data.scales,\n colors: splat.data.colors,\n selection: splat.data.selection,\n offset: this._offsets.get(splat) as number,\n };\n\n this._worker.postMessage(\n {\n splat: serializedSplat,\n },\n [\n serializedSplat.position.buffer,\n serializedSplat.rotation.buffer,\n serializedSplat.scale.buffer,\n serializedSplat.positions.buffer,\n serializedSplat.rotations.buffer,\n serializedSplat.scales.buffer,\n serializedSplat.colors.buffer,\n serializedSplat.selection.buffer,\n ],\n );\n\n this._updating.add(splat);\n\n splat.data.detached = true;\n };\n\n this.getSplat = (index: number) => {\n let splat = null;\n for (const [key, value] of this._offsets) {\n if (index >= value) {\n splat = key;\n } else {\n break;\n }\n }\n return splat;\n };\n\n this.getLocalIndex = (splat: Splat, index: number) => {\n const offset = this._offsets.get(splat) as number;\n return index - offset;\n };\n\n this.markDirty = (splat: Splat) => {\n this._dirty.add(splat);\n };\n\n this.rebuild = () => {\n for (const splat of this._dirty) {\n build(splat);\n }\n\n this._dirty.clear();\n };\n\n this.dispose = () => {\n this._worker.terminate();\n };\n\n for (const splat of this._splatIndices.keys()) {\n buildImmediate(splat);\n }\n }\n\n get offsets() {\n return this._offsets;\n }\n\n get data() {\n return this._data;\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get transforms() {\n return this._transforms;\n }\n\n get transformsWidth() {\n return this._transformsWidth;\n }\n\n get transformsHeight() {\n return this._transformsHeight;\n }\n\n get transformIndices() {\n return this._transformIndices;\n }\n\n get transformIndicesWidth() {\n return this._transformIndicesWidth;\n }\n\n get transformIndicesHeight() {\n return this._transformIndicesHeight;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get needsRebuild() {\n return this._dirty.size > 0;\n }\n\n get updating() {\n return this._updating.size > 0;\n }\n}\n\nexport { RenderData };\n", "class Color32 {\n public readonly r: number;\n public readonly g: number;\n public readonly b: number;\n public readonly a: number;\n\n constructor(r: number = 0, g: number = 0, b: number = 0, a: number = 255) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n flat(): number[] {\n return [this.r, this.g, this.b, this.a];\n }\n\n flatNorm(): number[] {\n return [this.r / 255, this.g / 255, this.b / 255, this.a / 255];\n }\n\n toHexString(): string {\n return (\n \"#\" +\n this.flat()\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n );\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Color32 };\n", "import SortWorker from \"web-worker:../utils/SortWorker.ts\";\n\nimport { ShaderProgram } from \"./ShaderProgram\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\nimport { RenderData } from \"../utils/RenderData\";\nimport { Color32 } from \"../../../math/Color32\";\nimport { ObjectAddedEvent, ObjectChangedEvent, ObjectRemovedEvent } from \"../../../events/Events\";\nimport { Splat } from \"../../../splats/Splat\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\n\nconst vertexShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n`;\n\nconst fragmentShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n`;\n\nclass RenderProgram extends ShaderProgram {\n private _outlineThickness: number = 10.0;\n private _outlineColor: Color32 = new Color32(255, 165, 0, 255);\n private _renderData: RenderData | null = null;\n private _depthIndex: Uint32Array | null = null;\n private _chunks: Uint8Array | null = null;\n private _splatTexture: WebGLTexture | null = null;\n\n protected _initialize: () => void;\n protected _resize: () => void;\n protected _render: () => void;\n protected _dispose: () => void;\n\n private _setOutlineThickness: (value: number) => void;\n private _setOutlineColor: (value: Color32) => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n super(renderer, passes);\n\n const canvas = renderer.canvas;\n const gl = renderer.gl;\n\n let worker: Worker;\n\n let u_projection: WebGLUniformLocation;\n let u_viewport: WebGLUniformLocation;\n let u_focal: WebGLUniformLocation;\n let u_view: WebGLUniformLocation;\n let u_texture: WebGLUniformLocation;\n let u_transforms: WebGLUniformLocation;\n let u_transformIndices: WebGLUniformLocation;\n\n let u_outlineThickness: WebGLUniformLocation;\n let u_outlineColor: WebGLUniformLocation;\n\n let positionAttribute: number;\n let indexAttribute: number;\n\n let transformsTexture: WebGLTexture;\n let transformIndicesTexture: WebGLTexture;\n\n let vertexBuffer: WebGLBuffer;\n let indexBuffer: WebGLBuffer;\n\n this._resize = () => {\n if (!this._camera) return;\n\n this._camera.data.setSize(canvas.width, canvas.height);\n this._camera.update();\n\n u_projection = gl.getUniformLocation(this.program, \"projection\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n\n u_viewport = gl.getUniformLocation(this.program, \"viewport\") as WebGLUniformLocation;\n gl.uniform2fv(u_viewport, new Float32Array([canvas.width, canvas.height]));\n };\n\n const createWorker = () => {\n worker = new SortWorker();\n worker.onmessage = (e) => {\n if (e.data.depthIndex) {\n const { depthIndex, chunks } = e.data;\n this._depthIndex = depthIndex;\n this._chunks = chunks;\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, depthIndex, gl.STATIC_DRAW);\n }\n };\n };\n\n this._initialize = () => {\n if (!this._scene || !this._camera) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._resize();\n\n this._scene.addEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.addEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n this._renderData = new RenderData(this._scene);\n\n u_focal = gl.getUniformLocation(this.program, \"focal\") as WebGLUniformLocation;\n gl.uniform2fv(u_focal, new Float32Array([this._camera.data.fx, this._camera.data.fy]));\n\n u_view = gl.getUniformLocation(this.program, \"view\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n u_outlineThickness = gl.getUniformLocation(this.program, \"outlineThickness\") as WebGLUniformLocation;\n gl.uniform1f(u_outlineThickness, this.outlineThickness);\n\n u_outlineColor = gl.getUniformLocation(this.program, \"outlineColor\") as WebGLUniformLocation;\n gl.uniform4fv(u_outlineColor, new Float32Array(this.outlineColor.flatNorm()));\n\n this._splatTexture = gl.createTexture() as WebGLTexture;\n u_texture = gl.getUniformLocation(this.program, \"u_texture\") as WebGLUniformLocation;\n gl.uniform1i(u_texture, 0);\n\n transformsTexture = gl.createTexture() as WebGLTexture;\n u_transforms = gl.getUniformLocation(this.program, \"u_transforms\") as WebGLUniformLocation;\n gl.uniform1i(u_transforms, 1);\n\n transformIndicesTexture = gl.createTexture() as WebGLTexture;\n u_transformIndices = gl.getUniformLocation(this.program, \"u_transformIndices\") as WebGLUniformLocation;\n gl.uniform1i(u_transformIndices, 2);\n\n vertexBuffer = gl.createBuffer() as WebGLBuffer;\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]), gl.STATIC_DRAW);\n\n positionAttribute = gl.getAttribLocation(this.program, \"position\");\n gl.enableVertexAttribArray(positionAttribute);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n indexBuffer = gl.createBuffer() as WebGLBuffer;\n indexAttribute = gl.getAttribLocation(this.program, \"index\");\n gl.enableVertexAttribArray(indexAttribute);\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n\n createWorker();\n };\n\n const handleObjectAdded = (event: Event) => {\n const e = event as ObjectAddedEvent;\n\n if (e.object instanceof Splat) {\n e.object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectRemoved = (event: Event) => {\n const e = event as ObjectRemovedEvent;\n\n if (e.object instanceof Splat) {\n e.object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectChanged = (event: Event) => {\n const e = event as ObjectChangedEvent;\n\n if (e.object instanceof Splat && this._renderData) {\n this._renderData.markDirty(e.object);\n }\n };\n\n this._render = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._camera.update();\n worker.postMessage({ viewProj: this._camera.data.viewProj });\n\n if (this.renderData.needsRebuild) {\n this.renderData.rebuild();\n }\n\n if (this.renderData.dataChanged || this.renderData.transformsChanged) {\n if (this.renderData.dataChanged) {\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.splatTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32UI,\n this.renderData.width,\n this.renderData.height,\n 0,\n gl.RGBA_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.data,\n );\n }\n\n if (this.renderData.transformsChanged) {\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, transformsTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32F,\n this.renderData.transformsWidth,\n this.renderData.transformsHeight,\n 0,\n gl.RGBA,\n gl.FLOAT,\n this.renderData.transforms,\n );\n\n gl.activeTexture(gl.TEXTURE2);\n gl.bindTexture(gl.TEXTURE_2D, transformIndicesTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.R32UI,\n this.renderData.transformIndicesWidth,\n this.renderData.transformIndicesHeight,\n 0,\n gl.RED_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.transformIndices,\n );\n }\n\n const detachedPositions = new Float32Array(this.renderData.positions.slice().buffer);\n const detachedTransforms = new Float32Array(this.renderData.transforms.slice().buffer);\n const detachedTransformIndices = new Uint32Array(this.renderData.transformIndices.slice().buffer);\n worker.postMessage(\n {\n sortData: {\n positions: detachedPositions,\n transforms: detachedTransforms,\n transformIndices: detachedTransformIndices,\n vertexCount: this.renderData.vertexCount,\n },\n },\n [detachedPositions.buffer, detachedTransforms.buffer, detachedTransformIndices.buffer],\n );\n\n this.renderData.dataChanged = false;\n this.renderData.transformsChanged = false;\n }\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(gl.ONE_MINUS_DST_ALPHA, gl.ONE, gl.ONE_MINUS_DST_ALPHA, gl.ONE);\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.vertexAttribIPointer(indexAttribute, 1, gl.INT, 0, 0);\n gl.vertexAttribDivisor(indexAttribute, 1);\n\n gl.drawArraysInstanced(gl.TRIANGLE_FAN, 0, 4, this.renderData.vertexCount);\n };\n\n this._dispose = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot dispose without scene and camera\");\n return;\n }\n\n this._scene.removeEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.removeEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n worker.terminate();\n this.renderData.dispose();\n\n gl.deleteTexture(this.splatTexture);\n gl.deleteTexture(transformsTexture);\n gl.deleteTexture(transformIndicesTexture);\n\n gl.deleteBuffer(indexBuffer);\n gl.deleteBuffer(vertexBuffer);\n };\n\n this._setOutlineThickness = (value: number) => {\n this._outlineThickness = value;\n if (this._initialized) {\n gl.uniform1f(u_outlineThickness, value);\n }\n };\n\n this._setOutlineColor = (value: Color32) => {\n this._outlineColor = value;\n if (this._initialized) {\n gl.uniform4fv(u_outlineColor, new Float32Array(value.flatNorm()));\n }\n };\n }\n\n get renderData() {\n return this._renderData;\n }\n\n get depthIndex() {\n return this._depthIndex;\n }\n\n get chunks() {\n return this._chunks;\n }\n\n get splatTexture() {\n return this._splatTexture;\n }\n\n get outlineThickness() {\n return this._outlineThickness;\n }\n\n set outlineThickness(value: number) {\n this._setOutlineThickness(value);\n }\n\n get outlineColor() {\n return this._outlineColor;\n }\n\n set outlineColor(value: Color32) {\n this._setOutlineColor(value);\n }\n\n protected _getVertexSource() {\n return vertexShaderSource;\n }\n\n protected _getFragmentSource() {\n return fragmentShaderSource;\n }\n}\n\nexport { RenderProgram };\n", "import { RenderProgram } from \"../programs/RenderProgram\";\nimport { ShaderProgram } from \"../programs/ShaderProgram\";\nimport { ShaderPass } from \"./ShaderPass\";\n\nclass FadeInPass implements ShaderPass {\n initialize: (program: ShaderProgram) => void;\n render: () => void;\n\n constructor(speed: number = 1.0) {\n let value = 0.0;\n let active = false;\n\n let renderProgram: RenderProgram;\n let gl: WebGL2RenderingContext;\n let u_useDepthFade: WebGLUniformLocation;\n let u_depthFade: WebGLUniformLocation;\n\n this.initialize = (program: ShaderProgram) => {\n if (!(program instanceof RenderProgram)) {\n throw new Error(\"FadeInPass requires a RenderProgram\");\n }\n\n value = program.started ? 1.0 : 0.0;\n active = true;\n renderProgram = program;\n gl = program.renderer.gl;\n\n u_useDepthFade = gl.getUniformLocation(renderProgram.program, \"useDepthFade\") as WebGLUniformLocation;\n gl.uniform1i(u_useDepthFade, 1);\n\n u_depthFade = gl.getUniformLocation(renderProgram.program, \"depthFade\") as WebGLUniformLocation;\n gl.uniform1f(u_depthFade, value);\n };\n\n this.render = () => {\n if (!active || renderProgram.renderData?.updating) return;\n gl.useProgram(renderProgram.program);\n value = Math.min(value + speed * 0.01, 1.0);\n if (value >= 1.0) {\n active = false;\n gl.uniform1i(u_useDepthFade, 0);\n }\n gl.uniform1f(u_depthFade, value);\n };\n }\n\n dispose() {}\n}\n\nexport { FadeInPass };\n", "import type { Scene } from \"../core/Scene\";\nimport { FadeInPass } from \"./webgl/passes/FadeInPass\";\nimport { Camera } from \"../cameras/Camera\";\nimport { Color32 } from \"../math/Color32\";\nimport { ShaderProgram } from \"./webgl/programs/ShaderProgram\";\nimport { RenderProgram } from \"./webgl/programs/RenderProgram\";\nimport { ShaderPass } from \"./webgl/passes/ShaderPass\";\n\nexport class WebGLRenderer {\n private _canvas: HTMLCanvasElement;\n private _gl: WebGL2RenderingContext;\n private _backgroundColor: Color32 = new Color32();\n private _renderProgram: RenderProgram;\n\n addProgram: (program: ShaderProgram) => void;\n removeProgram: (program: ShaderProgram) => void;\n resize: () => void;\n setSize: (width: number, height: number) => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(optionalCanvas: HTMLCanvasElement | null = null, optionalRenderPasses: ShaderPass[] | null = null) {\n const canvas: HTMLCanvasElement = optionalCanvas || document.createElement(\"canvas\");\n if (!optionalCanvas) {\n canvas.style.display = \"block\";\n canvas.style.boxSizing = \"border-box\";\n canvas.style.width = \"100%\";\n canvas.style.height = \"100%\";\n canvas.style.margin = \"0\";\n canvas.style.padding = \"0\";\n document.body.appendChild(canvas);\n }\n canvas.style.background = this._backgroundColor.toHexString();\n this._canvas = canvas;\n\n this._gl = canvas.getContext(\"webgl2\", { antialias: false }) as WebGL2RenderingContext;\n\n const renderPasses = optionalRenderPasses || [];\n if (!optionalRenderPasses) {\n renderPasses.push(new FadeInPass());\n }\n\n this._renderProgram = new RenderProgram(this, renderPasses);\n const programs = [this._renderProgram] as ShaderProgram[];\n\n this.resize = () => {\n const width = canvas.clientWidth;\n const height = canvas.clientHeight;\n if (canvas.width !== width || canvas.height !== height) {\n this.setSize(width, height);\n }\n };\n\n this.setSize = (width: number, height: number) => {\n canvas.width = width;\n canvas.height = height;\n this._gl.viewport(0, 0, canvas.width, canvas.height);\n for (const program of programs) {\n program.resize();\n }\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n for (const program of programs) {\n program.render(scene, camera);\n }\n };\n\n this.dispose = () => {\n for (const program of programs) {\n program.dispose();\n }\n };\n\n this.addProgram = (program: ShaderProgram) => {\n programs.push(program);\n };\n\n this.removeProgram = (program: ShaderProgram) => {\n const index = programs.indexOf(program);\n if (index < 0) {\n throw new Error(\"Program not found\");\n }\n programs.splice(index, 1);\n };\n\n this.resize();\n }\n\n get canvas() {\n return this._canvas;\n }\n\n get gl() {\n return this._gl;\n }\n\n get renderProgram() {\n return this._renderProgram;\n }\n\n get backgroundColor() {\n return this._backgroundColor;\n }\n\n set backgroundColor(value: Color32) {\n this._backgroundColor = value;\n this._canvas.style.background = value.toHexString();\n }\n}\n", "import { Camera } from \"../cameras/Camera\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass OrbitControls {\n minAngle: number = -90;\n maxAngle: number = 90;\n minZoom: number = 0.1;\n maxZoom: number = 30;\n orbitSpeed: number = 1;\n panSpeed: number = 1;\n zoomSpeed: number = 1;\n dampening: number = 0.12;\n setCameraTarget: (newTarget: Vector3) => void = () => {};\n update: () => void;\n dispose: () => void;\n\n constructor(\n camera: Camera,\n canvas: HTMLElement,\n alpha: number = 0.5,\n beta: number = 0.5,\n radius: number = 5,\n enableKeyboardControls: boolean = true,\n inputTarget: Vector3 = new Vector3(),\n ) {\n let target = inputTarget.clone();\n\n let desiredTarget = target.clone();\n let desiredAlpha = alpha;\n let desiredBeta = beta;\n let desiredRadius = radius;\n\n let dragging = false;\n let panning = false;\n let lastDist = 0;\n let lastX = 0;\n let lastY = 0;\n\n const keys: { [key: string]: boolean } = {};\n\n let isUpdatingCamera = false;\n\n const onCameraChange = () => {\n if (isUpdatingCamera) return;\n\n const eulerRotation = camera.rotation.toEuler();\n desiredAlpha = -eulerRotation.y;\n desiredBeta = -eulerRotation.x;\n\n const x = camera.position.x - desiredRadius * Math.sin(desiredAlpha) * Math.cos(desiredBeta);\n const y = camera.position.y + desiredRadius * Math.sin(desiredBeta);\n const z = camera.position.z + desiredRadius * Math.cos(desiredAlpha) * Math.cos(desiredBeta);\n\n desiredTarget = new Vector3(x, y, z);\n };\n\n camera.addEventListener(\"objectChanged\", onCameraChange);\n\n this.setCameraTarget = (newTarget: Vector3) => {\n const dx = newTarget.x - camera.position.x;\n const dy = newTarget.y - camera.position.y;\n const dz = newTarget.z - camera.position.z;\n desiredRadius = Math.sqrt(dx * dx + dy * dy + dz * dz);\n desiredBeta = Math.atan2(dy, Math.sqrt(dx * dx + dz * dz));\n desiredAlpha = -Math.atan2(dx, dz);\n desiredTarget = new Vector3(newTarget.x, newTarget.y, newTarget.z);\n };\n\n const computeZoomNorm = () => {\n return 0.1 + (0.9 * (desiredRadius - this.minZoom)) / (this.maxZoom - this.minZoom);\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n keys[e.code] = true;\n // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = true;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = true;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = true;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = true;\n };\n\n const onKeyUp = (e: KeyboardEvent) => {\n keys[e.code] = false; // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = false;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = false;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = false;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = false;\n };\n\n const onMouseDown = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = true;\n panning = e.button === 2;\n lastX = e.clientX;\n lastY = e.clientY;\n window.addEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseUp = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n window.removeEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseMove = (e: MouseEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n const dx = e.clientX - lastX;\n const dy = e.clientY - lastY;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n const panX = -dx * this.panSpeed * 0.01 * zoomNorm;\n const panY = -dy * this.panSpeed * 0.01 * zoomNorm;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(panX));\n desiredTarget = desiredTarget.add(up.multiply(panY));\n } else {\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n }\n\n lastX = e.clientX;\n lastY = e.clientY;\n };\n\n const onWheel = (e: WheelEvent) => {\n preventDefault(e);\n\n const zoomNorm = computeZoomNorm();\n desiredRadius += e.deltaY * this.zoomSpeed * 0.025 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n };\n\n const onTouchStart = (e: TouchEvent) => {\n preventDefault(e);\n\n if (e.touches.length === 1) {\n dragging = true;\n panning = false;\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n lastDist = 0;\n } else if (e.touches.length === 2) {\n dragging = true;\n panning = true;\n lastX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n lastY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n lastDist = Math.sqrt(distX * distX + distY * distY);\n }\n };\n\n const onTouchEnd = (e: TouchEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n };\n\n const onTouchMove = (e: TouchEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n const dist = Math.sqrt(distX * distX + distY * distY);\n const delta = lastDist - dist;\n desiredRadius += delta * this.zoomSpeed * 0.1 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n lastDist = dist;\n\n const touchX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n const touchY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const dx = touchX - lastX;\n const dy = touchY - lastY;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(-dx * this.panSpeed * 0.025 * zoomNorm));\n desiredTarget = desiredTarget.add(up.multiply(-dy * this.panSpeed * 0.025 * zoomNorm));\n lastX = touchX;\n lastY = touchY;\n } else {\n const dx = e.touches[0].clientX - lastX;\n const dy = e.touches[0].clientY - lastY;\n\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n }\n };\n\n const lerp = (a: number, b: number, t: number) => {\n return (1 - t) * a + t * b;\n };\n\n this.update = () => {\n isUpdatingCamera = true;\n\n alpha = lerp(alpha, desiredAlpha, this.dampening);\n beta = lerp(beta, desiredBeta, this.dampening);\n radius = lerp(radius, desiredRadius, this.dampening);\n target = target.lerp(desiredTarget, this.dampening);\n\n const x = target.x + radius * Math.sin(alpha) * Math.cos(beta);\n const y = target.y - radius * Math.sin(beta);\n const z = target.z - radius * Math.cos(alpha) * Math.cos(beta);\n camera.position = new Vector3(x, y, z);\n\n const direction = target.subtract(camera.position).normalize();\n const rx = Math.asin(-direction.y);\n const ry = Math.atan2(direction.x, direction.z);\n camera.rotation = Quaternion.FromEuler(new Vector3(rx, ry, 0));\n\n const moveSpeed = 0.025;\n const rotateSpeed = 0.01;\n\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const forward = new Vector3(-R[2], -R[5], -R[8]);\n const right = new Vector3(R[0], R[3], R[6]);\n\n if (keys[\"KeyS\"]) desiredTarget = desiredTarget.add(forward.multiply(moveSpeed));\n if (keys[\"KeyW\"]) desiredTarget = desiredTarget.subtract(forward.multiply(moveSpeed));\n if (keys[\"KeyA\"]) desiredTarget = desiredTarget.subtract(right.multiply(moveSpeed));\n if (keys[\"KeyD\"]) desiredTarget = desiredTarget.add(right.multiply(moveSpeed));\n\n // Add rotation with 'e' and 'q' for horizontal rotation\n if (keys[\"KeyE\"]) desiredAlpha += rotateSpeed;\n if (keys[\"KeyQ\"]) desiredAlpha -= rotateSpeed;\n\n // Add rotation with 'r' and 'f' for vertical rotation\n if (keys[\"KeyR\"]) desiredBeta += rotateSpeed;\n if (keys[\"KeyF\"]) desiredBeta -= rotateSpeed;\n\n isUpdatingCamera = false;\n };\n\n const preventDefault = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n this.dispose = () => {\n canvas.removeEventListener(\"dragenter\", preventDefault);\n canvas.removeEventListener(\"dragover\", preventDefault);\n canvas.removeEventListener(\"dragleave\", preventDefault);\n canvas.removeEventListener(\"contextmenu\", preventDefault);\n\n canvas.removeEventListener(\"mousedown\", onMouseDown);\n canvas.removeEventListener(\"mousemove\", onMouseMove);\n canvas.removeEventListener(\"wheel\", onWheel);\n\n canvas.removeEventListener(\"touchstart\", onTouchStart);\n canvas.removeEventListener(\"touchend\", onTouchEnd);\n canvas.removeEventListener(\"touchmove\", onTouchMove);\n\n if (enableKeyboardControls) {\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"keyup\", onKeyUp);\n }\n };\n\n if (enableKeyboardControls) {\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"keyup\", onKeyUp);\n }\n\n canvas.addEventListener(\"dragenter\", preventDefault);\n canvas.addEventListener(\"dragover\", preventDefault);\n canvas.addEventListener(\"dragleave\", preventDefault);\n canvas.addEventListener(\"contextmenu\", preventDefault);\n\n canvas.addEventListener(\"mousedown\", onMouseDown);\n canvas.addEventListener(\"mousemove\", onMouseMove);\n canvas.addEventListener(\"wheel\", onWheel);\n\n canvas.addEventListener(\"touchstart\", onTouchStart);\n canvas.addEventListener(\"touchend\", onTouchEnd);\n canvas.addEventListener(\"touchmove\", onTouchMove);\n\n this.update();\n }\n}\n\nexport { OrbitControls };\n", "import { Vector3 } from \"./Vector3\";\n\nclass Plane {\n public readonly normal: Vector3;\n public readonly point: Vector3;\n\n constructor(normal: Vector3, point: Vector3) {\n this.normal = normal;\n this.point = point;\n }\n\n intersect(origin: Vector3, direction: Vector3): Vector3 | null {\n const denominator = this.normal.dot(direction);\n\n if (Math.abs(denominator) < 0.0001) {\n return null;\n }\n\n const t = this.normal.dot(this.point.subtract(origin)) / denominator;\n\n if (t < 0) {\n return null;\n }\n\n return origin.add(direction.multiply(t));\n }\n}\n\nexport { Plane };\n", "import { ShaderProgram } from \"../programs/ShaderProgram\";\n\nclass ShaderPass {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n initialize(program: ShaderProgram) {}\n render() {}\n dispose() {}\n}\n\nexport { ShaderPass };\n", "\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAAQcBBAQLAwMCAgAADAYGBAUBcAEQEAUHAQGAAoCAAgYIAX8BQfCfBAsHGQYBawIAAWwADQFtABk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EBEPCwJAIAAgASgCACAEEAoEQAJAIAIgASgCEEcEQCABKAIUIAJHDQELIANBAUcNAiABQQE2AiAPCyABIAM2AiACQCABKAIsQQRGDQAgAUEAOwE0IAAoAggiACABIAIgAkEBIAQgACgCACgCFBEDACABLQA1BEAgAUEDNgIsIAEtADRFDQEMAwsgAUEENgIsCyABIAI2AhQgASABKAIoQQFqNgIoIAEoAiRBAUcNASABKAIYQQJHDQEgAUEBOgA2DwsgACgCCCIAIAEgAiADIAQgACgCACgCGBECAAsLMQAgACABKAIIQQAQCgRAIAEgAiADEBQPCyAAKAIIIgAgASACIAMgACgCACgCHBEAAAsYACAAIAEoAghBABAKBEAgASACIAMQFAsLgAMBBH8jAEHwAGsiAiQAIAAoAgAiA0EEaygCACEEIANBCGsoAgAhBSACQgA3AlAgAkIANwJYIAJCADcCYCACQgA3AGcgAkIANwJIIAJBADYCRCACQfwVNgJAIAIgADYCPCACIAE2AjggACAFaiEDAkAgBCABQQAQCgRAQQAgAyAFGyEADAELIAAgA04EQCACQgA3AC8gAkIANwIYIAJCADcCICACQgA3AiggAkIANwIQIAJBADYCDCACIAE2AgggAiAANgIEIAIgBDYCACACQQE2AjAgBCACIAMgA0EBQQAgBCgCACgCFBEDACACKAIYDQELQQAhACAEIAJBOGogA0EBQQAgBCgCACgCGBECAAJAAkAgAigCXA4CAAECCyACKAJMQQAgAigCWEEBRhtBACACKAJUQQFGG0EAIAIoAmBBAUYbIQAMAQsgAigCUEEBRwRAIAIoAmANASACKAJUQQFHDQEgAigCWEEBRw0BCyACKAJIIQALIAJB8ABqJAAgAAu1AQEEfyMAQUBqIgMkAAJ/QQEgACABQQAQCg0AGkEAIAFFDQAaQQAgAUGsFhAgIgFFDQAaIANBDGohBEE0IQUDQCAEQQA6AAAgBEEBaiEEIAVBAWsiBQ0ACyADQQE2AjggA0F/NgIUIAMgADYCECADIAE2AgggASADQQhqIAIoAgBBASABKAIAKAIcEQAAIAMoAiAiAEEBRgRAIAIgAygCGDYCAAs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wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _evaluate=Module[\"_evaluate\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)=>(_evaluate=Module[\"_evaluate\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;", "import { Splat } from \"../../../splats/Splat\";\nimport { RenderProgram } from \"../programs/RenderProgram\";\n\nimport loadWasm from \"../../../wasm/intersect\";\n\nclass IntersectionTester {\n testPoint: (x: number, y: number) => Splat | null;\n\n constructor(renderProgram: RenderProgram) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n const initWasm = async () => {\n wasmModule = await loadWasm();\n };\n\n initWasm();\n\n let allocatedVertexCount: number = 0;\n let allocatedTransformCount: number = 0;\n\n let viewPtr: number;\n let transformsPtr: number;\n let transformIndicesPtr: number;\n let positionsPtr: number;\n let rotationsPtr: number;\n let scalesPtr: number;\n let depthIndexPtr: number;\n let chunksPtr: number;\n let originPtr: number;\n let directionPtr: number;\n let resultPtr: number;\n\n const allocateVertices = (vertexCount: number) => {\n if (vertexCount > allocatedVertexCount) {\n if (allocatedVertexCount > 0) {\n wasmModule._free(viewPtr);\n wasmModule._free(transformIndicesPtr);\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(depthIndexPtr);\n wasmModule._free(chunksPtr);\n wasmModule._free(originPtr);\n wasmModule._free(directionPtr);\n wasmModule._free(resultPtr);\n }\n\n allocatedVertexCount = vertexCount;\n\n viewPtr = wasmModule._malloc(16 * 4);\n transformIndicesPtr = wasmModule._malloc(allocatedVertexCount * 4);\n positionsPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n rotationsPtr = wasmModule._malloc(4 * allocatedVertexCount * 4);\n scalesPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n depthIndexPtr = wasmModule._malloc(allocatedVertexCount * 4);\n chunksPtr = wasmModule._malloc(allocatedVertexCount);\n originPtr = wasmModule._malloc(3 * 4);\n directionPtr = wasmModule._malloc(3 * 4);\n resultPtr = wasmModule._malloc(4);\n }\n };\n\n const allocateTransforms = (transformCount: number) => {\n if (transformCount > allocatedTransformCount) {\n if (allocatedTransformCount > 0) {\n wasmModule._free(transformsPtr);\n }\n\n allocatedTransformCount = transformCount;\n\n transformsPtr = wasmModule._malloc(20 * allocatedTransformCount * 4);\n }\n };\n\n this.testPoint = (x: number, y: number) => {\n if (!wasmModule) {\n throw new Error(\"Wasm module not loaded\");\n }\n\n if (!renderProgram.camera) {\n throw new Error(\"Camera not set\");\n }\n\n if (!renderProgram.renderData || !renderProgram.depthIndex || !renderProgram.chunks) {\n throw new Error(\"Render data not set\");\n }\n\n const renderData = renderProgram.renderData;\n const depthIndex = renderProgram.depthIndex;\n const chunks = renderProgram.chunks;\n\n const targetAllocatedVertexCount = Math.pow(2, Math.ceil(Math.log2(renderData.vertexCount)));\n allocateVertices(targetAllocatedVertexCount);\n\n const targetAllocatedTransformCount = Math.pow(2, Math.ceil(Math.log2(renderData.transforms.length / 20)));\n allocateTransforms(targetAllocatedTransformCount);\n\n const normalizedX = (x + 1) / 2;\n const normalizedY = (y + 1) / 2;\n const chunk = Math.floor(normalizedX * 15) + Math.floor(normalizedY * 15) * 15;\n\n const camera = renderProgram.camera;\n const ray = camera.screenPointToRay(x, y);\n\n wasmModule.HEAPF32.set(camera.data.viewMatrix.buffer, viewPtr / 4);\n wasmModule.HEAPU32.set(renderData.transformIndices, transformIndicesPtr / 4);\n wasmModule.HEAPF32.set(renderData.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(renderData.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(renderData.scales, scalesPtr / 4);\n wasmModule.HEAPU32.set(depthIndex, depthIndexPtr / 4);\n wasmModule.HEAPU8.set(chunks, chunksPtr);\n wasmModule.HEAPF32.set(camera.position.flat(), originPtr / 4);\n wasmModule.HEAPF32.set(ray.flat(), directionPtr / 4);\n wasmModule.HEAPF32.set(renderData.transforms, transformsPtr / 4);\n\n wasmModule._evaluate(\n viewPtr,\n transformsPtr,\n transformIndicesPtr,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n depthIndexPtr,\n chunksPtr,\n renderData.vertexCount,\n chunk,\n originPtr,\n directionPtr,\n resultPtr,\n );\n\n const result = wasmModule.HEAPU32[resultPtr / 4];\n if (result !== 0xffffffff) {\n const splat = renderData.getSplat(result) as Splat;\n return splat;\n }\n\n return null;\n };\n }\n}\n\nexport { IntersectionTester };\n"], + "mappings": ";AAEA,IAAMA,IAAN,MAAMA,GAAAA;EAKF,YAAYC,KAAY,GAAGC,KAAY,GAAGC,KAAY,GAAA;AAClDC,SAAKH,IAAIA,IACTG,KAAKF,IAAIA,IACTE,KAAKD,IAAIA;EACZ;EAED,OAAOE,IAAAA;AACH,WAAID,KAAKH,MAAMI,GAAEJ,MAGbG,KAAKF,MAAMG,GAAEH,KAGbE,KAAKD,MAAME,GAAEF;EAKpB;EAID,IA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AA,GAAQ22B,KAAe,CAAA,GAClD9P,GAAWpN,QAAQ7V,IAAI+oB,GAAW/D,YAAY0N,KAAgB,CAAA,GAE9DzP,GAAW6Q,UACPrB,IACAC,IACAC,IACAjP,IACAC,IACAC,IACAgP,IACAC,IACA9J,GAAWpkB,aACXgvB,IACAb,IACAC,IACAC,EAAAA;AAGJ,YAAMrmB,KAASsW,GAAWrN,QAAQod,KAAY,CAAA;AAC9C,UAAe,eAAXrmB,IAAuB;AAEvB,eADcoc,GAAWvE,SAAS7X,EAAAA;MAErC;AAED,aAAO;IAAI;EAElB;AAAA;", + "names": ["Vector3", "x", "y", "z", "this", "v", "buffer", "t", "magnitude", "Math", "sqrt", "normalize", "length", "flat", "clone", "toString", "join", "value", "Quaternion", "w", "q", "l", "w1", "x1", "y1", "z1", "w2", "x2", "y2", "z2", "inverse", "vecQuat", "conjugate", "rotatedQuat", "multiply", "e", "halfX", "halfY", "halfZ", "cy", "cos", "sy", "sin", "cp", "sp", "cz", "sz", "toEuler", "sinr_cosp", "cosr_cosp", "atan2", "sinp", "abs", "sign", "PI", "asin", "siny_cosp", "cosy_cosp", "matrix", "m", "trace", "s", "axis", "angle", "halfAngle", "EventDispatcher", "constructor", "listeners", "Map", "addEventListener", "type", "listener", "has", "set", "Set", "get", "add", "removeEventListener", "delete", "hasEventListener", "dispatchEvent", "event", "Matrix4", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34", "n41", "n42", "n43", "n44", "i", "a", "b", "determinant", "invert", "det", "Error", "invDet", "position", "rotation", "scale", "xx", "xy", "xz", "yy", "yz", "zz", "wx", "wy", "wz", "sx", "ObjectAddedEvent", "Event", "object", "super", "ObjectRemovedEvent", "ObjectChangedEvent", "Object3D", "positionChanged", "rotationChanged", "scaleChanged", "_position", "_rotation", "_scale", "_transform", "_changeEvent", "update", "applyPosition", "applyRotation", "applyScale", "_updateMatrix", "Compose", "equals", "forward", "apply", "transform", "Matrix3", "cx", "SplatData", "vertexCount", "positions", "rotations", "scales", "colors", "changed", "detached", "_vertexCount", "_positions", "Float32Array", "_rotations", "_scales", "_colors", "Uint8Array", "_selection", "translate", "translation", "rotate", "R", "RotationFromQuaternion", "currentRotation", "newRot", "serialize", "data", "RowLength", "f_buffer", "u_buffer", "reattach", "selection", "console", "assert", "byteLength", "Splat", "splat", "undefined", "selectedChanged", "_selected", "_data", "name", "document", "now", "Date", "getFullYear", "getMonth", "getDate", "blob", "Blob", "link", "createElement", "download", "href", "URL", "createObjectURL", "click", "selected", "CameraData", "_fx", "_fy", "_near", "_far", "_width", "_height", "_projectionMatrix", "_viewMatrix", "_viewProj", "_updateProjectionMatrix", "fx", "width", "fy", "height", "far", "near", "projectionMatrix", "viewMatrix", "setSize", "viewProj", "Vector4", "Camera", "camera", "screenPointToRay", "clipSpaceCoords", "inverseProjectionMatrix", "cameraSpaceCoords", "inverseViewMatrix", "worldSpaceCoords", "subtract", "Scene", "_objects", "addObject", "objects", "push", "removeObject", "index", "indexOf", "splice", "findObject", "predicate", "findObjectOfType", "reset", "objectsToRemove", "slice", "buffers", "offset", "Loader", "url", "scene", "onProgress", "useCache", "req", "fetch", "mode", "credentials", "cache", "status", "reader", "body", "getReader", "contentLength", "parseInt", "headers", "bytesRead", "done", "read", "Deserialize", "file", "FileReader", "onload", "target", "result", "onprogress", "loaded", "total", "readAsArrayBuffer", "Promise", "resolve", "onloadend", "PLYLoader", "format", "plyData", "_ParsePLYBuffer", "inputBuffer", "ubuf", "headerText", "TextDecoder", "decode", "header_end", "header_end_index", "exec", "rowOffset", "offsets", "double", "int", "uint", "float", "short", "ushort", "uchar", "properties", "prop", "split", "filter", "k", "startsWith", "_p", "dataView", "DataView", "ArrayBuffer", "q_polycam", "FromEuler", "rgba", "Uint8ClampedArray", "rot", "r0", "r1", "r2", "r3", "forEach", "property", "getFloat32", "getInt32", "exp", "SH_C0", "temp", "A", "Q", "F", "B", "U", "d", "ShaderProgram", "renderer", "passes", "_scene", "_camera", "_started", "_initialized", "_renderer", "gl", "_program", "createProgram", "_passes", "vertexShader", "createShader", "VERTEX_SHADER", "shaderSource", "_getVertexSource", "compileShader", "getShaderParameter", "COMPILE_STATUS", "error", "getShaderInfoLog", "fragmentShader", "FRAGMENT_SHADER", "_getFragmentSource", "attachShader", "program", "linkProgram", "getProgramParameter", "LINK_STATUS", "getProgramInfoLog", "resize", "useProgram", "_resize", "initialize", "_initialize", "pass", "render", "dispose", "_render", "_dispose", "started", "loadWasm", "moduleArg", "readyPromiseResolve", "readyPromiseReject", "Module", "reject", "readBinary", "moduleOverrides", "Object", "assign", "scriptDirectory", "self", "location", "substr", "replace", "lastIndexOf", "xhr", "XMLHttpRequest", "open", "responseType", "send", "response", "log", "bind", "wasmBinary", "wasmMemory", "err", "tryParseAsDataURI", "filename", "isDataURI", "decoded", "atob", "bytes", "charCodeAt", "dataURIPrefix", "WebAssembly", "abort", "HEAP8", "HEAPU8", "HEAP16", "HEAPU16", "HEAP32", "HEAPU32", "HEAPF32", "HEAPF64", "ABORT", "updateMemoryViews", "Int8Array", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float64Array", "__ATPRERUN__", "__ATINIT__", "__ATPOSTRUN__", "runDependencies", "dependenciesFulfilled", "what", "RuntimeError", "wasmBinaryFile", "path", "getBinaryPromise", "binaryFile", "then", "binary", "instantiateAsync", "imports", "callback", "receiver", "instantiate", "instance", "reason", "callRuntimeCallbacks", "callbacks", "shift", "embind_charCodes", "BindingError", "readLatin1String", "ptr", "ret", "c", "awaitingDependencies", "registeredTypes", "throwBindingError", "message", "registerType", "rawType", "registeredInstance", "options", "TypeError", "hasOwnProperty", "ignoreDuplicateRegistrations", "cb", "HandleAllocator", "allocated", "freelist", "emval_handles", "count_emval_handles", "count", "reserved", "Emval", "handle", "allocate", "refcount", "simpleReadValueFromPointer", "pointer", "floatReadValueFromPointer", "integerReadValueFromPointer", "signed", "readPointer", "UTF8Decoder", "UTF8ToString", "maxBytesToRead", "heapOrArray", "idx", "endIdx", "endPtr", "subarray", "str", "u0", "u1", "u2", "String", "fromCharCode", "ch", "UTF16Decoder", "UTF16ToString", "maxIdx", "codeUnit", "stringToUTF16", "outPtr", "maxBytesToWrite", "startPtr", "numCharsToWrite", "lengthBytesUTF16", "UTF32ToString", "utf32", "stringToUTF32", "lengthBytesUTF32", "len", "growMemory", "size", "pages", "grow", "codes", "Array", "embind_init_charCodes", "prototype", "id", "pop", "wasmImports", "f", "primitiveType", "minRange", "maxRange", "trueValue", "falseValue", "fromWireType", "wt", "toWireType", "destructors", "o", "argPackAdvance", "readValueFromPointer", "destructorFunction", "h", "rv", "free", "bitshift", "isUnsignedType", "includes", "dataTypeIndex", "TA", "decodeMemoryView", "stdStringIsUTF8", "payload", "decodeStartPtr", "currentBytePtr", "stringSegment", "_free", "valueIsOfTypeString", "base", "_malloc", "heap", "outIdx", "u", "startIdx", "charCode", "charSize", "decodeString", "encodeString", "getHeap", "lengthBytesUTF", "HEAP", "j", "isVoid", "g", "requestedSize", "oldSize", "maxHeapSize", "multiple", "cutDown", "overGrownHeapSize", "min", "newSize", "max", "wasmExports", "info", "receiveInstance", "module", "exports", "unshift", "_a", "removeRunDependency", "catch", "createWasm", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "calledRun", "run", "doRun", "postRun", "preRun", "setTimeout", "runCaller", "ready", "RenderData", "dataChanged", "transformsChanged", "_updating", "_dirty", "splatIndex", "_splatIndices", "_offsets", "lookup", "ceil", "_transformsWidth", "_transformsHeight", "_transforms", "_transformIndicesWidth", "_transformIndicesHeight", "_transformIndices", "_worker", "DataWorker", "updateTransform", "wasmModule", "onmessage", "worldPositions", "worldRotations", "worldScales", "async", "initWasm", "buildImmediate", "waitForWasm", "positionsPtr", "rotationsPtr", "scalesPtr", "colorsPtr", "selectionPtr", "dataPtr", "worldPositionsPtr", "worldRotationsPtr", "worldScalesPtr", "_pack", "outData", "build", "serializedSplat", "postMessage", "getSplat", "key", "getLocalIndex", "markDirty", "rebuild", "clear", "terminate", "keys", "transforms", "transformsWidth", "transformsHeight", "transformIndices", "transformIndicesWidth", "transformIndicesHeight", "needsRebuild", "updating", "Color32", "r", "flatNorm", "toHexString", "map", "padStart", "RenderProgram", "_outlineThickness", "_outlineColor", "_renderData", "_depthIndex", "_chunks", "_splatTexture", "canvas", "worker", "u_projection", "u_viewport", "u_focal", "u_view", "u_texture", "u_transforms", "u_transformIndices", "u_outlineThickness", "u_outlineColor", "positionAttribute", "indexAttribute", "transformsTexture", "transformIndicesTexture", "vertexBuffer", "indexBuffer", "getUniformLocation", "uniformMatrix4fv", "uniform2fv", "createWorker", "SortWorker", "depthIndex", "chunks", "bindBuffer", "ARRAY_BUFFER", "bufferData", "STATIC_DRAW", "handleObjectAdded", "handleObjectRemoved", "handleObjectChanged", "uniform1f", "outlineThickness", "uniform4fv", "outlineColor", "createTexture", "uniform1i", "createBuffer", "getAttribLocation", "enableVertexAttribArray", "vertexAttribPointer", "FLOAT", "renderData", "activeTexture", "TEXTURE0", "bindTexture", "TEXTURE_2D", "splatTexture", "texParameteri", "TEXTURE_WRAP_S", "CLAMP_TO_EDGE", "TEXTURE_WRAP_T", "TEXTURE_MIN_FILTER", "NEAREST", "TEXTURE_MAG_FILTER", "texImage2D", "RGBA32UI", "RGBA_INTEGER", "UNSIGNED_INT", "TEXTURE1", "RGBA32F", "RGBA", "TEXTURE2", "R32UI", "RED_INTEGER", "detachedPositions", "detachedTransforms", "detachedTransformIndices", "sortData", "viewport", "clearColor", "COLOR_BUFFER_BIT", "disable", "DEPTH_TEST", "enable", "BLEND", "blendFuncSeparate", "ONE_MINUS_DST_ALPHA", "ONE", "blendEquationSeparate", "FUNC_ADD", "vertexAttribIPointer", "INT", "vertexAttribDivisor", "drawArraysInstanced", "TRIANGLE_FAN", "deleteTexture", "deleteBuffer", "_setOutlineThickness", "_setOutlineColor", "FadeInPass", "speed", "renderProgram", "u_useDepthFade", "u_depthFade", "active", "WebGLRenderer", "optionalCanvas", "optionalRenderPasses", "_backgroundColor", "style", "display", "boxSizing", "margin", "padding", "appendChild", "background", "_canvas", "_gl", "getContext", "antialias", "renderPasses", "_renderProgram", "programs", "clientWidth", "clientHeight", "addProgram", "removeProgram", "backgroundColor", "OrbitControls", "alpha", "beta", "radius", "enableKeyboardControls", "inputTarget", "minAngle", "maxAngle", "minZoom", "maxZoom", "orbitSpeed", "panSpeed", "zoomSpeed", "dampening", "setCameraTarget", "desiredTarget", "desiredAlpha", "desiredBeta", "desiredRadius", "dragging", "panning", "lastDist", "lastX", "lastY", "isUpdatingCamera", "eulerRotation", "newTarget", "dx", "dy", "dz", "computeZoomNorm", "onKeyDown", "code", "onKeyUp", "onMouseDown", "preventDefault", "button", "clientX", "clientY", "window", "onMouseUp", "onMouseMove", "zoomNorm", "panX", "panY", "right", "up", "onWheel", "deltaY", "onTouchStart", "touches", "distX", "distY", "onTouchEnd", "onTouchMove", "dist", "touchX", "touchY", "lerp", "direction", "rx", "ry", "moveSpeed", "rotateSpeed", "stopPropagation", "Plane", "normal", "point", "origin", "denominator", "dot", "ShaderPass", "currentScript", "src", "a11", "a12", "IntersectionTester", "viewPtr", "transformsPtr", "transformIndicesPtr", "depthIndexPtr", "chunksPtr", "originPtr", "directionPtr", "resultPtr", "allocatedVertexCount", "allocatedTransformCount", "testPoint", "targetAllocatedVertexCount", "pow", "log2", "targetAllocatedTransformCount", "transformCount", "normalizedX", "normalizedY", "chunk", "floor", "ray", "_evaluate"] +} diff --git a/gsplat/node_modules/.vite/deps_temp_ef60226a/package.json b/gsplat/node_modules/.vite/deps_temp_ef60226a/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/gsplat/node_modules/.vite/deps_temp_ef60226a/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/gsplat/node_modules/@esbuild/darwin-arm64/README.md b/gsplat/node_modules/@esbuild/darwin-arm64/README.md new file mode 100644 index 0000000..c2c0398 --- /dev/null +++ b/gsplat/node_modules/@esbuild/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the macOS ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/gsplat/node_modules/@esbuild/darwin-arm64/bin/esbuild b/gsplat/node_modules/@esbuild/darwin-arm64/bin/esbuild new file mode 100755 index 0000000..71ead61 Binary files /dev/null and b/gsplat/node_modules/@esbuild/darwin-arm64/bin/esbuild differ diff --git a/gsplat/node_modules/@esbuild/darwin-arm64/package.json b/gsplat/node_modules/@esbuild/darwin-arm64/package.json new file mode 100644 index 0000000..f94d040 --- /dev/null +++ b/gsplat/node_modules/@esbuild/darwin-arm64/package.json @@ -0,0 +1,17 @@ +{ + "name": "@esbuild/darwin-arm64", + "version": "0.19.10", + "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", + "repository": "https://github.com/evanw/esbuild", + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=12" + }, + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} diff --git a/gsplat/node_modules/@rollup/rollup-darwin-arm64/README.md b/gsplat/node_modules/@rollup/rollup-darwin-arm64/README.md new file mode 100644 index 0000000..c29619c --- /dev/null +++ b/gsplat/node_modules/@rollup/rollup-darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@rollup/rollup-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `rollup` diff --git a/gsplat/node_modules/@rollup/rollup-darwin-arm64/package.json b/gsplat/node_modules/@rollup/rollup-darwin-arm64/package.json new file mode 100644 index 0000000..0d18fb1 --- /dev/null +++ b/gsplat/node_modules/@rollup/rollup-darwin-arm64/package.json @@ -0,0 +1,19 @@ +{ + "name": "@rollup/rollup-darwin-arm64", + "version": "4.9.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "files": [ + "rollup.darwin-arm64.node" + ], + "description": "Native bindings for Rollup", + "author": "Lukas Taegert-Atkinson", + "homepage": "https://rollupjs.org/", + "license": "MIT", + "repository": "rollup/rollup", + "main": "./rollup.darwin-arm64.node" +} \ No newline at end of file diff --git a/gsplat/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node b/gsplat/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node new file mode 100644 index 0000000..2f579b8 Binary files /dev/null and b/gsplat/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node differ diff --git a/gsplat/node_modules/esbuild/LICENSE.md b/gsplat/node_modules/esbuild/LICENSE.md new file mode 100644 index 0000000..2027e8d --- /dev/null +++ b/gsplat/node_modules/esbuild/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/gsplat/node_modules/esbuild/README.md b/gsplat/node_modules/esbuild/README.md new file mode 100644 index 0000000..93863d1 --- /dev/null +++ b/gsplat/node_modules/esbuild/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details. diff --git a/gsplat/node_modules/esbuild/bin/esbuild b/gsplat/node_modules/esbuild/bin/esbuild new file mode 100755 index 0000000..71ead61 Binary files /dev/null and b/gsplat/node_modules/esbuild/bin/esbuild differ diff --git a/gsplat/node_modules/esbuild/install.js b/gsplat/node_modules/esbuild/install.js new file mode 100644 index 0000000..6031a0d --- /dev/null +++ b/gsplat/node_modules/esbuild/install.js @@ -0,0 +1,288 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} + +// lib/npm/node-install.ts +var fs2 = require("fs"); +var os2 = require("os"); +var path2 = require("path"); +var zlib = require("zlib"); +var https = require("https"); +var child_process = require("child_process"); +var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version; +var toPath = path2.join(__dirname, "bin", "esbuild"); +var isToPathJS = true; +function validateBinaryVersion(...command) { + command.push("--version"); + let stdout; + try { + stdout = child_process.execFileSync(command.shift(), command, { + // Without this, this install script strangely crashes with the error + // "EACCES: permission denied, write" but only on Ubuntu Linux when node is + // installed from the Snap Store. This is not a problem when you download + // the official version of node. The problem appears to be that stderr + // (i.e. file descriptor 2) isn't writable? + // + // More info: + // - https://snapcraft.io/ (what the Snap Store is) + // - https://nodejs.org/dist/ (download the official version of node) + // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 + // + stdio: "pipe" + }).toString().trim(); + } catch (err) { + if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { + let os3 = "this version of macOS"; + try { + os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); + } catch { + } + throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. + +The Go compiler (which esbuild relies on) no longer supports ${os3}, +which means the "esbuild" binary executable can't be run. You can either: + + * Update your version of macOS to one that the Go compiler supports + * Use the "esbuild-wasm" package instead of the "esbuild" package + * Build esbuild yourself using an older version of the Go compiler +`); + } + throw err; + } + if (stdout !== versionFromPackageJSON) { + throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`); + } +} +function isYarn() { + const { npm_config_user_agent } = process.env; + if (npm_config_user_agent) { + return /\byarn\//.test(npm_config_user_agent); + } + return false; +} +function fetch(url) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) + return fetch(res.headers.location).then(resolve, reject); + if (res.statusCode !== 200) + return reject(new Error(`Server responded with ${res.statusCode}`)); + let chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => resolve(Buffer.concat(chunks))); + }).on("error", reject); + }); +} +function extractFileFromTarGzip(buffer, subpath) { + try { + buffer = zlib.unzipSync(buffer); + } catch (err) { + throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`); + } + let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, ""); + let offset = 0; + subpath = `package/${subpath}`; + while (offset < buffer.length) { + let name = str(offset, 100); + let size = parseInt(str(offset + 124, 12), 8); + offset += 512; + if (!isNaN(size)) { + if (name === subpath) + return buffer.subarray(offset, offset + size); + offset += size + 511 & ~511; + } + } + throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); +} +function installUsingNPM(pkg, subpath, binPath) { + const env = { ...process.env, npm_config_global: void 0 }; + const esbuildLibDir = path2.dirname(require.resolve("esbuild")); + const installDir = path2.join(esbuildLibDir, "npm-install"); + fs2.mkdirSync(installDir); + try { + fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); + child_process.execSync( + `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, + { cwd: installDir, stdio: "pipe", env } + ); + const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); + fs2.renameSync(installedBinPath, binPath); + } finally { + try { + removeRecursive(installDir); + } catch { + } + } +} +function removeRecursive(dir) { + for (const entry of fs2.readdirSync(dir)) { + const entryPath = path2.join(dir, entry); + let stats; + try { + stats = fs2.lstatSync(entryPath); + } catch { + continue; + } + if (stats.isDirectory()) + removeRecursive(entryPath); + else + fs2.unlinkSync(entryPath); + } + fs2.rmdirSync(dir); +} +function applyManualBinaryPathOverride(overridePath) { + const pathString = JSON.stringify(overridePath); + fs2.writeFileSync(toPath, `#!/usr/bin/env node +require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' }); +`); + const libMain = path2.join(__dirname, "lib", "main.js"); + const code = fs2.readFileSync(libMain, "utf8"); + fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString}; +${code}`); +} +function maybeOptimizePackage(binPath) { + if (os2.platform() !== "win32" && !isYarn()) { + const tempPath = path2.join(__dirname, "bin-esbuild"); + try { + fs2.linkSync(binPath, tempPath); + fs2.renameSync(tempPath, toPath); + isToPathJS = false; + fs2.unlinkSync(tempPath); + } catch { + } + } +} +async function downloadDirectlyFromNPM(pkg, subpath, binPath) { + const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`; + console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); + try { + fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath)); + fs2.chmodSync(binPath, 493); + } catch (e) { + console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`); + throw e; + } +} +async function checkAndPreparePackage() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); + return; + } + } + const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + console.error(`[esbuild] Failed to find package "${pkg}" on the file system + +This can happen if you use the "--no-optional" flag. The "optionalDependencies" +package.json feature is used by esbuild to install the correct binary executable +for your current platform. This install script will now attempt to work around +this. If that fails, you need to remove the "--no-optional" flag to use esbuild. +`); + binPath = downloadedBinPath(pkg, subpath); + try { + console.error(`[esbuild] Trying to install package "${pkg}" using npm`); + installUsingNPM(pkg, subpath, binPath); + } catch (e2) { + console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`); + try { + await downloadDirectlyFromNPM(pkg, subpath, binPath); + } catch (e3) { + throw new Error(`Failed to install package "${pkg}"`); + } + } + } + maybeOptimizePackage(binPath); +} +checkAndPreparePackage().then(() => { + if (isToPathJS) { + validateBinaryVersion(process.execPath, toPath); + } else { + validateBinaryVersion(toPath); + } +}); diff --git a/gsplat/node_modules/esbuild/lib/main.d.ts b/gsplat/node_modules/esbuild/lib/main.d.ts new file mode 100644 index 0000000..0c26c6b --- /dev/null +++ b/gsplat/node_modules/esbuild/lib/main.d.ts @@ -0,0 +1,663 @@ +export type Platform = 'browser' | 'node' | 'neutral' +export type Format = 'iife' | 'cjs' | 'esm' +export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' +export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' +export type Charset = 'ascii' | 'utf8' +export type Drop = 'console' | 'debugger' + +interface CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcemap */ + sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' + /** Documentation: https://esbuild.github.io/api/#legal-comments */ + legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' + /** Documentation: https://esbuild.github.io/api/#source-root */ + sourceRoot?: string + /** Documentation: https://esbuild.github.io/api/#sources-content */ + sourcesContent?: boolean + + /** Documentation: https://esbuild.github.io/api/#format */ + format?: Format + /** Documentation: https://esbuild.github.io/api/#global-name */ + globalName?: string + /** Documentation: https://esbuild.github.io/api/#target */ + target?: string | string[] + /** Documentation: https://esbuild.github.io/api/#supported */ + supported?: Record + /** Documentation: https://esbuild.github.io/api/#platform */ + platform?: Platform + + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + reserveProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleQuoted?: boolean + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleCache?: Record + /** Documentation: https://esbuild.github.io/api/#drop */ + drop?: Drop[] + /** Documentation: https://esbuild.github.io/api/#drop-labels */ + dropLabels?: string[] + /** Documentation: https://esbuild.github.io/api/#minify */ + minify?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyWhitespace?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyIdentifiers?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifySyntax?: boolean + /** Documentation: https://esbuild.github.io/api/#line-limit */ + lineLimit?: number + /** Documentation: https://esbuild.github.io/api/#charset */ + charset?: Charset + /** Documentation: https://esbuild.github.io/api/#tree-shaking */ + treeShaking?: boolean + /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ + ignoreAnnotations?: boolean + + /** Documentation: https://esbuild.github.io/api/#jsx */ + jsx?: 'transform' | 'preserve' | 'automatic' + /** Documentation: https://esbuild.github.io/api/#jsx-factory */ + jsxFactory?: string + /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ + jsxFragment?: string + /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ + jsxImportSource?: string + /** Documentation: https://esbuild.github.io/api/#jsx-development */ + jsxDev?: boolean + /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ + jsxSideEffects?: boolean + + /** Documentation: https://esbuild.github.io/api/#define */ + define?: { [key: string]: string } + /** Documentation: https://esbuild.github.io/api/#pure */ + pure?: string[] + /** Documentation: https://esbuild.github.io/api/#keep-names */ + keepNames?: boolean + + /** Documentation: https://esbuild.github.io/api/#color */ + color?: boolean + /** Documentation: https://esbuild.github.io/api/#log-level */ + logLevel?: LogLevel + /** Documentation: https://esbuild.github.io/api/#log-limit */ + logLimit?: number + /** Documentation: https://esbuild.github.io/api/#log-override */ + logOverride?: Record + + /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ + tsconfigRaw?: string | TsconfigRaw +} + +export interface TsconfigRaw { + compilerOptions?: { + alwaysStrict?: boolean + baseUrl?: string + experimentalDecorators?: boolean + importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' + jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' + jsxFactory?: string + jsxFragmentFactory?: string + jsxImportSource?: string + paths?: Record + preserveValueImports?: boolean + strict?: boolean + target?: string + useDefineForClassFields?: boolean + verbatimModuleSyntax?: boolean + } +} + +export interface BuildOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#bundle */ + bundle?: boolean + /** Documentation: https://esbuild.github.io/api/#splitting */ + splitting?: boolean + /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ + preserveSymlinks?: boolean + /** Documentation: https://esbuild.github.io/api/#outfile */ + outfile?: string + /** Documentation: https://esbuild.github.io/api/#metafile */ + metafile?: boolean + /** Documentation: https://esbuild.github.io/api/#outdir */ + outdir?: string + /** Documentation: https://esbuild.github.io/api/#outbase */ + outbase?: string + /** Documentation: https://esbuild.github.io/api/#external */ + external?: string[] + /** Documentation: https://esbuild.github.io/api/#packages */ + packages?: 'external' + /** Documentation: https://esbuild.github.io/api/#alias */ + alias?: Record + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: { [ext: string]: Loader } + /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ + resolveExtensions?: string[] + /** Documentation: https://esbuild.github.io/api/#main-fields */ + mainFields?: string[] + /** Documentation: https://esbuild.github.io/api/#conditions */ + conditions?: string[] + /** Documentation: https://esbuild.github.io/api/#write */ + write?: boolean + /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ + allowOverwrite?: boolean + /** Documentation: https://esbuild.github.io/api/#tsconfig */ + tsconfig?: string + /** Documentation: https://esbuild.github.io/api/#out-extension */ + outExtension?: { [ext: string]: string } + /** Documentation: https://esbuild.github.io/api/#public-path */ + publicPath?: string + /** Documentation: https://esbuild.github.io/api/#entry-names */ + entryNames?: string + /** Documentation: https://esbuild.github.io/api/#chunk-names */ + chunkNames?: string + /** Documentation: https://esbuild.github.io/api/#asset-names */ + assetNames?: string + /** Documentation: https://esbuild.github.io/api/#inject */ + inject?: string[] + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#entry-points */ + entryPoints?: string[] | Record | { in: string, out: string }[] + /** Documentation: https://esbuild.github.io/api/#stdin */ + stdin?: StdinOptions + /** Documentation: https://esbuild.github.io/plugins/ */ + plugins?: Plugin[] + /** Documentation: https://esbuild.github.io/api/#working-directory */ + absWorkingDir?: string + /** Documentation: https://esbuild.github.io/api/#node-paths */ + nodePaths?: string[]; // The "NODE_PATH" variable from Node.js +} + +export interface StdinOptions { + contents: string | Uint8Array + resolveDir?: string + sourcefile?: string + loader?: Loader +} + +export interface Message { + id: string + pluginName: string + text: string + location: Location | null + notes: Note[] + + /** + * Optional user-specified data that is passed through unmodified. You can + * use this to stash the original error, for example. + */ + detail: any +} + +export interface Note { + text: string + location: Location | null +} + +export interface Location { + file: string + namespace: string + /** 1-based */ + line: number + /** 0-based, in bytes */ + column: number + /** in bytes */ + length: number + lineText: string + suggestion: string +} + +export interface OutputFile { + path: string + contents: Uint8Array + hash: string + /** "contents" as text (changes automatically with "contents") */ + readonly text: string +} + +export interface BuildResult { + errors: Message[] + warnings: Message[] + /** Only when "write: false" */ + outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) + /** Only when "metafile: true" */ + metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) +} + +export interface BuildFailure extends Error { + errors: Message[] + warnings: Message[] +} + +/** Documentation: https://esbuild.github.io/api/#serve-arguments */ +export interface ServeOptions { + port?: number + host?: string + servedir?: string + keyfile?: string + certfile?: string + fallback?: string + onRequest?: (args: ServeOnRequestArgs) => void +} + +export interface ServeOnRequestArgs { + remoteAddress: string + method: string + path: string + status: number + /** The time to generate the response, not to send it */ + timeInMS: number +} + +/** Documentation: https://esbuild.github.io/api/#serve-return-values */ +export interface ServeResult { + port: number + host: string +} + +export interface TransformOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcefile */ + sourcefile?: string + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: Loader + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: string + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: string +} + +export interface TransformResult { + code: string + map: string + warnings: Message[] + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) + /** Only when "legalComments" is "external" */ + legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) +} + +export interface TransformFailure extends Error { + errors: Message[] + warnings: Message[] +} + +export interface Plugin { + name: string + setup: (build: PluginBuild) => (void | Promise) +} + +export interface PluginBuild { + /** Documentation: https://esbuild.github.io/plugins/#build-options */ + initialOptions: BuildOptions + + /** Documentation: https://esbuild.github.io/plugins/#resolve */ + resolve(path: string, options?: ResolveOptions): Promise + + /** Documentation: https://esbuild.github.io/plugins/#on-start */ + onStart(callback: () => + (OnStartResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-end */ + onEnd(callback: (result: BuildResult) => + (OnEndResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ + onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => + (OnResolveResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-load */ + onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => + (OnLoadResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ + onDispose(callback: () => void): void + + // This is a full copy of the esbuild library in case you need it + esbuild: { + context: typeof context, + build: typeof build, + buildSync: typeof buildSync, + transform: typeof transform, + transformSync: typeof transformSync, + formatMessages: typeof formatMessages, + formatMessagesSync: typeof formatMessagesSync, + analyzeMetafile: typeof analyzeMetafile, + analyzeMetafileSync: typeof analyzeMetafileSync, + initialize: typeof initialize, + version: typeof version, + } +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ +export interface ResolveOptions { + pluginName?: string + importer?: string + namespace?: string + resolveDir?: string + kind?: ImportKind + pluginData?: any +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ +export interface ResolveResult { + errors: Message[] + warnings: Message[] + + path: string + external: boolean + sideEffects: boolean + namespace: string + suffix: string + pluginData: any +} + +export interface OnStartResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +export interface OnEndResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ +export interface OnResolveOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ +export interface OnResolveArgs { + path: string + importer: string + namespace: string + resolveDir: string + kind: ImportKind + pluginData: any +} + +export type ImportKind = + | 'entry-point' + + // JS + | 'import-statement' + | 'require-call' + | 'dynamic-import' + | 'require-resolve' + + // CSS + | 'import-rule' + | 'composes-from' + | 'url-token' + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ +export interface OnResolveResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + path?: string + external?: boolean + sideEffects?: boolean + namespace?: string + suffix?: string + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ +export interface OnLoadOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ +export interface OnLoadArgs { + path: string + namespace: string + suffix: string + pluginData: any + with: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ +export interface OnLoadResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + contents?: string | Uint8Array + resolveDir?: string + loader?: Loader + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +export interface PartialMessage { + id?: string + pluginName?: string + text?: string + location?: Partial | null + notes?: PartialNote[] + detail?: any +} + +export interface PartialNote { + text?: string + location?: Partial | null +} + +/** Documentation: https://esbuild.github.io/api/#metafile */ +export interface Metafile { + inputs: { + [path: string]: { + bytes: number + imports: { + path: string + kind: ImportKind + external?: boolean + original?: string + with?: Record + }[] + format?: 'cjs' | 'esm' + with?: Record + } + } + outputs: { + [path: string]: { + bytes: number + inputs: { + [path: string]: { + bytesInOutput: number + } + } + imports: { + path: string + kind: ImportKind | 'file-loader' + external?: boolean + }[] + exports: string[] + entryPoint?: string + cssBundle?: string + } + } +} + +export interface FormatMessagesOptions { + kind: 'error' | 'warning' + color?: boolean + terminalWidth?: number +} + +export interface AnalyzeMetafileOptions { + color?: boolean + verbose?: boolean +} + +export interface WatchOptions { +} + +export interface BuildContext { + /** Documentation: https://esbuild.github.io/api/#rebuild */ + rebuild(): Promise> + + /** Documentation: https://esbuild.github.io/api/#watch */ + watch(options?: WatchOptions): Promise + + /** Documentation: https://esbuild.github.io/api/#serve */ + serve(options?: ServeOptions): Promise + + cancel(): Promise + dispose(): Promise +} + +// This is a TypeScript type-level function which replaces any keys in "In" +// that aren't in "Out" with "never". We use this to reject properties with +// typos in object literals. See: https://stackoverflow.com/questions/49580725 +type SameShape = In & { [Key in Exclude]: never } + +/** + * This function invokes the "esbuild" command-line tool for you. It returns a + * promise that either resolves with a "BuildResult" object or rejects with a + * "BuildFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function build(options: SameShape): Promise> + +/** + * This is the advanced long-running form of "build" that supports additional + * features such as watch mode and a local development server. + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function context(options: SameShape): Promise> + +/** + * This function transforms a single JavaScript file. It can be used to minify + * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript + * to older JavaScript. It returns a promise that is either resolved with a + * "TransformResult" object or rejected with a "TransformFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transform(input: string | Uint8Array, options?: SameShape): Promise> + +/** + * Converts log messages to formatted message strings suitable for printing in + * the terminal. This allows you to reuse the built-in behavior of esbuild's + * log message formatter. This is a batch-oriented API for efficiency. + * + * - Works in node: yes + * - Works in browser: yes + */ +export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise + +/** + * Pretty-prints an analysis of the metafile JSON to a string. This is just for + * convenience to be able to match esbuild's pretty-printing exactly. If you want + * to customize it, you can just inspect the data in the metafile yourself. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise + +/** + * A synchronous version of "build". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function buildSync(options: SameShape): BuildResult + +/** + * A synchronous version of "transform". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transformSync(input: string | Uint8Array, options?: SameShape): TransformResult + +/** + * A synchronous version of "formatMessages". + * + * - Works in node: yes + * - Works in browser: no + */ +export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] + +/** + * A synchronous version of "analyzeMetafile". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string + +/** + * This configures the browser-based version of esbuild. It is necessary to + * call this first and wait for the returned promise to be resolved before + * making other API calls when using esbuild in the browser. + * + * - Works in node: yes + * - Works in browser: yes ("options" is required) + * + * Documentation: https://esbuild.github.io/api/#browser + */ +export declare function initialize(options: InitializeOptions): Promise + +export interface InitializeOptions { + /** + * The URL of the "esbuild.wasm" file. This must be provided when running + * esbuild in the browser. + */ + wasmURL?: string | URL + + /** + * The result of calling "new WebAssembly.Module(buffer)" where "buffer" + * is a typed array or ArrayBuffer containing the binary code of the + * "esbuild.wasm" file. + * + * You can use this as an alternative to "wasmURL" for environments where it's + * not possible to download the WebAssembly module. + */ + wasmModule?: WebAssembly.Module + + /** + * By default esbuild runs the WebAssembly-based browser API in a web worker + * to avoid blocking the UI thread. This can be disabled by setting "worker" + * to false. + */ + worker?: boolean +} + +export let version: string diff --git a/gsplat/node_modules/esbuild/lib/main.js b/gsplat/node_modules/esbuild/lib/main.js new file mode 100644 index 0000000..7f5fe8e --- /dev/null +++ b/gsplat/node_modules/esbuild/lib/main.js @@ -0,0 +1,2414 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/npm/node.ts +var node_exports = {}; +__export(node_exports, { + analyzeMetafile: () => analyzeMetafile, + analyzeMetafileSync: () => analyzeMetafileSync, + build: () => build, + buildSync: () => buildSync, + context: () => context, + default: () => node_default, + formatMessages: () => formatMessages, + formatMessagesSync: () => formatMessagesSync, + initialize: () => initialize, + transform: () => transform, + transformSync: () => transformSync, + version: () => version +}); +module.exports = __toCommonJS(node_exports); + +// lib/shared/stdio_protocol.ts +function encodePacket(packet) { + let visit = (value) => { + if (value === null) { + bb.write8(0); + } else if (typeof value === "boolean") { + bb.write8(1); + bb.write8(+value); + } else if (typeof value === "number") { + bb.write8(2); + bb.write32(value | 0); + } else if (typeof value === "string") { + bb.write8(3); + bb.write(encodeUTF8(value)); + } else if (value instanceof Uint8Array) { + bb.write8(4); + bb.write(value); + } else if (value instanceof Array) { + bb.write8(5); + bb.write32(value.length); + for (let item of value) { + visit(item); + } + } else { + let keys = Object.keys(value); + bb.write8(6); + bb.write32(keys.length); + for (let key of keys) { + bb.write(encodeUTF8(key)); + visit(value[key]); + } + } + }; + let bb = new ByteBuffer(); + bb.write32(0); + bb.write32(packet.id << 1 | +!packet.isRequest); + visit(packet.value); + writeUInt32LE(bb.buf, bb.len - 4, 0); + return bb.buf.subarray(0, bb.len); +} +function decodePacket(bytes) { + let visit = () => { + switch (bb.read8()) { + case 0: + return null; + case 1: + return !!bb.read8(); + case 2: + return bb.read32(); + case 3: + return decodeUTF8(bb.read()); + case 4: + return bb.read(); + case 5: { + let count = bb.read32(); + let value2 = []; + for (let i = 0; i < count; i++) { + value2.push(visit()); + } + return value2; + } + case 6: { + let count = bb.read32(); + let value2 = {}; + for (let i = 0; i < count; i++) { + value2[decodeUTF8(bb.read())] = visit(); + } + return value2; + } + default: + throw new Error("Invalid packet"); + } + }; + let bb = new ByteBuffer(bytes); + let id = bb.read32(); + let isRequest = (id & 1) === 0; + id >>>= 1; + let value = visit(); + if (bb.ptr !== bytes.length) { + throw new Error("Invalid packet"); + } + return { id, isRequest, value }; +} +var ByteBuffer = class { + constructor(buf = new Uint8Array(1024)) { + this.buf = buf; + this.len = 0; + this.ptr = 0; + } + _write(delta) { + if (this.len + delta > this.buf.length) { + let clone = new Uint8Array((this.len + delta) * 2); + clone.set(this.buf); + this.buf = clone; + } + this.len += delta; + return this.len - delta; + } + write8(value) { + let offset = this._write(1); + this.buf[offset] = value; + } + write32(value) { + let offset = this._write(4); + writeUInt32LE(this.buf, value, offset); + } + write(bytes) { + let offset = this._write(4 + bytes.length); + writeUInt32LE(this.buf, bytes.length, offset); + this.buf.set(bytes, offset + 4); + } + _read(delta) { + if (this.ptr + delta > this.buf.length) { + throw new Error("Invalid packet"); + } + this.ptr += delta; + return this.ptr - delta; + } + read8() { + return this.buf[this._read(1)]; + } + read32() { + return readUInt32LE(this.buf, this._read(4)); + } + read() { + let length = this.read32(); + let bytes = new Uint8Array(length); + let ptr = this._read(bytes.length); + bytes.set(this.buf.subarray(ptr, ptr + length)); + return bytes; + } +}; +var encodeUTF8; +var decodeUTF8; +var encodeInvariant; +if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { + let encoder = new TextEncoder(); + let decoder = new TextDecoder(); + encodeUTF8 = (text) => encoder.encode(text); + decodeUTF8 = (bytes) => decoder.decode(bytes); + encodeInvariant = 'new TextEncoder().encode("")'; +} else if (typeof Buffer !== "undefined") { + encodeUTF8 = (text) => Buffer.from(text); + decodeUTF8 = (bytes) => { + let { buffer, byteOffset, byteLength } = bytes; + return Buffer.from(buffer, byteOffset, byteLength).toString(); + }; + encodeInvariant = 'Buffer.from("")'; +} else { + throw new Error("No UTF-8 codec found"); +} +if (!(encodeUTF8("") instanceof Uint8Array)) + throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false + +This indicates that your JavaScript environment is broken. You cannot use +esbuild in this environment because esbuild relies on this invariant. This +is not a problem with esbuild. You need to fix your environment instead. +`); +function readUInt32LE(buffer, offset) { + return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24; +} +function writeUInt32LE(buffer, value, offset) { + buffer[offset++] = value; + buffer[offset++] = value >> 8; + buffer[offset++] = value >> 16; + buffer[offset++] = value >> 24; +} + +// lib/shared/common.ts +var quote = JSON.stringify; +var buildLogLevelDefault = "warning"; +var transformLogLevelDefault = "silent"; +function validateTarget(target) { + validateStringValue(target, "target"); + if (target.indexOf(",") >= 0) + throw new Error(`Invalid target: ${target}`); + return target; +} +var canBeAnything = () => null; +var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; +var mustBeString = (value) => typeof value === "string" ? null : "a string"; +var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; +var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; +var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; +var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; +var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; +var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; +var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; +var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; +var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; +var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; +var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array"; +var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; +var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; +function getFlag(object, keys, key, mustBeFn) { + let value = object[key]; + keys[key + ""] = true; + if (value === void 0) + return void 0; + let mustBe = mustBeFn(value); + if (mustBe !== null) + throw new Error(`${quote(key)} must be ${mustBe}`); + return value; +} +function checkForInvalidFlags(object, keys, where) { + for (let key in object) { + if (!(key in keys)) { + throw new Error(`Invalid option ${where}: ${quote(key)}`); + } + } +} +function validateInitializeOptions(options) { + let keys = /* @__PURE__ */ Object.create(null); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); + let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let worker = getFlag(options, keys, "worker", mustBeBoolean); + checkForInvalidFlags(options, keys, "in initialize() call"); + return { + wasmURL, + wasmModule, + worker + }; +} +function validateMangleCache(mangleCache) { + let validated; + if (mangleCache !== void 0) { + validated = /* @__PURE__ */ Object.create(null); + for (let key in mangleCache) { + let value = mangleCache[key]; + if (typeof value === "string" || value === false) { + validated[key] = value; + } else { + throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); + } + } + } + return validated; +} +function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { + let color = getFlag(options, keys, "color", mustBeBoolean); + let logLevel = getFlag(options, keys, "logLevel", mustBeString); + let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); + if (color !== void 0) + flags.push(`--color=${color}`); + else if (isTTY2) + flags.push(`--color=true`); + flags.push(`--log-level=${logLevel || logLevelDefault}`); + flags.push(`--log-limit=${logLimit || 0}`); +} +function validateStringValue(value, what, key) { + if (typeof value !== "string") { + throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); + } + return value; +} +function pushCommonFlags(flags, options, keys) { + let legalComments = getFlag(options, keys, "legalComments", mustBeString); + let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); + let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); + let target = getFlag(options, keys, "target", mustBeStringOrArray); + let format = getFlag(options, keys, "format", mustBeString); + let globalName = getFlag(options, keys, "globalName", mustBeString); + let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); + let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); + let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); + let minify = getFlag(options, keys, "minify", mustBeBoolean); + let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); + let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); + let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); + let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); + let drop = getFlag(options, keys, "drop", mustBeArray); + let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray); + let charset = getFlag(options, keys, "charset", mustBeString); + let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); + let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); + let jsx = getFlag(options, keys, "jsx", mustBeString); + let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); + let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); + let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); + let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); + let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); + let define = getFlag(options, keys, "define", mustBeObject); + let logOverride = getFlag(options, keys, "logOverride", mustBeObject); + let supported = getFlag(options, keys, "supported", mustBeObject); + let pure = getFlag(options, keys, "pure", mustBeArray); + let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); + let platform = getFlag(options, keys, "platform", mustBeString); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); + if (legalComments) + flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) + flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) + flags.push(`--sources-content=${sourcesContent}`); + if (target) { + if (Array.isArray(target)) + flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`); + else + flags.push(`--target=${validateTarget(target)}`); + } + if (format) + flags.push(`--format=${format}`); + if (globalName) + flags.push(`--global-name=${globalName}`); + if (platform) + flags.push(`--platform=${platform}`); + if (tsconfigRaw) + flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (minify) + flags.push("--minify"); + if (minifySyntax) + flags.push("--minify-syntax"); + if (minifyWhitespace) + flags.push("--minify-whitespace"); + if (minifyIdentifiers) + flags.push("--minify-identifiers"); + if (lineLimit) + flags.push(`--line-limit=${lineLimit}`); + if (charset) + flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) + flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) + flags.push(`--ignore-annotations`); + if (drop) + for (let what of drop) + flags.push(`--drop:${validateStringValue(what, "drop")}`); + if (dropLabels) + flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`); + if (mangleProps) + flags.push(`--mangle-props=${mangleProps.source}`); + if (reserveProps) + flags.push(`--reserve-props=${reserveProps.source}`); + if (mangleQuoted !== void 0) + flags.push(`--mangle-quoted=${mangleQuoted}`); + if (jsx) + flags.push(`--jsx=${jsx}`); + if (jsxFactory) + flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) + flags.push(`--jsx-fragment=${jsxFragment}`); + if (jsxImportSource) + flags.push(`--jsx-import-source=${jsxImportSource}`); + if (jsxDev) + flags.push(`--jsx-dev`); + if (jsxSideEffects) + flags.push(`--jsx-side-effects`); + if (define) { + for (let key in define) { + if (key.indexOf("=") >= 0) + throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + } + } + if (logOverride) { + for (let key in logOverride) { + if (key.indexOf("=") >= 0) + throw new Error(`Invalid log override: ${key}`); + flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); + } + } + if (supported) { + for (let key in supported) { + if (key.indexOf("=") >= 0) + throw new Error(`Invalid supported: ${key}`); + const value = supported[key]; + if (typeof value !== "boolean") + throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); + flags.push(`--supported:${key}=${value}`); + } + } + if (pure) + for (let fn of pure) + flags.push(`--pure:${validateStringValue(fn, "pure")}`); + if (keepNames) + flags.push(`--keep-names`); +} +function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { + var _a2; + let flags = []; + let entries = []; + let keys = /* @__PURE__ */ Object.create(null); + let stdinContents = null; + let stdinResolveDir = null; + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let splitting = getFlag(options, keys, "splitting", mustBeBoolean); + let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); + let metafile = getFlag(options, keys, "metafile", mustBeBoolean); + let outfile = getFlag(options, keys, "outfile", mustBeString); + let outdir = getFlag(options, keys, "outdir", mustBeString); + let outbase = getFlag(options, keys, "outbase", mustBeString); + let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); + let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray); + let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray); + let mainFields = getFlag(options, keys, "mainFields", mustBeArray); + let conditions = getFlag(options, keys, "conditions", mustBeArray); + let external = getFlag(options, keys, "external", mustBeArray); + let packages = getFlag(options, keys, "packages", mustBeString); + let alias = getFlag(options, keys, "alias", mustBeObject); + let loader = getFlag(options, keys, "loader", mustBeObject); + let outExtension = getFlag(options, keys, "outExtension", mustBeObject); + let publicPath = getFlag(options, keys, "publicPath", mustBeString); + let entryNames = getFlag(options, keys, "entryNames", mustBeString); + let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); + let assetNames = getFlag(options, keys, "assetNames", mustBeString); + let inject = getFlag(options, keys, "inject", mustBeArray); + let banner = getFlag(options, keys, "banner", mustBeObject); + let footer = getFlag(options, keys, "footer", mustBeObject); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); + let stdin = getFlag(options, keys, "stdin", mustBeObject); + let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; + let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + keys.plugins = true; + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) + flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) + flags.push("--bundle"); + if (allowOverwrite) + flags.push("--allow-overwrite"); + if (splitting) + flags.push("--splitting"); + if (preserveSymlinks) + flags.push("--preserve-symlinks"); + if (metafile) + flags.push(`--metafile`); + if (outfile) + flags.push(`--outfile=${outfile}`); + if (outdir) + flags.push(`--outdir=${outdir}`); + if (outbase) + flags.push(`--outbase=${outbase}`); + if (tsconfig) + flags.push(`--tsconfig=${tsconfig}`); + if (packages) + flags.push(`--packages=${packages}`); + if (resolveExtensions) { + let values = []; + for (let value of resolveExtensions) { + validateStringValue(value, "resolve extension"); + if (value.indexOf(",") >= 0) + throw new Error(`Invalid resolve extension: ${value}`); + values.push(value); + } + flags.push(`--resolve-extensions=${values.join(",")}`); + } + if (publicPath) + flags.push(`--public-path=${publicPath}`); + if (entryNames) + flags.push(`--entry-names=${entryNames}`); + if (chunkNames) + flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) + flags.push(`--asset-names=${assetNames}`); + if (mainFields) { + let values = []; + for (let value of mainFields) { + validateStringValue(value, "main field"); + if (value.indexOf(",") >= 0) + throw new Error(`Invalid main field: ${value}`); + values.push(value); + } + flags.push(`--main-fields=${values.join(",")}`); + } + if (conditions) { + let values = []; + for (let value of conditions) { + validateStringValue(value, "condition"); + if (value.indexOf(",") >= 0) + throw new Error(`Invalid condition: ${value}`); + values.push(value); + } + flags.push(`--conditions=${values.join(",")}`); + } + if (external) + for (let name of external) + flags.push(`--external:${validateStringValue(name, "external")}`); + if (alias) { + for (let old in alias) { + if (old.indexOf("=") >= 0) + throw new Error(`Invalid package name in alias: ${old}`); + flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); + } + } + if (banner) { + for (let type in banner) { + if (type.indexOf("=") >= 0) + throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + } + } + if (footer) { + for (let type in footer) { + if (type.indexOf("=") >= 0) + throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + } + } + if (inject) + for (let path3 of inject) + flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (loader) { + for (let ext in loader) { + if (ext.indexOf("=") >= 0) + throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + } + } + if (outExtension) { + for (let ext in outExtension) { + if (ext.indexOf("=") >= 0) + throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + } + } + if (entryPoints) { + if (Array.isArray(entryPoints)) { + for (let i = 0, n = entryPoints.length; i < n; i++) { + let entryPoint = entryPoints[i]; + if (typeof entryPoint === "object" && entryPoint !== null) { + let entryPointKeys = /* @__PURE__ */ Object.create(null); + let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); + let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); + checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); + if (input === void 0) + throw new Error('Missing property "in" for entry point at index ' + i); + if (output === void 0) + throw new Error('Missing property "out" for entry point at index ' + i); + entries.push([output, input]); + } else { + entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); + } + } + } else { + for (let key in entryPoints) { + entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + } + } + } + if (stdin) { + let stdinKeys = /* @__PURE__ */ Object.create(null); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); + let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); + let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); + checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); + if (sourcefile) + flags.push(`--sourcefile=${sourcefile}`); + if (loader2) + flags.push(`--loader=${loader2}`); + if (resolveDir) + stdinResolveDir = resolveDir; + if (typeof contents === "string") + stdinContents = encodeUTF8(contents); + else if (contents instanceof Uint8Array) + stdinContents = contents; + } + let nodePaths = []; + if (nodePathsInput) { + for (let value of nodePathsInput) { + value += ""; + nodePaths.push(value); + } + } + return { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache: validateMangleCache(mangleCache) + }; +} +function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { + let flags = []; + let keys = /* @__PURE__ */ Object.create(null); + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); + let loader = getFlag(options, keys, "loader", mustBeString); + let banner = getFlag(options, keys, "banner", mustBeString); + let footer = getFlag(options, keys, "footer", mustBeString); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) + flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (sourcefile) + flags.push(`--sourcefile=${sourcefile}`); + if (loader) + flags.push(`--loader=${loader}`); + if (banner) + flags.push(`--banner=${banner}`); + if (footer) + flags.push(`--footer=${footer}`); + return { + flags, + mangleCache: validateMangleCache(mangleCache) + }; +} +function createChannel(streamIn) { + const requestCallbacksByKey = {}; + const closeData = { didClose: false, reason: "" }; + let responseCallbacks = {}; + let nextRequestID = 0; + let nextBuildKey = 0; + let stdout = new Uint8Array(16 * 1024); + let stdoutUsed = 0; + let readFromStdout = (chunk) => { + let limit = stdoutUsed + chunk.length; + if (limit > stdout.length) { + let swap = new Uint8Array(limit * 2); + swap.set(stdout); + stdout = swap; + } + stdout.set(chunk, stdoutUsed); + stdoutUsed += chunk.length; + let offset = 0; + while (offset + 4 <= stdoutUsed) { + let length = readUInt32LE(stdout, offset); + if (offset + 4 + length > stdoutUsed) { + break; + } + offset += 4; + handleIncomingPacket(stdout.subarray(offset, offset + length)); + offset += length; + } + if (offset > 0) { + stdout.copyWithin(0, offset, stdoutUsed); + stdoutUsed -= offset; + } + }; + let afterClose = (error) => { + closeData.didClose = true; + if (error) + closeData.reason = ": " + (error.message || error); + const text = "The service was stopped" + closeData.reason; + for (let id in responseCallbacks) { + responseCallbacks[id](text, null); + } + responseCallbacks = {}; + }; + let sendRequest = (refs, value, callback) => { + if (closeData.didClose) + return callback("The service is no longer running" + closeData.reason, null); + let id = nextRequestID++; + responseCallbacks[id] = (error, response) => { + try { + callback(error, response); + } finally { + if (refs) + refs.unref(); + } + }; + if (refs) + refs.ref(); + streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); + }; + let sendResponse = (id, value) => { + if (closeData.didClose) + throw new Error("The service is no longer running" + closeData.reason); + streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); + }; + let handleRequest = async (id, request) => { + try { + if (request.command === "ping") { + sendResponse(id, {}); + return; + } + if (typeof request.key === "number") { + const requestCallbacks = requestCallbacksByKey[request.key]; + if (!requestCallbacks) { + return; + } + const callback = requestCallbacks[request.command]; + if (callback) { + await callback(id, request); + return; + } + } + throw new Error(`Invalid command: ` + request.command); + } catch (e) { + const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; + try { + sendResponse(id, { errors }); + } catch { + } + } + }; + let isFirstPacket = true; + let handleIncomingPacket = (bytes) => { + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); + if (binaryVersion !== "0.19.10") { + throw new Error(`Cannot start service: Host version "${"0.19.10"}" does not match binary version ${quote(binaryVersion)}`); + } + return; + } + let packet = decodePacket(bytes); + if (packet.isRequest) { + handleRequest(packet.id, packet.value); + } else { + let callback = responseCallbacks[packet.id]; + delete responseCallbacks[packet.id]; + if (packet.value.error) + callback(packet.value.error, {}); + else + callback(null, packet.value); + } + }; + let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { + let refCount = 0; + const buildKey = nextBuildKey++; + const requestCallbacks = {}; + const buildRefs = { + ref() { + if (++refCount === 1) { + if (refs) + refs.ref(); + } + }, + unref() { + if (--refCount === 0) { + delete requestCallbacksByKey[buildKey]; + if (refs) + refs.unref(); + } + } + }; + requestCallbacksByKey[buildKey] = requestCallbacks; + buildRefs.ref(); + buildOrContextImpl( + callName, + buildKey, + sendRequest, + sendResponse, + buildRefs, + streamIn, + requestCallbacks, + options, + isTTY2, + defaultWD2, + (err, res) => { + try { + callback(err, res); + } finally { + buildRefs.unref(); + } + } + ); + }; + let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { + const details = createObjectStash(); + let start = (inputPath) => { + try { + if (typeof input !== "string" && !(input instanceof Uint8Array)) + throw new Error('The input to "transform" must be a string or a Uint8Array'); + let { + flags, + mangleCache + } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + let request = { + command: "transform", + flags, + inputFS: inputPath !== null, + input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + }; + if (mangleCache) + request.mangleCache = mangleCache; + sendRequest(refs, request, (error, response) => { + if (error) + return callback(new Error(error), null); + let errors = replaceDetailsInMessages(response.errors, details); + let warnings = replaceDetailsInMessages(response.warnings, details); + let outstanding = 1; + let next = () => { + if (--outstanding === 0) { + let result = { + warnings, + code: response.code, + map: response.map, + mangleCache: void 0, + legalComments: void 0 + }; + if ("legalComments" in response) + result.legalComments = response == null ? void 0 : response.legalComments; + if (response.mangleCache) + result.mangleCache = response == null ? void 0 : response.mangleCache; + callback(null, result); + } + }; + if (errors.length > 0) + return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + if (response.codeFS) { + outstanding++; + fs3.readFile(response.code, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.code = contents; + next(); + } + }); + } + if (response.mapFS) { + outstanding++; + fs3.readFile(response.map, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.map = contents; + next(); + } + }); + } + next(); + }); + } catch (e) { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); + } catch { + } + const error = extractErrorMessageV8(e, streamIn, details, void 0, ""); + sendRequest(refs, { command: "error", flags, error }, () => { + error.detail = details.load(error.detail); + callback(failureErrorWithLog("Transform failed", [error], []), null); + }); + } + }; + if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + let next = start; + start = () => fs3.writeFile(input, next); + } + start(null); + }; + let formatMessages2 = ({ callName, refs, messages, options, callback }) => { + if (!options) + throw new Error(`Missing second argument in ${callName}() call`); + let keys = {}; + let kind = getFlag(options, keys, "kind", mustBeString); + let color = getFlag(options, keys, "color", mustBeBoolean); + let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (kind === void 0) + throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") + throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + let request = { + command: "format-msgs", + messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + isWarning: kind === "warning" + }; + if (color !== void 0) + request.color = color; + if (terminalWidth !== void 0) + request.terminalWidth = terminalWidth; + sendRequest(refs, request, (error, response) => { + if (error) + return callback(new Error(error), null); + callback(null, response.messages); + }); + }; + let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { + if (options === void 0) + options = {}; + let keys = {}; + let color = getFlag(options, keys, "color", mustBeBoolean); + let verbose = getFlag(options, keys, "verbose", mustBeBoolean); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + let request = { + command: "analyze-metafile", + metafile + }; + if (color !== void 0) + request.color = color; + if (verbose !== void 0) + request.verbose = verbose; + sendRequest(refs, request, (error, response) => { + if (error) + return callback(new Error(error), null); + callback(null, response.result); + }); + }; + return { + readFromStdout, + afterClose, + service: { + buildOrContext, + transform: transform2, + formatMessages: formatMessages2, + analyzeMetafile: analyzeMetafile2 + } + }; +} +function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { + const details = createObjectStash(); + const isContext = callName === "context"; + const handleError = (e, pluginName) => { + const flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); + }); + }; + let plugins; + if (typeof options === "object") { + const value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) + return handleError(new Error(`"plugins" must be an array`), ""); + plugins = value; + } + } + if (plugins && plugins.length > 0) { + if (streamIn.isSync) + return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins( + buildKey, + sendRequest, + sendResponse, + refs, + streamIn, + requestCallbacks, + options, + plugins, + details + ).then( + (result) => { + if (!result.ok) + return handleError(result.error, result.pluginName); + try { + buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); + } catch (e) { + handleError(e, ""); + } + }, + (e) => handleError(e, "") + ); + return; + } + try { + buildOrContextContinue(null, (result, done) => done([], []), () => { + }); + } catch (e) { + handleError(e, ""); + } + function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { + const writeDefault = streamIn.hasFS; + const { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + if (write && !streamIn.hasFS) + throw new Error(`The "write" option is unavailable in this environment`); + const request = { + command: "build", + key: buildKey, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + nodePaths, + context: isContext + }; + if (requestPlugins) + request.plugins = requestPlugins; + if (mangleCache) + request.mangleCache = mangleCache; + const buildResponseToResult = (response, callback2) => { + const result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + outputFiles: void 0, + metafile: void 0, + mangleCache: void 0 + }; + const originalErrors = result.errors.slice(); + const originalWarnings = result.warnings.slice(); + if (response.outputFiles) + result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile) + result.metafile = JSON.parse(response.metafile); + if (response.mangleCache) + result.mangleCache = response.mangleCache; + if (response.writeToStdout !== void 0) + console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { + if (originalErrors.length > 0 || onEndErrors.length > 0) { + const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); + return callback2(error, null, onEndErrors, onEndWarnings); + } + callback2(null, result, onEndErrors, onEndWarnings); + }); + }; + let latestResultPromise; + let provideLatestResult; + if (isContext) + requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { + buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { + const response = { + errors: onEndErrors, + warnings: onEndWarnings + }; + if (provideLatestResult) + provideLatestResult(err, result); + latestResultPromise = void 0; + provideLatestResult = void 0; + sendResponse(id, response); + resolve(); + }); + }); + sendRequest(refs, request, (error, response) => { + if (error) + return callback(new Error(error), null); + if (!isContext) { + return buildResponseToResult(response, (err, res) => { + scheduleOnDisposeCallbacks(); + return callback(err, res); + }); + } + if (response.errors.length > 0) { + return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); + } + let didDispose = false; + const result = { + rebuild: () => { + if (!latestResultPromise) + latestResultPromise = new Promise((resolve, reject) => { + let settlePromise; + provideLatestResult = (err, result2) => { + if (!settlePromise) + settlePromise = () => err ? reject(err) : resolve(result2); + }; + const triggerAnotherBuild = () => { + const request2 = { + command: "rebuild", + key: buildKey + }; + sendRequest(refs, request2, (error2, response2) => { + if (error2) { + reject(new Error(error2)); + } else if (settlePromise) { + settlePromise(); + } else { + triggerAnotherBuild(); + } + }); + }; + triggerAnotherBuild(); + }); + return latestResultPromise; + }, + watch: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) + throw new Error(`Cannot use the "watch" API in this environment`); + const keys = {}; + checkForInvalidFlags(options2, keys, `in watch() call`); + const request2 = { + command: "watch", + key: buildKey + }; + sendRequest(refs, request2, (error2) => { + if (error2) + reject(new Error(error2)); + else + resolve(void 0); + }); + }), + serve: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) + throw new Error(`Cannot use the "serve" API in this environment`); + const keys = {}; + const port = getFlag(options2, keys, "port", mustBeInteger); + const host = getFlag(options2, keys, "host", mustBeString); + const servedir = getFlag(options2, keys, "servedir", mustBeString); + const keyfile = getFlag(options2, keys, "keyfile", mustBeString); + const certfile = getFlag(options2, keys, "certfile", mustBeString); + const fallback = getFlag(options2, keys, "fallback", mustBeString); + const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); + checkForInvalidFlags(options2, keys, `in serve() call`); + const request2 = { + command: "serve", + key: buildKey, + onRequest: !!onRequest + }; + if (port !== void 0) + request2.port = port; + if (host !== void 0) + request2.host = host; + if (servedir !== void 0) + request2.servedir = servedir; + if (keyfile !== void 0) + request2.keyfile = keyfile; + if (certfile !== void 0) + request2.certfile = certfile; + if (fallback !== void 0) + request2.fallback = fallback; + sendRequest(refs, request2, (error2, response2) => { + if (error2) + return reject(new Error(error2)); + if (onRequest) { + requestCallbacks["serve-request"] = (id, request3) => { + onRequest(request3.args); + sendResponse(id, {}); + }; + } + resolve(response2); + }); + }), + cancel: () => new Promise((resolve) => { + if (didDispose) + return resolve(); + const request2 = { + command: "cancel", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + }); + }), + dispose: () => new Promise((resolve) => { + if (didDispose) + return resolve(); + didDispose = true; + const request2 = { + command: "dispose", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + scheduleOnDisposeCallbacks(); + refs.unref(); + }); + }) + }; + refs.ref(); + callback(null, result); + }); + } +} +var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let onDisposeCallbacks = []; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") + throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") + throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") + throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); + let plugin = { + name, + onStart: false, + onEnd: false, + onResolve: [], + onLoad: [] + }; + i++; + let resolve = (path3, options = {}) => { + if (!isSetupDone) + throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") + throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve2, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) + request.pluginName = pluginName; + if (importer != null) + request.importer = importer; + if (namespace != null) + request.namespace = namespace; + if (resolveDir != null) + request.resolveDir = resolveDir; + if (kind != null) + request.kind = kind; + else + throw new Error(`Must specify "kind" when calling "resolve"`); + if (pluginData != null) + request.pluginData = details.store(pluginData); + sendRequest(refs, request, (error, response) => { + if (error !== null) + reject(new Error(error)); + else + resolve2({ + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: details.load(response.pluginData) + }); + }); + }); + }; + let promise = setup({ + initialOptions, + resolve, + onStart(callback) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback, note: registeredNote }); + plugin.onStart = true; + }, + onEnd(callback) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback, note: registeredNote }); + plugin.onEnd = true; + }, + onResolve(options, callback) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); + if (filter == null) + throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + onLoad(options, callback) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); + if (filter == null) + throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + onDispose(callback) { + onDisposeCallbacks.push(callback); + }, + esbuild: streamIn.esbuild + }); + if (promise) + await promise; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + requestCallbacks["on-start"] = async (id, request) => { + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { + try { + let result = await callback(); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); + if (errors != null) + response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); + if (warnings != null) + response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); + } + })); + sendResponse(id, response); + }; + requestCallbacks["on-resolve"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onResolveCallbacks[id2]); + let result = await callback({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: details.load(request.pluginData) + }); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) + response.pluginName = pluginName; + if (path3 != null) + response.path = path3; + if (namespace != null) + response.namespace = namespace; + if (suffix != null) + response.suffix = suffix; + if (external != null) + response.external = external; + if (sideEffects != null) + response.sideEffects = sideEffects; + if (pluginData != null) + response.pluginData = details.store(pluginData); + if (errors != null) + response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) + response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) + response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) + response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + requestCallbacks["on-load"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onLoadCallbacks[id2]); + let result = await callback({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) + response.pluginName = pluginName; + if (contents instanceof Uint8Array) + response.contents = contents; + else if (contents != null) + response.contents = encodeUTF8(contents); + if (resolveDir != null) + response.resolveDir = resolveDir; + if (pluginData != null) + response.pluginData = details.store(pluginData); + if (loader != null) + response.loader = loader; + if (errors != null) + response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) + response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) + response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) + response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + let runOnEndCallbacks = (result, done) => done([], []); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, done) => { + (async () => { + const onEndErrors = []; + const onEndWarnings = []; + for (const { name, callback, note } of onEndCallbacks) { + let newErrors; + let newWarnings; + try { + const value = await callback(result); + if (value != null) { + if (typeof value !== "object") + throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(value, keys, "errors", mustBeArray); + let warnings = getFlag(value, keys, "warnings", mustBeArray); + checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); + if (errors != null) + newErrors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) + newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + } + } catch (e) { + newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; + } + if (newErrors) { + onEndErrors.push(...newErrors); + try { + result.errors.push(...newErrors); + } catch { + } + } + if (newWarnings) { + onEndWarnings.push(...newWarnings); + try { + result.warnings.push(...newWarnings); + } catch { + } + } + } + done(onEndErrors, onEndWarnings); + })(); + }; + } + let scheduleOnDisposeCallbacks = () => { + for (const cb of onDisposeCallbacks) { + setTimeout(() => cb(), 0); + } + }; + isSetupDone = true; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + scheduleOnDisposeCallbacks + }; +}; +function createObjectStash() { + const map = /* @__PURE__ */ new Map(); + let nextID = 0; + return { + load(id) { + return map.get(id); + }, + store(value) { + if (value === void 0) + return -1; + const id = nextID++; + map.set(id, value); + return id; + } + }; +} +function extractCallerV8(e, streamIn, ident) { + let note; + let tried = false; + return () => { + if (tried) + return note; + tried = true; + try { + let lines = (e.stack + "").split("\n"); + lines.splice(1, 1); + let location = parseStackLinesV8(streamIn, lines, ident); + if (location) { + note = { text: e.message, location }; + return note; + } + } catch { + } + }; +} +function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { + let text = "Internal error"; + let location = null; + try { + text = (e && e.message || e) + ""; + } catch { + } + try { + location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); + } catch { + } + return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; +} +function parseStackLinesV8(streamIn, lines, ident) { + let at = " at "; + if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { + for (let i = 1; i < lines.length; i++) { + let line = lines[i]; + if (!line.startsWith(at)) + continue; + line = line.slice(at.length); + while (true) { + let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^(\S+):(\d+):(\d+)$/.exec(line); + if (match) { + let contents; + try { + contents = streamIn.readFileSync(match[1], "utf8"); + } catch { + break; + } + let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; + let column = +match[3] - 1; + let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; + return { + file: match[1], + namespace: "file", + line: +match[2], + column: encodeUTF8(lineText.slice(0, column)).length, + length: encodeUTF8(lineText.slice(column, column + length)).length, + lineText: lineText + "\n" + lines.slice(1).join("\n"), + suggestion: "" + }; + } + break; + } + } + } + return null; +} +function failureErrorWithLog(text, errors, warnings) { + let limit = 5; + text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) + return "\n..."; + if (!e.location) + return ` +error: ${e.text}`; + let { file, line, column } = e.location; + let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; + return ` +${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; + }).join(""); + let error = new Error(text); + for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { + Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + get: () => value, + set: (value2) => Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + value: value2 + }) + }); + } + return error; +} +function replaceDetailsInMessages(messages, stash) { + for (const message of messages) { + message.detail = stash.load(message.detail); + } + return messages; +} +function sanitizeLocation(location, where, terminalWidth) { + if (location == null) + return null; + let keys = {}; + let file = getFlag(location, keys, "file", mustBeString); + let namespace = getFlag(location, keys, "namespace", mustBeString); + let line = getFlag(location, keys, "line", mustBeInteger); + let column = getFlag(location, keys, "column", mustBeInteger); + let length = getFlag(location, keys, "length", mustBeInteger); + let lineText = getFlag(location, keys, "lineText", mustBeString); + let suggestion = getFlag(location, keys, "suggestion", mustBeString); + checkForInvalidFlags(location, keys, where); + if (lineText) { + const relevantASCII = lineText.slice( + 0, + (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) + ); + if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { + lineText = relevantASCII; + } + } + return { + file: file || "", + namespace: namespace || "", + line: line || 0, + column: column || 0, + length: length || 0, + lineText: lineText || "", + suggestion: suggestion || "" + }; +} +function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { + let messagesClone = []; + let index = 0; + for (const message of messages) { + let keys = {}; + let id = getFlag(message, keys, "id", mustBeString); + let pluginName = getFlag(message, keys, "pluginName", mustBeString); + let text = getFlag(message, keys, "text", mustBeString); + let location = getFlag(message, keys, "location", mustBeObjectOrNull); + let notes = getFlag(message, keys, "notes", mustBeArray); + let detail = getFlag(message, keys, "detail", canBeAnything); + let where = `in element ${index} of "${property}"`; + checkForInvalidFlags(message, keys, where); + let notesClone = []; + if (notes) { + for (const note of notes) { + let noteKeys = {}; + let noteText = getFlag(note, noteKeys, "text", mustBeString); + let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); + checkForInvalidFlags(note, noteKeys, where); + notesClone.push({ + text: noteText || "", + location: sanitizeLocation(noteLocation, where, terminalWidth) + }); + } + } + messagesClone.push({ + id: id || "", + pluginName: pluginName || fallbackPluginName, + text: text || "", + location: sanitizeLocation(location, where, terminalWidth), + notes: notesClone, + detail: stash ? stash.store(detail) : -1 + }); + index++; + } + return messagesClone; +} +function sanitizeStringArray(values, property) { + const result = []; + for (const value of values) { + if (typeof value !== "string") + throw new Error(`${quote(property)} must be an array of strings`); + result.push(value); + } + return result; +} +function convertOutputFiles({ path: path3, contents, hash }) { + let text = null; + return { + path: path3, + contents, + hash, + get text() { + const binary = this.contents; + if (text === null || binary !== contents) { + contents = binary; + text = decodeUTF8(binary); + } + return text; + } + }; +} + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var packageDarwin_arm64 = "@esbuild/darwin-arm64"; +var packageDarwin_x64 = "@esbuild/darwin-x64"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function pkgForSomeOtherPlatform() { + const libMainJS = require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; + } catch { + } + } + } + return null; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} +function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { + try { + require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath)) { + let pnpapi; + try { + pnpapi = require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.19.10"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM }; + } + } + return { binPath, isWASM }; +} + +// lib/npm/node.ts +var child_process = require("child_process"); +var crypto = require("crypto"); +var path2 = require("path"); +var fs2 = require("fs"); +var os2 = require("os"); +var tty = require("tty"); +var worker_threads; +if (process.env.ESBUILD_WORKER_THREADS !== "0") { + try { + worker_threads = require("worker_threads"); + } catch { + } + let [major, minor] = process.versions.node.split("."); + if ( + // { + if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { + throw new Error( + `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` + ); + } + if (false) { + return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; + } else { + const { binPath, isWASM } = generateBinPath(); + if (isWASM) { + return ["node", [binPath]]; + } else { + return [binPath, []]; + } + } +}; +var isTTY = () => tty.isatty(2); +var fsSync = { + readFile(tempFile, callback) { + try { + let contents = fs2.readFileSync(tempFile, "utf8"); + try { + fs2.unlinkSync(tempFile); + } catch { + } + callback(null, contents); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFileSync(tempFile, contents); + callback(tempFile); + } catch { + callback(null); + } + } +}; +var fsAsync = { + readFile(tempFile, callback) { + try { + fs2.readFile(tempFile, "utf8", (err, contents) => { + try { + fs2.unlink(tempFile, () => callback(err, contents)); + } catch { + callback(err, contents); + } + }); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); + } catch { + callback(null); + } + } +}; +var version = "0.19.10"; +var build = (options) => ensureServiceIsRunning().build(options); +var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); +var transform = (input, options) => ensureServiceIsRunning().transform(input, options); +var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); +var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); +var buildSync = (options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.buildSync(options); + } + let result; + runServiceSync((service) => service.buildOrContext({ + callName: "buildSync", + refs: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => { + if (err) + throw err; + result = res; + } + })); + return result; +}; +var transformSync = (input, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.transformSync(input, options); + } + let result; + runServiceSync((service) => service.transform({ + callName: "transformSync", + refs: null, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsSync, + callback: (err, res) => { + if (err) + throw err; + result = res; + } + })); + return result; +}; +var formatMessagesSync = (messages, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.formatMessagesSync(messages, options); + } + let result; + runServiceSync((service) => service.formatMessages({ + callName: "formatMessagesSync", + refs: null, + messages, + options, + callback: (err, res) => { + if (err) + throw err; + result = res; + } + })); + return result; +}; +var analyzeMetafileSync = (metafile, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.analyzeMetafileSync(metafile, options); + } + let result; + runServiceSync((service) => service.analyzeMetafile({ + callName: "analyzeMetafileSync", + refs: null, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => { + if (err) + throw err; + result = res; + } + })); + return result; +}; +var initializeWasCalled = false; +var initialize = (options) => { + options = validateInitializeOptions(options || {}); + if (options.wasmURL) + throw new Error(`The "wasmURL" option only works in the browser`); + if (options.wasmModule) + throw new Error(`The "wasmModule" option only works in the browser`); + if (options.worker) + throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) + throw new Error('Cannot call "initialize" more than once'); + ensureServiceIsRunning(); + initializeWasCalled = true; + return Promise.resolve(); +}; +var defaultWD = process.cwd(); +var longLivedService; +var ensureServiceIsRunning = () => { + if (longLivedService) + return longLivedService; + let [command, args] = esbuildCommandAndArgs(); + let child = child_process.spawn(command, args.concat(`--service=${"0.19.10"}`, "--ping"), { + windowsHide: true, + stdio: ["pipe", "pipe", "inherit"], + cwd: defaultWD + }); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + child.stdin.write(bytes, (err) => { + if (err) + afterClose(err); + }); + }, + readFileSync: fs2.readFileSync, + isSync: false, + hasFS: true, + esbuild: node_exports + }); + child.stdin.on("error", afterClose); + child.on("error", afterClose); + const stdin = child.stdin; + const stdout = child.stdout; + stdout.on("data", readFromStdout); + stdout.on("end", afterClose); + let refCount = 0; + child.unref(); + if (stdin.unref) { + stdin.unref(); + } + if (stdout.unref) { + stdout.unref(); + } + const refs = { + ref() { + if (++refCount === 1) + child.ref(); + }, + unref() { + if (--refCount === 0) + child.unref(); + } + }; + longLivedService = { + build: (options) => new Promise((resolve, reject) => { + service.buildOrContext({ + callName: "build", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + }); + }), + context: (options) => new Promise((resolve, reject) => service.buildOrContext({ + callName: "context", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + transform: (input, options) => new Promise((resolve, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })) + }; + return longLivedService; +}; +var runServiceSync = (callback) => { + let [command, args] = esbuildCommandAndArgs(); + let stdin = new Uint8Array(); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + if (stdin.length !== 0) + throw new Error("Must run at most one command"); + stdin = bytes; + }, + isSync: true, + hasFS: true, + esbuild: node_exports + }); + callback(service); + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.10"}`), { + cwd: defaultWD, + windowsHide: true, + input: stdin, + // We don't know how large the output could be. If it's too large, the + // command will fail with ENOBUFS. Reserve 16mb for now since that feels + // like it should be enough. Also allow overriding this with an environment + // variable. + maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 + }); + readFromStdout(stdout); + afterClose(null); +}; +var randomFileName = () => { + return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); +}; +var workerThreadService = null; +var startWorkerThreadService = (worker_threads2) => { + let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); + let worker = new worker_threads2.Worker(__filename, { + workerData: { workerPort, defaultWD, esbuildVersion: "0.19.10" }, + transferList: [workerPort], + // From node's documentation: https://nodejs.org/api/worker_threads.html + // + // Take care when launching worker threads from preload scripts (scripts loaded + // and run using the `-r` command line flag). Unless the `execArgv` option is + // explicitly set, new Worker threads automatically inherit the command line flags + // from the running process and will preload the same preload scripts as the main + // thread. If the preload script unconditionally launches a worker thread, every + // thread spawned will spawn another until the application crashes. + // + execArgv: [] + }); + let nextID = 0; + let fakeBuildError = (text) => { + let error = new Error(`Build failed with 1 error: +error: ${text}`); + let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + error.errors = errors; + error.warnings = []; + return error; + }; + let validateBuildSyncOptions = (options) => { + if (!options) + return; + let plugins = options.plugins; + if (plugins && plugins.length > 0) + throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + }; + let applyProperties = (object, properties) => { + for (let key in properties) { + object[key] = properties[key]; + } + }; + let runCallSync = (command, args) => { + let id = nextID++; + let sharedBuffer = new SharedArrayBuffer(8); + let sharedBufferView = new Int32Array(sharedBuffer); + let msg = { sharedBuffer, id, command, args }; + worker.postMessage(msg); + let status = Atomics.wait(sharedBufferView, 0, 0); + if (status !== "ok" && status !== "not-equal") + throw new Error("Internal error: Atomics.wait() failed: " + status); + let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); + if (id !== id2) + throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (reject) { + applyProperties(reject, properties); + throw reject; + } + return resolve; + }; + worker.unref(); + return { + buildSync(options) { + validateBuildSyncOptions(options); + return runCallSync("build", [options]); + }, + transformSync(input, options) { + return runCallSync("transform", [input, options]); + }, + formatMessagesSync(messages, options) { + return runCallSync("formatMessages", [messages, options]); + }, + analyzeMetafileSync(metafile, options) { + return runCallSync("analyzeMetafile", [metafile, options]); + } + }; +}; +var startSyncServiceWorker = () => { + let workerPort = worker_threads.workerData.workerPort; + let parentPort = worker_threads.parentPort; + let extractProperties = (object) => { + let properties = {}; + if (object && typeof object === "object") { + for (let key in object) { + properties[key] = object[key]; + } + } + return properties; + }; + try { + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + })(); + }); + } catch (reject) { + parentPort.on("message", (msg) => { + let { sharedBuffer, id } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + }); + } +}; +if (isInternalWorkerThread) { + startSyncServiceWorker(); +} +var node_default = node_exports; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + analyzeMetafile, + analyzeMetafileSync, + build, + buildSync, + context, + formatMessages, + formatMessagesSync, + initialize, + transform, + transformSync, + version +}); diff --git a/gsplat/node_modules/esbuild/package.json b/gsplat/node_modules/esbuild/package.json new file mode 100644 index 0000000..43a450e --- /dev/null +++ b/gsplat/node_modules/esbuild/package.json @@ -0,0 +1,43 @@ +{ + "name": "esbuild", + "version": "0.19.10", + "description": "An extremely fast JavaScript and CSS bundler and minifier.", + "repository": "https://github.com/evanw/esbuild", + "scripts": { + "postinstall": "node install.js" + }, + "main": "lib/main.js", + "types": "lib/main.d.ts", + "engines": { + "node": ">=12" + }, + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.10", + "@esbuild/android-arm": "0.19.10", + "@esbuild/android-arm64": "0.19.10", + "@esbuild/android-x64": "0.19.10", + "@esbuild/darwin-arm64": "0.19.10", + "@esbuild/darwin-x64": "0.19.10", + "@esbuild/freebsd-arm64": "0.19.10", + "@esbuild/freebsd-x64": "0.19.10", + "@esbuild/linux-arm": "0.19.10", + "@esbuild/linux-arm64": "0.19.10", + "@esbuild/linux-ia32": "0.19.10", + "@esbuild/linux-loong64": "0.19.10", + "@esbuild/linux-mips64el": "0.19.10", + "@esbuild/linux-ppc64": "0.19.10", + "@esbuild/linux-riscv64": "0.19.10", + "@esbuild/linux-s390x": "0.19.10", + "@esbuild/linux-x64": "0.19.10", + "@esbuild/netbsd-x64": "0.19.10", + "@esbuild/openbsd-x64": "0.19.10", + "@esbuild/sunos-x64": "0.19.10", + "@esbuild/win32-arm64": "0.19.10", + "@esbuild/win32-ia32": "0.19.10", + "@esbuild/win32-x64": "0.19.10" + }, + "license": "MIT" +} diff --git a/gsplat/node_modules/fsevents/LICENSE b/gsplat/node_modules/fsevents/LICENSE new file mode 100644 index 0000000..5d70441 --- /dev/null +++ b/gsplat/node_modules/fsevents/LICENSE @@ -0,0 +1,22 @@ +MIT License +----------- + +Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/gsplat/node_modules/fsevents/README.md b/gsplat/node_modules/fsevents/README.md new file mode 100644 index 0000000..50373a0 --- /dev/null +++ b/gsplat/node_modules/fsevents/README.md @@ -0,0 +1,89 @@ +# fsevents + +Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) + +The FSEvents API in MacOS allows applications to register for notifications of +changes to a given directory tree. It is a very fast and lightweight alternative +to kqueue. + +This is a low-level library. For a cross-platform file watching module that +uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). + +## Usage + +```sh +npm install fsevents +``` + +Supports only **Node.js v8.16 and higher**. + +```js +const fsevents = require('fsevents'); + +// To start observation +const stop = fsevents.watch(__dirname, (path, flags, id) => { + const info = fsevents.getInfo(path, flags); +}); + +// To end observation +stop(); +``` + +> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be +> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector +> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore. + +The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a +a change in the file system. It takes three arguments: + +###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` + + * `path: string` - the item in the filesystem that have been changed + * `flags: number` - a numeric value describing what the change was + * `id: string` - an unique-id identifying this specific event + + Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. + +###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` + +The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure +that is easier to digest to determine what the change was. + +The `FsEventsInfo` has the following shape: + +```js +/** + * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent + * @typedef {'file'|'directory'|'symlink'} FsEventsType + */ +{ + "event": "created", // {FsEventsEvent} + "path": "file.txt", + "type": "file", // {FsEventsType} + "changes": { + "inode": true, // Had iNode Meta-Information changed + "finder": false, // Had Finder Meta-Data changed + "access": false, // Had access permissions changed + "xattrs": false // Had xAttributes changed + }, + "flags": 0x100000000 +} +``` + +## Changelog + +- v2.3 supports Apple Silicon ARM CPUs +- v2 supports node 8.16+ and reduces package size massively +- v1.2.8 supports node 6+ +- v1.2.7 supports node 4+ + +## Troubleshooting + +- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error. +- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default. + +## License + +The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. + +Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/gsplat/node_modules/fsevents/fsevents.d.ts b/gsplat/node_modules/fsevents/fsevents.d.ts new file mode 100644 index 0000000..2723c04 --- /dev/null +++ b/gsplat/node_modules/fsevents/fsevents.d.ts @@ -0,0 +1,46 @@ +declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown"; +declare type Type = "file" | "directory" | "symlink"; +declare type FileChanges = { + inode: boolean; + finder: boolean; + access: boolean; + xattrs: boolean; +}; +declare type Info = { + event: Event; + path: string; + type: Type; + changes: FileChanges; + flags: number; +}; +declare type WatchHandler = (path: string, flags: number, id: string) => void; +export declare function watch(path: string, handler: WatchHandler): () => Promise; +export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise; +export declare function getInfo(path: string, flags: number): Info; +export declare const constants: { + None: 0x00000000; + MustScanSubDirs: 0x00000001; + UserDropped: 0x00000002; + KernelDropped: 0x00000004; + EventIdsWrapped: 0x00000008; + HistoryDone: 0x00000010; + RootChanged: 0x00000020; + Mount: 0x00000040; + Unmount: 0x00000080; + ItemCreated: 0x00000100; + ItemRemoved: 0x00000200; + ItemInodeMetaMod: 0x00000400; + ItemRenamed: 0x00000800; + ItemModified: 0x00001000; + ItemFinderInfoMod: 0x00002000; + ItemChangeOwner: 0x00004000; + ItemXattrMod: 0x00008000; + ItemIsFile: 0x00010000; + ItemIsDir: 0x00020000; + ItemIsSymlink: 0x00040000; + ItemIsHardlink: 0x00100000; + ItemIsLastHardlink: 0x00200000; + OwnEvent: 0x00080000; + ItemCloned: 0x00400000; +}; +export {}; diff --git a/gsplat/node_modules/fsevents/fsevents.js b/gsplat/node_modules/fsevents/fsevents.js new file mode 100644 index 0000000..198da98 --- /dev/null +++ b/gsplat/node_modules/fsevents/fsevents.js @@ -0,0 +1,83 @@ +/* + ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + ** Licensed under MIT License. + */ + +/* jshint node:true */ +"use strict"; + +if (process.platform !== "darwin") { + throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); +} + +const Native = require("./fsevents.node"); +const events = Native.constants; + +function watch(path, since, handler) { + if (typeof path !== "string") { + throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); + } + if ("function" === typeof since && "undefined" === typeof handler) { + handler = since; + since = Native.flags.SinceNow; + } + if (typeof since !== "number") { + throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`); + } + if (typeof handler !== "function") { + throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`); + } + + let instance = Native.start(Native.global, path, since, handler); + if (!instance) throw new Error(`could not watch: ${path}`); + return () => { + const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined); + instance = undefined; + return result; + }; +} + +function getInfo(path, flags) { + return { + path, + flags, + event: getEventType(flags), + type: getFileType(flags), + changes: getFileChanges(flags), + }; +} + +function getFileType(flags) { + if (events.ItemIsFile & flags) return "file"; + if (events.ItemIsDir & flags) return "directory"; + if (events.MustScanSubDirs & flags) return "directory"; + if (events.ItemIsSymlink & flags) return "symlink"; +} +function anyIsTrue(obj) { + for (let key in obj) { + if (obj[key]) return true; + } + return false; +} +function getEventType(flags) { + if (events.ItemRemoved & flags) return "deleted"; + if (events.ItemRenamed & flags) return "moved"; + if (events.ItemCreated & flags) return "created"; + if (events.ItemModified & flags) return "modified"; + if (events.RootChanged & flags) return "root-changed"; + if (events.ItemCloned & flags) return "cloned"; + if (anyIsTrue(flags)) return "modified"; + return "unknown"; +} +function getFileChanges(flags) { + return { + inode: !!(events.ItemInodeMetaMod & flags), + finder: !!(events.ItemFinderInfoMod & flags), + access: !!(events.ItemChangeOwner & flags), + xattrs: !!(events.ItemXattrMod & flags), + }; +} + +exports.watch = watch; +exports.getInfo = getInfo; +exports.constants = events; diff --git a/gsplat/node_modules/fsevents/fsevents.node b/gsplat/node_modules/fsevents/fsevents.node new file mode 100755 index 0000000..1cc3345 Binary files /dev/null and b/gsplat/node_modules/fsevents/fsevents.node differ diff --git a/gsplat/node_modules/fsevents/package.json b/gsplat/node_modules/fsevents/package.json new file mode 100644 index 0000000..5d0ee15 --- /dev/null +++ b/gsplat/node_modules/fsevents/package.json @@ -0,0 +1,62 @@ +{ + "name": "fsevents", + "version": "2.3.3", + "description": "Native Access to MacOS FSEvents", + "main": "fsevents.js", + "types": "fsevents.d.ts", + "os": [ + "darwin" + ], + "files": [ + "fsevents.d.ts", + "fsevents.js", + "fsevents.node" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + }, + "scripts": { + "clean": "node-gyp clean && rm -f fsevents.node", + "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", + "test": "/bin/bash ./test.sh 2>/dev/null", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/fsevents/fsevents.git" + }, + "keywords": [ + "fsevents", + "mac" + ], + "contributors": [ + { + "name": "Philipp Dunkel", + "email": "pip@pipobscure.com" + }, + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "Elan Shankar", + "email": "elan.shanker@gmail.com" + }, + { + "name": "Miroslav Bajtoš", + "email": "mbajtoss@gmail.com" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fsevents/fsevents/issues" + }, + "homepage": "https://github.com/fsevents/fsevents", + "devDependencies": { + "node-gyp": "^9.4.0" + } +} diff --git a/gsplat/node_modules/gsplat/LICENSE b/gsplat/node_modules/gsplat/LICENSE new file mode 100644 index 0000000..98b56f5 --- /dev/null +++ b/gsplat/node_modules/gsplat/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Dylan Ebert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/gsplat/node_modules/gsplat/README.md b/gsplat/node_modules/gsplat/README.md new file mode 100644 index 0000000..12b9f92 --- /dev/null +++ b/gsplat/node_modules/gsplat/README.md @@ -0,0 +1,98 @@ +# gsplat.js + +#### JavaScript Gaussian Splatting library + +gsplat.js is an easy-to-use, general-purpose, open-source 3D Gaussian Splatting library, providing functionality similar to [three.js](https://github.com/mrdoob/three.js) but for Gaussian Splatting. + +### Quick Start + +- **Live Viewer Demo:** Explore this library in action in the 🤗 [Hugging Face demo](https://huggingface.co/spaces/dylanebert/igf). Note: May not work on all devices; use `Bonsai` for the lowest memory requirements. +- **Editor Demo:** Try new real-time updates and editing features in the [gsplat.js editor](https://huggingface.co/spaces/dylanebert/gsplat-editor). +- **Code Example:** Start coding immediately with this [jsfiddle example](https://jsfiddle.net/wdn6vasc/). + +### Installation + +**Prerequisites**: Ensure your development environment supports ES6 modules. + +1. **Set Up a Project:** (If not already set up) + + Install [Node.js](https://nodejs.org/en/download/) and [NPM](https://www.npmjs.com/get-npm), then initialize a new project using a module bundler like [Vite](https://vitejs.dev/): + + ```bash + npm create vite@latest gsplat -- --template vanilla-ts + ``` + +2. **Test Your Environment:** + + ```bash + cd gsplat + npm install + npm run dev + ``` + +3. **Install gsplat.js:** + + ```bash + npm install --save gsplat + ``` + +### Usage + +#### Creating a Scene + +- Import **gsplat.js** components and set up a basic scene. +- Load Gaussian Splatting data and start a rendering loop. + +(in `src/main.ts` if you followed the Vite setup) + +```js +import * as SPLAT from "gsplat"; + +const scene = new SPLAT.Scene(); +const camera = new SPLAT.Camera(); +const renderer = new SPLAT.WebGLRenderer(); +const controls = new SPLAT.OrbitControls(camera, renderer.canvas); + +async function main() { + const url = "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k.splat"; + + await SPLAT.Loader.LoadAsync(url, scene, () => {}); + + const frame = () => { + controls.update(); + renderer.render(scene, camera); + + requestAnimationFrame(frame); + }; + + requestAnimationFrame(frame); +} + +main(); +``` + +This script sets up a basic scene with Gaussian Splatting data loaded from URL and starts a rendering loop. + +### FAQ + +**Q: Can I use .ply files?** + +A: Yes, gsplat.js supports `.ply` files. See the [ply-converter example](https://github.com/dylanebert/gsplat.js/blob/main/examples/ply-converter/src/main.ts) for details on how to convert `.ply` to `.splat`. Alternatively, convert PLY files from URL in this [jsfiddle example](https://jsfiddle.net/2sq3pvdt/1/). + +**Q: What are .splat files?** + +A: `.splat` files are a compact form of the splat data, offering quicker loading times than `.ply` files. They consist of a raw Uint8Array buffer. + +### License + +This project is released under the MIT license. It is built upon several other open-source projects: + +- [three.js](https://github.com/mrdoob/three.js), MIT License (c) 2010-2023 three.js authors +- [antimatter15/splat](https://github.com/antimatter15/splat), MIT License (c) 2023 Kevin Kwok +- [UnityGaussianSplatting](https://github.com/aras-p/UnityGaussianSplatting), MIT License (c) 2023 Aras Pranckevičius + +Please note that the license of the original [3D Gaussian Splatting](https://github.com/graphdeco-inria/gaussian-splatting) research project is non-commercial. While this library provides an open-source rendering implementation, users should consider the source of the splat data separately. + +### Contact + +Feel free to open issues, join the [Hugging Face Discord](https://hf.co/join/discord), or email me directly at [dylan@huggingface.co](mailto:dylan@huggingface.co). diff --git a/gsplat/node_modules/gsplat/dist/cameras/Camera.d.ts b/gsplat/node_modules/gsplat/dist/cameras/Camera.d.ts new file mode 100644 index 0000000..7a2db4b --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/cameras/Camera.d.ts @@ -0,0 +1,10 @@ +import { CameraData } from "./CameraData"; +import { Object3D } from "../core/Object3D"; +import { Vector3 } from "../math/Vector3"; +declare class Camera extends Object3D { + private _data; + screenPointToRay: (x: number, y: number) => Vector3; + constructor(camera?: CameraData | undefined); + get data(): CameraData; +} +export { Camera }; diff --git a/gsplat/node_modules/gsplat/dist/cameras/CameraData.d.ts b/gsplat/node_modules/gsplat/dist/cameras/CameraData.d.ts new file mode 100644 index 0000000..e204d56 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/cameras/CameraData.d.ts @@ -0,0 +1,32 @@ +import { Quaternion } from "../math/Quaternion"; +import { Matrix4 } from "../math/Matrix4"; +import { Vector3 } from "../math/Vector3"; +declare class CameraData { + private _fx; + private _fy; + private _near; + private _far; + private _width; + private _height; + private _projectionMatrix; + private _viewMatrix; + private _viewProj; + update: (position: Vector3, rotation: Quaternion) => void; + setSize: (width: number, height: number) => void; + private _updateProjectionMatrix; + constructor(); + get fx(): number; + set fx(fx: number); + get fy(): number; + set fy(fy: number); + get near(): number; + set near(near: number); + get far(): number; + set far(far: number); + get width(): number; + get height(): number; + get projectionMatrix(): Matrix4; + get viewMatrix(): Matrix4; + get viewProj(): Matrix4; +} +export { CameraData }; diff --git a/gsplat/node_modules/gsplat/dist/controls/OrbitControls.d.ts b/gsplat/node_modules/gsplat/dist/controls/OrbitControls.d.ts new file mode 100644 index 0000000..35330bd --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/controls/OrbitControls.d.ts @@ -0,0 +1,17 @@ +import { Camera } from "../cameras/Camera"; +import { Vector3 } from "../math/Vector3"; +declare class OrbitControls { + minAngle: number; + maxAngle: number; + minZoom: number; + maxZoom: number; + orbitSpeed: number; + panSpeed: number; + zoomSpeed: number; + dampening: number; + setCameraTarget: (newTarget: Vector3) => void; + update: () => void; + dispose: () => void; + constructor(camera: Camera, canvas: HTMLElement, alpha?: number, beta?: number, radius?: number, enableKeyboardControls?: boolean, inputTarget?: Vector3); +} +export { OrbitControls }; diff --git a/gsplat/node_modules/gsplat/dist/core/Object3D.d.ts b/gsplat/node_modules/gsplat/dist/core/Object3D.d.ts new file mode 100644 index 0000000..4b710a0 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/core/Object3D.d.ts @@ -0,0 +1,30 @@ +import { Vector3 } from "../math/Vector3"; +import { Quaternion } from "../math/Quaternion"; +import { EventDispatcher } from "../events/EventDispatcher"; +import { Matrix4 } from "../math/Matrix4"; +import { ObjectChangedEvent } from "../events/Events"; +declare abstract class Object3D extends EventDispatcher { + positionChanged: boolean; + rotationChanged: boolean; + scaleChanged: boolean; + protected _position: Vector3; + protected _rotation: Quaternion; + protected _scale: Vector3; + protected _transform: Matrix4; + protected _changeEvent: ObjectChangedEvent; + update: () => void; + applyPosition: () => void; + applyRotation: () => void; + applyScale: () => void; + constructor(); + protected _updateMatrix(): void; + get position(): Vector3; + set position(position: Vector3); + get rotation(): Quaternion; + set rotation(rotation: Quaternion); + get scale(): Vector3; + set scale(scale: Vector3); + get forward(): Vector3; + get transform(): Matrix4; +} +export { Object3D }; diff --git a/gsplat/node_modules/gsplat/dist/core/Scene.d.ts b/gsplat/node_modules/gsplat/dist/core/Scene.d.ts new file mode 100644 index 0000000..274210a --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/core/Scene.d.ts @@ -0,0 +1,16 @@ +import { Object3D } from "./Object3D"; +import { EventDispatcher } from "../events/EventDispatcher"; +declare class Scene extends EventDispatcher { + private _objects; + addObject: (object: Object3D) => void; + removeObject: (object: Object3D) => void; + findObject: (predicate: (object: Object3D) => boolean) => Object3D | undefined; + findObjectOfType: (type: { + new (): T; + }) => T | undefined; + reset: () => void; + constructor(); + saveToFile(name?: string | null): void; + get objects(): Object3D[]; +} +export { Scene }; diff --git a/gsplat/node_modules/gsplat/dist/events/EventDispatcher.d.ts b/gsplat/node_modules/gsplat/dist/events/EventDispatcher.d.ts new file mode 100644 index 0000000..2d19077 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/events/EventDispatcher.d.ts @@ -0,0 +1,8 @@ +declare class EventDispatcher { + addEventListener: (type: string, listener: (event: Event) => void) => void; + removeEventListener: (type: string, listener: (event: Event) => void) => void; + hasEventListener: (type: string, listener: (event: Event) => void) => boolean; + dispatchEvent: (event: Event) => void; + constructor(); +} +export { EventDispatcher }; diff --git a/gsplat/node_modules/gsplat/dist/events/Events.d.ts b/gsplat/node_modules/gsplat/dist/events/Events.d.ts new file mode 100644 index 0000000..856dcba --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/events/Events.d.ts @@ -0,0 +1,14 @@ +import { Object3D } from "../core/Object3D"; +declare class ObjectAddedEvent extends Event { + object: Object3D; + constructor(object: Object3D); +} +declare class ObjectRemovedEvent extends Event { + object: Object3D; + constructor(object: Object3D); +} +declare class ObjectChangedEvent extends Event { + object: Object3D; + constructor(object: Object3D); +} +export { ObjectAddedEvent, ObjectRemovedEvent, ObjectChangedEvent }; diff --git a/gsplat/node_modules/gsplat/dist/index.d.ts b/gsplat/node_modules/gsplat/dist/index.d.ts new file mode 100644 index 0000000..4615069 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/index.d.ts @@ -0,0 +1,23 @@ +export { Object3D } from "./core/Object3D"; +export { SplatData } from "./splats/SplatData"; +export { Splat } from "./splats/Splat"; +export { CameraData } from "./cameras/CameraData"; +export { Camera } from "./cameras/Camera"; +export { Scene } from "./core/Scene"; +export { Loader } from "./loaders/Loader"; +export { PLYLoader } from "./loaders/PLYLoader"; +export { WebGLRenderer } from "./renderers/WebGLRenderer"; +export { OrbitControls } from "./controls/OrbitControls"; +export { Quaternion } from "./math/Quaternion"; +export { Vector3 } from "./math/Vector3"; +export { Vector4 } from "./math/Vector4"; +export { Matrix4 } from "./math/Matrix4"; +export { Matrix3 } from "./math/Matrix3"; +export { Color32 } from "./math/Color32"; +export { Plane } from "./math/Plane"; +export { ShaderPass } from "./renderers/webgl/passes/ShaderPass"; +export { FadeInPass } from "./renderers/webgl/passes/FadeInPass"; +export { RenderData } from "./renderers/webgl/utils/RenderData"; +export { ShaderProgram } from "./renderers/webgl/programs/ShaderProgram"; +export { RenderProgram } from "./renderers/webgl/programs/RenderProgram"; +export { IntersectionTester } from "./renderers/webgl/utils/IntersectionTester"; diff --git a/gsplat/node_modules/gsplat/dist/index.js b/gsplat/node_modules/gsplat/dist/index.js new file mode 100644 index 0000000..68e52ab --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/index.js @@ -0,0 +1,2 @@ +class A{constructor(A=0,Q=0,F=0){this.x=A,this.y=Q,this.z=F}equals(A){return this.x===A.x&&(this.y===A.y&&this.z===A.z)}add(Q){return"number"==typeof Q?new A(this.x+Q,this.y+Q,this.z+Q):new A(this.x+Q.x,this.y+Q.y,this.z+Q.z)}subtract(Q){return"number"==typeof Q?new A(this.x-Q,this.y-Q,this.z-Q):new A(this.x-Q.x,this.y-Q.y,this.z-Q.z)}multiply(Q){return"number"==typeof Q?new A(this.x*Q,this.y*Q,this.z*Q):Q instanceof A?new A(this.x*Q.x,this.y*Q.y,this.z*Q.z):new A(this.x*Q.buffer[0]+this.y*Q.buffer[4]+this.z*Q.buffer[8]+Q.buffer[12],this.x*Q.buffer[1]+this.y*Q.buffer[5]+this.z*Q.buffer[9]+Q.buffer[13],this.x*Q.buffer[2]+this.y*Q.buffer[6]+this.z*Q.buffer[10]+Q.buffer[14])}cross(Q){const F=this.y*Q.z-this.z*Q.y,B=this.z*Q.x-this.x*Q.z,U=this.x*Q.y-this.y*Q.x;return new A(F,B,U)}dot(A){return this.x*A.x+this.y*A.y+this.z*A.z}lerp(Q,F){return new A(this.x+(Q.x-this.x)*F,this.y+(Q.y-this.y)*F,this.z+(Q.z-this.z)*F)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distanceTo(A){return Math.sqrt((this.x-A.x)**2+(this.y-A.y)**2+(this.z-A.z)**2)}normalize(){const Q=this.magnitude();return new A(this.x/Q,this.y/Q,this.z/Q)}flat(){return[this.x,this.y,this.z]}clone(){return new A(this.x,this.y,this.z)}toString(){return`[${this.flat().join(", ")}]`}static One(Q=1){return new A(Q,Q,Q)}}class Q{constructor(A=0,Q=0,F=0,B=1){this.x=A,this.y=Q,this.z=F,this.w=B}equals(A){return this.x===A.x&&(this.y===A.y&&(this.z===A.z&&this.w===A.w))}normalize(){const A=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return new Q(this.x/A,this.y/A,this.z/A,this.w/A)}multiply(A){const F=this.w,B=this.x,U=this.y,l=this.z,t=A.w,d=A.x,n=A.y,V=A.z;return new Q(F*d+B*t+U*V-l*n,F*n-B*V+U*t+l*d,F*V+B*n-U*d+l*t,F*t-B*d-U*n-l*V)}inverse(){const A=this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w;return new Q(-this.x/A,-this.y/A,-this.z/A,this.w/A)}apply(F){const B=new Q(F.x,F.y,F.z,0),U=new Q(-this.x,-this.y,-this.z,this.w),l=this.multiply(B).multiply(U);return new A(l.x,l.y,l.z)}flat(){return[this.x,this.y,this.z,this.w]}clone(){return new Q(this.x,this.y,this.z,this.w)}static FromEuler(A){const F=A.x/2,B=A.y/2,U=A.z/2,l=Math.cos(B),t=Math.sin(B),d=Math.cos(F),n=Math.sin(F),V=Math.cos(U),Z=Math.sin(U);return new Q(l*n*V+t*d*Z,t*d*V-l*n*Z,l*d*Z-t*n*V,l*d*V+t*n*Z)}toEuler(){const Q=2*(this.w*this.x+this.y*this.z),F=1-2*(this.x*this.x+this.y*this.y),B=Math.atan2(Q,F);let U;const l=2*(this.w*this.y-this.z*this.x);U=Math.abs(l)>=1?Math.sign(l)*Math.PI/2:Math.asin(l);const t=2*(this.w*this.z+this.x*this.y),d=1-2*(this.y*this.y+this.z*this.z),n=Math.atan2(t,d);return new A(B,U,n)}static FromMatrix3(A){const F=A.buffer,B=F[0]+F[4]+F[8];let U,l,t,d;if(B>0){const A=.5/Math.sqrt(B+1);d=.25/A,U=(F[7]-F[5])*A,l=(F[2]-F[6])*A,t=(F[3]-F[1])*A}else if(F[0]>F[4]&&F[0]>F[8]){const A=2*Math.sqrt(1+F[0]-F[4]-F[8]);d=(F[7]-F[5])/A,U=.25*A,l=(F[1]+F[3])/A,t=(F[2]+F[6])/A}else if(F[4]>F[8]){const A=2*Math.sqrt(1+F[4]-F[0]-F[8]);d=(F[2]-F[6])/A,U=(F[1]+F[3])/A,l=.25*A,t=(F[5]+F[7])/A}else{const A=2*Math.sqrt(1+F[8]-F[0]-F[4]);d=(F[3]-F[1])/A,U=(F[2]+F[6])/A,l=(F[5]+F[7])/A,t=.25*A}return new Q(U,l,t,d)}static FromAxisAngle(A,F){const B=F/2,U=Math.sin(B),l=Math.cos(B);return new Q(A.x*U,A.y*U,A.z*U,l)}toString(){return`[${this.flat().join(", ")}]`}}class F{constructor(){const A=new Map;this.addEventListener=(Q,F)=>{A.has(Q)||A.set(Q,new Set),A.get(Q).add(F)},this.removeEventListener=(Q,F)=>{A.has(Q)&&A.get(Q).delete(F)},this.hasEventListener=(Q,F)=>!!A.has(Q)&&A.get(Q).has(F),this.dispatchEvent=Q=>{if(A.has(Q.type))for(const F of A.get(Q.type))F(Q)}}}class B{constructor(A=1,Q=0,F=0,B=0,U=0,l=1,t=0,d=0,n=0,V=0,Z=1,e=0,I=0,R=0,a=0,g=1){this.buffer=[A,Q,F,B,U,l,t,d,n,V,Z,e,I,R,a,g]}equals(A){if(this.buffer.length!==A.buffer.length)return!1;if(this.buffer===A.buffer)return!0;for(let Q=0;Q{},this.applyPosition=()=>{this.position=new A},this.applyRotation=()=>{this.rotation=new Q},this.applyScale=()=>{this.scale=new A(1,1,1)}}_updateMatrix(){this._transform=B.Compose(this._position,this._rotation,this._scale)}get position(){return this._position}set position(A){this._position.equals(A)||(this._position=A,this.positionChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get rotation(){return this._rotation}set rotation(A){this._rotation.equals(A)||(this._rotation=A,this.rotationChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get scale(){return this._scale}set scale(A){this._scale.equals(A)||(this._scale=A,this.scaleChanged=!0,this._updateMatrix(),this.dispatchEvent(this._changeEvent))}get forward(){let Q=new A(0,0,1);return Q=this.rotation.apply(Q),Q}get transform(){return this._transform}}class n{constructor(A=1,Q=0,F=0,B=0,U=1,l=0,t=0,d=0,n=1){this.buffer=[A,Q,F,B,U,l,t,d,n]}equals(A){if(this.buffer.length!==A.buffer.length)return!1;if(this.buffer===A.buffer)return!0;for(let Q=0;Q{for(let Q=0;Q{const F=n.RotationFromQuaternion(A).buffer;for(let B=0;B{for(let Q=0;Q{const A=new Uint8Array(this.vertexCount*V.RowLength),Q=new Float32Array(A.buffer),F=new Uint8Array(A.buffer);for(let A=0;A{console.assert(A.byteLength===3*this.vertexCount*4,`Expected ${3*this.vertexCount*4} bytes, got ${A.byteLength} bytes`),this._positions=new Float32Array(A),this._rotations=new Float32Array(Q),this._scales=new Float32Array(F),this._colors=new Uint8Array(B),this._selection=new Uint8Array(U),this.detached=!1}}static Deserialize(A){const Q=A.length/V.RowLength,F=new Float32Array(3*Q),B=new Float32Array(4*Q),U=new Float32Array(3*Q),l=new Uint8Array(4*Q),t=new Float32Array(A.buffer),d=new Uint8Array(A.buffer);for(let A=0;A{this.data.translate(this.position),this.position=new A},this.applyRotation=()=>{this.data.rotate(this.rotation),this.rotation=new Q},this.applyScale=()=>{this.data.scale(this.scale),this.scale=new A(1,1,1)}}saveToFile(A=null){if(!document)return;if(!A){const Q=new Date;A=`splat-${Q.getFullYear()}-${Q.getMonth()+1}-${Q.getDate()}.splat`}this.applyRotation(),this.applyScale(),this.applyPosition();const Q=this.data.serialize(),F=new Blob([Q],{type:"application/octet-stream"}),B=document.createElement("a");B.download=A,B.href=URL.createObjectURL(F),B.click()}get data(){return this._data}get selected(){return this._selected}set selected(A){this._selected!==A&&(this._selected=A,this.selectedChanged=!0,this.dispatchEvent(this._changeEvent))}}class e{constructor(){this._fx=1132,this._fy=1132,this._near=.1,this._far=100,this._width=512,this._height=512,this._projectionMatrix=new B,this._viewMatrix=new B,this._viewProj=new B,this._updateProjectionMatrix=()=>{this._projectionMatrix=new B(2*this.fx/this.width,0,0,0,0,-2*this.fy/this.height,0,0,0,0,this.far/(this.far-this.near),1,0,0,-this.far*this.near/(this.far-this.near),0),this._viewProj=this.projectionMatrix.multiply(this.viewMatrix)},this.update=(A,Q)=>{const F=n.RotationFromQuaternion(Q).buffer,U=A.flat();this._viewMatrix=new B(F[0],F[1],F[2],0,F[3],F[4],F[5],0,F[6],F[7],F[8],0,-U[0]*F[0]-U[1]*F[3]-U[2]*F[6],-U[0]*F[1]-U[1]*F[4]-U[2]*F[7],-U[0]*F[2]-U[1]*F[5]-U[2]*F[8],1),this._viewProj=this.projectionMatrix.multiply(this.viewMatrix)},this.setSize=(A,Q)=>{this._width=A,this._height=Q,this._updateProjectionMatrix()}}get fx(){return this._fx}set fx(A){this._fx!==A&&(this._fx=A,this._updateProjectionMatrix())}get fy(){return this._fy}set fy(A){this._fy!==A&&(this._fy=A,this._updateProjectionMatrix())}get near(){return this._near}set near(A){this._near!==A&&(this._near=A,this._updateProjectionMatrix())}get far(){return this._far}set far(A){this._far!==A&&(this._far=A,this._updateProjectionMatrix())}get width(){return this._width}get height(){return this._height}get projectionMatrix(){return this._projectionMatrix}get viewMatrix(){return this._viewMatrix}get viewProj(){return this._viewProj}}class I{constructor(A=0,Q=0,F=0,B=0){this.x=A,this.y=Q,this.z=F,this.w=B}equals(A){return this.x===A.x&&(this.y===A.y&&(this.z===A.z&&this.w===A.w))}add(A){return"number"==typeof A?new I(this.x+A,this.y+A,this.z+A,this.w+A):new I(this.x+A.x,this.y+A.y,this.z+A.z,this.w+A.w)}subtract(A){return"number"==typeof A?new I(this.x-A,this.y-A,this.z-A,this.w-A):new I(this.x-A.x,this.y-A.y,this.z-A.z,this.w-A.w)}multiply(A){return"number"==typeof A?new I(this.x*A,this.y*A,this.z*A,this.w*A):A instanceof I?new I(this.x*A.x,this.y*A.y,this.z*A.z,this.w*A.w):new I(this.x*A.buffer[0]+this.y*A.buffer[4]+this.z*A.buffer[8]+this.w*A.buffer[12],this.x*A.buffer[1]+this.y*A.buffer[5]+this.z*A.buffer[9]+this.w*A.buffer[13],this.x*A.buffer[2]+this.y*A.buffer[6]+this.z*A.buffer[10]+this.w*A.buffer[14],this.x*A.buffer[3]+this.y*A.buffer[7]+this.z*A.buffer[11]+this.w*A.buffer[15])}dot(A){return this.x*A.x+this.y*A.y+this.z*A.z+this.w*A.w}lerp(A,Q){return new I(this.x+(A.x-this.x)*Q,this.y+(A.y-this.y)*Q,this.z+(A.z-this.z)*Q,this.w+(A.w-this.w)*Q)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}distanceTo(A){return Math.sqrt((this.x-A.x)**2+(this.y-A.y)**2+(this.z-A.z)**2+(this.w-A.w)**2)}normalize(){const A=this.magnitude();return new I(this.x/A,this.y/A,this.z/A,this.w/A)}flat(){return[this.x,this.y,this.z,this.w]}clone(){return new I(this.x,this.y,this.z,this.w)}toString(){return`[${this.flat().join(", ")}]`}}class R extends d{constructor(Q=void 0){super(),this._data=Q||new e,this._position=new A(0,0,-5),this.update=()=>{this.data.update(this.position,this.rotation)},this.screenPointToRay=(Q,F)=>{const B=new I(Q,F,-1,1),U=this._data.projectionMatrix.invert(),l=B.multiply(U),t=this._data.viewMatrix.invert(),d=l.multiply(t);return new A(d.x/d.w,d.y/d.w,d.z/d.w).subtract(this.position).normalize()}}get data(){return this._data}}class a extends F{constructor(){super(),this._objects=[],this.addObject=A=>{this.objects.push(A),this.dispatchEvent(new U(A))},this.removeObject=A=>{const Q=this.objects.indexOf(A);if(Q<0)throw new Error("Object not found in scene");this.objects.splice(Q,1),this.dispatchEvent(new l(A))},this.findObject=A=>{for(const Q of this.objects)if(A(Q))return Q},this.findObjectOfType=A=>{for(const Q of this.objects)if(Q instanceof A)return Q},this.reset=()=>{const A=this.objects.slice();for(const Q of A)this.removeObject(Q)},this.reset()}saveToFile(A=null){if(!document)return;if(!A){const Q=new Date;A=`scene-${Q.getFullYear()}-${Q.getMonth()+1}-${Q.getDate()}.splat`}const Q=[];let F=0;for(const A of this.objects)if(A.applyRotation(),A.applyScale(),A.applyPosition(),A instanceof Z){const B=A.data.serialize();Q.push(B),F+=A.data.vertexCount}const B=new Uint8Array(F*V.RowLength);let U=0;for(const A of Q)B.set(A,U),U+=A.length;const l=new Blob([B.buffer],{type:"application/octet-stream"}),t=document.createElement("a");t.download=A,t.href=URL.createObjectURL(l),t.click()}get objects(){return this._objects}}class g{static async LoadAsync(A,Q,F,B=!1){const U=await fetch(A,{mode:"cors",credentials:"omit",cache:B?"force-cache":"default"});if(200!=U.status)throw new Error(U.status+" Unable to load "+U.url);const l=U.body.getReader(),t=parseInt(U.headers.get("content-length")),d=new Uint8Array(t);let n=0;for(;;){const{done:A,value:Q}=await l.read();if(A)break;d.set(Q,n),n+=Q.length,null==F||F(n/t)}const e=V.Deserialize(d),I=new Z(e);return Q.addObject(I),I}static async LoadFromFileAsync(A,Q,F){const B=new FileReader;let U=new Z;return B.onload=A=>{const F=new Uint8Array(A.target.result),B=V.Deserialize(F);U=new Z(B),Q.addObject(U)},B.onprogress=A=>{null==F||F(A.loaded/A.total)},B.readAsArrayBuffer(A),await new Promise((A=>{B.onloadend=()=>{A()}})),U}}class i{static async LoadAsync(A,Q,F,B="",U=!1){const l=await fetch(A,{mode:"cors",credentials:"omit",cache:U?"force-cache":"default"});if(200!=l.status)throw new Error(l.status+" Unable to load "+l.url);const t=l.body.getReader(),d=parseInt(l.headers.get("content-length")),n=new Uint8Array(d);let e=0;for(;;){const{done:A,value:Q}=await t.read();if(A)break;n.set(Q,e),e+=Q.length,null==F||F(e/d)}if(112!==n[0]||108!==n[1]||121!==n[2]||10!==n[3])throw new Error("Invalid PLY file");const I=new Uint8Array(this._ParsePLYBuffer(n.buffer,B)),R=V.Deserialize(I),a=new Z(R);return Q.addObject(a),a}static async LoadFromFileAsync(A,Q,F,B=""){const U=new FileReader;let l=new Z;return U.onload=A=>{const F=new Uint8Array(this._ParsePLYBuffer(A.target.result,B)),U=V.Deserialize(F);l=new Z(U),Q.addObject(l)},U.onprogress=A=>{null==F||F(A.loaded/A.total)},U.readAsArrayBuffer(A),await new Promise((A=>{U.onloadend=()=>{A()}})),l}static _ParsePLYBuffer(F,B){const U=new Uint8Array(F),l=(new TextDecoder).decode(U.slice(0,10240)),t="end_header\n",d=l.indexOf(t);if(d<0)throw new Error("Unable to read .ply file header");const n=parseInt(/element vertex (\d+)\n/.exec(l)[1]);let Z=0;const e={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1},I=[];for(const A of l.slice(0,d).split("\n").filter((A=>A.startsWith("property ")))){const[Q,F,B]=A.split(" ");if(I.push({name:B,type:F,offset:Z}),!e[F])throw new Error(`Unsupported property type: ${F}`);Z+=e[F]}const R=new DataView(F,d+11),a=new ArrayBuffer(V.RowLength*n),g=Q.FromEuler(new A(Math.PI/2,0,0));for(let A=0;A{let B;switch(Q.type){case"float":B=R.getFloat32(Q.offset+A*Z,!0);break;case"int":B=R.getInt32(Q.offset+A*Z,!0);break;default:throw new Error(`Unsupported property type: ${Q.type}`)}switch(Q.name){case"x":F[0]=B;break;case"y":F[1]=B;break;case"z":F[2]=B;break;case"scale_0":U[0]=Math.exp(B);break;case"scale_1":U[1]=Math.exp(B);break;case"scale_2":U[2]=Math.exp(B);break;case"red":l[0]=B;break;case"green":l[1]=B;break;case"blue":l[2]=B;break;case"f_dc_0":l[0]=255*(.5+this.SH_C0*B);break;case"f_dc_1":l[1]=255*(.5+this.SH_C0*B);break;case"f_dc_2":l[2]=255*(.5+this.SH_C0*B);break;case"f_dc_3":l[3]=255*(.5+this.SH_C0*B);break;case"opacity":l[3]=1/(1+Math.exp(-B))*255;break;case"rot_0":d=B;break;case"rot_1":n=B;break;case"rot_2":e=B;break;case"rot_3":i=B}}));let W=new Q(n,e,i,d);switch(B){case"polycam":{const A=F[1];F[1]=-F[2],F[2]=A,W=g.multiply(W);break}case"":break;default:throw new Error(`Unsupported format: ${B}`)}W=W.normalize(),t[0]=128*W.w+128,t[1]=128*W.x+128,t[2]=128*W.y+128,t[3]=128*W.z+128}return a}}function W(A,Q,F){var B=void 0===Q?null:Q,U=function(A,Q){var F=atob(A);if(Q){for(var B=new Uint8Array(F.length),U=0,l=F.length;U{F.useProgram(this._program),this._resize()},this.initialize=()=>{console.assert(!this._initialized,"ShaderProgram already initialized"),F.useProgram(this._program),this._initialize();for(const A of this.passes)A.initialize(this);this._initialized=!0,this._started=!0},this.render=(A,Q)=>{F.useProgram(this._program),this._scene===A&&this._camera===Q||(this.dispose(),this._scene=A,this._camera=Q,this.initialize());for(const A of this.passes)A.render();this._render()},this.dispose=()=>{if(this._initialized){F.useProgram(this._program);for(const A of this.passes)A.dispose();this._dispose(),this._scene=null,this._camera=null,this._initialized=!1}}}get renderer(){return this._renderer}get scene(){return this._scene}get camera(){return this._camera}get program(){return this._program}get passes(){return this._passes}get started(){return this._started}}var s=c("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGxvYWRXYXNtID0gKCgpID0+IHsKICAgIAogICAgcmV0dXJuICgKICBmdW5jdGlvbihtb2R1bGVBcmcgPSB7fSkgewoKICB2YXIgTW9kdWxlPW1vZHVsZUFyZzt2YXIgcmVhZHlQcm9taXNlUmVzb2x2ZSxyZWFkeVByb21pc2VSZWplY3Q7TW9kdWxlWyJyZWFkeSJdPW5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PntyZWFkeVByb21pc2VSZXNvbHZlPXJlc29sdmU7cmVhZHlQcm9taXNlUmVqZWN0PXJlamVjdDt9KTt2YXIgbW9kdWxlT3ZlcnJpZGVzPU9iamVjdC5hc3NpZ24oe30sTW9kdWxlKTt2YXIgc2NyaXB0RGlyZWN0b3J5PSIiO2Z1bmN0aW9uIGxvY2F0ZUZpbGUocGF0aCl7aWYoTW9kdWxlWyJsb2NhdGVGaWxlIl0pe3JldHVybiBNb2R1bGVbImxvY2F0ZUZpbGUiXShwYXRoLHNjcmlwdERpcmVjdG9yeSl9cmV0dXJuIHNjcmlwdERpcmVjdG9yeStwYXRofXZhciByZWFkQmluYXJ5O3t7c2NyaXB0RGlyZWN0b3J5PXNlbGYubG9jYXR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25zZS5wb3NpdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5yb3RhdGlvbnMsCiAgICAgICAgICByZXNwb25zZS5zY2FsZXMsCiAgICAgICAgICByZXNwb25zZS5jb2xvcnMsCiAgICAgICAgICByZXNwb25zZS5zZWxlY3Rpb24sCiAgICAgIF0pOwogICAgICBydW5uaW5nID0gZmFsc2U7CiAgfTsKICBjb25zdCBwYWNrVGhyb3R0bGVkID0gKCkgPT4gewogICAgICBpZiAodXBkYXRlUXVldWUubGVuZ3RoID09PSAwKQogICAgICAgICAgcmV0dXJuOwogICAgICBpZiAoIXJ1bm5pbmcpIHsKICAgICAgICAgIHJ1bm5pbmcgPSB0cnVlOwogICAgICAgICAgY29uc3Qgc3BsYXQgPSB1cGRhdGVRdWV1ZS5zaGlmdCgpOwogICAgICAgICAgcGFjayhzcGxhdCk7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICAgICAgfSwgMCk7CiAgICAgIH0KICB9OwogIHNlbGYub25tZXNzYWdlID0gKGUpID0+IHsKICAgICAgaWYgKGUuZGF0YS5zcGxhdCkgewogICAgICAgICAgY29uc3Qgc3BsYXQgPSBlLmRhdGEuc3BsYXQ7CiAgICAgICAgICBmb3IgKGNvbnN0IFtpbmRleCwgZXhpc3RpbmddIG9mIHVwZGF0ZVF1ZXVlLmVudHJpZXMoKSkgewogICAgICAgICAgICAgIGlmIChleGlzdGluZy5vZmZzZXQgPT09IHNwbGF0Lm9mZnNldCkgewogICAgICAgICAgICAgICAgICB1cGRhdGVRdWV1ZVtpbmRleF0gPSBzcGxhdDsKICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHVwZGF0ZVF1ZXVlLnB1c2goc3BsYXQpOwogICAgICAgICAgcGFja1Rocm90dGxlZCgpOwogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPURhdGFXb3JrZXIuanMubWFwCgo=",null,!1),o=function(A={}){var Q,F,B=A;B.ready=new Promise(((A,B)=>{Q=A,F=B}));var U,l=Object.assign({},B),t="";t=0!==(t=self.location.href).indexOf("blob:")?t.substr(0,t.replace(/[?#].*/,"").lastIndexOf("/")+1):"",U=A=>{var Q=new XMLHttpRequest;return Q.open("GET",A,!1),Q.responseType="arraybuffer",Q.send(null),new Uint8Array(Q.response)},B.print||console.log.bind(console);var d,n,V=B.printErr||console.error.bind(console);function Z(A){if(X(A))return function(A){for(var Q=atob(A),F=new Uint8Array(Q.length),B=0;BA.startsWith(G);function Y(A){return Promise.resolve().then((()=>function(A){if(A==m&&d)return new Uint8Array(d);var Q=Z(A);if(Q)return Q;if(U)return U(A);throw"both async and sync fetching of the wasm failed"}(A)))}function y(A,Q,F,B){return function(A,Q,F){return Y(A).then((A=>WebAssembly.instantiate(A,Q))).then((A=>A)).then(F,(A=>{V(`failed to asynchronously prepare wasm: ${A}`),E(A)}))}(Q,F,B)}X(m="data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxkGAWsCAAFsAA4BbQAZAW4BAAFvABgBcAAPCRUBAEEBCw8RIw0WFiINIRocHw0bHR4K6VAacQEBfyACRQRAIAAoAgQgASgCBEYPCyAAIAFGBEBBAQ8LAkAgACgCBCICLQAAIgBFIAAgASgCBCIBLQAAIgNH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CwAA9AsAAGMAAACgCwAAAAwAAGgAAACgCwAADAwAAGEAAACgCwAAGAwAAHMAAACgCwAAJAwAAHQAAACgCwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=")||(N=m,m=B.locateFile?B.locateFile(N,t):t+N);var p=A=>{for(;A.length>0;)A.shift()(B)};B.noExitRuntime;var S,k,u=A=>{for(var Q="",F=A;I[F];)Q+=S[I[F++]];return Q},T={},D={},H=A=>{throw new k(A)};function w(A,Q,F={}){if(!("argPackAdvance"in Q))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(A,Q,F={}){var B=Q.name;if(A||H(`type "${B}" must have a positive integer typeid pointer`),D.hasOwnProperty(A)){if(F.ignoreDuplicateRegistrations)return;H(`Cannot register type '${B}' twice`)}if(D[A]=Q,T.hasOwnProperty(A)){var U=T[A];delete T[A],U.forEach((A=>A()))}}(A,Q,F)}function x(){this.allocated=[void 0],this.freelist=[]}var f=new x,M=()=>{for(var A=0,Q=f.reserved;Q(A||H("Cannot use deleted val. handle = "+A),f.get(A).value),v=A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return f.allocate({refcount:1,value:A})}};function K(A){return this.fromWireType(g[A>>2])}var j=(A,Q)=>{switch(Q){case 4:return function(A){return this.fromWireType(W[A>>2])};case 8:return function(A){return this.fromWireType(c[A>>3])};default:throw new TypeError(`invalid float width (${Q}): ${A}`)}},O=(A,Q,F)=>{switch(Q){case 1:return F?A=>e[A>>0]:A=>I[A>>0];case 2:return F?A=>R[A>>1]:A=>a[A>>1];case 4:return F?A=>g[A>>2]:A=>i[A>>2];default:throw new TypeError(`invalid integer width (${Q}): ${A}`)}};function L(A){return this.fromWireType(i[A>>2])}var P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,_=(A,Q)=>A?((A,Q,F)=>{for(var B=Q+F,U=Q;A[U]&&!(U>=B);)++U;if(U-Q>16&&A.buffer&&P)return P.decode(A.subarray(Q,U));for(var l="";Q>10,56320|1023&V)}}else l+=String.fromCharCode((31&t)<<6|d)}else l+=String.fromCharCode(t)}return l})(I,A,Q):"",q="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,$=(A,Q)=>{for(var F=A,B=F>>1,U=B+Q/2;!(B>=U)&&a[B];)++B;if((F=B<<1)-A>32&&q)return q.decode(I.subarray(A,F));for(var l="",t=0;!(t>=Q/2);++t){var d=R[A+2*t>>1];if(0==d)break;l+=String.fromCharCode(d)}return l},AA=(A,Q,F)=>{if(F??=2147483647,F<2)return 0;for(var B=Q,U=(F-=2)<2*A.length?F/2:A.length,l=0;l>1]=t,Q+=2}return R[Q>>1]=0,Q-B},QA=A=>2*A.length,FA=(A,Q)=>{for(var F=0,B="";!(F>=Q/4);){var U=g[A+4*F>>2];if(0==U)break;if(++F,U>=65536){var l=U-65536;B+=String.fromCharCode(55296|l>>10,56320|1023&l)}else B+=String.fromCharCode(U)}return B},BA=(A,Q,F)=>{if(F??=2147483647,F<4)return 0;for(var B=Q,U=B+F-4,l=0;l=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&A.charCodeAt(++l)),g[Q>>2]=t,(Q+=4)+4>U)break}return g[Q>>2]=0,Q-B},UA=A=>{for(var Q=0,F=0;F=55296&&B<=57343&&++F,Q+=4}return Q},lA=A=>{var Q=(A-n.buffer.byteLength+65535)/65536;try{return n.grow(Q),h(),1}catch(A){}};(()=>{for(var A=new Array(256),Q=0;Q<256;++Q)A[Q]=String.fromCharCode(Q);S=A})(),k=B.BindingError=class extends Error{constructor(A){super(A),this.name="BindingError"}},B.InternalError=class extends Error{constructor(A){super(A),this.name="InternalError"}},Object.assign(x.prototype,{get(A){return this.allocated[A]},has(A){return void 0!==this.allocated[A]},allocate(A){var Q=this.freelist.pop()||this.allocated.length;return this.allocated[Q]=A,Q},free(A){this.allocated[A]=void 0,this.freelist.push(A)}}),f.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),f.reserved=f.allocated.length,B.count_emval_handles=M;var tA={f:(A,Q,F,B,U)=>{},i:(A,Q,F,B)=>{w(A,{name:Q=u(Q),fromWireType:function(A){return!!A},toWireType:function(A,Q){return Q?F:B},argPackAdvance:8,readValueFromPointer:function(A){return this.fromWireType(I[A])},destructorFunction:null})},h:(A,Q)=>{w(A,{name:Q=u(Q),fromWireType:A=>{var Q=z(A);return(A=>{A>=f.reserved&&0==--f.get(A).refcount&&f.free(A)})(A),Q},toWireType:(A,Q)=>v(Q),argPackAdvance:8,readValueFromPointer:K,destructorFunction:null})},e:(A,Q,F)=>{w(A,{name:Q=u(Q),fromWireType:A=>A,toWireType:(A,Q)=>Q,argPackAdvance:8,readValueFromPointer:j(Q,F),destructorFunction:null})},b:(A,Q,F,B,U)=>{Q=u(Q);var l=A=>A;if(0===B){var t=32-8*F;l=A=>A<>>t}var d=Q.includes("unsigned");w(A,{name:Q,fromWireType:l,toWireType:d?function(A,Q){return this.name,Q>>>0}:function(A,Q){return this.name,Q},argPackAdvance:8,readValueFromPointer:O(Q,F,0!==B),destructorFunction:null})},a:(A,Q,F)=>{var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][Q];function U(A){var Q=i[A>>2],F=i[A+4>>2];return new B(e.buffer,F,Q)}w(A,{name:F=u(F),fromWireType:U,argPackAdvance:8,readValueFromPointer:U},{ignoreDuplicateRegistrations:!0})},d:(A,Q)=>{var F="std::string"===(Q=u(Q));w(A,{name:Q,fromWireType(A){var Q,B=i[A>>2],U=A+4;if(F)for(var l=U,t=0;t<=B;++t){var d=U+t;if(t==B||0==I[d]){var n=_(l,d-l);void 0===Q?Q=n:(Q+=String.fromCharCode(0),Q+=n),l=d+1}}else{var V=new Array(B);for(t=0;t{for(var Q=0,F=0;F=55296&&B<=57343?(Q+=4,++F):Q+=3}return Q})(Q):Q.length;var l=VA(4+B+1),t=l+4;if(i[l>>2]=B,F&&U)((A,Q,F,B)=>{if(!(B>0))return 0;for(var U=F+B-1,l=0;l=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&A.charCodeAt(++l)),t<=127){if(F>=U)break;Q[F++]=t}else if(t<=2047){if(F+1>=U)break;Q[F++]=192|t>>6,Q[F++]=128|63&t}else if(t<=65535){if(F+2>=U)break;Q[F++]=224|t>>12,Q[F++]=128|t>>6&63,Q[F++]=128|63&t}else{if(F+3>=U)break;Q[F++]=240|t>>18,Q[F++]=128|t>>12&63,Q[F++]=128|t>>6&63,Q[F++]=128|63&t}}Q[F]=0})(Q,I,t,B+1);else if(U)for(var d=0;d255&&(ZA(t),H("String has UTF-16 code units that do not fit in 8 bits")),I[t+d]=n}else for(d=0;d{var B,U,l,t,d;F=u(F),2===Q?(B=$,U=AA,t=QA,l=()=>a,d=1):4===Q&&(B=FA,U=BA,t=UA,l=()=>i,d=2),w(A,{name:F,fromWireType:A=>{for(var F,U=i[A>>2],t=l(),n=A+4,V=0;V<=U;++V){var Z=A+4+V*Q;if(V==U||0==t[Z>>d]){var e=B(n,Z-n);void 0===F?F=e:(F+=String.fromCharCode(0),F+=e),n=Z+Q}}return ZA(A),F},toWireType:(A,B)=>{"string"!=typeof B&&H(`Cannot pass non-string to C++ string type ${F}`);var l=t(B),n=VA(4+l+Q);return i[n>>2]=l>>d,U(B,n+4,l+Q),null!==A&&A.push(ZA,n),n},argPackAdvance:8,readValueFromPointer:K,destructorFunction(A){ZA(A)}})},j:(A,Q)=>{w(A,{isVoid:!0,name:Q=u(Q),argPackAdvance:0,fromWireType:()=>{},toWireType:(A,Q)=>{}})},g:A=>{var Q=I.length,F=2147483648;if((A>>>=0)>F)return!1;for(var B,U,l=1;l<=4;l*=2){var t=Q*(1+.2/l);t=Math.min(t,A+100663296);var d=Math.min(F,(B=Math.max(A,t))+((U=65536)-B%U)%U);if(lA(d))return!0}return!1}},dA=function(){var A={a:tA};function Q(A,Q){var F;return dA=A.exports,n=dA.k,h(),F=dA.l,o.unshift(F),function(A){if(b--,B.monitorRunDependencies?.(b),0==b&&r){var Q=r;r=null,Q()}}(),dA}if(b++,B.monitorRunDependencies?.(b),B.instantiateWasm)try{return B.instantiateWasm(A,Q)}catch(A){V(`Module.instantiateWasm callback failed with error: ${A}`),F(A)}return y(0,m,A,(function(A){Q(A.instance)})).catch(F),{}}();B._pack=(A,Q,F,U,l,t,d,n,V,Z,e)=>(B._pack=dA.m)(A,Q,F,U,l,t,d,n,V,Z,e);var nA,VA=B._malloc=A=>(VA=B._malloc=dA.o)(A),ZA=B._free=A=>(ZA=B._free=dA.p)(A);function eA(){function A(){nA||(nA=!0,B.calledRun=!0,C||(p(o),Q(B),B.onRuntimeInitialized&&B.onRuntimeInitialized(),function(){if(B.postRun)for("function"==typeof B.postRun&&(B.postRun=[B.postRun]);B.postRun.length;)A=B.postRun.shift(),J.unshift(A);var A;p(J)}()))}b>0||(function(){if(B.preRun)for("function"==typeof B.preRun&&(B.preRun=[B.preRun]);B.preRun.length;)A=B.preRun.shift(),s.unshift(A);var A;p(s)}(),b>0||(B.setStatus?(B.setStatus("Running..."),setTimeout((function(){setTimeout((function(){B.setStatus("")}),1),A()}),1)):A()))}if(r=function A(){nA||eA(),nA||(r=A)},B.preInit)for("function"==typeof B.preInit&&(B.preInit=[B.preInit]);B.preInit.length>0;)B.preInit.pop()();return eA(),A.ready};class J{constructor(A){this.dataChanged=!1,this.transformsChanged=!1,this._updating=new Set,this._dirty=new Set;let Q=0,F=0;this._splatIndices=new Map,this._offsets=new Map;const B=new Map;for(const U of A.objects)U instanceof Z&&(this._splatIndices.set(U,F),this._offsets.set(U,Q),B.set(Q,U),Q+=U.data.vertexCount,F++);this._vertexCount=Q,this._width=2048,this._height=Math.ceil(2*this.vertexCount/this.width),this._data=new Uint32Array(this.width*this.height*4),this._transformsWidth=5,this._transformsHeight=B.size,this._transforms=new Float32Array(this._transformsWidth*this._transformsHeight*4),this._transformIndicesWidth=1024,this._transformIndicesHeight=Math.ceil(this.vertexCount/this._transformIndicesWidth),this._transformIndices=new Uint32Array(this._transformIndicesWidth*this._transformIndicesHeight),this._positions=new Float32Array(3*this.vertexCount),this._rotations=new Float32Array(4*this.vertexCount),this._scales=new Float32Array(3*this.vertexCount),this._worker=new s;const U=A=>{const Q=this._splatIndices.get(A);this._transforms.set(A.transform.buffer,20*Q),this._transforms[20*Q+16]=A.selected?1:0,A.positionChanged=!1,A.rotationChanged=!1,A.scaleChanged=!1,A.selectedChanged=!1,this.transformsChanged=!0};let l;this._worker.onmessage=A=>{if(A.data.response){const Q=A.data.response,F=B.get(Q.offset);U(F);const l=this._splatIndices.get(F);for(let A=0;A{if(!l)return void async function(){for(;!l;)await new Promise((A=>setTimeout(A,0)))}().then((()=>{t(A)}));U(A);const Q=l._malloc(3*A.data.vertexCount*4),F=l._malloc(4*A.data.vertexCount*4),B=l._malloc(3*A.data.vertexCount*4),d=l._malloc(4*A.data.vertexCount),n=l._malloc(A.data.vertexCount),V=l._malloc(8*A.data.vertexCount*4),Z=l._malloc(3*A.data.vertexCount*4),e=l._malloc(4*A.data.vertexCount*4),I=l._malloc(3*A.data.vertexCount*4);l.HEAPF32.set(A.data.positions,Q/4),l.HEAPF32.set(A.data.rotations,F/4),l.HEAPF32.set(A.data.scales,B/4),l.HEAPU8.set(A.data.colors,d),l.HEAPU8.set(A.data.selection,n),l._pack(A.selected,A.data.vertexCount,Q,F,B,d,n,V,Z,e,I);const R=new Uint32Array(l.HEAPU32.buffer,V,8*A.data.vertexCount),a=new Float32Array(l.HEAPF32.buffer,Z,3*A.data.vertexCount),g=new Float32Array(l.HEAPF32.buffer,e,4*A.data.vertexCount),i=new Float32Array(l.HEAPF32.buffer,I,3*A.data.vertexCount),W=this._splatIndices.get(A),c=this._offsets.get(A);for(let Q=0;Q{if((A.positionChanged||A.rotationChanged||A.scaleChanged||A.selectedChanged)&&U(A),!A.data.changed||A.data.detached)return;const Q={position:new Float32Array(A.position.flat()),rotation:new Float32Array(A.rotation.flat()),scale:new Float32Array(A.scale.flat()),selected:A.selected,vertexCount:A.data.vertexCount,positions:A.data.positions,rotations:A.data.rotations,scales:A.data.scales,colors:A.data.colors,selection:A.data.selection,offset:this._offsets.get(A)};this._worker.postMessage({splat:Q},[Q.position.buffer,Q.rotation.buffer,Q.scale.buffer,Q.positions.buffer,Q.rotations.buffer,Q.scales.buffer,Q.colors.buffer,Q.selection.buffer]),this._updating.add(A),A.data.detached=!0};this.getSplat=A=>{let Q=null;for(const[F,B]of this._offsets){if(!(A>=B))break;Q=F}return Q},this.getLocalIndex=(A,Q)=>Q-this._offsets.get(A),this.markDirty=A=>{this._dirty.add(A)},this.rebuild=()=>{for(const A of this._dirty)d(A);this._dirty.clear()},this.dispose=()=>{this._worker.terminate()};for(const A of this._splatIndices.keys())t(A)}get offsets(){return this._offsets}get data(){return this._data}get width(){return this._width}get height(){return this._height}get transforms(){return this._transforms}get transformsWidth(){return this._transformsWidth}get transformsHeight(){return this._transformsHeight}get transformIndices(){return this._transformIndices}get transformIndicesWidth(){return this._transformIndicesWidth}get transformIndicesHeight(){return this._transformIndicesHeight}get positions(){return this._positions}get rotations(){return this._rotations}get scales(){return this._scales}get vertexCount(){return this._vertexCount}get needsRebuild(){return this._dirty.size>0}get updating(){return this._updating.size>0}}class b{constructor(A=0,Q=0,F=0,B=255){this.r=A,this.g=Q,this.b=F,this.a=B}flat(){return[this.r,this.g,this.b,this.a]}flatNorm(){return[this.r/255,this.g/255,this.b/255,this.a/255]}toHexString(){return"#"+this.flat().map((A=>A.toString(16).padStart(2,"0"))).join("")}toString(){return`[${this.flat().join(", ")}]`}}class r extends h{constructor(A,Q){super(A,Q),this._outlineThickness=10,this._outlineColor=new b(255,165,0,255),this._renderData=null,this._depthIndex=null,this._chunks=null,this._splatTexture=null;const F=A.canvas,B=A.gl;let U,l,t,d,n,V,e,I,R,a,g,i,W,c,h,s;this._resize=()=>{this._camera&&(this._camera.data.setSize(F.width,F.height),this._camera.update(),l=B.getUniformLocation(this.program,"projection"),B.uniformMatrix4fv(l,!1,this._camera.data.projectionMatrix.buffer),t=B.getUniformLocation(this.program,"viewport"),B.uniform2fv(t,new Float32Array([F.width,F.height])))};const o=()=>{U=new C,U.onmessage=A=>{if(A.data.depthIndex){const{depthIndex:Q,chunks:F}=A.data;this._depthIndex=Q,this._chunks=F,B.bindBuffer(B.ARRAY_BUFFER,s),B.bufferData(B.ARRAY_BUFFER,Q,B.STATIC_DRAW)}}};this._initialize=()=>{if(this._scene&&this._camera){this._resize(),this._scene.addEventListener("objectAdded",r),this._scene.addEventListener("objectRemoved",E);for(const A of this._scene.objects)A instanceof Z&&A.addEventListener("objectChanged",m);this._renderData=new J(this._scene),d=B.getUniformLocation(this.program,"focal"),B.uniform2fv(d,new Float32Array([this._camera.data.fx,this._camera.data.fy])),n=B.getUniformLocation(this.program,"view"),B.uniformMatrix4fv(n,!1,this._camera.data.viewMatrix.buffer),R=B.getUniformLocation(this.program,"outlineThickness"),B.uniform1f(R,this.outlineThickness),a=B.getUniformLocation(this.program,"outlineColor"),B.uniform4fv(a,new Float32Array(this.outlineColor.flatNorm())),this._splatTexture=B.createTexture(),V=B.getUniformLocation(this.program,"u_texture"),B.uniform1i(V,0),W=B.createTexture(),e=B.getUniformLocation(this.program,"u_transforms"),B.uniform1i(e,1),c=B.createTexture(),I=B.getUniformLocation(this.program,"u_transformIndices"),B.uniform1i(I,2),h=B.createBuffer(),B.bindBuffer(B.ARRAY_BUFFER,h),B.bufferData(B.ARRAY_BUFFER,new Float32Array([-2,-2,2,-2,2,2,-2,2]),B.STATIC_DRAW),g=B.getAttribLocation(this.program,"position"),B.enableVertexAttribArray(g),B.vertexAttribPointer(g,2,B.FLOAT,!1,0,0),s=B.createBuffer(),i=B.getAttribLocation(this.program,"index"),B.enableVertexAttribArray(i),B.bindBuffer(B.ARRAY_BUFFER,s),o()}else console.error("Cannot render without scene and camera")};const r=A=>{const Q=A;Q.object instanceof Z&&Q.object.addEventListener("objectChanged",m),this.dispose()},E=A=>{const Q=A;Q.object instanceof Z&&Q.object.removeEventListener("objectChanged",m),this.dispose()},m=A=>{const Q=A;Q.object instanceof Z&&this._renderData&&this._renderData.markDirty(Q.object)};this._render=()=>{if(this._scene&&this._camera&&this.renderData){if(this._camera.update(),U.postMessage({viewProj:this._camera.data.viewProj}),this.renderData.needsRebuild&&this.renderData.rebuild(),this.renderData.dataChanged||this.renderData.transformsChanged){this.renderData.dataChanged&&(B.activeTexture(B.TEXTURE0),B.bindTexture(B.TEXTURE_2D,this.splatTexture),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.NEAREST),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.NEAREST),B.texImage2D(B.TEXTURE_2D,0,B.RGBA32UI,this.renderData.width,this.renderData.height,0,B.RGBA_INTEGER,B.UNSIGNED_INT,this.renderData.data)),this.renderData.transformsChanged&&(B.activeTexture(B.TEXTURE1),B.bindTexture(B.TEXTURE_2D,W),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.NEAREST),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.NEAREST),B.texImage2D(B.TEXTURE_2D,0,B.RGBA32F,this.renderData.transformsWidth,this.renderData.transformsHeight,0,B.RGBA,B.FLOAT,this.renderData.transforms),B.activeTexture(B.TEXTURE2),B.bindTexture(B.TEXTURE_2D,c),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.CLAMP_TO_EDGE),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.NEAREST),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.NEAREST),B.texImage2D(B.TEXTURE_2D,0,B.R32UI,this.renderData.transformIndicesWidth,this.renderData.transformIndicesHeight,0,B.RED_INTEGER,B.UNSIGNED_INT,this.renderData.transformIndices));const A=new Float32Array(this.renderData.positions.slice().buffer),Q=new Float32Array(this.renderData.transforms.slice().buffer),F=new Uint32Array(this.renderData.transformIndices.slice().buffer);U.postMessage({sortData:{positions:A,transforms:Q,transformIndices:F,vertexCount:this.renderData.vertexCount}},[A.buffer,Q.buffer,F.buffer]),this.renderData.dataChanged=!1,this.renderData.transformsChanged=!1}B.viewport(0,0,F.width,F.height),B.clearColor(0,0,0,0),B.clear(B.COLOR_BUFFER_BIT),B.disable(B.DEPTH_TEST),B.enable(B.BLEND),B.blendFuncSeparate(B.ONE_MINUS_DST_ALPHA,B.ONE,B.ONE_MINUS_DST_ALPHA,B.ONE),B.blendEquationSeparate(B.FUNC_ADD,B.FUNC_ADD),B.uniformMatrix4fv(l,!1,this._camera.data.projectionMatrix.buffer),B.uniformMatrix4fv(n,!1,this._camera.data.viewMatrix.buffer),B.bindBuffer(B.ARRAY_BUFFER,h),B.vertexAttribPointer(g,2,B.FLOAT,!1,0,0),B.bindBuffer(B.ARRAY_BUFFER,s),B.vertexAttribIPointer(i,1,B.INT,0,0),B.vertexAttribDivisor(i,1),B.drawArraysInstanced(B.TRIANGLE_FAN,0,4,this.renderData.vertexCount)}else console.error("Cannot render without scene and camera")},this._dispose=()=>{if(this._scene&&this._camera&&this.renderData){this._scene.removeEventListener("objectAdded",r),this._scene.removeEventListener("objectRemoved",E);for(const A of this._scene.objects)A instanceof Z&&A.removeEventListener("objectChanged",m);U.terminate(),this.renderData.dispose(),B.deleteTexture(this.splatTexture),B.deleteTexture(W),B.deleteTexture(c),B.deleteBuffer(s),B.deleteBuffer(h)}else console.error("Cannot dispose without scene and camera")},this._setOutlineThickness=A=>{this._outlineThickness=A,this._initialized&&B.uniform1f(R,A)},this._setOutlineColor=A=>{this._outlineColor=A,this._initialized&&B.uniform4fv(a,new Float32Array(A.flatNorm()))}}get renderData(){return this._renderData}get depthIndex(){return this._depthIndex}get chunks(){return this._chunks}get splatTexture(){return this._splatTexture}get outlineThickness(){return this._outlineThickness}set outlineThickness(A){this._setOutlineThickness(A)}get outlineColor(){return this._outlineColor}set outlineColor(A){this._setOutlineColor(A)}_getVertexSource(){return"#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n"}_getFragmentSource(){return"#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n"}}class E{constructor(A=1){let Q,F,B,U,l=0,t=!1;this.initialize=A=>{if(!(A instanceof r))throw new Error("FadeInPass requires a RenderProgram");l=A.started?1:0,t=!0,Q=A,F=A.renderer.gl,B=F.getUniformLocation(Q.program,"useDepthFade"),F.uniform1i(B,1),U=F.getUniformLocation(Q.program,"depthFade"),F.uniform1f(U,l)},this.render=()=>{var d;t&&!(null===(d=Q.renderData)||void 0===d?void 0:d.updating)&&(F.useProgram(Q.program),l=Math.min(l+.01*A,1),l>=1&&(t=!1,F.uniform1i(B,0)),F.uniform1f(U,l))}}dispose(){}}class m{constructor(A=null,Q=null){this._backgroundColor=new b;const F=A||document.createElement("canvas");A||(F.style.display="block",F.style.boxSizing="border-box",F.style.width="100%",F.style.height="100%",F.style.margin="0",F.style.padding="0",document.body.appendChild(F)),F.style.background=this._backgroundColor.toHexString(),this._canvas=F,this._gl=F.getContext("webgl2",{antialias:!1});const B=Q||[];Q||B.push(new E),this._renderProgram=new r(this,B);const U=[this._renderProgram];this.resize=()=>{const A=F.clientWidth,Q=F.clientHeight;F.width===A&&F.height===Q||this.setSize(A,Q)},this.setSize=(A,Q)=>{F.width=A,F.height=Q,this._gl.viewport(0,0,F.width,F.height);for(const A of U)A.resize()},this.render=(A,Q)=>{for(const F of U)F.render(A,Q)},this.dispose=()=>{for(const A of U)A.dispose()},this.addProgram=A=>{U.push(A)},this.removeProgram=A=>{const Q=U.indexOf(A);if(Q<0)throw new Error("Program not found");U.splice(Q,1)},this.resize()}get canvas(){return this._canvas}get gl(){return this._gl}get renderProgram(){return this._renderProgram}get backgroundColor(){return this._backgroundColor}set backgroundColor(A){this._backgroundColor=A,this._canvas.style.background=A.toHexString()}}class N{constructor(F,B,U=.5,l=.5,t=5,d=!0,V=new A){this.minAngle=-90,this.maxAngle=90,this.minZoom=.1,this.maxZoom=30,this.orbitSpeed=1,this.panSpeed=1,this.zoomSpeed=1,this.dampening=.12,this.setCameraTarget=()=>{};let Z=V.clone(),e=Z.clone(),I=U,R=l,a=t,g=!1,i=!1,W=0,c=0,C=0;const h={};let s=!1;F.addEventListener("objectChanged",(()=>{if(s)return;const Q=F.rotation.toEuler();I=-Q.y,R=-Q.x;const B=F.position.x-a*Math.sin(I)*Math.cos(R),U=F.position.y+a*Math.sin(R),l=F.position.z+a*Math.cos(I)*Math.cos(R);e=new A(B,U,l)})),this.setCameraTarget=Q=>{const B=Q.x-F.position.x,U=Q.y-F.position.y,l=Q.z-F.position.z;a=Math.sqrt(B*B+U*U+l*l),R=Math.atan2(U,Math.sqrt(B*B+l*l)),I=-Math.atan2(B,l),e=new A(Q.x,Q.y,Q.z)};const o=()=>.1+.9*(a-this.minZoom)/(this.maxZoom-this.minZoom),J=A=>{h[A.code]=!0,"ArrowUp"===A.code&&(h.KeyW=!0),"ArrowDown"===A.code&&(h.KeyS=!0),"ArrowLeft"===A.code&&(h.KeyA=!0),"ArrowRight"===A.code&&(h.KeyD=!0)},b=A=>{h[A.code]=!1,"ArrowUp"===A.code&&(h.KeyW=!1),"ArrowDown"===A.code&&(h.KeyS=!1),"ArrowLeft"===A.code&&(h.KeyA=!1),"ArrowRight"===A.code&&(h.KeyD=!1)},r=A=>{p(A),g=!0,i=2===A.button,c=A.clientX,C=A.clientY,window.addEventListener("mouseup",E)},E=A=>{p(A),g=!1,i=!1,window.removeEventListener("mouseup",E)},m=Q=>{if(p(Q),!g||!F)return;const B=Q.clientX-c,U=Q.clientY-C;if(i){const Q=o(),l=-B*this.panSpeed*.01*Q,t=-U*this.panSpeed*.01*Q,d=n.RotationFromQuaternion(F.rotation).buffer,V=new A(d[0],d[3],d[6]),Z=new A(d[1],d[4],d[7]);e=e.add(V.multiply(l)),e=e.add(Z.multiply(t))}else I-=B*this.orbitSpeed*.003,R+=U*this.orbitSpeed*.003,R=Math.min(Math.max(R,this.minAngle*Math.PI/180),this.maxAngle*Math.PI/180);c=Q.clientX,C=Q.clientY},N=A=>{p(A);const Q=o();a+=A.deltaY*this.zoomSpeed*.025*Q,a=Math.min(Math.max(a,this.minZoom),this.maxZoom)},G=A=>{if(p(A),1===A.touches.length)g=!0,i=!1,c=A.touches[0].clientX,C=A.touches[0].clientY,W=0;else if(2===A.touches.length){g=!0,i=!0,c=(A.touches[0].clientX+A.touches[1].clientX)/2,C=(A.touches[0].clientY+A.touches[1].clientY)/2;const Q=A.touches[0].clientX-A.touches[1].clientX,F=A.touches[0].clientY-A.touches[1].clientY;W=Math.sqrt(Q*Q+F*F)}},X=A=>{p(A),g=!1,i=!1},Y=Q=>{if(p(Q),g&&F)if(i){const B=o(),U=Q.touches[0].clientX-Q.touches[1].clientX,l=Q.touches[0].clientY-Q.touches[1].clientY,t=Math.sqrt(U*U+l*l);a+=(W-t)*this.zoomSpeed*.1*B,a=Math.min(Math.max(a,this.minZoom),this.maxZoom),W=t;const d=(Q.touches[0].clientX+Q.touches[1].clientX)/2,V=(Q.touches[0].clientY+Q.touches[1].clientY)/2,Z=d-c,I=V-C,R=n.RotationFromQuaternion(F.rotation).buffer,g=new A(R[0],R[3],R[6]),i=new A(R[1],R[4],R[7]);e=e.add(g.multiply(-Z*this.panSpeed*.025*B)),e=e.add(i.multiply(-I*this.panSpeed*.025*B)),c=d,C=V}else{const A=Q.touches[0].clientX-c,F=Q.touches[0].clientY-C;I-=A*this.orbitSpeed*.003,R+=F*this.orbitSpeed*.003,R=Math.min(Math.max(R,this.minAngle*Math.PI/180),this.maxAngle*Math.PI/180),c=Q.touches[0].clientX,C=Q.touches[0].clientY}},y=(A,Q,F)=>(1-F)*A+F*Q;this.update=()=>{s=!0,U=y(U,I,this.dampening),l=y(l,R,this.dampening),t=y(t,a,this.dampening),Z=Z.lerp(e,this.dampening);const B=Z.x+t*Math.sin(U)*Math.cos(l),d=Z.y-t*Math.sin(l),V=Z.z-t*Math.cos(U)*Math.cos(l);F.position=new A(B,d,V);const g=Z.subtract(F.position).normalize(),i=Math.asin(-g.y),W=Math.atan2(g.x,g.z);F.rotation=Q.FromEuler(new A(i,W,0));const c=.025,C=.01,o=n.RotationFromQuaternion(F.rotation).buffer,J=new A(-o[2],-o[5],-o[8]),b=new A(o[0],o[3],o[6]);h.KeyS&&(e=e.add(J.multiply(c))),h.KeyW&&(e=e.subtract(J.multiply(c))),h.KeyA&&(e=e.subtract(b.multiply(c))),h.KeyD&&(e=e.add(b.multiply(c))),h.KeyE&&(I+=C),h.KeyQ&&(I-=C),h.KeyR&&(R+=C),h.KeyF&&(R-=C),s=!1};const p=A=>{A.preventDefault(),A.stopPropagation()};this.dispose=()=>{B.removeEventListener("dragenter",p),B.removeEventListener("dragover",p),B.removeEventListener("dragleave",p),B.removeEventListener("contextmenu",p),B.removeEventListener("mousedown",r),B.removeEventListener("mousemove",m),B.removeEventListener("wheel",N),B.removeEventListener("touchstart",G),B.removeEventListener("touchend",X),B.removeEventListener("touchmove",Y),d&&(window.removeEventListener("keydown",J),window.removeEventListener("keyup",b))},d&&(window.addEventListener("keydown",J),window.addEventListener("keyup",b)),B.addEventListener("dragenter",p),B.addEventListener("dragover",p),B.addEventListener("dragleave",p),B.addEventListener("contextmenu",p),B.addEventListener("mousedown",r),B.addEventListener("mousemove",m),B.addEventListener("wheel",N),B.addEventListener("touchstart",G),B.addEventListener("touchend",X),B.addEventListener("touchmove",Y),this.update()}}class G{constructor(A,Q){this.normal=A,this.point=Q}intersect(A,Q){const F=this.normal.dot(Q);if(Math.abs(F)<1e-4)return null;const B=this.normal.dot(this.point.subtract(A))/F;return B<0?null:A.add(Q.multiply(B))}}class X{initialize(A){}render(){}dispose(){}}var Y=function(A={}){var Q,F,B=A;B.ready=new Promise(((A,B)=>{Q=A,F=B}));var U=Object.assign({},B),l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",B.print||console.log.bind(console);var t,d,n=B.printErr||console.error.bind(console);function V(A){if(G(A))return function(A){for(var Q=atob(A),F=new Uint8Array(Q.length),B=0;BA.startsWith(N);function X(A){return Promise.resolve().then((()=>function(A){if(A==E&&t)return new Uint8Array(t);var Q=V(A);if(Q)return Q;throw"both async and sync fetching of the wasm failed"}(A)))}function Y(A,Q,F,B){return function(A,Q,F){return X(A).then((A=>WebAssembly.instantiate(A,Q))).then((A=>A)).then(F,(A=>{n(`failed to asynchronously prepare wasm: ${A}`),r(A)}))}(Q,F,B)}G(E="data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAA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CABKAIkQQFHDQAgASgCGEECRw0AIAFBAToANgsgAUEENgIsCwvyAQAgACABKAIIIAQQCgRAIAEgAiADEBEPCwJAIAAgASgCACAEEAoEQAJAIAIgASgCEEcEQCABKAIUIAJHDQELIANBAUcNAiABQQE2AiAPCyABIAM2AiACQCABKAIsQQRGDQAgAUEAOwE0IAAoAggiACABIAIgAkEBIAQgACgCACgCFBEDACABLQA1BEAgAUEDNgIsIAEtADRFDQEMAwsgAUEENgIsCyABIAI2AhQgASABKAIoQQFqNgIoIAEoAiRBAUcNASABKAIYQQJHDQEgAUEBOgA2DwsgACgCCCIAIAEgAiADIAQgACgCACgCGBECAAsLMQAgACABKAIIQQAQCgRAIAEgAiADEBQPCyAAKAIIIgAgASACIAMgACgCACgCHBEAAAsYACAAIAEoAghBABAKBEAgASACIAMQFAsLgAMBBH8jAEHwAGsiAiQAIAAoAgAiA0EEaygCACEEIANBCGsoAgAhBSACQgA3AlAgAkIANwJYIAJCADcCYCACQgA3AGcgAkIANwJIIAJBADYCRCACQfwVNgJAIAIgADYCPCACIAE2AjggACAFaiEDAkAgBCABQQAQCgRAQQAgAyAFGyEADAELIAAgA04EQCACQgA3AC8gAkIANwIYIAJCADcCICACQgA3AiggAkIANwIQIAJBADYCDCACIAE2AgggAiAANgIEIAIgBDYCACACQQE2AjAgBCACIAMgA0EBQQAgBCgCACgCFBEDACACKAIYDQELQQAhACAEIAJBOGogA0EBQQAgBCgCACgCGBECAAJAAkAgAigCXA4CAAECCyACKAJMQQAgAigCWEEBRhtBACACKAJUQQFGG0EAIAIoAmBBAUYbIQAMAQsgAigCUEEBRwRAIAIoAmANASACKAJUQQFHDQEgAigCWEEBRw0BCyACKAJIIQALIAJB8ABqJAAgAAu1AQEEfyMAQUBqIgMkAAJ/QQEgACABQQAQCg0AGkEAIAFFDQAaQQAgAUGsFhAgIgFFDQAaIANBDGohBEE0IQUDQCAEQQA6AAAgBEEBaiEEIAVBAWsiBQ0ACyADQQE2AjggA0F/NgIUIAMg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ZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B")||(m=E,E=B.locateFile?B.locateFile(m,l):l+m);var y=A=>{for(;A.length>0;)A.shift()(B)};B.noExitRuntime;var p,S,k=A=>{for(var Q="",F=A;e[F];)Q+=p[e[F++]];return Q},u={},T={},D=A=>{throw new S(A)};function H(A,Q,F={}){if(!("argPackAdvance"in Q))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(A,Q,F={}){var B=Q.name;if(A||D(`type "${B}" must have a positive integer typeid pointer`),T.hasOwnProperty(A)){if(F.ignoreDuplicateRegistrations)return;D(`Cannot register type '${B}' twice`)}if(T[A]=Q,u.hasOwnProperty(A)){var U=u[A];delete u[A],U.forEach((A=>A()))}}(A,Q,F)}function w(){this.allocated=[void 0],this.freelist=[]}var x=new w,f=()=>{for(var A=0,Q=x.reserved;Q(A||D("Cannot use deleted val. handle = "+A),x.get(A).value),z=A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return x.allocate({refcount:1,value:A})}};function v(A){return this.fromWireType(a[A>>2])}var K=(A,Q)=>{switch(Q){case 4:return function(A){return this.fromWireType(i[A>>2])};case 8:return function(A){return this.fromWireType(W[A>>3])};default:throw new TypeError(`invalid float width (${Q}): ${A}`)}},j=(A,Q,F)=>{switch(Q){case 1:return F?A=>Z[A>>0]:A=>e[A>>0];case 2:return F?A=>I[A>>1]:A=>R[A>>1];case 4:return F?A=>a[A>>2]:A=>g[A>>2];default:throw new TypeError(`invalid integer width (${Q}): ${A}`)}};function O(A){return this.fromWireType(g[A>>2])}var L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,P=(A,Q)=>A?((A,Q,F)=>{for(var B=Q+F,U=Q;A[U]&&!(U>=B);)++U;if(U-Q>16&&A.buffer&&L)return L.decode(A.subarray(Q,U));for(var l="";Q>10,56320|1023&V)}}else l+=String.fromCharCode((31&t)<<6|d)}else l+=String.fromCharCode(t)}return l})(e,A,Q):"",_="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,q=(A,Q)=>{for(var F=A,B=F>>1,U=B+Q/2;!(B>=U)&&R[B];)++B;if((F=B<<1)-A>32&&_)return _.decode(e.subarray(A,F));for(var l="",t=0;!(t>=Q/2);++t){var d=I[A+2*t>>1];if(0==d)break;l+=String.fromCharCode(d)}return l},$=(A,Q,F)=>{if(F??=2147483647,F<2)return 0;for(var B=Q,U=(F-=2)<2*A.length?F/2:A.length,l=0;l>1]=t,Q+=2}return I[Q>>1]=0,Q-B},AA=A=>2*A.length,QA=(A,Q)=>{for(var F=0,B="";!(F>=Q/4);){var U=a[A+4*F>>2];if(0==U)break;if(++F,U>=65536){var l=U-65536;B+=String.fromCharCode(55296|l>>10,56320|1023&l)}else B+=String.fromCharCode(U)}return B},FA=(A,Q,F)=>{if(F??=2147483647,F<4)return 0;for(var B=Q,U=B+F-4,l=0;l=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&A.charCodeAt(++l)),a[Q>>2]=t,(Q+=4)+4>U)break}return a[Q>>2]=0,Q-B},BA=A=>{for(var Q=0,F=0;F=55296&&B<=57343&&++F,Q+=4}return Q},UA=A=>{var Q=(A-d.buffer.byteLength+65535)/65536;try{return d.grow(Q),C(),1}catch(A){}};(()=>{for(var A=new Array(256),Q=0;Q<256;++Q)A[Q]=String.fromCharCode(Q);p=A})(),S=B.BindingError=class extends Error{constructor(A){super(A),this.name="BindingError"}},B.InternalError=class extends Error{constructor(A){super(A),this.name="InternalError"}},Object.assign(w.prototype,{get(A){return this.allocated[A]},has(A){return void 0!==this.allocated[A]},allocate(A){var Q=this.freelist.pop()||this.allocated.length;return this.allocated[Q]=A,Q},free(A){this.allocated[A]=void 0,this.freelist.push(A)}}),x.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),x.reserved=x.allocated.length,B.count_emval_handles=f;var lA={f:(A,Q,F,B,U)=>{},i:(A,Q,F,B)=>{H(A,{name:Q=k(Q),fromWireType:function(A){return!!A},toWireType:function(A,Q){return Q?F:B},argPackAdvance:8,readValueFromPointer:function(A){return this.fromWireType(e[A])},destructorFunction:null})},h:(A,Q)=>{H(A,{name:Q=k(Q),fromWireType:A=>{var Q=M(A);return(A=>{A>=x.reserved&&0==--x.get(A).refcount&&x.free(A)})(A),Q},toWireType:(A,Q)=>z(Q),argPackAdvance:8,readValueFromPointer:v,destructorFunction:null})},e:(A,Q,F)=>{H(A,{name:Q=k(Q),fromWireType:A=>A,toWireType:(A,Q)=>Q,argPackAdvance:8,readValueFromPointer:K(Q,F),destructorFunction:null})},b:(A,Q,F,B,U)=>{Q=k(Q);var l=A=>A;if(0===B){var t=32-8*F;l=A=>A<>>t}var d=Q.includes("unsigned");H(A,{name:Q,fromWireType:l,toWireType:d?function(A,Q){return this.name,Q>>>0}:function(A,Q){return this.name,Q},argPackAdvance:8,readValueFromPointer:j(Q,F,0!==B),destructorFunction:null})},a:(A,Q,F)=>{var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][Q];function U(A){var Q=g[A>>2],F=g[A+4>>2];return new B(Z.buffer,F,Q)}H(A,{name:F=k(F),fromWireType:U,argPackAdvance:8,readValueFromPointer:U},{ignoreDuplicateRegistrations:!0})},d:(A,Q)=>{var F="std::string"===(Q=k(Q));H(A,{name:Q,fromWireType(A){var Q,B=g[A>>2],U=A+4;if(F)for(var l=U,t=0;t<=B;++t){var d=U+t;if(t==B||0==e[d]){var n=P(l,d-l);void 0===Q?Q=n:(Q+=String.fromCharCode(0),Q+=n),l=d+1}}else{var V=new Array(B);for(t=0;t{for(var Q=0,F=0;F=55296&&B<=57343?(Q+=4,++F):Q+=3}return Q})(Q):Q.length;var l=nA(4+B+1),t=l+4;if(g[l>>2]=B,F&&U)((A,Q,F,B)=>{if(!(B>0))return 0;for(var U=F+B-1,l=0;l=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&A.charCodeAt(++l)),t<=127){if(F>=U)break;Q[F++]=t}else if(t<=2047){if(F+1>=U)break;Q[F++]=192|t>>6,Q[F++]=128|63&t}else if(t<=65535){if(F+2>=U)break;Q[F++]=224|t>>12,Q[F++]=128|t>>6&63,Q[F++]=128|63&t}else{if(F+3>=U)break;Q[F++]=240|t>>18,Q[F++]=128|t>>12&63,Q[F++]=128|t>>6&63,Q[F++]=128|63&t}}Q[F]=0})(Q,e,t,B+1);else if(U)for(var d=0;d255&&(VA(t),D("String has UTF-16 code units that do not fit in 8 bits")),e[t+d]=n}else for(d=0;d{var B,U,l,t,d;F=k(F),2===Q?(B=q,U=$,t=AA,l=()=>R,d=1):4===Q&&(B=QA,U=FA,t=BA,l=()=>g,d=2),H(A,{name:F,fromWireType:A=>{for(var F,U=g[A>>2],t=l(),n=A+4,V=0;V<=U;++V){var Z=A+4+V*Q;if(V==U||0==t[Z>>d]){var e=B(n,Z-n);void 0===F?F=e:(F+=String.fromCharCode(0),F+=e),n=Z+Q}}return VA(A),F},toWireType:(A,B)=>{"string"!=typeof B&&D(`Cannot pass non-string to C++ string type ${F}`);var l=t(B),n=nA(4+l+Q);return g[n>>2]=l>>d,U(B,n+4,l+Q),null!==A&&A.push(VA,n),n},argPackAdvance:8,readValueFromPointer:v,destructorFunction(A){VA(A)}})},j:(A,Q)=>{H(A,{isVoid:!0,name:Q=k(Q),argPackAdvance:0,fromWireType:()=>{},toWireType:(A,Q)=>{}})},g:A=>{var Q=e.length,F=2147483648;if((A>>>=0)>F)return!1;for(var B,U,l=1;l<=4;l*=2){var t=Q*(1+.2/l);t=Math.min(t,A+100663296);var d=Math.min(F,(B=Math.max(A,t))+((U=65536)-B%U)%U);if(UA(d))return!0}return!1}},tA=function(){var A={a:lA};function Q(A,Q){var F;return tA=A.exports,d=tA.k,C(),F=tA.l,s.unshift(F),function(A){if(J--,B.monitorRunDependencies?.(J),0==J&&b){var Q=b;b=null,Q()}}(),tA}if(J++,B.monitorRunDependencies?.(J),B.instantiateWasm)try{return B.instantiateWasm(A,Q)}catch(A){n(`Module.instantiateWasm callback failed with error: ${A}`),F(A)}return Y(0,E,A,(function(A){Q(A.instance)})).catch(F),{}}();B._evaluate=(A,Q,F,U,l,t,d,n,V,Z,e,I,R)=>(B._evaluate=tA.m)(A,Q,F,U,l,t,d,n,V,Z,e,I,R);var dA,nA=B._malloc=A=>(nA=B._malloc=tA.o)(A),VA=B._free=A=>(VA=B._free=tA.p)(A);function ZA(){function A(){dA||(dA=!0,B.calledRun=!0,c||(y(s),Q(B),B.onRuntimeInitialized&&B.onRuntimeInitialized(),function(){if(B.postRun)for("function"==typeof B.postRun&&(B.postRun=[B.postRun]);B.postRun.length;)A=B.postRun.shift(),o.unshift(A);var A;y(o)}()))}J>0||(function(){if(B.preRun)for("function"==typeof B.preRun&&(B.preRun=[B.preRun]);B.preRun.length;)A=B.preRun.shift(),h.unshift(A);var A;y(h)}(),J>0||(B.setStatus?(B.setStatus("Running..."),setTimeout((function(){setTimeout((function(){B.setStatus("")}),1),A()}),1)):A()))}if(b=function A(){dA||ZA(),dA||(b=A)},B.preInit)for("function"==typeof B.preInit&&(B.preInit=[B.preInit]);B.preInit.length>0;)B.preInit.pop()();return ZA(),A.ready};class y{constructor(A){let Q;(async()=>{Q=await Y()})();let F,B,U,l,t,d,n,V,Z,e,I,R=0,a=0;this.testPoint=(g,i)=>{if(!Q)throw new Error("Wasm module not loaded");if(!A.camera)throw new Error("Camera not set");if(!A.renderData||!A.depthIndex||!A.chunks)throw new Error("Render data not set");const W=A.renderData,c=A.depthIndex,C=A.chunks,h=Math.pow(2,Math.ceil(Math.log2(W.vertexCount)));var s;(s=h)>R&&(R>0&&(Q._free(F),Q._free(U),Q._free(l),Q._free(t),Q._free(d),Q._free(n),Q._free(V),Q._free(Z),Q._free(e),Q._free(I)),R=s,F=Q._malloc(64),U=Q._malloc(4*R),l=Q._malloc(3*R*4),t=Q._malloc(4*R*4),d=Q._malloc(3*R*4),n=Q._malloc(4*R),V=Q._malloc(R),Z=Q._malloc(12),e=Q._malloc(12),I=Q._malloc(4));const o=Math.pow(2,Math.ceil(Math.log2(W.transforms.length/20)));var J;(J=o)>a&&(a>0&&Q._free(B),a=J,B=Q._malloc(20*a*4));const b=(g+1)/2,r=(i+1)/2,E=Math.floor(15*b)+15*Math.floor(15*r),m=A.camera,N=m.screenPointToRay(g,i);Q.HEAPF32.set(m.data.viewMatrix.buffer,F/4),Q.HEAPU32.set(W.transformIndices,U/4),Q.HEAPF32.set(W.positions,l/4),Q.HEAPF32.set(W.rotations,t/4),Q.HEAPF32.set(W.scales,d/4),Q.HEAPU32.set(c,n/4),Q.HEAPU8.set(C,V),Q.HEAPF32.set(m.position.flat(),Z/4),Q.HEAPF32.set(N.flat(),e/4),Q.HEAPF32.set(W.transforms,B/4),Q._evaluate(F,B,U,l,t,d,n,V,W.vertexCount,E,Z,e,I);const G=Q.HEAPU32[I/4];if(4294967295!==G){return W.getSplat(G)}return null}}}export{R as Camera,e as CameraData,b as Color32,E as FadeInPass,y as IntersectionTester,g as Loader,n as Matrix3,B as Matrix4,d as Object3D,N as OrbitControls,i as PLYLoader,G as Plane,Q as Quaternion,J as RenderData,r as RenderProgram,a as Scene,X as ShaderPass,h as ShaderProgram,Z as Splat,V as SplatData,A as Vector3,I as Vector4,m as WebGLRenderer}; +//# sourceMappingURL=index.js.map diff --git a/gsplat/node_modules/gsplat/dist/index.js.map b/gsplat/node_modules/gsplat/dist/index.js.map new file mode 100644 index 0000000..5a3389f --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/math/Vector3.ts","../src/math/Quaternion.ts","../src/events/EventDispatcher.ts","../src/math/Matrix4.ts","../src/events/Events.ts","../src/core/Object3D.ts","../src/math/Matrix3.ts","../src/splats/SplatData.ts","../src/splats/Splat.ts","../src/cameras/CameraData.ts","../src/math/Vector4.ts","../src/cameras/Camera.ts","../src/core/Scene.ts","../src/loaders/Loader.ts","../src/loaders/PLYLoader.ts","../src/renderers/webgl/programs/ShaderProgram.ts","../src/wasm/data.js","../src/renderers/webgl/utils/RenderData.ts","../src/math/Color32.ts","../src/renderers/webgl/programs/RenderProgram.ts","../src/renderers/webgl/passes/FadeInPass.ts","../src/renderers/WebGLRenderer.ts","../src/controls/OrbitControls.ts","../src/math/Plane.ts","../src/renderers/webgl/passes/ShaderPass.ts","../src/wasm/intersect.js","../src/renderers/webgl/utils/IntersectionTester.ts"],"sourcesContent":["import { Matrix4 } from \"./Matrix4\";\n\nclass Vector3 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n equals(v: Vector3): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector3;\n add(v: Vector3): Vector3;\n add(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x + v, this.y + v, this.z + v);\n } else {\n return new Vector3(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n }\n\n subtract(v: number): Vector3;\n subtract(v: Vector3): Vector3;\n subtract(v: number | Vector3): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x - v, this.y - v, this.z - v);\n } else {\n return new Vector3(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n }\n\n multiply(v: number): Vector3;\n multiply(v: Vector3): Vector3;\n multiply(v: Matrix4): Vector3;\n multiply(v: number | Vector3 | Matrix4): Vector3 {\n if (typeof v === \"number\") {\n return new Vector3(this.x * v, this.y * v, this.z * v);\n } else if (v instanceof Vector3) {\n return new Vector3(this.x * v.x, this.y * v.y, this.z * v.z);\n } else {\n return new Vector3(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + v.buffer[14],\n );\n }\n }\n\n cross(v: Vector3): Vector3 {\n const x = this.y * v.z - this.z * v.y;\n const y = this.z * v.x - this.x * v.z;\n const z = this.x * v.y - this.y * v.x;\n\n return new Vector3(x, y, z);\n }\n\n dot(v: Vector3): number {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n\n lerp(v: Vector3, t: number): Vector3 {\n return new Vector3(this.x + (v.x - this.x) * t, this.y + (v.y - this.y) * t, this.z + (v.z - this.z) * t);\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n\n distanceTo(v: Vector3): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2);\n }\n\n normalize(): Vector3 {\n const length = this.magnitude();\n\n return new Vector3(this.x / length, this.y / length, this.z / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z];\n }\n\n clone(): Vector3 {\n return new Vector3(this.x, this.y, this.z);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n\n static One(value: number = 1): Vector3 {\n return new Vector3(value, value, value);\n }\n}\n\nexport { Vector3 };\n","import { Matrix3 } from \"./Matrix3\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Quaternion {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 1) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(q: Quaternion): boolean {\n if (this.x !== q.x) {\n return false;\n }\n if (this.y !== q.y) {\n return false;\n }\n if (this.z !== q.z) {\n return false;\n }\n if (this.w !== q.w) {\n return false;\n }\n\n return true;\n }\n\n normalize(): Quaternion {\n const l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n return new Quaternion(this.x / l, this.y / l, this.z / l, this.w / l);\n }\n\n multiply(q: Quaternion): Quaternion {\n const w1 = this.w,\n x1 = this.x,\n y1 = this.y,\n z1 = this.z;\n const w2 = q.w,\n x2 = q.x,\n y2 = q.y,\n z2 = q.z;\n\n return new Quaternion(\n w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2,\n w1 * y2 - x1 * z2 + y1 * w2 + z1 * x2,\n w1 * z2 + x1 * y2 - y1 * x2 + z1 * w2,\n w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2,\n );\n }\n\n inverse(): Quaternion {\n const l = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n return new Quaternion(-this.x / l, -this.y / l, -this.z / l, this.w / l);\n }\n\n apply(v: Vector3): Vector3 {\n const vecQuat = new Quaternion(v.x, v.y, v.z, 0);\n const conjugate = new Quaternion(-this.x, -this.y, -this.z, this.w);\n const rotatedQuat = this.multiply(vecQuat).multiply(conjugate);\n return new Vector3(rotatedQuat.x, rotatedQuat.y, rotatedQuat.z);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Quaternion {\n return new Quaternion(this.x, this.y, this.z, this.w);\n }\n\n static FromEuler(e: Vector3): Quaternion {\n const halfX = e.x / 2;\n const halfY = e.y / 2;\n const halfZ = e.z / 2;\n const cy = Math.cos(halfY);\n const sy = Math.sin(halfY);\n const cp = Math.cos(halfX);\n const sp = Math.sin(halfX);\n const cz = Math.cos(halfZ);\n const sz = Math.sin(halfZ);\n\n const q = new Quaternion(\n cy * sp * cz + sy * cp * sz,\n sy * cp * cz - cy * sp * sz,\n cy * cp * sz - sy * sp * cz,\n cy * cp * cz + sy * sp * sz,\n );\n return q;\n }\n\n toEuler(): Vector3 {\n const sinr_cosp = 2 * (this.w * this.x + this.y * this.z);\n const cosr_cosp = 1 - 2 * (this.x * this.x + this.y * this.y);\n const x = Math.atan2(sinr_cosp, cosr_cosp);\n\n let y;\n const sinp = 2 * (this.w * this.y - this.z * this.x);\n if (Math.abs(sinp) >= 1) {\n y = (Math.sign(sinp) * Math.PI) / 2;\n } else {\n y = Math.asin(sinp);\n }\n\n const siny_cosp = 2 * (this.w * this.z + this.x * this.y);\n const cosy_cosp = 1 - 2 * (this.y * this.y + this.z * this.z);\n const z = Math.atan2(siny_cosp, cosy_cosp);\n\n return new Vector3(x, y, z);\n }\n\n static FromMatrix3(matrix: Matrix3): Quaternion {\n const m = matrix.buffer;\n const trace = m[0] + m[4] + m[8];\n let x, y, z, w;\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n w = 0.25 / s;\n x = (m[7] - m[5]) * s;\n y = (m[2] - m[6]) * s;\n z = (m[3] - m[1]) * s;\n } else if (m[0] > m[4] && m[0] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[0] - m[4] - m[8]);\n w = (m[7] - m[5]) / s;\n x = 0.25 * s;\n y = (m[1] + m[3]) / s;\n z = (m[2] + m[6]) / s;\n } else if (m[4] > m[8]) {\n const s = 2.0 * Math.sqrt(1.0 + m[4] - m[0] - m[8]);\n w = (m[2] - m[6]) / s;\n x = (m[1] + m[3]) / s;\n y = 0.25 * s;\n z = (m[5] + m[7]) / s;\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m[8] - m[0] - m[4]);\n w = (m[3] - m[1]) / s;\n x = (m[2] + m[6]) / s;\n y = (m[5] + m[7]) / s;\n z = 0.25 * s;\n }\n return new Quaternion(x, y, z, w);\n }\n\n static FromAxisAngle(axis: Vector3, angle: number): Quaternion {\n const halfAngle = angle / 2;\n const sin = Math.sin(halfAngle);\n const cos = Math.cos(halfAngle);\n return new Quaternion(axis.x * sin, axis.y * sin, axis.z * sin, cos);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Quaternion };\n","class EventDispatcher {\n addEventListener: (type: string, listener: (event: Event) => void) => void;\n removeEventListener: (type: string, listener: (event: Event) => void) => void;\n hasEventListener: (type: string, listener: (event: Event) => void) => boolean;\n dispatchEvent: (event: Event) => void;\n\n constructor() {\n const listeners = new Map void>>();\n\n this.addEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n listeners.set(type, new Set());\n }\n\n listeners.get(type)!.add(listener);\n };\n\n this.removeEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return;\n }\n\n listeners.get(type)!.delete(listener);\n };\n\n this.hasEventListener = (type: string, listener: (event: Event) => void) => {\n if (!listeners.has(type)) {\n return false;\n }\n\n return listeners.get(type)!.has(listener);\n };\n\n this.dispatchEvent = (event: Event) => {\n if (!listeners.has(event.type)) {\n return;\n }\n\n for (const listener of listeners.get(event.type)!) {\n listener(event);\n }\n };\n }\n}\n\nexport { EventDispatcher };\n","import { Quaternion } from \"./Quaternion\";\nimport { Vector3 } from \"./Vector3\";\n\nclass Matrix4 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0, n14: number = 0, \n n21: number = 0, n22: number = 1, n23: number = 0, n24: number = 0, \n n31: number = 0, n32: number = 0, n33: number = 1, n34: number = 0, \n n41: number = 0, n42: number = 0, n43: number = 0, n44: number = 1) {\n this.buffer = [\n n11, n12, n13, n14, \n n21, n22, n23, n24, \n n31, n32, n33, n34, \n n41, n42, n43, n44\n ];\n }\n\n equals(m: Matrix4): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(m: Matrix4): Matrix4 {\n const a = this.buffer;\n const b = m.buffer;\n return new Matrix4(\n b[0] * a[0] + b[1] * a[4] + b[2] * a[8] + b[3] * a[12],\n b[0] * a[1] + b[1] * a[5] + b[2] * a[9] + b[3] * a[13],\n b[0] * a[2] + b[1] * a[6] + b[2] * a[10] + b[3] * a[14],\n b[0] * a[3] + b[1] * a[7] + b[2] * a[11] + b[3] * a[15],\n b[4] * a[0] + b[5] * a[4] + b[6] * a[8] + b[7] * a[12],\n b[4] * a[1] + b[5] * a[5] + b[6] * a[9] + b[7] * a[13],\n b[4] * a[2] + b[5] * a[6] + b[6] * a[10] + b[7] * a[14],\n b[4] * a[3] + b[5] * a[7] + b[6] * a[11] + b[7] * a[15],\n b[8] * a[0] + b[9] * a[4] + b[10] * a[8] + b[11] * a[12],\n b[8] * a[1] + b[9] * a[5] + b[10] * a[9] + b[11] * a[13],\n b[8] * a[2] + b[9] * a[6] + b[10] * a[10] + b[11] * a[14],\n b[8] * a[3] + b[9] * a[7] + b[10] * a[11] + b[11] * a[15],\n b[12] * a[0] + b[13] * a[4] + b[14] * a[8] + b[15] * a[12],\n b[12] * a[1] + b[13] * a[5] + b[14] * a[9] + b[15] * a[13],\n b[12] * a[2] + b[13] * a[6] + b[14] * a[10] + b[15] * a[14],\n b[12] * a[3] + b[13] * a[7] + b[14] * a[11] + b[15] * a[15],\n );\n }\n\n clone(): Matrix4 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix4(\n e[0], e[1], e[2], e[3], \n e[4], e[5], e[6], e[7], \n e[8], e[9], e[10], e[11], \n e[12], e[13], e[14], e[15]\n );\n }\n\n determinant(): number {\n const e = this.buffer;\n // prettier-ignore\n return (\n e[12] * e[9] * e[6] * e[3] - e[8] * e[13] * e[6] * e[3] - e[12] * e[5] * e[10] * e[3] + e[4] * e[13] * e[10] * e[3] +\n e[8] * e[5] * e[14] * e[3] - e[4] * e[9] * e[14] * e[3] - e[12] * e[9] * e[2] * e[7] + e[8] * e[13] * e[2] * e[7] +\n e[12] * e[1] * e[10] * e[7] - e[0] * e[13] * e[10] * e[7] - e[8] * e[1] * e[14] * e[7] + e[0] * e[9] * e[14] * e[7] +\n e[12] * e[5] * e[2] * e[11] - e[4] * e[13] * e[2] * e[11] - e[12] * e[1] * e[6] * e[11] + e[0] * e[13] * e[6] * e[11] +\n e[4] * e[1] * e[14] * e[11] - e[0] * e[5] * e[14] * e[11] - e[8] * e[5] * e[2] * e[15] + e[4] * e[9] * e[2] * e[15] +\n e[8] * e[1] * e[6] * e[15] - e[0] * e[9] * e[6] * e[15] - e[4] * e[1] * e[10] * e[15] + e[0] * e[5] * e[10] * e[15]\n );\n }\n\n invert(): Matrix4 {\n const e = this.buffer;\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible.\");\n }\n const invDet = 1 / det;\n // prettier-ignore\n return new Matrix4(\n invDet * (\n e[5] * e[10] * e[15] - e[5] * e[11] * e[14] - e[9] * e[6] * e[15] + e[9] * e[7] * e[14] + e[13] * e[6] * e[11] - e[13] * e[7] * e[10]\n ),\n invDet * (\n -e[1] * e[10] * e[15] + e[1] * e[11] * e[14] + e[9] * e[2] * e[15] - e[9] * e[3] * e[14] - e[13] * e[2] * e[11] + e[13] * e[3] * e[10]\n ),\n invDet * (\n e[1] * e[6] * e[15] - e[1] * e[7] * e[14] - e[5] * e[2] * e[15] + e[5] * e[3] * e[14] + e[13] * e[2] * e[7] - e[13] * e[3] * e[6]\n ),\n invDet * (\n -e[1] * e[6] * e[11] + e[1] * e[7] * e[10] + e[5] * e[2] * e[11] - e[5] * e[3] * e[10] - e[9] * e[2] * e[7] + e[9] * e[3] * e[6]\n ),\n invDet * (\n -e[4] * e[10] * e[15] + e[4] * e[11] * e[14] + e[8] * e[6] * e[15] - e[8] * e[7] * e[14] - e[12] * e[6] * e[11] + e[12] * e[7] * e[10]\n ),\n invDet * (\n e[0] * e[10] * e[15] - e[0] * e[11] * e[14] - e[8] * e[2] * e[15] + e[8] * e[3] * e[14] + e[12] * e[2] * e[11] - e[12] * e[3] * e[10]\n ),\n invDet * (\n -e[0] * e[6] * e[15] + e[0] * e[7] * e[14] + e[4] * e[2] * e[15] - e[4] * e[3] * e[14] - e[12] * e[2] * e[7] + e[12] * e[3] * e[6]\n ),\n invDet * (\n e[0] * e[6] * e[11] - e[0] * e[7] * e[10] - e[4] * e[2] * e[11] + e[4] * e[3] * e[10] + e[8] * e[2] * e[7] - e[8] * e[3] * e[6]\n ),\n invDet * (\n e[4] * e[9] * e[15] - e[4] * e[11] * e[13] - e[8] * e[5] * e[15] + e[8] * e[7] * e[13] + e[12] * e[5] * e[11] - e[12] * e[7] * e[9]\n ),\n invDet * (\n -e[0] * e[9] * e[15] + e[0] * e[11] * e[13] + e[8] * e[1] * e[15] - e[8] * e[3] * e[13] - e[12] * e[1] * e[11] + e[12] * e[3] * e[9]\n ),\n invDet * (\n e[0] * e[5] * e[15] - e[0] * e[7] * e[13] - e[4] * e[1] * e[15] + e[4] * e[3] * e[13] + e[12] * e[1] * e[7] - e[12] * e[3] * e[5]\n ),\n invDet * (\n -e[0] * e[5] * e[11] + e[0] * e[7] * e[9] + e[4] * e[1] * e[11] - e[4] * e[3] * e[9] - e[8] * e[1] * e[7] + e[8] * e[3] * e[5]\n ),\n invDet * (\n -e[4] * e[9] * e[14] + e[4] * e[10] * e[13] + e[8] * e[5] * e[14] - e[8] * e[6] * e[13] - e[12] * e[5] * e[10] + e[12] * e[6] * e[9]\n ),\n invDet * (\n e[0] * e[9] * e[14] - e[0] * e[10] * e[13] - e[8] * e[1] * e[14] + e[8] * e[2] * e[13] + e[12] * e[1] * e[10] - e[12] * e[2] * e[9]\n ),\n invDet * (\n -e[0] * e[5] * e[14] + e[0] * e[6] * e[13] + e[4] * e[1] * e[14] - e[4] * e[2] * e[13] - e[12] * e[1] * e[6] + e[12] * e[2] * e[5]\n ),\n invDet * (\n e[0] * e[5] * e[10] - e[0] * e[6] * e[9] - e[4] * e[1] * e[10] + e[4] * e[2] * e[9] + e[8] * e[1] * e[6] - e[8] * e[2] * e[5]\n ),\n );\n }\n\n static Compose(position: Vector3, rotation: Quaternion, scale: Vector3): Matrix4 {\n const x = rotation.x,\n y = rotation.y,\n z = rotation.z,\n w = rotation.w;\n const x2 = x + x,\n y2 = y + y,\n z2 = z + z;\n const xx = x * x2,\n xy = x * y2,\n xz = x * z2;\n const yy = y * y2,\n yz = y * z2,\n zz = z * z2;\n const wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n const sx = scale.x,\n sy = scale.y,\n sz = scale.z;\n // prettier-ignore\n return new Matrix4(\n (1 - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1 - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1 - (xx + yy)) * sz, 0,\n position.x, position.y, position.z, 1\n );\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix4 };\n","import { Object3D } from \"../core/Object3D\";\n\nclass ObjectAddedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectAdded\");\n }\n}\n\nclass ObjectRemovedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectRemoved\");\n }\n}\n\nclass ObjectChangedEvent extends Event {\n constructor(public object: Object3D) {\n super(\"objectChanged\");\n }\n}\n\nexport { ObjectAddedEvent, ObjectRemovedEvent, ObjectChangedEvent };\n","import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { ObjectChangedEvent } from \"../events/Events\";\n\nabstract class Object3D extends EventDispatcher {\n public positionChanged: boolean = false;\n public rotationChanged: boolean = false;\n public scaleChanged: boolean = false;\n\n protected _position: Vector3 = new Vector3();\n protected _rotation: Quaternion = new Quaternion();\n protected _scale: Vector3 = new Vector3(1, 1, 1);\n protected _transform: Matrix4 = new Matrix4();\n\n protected _changeEvent = new ObjectChangedEvent(this);\n\n update: () => void;\n applyPosition: () => void;\n applyRotation: () => void;\n applyScale: () => void;\n\n constructor() {\n super();\n\n this.update = () => {};\n\n this.applyPosition = () => {\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n protected _updateMatrix() {\n this._transform = Matrix4.Compose(this._position, this._rotation, this._scale);\n }\n\n get position() {\n return this._position;\n }\n\n set position(position: Vector3) {\n if (!this._position.equals(position)) {\n this._position = position;\n this.positionChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get rotation() {\n return this._rotation;\n }\n\n set rotation(rotation: Quaternion) {\n if (!this._rotation.equals(rotation)) {\n this._rotation = rotation;\n this.rotationChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get scale() {\n return this._scale;\n }\n\n set scale(scale: Vector3) {\n if (!this._scale.equals(scale)) {\n this._scale = scale;\n this.scaleChanged = true;\n this._updateMatrix();\n this.dispatchEvent(this._changeEvent);\n }\n }\n\n get forward() {\n let forward = new Vector3(0, 0, 1);\n forward = this.rotation.apply(forward);\n return forward;\n }\n\n get transform() {\n return this._transform;\n }\n}\n\nexport { Object3D };\n","import { Quaternion } from \"./Quaternion\";\nimport type { Vector3 } from \"./Vector3\";\n\nclass Matrix3 {\n public readonly buffer: number[];\n\n // prettier-ignore\n constructor(n11: number = 1, n12: number = 0, n13: number = 0,\n n21: number = 0, n22: number = 1, n23: number = 0,\n n31: number = 0, n32: number = 0, n33: number = 1) {\n this.buffer = [\n n11, n12, n13,\n n21, n22, n23,\n n31, n32, n33\n ];\n }\n\n equals(m: Matrix3): boolean {\n if (this.buffer.length !== m.buffer.length) {\n return false;\n }\n if (this.buffer === m.buffer) {\n return true;\n }\n for (let i = 0; i < this.buffer.length; i++) {\n if (this.buffer[i] !== m.buffer[i]) {\n return false;\n }\n }\n return true;\n }\n\n multiply(v: Matrix3): Matrix3 {\n const a = this.buffer;\n const b = v.buffer;\n return new Matrix3(\n b[0] * a[0] + b[3] * a[1] + b[6] * a[2],\n b[1] * a[0] + b[4] * a[1] + b[7] * a[2],\n b[2] * a[0] + b[5] * a[1] + b[8] * a[2],\n b[0] * a[3] + b[3] * a[4] + b[6] * a[5],\n b[1] * a[3] + b[4] * a[4] + b[7] * a[5],\n b[2] * a[3] + b[5] * a[4] + b[8] * a[5],\n b[0] * a[6] + b[3] * a[7] + b[6] * a[8],\n b[1] * a[6] + b[4] * a[7] + b[7] * a[8],\n b[2] * a[6] + b[5] * a[7] + b[8] * a[8],\n );\n }\n\n clone(): Matrix3 {\n const e = this.buffer;\n // prettier-ignore\n return new Matrix3(\n e[0], e[1], e[2],\n e[3], e[4], e[5],\n e[6], e[7], e[8]\n );\n }\n\n static Eye(v: number = 1): Matrix3 {\n return new Matrix3(v, 0, 0, 0, v, 0, 0, 0, v);\n }\n\n static Diagonal(v: Vector3): Matrix3 {\n return new Matrix3(v.x, 0, 0, 0, v.y, 0, 0, 0, v.z);\n }\n\n static RotationFromQuaternion(q: Quaternion): Matrix3 {\n const matrix = new Matrix3(\n 1 - 2 * q.y * q.y - 2 * q.z * q.z,\n 2 * q.x * q.y - 2 * q.z * q.w,\n 2 * q.x * q.z + 2 * q.y * q.w,\n 2 * q.x * q.y + 2 * q.z * q.w,\n 1 - 2 * q.x * q.x - 2 * q.z * q.z,\n 2 * q.y * q.z - 2 * q.x * q.w,\n 2 * q.x * q.z - 2 * q.y * q.w,\n 2 * q.y * q.z + 2 * q.x * q.w,\n 1 - 2 * q.x * q.x - 2 * q.y * q.y,\n );\n return matrix;\n }\n\n static RotationFromEuler(m: Vector3): Matrix3 {\n const cx = Math.cos(m.x);\n const sx = Math.sin(m.x);\n const cy = Math.cos(m.y);\n const sy = Math.sin(m.y);\n const cz = Math.cos(m.z);\n const sz = Math.sin(m.z);\n\n const rotationMatrix = [\n cy * cz + sy * sx * sz,\n -cy * sz + sy * sx * cz,\n sy * cx,\n cx * sz,\n cx * cz,\n -sx,\n -sy * cz + cy * sx * sz,\n sy * sz + cy * sx * cz,\n cy * cx,\n ];\n\n return new Matrix3(...rotationMatrix);\n }\n\n toString(): string {\n return `[${this.buffer.join(\", \")}]`;\n }\n}\n\nexport { Matrix3 };\n","import { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\n\nclass SplatData {\n static RowLength = 3 * 4 + 3 * 4 + 4 + 4;\n\n public changed = false;\n public detached = false;\n\n private _vertexCount: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _colors: Uint8Array;\n private _selection: Uint8Array;\n\n translate: (translation: Vector3) => void;\n rotate: (rotation: Quaternion) => void;\n scale: (scale: Vector3) => void;\n serialize: () => Uint8Array;\n reattach: (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => void;\n\n constructor(\n vertexCount: number = 0,\n positions: Float32Array | null = null,\n rotations: Float32Array | null = null,\n scales: Float32Array | null = null,\n colors: Uint8Array | null = null,\n ) {\n this._vertexCount = vertexCount;\n this._positions = positions || new Float32Array(0);\n this._rotations = rotations || new Float32Array(0);\n this._scales = scales || new Float32Array(0);\n this._colors = colors || new Uint8Array(0);\n this._selection = new Uint8Array(this.vertexCount);\n\n this.translate = (translation: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] += translation.x;\n this.positions[3 * i + 1] += translation.y;\n this.positions[3 * i + 2] += translation.z;\n }\n\n this.changed = true;\n };\n\n this.rotate = (rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n for (let i = 0; i < this.vertexCount; i++) {\n const x = this.positions[3 * i + 0];\n const y = this.positions[3 * i + 1];\n const z = this.positions[3 * i + 2];\n\n this.positions[3 * i + 0] = R[0] * x + R[1] * y + R[2] * z;\n this.positions[3 * i + 1] = R[3] * x + R[4] * y + R[5] * z;\n this.positions[3 * i + 2] = R[6] * x + R[7] * y + R[8] * z;\n\n const currentRotation = new Quaternion(\n this.rotations[4 * i + 1],\n this.rotations[4 * i + 2],\n this.rotations[4 * i + 3],\n this.rotations[4 * i + 0],\n );\n\n const newRot = rotation.multiply(currentRotation);\n this.rotations[4 * i + 1] = newRot.x;\n this.rotations[4 * i + 2] = newRot.y;\n this.rotations[4 * i + 3] = newRot.z;\n this.rotations[4 * i + 0] = newRot.w;\n }\n\n this.changed = true;\n };\n\n this.scale = (scale: Vector3) => {\n for (let i = 0; i < this.vertexCount; i++) {\n this.positions[3 * i + 0] *= scale.x;\n this.positions[3 * i + 1] *= scale.y;\n this.positions[3 * i + 2] *= scale.z;\n\n this.scales[3 * i + 0] *= scale.x;\n this.scales[3 * i + 1] *= scale.y;\n this.scales[3 * i + 2] *= scale.z;\n }\n\n this.changed = true;\n };\n\n this.serialize = () => {\n const data = new Uint8Array(this.vertexCount * SplatData.RowLength);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < this.vertexCount; i++) {\n f_buffer[8 * i + 0] = this.positions[3 * i + 0];\n f_buffer[8 * i + 1] = this.positions[3 * i + 1];\n f_buffer[8 * i + 2] = this.positions[3 * i + 2];\n\n u_buffer[32 * i + 24 + 0] = this.colors[4 * i + 0];\n u_buffer[32 * i + 24 + 1] = this.colors[4 * i + 1];\n u_buffer[32 * i + 24 + 2] = this.colors[4 * i + 2];\n u_buffer[32 * i + 24 + 3] = this.colors[4 * i + 3];\n\n f_buffer[8 * i + 3 + 0] = this.scales[3 * i + 0];\n f_buffer[8 * i + 3 + 1] = this.scales[3 * i + 1];\n f_buffer[8 * i + 3 + 2] = this.scales[3 * i + 2];\n\n u_buffer[32 * i + 28 + 0] = (this.rotations[4 * i + 0] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 1] = (this.rotations[4 * i + 1] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 2] = (this.rotations[4 * i + 2] * 128 + 128) & 0xff;\n u_buffer[32 * i + 28 + 3] = (this.rotations[4 * i + 3] * 128 + 128) & 0xff;\n }\n\n return data;\n };\n\n this.reattach = (\n positions: ArrayBufferLike,\n rotations: ArrayBufferLike,\n scales: ArrayBufferLike,\n colors: ArrayBufferLike,\n selection: ArrayBufferLike,\n ) => {\n console.assert(\n positions.byteLength === this.vertexCount * 3 * 4,\n `Expected ${this.vertexCount * 3 * 4} bytes, got ${positions.byteLength} bytes`,\n );\n this._positions = new Float32Array(positions);\n this._rotations = new Float32Array(rotations);\n this._scales = new Float32Array(scales);\n this._colors = new Uint8Array(colors);\n this._selection = new Uint8Array(selection);\n this.detached = false;\n };\n }\n\n static Deserialize(data: Uint8Array): SplatData {\n const vertexCount = data.length / SplatData.RowLength;\n const positions = new Float32Array(3 * vertexCount);\n const rotations = new Float32Array(4 * vertexCount);\n const scales = new Float32Array(3 * vertexCount);\n const colors = new Uint8Array(4 * vertexCount);\n\n const f_buffer = new Float32Array(data.buffer);\n const u_buffer = new Uint8Array(data.buffer);\n\n for (let i = 0; i < vertexCount; i++) {\n positions[3 * i + 0] = f_buffer[8 * i + 0];\n positions[3 * i + 1] = f_buffer[8 * i + 1];\n positions[3 * i + 2] = f_buffer[8 * i + 2];\n\n rotations[4 * i + 0] = (u_buffer[32 * i + 28 + 0] - 128) / 128;\n rotations[4 * i + 1] = (u_buffer[32 * i + 28 + 1] - 128) / 128;\n rotations[4 * i + 2] = (u_buffer[32 * i + 28 + 2] - 128) / 128;\n rotations[4 * i + 3] = (u_buffer[32 * i + 28 + 3] - 128) / 128;\n\n scales[3 * i + 0] = f_buffer[8 * i + 3 + 0];\n scales[3 * i + 1] = f_buffer[8 * i + 3 + 1];\n scales[3 * i + 2] = f_buffer[8 * i + 3 + 2];\n\n colors[4 * i + 0] = u_buffer[32 * i + 24 + 0];\n colors[4 * i + 1] = u_buffer[32 * i + 24 + 1];\n colors[4 * i + 2] = u_buffer[32 * i + 24 + 2];\n colors[4 * i + 3] = u_buffer[32 * i + 24 + 3];\n }\n\n return new SplatData(vertexCount, positions, rotations, scales, colors);\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get colors() {\n return this._colors;\n }\n\n get selection() {\n return this._selection;\n }\n}\n\nexport { SplatData };\n","import { SplatData } from \"./SplatData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\n\nclass Splat extends Object3D {\n public selectedChanged: boolean = false;\n\n private _data: SplatData;\n private _selected: boolean = false;\n\n constructor(splat: SplatData | undefined = undefined) {\n super();\n\n this._data = splat || new SplatData();\n\n this.applyPosition = () => {\n this.data.translate(this.position);\n this.position = new Vector3();\n };\n\n this.applyRotation = () => {\n this.data.rotate(this.rotation);\n this.rotation = new Quaternion();\n };\n\n this.applyScale = () => {\n this.data.scale(this.scale);\n this.scale = new Vector3(1, 1, 1);\n };\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `splat-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n this.applyRotation();\n this.applyScale();\n this.applyPosition();\n\n const buffer = this.data.serialize();\n const blob = new Blob([buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get data() {\n return this._data;\n }\n\n get selected() {\n return this._selected;\n }\n\n set selected(selected: boolean) {\n if (this._selected !== selected) {\n this._selected = selected;\n this.selectedChanged = true;\n this.dispatchEvent(this._changeEvent);\n }\n }\n}\n\nexport { Splat };\n","import { Quaternion } from \"../math/Quaternion\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Matrix4 } from \"../math/Matrix4\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass CameraData {\n private _fx: number = 1132;\n private _fy: number = 1132;\n private _near: number = 0.1;\n private _far: number = 100;\n\n private _width: number = 512;\n private _height: number = 512;\n\n private _projectionMatrix: Matrix4 = new Matrix4();\n private _viewMatrix: Matrix4 = new Matrix4();\n private _viewProj: Matrix4 = new Matrix4();\n\n update: (position: Vector3, rotation: Quaternion) => void;\n setSize: (width: number, height: number) => void;\n\n private _updateProjectionMatrix: () => void;\n\n constructor() {\n this._updateProjectionMatrix = () => {\n // prettier-ignore\n this._projectionMatrix = new Matrix4(\n 2 * this.fx / this.width, 0, 0, 0,\n 0, -2 * this.fy / this.height, 0, 0,\n 0, 0, this.far / (this.far - this.near), 1,\n 0, 0, -(this.far * this.near) / (this.far - this.near), 0\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.update = (position: Vector3, rotation: Quaternion) => {\n const R = Matrix3.RotationFromQuaternion(rotation).buffer;\n const t = position.flat();\n\n // prettier-ignore\n this._viewMatrix = new Matrix4(\n R[0], R[1], R[2], 0,\n R[3], R[4], R[5], 0,\n R[6], R[7], R[8], 0,\n -t[0] * R[0] - t[1] * R[3] - t[2] * R[6],\n -t[0] * R[1] - t[1] * R[4] - t[2] * R[7],\n -t[0] * R[2] - t[1] * R[5] - t[2] * R[8],\n 1,\n );\n\n this._viewProj = this.projectionMatrix.multiply(this.viewMatrix);\n };\n\n this.setSize = (width: number, height: number) => {\n this._width = width;\n this._height = height;\n this._updateProjectionMatrix();\n };\n }\n\n get fx() {\n return this._fx;\n }\n\n set fx(fx: number) {\n if (this._fx !== fx) {\n this._fx = fx;\n this._updateProjectionMatrix();\n }\n }\n\n get fy() {\n return this._fy;\n }\n\n set fy(fy: number) {\n if (this._fy !== fy) {\n this._fy = fy;\n this._updateProjectionMatrix();\n }\n }\n\n get near() {\n return this._near;\n }\n\n set near(near: number) {\n if (this._near !== near) {\n this._near = near;\n this._updateProjectionMatrix();\n }\n }\n\n get far() {\n return this._far;\n }\n\n set far(far: number) {\n if (this._far !== far) {\n this._far = far;\n this._updateProjectionMatrix();\n }\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get projectionMatrix() {\n return this._projectionMatrix;\n }\n\n get viewMatrix() {\n return this._viewMatrix;\n }\n\n get viewProj() {\n return this._viewProj;\n }\n}\n\nexport { CameraData };\n","import { Matrix4 } from \"./Matrix4\";\n\nclass Vector4 {\n public readonly x: number;\n public readonly y: number;\n public readonly z: number;\n public readonly w: number;\n\n constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n\n equals(v: Vector4): boolean {\n if (this.x !== v.x) {\n return false;\n }\n if (this.y !== v.y) {\n return false;\n }\n if (this.z !== v.z) {\n return false;\n }\n if (this.w !== v.w) {\n return false;\n }\n\n return true;\n }\n\n add(v: number): Vector4;\n add(v: Vector4): Vector4;\n add(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x + v, this.y + v, this.z + v, this.w + v);\n } else {\n return new Vector4(this.x + v.x, this.y + v.y, this.z + v.z, this.w + v.w);\n }\n }\n\n subtract(v: number): Vector4;\n subtract(v: Vector4): Vector4;\n subtract(v: number | Vector4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x - v, this.y - v, this.z - v, this.w - v);\n } else {\n return new Vector4(this.x - v.x, this.y - v.y, this.z - v.z, this.w - v.w);\n }\n }\n\n multiply(v: number): Vector4;\n multiply(v: Vector4): Vector4;\n multiply(v: Matrix4): Vector4;\n multiply(v: number | Vector4 | Matrix4): Vector4 {\n if (typeof v === \"number\") {\n return new Vector4(this.x * v, this.y * v, this.z * v, this.w * v);\n } else if (v instanceof Vector4) {\n return new Vector4(this.x * v.x, this.y * v.y, this.z * v.z, this.w * v.w);\n } else {\n return new Vector4(\n this.x * v.buffer[0] + this.y * v.buffer[4] + this.z * v.buffer[8] + this.w * v.buffer[12],\n this.x * v.buffer[1] + this.y * v.buffer[5] + this.z * v.buffer[9] + this.w * v.buffer[13],\n this.x * v.buffer[2] + this.y * v.buffer[6] + this.z * v.buffer[10] + this.w * v.buffer[14],\n this.x * v.buffer[3] + this.y * v.buffer[7] + this.z * v.buffer[11] + this.w * v.buffer[15],\n );\n }\n }\n\n dot(v: Vector4): number {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n }\n\n lerp(v: Vector4, t: number): Vector4 {\n return new Vector4(\n this.x + (v.x - this.x) * t,\n this.y + (v.y - this.y) * t,\n this.z + (v.z - this.z) * t,\n this.w + (v.w - this.w) * t,\n );\n }\n\n magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n\n distanceTo(v: Vector4): number {\n return Math.sqrt((this.x - v.x) ** 2 + (this.y - v.y) ** 2 + (this.z - v.z) ** 2 + (this.w - v.w) ** 2);\n }\n\n normalize(): Vector4 {\n const length = this.magnitude();\n\n return new Vector4(this.x / length, this.y / length, this.z / length, this.w / length);\n }\n\n flat(): number[] {\n return [this.x, this.y, this.z, this.w];\n }\n\n clone(): Vector4 {\n return new Vector4(this.x, this.y, this.z, this.w);\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Vector4 };\n","import { CameraData } from \"./CameraData\";\nimport { Object3D } from \"../core/Object3D\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Vector4 } from \"../math/Vector4\";\n\nclass Camera extends Object3D {\n private _data: CameraData;\n\n screenPointToRay: (x: number, y: number) => Vector3;\n\n constructor(camera: CameraData | undefined = undefined) {\n super();\n\n this._data = camera ? camera : new CameraData();\n this._position = new Vector3(0, 0, -5);\n\n this.update = () => {\n this.data.update(this.position, this.rotation);\n };\n\n this.screenPointToRay = (x: number, y: number) => {\n const clipSpaceCoords = new Vector4(x, y, -1, 1);\n const inverseProjectionMatrix = this._data.projectionMatrix.invert();\n const cameraSpaceCoords = clipSpaceCoords.multiply(inverseProjectionMatrix);\n const inverseViewMatrix = this._data.viewMatrix.invert();\n const worldSpaceCoords = cameraSpaceCoords.multiply(inverseViewMatrix);\n const worldSpacePosition = new Vector3(\n worldSpaceCoords.x / worldSpaceCoords.w,\n worldSpaceCoords.y / worldSpaceCoords.w,\n worldSpaceCoords.z / worldSpaceCoords.w,\n );\n const direction = worldSpacePosition.subtract(this.position).normalize();\n return direction;\n };\n }\n\n get data() {\n return this._data;\n }\n}\n\nexport { Camera };\n","import { Object3D } from \"./Object3D\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\nimport { EventDispatcher } from \"../events/EventDispatcher\";\nimport { ObjectAddedEvent, ObjectRemovedEvent } from \"../events/Events\";\n\nclass Scene extends EventDispatcher {\n private _objects: Object3D[] = [];\n\n addObject: (object: Object3D) => void;\n removeObject: (object: Object3D) => void;\n findObject: (predicate: (object: Object3D) => boolean) => Object3D | undefined;\n findObjectOfType: (type: { new (): T }) => T | undefined;\n reset: () => void;\n\n constructor() {\n super();\n\n this.addObject = (object: Object3D) => {\n this.objects.push(object);\n this.dispatchEvent(new ObjectAddedEvent(object));\n };\n\n this.removeObject = (object: Object3D) => {\n const index = this.objects.indexOf(object);\n if (index < 0) {\n throw new Error(\"Object not found in scene\");\n }\n this.objects.splice(index, 1);\n this.dispatchEvent(new ObjectRemovedEvent(object));\n };\n\n this.findObject = (predicate: (object: Object3D) => boolean) => {\n for (const object of this.objects) {\n if (predicate(object)) {\n return object;\n }\n }\n return undefined;\n };\n\n this.findObjectOfType = (type: { new (): T }) => {\n for (const object of this.objects) {\n if (object instanceof type) {\n return object;\n }\n }\n return undefined;\n };\n\n this.reset = () => {\n const objectsToRemove = this.objects.slice();\n for (const object of objectsToRemove) {\n this.removeObject(object);\n }\n };\n\n this.reset();\n }\n\n saveToFile(name: string | null = null) {\n if (!document) return;\n\n if (!name) {\n const now = new Date();\n name = `scene-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.splat`;\n }\n\n const buffers: Uint8Array[] = [];\n let vertexCount = 0;\n\n for (const object of this.objects) {\n object.applyRotation();\n object.applyScale();\n object.applyPosition();\n if (object instanceof Splat) {\n const buffer = object.data.serialize();\n buffers.push(buffer);\n vertexCount += object.data.vertexCount;\n }\n }\n\n const data = new Uint8Array(vertexCount * SplatData.RowLength);\n let offset = 0;\n for (const buffer of buffers) {\n data.set(buffer, offset);\n offset += buffer.length;\n }\n\n const blob = new Blob([data.buffer], { type: \"application/octet-stream\" });\n const link = document.createElement(\"a\");\n link.download = name;\n link.href = URL.createObjectURL(blob);\n link.click();\n }\n\n get objects() {\n return this._objects;\n }\n}\n\nexport { Scene };\n","import type { Scene } from \"../core/Scene\";\nimport { Splat } from \"../splats/Splat\";\nimport { SplatData } from \"../splats/SplatData\";\n\nclass Loader {\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const buffer = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(file: File, scene: Scene, onProgress?: (progress: number) => void): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(e.target!.result as ArrayBuffer);\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n}\n\nexport { Loader };\n","import { Scene } from \"../core/Scene\";\nimport { Vector3 } from \"../math/Vector3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { SplatData } from \"../splats/SplatData\";\nimport { Splat } from \"../splats/Splat\";\n\nclass PLYLoader {\n static SH_C0 = 0.28209479177387814;\n\n static async LoadAsync(\n url: string,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n useCache: boolean = false,\n ): Promise {\n const req = await fetch(url, {\n mode: \"cors\",\n credentials: \"omit\",\n cache: useCache ? \"force-cache\" : \"default\",\n });\n\n if (req.status != 200) {\n throw new Error(req.status + \" Unable to load \" + req.url);\n }\n\n const reader = req.body!.getReader();\n const contentLength = parseInt(req.headers.get(\"content-length\") as string);\n const plyData = new Uint8Array(contentLength);\n\n let bytesRead = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n plyData.set(value, bytesRead);\n bytesRead += value.length;\n\n onProgress?.(bytesRead / contentLength);\n }\n\n if (plyData[0] !== 112 || plyData[1] !== 108 || plyData[2] !== 121 || plyData[3] !== 10) {\n throw new Error(\"Invalid PLY file\");\n }\n\n const buffer = new Uint8Array(this._ParsePLYBuffer(plyData.buffer, format));\n const data = SplatData.Deserialize(buffer);\n const splat = new Splat(data);\n scene.addObject(splat);\n return splat;\n }\n\n static async LoadFromFileAsync(\n file: File,\n scene: Scene,\n onProgress?: (progress: number) => void,\n format: string = \"\",\n ): Promise {\n const reader = new FileReader();\n let splat = new Splat();\n reader.onload = (e) => {\n const buffer = new Uint8Array(this._ParsePLYBuffer(e.target!.result as ArrayBuffer, format));\n const data = SplatData.Deserialize(buffer);\n splat = new Splat(data);\n scene.addObject(splat);\n };\n reader.onprogress = (e) => {\n onProgress?.(e.loaded / e.total);\n };\n reader.readAsArrayBuffer(file);\n await new Promise((resolve) => {\n reader.onloadend = () => {\n resolve();\n };\n });\n return splat;\n }\n\n private static _ParsePLYBuffer(inputBuffer: ArrayBuffer, format: string): ArrayBuffer {\n type PlyProperty = {\n name: string;\n type: string;\n offset: number;\n };\n\n const ubuf = new Uint8Array(inputBuffer);\n const headerText = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));\n const header_end = \"end_header\\n\";\n const header_end_index = headerText.indexOf(header_end);\n if (header_end_index < 0) throw new Error(\"Unable to read .ply file header\");\n\n const vertexCount = parseInt(/element vertex (\\d+)\\n/.exec(headerText)![1]);\n\n let rowOffset = 0;\n const offsets: Record = {\n double: 8,\n int: 4,\n uint: 4,\n float: 4,\n short: 2,\n ushort: 2,\n uchar: 1,\n };\n\n const properties: PlyProperty[] = [];\n for (const prop of headerText\n .slice(0, header_end_index)\n .split(\"\\n\")\n .filter((k) => k.startsWith(\"property \"))) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_p, type, name] = prop.split(\" \");\n properties.push({ name, type, offset: rowOffset });\n if (!offsets[type]) throw new Error(`Unsupported property type: ${type}`);\n rowOffset += offsets[type];\n }\n\n const dataView = new DataView(inputBuffer, header_end_index + header_end.length);\n const buffer = new ArrayBuffer(SplatData.RowLength * vertexCount);\n\n const q_polycam = Quaternion.FromEuler(new Vector3(Math.PI / 2, 0, 0));\n\n for (let i = 0; i < vertexCount; i++) {\n const position = new Float32Array(buffer, i * SplatData.RowLength, 3);\n const scale = new Float32Array(buffer, i * SplatData.RowLength + 12, 3);\n const rgba = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 24, 4);\n const rot = new Uint8ClampedArray(buffer, i * SplatData.RowLength + 28, 4);\n\n let r0: number = 255;\n let r1: number = 0;\n let r2: number = 0;\n let r3: number = 0;\n\n properties.forEach((property) => {\n let value;\n switch (property.type) {\n case \"float\":\n value = dataView.getFloat32(property.offset + i * rowOffset, true);\n break;\n case \"int\":\n value = dataView.getInt32(property.offset + i * rowOffset, true);\n break;\n default:\n throw new Error(`Unsupported property type: ${property.type}`);\n }\n\n switch (property.name) {\n case \"x\":\n position[0] = value;\n break;\n case \"y\":\n position[1] = value;\n break;\n case \"z\":\n position[2] = value;\n break;\n case \"scale_0\":\n scale[0] = Math.exp(value);\n break;\n case \"scale_1\":\n scale[1] = Math.exp(value);\n break;\n case \"scale_2\":\n scale[2] = Math.exp(value);\n break;\n case \"red\":\n rgba[0] = value;\n break;\n case \"green\":\n rgba[1] = value;\n break;\n case \"blue\":\n rgba[2] = value;\n break;\n case \"f_dc_0\":\n rgba[0] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_1\":\n rgba[1] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_2\":\n rgba[2] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"f_dc_3\":\n rgba[3] = (0.5 + this.SH_C0 * value) * 255;\n break;\n case \"opacity\":\n rgba[3] = (1 / (1 + Math.exp(-value))) * 255;\n break;\n case \"rot_0\":\n r0 = value;\n break;\n case \"rot_1\":\n r1 = value;\n break;\n case \"rot_2\":\n r2 = value;\n break;\n case \"rot_3\":\n r3 = value;\n break;\n }\n });\n\n let q = new Quaternion(r1, r2, r3, r0);\n\n switch (format) {\n case \"polycam\": {\n const temp = position[1];\n position[1] = -position[2];\n position[2] = temp;\n q = q_polycam.multiply(q);\n break;\n }\n case \"\":\n break;\n default:\n throw new Error(`Unsupported format: ${format}`);\n }\n\n q = q.normalize();\n rot[0] = q.w * 128 + 128;\n rot[1] = q.x * 128 + 128;\n rot[2] = q.y * 128 + 128;\n rot[3] = q.z * 128 + 128;\n }\n\n return buffer;\n }\n}\n\nexport { PLYLoader };\n","import { Camera } from \"../../../cameras/Camera\";\nimport { Scene } from \"../../../core/Scene\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\n\nabstract class ShaderProgram {\n private _renderer: WebGLRenderer;\n private _program: WebGLProgram;\n private _passes: ShaderPass[];\n\n protected _scene: Scene | null = null;\n protected _camera: Camera | null = null;\n protected _started: boolean = false;\n protected _initialized: boolean = false;\n\n protected abstract _initialize: () => void;\n protected abstract _resize: () => void;\n protected abstract _render: () => void;\n protected abstract _dispose: () => void;\n\n initialize: () => void;\n resize: () => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n this._renderer = renderer;\n const gl = renderer.gl;\n\n this._program = gl.createProgram() as WebGLProgram;\n this._passes = passes || [];\n\n const vertexShader = gl.createShader(gl.VERTEX_SHADER) as WebGLShader;\n gl.shaderSource(vertexShader, this._getVertexSource());\n gl.compileShader(vertexShader);\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(vertexShader));\n }\n\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER) as WebGLShader;\n gl.shaderSource(fragmentShader, this._getFragmentSource());\n gl.compileShader(fragmentShader);\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n console.error(gl.getShaderInfoLog(fragmentShader));\n }\n\n gl.attachShader(this.program, vertexShader);\n gl.attachShader(this.program, fragmentShader);\n gl.linkProgram(this.program);\n if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {\n console.error(gl.getProgramInfoLog(this.program));\n }\n\n this.resize = () => {\n gl.useProgram(this._program);\n\n this._resize();\n };\n\n this.initialize = () => {\n console.assert(!this._initialized, \"ShaderProgram already initialized\");\n\n gl.useProgram(this._program);\n\n this._initialize();\n for (const pass of this.passes) {\n pass.initialize(this);\n }\n\n this._initialized = true;\n this._started = true;\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n gl.useProgram(this._program);\n\n if (this._scene !== scene || this._camera !== camera) {\n this.dispose();\n this._scene = scene;\n this._camera = camera;\n this.initialize();\n }\n\n for (const pass of this.passes) {\n pass.render();\n }\n\n this._render();\n };\n\n this.dispose = () => {\n if (!this._initialized) return;\n\n gl.useProgram(this._program);\n\n for (const pass of this.passes) {\n pass.dispose();\n }\n\n this._dispose();\n\n this._scene = null;\n this._camera = null;\n this._initialized = false;\n };\n }\n\n get renderer() {\n return this._renderer;\n }\n\n get scene() {\n return this._scene;\n }\n\n get camera() {\n return this._camera;\n }\n\n get program() {\n return this._program;\n }\n\n get passes() {\n return this._passes;\n }\n\n get started() {\n return this._started;\n }\n\n protected abstract _getVertexSource(): string;\n protected abstract _getFragmentSource(): string;\n}\n\nexport { ShaderProgram };\n","\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUNAwMCAgAADgYGBQQFAXABEBAFBwEBgAKAgAIGCAF/AUHAngQLBxkGAWsCAAFsAA4BbQAZAW4BAAFvABgBcAAPCRUBAEEBCw8RIw0WFiINIRocHw0bHR4K6VAacQEBfyACRQRAIAAoAgQgASgCBEYPCyAAIAFGBEBBAQ8LAkAgACgCBCICLQAAIgBFIAAgASgCBCIBLQAAIgNHcg0AA0AgAS0AASEDIAItAAEiAEUNASABQQFqIQEgAkEBaiECIAAgA0YNAAsLIAAgA0YLTwECf0G4GigCACIBIABBB2pBeHEiAmohAAJAIAJBACAAIAFNG0UEQCAAPwBBEHRNDQEgABAGDQELQcgaQTA2AgBBfw8LQbgaIAA2AgAgAQsOACAAEBcgARAXQRB0cgsGACAAEA8LKQBBwBpBATYCAEHEGkEANgIAEBFBxBpBvBooAgA2AgBBvBpBwBo2AgAL0gsBB38CQCAARQ0AIABBCGsiAiAAQQRrKAIAIgFBeHEiAGohBQJAIAFBAXENACABQQJxRQ0BIAIgAigCACIBayICQdwaKAIASQ0BI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c190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _pack=Module[\"_pack\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)=>(_pack=Module[\"_pack\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;","import { Scene } from \"../../../core/Scene\";\nimport { Splat } from \"../../../splats/Splat\";\nimport DataWorker from \"web-worker:./DataWorker.ts\";\nimport loadWasm from \"../../../wasm/data\";\n\nclass RenderData {\n public dataChanged = false;\n public transformsChanged = false;\n\n private _splatIndices: Map;\n private _offsets: Map;\n private _data: Uint32Array;\n private _width: number;\n private _height: number;\n private _transforms: Float32Array;\n private _transformsWidth: number;\n private _transformsHeight: number;\n private _transformIndices: Uint32Array;\n private _transformIndicesWidth: number;\n private _transformIndicesHeight: number;\n private _positions: Float32Array;\n private _rotations: Float32Array;\n private _scales: Float32Array;\n private _vertexCount: number;\n private _updating: Set = new Set();\n private _dirty: Set = new Set();\n private _worker: Worker;\n\n getSplat: (index: number) => Splat | null;\n getLocalIndex: (splat: Splat, index: number) => number;\n markDirty: (splat: Splat) => void;\n rebuild: () => void;\n dispose: () => void;\n\n constructor(scene: Scene) {\n let vertexCount = 0;\n let splatIndex = 0;\n this._splatIndices = new Map();\n this._offsets = new Map();\n const lookup = new Map();\n for (const object of scene.objects) {\n if (object instanceof Splat) {\n this._splatIndices.set(object, splatIndex);\n this._offsets.set(object, vertexCount);\n lookup.set(vertexCount, object);\n vertexCount += object.data.vertexCount;\n splatIndex++;\n }\n }\n\n this._vertexCount = vertexCount;\n this._width = 2048;\n this._height = Math.ceil((2 * this.vertexCount) / this.width);\n this._data = new Uint32Array(this.width * this.height * 4);\n\n this._transformsWidth = 5;\n this._transformsHeight = lookup.size;\n this._transforms = new Float32Array(this._transformsWidth * this._transformsHeight * 4);\n\n this._transformIndicesWidth = 1024;\n this._transformIndicesHeight = Math.ceil(this.vertexCount / this._transformIndicesWidth);\n this._transformIndices = new Uint32Array(this._transformIndicesWidth * this._transformIndicesHeight);\n\n this._positions = new Float32Array(this.vertexCount * 3);\n this._rotations = new Float32Array(this.vertexCount * 4);\n this._scales = new Float32Array(this.vertexCount * 3);\n\n this._worker = new DataWorker();\n\n const updateTransform = (splat: Splat) => {\n const splatIndex = this._splatIndices.get(splat) as number;\n this._transforms.set(splat.transform.buffer, splatIndex * 20);\n this._transforms[splatIndex * 20 + 16] = splat.selected ? 1 : 0;\n splat.positionChanged = false;\n splat.rotationChanged = false;\n splat.scaleChanged = false;\n splat.selectedChanged = false;\n this.transformsChanged = true;\n };\n\n this._worker.onmessage = (e) => {\n if (e.data.response) {\n const response = e.data.response;\n const splat = lookup.get(response.offset) as Splat;\n updateTransform(splat);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[response.offset + i] = splatIndex;\n }\n\n this._data.set(response.data, response.offset * 8);\n splat.data.reattach(\n response.positions,\n response.rotations,\n response.scales,\n response.colors,\n response.selection,\n );\n\n this._positions.set(response.worldPositions, response.offset * 3);\n this._rotations.set(response.worldRotations, response.offset * 4);\n this._scales.set(response.worldScales, response.offset * 3);\n\n this._updating.delete(splat);\n\n splat.selectedChanged = false;\n\n this.dataChanged = true;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n async function initWasm() {\n wasmModule = await loadWasm();\n }\n\n initWasm();\n\n async function waitForWasm() {\n while (!wasmModule) {\n await new Promise((resolve) => setTimeout(resolve, 0));\n }\n }\n\n const buildImmediate = (splat: Splat) => {\n if (!wasmModule) {\n waitForWasm().then(() => {\n buildImmediate(splat);\n });\n return;\n }\n\n updateTransform(splat);\n\n const positionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const rotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const scalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const colorsPtr = wasmModule._malloc(4 * splat.data.vertexCount);\n const selectionPtr = wasmModule._malloc(splat.data.vertexCount);\n const dataPtr = wasmModule._malloc(8 * splat.data.vertexCount * 4);\n const worldPositionsPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n const worldRotationsPtr = wasmModule._malloc(4 * splat.data.vertexCount * 4);\n const worldScalesPtr = wasmModule._malloc(3 * splat.data.vertexCount * 4);\n\n wasmModule.HEAPF32.set(splat.data.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(splat.data.scales, scalesPtr / 4);\n wasmModule.HEAPU8.set(splat.data.colors, colorsPtr);\n wasmModule.HEAPU8.set(splat.data.selection, selectionPtr);\n\n wasmModule._pack(\n splat.selected,\n splat.data.vertexCount,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n colorsPtr,\n selectionPtr,\n dataPtr,\n worldPositionsPtr,\n worldRotationsPtr,\n worldScalesPtr,\n );\n\n const outData = new Uint32Array(wasmModule.HEAPU32.buffer, dataPtr, splat.data.vertexCount * 8);\n const worldPositions = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldPositionsPtr,\n splat.data.vertexCount * 3,\n );\n const worldRotations = new Float32Array(\n wasmModule.HEAPF32.buffer,\n worldRotationsPtr,\n splat.data.vertexCount * 4,\n );\n const worldScales = new Float32Array(wasmModule.HEAPF32.buffer, worldScalesPtr, splat.data.vertexCount * 3);\n\n const splatIndex = this._splatIndices.get(splat) as number;\n const offset = this._offsets.get(splat) as number;\n for (let i = 0; i < splat.data.vertexCount; i++) {\n this._transformIndices[offset + i] = splatIndex;\n }\n this._data.set(outData, offset * 8);\n this._positions.set(worldPositions, offset * 3);\n this._rotations.set(worldRotations, offset * 4);\n this._scales.set(worldScales, offset * 3);\n\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(colorsPtr);\n wasmModule._free(selectionPtr);\n wasmModule._free(dataPtr);\n wasmModule._free(worldPositionsPtr);\n wasmModule._free(worldRotationsPtr);\n wasmModule._free(worldScalesPtr);\n\n this.dataChanged = true;\n };\n\n const build = (splat: Splat) => {\n if (splat.positionChanged || splat.rotationChanged || splat.scaleChanged || splat.selectedChanged) {\n updateTransform(splat);\n }\n\n if (!splat.data.changed || splat.data.detached) return;\n\n const serializedSplat = {\n position: new Float32Array(splat.position.flat()),\n rotation: new Float32Array(splat.rotation.flat()),\n scale: new Float32Array(splat.scale.flat()),\n selected: splat.selected,\n vertexCount: splat.data.vertexCount,\n positions: splat.data.positions,\n rotations: splat.data.rotations,\n scales: splat.data.scales,\n colors: splat.data.colors,\n selection: splat.data.selection,\n offset: this._offsets.get(splat) as number,\n };\n\n this._worker.postMessage(\n {\n splat: serializedSplat,\n },\n [\n serializedSplat.position.buffer,\n serializedSplat.rotation.buffer,\n serializedSplat.scale.buffer,\n serializedSplat.positions.buffer,\n serializedSplat.rotations.buffer,\n serializedSplat.scales.buffer,\n serializedSplat.colors.buffer,\n serializedSplat.selection.buffer,\n ],\n );\n\n this._updating.add(splat);\n\n splat.data.detached = true;\n };\n\n this.getSplat = (index: number) => {\n let splat = null;\n for (const [key, value] of this._offsets) {\n if (index >= value) {\n splat = key;\n } else {\n break;\n }\n }\n return splat;\n };\n\n this.getLocalIndex = (splat: Splat, index: number) => {\n const offset = this._offsets.get(splat) as number;\n return index - offset;\n };\n\n this.markDirty = (splat: Splat) => {\n this._dirty.add(splat);\n };\n\n this.rebuild = () => {\n for (const splat of this._dirty) {\n build(splat);\n }\n\n this._dirty.clear();\n };\n\n this.dispose = () => {\n this._worker.terminate();\n };\n\n for (const splat of this._splatIndices.keys()) {\n buildImmediate(splat);\n }\n }\n\n get offsets() {\n return this._offsets;\n }\n\n get data() {\n return this._data;\n }\n\n get width() {\n return this._width;\n }\n\n get height() {\n return this._height;\n }\n\n get transforms() {\n return this._transforms;\n }\n\n get transformsWidth() {\n return this._transformsWidth;\n }\n\n get transformsHeight() {\n return this._transformsHeight;\n }\n\n get transformIndices() {\n return this._transformIndices;\n }\n\n get transformIndicesWidth() {\n return this._transformIndicesWidth;\n }\n\n get transformIndicesHeight() {\n return this._transformIndicesHeight;\n }\n\n get positions() {\n return this._positions;\n }\n\n get rotations() {\n return this._rotations;\n }\n\n get scales() {\n return this._scales;\n }\n\n get vertexCount() {\n return this._vertexCount;\n }\n\n get needsRebuild() {\n return this._dirty.size > 0;\n }\n\n get updating() {\n return this._updating.size > 0;\n }\n}\n\nexport { RenderData };\n","class Color32 {\n public readonly r: number;\n public readonly g: number;\n public readonly b: number;\n public readonly a: number;\n\n constructor(r: number = 0, g: number = 0, b: number = 0, a: number = 255) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n flat(): number[] {\n return [this.r, this.g, this.b, this.a];\n }\n\n flatNorm(): number[] {\n return [this.r / 255, this.g / 255, this.b / 255, this.a / 255];\n }\n\n toHexString(): string {\n return (\n \"#\" +\n this.flat()\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n );\n }\n\n toString(): string {\n return `[${this.flat().join(\", \")}]`;\n }\n}\n\nexport { Color32 };\n","import SortWorker from \"web-worker:../utils/SortWorker.ts\";\n\nimport { ShaderProgram } from \"./ShaderProgram\";\nimport { ShaderPass } from \"../passes/ShaderPass\";\nimport { RenderData } from \"../utils/RenderData\";\nimport { Color32 } from \"../../../math/Color32\";\nimport { ObjectAddedEvent, ObjectChangedEvent, ObjectRemovedEvent } from \"../../../events/Events\";\nimport { Splat } from \"../../../splats/Splat\";\nimport { WebGLRenderer } from \"../../WebGLRenderer\";\n\nconst vertexShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform highp usampler2D u_texture;\nuniform highp sampler2D u_transforms;\nuniform highp usampler2D u_transformIndices;\nuniform mat4 projection, view;\nuniform vec2 focal;\nuniform vec2 viewport;\n\nuniform bool useDepthFade;\nuniform float depthFade;\n\nin vec2 position;\nin int index;\n\nout vec4 vColor;\nout vec2 vPosition;\nout float vSize;\nout float vSelected;\n\nvoid main () {\n uvec4 cen = texelFetch(u_texture, ivec2((uint(index) & 0x3ffu) << 1, uint(index) >> 10), 0);\n float selected = float((cen.w >> 24) & 0xffu);\n\n uint transformIndex = texelFetch(u_transformIndices, ivec2(uint(index) & 0x3ffu, uint(index) >> 10), 0).x;\n mat4 transform = mat4(\n texelFetch(u_transforms, ivec2(0, transformIndex), 0),\n texelFetch(u_transforms, ivec2(1, transformIndex), 0),\n texelFetch(u_transforms, ivec2(2, transformIndex), 0),\n texelFetch(u_transforms, ivec2(3, transformIndex), 0)\n );\n\n if (selected < 0.5) {\n selected = texelFetch(u_transforms, ivec2(4, transformIndex), 0).x;\n }\n\n mat4 viewTransform = view * transform;\n\n vec4 cam = viewTransform * vec4(uintBitsToFloat(cen.xyz), 1);\n vec4 pos2d = projection * cam;\n\n float clip = 1.2 * pos2d.w;\n if (pos2d.z < -pos2d.w || pos2d.x < -clip || pos2d.x > clip || pos2d.y < -clip || pos2d.y > clip) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n uvec4 cov = texelFetch(u_texture, ivec2(((uint(index) & 0x3ffu) << 1) | 1u, uint(index) >> 10), 0);\n vec2 u1 = unpackHalf2x16(cov.x), u2 = unpackHalf2x16(cov.y), u3 = unpackHalf2x16(cov.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n mat3 J = mat3(\n focal.x / cam.z, 0., -(focal.x * cam.x) / (cam.z * cam.z), \n 0., -focal.y / cam.z, (focal.y * cam.y) / (cam.z * cam.z), \n 0., 0., 0.\n );\n\n mat3 T = transpose(mat3(viewTransform)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if (lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = vec4((cov.w) & 0xffu, (cov.w >> 8) & 0xffu, (cov.w >> 16) & 0xffu, (cov.w >> 24) & 0xffu) / 255.0;\n vPosition = position;\n vSize = length(majorAxis);\n vSelected = selected;\n\n float scalingFactor = 1.0;\n\n if (useDepthFade) {\n float depthNorm = (pos2d.z / pos2d.w + 1.0) / 2.0;\n float near = 0.1; float far = 100.0;\n float normalizedDepth = (2.0 * near) / (far + near - depthNorm * (far - near));\n float start = max(normalizedDepth - 0.1, 0.0);\n float end = min(normalizedDepth + 0.1, 1.0);\n scalingFactor = clamp((depthFade - start) / (end - start), 0.0, 1.0);\n }\n\n vec2 vCenter = vec2(pos2d) / pos2d.w;\n gl_Position = vec4(\n vCenter \n + position.x * majorAxis * scalingFactor / viewport\n + position.y * minorAxis * scalingFactor / viewport, 0.0, 1.0);\n}\n`;\n\nconst fragmentShaderSource = /* glsl */ `#version 300 es\nprecision highp float;\n\nuniform float outlineThickness;\nuniform vec4 outlineColor;\n\nin vec4 vColor;\nin vec2 vPosition;\nin float vSize;\nin float vSelected;\n\nout vec4 fragColor;\n\nvoid main () {\n float A = -dot(vPosition, vPosition);\n\n if (A < -4.0) discard;\n\n if (vSelected < 0.5) {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n return;\n }\n\n float outlineThreshold = -4.0 + (outlineThickness / vSize);\n\n if (A < outlineThreshold) {\n fragColor = outlineColor;\n } \n else {\n float B = exp(A) * vColor.a;\n fragColor = vec4(B * vColor.rgb, B);\n }\n}\n`;\n\nclass RenderProgram extends ShaderProgram {\n private _outlineThickness: number = 10.0;\n private _outlineColor: Color32 = new Color32(255, 165, 0, 255);\n private _renderData: RenderData | null = null;\n private _depthIndex: Uint32Array | null = null;\n private _chunks: Uint8Array | null = null;\n private _splatTexture: WebGLTexture | null = null;\n\n protected _initialize: () => void;\n protected _resize: () => void;\n protected _render: () => void;\n protected _dispose: () => void;\n\n private _setOutlineThickness: (value: number) => void;\n private _setOutlineColor: (value: Color32) => void;\n\n constructor(renderer: WebGLRenderer, passes: ShaderPass[]) {\n super(renderer, passes);\n\n const canvas = renderer.canvas;\n const gl = renderer.gl;\n\n let worker: Worker;\n\n let u_projection: WebGLUniformLocation;\n let u_viewport: WebGLUniformLocation;\n let u_focal: WebGLUniformLocation;\n let u_view: WebGLUniformLocation;\n let u_texture: WebGLUniformLocation;\n let u_transforms: WebGLUniformLocation;\n let u_transformIndices: WebGLUniformLocation;\n\n let u_outlineThickness: WebGLUniformLocation;\n let u_outlineColor: WebGLUniformLocation;\n\n let positionAttribute: number;\n let indexAttribute: number;\n\n let transformsTexture: WebGLTexture;\n let transformIndicesTexture: WebGLTexture;\n\n let vertexBuffer: WebGLBuffer;\n let indexBuffer: WebGLBuffer;\n\n this._resize = () => {\n if (!this._camera) return;\n\n this._camera.data.setSize(canvas.width, canvas.height);\n this._camera.update();\n\n u_projection = gl.getUniformLocation(this.program, \"projection\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n\n u_viewport = gl.getUniformLocation(this.program, \"viewport\") as WebGLUniformLocation;\n gl.uniform2fv(u_viewport, new Float32Array([canvas.width, canvas.height]));\n };\n\n const createWorker = () => {\n worker = new SortWorker();\n worker.onmessage = (e) => {\n if (e.data.depthIndex) {\n const { depthIndex, chunks } = e.data;\n this._depthIndex = depthIndex;\n this._chunks = chunks;\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, depthIndex, gl.STATIC_DRAW);\n }\n };\n };\n\n this._initialize = () => {\n if (!this._scene || !this._camera) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._resize();\n\n this._scene.addEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.addEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n this._renderData = new RenderData(this._scene);\n\n u_focal = gl.getUniformLocation(this.program, \"focal\") as WebGLUniformLocation;\n gl.uniform2fv(u_focal, new Float32Array([this._camera.data.fx, this._camera.data.fy]));\n\n u_view = gl.getUniformLocation(this.program, \"view\") as WebGLUniformLocation;\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n u_outlineThickness = gl.getUniformLocation(this.program, \"outlineThickness\") as WebGLUniformLocation;\n gl.uniform1f(u_outlineThickness, this.outlineThickness);\n\n u_outlineColor = gl.getUniformLocation(this.program, \"outlineColor\") as WebGLUniformLocation;\n gl.uniform4fv(u_outlineColor, new Float32Array(this.outlineColor.flatNorm()));\n\n this._splatTexture = gl.createTexture() as WebGLTexture;\n u_texture = gl.getUniformLocation(this.program, \"u_texture\") as WebGLUniformLocation;\n gl.uniform1i(u_texture, 0);\n\n transformsTexture = gl.createTexture() as WebGLTexture;\n u_transforms = gl.getUniformLocation(this.program, \"u_transforms\") as WebGLUniformLocation;\n gl.uniform1i(u_transforms, 1);\n\n transformIndicesTexture = gl.createTexture() as WebGLTexture;\n u_transformIndices = gl.getUniformLocation(this.program, \"u_transformIndices\") as WebGLUniformLocation;\n gl.uniform1i(u_transformIndices, 2);\n\n vertexBuffer = gl.createBuffer() as WebGLBuffer;\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]), gl.STATIC_DRAW);\n\n positionAttribute = gl.getAttribLocation(this.program, \"position\");\n gl.enableVertexAttribArray(positionAttribute);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n indexBuffer = gl.createBuffer() as WebGLBuffer;\n indexAttribute = gl.getAttribLocation(this.program, \"index\");\n gl.enableVertexAttribArray(indexAttribute);\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n\n createWorker();\n };\n\n const handleObjectAdded = (event: Event) => {\n const e = event as ObjectAddedEvent;\n\n if (e.object instanceof Splat) {\n e.object.addEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectRemoved = (event: Event) => {\n const e = event as ObjectRemovedEvent;\n\n if (e.object instanceof Splat) {\n e.object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n\n this.dispose();\n };\n\n const handleObjectChanged = (event: Event) => {\n const e = event as ObjectChangedEvent;\n\n if (e.object instanceof Splat && this._renderData) {\n this._renderData.markDirty(e.object);\n }\n };\n\n this._render = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot render without scene and camera\");\n return;\n }\n\n this._camera.update();\n worker.postMessage({ viewProj: this._camera.data.viewProj });\n\n if (this.renderData.needsRebuild) {\n this.renderData.rebuild();\n }\n\n if (this.renderData.dataChanged || this.renderData.transformsChanged) {\n if (this.renderData.dataChanged) {\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.splatTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32UI,\n this.renderData.width,\n this.renderData.height,\n 0,\n gl.RGBA_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.data,\n );\n }\n\n if (this.renderData.transformsChanged) {\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, transformsTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA32F,\n this.renderData.transformsWidth,\n this.renderData.transformsHeight,\n 0,\n gl.RGBA,\n gl.FLOAT,\n this.renderData.transforms,\n );\n\n gl.activeTexture(gl.TEXTURE2);\n gl.bindTexture(gl.TEXTURE_2D, transformIndicesTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.R32UI,\n this.renderData.transformIndicesWidth,\n this.renderData.transformIndicesHeight,\n 0,\n gl.RED_INTEGER,\n gl.UNSIGNED_INT,\n this.renderData.transformIndices,\n );\n }\n\n const detachedPositions = new Float32Array(this.renderData.positions.slice().buffer);\n const detachedTransforms = new Float32Array(this.renderData.transforms.slice().buffer);\n const detachedTransformIndices = new Uint32Array(this.renderData.transformIndices.slice().buffer);\n worker.postMessage(\n {\n sortData: {\n positions: detachedPositions,\n transforms: detachedTransforms,\n transformIndices: detachedTransformIndices,\n vertexCount: this.renderData.vertexCount,\n },\n },\n [detachedPositions.buffer, detachedTransforms.buffer, detachedTransformIndices.buffer],\n );\n\n this.renderData.dataChanged = false;\n this.renderData.transformsChanged = false;\n }\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(gl.ONE_MINUS_DST_ALPHA, gl.ONE, gl.ONE_MINUS_DST_ALPHA, gl.ONE);\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n\n gl.uniformMatrix4fv(u_projection, false, this._camera.data.projectionMatrix.buffer);\n gl.uniformMatrix4fv(u_view, false, this._camera.data.viewMatrix.buffer);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.vertexAttribPointer(positionAttribute, 2, gl.FLOAT, false, 0, 0);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, indexBuffer);\n gl.vertexAttribIPointer(indexAttribute, 1, gl.INT, 0, 0);\n gl.vertexAttribDivisor(indexAttribute, 1);\n\n gl.drawArraysInstanced(gl.TRIANGLE_FAN, 0, 4, this.renderData.vertexCount);\n };\n\n this._dispose = () => {\n if (!this._scene || !this._camera || !this.renderData) {\n console.error(\"Cannot dispose without scene and camera\");\n return;\n }\n\n this._scene.removeEventListener(\"objectAdded\", handleObjectAdded);\n this._scene.removeEventListener(\"objectRemoved\", handleObjectRemoved);\n for (const object of this._scene.objects) {\n if (object instanceof Splat) {\n object.removeEventListener(\"objectChanged\", handleObjectChanged);\n }\n }\n\n worker.terminate();\n this.renderData.dispose();\n\n gl.deleteTexture(this.splatTexture);\n gl.deleteTexture(transformsTexture);\n gl.deleteTexture(transformIndicesTexture);\n\n gl.deleteBuffer(indexBuffer);\n gl.deleteBuffer(vertexBuffer);\n };\n\n this._setOutlineThickness = (value: number) => {\n this._outlineThickness = value;\n if (this._initialized) {\n gl.uniform1f(u_outlineThickness, value);\n }\n };\n\n this._setOutlineColor = (value: Color32) => {\n this._outlineColor = value;\n if (this._initialized) {\n gl.uniform4fv(u_outlineColor, new Float32Array(value.flatNorm()));\n }\n };\n }\n\n get renderData() {\n return this._renderData;\n }\n\n get depthIndex() {\n return this._depthIndex;\n }\n\n get chunks() {\n return this._chunks;\n }\n\n get splatTexture() {\n return this._splatTexture;\n }\n\n get outlineThickness() {\n return this._outlineThickness;\n }\n\n set outlineThickness(value: number) {\n this._setOutlineThickness(value);\n }\n\n get outlineColor() {\n return this._outlineColor;\n }\n\n set outlineColor(value: Color32) {\n this._setOutlineColor(value);\n }\n\n protected _getVertexSource() {\n return vertexShaderSource;\n }\n\n protected _getFragmentSource() {\n return fragmentShaderSource;\n }\n}\n\nexport { RenderProgram };\n","import { RenderProgram } from \"../programs/RenderProgram\";\nimport { ShaderProgram } from \"../programs/ShaderProgram\";\nimport { ShaderPass } from \"./ShaderPass\";\n\nclass FadeInPass implements ShaderPass {\n initialize: (program: ShaderProgram) => void;\n render: () => void;\n\n constructor(speed: number = 1.0) {\n let value = 0.0;\n let active = false;\n\n let renderProgram: RenderProgram;\n let gl: WebGL2RenderingContext;\n let u_useDepthFade: WebGLUniformLocation;\n let u_depthFade: WebGLUniformLocation;\n\n this.initialize = (program: ShaderProgram) => {\n if (!(program instanceof RenderProgram)) {\n throw new Error(\"FadeInPass requires a RenderProgram\");\n }\n\n value = program.started ? 1.0 : 0.0;\n active = true;\n renderProgram = program;\n gl = program.renderer.gl;\n\n u_useDepthFade = gl.getUniformLocation(renderProgram.program, \"useDepthFade\") as WebGLUniformLocation;\n gl.uniform1i(u_useDepthFade, 1);\n\n u_depthFade = gl.getUniformLocation(renderProgram.program, \"depthFade\") as WebGLUniformLocation;\n gl.uniform1f(u_depthFade, value);\n };\n\n this.render = () => {\n if (!active || renderProgram.renderData?.updating) return;\n gl.useProgram(renderProgram.program);\n value = Math.min(value + speed * 0.01, 1.0);\n if (value >= 1.0) {\n active = false;\n gl.uniform1i(u_useDepthFade, 0);\n }\n gl.uniform1f(u_depthFade, value);\n };\n }\n\n dispose() {}\n}\n\nexport { FadeInPass };\n","import type { Scene } from \"../core/Scene\";\nimport { FadeInPass } from \"./webgl/passes/FadeInPass\";\nimport { Camera } from \"../cameras/Camera\";\nimport { Color32 } from \"../math/Color32\";\nimport { ShaderProgram } from \"./webgl/programs/ShaderProgram\";\nimport { RenderProgram } from \"./webgl/programs/RenderProgram\";\nimport { ShaderPass } from \"./webgl/passes/ShaderPass\";\n\nexport class WebGLRenderer {\n private _canvas: HTMLCanvasElement;\n private _gl: WebGL2RenderingContext;\n private _backgroundColor: Color32 = new Color32();\n private _renderProgram: RenderProgram;\n\n addProgram: (program: ShaderProgram) => void;\n removeProgram: (program: ShaderProgram) => void;\n resize: () => void;\n setSize: (width: number, height: number) => void;\n render: (scene: Scene, camera: Camera) => void;\n dispose: () => void;\n\n constructor(optionalCanvas: HTMLCanvasElement | null = null, optionalRenderPasses: ShaderPass[] | null = null) {\n const canvas: HTMLCanvasElement = optionalCanvas || document.createElement(\"canvas\");\n if (!optionalCanvas) {\n canvas.style.display = \"block\";\n canvas.style.boxSizing = \"border-box\";\n canvas.style.width = \"100%\";\n canvas.style.height = \"100%\";\n canvas.style.margin = \"0\";\n canvas.style.padding = \"0\";\n document.body.appendChild(canvas);\n }\n canvas.style.background = this._backgroundColor.toHexString();\n this._canvas = canvas;\n\n this._gl = canvas.getContext(\"webgl2\", { antialias: false }) as WebGL2RenderingContext;\n\n const renderPasses = optionalRenderPasses || [];\n if (!optionalRenderPasses) {\n renderPasses.push(new FadeInPass());\n }\n\n this._renderProgram = new RenderProgram(this, renderPasses);\n const programs = [this._renderProgram] as ShaderProgram[];\n\n this.resize = () => {\n const width = canvas.clientWidth;\n const height = canvas.clientHeight;\n if (canvas.width !== width || canvas.height !== height) {\n this.setSize(width, height);\n }\n };\n\n this.setSize = (width: number, height: number) => {\n canvas.width = width;\n canvas.height = height;\n this._gl.viewport(0, 0, canvas.width, canvas.height);\n for (const program of programs) {\n program.resize();\n }\n };\n\n this.render = (scene: Scene, camera: Camera) => {\n for (const program of programs) {\n program.render(scene, camera);\n }\n };\n\n this.dispose = () => {\n for (const program of programs) {\n program.dispose();\n }\n };\n\n this.addProgram = (program: ShaderProgram) => {\n programs.push(program);\n };\n\n this.removeProgram = (program: ShaderProgram) => {\n const index = programs.indexOf(program);\n if (index < 0) {\n throw new Error(\"Program not found\");\n }\n programs.splice(index, 1);\n };\n\n this.resize();\n }\n\n get canvas() {\n return this._canvas;\n }\n\n get gl() {\n return this._gl;\n }\n\n get renderProgram() {\n return this._renderProgram;\n }\n\n get backgroundColor() {\n return this._backgroundColor;\n }\n\n set backgroundColor(value: Color32) {\n this._backgroundColor = value;\n this._canvas.style.background = value.toHexString();\n }\n}\n","import { Camera } from \"../cameras/Camera\";\nimport { Matrix3 } from \"../math/Matrix3\";\nimport { Quaternion } from \"../math/Quaternion\";\nimport { Vector3 } from \"../math/Vector3\";\n\nclass OrbitControls {\n minAngle: number = -90;\n maxAngle: number = 90;\n minZoom: number = 0.1;\n maxZoom: number = 30;\n orbitSpeed: number = 1;\n panSpeed: number = 1;\n zoomSpeed: number = 1;\n dampening: number = 0.12;\n setCameraTarget: (newTarget: Vector3) => void = () => {};\n update: () => void;\n dispose: () => void;\n\n constructor(\n camera: Camera,\n canvas: HTMLElement,\n alpha: number = 0.5,\n beta: number = 0.5,\n radius: number = 5,\n enableKeyboardControls: boolean = true,\n inputTarget: Vector3 = new Vector3(),\n ) {\n let target = inputTarget.clone();\n\n let desiredTarget = target.clone();\n let desiredAlpha = alpha;\n let desiredBeta = beta;\n let desiredRadius = radius;\n\n let dragging = false;\n let panning = false;\n let lastDist = 0;\n let lastX = 0;\n let lastY = 0;\n\n const keys: { [key: string]: boolean } = {};\n\n let isUpdatingCamera = false;\n\n const onCameraChange = () => {\n if (isUpdatingCamera) return;\n\n const eulerRotation = camera.rotation.toEuler();\n desiredAlpha = -eulerRotation.y;\n desiredBeta = -eulerRotation.x;\n\n const x = camera.position.x - desiredRadius * Math.sin(desiredAlpha) * Math.cos(desiredBeta);\n const y = camera.position.y + desiredRadius * Math.sin(desiredBeta);\n const z = camera.position.z + desiredRadius * Math.cos(desiredAlpha) * Math.cos(desiredBeta);\n\n desiredTarget = new Vector3(x, y, z);\n };\n\n camera.addEventListener(\"objectChanged\", onCameraChange);\n\n this.setCameraTarget = (newTarget: Vector3) => {\n const dx = newTarget.x - camera.position.x;\n const dy = newTarget.y - camera.position.y;\n const dz = newTarget.z - camera.position.z;\n desiredRadius = Math.sqrt(dx * dx + dy * dy + dz * dz);\n desiredBeta = Math.atan2(dy, Math.sqrt(dx * dx + dz * dz));\n desiredAlpha = -Math.atan2(dx, dz);\n desiredTarget = new Vector3(newTarget.x, newTarget.y, newTarget.z);\n };\n\n const computeZoomNorm = () => {\n return 0.1 + (0.9 * (desiredRadius - this.minZoom)) / (this.maxZoom - this.minZoom);\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n keys[e.code] = true;\n // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = true;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = true;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = true;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = true;\n };\n\n const onKeyUp = (e: KeyboardEvent) => {\n keys[e.code] = false; // Map arrow keys to WASD keys\n if (e.code === \"ArrowUp\") keys[\"KeyW\"] = false;\n if (e.code === \"ArrowDown\") keys[\"KeyS\"] = false;\n if (e.code === \"ArrowLeft\") keys[\"KeyA\"] = false;\n if (e.code === \"ArrowRight\") keys[\"KeyD\"] = false;\n };\n\n const onMouseDown = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = true;\n panning = e.button === 2;\n lastX = e.clientX;\n lastY = e.clientY;\n window.addEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseUp = (e: MouseEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n window.removeEventListener(\"mouseup\", onMouseUp);\n };\n\n const onMouseMove = (e: MouseEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n const dx = e.clientX - lastX;\n const dy = e.clientY - lastY;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n const panX = -dx * this.panSpeed * 0.01 * zoomNorm;\n const panY = -dy * this.panSpeed * 0.01 * zoomNorm;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(panX));\n desiredTarget = desiredTarget.add(up.multiply(panY));\n } else {\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n }\n\n lastX = e.clientX;\n lastY = e.clientY;\n };\n\n const onWheel = (e: WheelEvent) => {\n preventDefault(e);\n\n const zoomNorm = computeZoomNorm();\n desiredRadius += e.deltaY * this.zoomSpeed * 0.025 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n };\n\n const onTouchStart = (e: TouchEvent) => {\n preventDefault(e);\n\n if (e.touches.length === 1) {\n dragging = true;\n panning = false;\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n lastDist = 0;\n } else if (e.touches.length === 2) {\n dragging = true;\n panning = true;\n lastX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n lastY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n lastDist = Math.sqrt(distX * distX + distY * distY);\n }\n };\n\n const onTouchEnd = (e: TouchEvent) => {\n preventDefault(e);\n\n dragging = false;\n panning = false;\n };\n\n const onTouchMove = (e: TouchEvent) => {\n preventDefault(e);\n\n if (!dragging || !camera) return;\n\n if (panning) {\n const zoomNorm = computeZoomNorm();\n\n const distX = e.touches[0].clientX - e.touches[1].clientX;\n const distY = e.touches[0].clientY - e.touches[1].clientY;\n const dist = Math.sqrt(distX * distX + distY * distY);\n const delta = lastDist - dist;\n desiredRadius += delta * this.zoomSpeed * 0.1 * zoomNorm;\n desiredRadius = Math.min(Math.max(desiredRadius, this.minZoom), this.maxZoom);\n lastDist = dist;\n\n const touchX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n const touchY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const dx = touchX - lastX;\n const dy = touchY - lastY;\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const right = new Vector3(R[0], R[3], R[6]);\n const up = new Vector3(R[1], R[4], R[7]);\n desiredTarget = desiredTarget.add(right.multiply(-dx * this.panSpeed * 0.025 * zoomNorm));\n desiredTarget = desiredTarget.add(up.multiply(-dy * this.panSpeed * 0.025 * zoomNorm));\n lastX = touchX;\n lastY = touchY;\n } else {\n const dx = e.touches[0].clientX - lastX;\n const dy = e.touches[0].clientY - lastY;\n\n desiredAlpha -= dx * this.orbitSpeed * 0.003;\n desiredBeta += dy * this.orbitSpeed * 0.003;\n desiredBeta = Math.min(\n Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),\n (this.maxAngle * Math.PI) / 180,\n );\n\n lastX = e.touches[0].clientX;\n lastY = e.touches[0].clientY;\n }\n };\n\n const lerp = (a: number, b: number, t: number) => {\n return (1 - t) * a + t * b;\n };\n\n this.update = () => {\n isUpdatingCamera = true;\n\n alpha = lerp(alpha, desiredAlpha, this.dampening);\n beta = lerp(beta, desiredBeta, this.dampening);\n radius = lerp(radius, desiredRadius, this.dampening);\n target = target.lerp(desiredTarget, this.dampening);\n\n const x = target.x + radius * Math.sin(alpha) * Math.cos(beta);\n const y = target.y - radius * Math.sin(beta);\n const z = target.z - radius * Math.cos(alpha) * Math.cos(beta);\n camera.position = new Vector3(x, y, z);\n\n const direction = target.subtract(camera.position).normalize();\n const rx = Math.asin(-direction.y);\n const ry = Math.atan2(direction.x, direction.z);\n camera.rotation = Quaternion.FromEuler(new Vector3(rx, ry, 0));\n\n const moveSpeed = 0.025;\n const rotateSpeed = 0.01;\n\n const R = Matrix3.RotationFromQuaternion(camera.rotation).buffer;\n const forward = new Vector3(-R[2], -R[5], -R[8]);\n const right = new Vector3(R[0], R[3], R[6]);\n\n if (keys[\"KeyS\"]) desiredTarget = desiredTarget.add(forward.multiply(moveSpeed));\n if (keys[\"KeyW\"]) desiredTarget = desiredTarget.subtract(forward.multiply(moveSpeed));\n if (keys[\"KeyA\"]) desiredTarget = desiredTarget.subtract(right.multiply(moveSpeed));\n if (keys[\"KeyD\"]) desiredTarget = desiredTarget.add(right.multiply(moveSpeed));\n\n // Add rotation with 'e' and 'q' for horizontal rotation\n if (keys[\"KeyE\"]) desiredAlpha += rotateSpeed;\n if (keys[\"KeyQ\"]) desiredAlpha -= rotateSpeed;\n\n // Add rotation with 'r' and 'f' for vertical rotation\n if (keys[\"KeyR\"]) desiredBeta += rotateSpeed;\n if (keys[\"KeyF\"]) desiredBeta -= rotateSpeed;\n\n isUpdatingCamera = false;\n };\n\n const preventDefault = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n this.dispose = () => {\n canvas.removeEventListener(\"dragenter\", preventDefault);\n canvas.removeEventListener(\"dragover\", preventDefault);\n canvas.removeEventListener(\"dragleave\", preventDefault);\n canvas.removeEventListener(\"contextmenu\", preventDefault);\n\n canvas.removeEventListener(\"mousedown\", onMouseDown);\n canvas.removeEventListener(\"mousemove\", onMouseMove);\n canvas.removeEventListener(\"wheel\", onWheel);\n\n canvas.removeEventListener(\"touchstart\", onTouchStart);\n canvas.removeEventListener(\"touchend\", onTouchEnd);\n canvas.removeEventListener(\"touchmove\", onTouchMove);\n\n if (enableKeyboardControls) {\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"keyup\", onKeyUp);\n }\n };\n\n if (enableKeyboardControls) {\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"keyup\", onKeyUp);\n }\n\n canvas.addEventListener(\"dragenter\", preventDefault);\n canvas.addEventListener(\"dragover\", preventDefault);\n canvas.addEventListener(\"dragleave\", preventDefault);\n canvas.addEventListener(\"contextmenu\", preventDefault);\n\n canvas.addEventListener(\"mousedown\", onMouseDown);\n canvas.addEventListener(\"mousemove\", onMouseMove);\n canvas.addEventListener(\"wheel\", onWheel);\n\n canvas.addEventListener(\"touchstart\", onTouchStart);\n canvas.addEventListener(\"touchend\", onTouchEnd);\n canvas.addEventListener(\"touchmove\", onTouchMove);\n\n this.update();\n }\n}\n\nexport { OrbitControls };\n","import { Vector3 } from \"./Vector3\";\n\nclass Plane {\n public readonly normal: Vector3;\n public readonly point: Vector3;\n\n constructor(normal: Vector3, point: Vector3) {\n this.normal = normal;\n this.point = point;\n }\n\n intersect(origin: Vector3, direction: Vector3): Vector3 | null {\n const denominator = this.normal.dot(direction);\n\n if (Math.abs(denominator) < 0.0001) {\n return null;\n }\n\n const t = this.normal.dot(this.point.subtract(origin)) / denominator;\n\n if (t < 0) {\n return null;\n }\n\n return origin.add(direction.multiply(t));\n }\n}\n\nexport { Plane };\n","import { ShaderProgram } from \"../programs/ShaderProgram\";\n\nclass ShaderPass {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n initialize(program: ShaderProgram) {}\n render() {}\n dispose() {}\n}\n\nexport { ShaderPass };\n","\nvar loadWasm = (() => {\n var _scriptDir = import.meta.url;\n \n return (\nfunction(moduleArg = {}) {\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module[\"ready\"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=\"undefined\"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(typeof WebAssembly!=\"object\"){abort(\"no native wasm support detected\")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile=\"data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAAQcBBAQLAwMCAgAADAYGBAUBcAEQEAUHAQGAAoCAAgYIAX8BQfCfBAsHGQYBawIAAWwADQFtABkBbgEAAW8AGAFwAA4JFQEAQQELDw8XDBUVIgwhGhwfDBsdHgrfUxlxAQF/IAJFBEAgACgCBCABKAIERg8LIAAgAUYEQEEBDwsCQCAAKAIEIgItAAAiAEUgACABKAIEIgEtAAAiA0dyDQADQCABLQABIQMgAi0AASIARQ0BIAFBAWohASACQQFqIQIgACADRg0ACwsgACADRgtPAQJ/QbgaKAIAIgEgAEEHakF4cSICaiEAAkAgAkEAIAAgAU0bRQRAIAA/AEEQdE0NASAAEAYNAQtB+BtBMDYCAEF/DwtBuB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3R5cGVfaW5mb0UAAAAAzAwAANgKAAAwDQAATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAAAAzAwAAAgLAAD8CgAATjEwX19jeHhhYml2MTE3X19wYmFzZV90eXBlX2luZm9FAAAAzAwAADgLAAD8CgAATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UAzAwAAGgLAABcCwAAAAAAANwLAAACAAAAAwAAAAQAAAAFAAAABgAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQDMDAAAtAsAAPwKAAB2AAAAoAsAAOgLAABiAAAAoAsAAPQLAABjAAAAoAsAAAAMAABoAAAAoAsAAAwMAABhAAAAoAsAABgMAABzAAAAoAsAACQMAAB0AAAAoAsAADAMAABpAAAAoAsAADwMAABqAAAAoAsAAEgMAABsAAAAoAsAAFQMAABtAAAAoAsAAGAMAAB4AAAAoAsAAGwMAAB5AAAAoAsAAHgMAABmAAAAoAsAAIQMAABkAAAAoAsAAJAMAAAAAAAALAsAAAIAAAAHAAAABAAAAAUAAAAIAAAACQAAAAoAAAALAAAAAAAAABQNAAACAAAADAAAAAQAAAAFAAAACAAAAA0AAAAOAAAADwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={\"a\":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports[\"k\"];updateMemoryViews();addOnInit(wasmExports[\"l\"]);removeRunDependency(\"wasm-instantiate\");return wasmExports}addRunDependency(\"wasm-instantiate\");function receiveInstantiationResult(result){receiveInstance(result[\"instance\"])}if(Module[\"instantiateWasm\"]){try{return Module[\"instantiateWasm\"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module[\"noExitRuntime\"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret=\"\";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!(\"argPackAdvance\"in registeredInstance)){throw new TypeError(\"registerType registeredInstance requires argPackAdvance\")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":function(wt){return!!wt},\"toWireType\":function(destructors,o){return o?trueValue:falseValue},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":function(pointer){return this[\"fromWireType\"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module[\"count_emval_handles\"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError(\"Cannot use deleted val. handle = \"+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this[\"fromWireType\"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},\"toWireType\":(destructors,value)=>Emval.toHandle(value),\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this[\"fromWireType\"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this[\"fromWireType\"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":value=>value,\"toWireType\":(destructors,value)=>value,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes(\"unsigned\");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,\"fromWireType\":fromWireType,\"toWireType\":toWireType,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,\"fromWireType\":decodeMemoryView,\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this[\"fromWireType\"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder(\"utf8\"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name===\"std::string\";registerType(rawType,{name:name,\"fromWireType\"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str=\"\";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str=\"\";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,\"fromWireType\":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},\"toWireType\":(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},\"argPackAdvance\":GenericWireTypeSize,\"readValueFromPointer\":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,\"argPackAdvance\":0,\"fromWireType\":()=>undefined,\"toWireType\":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module[\"BindingError\"]=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};InternalError=Module[\"InternalError\"]=class InternalError extends Error{constructor(message){super(message);this.name=\"InternalError\"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports[\"l\"])();var _evaluate=Module[\"_evaluate\"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)=>(_evaluate=Module[\"_evaluate\"]=wasmExports[\"m\"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);var ___errno_location=()=>(___errno_location=wasmExports[\"__errno_location\"])();var _malloc=Module[\"_malloc\"]=a0=>(_malloc=Module[\"_malloc\"]=wasmExports[\"o\"])(a0);var _free=Module[\"_free\"]=a0=>(_free=Module[\"_free\"]=wasmExports[\"p\"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports[\"__cxa_is_pointer_type\"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}run();\n\n\n return moduleArg.ready\n}\n);\n})();\n;\nexport default loadWasm;","import { Splat } from \"../../../splats/Splat\";\nimport { RenderProgram } from \"../programs/RenderProgram\";\n\nimport loadWasm from \"../../../wasm/intersect\";\n\nclass IntersectionTester {\n testPoint: (x: number, y: number) => Splat | null;\n\n constructor(renderProgram: RenderProgram) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let wasmModule: any;\n\n const initWasm = async () => {\n wasmModule = await loadWasm();\n };\n\n initWasm();\n\n let allocatedVertexCount: number = 0;\n let allocatedTransformCount: number = 0;\n\n let viewPtr: number;\n let transformsPtr: number;\n let transformIndicesPtr: number;\n let positionsPtr: number;\n let rotationsPtr: number;\n let scalesPtr: number;\n let depthIndexPtr: number;\n let chunksPtr: number;\n let originPtr: number;\n let directionPtr: number;\n let resultPtr: number;\n\n const allocateVertices = (vertexCount: number) => {\n if (vertexCount > allocatedVertexCount) {\n if (allocatedVertexCount > 0) {\n wasmModule._free(viewPtr);\n wasmModule._free(transformIndicesPtr);\n wasmModule._free(positionsPtr);\n wasmModule._free(rotationsPtr);\n wasmModule._free(scalesPtr);\n wasmModule._free(depthIndexPtr);\n wasmModule._free(chunksPtr);\n wasmModule._free(originPtr);\n wasmModule._free(directionPtr);\n wasmModule._free(resultPtr);\n }\n\n allocatedVertexCount = vertexCount;\n\n viewPtr = wasmModule._malloc(16 * 4);\n transformIndicesPtr = wasmModule._malloc(allocatedVertexCount * 4);\n positionsPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n rotationsPtr = wasmModule._malloc(4 * allocatedVertexCount * 4);\n scalesPtr = wasmModule._malloc(3 * allocatedVertexCount * 4);\n depthIndexPtr = wasmModule._malloc(allocatedVertexCount * 4);\n chunksPtr = wasmModule._malloc(allocatedVertexCount);\n originPtr = wasmModule._malloc(3 * 4);\n directionPtr = wasmModule._malloc(3 * 4);\n resultPtr = wasmModule._malloc(4);\n }\n };\n\n const allocateTransforms = (transformCount: number) => {\n if (transformCount > allocatedTransformCount) {\n if (allocatedTransformCount > 0) {\n wasmModule._free(transformsPtr);\n }\n\n allocatedTransformCount = transformCount;\n\n transformsPtr = wasmModule._malloc(20 * allocatedTransformCount * 4);\n }\n };\n\n this.testPoint = (x: number, y: number) => {\n if (!wasmModule) {\n throw new Error(\"Wasm module not loaded\");\n }\n\n if (!renderProgram.camera) {\n throw new Error(\"Camera not set\");\n }\n\n if (!renderProgram.renderData || !renderProgram.depthIndex || !renderProgram.chunks) {\n throw new Error(\"Render data not set\");\n }\n\n const renderData = renderProgram.renderData;\n const depthIndex = renderProgram.depthIndex;\n const chunks = renderProgram.chunks;\n\n const targetAllocatedVertexCount = Math.pow(2, Math.ceil(Math.log2(renderData.vertexCount)));\n allocateVertices(targetAllocatedVertexCount);\n\n const targetAllocatedTransformCount = Math.pow(2, Math.ceil(Math.log2(renderData.transforms.length / 20)));\n allocateTransforms(targetAllocatedTransformCount);\n\n const normalizedX = (x + 1) / 2;\n const normalizedY = (y + 1) / 2;\n const chunk = Math.floor(normalizedX * 15) + Math.floor(normalizedY * 15) * 15;\n\n const camera = renderProgram.camera;\n const ray = camera.screenPointToRay(x, y);\n\n wasmModule.HEAPF32.set(camera.data.viewMatrix.buffer, viewPtr / 4);\n wasmModule.HEAPU32.set(renderData.transformIndices, transformIndicesPtr / 4);\n wasmModule.HEAPF32.set(renderData.positions, positionsPtr / 4);\n wasmModule.HEAPF32.set(renderData.rotations, rotationsPtr / 4);\n wasmModule.HEAPF32.set(renderData.scales, scalesPtr / 4);\n wasmModule.HEAPU32.set(depthIndex, depthIndexPtr / 4);\n wasmModule.HEAPU8.set(chunks, chunksPtr);\n wasmModule.HEAPF32.set(camera.position.flat(), originPtr / 4);\n wasmModule.HEAPF32.set(ray.flat(), directionPtr / 4);\n wasmModule.HEAPF32.set(renderData.transforms, transformsPtr / 4);\n\n wasmModule._evaluate(\n viewPtr,\n transformsPtr,\n transformIndicesPtr,\n positionsPtr,\n rotationsPtr,\n scalesPtr,\n depthIndexPtr,\n chunksPtr,\n renderData.vertexCount,\n chunk,\n originPtr,\n directionPtr,\n resultPtr,\n );\n\n const result = wasmModule.HEAPU32[resultPtr / 4];\n if (result !== 0xffffffff) {\n const splat = renderData.getSplat(result) as Splat;\n return splat;\n }\n\n return null;\n };\n }\n}\n\nexport { IntersectionTester };\n"],"names":["Vector3","constructor","x","y","z","this","equals","v","add","subtract","multiply","buffer","cross","dot","lerp","t","magnitude","Math","sqrt","distanceTo","normalize","length","flat","clone","toString","join","One","value","Quaternion","w","q","l","w1","x1","y1","z1","w2","x2","y2","z2","inverse","apply","vecQuat","conjugate","rotatedQuat","FromEuler","e","halfX","halfY","halfZ","cy","cos","sy","sin","cp","sp","cz","sz","toEuler","sinr_cosp","cosr_cosp","atan2","sinp","abs","sign","PI","asin","siny_cosp","cosy_cosp","FromMatrix3","matrix","m","trace","s","FromAxisAngle","axis","angle","halfAngle","EventDispatcher","listeners","Map","addEventListener","type","listener","has","set","Set","get","removeEventListener","delete","hasEventListener","dispatchEvent","event","Matrix4","n11","n12","n13","n14","n21","n22","n23","n24","n31","n32","n33","n34","n41","n42","n43","n44","i","a","b","determinant","invert","det","Error","invDet","Compose","position","rotation","scale","xx","xy","xz","yy","yz","zz","wx","wy","wz","sx","ObjectAddedEvent","Event","object","super","ObjectRemovedEvent","ObjectChangedEvent","Object3D","positionChanged","rotationChanged","scaleChanged","_position","_rotation","_scale","_transform","_changeEvent","update","applyPosition","applyRotation","applyScale","_updateMatrix","forward","transform","Matrix3","Eye","Diagonal","RotationFromQuaternion","RotationFromEuler","cx","SplatData","vertexCount","positions","rotations","scales","colors","changed","detached","_vertexCount","_positions","Float32Array","_rotations","_scales","_colors","Uint8Array","_selection","translate","translation","rotate","R","currentRotation","newRot","serialize","data","RowLength","f_buffer","u_buffer","reattach","selection","console","assert","byteLength","Deserialize","Splat","splat","undefined","selectedChanged","_selected","_data","saveToFile","name","document","now","Date","getFullYear","getMonth","getDate","blob","Blob","link","createElement","download","href","URL","createObjectURL","click","selected","CameraData","_fx","_fy","_near","_far","_width","_height","_projectionMatrix","_viewMatrix","_viewProj","_updateProjectionMatrix","fx","width","fy","height","far","near","projectionMatrix","viewMatrix","setSize","viewProj","Vector4","Camera","camera","screenPointToRay","clipSpaceCoords","inverseProjectionMatrix","cameraSpaceCoords","inverseViewMatrix","worldSpaceCoords","Scene","_objects","addObject","objects","push","removeObject","index","indexOf","splice","findObject","predicate","findObjectOfType","reset","objectsToRemove","slice","buffers","offset","Loader","LoadAsync","url","scene","onProgress","useCache","req","fetch","mode","credentials","cache","status","reader","body","getReader","contentLength","parseInt","headers","bytesRead","done","read","LoadFromFileAsync","file","FileReader","onload","target","result","onprogress","loaded","total","readAsArrayBuffer","Promise","resolve","onloadend","PLYLoader","format","plyData","_ParsePLYBuffer","inputBuffer","ubuf","headerText","TextDecoder","decode","header_end","header_end_index","exec","rowOffset","offsets","double","int","uint","float","short","ushort","uchar","properties","prop","split","filter","k","startsWith","_p","dataView","DataView","ArrayBuffer","q_polycam","rgba","Uint8ClampedArray","rot","r0","r1","r2","r3","forEach","property","getFloat32","getInt32","exp","SH_C0","temp","ShaderProgram","renderer","passes","_scene","_camera","_started","_initialized","_renderer","gl","_program","createProgram","_passes","vertexShader","createShader","VERTEX_SHADER","shaderSource","_getVertexSource","compileShader","getShaderParameter","COMPILE_STATUS","error","getShaderInfoLog","fragmentShader","FRAGMENT_SHADER","_getFragmentSource","attachShader","program","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","resize","useProgram","_resize","initialize","_initialize","pass","render","dispose","_render","_dispose","started","loadWasm","moduleArg","readyPromiseResolve","readyPromiseReject","Module","reject","readBinary","moduleOverrides","Object","assign","scriptDirectory","self","location","substr","replace","lastIndexOf","xhr","XMLHttpRequest","open","responseType","send","response","log","bind","wasmBinary","wasmMemory","err","tryParseAsDataURI","filename","isDataURI","decoded","atob","bytes","charCodeAt","intArrayFromBase64","dataURIPrefix","WebAssembly","abort","HEAP8","HEAPU8","HEAP16","HEAPU16","HEAP32","HEAPU32","HEAPF32","HEAPF64","ABORT","updateMemoryViews","Int8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float64Array","__ATPRERUN__","__ATINIT__","__ATPOSTRUN__","runDependencies","dependenciesFulfilled","what","RuntimeError","wasmBinaryFile","path","getBinaryPromise","binaryFile","then","binary","getBinarySync","instantiateAsync","imports","callback","receiver","instantiate","instance","reason","instantiateArrayBuffer","callRuntimeCallbacks","callbacks","shift","embind_charCodes","BindingError","readLatin1String","ptr","ret","c","awaitingDependencies","registeredTypes","throwBindingError","message","registerType","rawType","registeredInstance","options","TypeError","hasOwnProperty","ignoreDuplicateRegistrations","cb","sharedRegisterType","HandleAllocator","allocated","freelist","emval_handles","count_emval_handles","count","reserved","Emval","handle","allocate","refcount","simpleReadValueFromPointer","pointer","floatReadValueFromPointer","integerReadValueFromPointer","signed","readPointer","UTF8Decoder","UTF8ToString","maxBytesToRead","heapOrArray","idx","endIdx","endPtr","subarray","str","u0","u1","u2","String","fromCharCode","ch","UTF8ArrayToString","UTF16Decoder","UTF16ToString","maxIdx","codeUnit","stringToUTF16","outPtr","maxBytesToWrite","startPtr","numCharsToWrite","lengthBytesUTF16","UTF32ToString","utf32","stringToUTF32","lengthBytesUTF32","len","growMemory","size","pages","grow","codes","Array","embind_init_charCodes","prototype","id","pop","free","wasmImports","f","primitiveType","minRange","maxRange","trueValue","falseValue","fromWireType","wt","toWireType","destructors","o","argPackAdvance","readValueFromPointer","destructorFunction","h","rv","__emval_decref","bitshift","isUnsignedType","includes","dataTypeIndex","TA","decodeMemoryView","d","stdStringIsUTF8","payload","decodeStartPtr","currentBytePtr","stringSegment","_free","valueIsOfTypeString","lengthBytesUTF8","base","_malloc","heap","outIdx","u","startIdx","stringToUTF8Array","charCode","charSize","decodeString","encodeString","getHeap","lengthBytesUTF","HEAP","j","isVoid","g","requestedSize","oldSize","maxHeapSize","multiple","cutDown","overGrownHeapSize","min","newSize","max","wasmExports","info","receiveInstance","module","exports","unshift","removeRunDependency","catch","createWasm","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","calledRun","run","doRun","postRun","preRun","setTimeout","runCaller","ready","RenderData","dataChanged","transformsChanged","_updating","_dirty","splatIndex","_splatIndices","_offsets","lookup","ceil","_transformsWidth","_transformsHeight","_transforms","_transformIndicesWidth","_transformIndicesHeight","_transformIndices","_worker","DataWorker","updateTransform","wasmModule","onmessage","worldPositions","worldRotations","worldScales","async","initWasm","buildImmediate","waitForWasm","positionsPtr","rotationsPtr","scalesPtr","colorsPtr","selectionPtr","dataPtr","worldPositionsPtr","worldRotationsPtr","worldScalesPtr","_pack","outData","build","serializedSplat","postMessage","getSplat","key","getLocalIndex","markDirty","rebuild","clear","terminate","keys","transforms","transformsWidth","transformsHeight","transformIndices","transformIndicesWidth","transformIndicesHeight","needsRebuild","updating","Color32","r","flatNorm","toHexString","map","padStart","RenderProgram","_outlineThickness","_outlineColor","_renderData","_depthIndex","_chunks","_splatTexture","canvas","worker","u_projection","u_viewport","u_focal","u_view","u_texture","u_transforms","u_transformIndices","u_outlineThickness","u_outlineColor","positionAttribute","indexAttribute","transformsTexture","transformIndicesTexture","vertexBuffer","indexBuffer","getUniformLocation","uniformMatrix4fv","uniform2fv","createWorker","SortWorker","depthIndex","chunks","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","handleObjectAdded","handleObjectRemoved","handleObjectChanged","uniform1f","outlineThickness","uniform4fv","outlineColor","createTexture","uniform1i","createBuffer","getAttribLocation","enableVertexAttribArray","vertexAttribPointer","FLOAT","renderData","activeTexture","TEXTURE0","bindTexture","TEXTURE_2D","splatTexture","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","NEAREST","TEXTURE_MAG_FILTER","texImage2D","RGBA32UI","RGBA_INTEGER","UNSIGNED_INT","TEXTURE1","RGBA32F","RGBA","TEXTURE2","R32UI","RED_INTEGER","detachedPositions","detachedTransforms","detachedTransformIndices","sortData","viewport","clearColor","COLOR_BUFFER_BIT","disable","DEPTH_TEST","enable","BLEND","blendFuncSeparate","ONE_MINUS_DST_ALPHA","ONE","blendEquationSeparate","FUNC_ADD","vertexAttribIPointer","INT","vertexAttribDivisor","drawArraysInstanced","TRIANGLE_FAN","deleteTexture","deleteBuffer","_setOutlineThickness","_setOutlineColor","FadeInPass","speed","renderProgram","u_useDepthFade","u_depthFade","active","_a","WebGLRenderer","optionalCanvas","optionalRenderPasses","_backgroundColor","style","display","boxSizing","margin","padding","appendChild","background","_canvas","_gl","getContext","antialias","renderPasses","_renderProgram","programs","clientWidth","clientHeight","addProgram","removeProgram","backgroundColor","OrbitControls","alpha","beta","radius","enableKeyboardControls","inputTarget","minAngle","maxAngle","minZoom","maxZoom","orbitSpeed","panSpeed","zoomSpeed","dampening","setCameraTarget","desiredTarget","desiredAlpha","desiredBeta","desiredRadius","dragging","panning","lastDist","lastX","lastY","isUpdatingCamera","eulerRotation","newTarget","dx","dy","dz","computeZoomNorm","onKeyDown","code","onKeyUp","onMouseDown","preventDefault","button","clientX","clientY","window","onMouseUp","onMouseMove","zoomNorm","panX","panY","right","up","onWheel","deltaY","onTouchStart","touches","distX","distY","onTouchEnd","onTouchMove","dist","touchX","touchY","direction","rx","ry","moveSpeed","rotateSpeed","stopPropagation","Plane","normal","point","intersect","origin","denominator","ShaderPass","currentScript","src","a11","a12","IntersectionTester","viewPtr","transformsPtr","transformIndicesPtr","depthIndexPtr","chunksPtr","originPtr","directionPtr","resultPtr","allocatedVertexCount","allocatedTransformCount","testPoint","targetAllocatedVertexCount","pow","log2","targetAllocatedTransformCount","transformCount","normalizedX","normalizedY","chunk","floor","ray","_evaluate"],"mappings":"AAEA,MAAMA,EAKF,WAAAC,CAAYC,EAAY,EAAGC,EAAY,EAAGC,EAAY,GAClDC,KAAKH,EAAIA,EACTG,KAAKF,EAAIA,EACTE,KAAKD,EAAIA,CACZ,CAED,MAAAE,CAAOC,GACH,OAAIF,KAAKH,IAAMK,EAAEL,IAGbG,KAAKF,IAAMI,EAAEJ,GAGbE,KAAKD,IAAMG,EAAEH,EAKpB,CAID,GAAAI,CAAID,GACA,MAAiB,iBAANA,EACA,IAAIP,EAAQK,KAAKH,EAAIK,EAAGF,KAAKF,EAAII,EAAGF,KAAKD,EAAIG,GAE7C,IAAIP,EAAQK,KAAKH,EAAIK,EAAEL,EAAGG,KAAKF,EAAII,EAAEJ,EAAGE,KAAKD,EAAIG,EAAEH,EAEjE,CAID,QAAAK,CAASF,GACL,MAAiB,iBAANA,EACA,IAAIP,EAAQK,KAAKH,EAAIK,EAAGF,KAAKF,EAAII,EAAGF,KAAKD,EAAIG,GAE7C,IAAIP,EAAQK,KAAKH,EAAIK,EAAEL,EAAGG,KAAKF,EAAII,EAAEJ,EAAGE,KAAKD,EAAIG,EAAEH,EAEjE,CAKD,QAAAM,CAASH,GACL,MAAiB,iBAANA,EACA,IAAIP,EAAQK,KAAKH,EAAIK,EAAGF,KAAKF,EAAII,EAAGF,KAAKD,EAAIG,GAC7CA,aAAaP,EACb,IAAIA,EAAQK,KAAKH,EAAIK,EAAEL,EAAGG,KAAKF,EAAII,EAAEJ,EAAGE,KAAKD,EAAIG,EAAEH,GAEnD,IAAIJ,EACPK,KAAKH,EAAIK,EAAEI,OAAO,GAAKN,KAAKF,EAAII,EAAEI,OAA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AAQzV,IAAIkpB,EAAWpkB,UAAWgf,EAAe,GAC5DV,EAAW3N,QAAQzV,IAAIkpB,EAAWnkB,OAAQgf,EAAY,GACtDX,EAAW5N,QAAQxV,IAAI8nB,EAAYiL,EAAgB,GACnD3P,EAAWhO,OAAOpV,IAAI+nB,EAAQiL,GAC9B5P,EAAW3N,QAAQzV,IAAI2J,EAAOzH,SAASjG,OAAQg3B,EAAY,GAC3D7P,EAAW3N,QAAQzV,IAAIg0B,EAAI/3B,OAAQi3B,EAAe,GAClD9P,EAAW3N,QAAQzV,IAAIkpB,EAAW/D,WAAY0N,EAAgB,GAE9DzP,EAAW6Q,UACPrB,EACAC,EACAC,EACAjP,EACAC,EACAC,EACAgP,EACAC,EACA9J,EAAWtkB,YACXkvB,EACAb,EACAC,EACAC,GAGJ,MAAMtmB,EAASuW,EAAW5N,QAAQ2d,EAAY,GAC9C,GAAe,aAAXtmB,EAAuB,CAEvB,OADcqc,EAAWvE,SAAS9X,EAErC,CAED,OAAO,IAAI,CAElB"} \ No newline at end of file diff --git a/gsplat/node_modules/gsplat/dist/loaders/Loader.d.ts b/gsplat/node_modules/gsplat/dist/loaders/Loader.d.ts new file mode 100644 index 0000000..9e15b21 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/loaders/Loader.d.ts @@ -0,0 +1,7 @@ +import type { Scene } from "../core/Scene"; +import { Splat } from "../splats/Splat"; +declare class Loader { + static LoadAsync(url: string, scene: Scene, onProgress?: (progress: number) => void, useCache?: boolean): Promise; + static LoadFromFileAsync(file: File, scene: Scene, onProgress?: (progress: number) => void): Promise; +} +export { Loader }; diff --git a/gsplat/node_modules/gsplat/dist/loaders/PLYLoader.d.ts b/gsplat/node_modules/gsplat/dist/loaders/PLYLoader.d.ts new file mode 100644 index 0000000..5bd6b79 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/loaders/PLYLoader.d.ts @@ -0,0 +1,9 @@ +import { Scene } from "../core/Scene"; +import { Splat } from "../splats/Splat"; +declare class PLYLoader { + static SH_C0: number; + static LoadAsync(url: string, scene: Scene, onProgress?: (progress: number) => void, format?: string, useCache?: boolean): Promise; + static LoadFromFileAsync(file: File, scene: Scene, onProgress?: (progress: number) => void, format?: string): Promise; + private static _ParsePLYBuffer; +} +export { PLYLoader }; diff --git a/gsplat/node_modules/gsplat/dist/math/Color32.d.ts b/gsplat/node_modules/gsplat/dist/math/Color32.d.ts new file mode 100644 index 0000000..aa0ae04 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Color32.d.ts @@ -0,0 +1,12 @@ +declare class Color32 { + readonly r: number; + readonly g: number; + readonly b: number; + readonly a: number; + constructor(r?: number, g?: number, b?: number, a?: number); + flat(): number[]; + flatNorm(): number[]; + toHexString(): string; + toString(): string; +} +export { Color32 }; diff --git a/gsplat/node_modules/gsplat/dist/math/Matrix3.d.ts b/gsplat/node_modules/gsplat/dist/math/Matrix3.d.ts new file mode 100644 index 0000000..d683b43 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Matrix3.d.ts @@ -0,0 +1,15 @@ +import { Quaternion } from "./Quaternion"; +import type { Vector3 } from "./Vector3"; +declare class Matrix3 { + readonly buffer: number[]; + constructor(n11?: number, n12?: number, n13?: number, n21?: number, n22?: number, n23?: number, n31?: number, n32?: number, n33?: number); + equals(m: Matrix3): boolean; + multiply(v: Matrix3): Matrix3; + clone(): Matrix3; + static Eye(v?: number): Matrix3; + static Diagonal(v: Vector3): Matrix3; + static RotationFromQuaternion(q: Quaternion): Matrix3; + static RotationFromEuler(m: Vector3): Matrix3; + toString(): string; +} +export { Matrix3 }; diff --git a/gsplat/node_modules/gsplat/dist/math/Matrix4.d.ts b/gsplat/node_modules/gsplat/dist/math/Matrix4.d.ts new file mode 100644 index 0000000..0890f1e --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Matrix4.d.ts @@ -0,0 +1,14 @@ +import { Quaternion } from "./Quaternion"; +import { Vector3 } from "./Vector3"; +declare class Matrix4 { + readonly buffer: number[]; + constructor(n11?: number, n12?: number, n13?: number, n14?: number, n21?: number, n22?: number, n23?: number, n24?: number, n31?: number, n32?: number, n33?: number, n34?: number, n41?: number, n42?: number, n43?: number, n44?: number); + equals(m: Matrix4): boolean; + multiply(m: Matrix4): Matrix4; + clone(): Matrix4; + determinant(): number; + invert(): Matrix4; + static Compose(position: Vector3, rotation: Quaternion, scale: Vector3): Matrix4; + toString(): string; +} +export { Matrix4 }; diff --git a/gsplat/node_modules/gsplat/dist/math/Plane.d.ts b/gsplat/node_modules/gsplat/dist/math/Plane.d.ts new file mode 100644 index 0000000..a79b160 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Plane.d.ts @@ -0,0 +1,8 @@ +import { Vector3 } from "./Vector3"; +declare class Plane { + readonly normal: Vector3; + readonly point: Vector3; + constructor(normal: Vector3, point: Vector3); + intersect(origin: Vector3, direction: Vector3): Vector3 | null; +} +export { Plane }; diff --git a/gsplat/node_modules/gsplat/dist/math/Quaternion.d.ts b/gsplat/node_modules/gsplat/dist/math/Quaternion.d.ts new file mode 100644 index 0000000..ed23f4f --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Quaternion.d.ts @@ -0,0 +1,22 @@ +import { Matrix3 } from "./Matrix3"; +import { Vector3 } from "./Vector3"; +declare class Quaternion { + readonly x: number; + readonly y: number; + readonly z: number; + readonly w: number; + constructor(x?: number, y?: number, z?: number, w?: number); + equals(q: Quaternion): boolean; + normalize(): Quaternion; + multiply(q: Quaternion): Quaternion; + inverse(): Quaternion; + apply(v: Vector3): Vector3; + flat(): number[]; + clone(): Quaternion; + static FromEuler(e: Vector3): Quaternion; + toEuler(): Vector3; + static FromMatrix3(matrix: Matrix3): Quaternion; + static FromAxisAngle(axis: Vector3, angle: number): Quaternion; + toString(): string; +} +export { Quaternion }; diff --git a/gsplat/node_modules/gsplat/dist/math/Vector3.d.ts b/gsplat/node_modules/gsplat/dist/math/Vector3.d.ts new file mode 100644 index 0000000..001250f --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Vector3.d.ts @@ -0,0 +1,26 @@ +import { Matrix4 } from "./Matrix4"; +declare class Vector3 { + readonly x: number; + readonly y: number; + readonly z: number; + constructor(x?: number, y?: number, z?: number); + equals(v: Vector3): boolean; + add(v: number): Vector3; + add(v: Vector3): Vector3; + subtract(v: number): Vector3; + subtract(v: Vector3): Vector3; + multiply(v: number): Vector3; + multiply(v: Vector3): Vector3; + multiply(v: Matrix4): Vector3; + cross(v: Vector3): Vector3; + dot(v: Vector3): number; + lerp(v: Vector3, t: number): Vector3; + magnitude(): number; + distanceTo(v: Vector3): number; + normalize(): Vector3; + flat(): number[]; + clone(): Vector3; + toString(): string; + static One(value?: number): Vector3; +} +export { Vector3 }; diff --git a/gsplat/node_modules/gsplat/dist/math/Vector4.d.ts b/gsplat/node_modules/gsplat/dist/math/Vector4.d.ts new file mode 100644 index 0000000..bac7b86 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/math/Vector4.d.ts @@ -0,0 +1,25 @@ +import { Matrix4 } from "./Matrix4"; +declare class Vector4 { + readonly x: number; + readonly y: number; + readonly z: number; + readonly w: number; + constructor(x?: number, y?: number, z?: number, w?: number); + equals(v: Vector4): boolean; + add(v: number): Vector4; + add(v: Vector4): Vector4; + subtract(v: number): Vector4; + subtract(v: Vector4): Vector4; + multiply(v: number): Vector4; + multiply(v: Vector4): Vector4; + multiply(v: Matrix4): Vector4; + dot(v: Vector4): number; + lerp(v: Vector4, t: number): Vector4; + magnitude(): number; + distanceTo(v: Vector4): number; + normalize(): Vector4; + flat(): number[]; + clone(): Vector4; + toString(): string; +} +export { Vector4 }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/WebGLRenderer.d.ts b/gsplat/node_modules/gsplat/dist/renderers/WebGLRenderer.d.ts new file mode 100644 index 0000000..11e76f1 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/WebGLRenderer.d.ts @@ -0,0 +1,24 @@ +import type { Scene } from "../core/Scene"; +import { Camera } from "../cameras/Camera"; +import { Color32 } from "../math/Color32"; +import { ShaderProgram } from "./webgl/programs/ShaderProgram"; +import { RenderProgram } from "./webgl/programs/RenderProgram"; +import { ShaderPass } from "./webgl/passes/ShaderPass"; +export declare class WebGLRenderer { + private _canvas; + private _gl; + private _backgroundColor; + private _renderProgram; + addProgram: (program: ShaderProgram) => void; + removeProgram: (program: ShaderProgram) => void; + resize: () => void; + setSize: (width: number, height: number) => void; + render: (scene: Scene, camera: Camera) => void; + dispose: () => void; + constructor(optionalCanvas?: HTMLCanvasElement | null, optionalRenderPasses?: ShaderPass[] | null); + get canvas(): HTMLCanvasElement; + get gl(): WebGL2RenderingContext; + get renderProgram(): RenderProgram; + get backgroundColor(): Color32; + set backgroundColor(value: Color32); +} diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/FadeInPass.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/FadeInPass.d.ts new file mode 100644 index 0000000..2b4a8ea --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/FadeInPass.d.ts @@ -0,0 +1,9 @@ +import { ShaderProgram } from "../programs/ShaderProgram"; +import { ShaderPass } from "./ShaderPass"; +declare class FadeInPass implements ShaderPass { + initialize: (program: ShaderProgram) => void; + render: () => void; + constructor(speed?: number); + dispose(): void; +} +export { FadeInPass }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/ShaderPass.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/ShaderPass.d.ts new file mode 100644 index 0000000..ec48398 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/passes/ShaderPass.d.ts @@ -0,0 +1,7 @@ +import { ShaderProgram } from "../programs/ShaderProgram"; +declare class ShaderPass { + initialize(program: ShaderProgram): void; + render(): void; + dispose(): void; +} +export { ShaderPass }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/RenderProgram.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/RenderProgram.d.ts new file mode 100644 index 0000000..2715a21 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/RenderProgram.d.ts @@ -0,0 +1,31 @@ +import { ShaderProgram } from "./ShaderProgram"; +import { ShaderPass } from "../passes/ShaderPass"; +import { RenderData } from "../utils/RenderData"; +import { Color32 } from "../../../math/Color32"; +import { WebGLRenderer } from "../../WebGLRenderer"; +declare class RenderProgram extends ShaderProgram { + private _outlineThickness; + private _outlineColor; + private _renderData; + private _depthIndex; + private _chunks; + private _splatTexture; + protected _initialize: () => void; + protected _resize: () => void; + protected _render: () => void; + protected _dispose: () => void; + private _setOutlineThickness; + private _setOutlineColor; + constructor(renderer: WebGLRenderer, passes: ShaderPass[]); + get renderData(): RenderData | null; + get depthIndex(): Uint32Array | null; + get chunks(): Uint8Array | null; + get splatTexture(): WebGLTexture | null; + get outlineThickness(): number; + set outlineThickness(value: number); + get outlineColor(): Color32; + set outlineColor(value: Color32); + protected _getVertexSource(): string; + protected _getFragmentSource(): string; +} +export { RenderProgram }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/ShaderProgram.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/ShaderProgram.d.ts new file mode 100644 index 0000000..f8cbb5b --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/programs/ShaderProgram.d.ts @@ -0,0 +1,31 @@ +import { Camera } from "../../../cameras/Camera"; +import { Scene } from "../../../core/Scene"; +import { WebGLRenderer } from "../../WebGLRenderer"; +import { ShaderPass } from "../passes/ShaderPass"; +declare abstract class ShaderProgram { + private _renderer; + private _program; + private _passes; + protected _scene: Scene | null; + protected _camera: Camera | null; + protected _started: boolean; + protected _initialized: boolean; + protected abstract _initialize: () => void; + protected abstract _resize: () => void; + protected abstract _render: () => void; + protected abstract _dispose: () => void; + initialize: () => void; + resize: () => void; + render: (scene: Scene, camera: Camera) => void; + dispose: () => void; + constructor(renderer: WebGLRenderer, passes: ShaderPass[]); + get renderer(): WebGLRenderer; + get scene(): Scene | null; + get camera(): Camera | null; + get program(): WebGLProgram; + get passes(): ShaderPass[]; + get started(): boolean; + protected abstract _getVertexSource(): string; + protected abstract _getFragmentSource(): string; +} +export { ShaderProgram }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/DataWorker.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/DataWorker.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/DataWorker.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/IntersectionTester.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/IntersectionTester.d.ts new file mode 100644 index 0000000..000b703 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/IntersectionTester.d.ts @@ -0,0 +1,7 @@ +import { Splat } from "../../../splats/Splat"; +import { RenderProgram } from "../programs/RenderProgram"; +declare class IntersectionTester { + testPoint: (x: number, y: number) => Splat | null; + constructor(renderProgram: RenderProgram); +} +export { IntersectionTester }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/RenderData.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/RenderData.d.ts new file mode 100644 index 0000000..b7ad13b --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/RenderData.d.ts @@ -0,0 +1,47 @@ +import { Scene } from "../../../core/Scene"; +import { Splat } from "../../../splats/Splat"; +declare class RenderData { + dataChanged: boolean; + transformsChanged: boolean; + private _splatIndices; + private _offsets; + private _data; + private _width; + private _height; + private _transforms; + private _transformsWidth; + private _transformsHeight; + private _transformIndices; + private _transformIndicesWidth; + private _transformIndicesHeight; + private _positions; + private _rotations; + private _scales; + private _vertexCount; + private _updating; + private _dirty; + private _worker; + getSplat: (index: number) => Splat | null; + getLocalIndex: (splat: Splat, index: number) => number; + markDirty: (splat: Splat) => void; + rebuild: () => void; + dispose: () => void; + constructor(scene: Scene); + get offsets(): Map; + get data(): Uint32Array; + get width(): number; + get height(): number; + get transforms(): Float32Array; + get transformsWidth(): number; + get transformsHeight(): number; + get transformIndices(): Uint32Array; + get transformIndicesWidth(): number; + get transformIndicesHeight(): number; + get positions(): Float32Array; + get rotations(): Float32Array; + get scales(): Float32Array; + get vertexCount(): number; + get needsRebuild(): boolean; + get updating(): boolean; +} +export { RenderData }; diff --git a/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/SortWorker.d.ts b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/SortWorker.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/renderers/webgl/utils/SortWorker.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gsplat/node_modules/gsplat/dist/splats/Splat.d.ts b/gsplat/node_modules/gsplat/dist/splats/Splat.d.ts new file mode 100644 index 0000000..b9e7c61 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/splats/Splat.d.ts @@ -0,0 +1,13 @@ +import { SplatData } from "./SplatData"; +import { Object3D } from "../core/Object3D"; +declare class Splat extends Object3D { + selectedChanged: boolean; + private _data; + private _selected; + constructor(splat?: SplatData | undefined); + saveToFile(name?: string | null): void; + get data(): SplatData; + get selected(): boolean; + set selected(selected: boolean); +} +export { Splat }; diff --git a/gsplat/node_modules/gsplat/dist/splats/SplatData.d.ts b/gsplat/node_modules/gsplat/dist/splats/SplatData.d.ts new file mode 100644 index 0000000..aee74d1 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/splats/SplatData.d.ts @@ -0,0 +1,27 @@ +import { Vector3 } from "../math/Vector3"; +import { Quaternion } from "../math/Quaternion"; +declare class SplatData { + static RowLength: number; + changed: boolean; + detached: boolean; + private _vertexCount; + private _positions; + private _rotations; + private _scales; + private _colors; + private _selection; + translate: (translation: Vector3) => void; + rotate: (rotation: Quaternion) => void; + scale: (scale: Vector3) => void; + serialize: () => Uint8Array; + reattach: (positions: ArrayBufferLike, rotations: ArrayBufferLike, scales: ArrayBufferLike, colors: ArrayBufferLike, selection: ArrayBufferLike) => void; + constructor(vertexCount?: number, positions?: Float32Array | null, rotations?: Float32Array | null, scales?: Float32Array | null, colors?: Uint8Array | null); + static Deserialize(data: Uint8Array): SplatData; + get vertexCount(): number; + get positions(): Float32Array; + get rotations(): Float32Array; + get scales(): Float32Array; + get colors(): Uint8Array; + get selection(): Uint8Array; +} +export { SplatData }; diff --git a/gsplat/node_modules/gsplat/dist/wasm/data.d.ts b/gsplat/node_modules/gsplat/dist/wasm/data.d.ts new file mode 100644 index 0000000..778638c --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/data.d.ts @@ -0,0 +1,20 @@ +interface WasmModule { + _malloc(size: number): number; + _free(ptr: number): void; + _pack( + selected: boolean, + vertexCount: number, + positions: number, + rotations: number, + scales: number, + colors: number, + selection: number, + data: number, + worldPositions: number, + worldRotations: number, + worldScales: number, + ): void; +} + +declare const loadWasm: () => Promise; +export default loadWasm; diff --git a/gsplat/node_modules/gsplat/dist/wasm/data.js b/gsplat/node_modules/gsplat/dist/wasm/data.js new file mode 100644 index 0000000..6b32f77 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/data.js @@ -0,0 +1,16 @@ + +var loadWasm = (() => { + var _scriptDir = import.meta.url; + + return ( +function(moduleArg = {}) { + +var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile="data:application/octet-stream;base64,AGFzbQEAAAABZw9gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAn9/AGABfwF/YAN/f38Bf2ABfwBgAABgB39/f39/f38AYAJ9fQF/YAR/f35+AGABfQF/YAt/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAQBYQFlAAEBYQFmAAkBYQFnAAUBYQFoAAQBYQFpAAABYQFqAAQDGxoGBQoHCAcECAsBAAEHDAUN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OAsAAPwKAABOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQDMDAAAaAsAAFwLAAAAAAAA3AsAAAIAAAADAAAABAAAAAUAAAAGAAAATjEwX19jeHhhYml2MTIzX19mdW5kYW1lbnRhbF90eXBlX2luZm9FAMwMAAC0CwAA/AoAAHYAAACgCwAA6AsAAGIAAACgCwAA9AsAAGMAAACgCwAAAAwAAGgAAACgCwAADAwAAGEAAACgCwAAGAwAAHMAAACgCwAAJAwAAHQAAACgCwAAMAwAAGkAAACgCwAAPAwAAGoAAACgCwAASAwAAGwAAACgCwAAVAwAAG0AAACgCwAAYAwAAHgAAACgCwAAbAwAAHkAAACgCwAAeAwAAGYAAACgCwAAhAwAAGQAAACgCwAAkAwAAAAAAAAsCwAAAgAAAAcAAAAEAAAABQAAAAgAAAAJAAAACgAAAAsAAAAAAAAAFA0AAAIAAAAMAAAABAAAAAUAAAAIAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["k"];updateMemoryViews();addOnInit(wasmExports["l"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["l"])();var _pack=Module["_pack"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)=>(_pack=Module["_pack"]=wasmExports["m"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["__cxa_is_pointer_type"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return moduleArg.ready +} +); +})(); +; +export default loadWasm; \ No newline at end of file diff --git a/gsplat/node_modules/gsplat/dist/wasm/intersect.d.ts b/gsplat/node_modules/gsplat/dist/wasm/intersect.d.ts new file mode 100644 index 0000000..41748a6 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/intersect.d.ts @@ -0,0 +1,21 @@ +interface WasmModule { + _malloc(size: number): number; + _free(ptr: number): void; + _evaluate( + transforms: number, + transformIndices: number, + positions: number, + rotations: number, + scales: number, + depthIndex: number, + chunks: number, + count: number, + chunk: number, + origin: number, + direction: number, + result: number, + ): void; +} + +declare const loadWasm: () => Promise; +export default loadWasm; diff --git a/gsplat/node_modules/gsplat/dist/wasm/intersect.js b/gsplat/node_modules/gsplat/dist/wasm/intersect.js new file mode 100644 index 0000000..1eb2527 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/intersect.js @@ -0,0 +1,16 @@ + +var loadWasm = (() => { + var _scriptDir = import.meta.url; + + return ( +function(moduleArg = {}) { + +var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile="data:application/octet-stream;base64,AGFzbQEAAAABXg1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgB39/f39/f38AYAR/f35+AGANf39/f39/f39/f39/fwBgAn9/AX8CPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAkBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGhkGBAcIBwgKAQAAAQcBBAQLAwMCAgAADAYGBAUBcAEQEAUHAQGAAoCAAgYIAX8BQfCfBAsHGQYBawIAAWwADQFtABkBbgEAAW8AGAFwAA4JFQEAQQELDw8XDBUVIgwhGhwfDBsdHgrfUxlxAQF/IAJFBEAgACgCBCABKAIERg8LIAAgAUYEQEEBDwsCQCAAKAIEIgItAAAiAEUgACABKAIEIgEtAAAiA0dyDQADQCABLQABIQMgAi0AASIARQ0BIAFBAWohASACQQFqIQIgACADRg0ACwsgACADRgtPAQ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ZFRQAApAwAAIgKAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lkRUUAAKQMAACwCgAATjEwX19jeHhhYml2MTE2X19zaGltX3R5cGVfaW5mb0UAAAAAzAwAANgKAAAwDQAATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAAAAzAwAAAgLAAD8CgAATjEwX19jeHhhYml2MTE3X19wYmFzZV90eXBlX2luZm9FAAAAzAwAADgLAAD8CgAATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UAzAwAAGgLAABcCwAAAAAAANwLAAACAAAAAwAAAAQAAAAFAAAABgAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQDMDAAAtAsAAPwKAAB2AAAAoAsAAOgLAABiAAAAoAsAAPQLAABjAAAAoAsAAAAMAABoAAAAoAsAAAwMAABhAAAAoAsAABgMAABzAAAAoAsAACQMAAB0AAAAoAsAADAMAABpAAAAoAsAADwMAABqAAAAoAsAAEgMAABsAAAAoAsAAFQMAABtAAAAoAsAAGAMAAB4AAAAoAsAAGwMAAB5AAAAoAsAAHgMAABmAAAAoAsAAIQMAABkAAAAoAsAAJAMAAAAAAAALAsAAAIAAAAHAAAABAAAAAUAAAAIAAAACQAAAAoAAAALAAAAAAAAABQNAAACAAAADAAAAAQAAAAFAAAACAAAAA0AAAAOAAAADwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAADMDAAA7AwAACwLAABTdDl0eXBlX2luZm8AAAAApAwAACANAEG4GgsD8A8B";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["k"];updateMemoryViews();addOnInit(wasmExports["l"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["l"])();var _evaluate=Module["_evaluate"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)=>(_evaluate=Module["_evaluate"]=wasmExports["m"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["__cxa_is_pointer_type"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return moduleArg.ready +} +); +})(); +; +export default loadWasm; \ No newline at end of file diff --git a/gsplat/node_modules/gsplat/dist/wasm/sort.d.ts b/gsplat/node_modules/gsplat/dist/wasm/sort.d.ts new file mode 100644 index 0000000..2ee6959 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/sort.d.ts @@ -0,0 +1,19 @@ +interface WasmModule { + _malloc(size: number): number; + _free(ptr: number): void; + _sort( + viewProj: number, + transforms: number, + transformIndices: number, + vertexCount: number, + positions: number, + chunks: number, + depthBuffer: number, + depthIndex: number, + starts: number, + counts: number, + ): void; +} + +declare const loadWasm: () => Promise; +export default loadWasm; diff --git a/gsplat/node_modules/gsplat/dist/wasm/sort.js b/gsplat/node_modules/gsplat/dist/wasm/sort.js new file mode 100644 index 0000000..ba20879 --- /dev/null +++ b/gsplat/node_modules/gsplat/dist/wasm/sort.js @@ -0,0 +1,16 @@ + +var loadWasm = (() => { + var _scriptDir = import.meta.url; + + return ( +function(moduleArg = {}) { + +var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var wasmBinaryFile;wasmBinaryFile="data:application/octet-stream;base64,AGFzbQEAAAABWw1gBH9/f38AYAN/f38AYAV/f39/fwBgBn9/f39/fwBgAX8Bf2ACf38AYAN/f38Bf2ABfwBgAABgAn9/AX9gB39/f39/f38AYAR/f35+AGAKf39/f39/f39/fwACPQoBYQFhAAEBYQFiAAIBYQFjAAEBYQFkAAUBYQFlAAEBYQFmAAoBYQFnAAQBYQFoAAUBYQFpAAABYQFqAAUDGRgGBAcIBwcJCwgBAAEEBAMDAgIAAAkGBgwEBQFwARAQBQ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IAAAADQAAAA4AAAAPAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAMwMAADsDAAALAsAAFN0OXR5cGVfaW5mbwAAAACkDAAAIA0AQbgaCwNADwE=";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["k"];updateMemoryViews();addOnInit(wasmExports["l"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};handleAllocatorInit();init_emval();var wasmImports={f:__embind_register_bigint,i:__embind_register_bool,h:__embind_register_emval,e:__embind_register_float,b:__embind_register_integer,a:__embind_register_memory_view,d:__embind_register_std_string,c:__embind_register_std_wstring,j:__embind_register_void,g:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["l"])();var _sort=Module["_sort"]=(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)=>(_sort=Module["_sort"]=wasmExports["m"])(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9);var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["__cxa_is_pointer_type"])(a0);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return moduleArg.ready +} +); +})(); +; +export default loadWasm; \ No newline at end of file diff --git a/gsplat/node_modules/gsplat/package.json b/gsplat/node_modules/gsplat/package.json new file mode 100644 index 0000000..8423470 --- /dev/null +++ b/gsplat/node_modules/gsplat/package.json @@ -0,0 +1,58 @@ +{ + "name": "gsplat", + "version": "1.0.1", + "description": "JavaScript Gaussian Splatting library", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "type": "module", + "scripts": { + "build:wasm": "sh ./compile_wasm.sh", + "copy:wasm": "ncp ./src/wasm ./dist/wasm", + "build": "npm run build:wasm && rollup -c && npm run copy:wasm", + "test": "jest --passWithNoTests", + "lint": "eslint \"src/**/*.ts\" \"examples/**/*.ts\"", + "format": "prettier --write \"src/**/*.ts\" \"examples/**/*.ts\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dylanebert/splat.js.git" + }, + "keywords": [ + "gsplat", + "gaussian splatting", + "javascript", + "3d", + "webgl" + ], + "author": "dylanebert", + "license": "MIT", + "bugs": { + "url": "https://github.com/dylanebert/splat.js/issues" + }, + "homepage": "https://github.com/dylanebert/splat.js#readme", + "devDependencies": { + "@jest/globals": "^29.7.0", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-replace": "^5.0.5", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^11.1.5", + "@types/jest": "^29.5.8", + "@types/node": "^20.8.10", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", + "eslint": "^8.52.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.1", + "jest": "^29.7.0", + "ncp": "^2.0.0", + "prettier": "^3.0.3", + "rollup": "^4.3.0", + "rollup-plugin-web-worker-loader": "^1.6.1", + "ts-jest": "^29.1.1", + "typescript": "^5.2.2" + }, + "files": [ + "dist/**/*" + ] +} diff --git a/gsplat/node_modules/nanoid/LICENSE b/gsplat/node_modules/nanoid/LICENSE new file mode 100644 index 0000000..37f56aa --- /dev/null +++ b/gsplat/node_modules/nanoid/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2017 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/gsplat/node_modules/nanoid/README.md b/gsplat/node_modules/nanoid/README.md new file mode 100644 index 0000000..35abb57 --- /dev/null +++ b/gsplat/node_modules/nanoid/README.md @@ -0,0 +1,39 @@ +# Nano ID + +Nano ID logo by Anton Lovchikov + +**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) + +A tiny, secure, URL-friendly, unique string ID generator for JavaScript. + +> “An amazing level of senseless perfectionism, +> which is simply impossible not to respect.” + +* **Small.** 130 bytes (minified and gzipped). No dependencies. + [Size Limit] controls the size. +* **Fast.** It is 2 times faster than UUID. +* **Safe.** It uses hardware random generator. Can be used in clusters. +* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`). + So ID size was reduced from 36 to 21 symbols. +* **Portable.** Nano ID was ported + to [20 programming languages](#other-programming-languages). + +```js +import { nanoid } from 'nanoid' +model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" +``` + +Supports modern browsers, IE [with Babel], Node.js and React Native. + +[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ +[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ +[Size Limit]: https://github.com/ai/size-limit + + + Sponsored by Evil Martians + + +## Docs +Read full docs **[here](https://github.com/ai/nanoid#readme)**. diff --git a/gsplat/node_modules/nanoid/async/index.browser.cjs b/gsplat/node_modules/nanoid/async/index.browser.cjs new file mode 100644 index 0000000..7e5bba8 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.browser.cjs @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +module.exports = { nanoid, customAlphabet, random } diff --git a/gsplat/node_modules/nanoid/async/index.browser.js b/gsplat/node_modules/nanoid/async/index.browser.js new file mode 100644 index 0000000..5ece04d --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.browser.js @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +export { nanoid, customAlphabet, random } diff --git a/gsplat/node_modules/nanoid/async/index.cjs b/gsplat/node_modules/nanoid/async/index.cjs new file mode 100644 index 0000000..50db105 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.cjs @@ -0,0 +1,35 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('../url-alphabet/index.cjs') +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +module.exports = { nanoid, customAlphabet, random } diff --git a/gsplat/node_modules/nanoid/async/index.d.ts b/gsplat/node_modules/nanoid/async/index.d.ts new file mode 100644 index 0000000..9e91965 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.d.ts @@ -0,0 +1,56 @@ +/** + * Generate secure URL-friendly unique ID. The non-blocking version. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid/async' + * nanoid().then(id => { + * model.id = id + * }) + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A promise with a random string. + */ +export function nanoid(size?: number): Promise + +/** + * A low-level function. + * Generate secure unique ID with custom alphabet. The non-blocking version. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A function that returns a promise with a random string. + * + * ```js + * import { customAlphabet } from 'nanoid/async' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid().then(id => { + * model.id = id //=> "8ё56а" + * }) + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => Promise + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { random } from 'nanoid/async' + * random(5).then(bytes => { + * bytes //=> [10, 67, 212, 67, 89] + * }) + * ``` + * + * @param bytes Size of the array. + * @returns A promise with a random bytes array. + */ +export function random(bytes: number): Promise diff --git a/gsplat/node_modules/nanoid/async/index.js b/gsplat/node_modules/nanoid/async/index.js new file mode 100644 index 0000000..803fad6 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.js @@ -0,0 +1,35 @@ +import crypto from 'crypto' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/gsplat/node_modules/nanoid/async/index.native.js b/gsplat/node_modules/nanoid/async/index.native.js new file mode 100644 index 0000000..5cb3d57 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/index.native.js @@ -0,0 +1,26 @@ +import { getRandomBytesAsync } from 'expo-random' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = getRandomBytesAsync +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/gsplat/node_modules/nanoid/async/package.json b/gsplat/node_modules/nanoid/async/package.json new file mode 100644 index 0000000..578cdb4 --- /dev/null +++ b/gsplat/node_modules/nanoid/async/package.json @@ -0,0 +1,12 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": { + "./index.js": "./index.native.js" + }, + "browser": { + "./index.js": "./index.browser.js", + "./index.cjs": "./index.browser.cjs" + } +} \ No newline at end of file diff --git a/gsplat/node_modules/nanoid/bin/nanoid.cjs b/gsplat/node_modules/nanoid/bin/nanoid.cjs new file mode 100755 index 0000000..c76db0f --- /dev/null +++ b/gsplat/node_modules/nanoid/bin/nanoid.cjs @@ -0,0 +1,55 @@ +#!/usr/bin/env node + +let { nanoid, customAlphabet } = require('..') + +function print(msg) { + process.stdout.write(msg + '\n') +} + +function error(msg) { + process.stderr.write(msg + '\n') + process.exit(1) +} + +if (process.argv.includes('--help') || process.argv.includes('-h')) { + print(` + Usage + $ nanoid [options] + + Options + -s, --size Generated ID size + -a, --alphabet Alphabet to use + -h, --help Show this help + + Examples + $ nanoid --s 15 + S9sBF77U6sDB8Yg + + $ nanoid --size 10 --alphabet abc + bcabababca`) + process.exit() +} + +let alphabet, size +for (let i = 2; i < process.argv.length; i++) { + let arg = process.argv[i] + if (arg === '--size' || arg === '-s') { + size = Number(process.argv[i + 1]) + i += 1 + if (Number.isNaN(size) || size <= 0) { + error('Size must be positive integer') + } + } else if (arg === '--alphabet' || arg === '-a') { + alphabet = process.argv[i + 1] + i += 1 + } else { + error('Unknown argument ' + arg) + } +} + +if (alphabet) { + let customNanoid = customAlphabet(alphabet, size) + print(customNanoid()) +} else { + print(nanoid(size)) +} diff --git a/gsplat/node_modules/nanoid/index.browser.cjs b/gsplat/node_modules/nanoid/index.browser.cjs new file mode 100644 index 0000000..f800d6f --- /dev/null +++ b/gsplat/node_modules/nanoid/index.browser.cjs @@ -0,0 +1,34 @@ +let { urlAlphabet } = require('./url-alphabet/index.cjs') +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/gsplat/node_modules/nanoid/index.browser.js b/gsplat/node_modules/nanoid/index.browser.js new file mode 100644 index 0000000..8b3139b --- /dev/null +++ b/gsplat/node_modules/nanoid/index.browser.js @@ -0,0 +1,34 @@ +import { urlAlphabet } from './url-alphabet/index.js' +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/gsplat/node_modules/nanoid/index.cjs b/gsplat/node_modules/nanoid/index.cjs new file mode 100644 index 0000000..0fa85e9 --- /dev/null +++ b/gsplat/node_modules/nanoid/index.cjs @@ -0,0 +1,45 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('./url-alphabet/index.cjs') +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/gsplat/node_modules/nanoid/index.d.cts b/gsplat/node_modules/nanoid/index.d.cts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/gsplat/node_modules/nanoid/index.d.cts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/gsplat/node_modules/nanoid/index.d.ts b/gsplat/node_modules/nanoid/index.d.ts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/gsplat/node_modules/nanoid/index.d.ts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/gsplat/node_modules/nanoid/index.js b/gsplat/node_modules/nanoid/index.js new file mode 100644 index 0000000..21e155f --- /dev/null +++ b/gsplat/node_modules/nanoid/index.js @@ -0,0 +1,45 @@ +import crypto from 'crypto' +import { urlAlphabet } from './url-alphabet/index.js' +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/gsplat/node_modules/nanoid/nanoid.js b/gsplat/node_modules/nanoid/nanoid.js new file mode 100644 index 0000000..ec242ea --- /dev/null +++ b/gsplat/node_modules/nanoid/nanoid.js @@ -0,0 +1 @@ +export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); \ No newline at end of file diff --git a/gsplat/node_modules/nanoid/non-secure/index.cjs b/gsplat/node_modules/nanoid/non-secure/index.cjs new file mode 100644 index 0000000..09d57cd --- /dev/null +++ b/gsplat/node_modules/nanoid/non-secure/index.cjs @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +module.exports = { nanoid, customAlphabet } diff --git a/gsplat/node_modules/nanoid/non-secure/index.d.ts b/gsplat/node_modules/nanoid/non-secure/index.d.ts new file mode 100644 index 0000000..4965322 --- /dev/null +++ b/gsplat/node_modules/nanoid/non-secure/index.d.ts @@ -0,0 +1,33 @@ +/** + * Generate URL-friendly unique ID. This method uses the non-secure + * predictable random generator with bigger collision probability. + * + * ```js + * import { nanoid } from 'nanoid/non-secure' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate a unique ID based on a custom alphabet. + * This method uses the non-secure predictable random generator + * with bigger collision probability. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * import { customAlphabet } from 'nanoid/non-secure' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * model.id = //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string diff --git a/gsplat/node_modules/nanoid/non-secure/index.js b/gsplat/node_modules/nanoid/non-secure/index.js new file mode 100644 index 0000000..e7e19ad --- /dev/null +++ b/gsplat/node_modules/nanoid/non-secure/index.js @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +export { nanoid, customAlphabet } diff --git a/gsplat/node_modules/nanoid/non-secure/package.json b/gsplat/node_modules/nanoid/non-secure/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/gsplat/node_modules/nanoid/non-secure/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/gsplat/node_modules/nanoid/package.json b/gsplat/node_modules/nanoid/package.json new file mode 100644 index 0000000..4f24d96 --- /dev/null +++ b/gsplat/node_modules/nanoid/package.json @@ -0,0 +1,88 @@ +{ + "name": "nanoid", + "version": "3.3.7", + "description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", + "keywords": [ + "uuid", + "random", + "id", + "url" + ], + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "ai/nanoid", + "browser": { + "./index.js": "./index.browser.js", + "./async/index.js": "./async/index.browser.js", + "./async/index.cjs": "./async/index.browser.cjs", + "./index.cjs": "./index.browser.cjs" + }, + "react-native": "index.js", + "bin": "./bin/nanoid.cjs", + "sideEffects": false, + "types": "./index.d.ts", + "type": "module", + "main": "index.cjs", + "module": "index.js", + "exports": { + ".": { + "browser": "./index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./package.json": "./package.json", + "./async/package.json": "./async/package.json", + "./async": { + "browser": "./async/index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./async/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./async/index.js" + }, + "default": "./async/index.js" + }, + "./non-secure/package.json": "./non-secure/package.json", + "./non-secure": { + "require": { + "types": "./index.d.cts", + "default": "./non-secure/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./non-secure/index.js" + }, + "default": "./non-secure/index.js" + }, + "./url-alphabet/package.json": "./url-alphabet/package.json", + "./url-alphabet": { + "require": { + "types": "./index.d.cts", + "default": "./url-alphabet/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./url-alphabet/index.js" + }, + "default": "./url-alphabet/index.js" + } + } +} \ No newline at end of file diff --git a/gsplat/node_modules/nanoid/url-alphabet/index.cjs b/gsplat/node_modules/nanoid/url-alphabet/index.cjs new file mode 100644 index 0000000..757b709 --- /dev/null +++ b/gsplat/node_modules/nanoid/url-alphabet/index.cjs @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +module.exports = { urlAlphabet } diff --git a/gsplat/node_modules/nanoid/url-alphabet/index.js b/gsplat/node_modules/nanoid/url-alphabet/index.js new file mode 100644 index 0000000..c2782e5 --- /dev/null +++ b/gsplat/node_modules/nanoid/url-alphabet/index.js @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +export { urlAlphabet } diff --git a/gsplat/node_modules/nanoid/url-alphabet/package.json b/gsplat/node_modules/nanoid/url-alphabet/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/gsplat/node_modules/nanoid/url-alphabet/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/gsplat/node_modules/picocolors/LICENSE b/gsplat/node_modules/picocolors/LICENSE new file mode 100644 index 0000000..496098c --- /dev/null +++ b/gsplat/node_modules/picocolors/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/gsplat/node_modules/picocolors/README.md b/gsplat/node_modules/picocolors/README.md new file mode 100644 index 0000000..8e47aa8 --- /dev/null +++ b/gsplat/node_modules/picocolors/README.md @@ -0,0 +1,21 @@ +# picocolors + +The tiniest and the fastest library for terminal output formatting with ANSI colors. + +```javascript +import pc from "picocolors" + +console.log( + pc.green(`How are ${pc.italic(`you`)} doing?`) +) +``` + +- **No dependencies.** +- **14 times** smaller and **2 times** faster than chalk. +- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. +- Node.js v6+ & browsers support. Support for both CJS and ESM projects. +- TypeScript type declarations included. +- [`NO_COLOR`](https://no-color.org/) friendly. + +## Docs +Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/gsplat/node_modules/picocolors/package.json b/gsplat/node_modules/picocolors/package.json new file mode 100644 index 0000000..85a12d5 --- /dev/null +++ b/gsplat/node_modules/picocolors/package.json @@ -0,0 +1,25 @@ +{ + "name": "picocolors", + "version": "1.0.0", + "main": "./picocolors.js", + "types": "./picocolors.d.ts", + "browser": { + "./picocolors.js": "./picocolors.browser.js" + }, + "sideEffects": false, + "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", + "files": [ + "picocolors.*", + "types.ts" + ], + "keywords": [ + "terminal", + "colors", + "formatting", + "cli", + "console" + ], + "author": "Alexey Raspopov", + "repository": "alexeyraspopov/picocolors", + "license": "ISC" +} diff --git a/gsplat/node_modules/picocolors/picocolors.browser.js b/gsplat/node_modules/picocolors/picocolors.browser.js new file mode 100644 index 0000000..5eb9fbe --- /dev/null +++ b/gsplat/node_modules/picocolors/picocolors.browser.js @@ -0,0 +1,4 @@ +var x=String; +var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}}; +module.exports=create(); +module.exports.createColors = create; diff --git a/gsplat/node_modules/picocolors/picocolors.d.ts b/gsplat/node_modules/picocolors/picocolors.d.ts new file mode 100644 index 0000000..94e146a --- /dev/null +++ b/gsplat/node_modules/picocolors/picocolors.d.ts @@ -0,0 +1,5 @@ +import { Colors } from "./types" + +declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } + +export = picocolors diff --git a/gsplat/node_modules/picocolors/picocolors.js b/gsplat/node_modules/picocolors/picocolors.js new file mode 100644 index 0000000..fdb6304 --- /dev/null +++ b/gsplat/node_modules/picocolors/picocolors.js @@ -0,0 +1,58 @@ +let tty = require("tty") + +let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty.isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env) + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input + let index = string.indexOf(close, open.length) + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + } + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace + let end = string.substring(index + close.length) + let nextIndex = end.indexOf(close) + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +} + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}) + +module.exports = createColors() +module.exports.createColors = createColors diff --git a/gsplat/node_modules/picocolors/types.ts b/gsplat/node_modules/picocolors/types.ts new file mode 100644 index 0000000..b4bacee --- /dev/null +++ b/gsplat/node_modules/picocolors/types.ts @@ -0,0 +1,30 @@ +export type Formatter = (input: string | number | null | undefined) => string + +export interface Colors { + isColorSupported: boolean + reset: Formatter + bold: Formatter + dim: Formatter + italic: Formatter + underline: Formatter + inverse: Formatter + hidden: Formatter + strikethrough: Formatter + black: Formatter + red: Formatter + green: Formatter + yellow: Formatter + blue: Formatter + magenta: Formatter + cyan: Formatter + white: Formatter + gray: Formatter + bgBlack: Formatter + bgRed: Formatter + bgGreen: Formatter + bgYellow: Formatter + bgBlue: Formatter + bgMagenta: Formatter + bgCyan: Formatter + bgWhite: Formatter +} diff --git a/gsplat/node_modules/postcss/LICENSE b/gsplat/node_modules/postcss/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/gsplat/node_modules/postcss/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/gsplat/node_modules/postcss/README.md b/gsplat/node_modules/postcss/README.md new file mode 100644 index 0000000..9b646dd --- /dev/null +++ b/gsplat/node_modules/postcss/README.md @@ -0,0 +1,28 @@ +# PostCSS + +Philosopher’s stone, logo of PostCSS + +PostCSS is a tool for transforming styles with JS plugins. +These plugins can lint your CSS, support variables and mixins, +transpile future CSS syntax, inline images, and more. + +PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, +and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins is one of the most popular CSS tools. + +--- + +  Made in Evil Martians, product consulting for developer tools. + +--- + +[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree +[Evil Martians]: https://evilmartians.com/?utm_source=postcss +[Autoprefixer]: https://github.com/postcss/autoprefixer +[Stylelint]: https://stylelint.io/ +[plugins]: https://github.com/postcss/postcss#plugins + + +## Docs +Read full docs **[here](https://postcss.org/)**. diff --git a/gsplat/node_modules/postcss/lib/at-rule.d.ts b/gsplat/node_modules/postcss/lib/at-rule.d.ts new file mode 100644 index 0000000..8eebc48 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/at-rule.d.ts @@ -0,0 +1,115 @@ +import Container, { ContainerProps } from './container.js' + +declare namespace AtRule { + export interface AtRuleRaws extends Record { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space between the at-rule name and its parameters. + */ + afterName?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the last parameter and `{` for rules. + */ + between?: string + + /** + * The rule’s selector with comments. + */ + params?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface AtRuleProps extends ContainerProps { + /** Name of the at-rule. */ + name: string + /** Parameters following the name of the at-rule. */ + params?: number | string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: AtRuleRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { AtRule_ as default } +} + +/** + * Represents an at-rule. + * + * ```js + * Once (root, { AtRule }) { + * let media = new AtRule({ name: 'media', params: 'print' }) + * media.append(…) + * root.append(media) + * } + * ``` + * + * If it’s followed in the CSS by a `{}` block, this node will have + * a nodes property representing its children. + * + * ```js + * const root = postcss.parse('@charset "UTF-8"; @media print {}') + * + * const charset = root.first + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last + * media.nodes //=> [] + * ``` + */ +declare class AtRule_ extends Container { + /** + * The at-rule’s name immediately follows the `@`. + * + * ```js + * const root = postcss.parse('@media print {}') + * media.name //=> 'media' + * const media = root.first + * ``` + */ + name: string + /** + * The at-rule’s parameters, the values that follow the at-rule’s name + * but precede any `{}` block. + * + * ```js + * const root = postcss.parse('@media print, screen {}') + * const media = root.first + * media.params //=> 'print, screen' + * ``` + */ + params: string + parent: Container | undefined + + raws: AtRule.AtRuleRaws + + type: 'atrule' + + constructor(defaults?: AtRule.AtRuleProps) + assign(overrides: AtRule.AtRuleProps | object): this + clone(overrides?: Partial): AtRule + cloneAfter(overrides?: Partial): AtRule + cloneBefore(overrides?: Partial): AtRule +} + +declare class AtRule extends AtRule_ {} + +export = AtRule diff --git a/gsplat/node_modules/postcss/lib/at-rule.js b/gsplat/node_modules/postcss/lib/at-rule.js new file mode 100644 index 0000000..9486447 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/at-rule.js @@ -0,0 +1,25 @@ +'use strict' + +let Container = require('./container') + +class AtRule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'atrule' + } + + append(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.append(...children) + } + + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.prepend(...children) + } +} + +module.exports = AtRule +AtRule.default = AtRule + +Container.registerAtRule(AtRule) diff --git a/gsplat/node_modules/postcss/lib/comment.d.ts b/gsplat/node_modules/postcss/lib/comment.d.ts new file mode 100644 index 0000000..d244508 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/comment.d.ts @@ -0,0 +1,67 @@ +import Container from './container.js' +import Node, { NodeProps } from './node.js' + +declare namespace Comment { + export interface CommentRaws extends Record { + /** + * The space symbols before the node. + */ + before?: string + + /** + * The space symbols between `/*` and the comment’s text. + */ + left?: string + + /** + * The space symbols between the comment’s text. + */ + right?: string + } + + export interface CommentProps extends NodeProps { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: CommentRaws + /** Content of the comment. */ + text: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Comment_ as default } +} + +/** + * It represents a class that handles + * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments) + * + * ```js + * Once (root, { Comment }) { + * const note = new Comment({ text: 'Note: …' }) + * root.append(note) + * } + * ``` + * + * Remember that CSS comments inside selectors, at-rule parameters, + * or declaration values will be stored in the `raws` properties + * explained above. + */ +declare class Comment_ extends Node { + parent: Container | undefined + raws: Comment.CommentRaws + /** + * The comment's text. + */ + text: string + + type: 'comment' + + constructor(defaults?: Comment.CommentProps) + assign(overrides: Comment.CommentProps | object): this + clone(overrides?: Partial): Comment + cloneAfter(overrides?: Partial): Comment + cloneBefore(overrides?: Partial): Comment +} + +declare class Comment extends Comment_ {} + +export = Comment diff --git a/gsplat/node_modules/postcss/lib/comment.js b/gsplat/node_modules/postcss/lib/comment.js new file mode 100644 index 0000000..c566506 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/comment.js @@ -0,0 +1,13 @@ +'use strict' + +let Node = require('./node') + +class Comment extends Node { + constructor(defaults) { + super(defaults) + this.type = 'comment' + } +} + +module.exports = Comment +Comment.default = Comment diff --git a/gsplat/node_modules/postcss/lib/container.d.ts b/gsplat/node_modules/postcss/lib/container.d.ts new file mode 100644 index 0000000..bd6b1ba --- /dev/null +++ b/gsplat/node_modules/postcss/lib/container.d.ts @@ -0,0 +1,452 @@ +import AtRule from './at-rule.js' +import Comment from './comment.js' +import Declaration from './declaration.js' +import Node, { ChildNode, ChildProps, NodeProps } from './node.js' +import Rule from './rule.js' + +declare namespace Container { + export interface ValueOptions { + /** + * String that’s used to narrow down values and speed up the regexp search. + */ + fast?: string + + /** + * An array of property names. + */ + props?: string[] + } + + export interface ContainerProps extends NodeProps { + nodes?: (ChildNode | ChildProps)[] + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Container_ as default } +} + +/** + * The `Root`, `AtRule`, and `Rule` container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + */ +declare abstract class Container_ extends Node { + /** + * An array containing the container’s children. + * + * ```js + * const root = postcss.parse('a { color: black }') + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + * ``` + */ + nodes: Child[] + + /** + * Inserts new nodes to the end of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.append(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + append( + ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[] + ): this + + assign(overrides: Container.ContainerProps | object): this + clone(overrides?: Partial): Container + cloneAfter(overrides?: Partial): Container + cloneBefore(overrides?: Partial): Container + + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use `Container#walk`. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * ```js + * const root = postcss.parse('a { color: black; z-index: 1 }') + * const rule = root.first + * + * for (const decl of rule.nodes) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Will be executed only for color and z-index + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + each( + callback: (node: Child, index: number) => false | void + ): false | undefined + + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * ```js + * const noPrefixes = rule.every(i => i.prop[0] !== '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is every child pass condition. + */ + every( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + /** + * Returns a `child`’s index within the `Container#nodes` array. + * + * ```js + * rule.index( rule.nodes[2] ) //=> 2 + * ``` + * + * @param child Child of the current container. + * @return Child index. + */ + index(child: Child | number): number + + /** + * Insert new node after old node within the container. + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertAfter( + oldNode: Child | number, + newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[] + ): this + /** + * Insert new node before old node within the container. + * + * ```js + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })) + * ``` + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertBefore( + oldNode: Child | number, + newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[] + ): this + + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkComments(comment => { + * comment.remove() + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + + /** + * Inserts new nodes to the start of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.prepend(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + prepend( + ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[] + ): this + /** + * Add child to the end of the node. + * + * ```js + * rule.push(new Declaration({ prop: 'color', value: 'black' })) + * ``` + * + * @param child New node. + * @return This node for methods chain. + */ + push(child: Child): this + + /** + * Removes all children from the container + * and cleans their parent properties. + * + * ```js + * rule.removeAll() + * rule.nodes.length //=> 0 + * ``` + * + * @return This node for methods chain. + */ + removeAll(): this + + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * ```js + * rule.nodes.length //=> 5 + * rule.removeChild(decl) + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + * ``` + * + * @param child Child or child’s index. + * @return This node for methods chain. + */ + removeChild(child: Child | number): this + + replaceValues( + pattern: RegExp | string, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * ```js + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px' + * }) + * ``` + * + * @param pattern Replace pattern. + * @param {object} opts Options to speed up the search. + * @param callback String to replace pattern or callback + * that returns a new value. The callback + * will receive the same arguments + * as those passed to a function parameter + * of `String#replace`. + * @return This node for methods chain. + */ + replaceValues( + pattern: RegExp | string, + options: Container.ValueOptions, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * ```js + * const hasPrefix = rule.some(i => i.prop[0] === '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is some child pass condition. + */ + some( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use `Container#each`. + * + * ```js + * root.walk(node => { + * // Traverses all descendant nodes. + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walk( + callback: (node: ChildNode, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkAtRules(rule => { + * if (isOld(rule.name)) rule.remove() + * }) + * + * let first = false + * root.walkAtRules('charset', rule => { + * if (!first) { + * first = true + * } else { + * rule.remove() + * } + * }) + * ``` + * + * @param name String or regular expression to filter at-rules by name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkAtRules( + nameFilter: RegExp | string, + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + + walkAtRules( + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * ```js + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop) + * }) + * + * root.walkDecls('border-radius', decl => { + * decl.remove() + * }) + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value) + * }) + * ``` + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param prop String or regular expression to filter declarations + * by property name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkDecls( + propFilter: RegExp | string, + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + walkDecls( + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * const selectors = [] + * root.walkRules(rule => { + * selectors.push(rule.selector) + * }) + * console.log(`Your CSS uses ${ selectors.length } selectors`) + * ``` + * + * @param selector String or regular expression to filter rules by selector. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkRules( + selectorFilter: RegExp | string, + callback: (rule: Rule, index: number) => false | void + ): false | undefined + walkRules( + callback: (rule: Rule, index: number) => false | void + ): false | undefined + /** + * The container’s first child. + * + * ```js + * rule.first === rules.nodes[0] + * ``` + */ + get first(): Child | undefined + /** + * The container’s last child. + * + * ```js + * rule.last === rule.nodes[rule.nodes.length - 1] + * ``` + */ + get last(): Child | undefined +} + +declare class Container extends Container_ {} + +export = Container diff --git a/gsplat/node_modules/postcss/lib/container.js b/gsplat/node_modules/postcss/lib/container.js new file mode 100644 index 0000000..914c053 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/container.js @@ -0,0 +1,439 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let Declaration = require('./declaration') +let Comment = require('./comment') +let Node = require('./node') + +let parse, Rule, AtRule, Root + +function cleanSource(nodes) { + return nodes.map(i => { + if (i.nodes) i.nodes = cleanSource(i.nodes) + delete i.source + return i + }) +} + +function markDirtyUp(node) { + node[isClean] = false + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes) { + markDirtyUp(i) + } + } +} + +class Container extends Node { + append(...children) { + for (let child of children) { + let nodes = this.normalize(child, this.last) + for (let node of nodes) this.proxyOf.nodes.push(node) + } + + this.markDirty() + + return this + } + + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween) + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween) + } + } + + each(callback) { + if (!this.proxyOf.nodes) return undefined + let iterator = this.getIterator() + + let index, result + while (this.indexes[iterator] < this.proxyOf.nodes.length) { + index = this.indexes[iterator] + result = callback(this.proxyOf.nodes[index], index) + if (result === false) break + + this.indexes[iterator] += 1 + } + + delete this.indexes[iterator] + return result + } + + every(condition) { + return this.nodes.every(condition) + } + + getIterator() { + if (!this.lastEach) this.lastEach = 0 + if (!this.indexes) this.indexes = {} + + this.lastEach += 1 + let iterator = this.lastEach + this.indexes[iterator] = 0 + + return iterator + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (!node[prop]) { + return node[prop] + } else if ( + prop === 'each' || + (typeof prop === 'string' && prop.startsWith('walk')) + ) { + return (...args) => { + return node[prop]( + ...args.map(i => { + if (typeof i === 'function') { + return (child, index) => i(child.toProxy(), index) + } else { + return i + } + }) + ) + } + } else if (prop === 'every' || prop === 'some') { + return cb => { + return node[prop]((child, ...other) => + cb(child.toProxy(), ...other) + ) + } + } else if (prop === 'root') { + return () => node.root().toProxy() + } else if (prop === 'nodes') { + return node.nodes.map(i => i.toProxy()) + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty() + } + return true + } + } + } + + index(child) { + if (typeof child === 'number') return child + if (child.proxyOf) child = child.proxyOf + return this.proxyOf.nodes.indexOf(child) + } + + insertAfter(exist, add) { + let existIndex = this.index(exist) + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex < index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + insertBefore(exist, add) { + let existIndex = this.index(exist) + let type = existIndex === 0 ? 'prepend' : false + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex <= index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse(nodes).nodes) + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type) { + nodes = [nodes] + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation') + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value) + } + nodes = [new Declaration(nodes)] + } else if (nodes.selector) { + nodes = [new Rule(nodes)] + } else if (nodes.name) { + nodes = [new AtRule(nodes)] + } else if (nodes.text) { + nodes = [new Comment(nodes)] + } else { + throw new Error('Unknown node type in node creation') + } + + let processed = nodes.map(i => { + /* c8 ignore next */ + if (!i[my]) Container.rebuild(i) + i = i.proxyOf + if (i.parent) i.parent.removeChild(i) + if (i[isClean]) markDirtyUp(i) + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, '') + } + } + i.parent = this.proxyOf + return i + }) + + return processed + } + + prepend(...children) { + children = children.reverse() + for (let child of children) { + let nodes = this.normalize(child, this.first, 'prepend').reverse() + for (let node of nodes) this.proxyOf.nodes.unshift(node) + for (let id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length + } + } + + this.markDirty() + + return this + } + + push(child) { + child.parent = this + this.proxyOf.nodes.push(child) + return this + } + + removeAll() { + for (let node of this.proxyOf.nodes) node.parent = undefined + this.proxyOf.nodes = [] + + this.markDirty() + + return this + } + + removeChild(child) { + child = this.index(child) + this.proxyOf.nodes[child].parent = undefined + this.proxyOf.nodes.splice(child, 1) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (index >= child) { + this.indexes[id] = index - 1 + } + } + + this.markDirty() + + return this + } + + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts + opts = {} + } + + this.walkDecls(decl => { + if (opts.props && !opts.props.includes(decl.prop)) return + if (opts.fast && !decl.value.includes(opts.fast)) return + + decl.value = decl.value.replace(pattern, callback) + }) + + this.markDirty() + + return this + } + + some(condition) { + return this.nodes.some(condition) + } + + walk(callback) { + return this.each((child, i) => { + let result + try { + result = callback(child, i) + } catch (e) { + throw child.addToError(e) + } + if (result !== false && child.walk) { + result = child.walk(callback) + } + + return result + }) + } + + walkAtRules(name, callback) { + if (!callback) { + callback = name + return this.walk((child, i) => { + if (child.type === 'atrule') { + return callback(child, i) + } + }) + } + if (name instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i) + } + }) + } + + walkComments(callback) { + return this.walk((child, i) => { + if (child.type === 'comment') { + return callback(child, i) + } + }) + } + + walkDecls(prop, callback) { + if (!callback) { + callback = prop + return this.walk((child, i) => { + if (child.type === 'decl') { + return callback(child, i) + } + }) + } + if (prop instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i) + } + }) + } + + walkRules(selector, callback) { + if (!callback) { + callback = selector + + return this.walk((child, i) => { + if (child.type === 'rule') { + return callback(child, i) + } + }) + } + if (selector instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i) + } + }) + } + + get first() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[0] + } + + get last() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] + } +} + +Container.registerParse = dependant => { + parse = dependant +} + +Container.registerRule = dependant => { + Rule = dependant +} + +Container.registerAtRule = dependant => { + AtRule = dependant +} + +Container.registerRoot = dependant => { + Root = dependant +} + +module.exports = Container +Container.default = Container + +/* c8 ignore start */ +Container.rebuild = node => { + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule.prototype) + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule.prototype) + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration.prototype) + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment.prototype) + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root.prototype) + } + + node[my] = true + + if (node.nodes) { + node.nodes.forEach(child => { + Container.rebuild(child) + }) + } +} +/* c8 ignore stop */ diff --git a/gsplat/node_modules/postcss/lib/css-syntax-error.d.ts b/gsplat/node_modules/postcss/lib/css-syntax-error.d.ts new file mode 100644 index 0000000..d2d11bf --- /dev/null +++ b/gsplat/node_modules/postcss/lib/css-syntax-error.d.ts @@ -0,0 +1,248 @@ +import { FilePosition } from './input.js' + +declare namespace CssSyntaxError { + /** + * A position that is part of a range. + */ + export interface RangePosition { + /** + * The column number in the input. + */ + column: number + + /** + * The line number in the input. + */ + line: number + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { CssSyntaxError_ as default } +} + +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the `Node#error` method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * ```js + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }) + * ``` + * + * ```js + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * } + * ``` + */ +declare class CssSyntaxError_ { + /** + * Source column of the error. + * + * ```js + * error.column //=> 1 + * error.input.column //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.column`. + */ + column?: number + + /** + * Source column of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endColumn //=> 1 + * error.input.endColumn //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endColumn`. + */ + endColumn?: number + + /** + * Source line of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endLine //=> 3 + * error.input.endLine //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endLine`. + */ + endLine?: number + + /** + * Absolute path to the broken file. + * + * ```js + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.file`. + */ + file?: string + + /** + * Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * ```js + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + * ``` + */ + input?: FilePosition + + /** + * Source line of the error. + * + * ```js + * error.line //=> 2 + * error.input.line //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.line`. + */ + line?: number + + /** + * Full error text in the GNU error format + * with plugin, file, line and column. + * + * ```js + * error.message //=> 'a.css:1:1: Unclosed block' + * ``` + */ + message: string + + /** + * Always equal to `'CssSyntaxError'`. You should always check error type + * by `error.name === 'CssSyntaxError'` + * instead of `error instanceof CssSyntaxError`, + * because npm could have several PostCSS versions. + * + * ```js + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * ``` + */ + name: 'CssSyntaxError' + + /** + * Plugin name, if error came from plugin. + * + * ```js + * error.plugin //=> 'postcss-vars' + * ``` + */ + plugin?: string + + /** + * Error message. + * + * ```js + * error.message //=> 'Unclosed block' + * ``` + */ + reason: string + + /** + * Source code of the broken file. + * + * ```js + * error.source //=> 'a { b {} }' + * error.input.source //=> 'a b { }' + * ``` + */ + source?: string + + stack: string + + /** + * Instantiates a CSS syntax error. Can be instantiated for a single position + * or for a range. + * @param message Error message. + * @param lineOrStartPos If for a single position, the line number, or if for + * a range, the inclusive start position of the error. + * @param columnOrEndPos If for a single position, the column number, or if for + * a range, the exclusive end position of the error. + * @param source Source code of the broken file. + * @param file Absolute path to the broken file. + * @param plugin PostCSS plugin name, if error came from plugin. + */ + constructor( + message: string, + lineOrStartPos?: CssSyntaxError.RangePosition | number, + columnOrEndPos?: CssSyntaxError.RangePosition | number, + source?: string, + file?: string, + plugin?: string + ) + + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * ```js + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * ``` + * + * @param color Whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * @return Few lines of CSS source that caused the error. + */ + showSourceCode(color?: boolean): string + + /** + * Returns error position, message and source code of the broken part. + * + * ```js + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * ``` + * + * @return Error position, message and source code. + */ + toString(): string +} + +declare class CssSyntaxError extends CssSyntaxError_ {} + +export = CssSyntaxError diff --git a/gsplat/node_modules/postcss/lib/css-syntax-error.js b/gsplat/node_modules/postcss/lib/css-syntax-error.js new file mode 100644 index 0000000..1693033 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/css-syntax-error.js @@ -0,0 +1,100 @@ +'use strict' + +let pico = require('picocolors') + +let terminalHighlight = require('./terminal-highlight') + +class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin) { + super(message) + this.name = 'CssSyntaxError' + this.reason = message + + if (file) { + this.file = file + } + if (source) { + this.source = source + } + if (plugin) { + this.plugin = plugin + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line + this.column = column + } else { + this.line = line.line + this.column = line.column + this.endLine = column.line + this.endColumn = column.column + } + } + + this.setMessage() + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError) + } + } + + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : '' + this.message += this.file ? this.file : '' + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column + } + this.message += ': ' + this.reason + } + + showSourceCode(color) { + if (!this.source) return '' + + let css = this.source + if (color == null) color = pico.isColorSupported + if (terminalHighlight) { + if (color) css = terminalHighlight(css) + } + + let lines = css.split(/\r?\n/) + let start = Math.max(this.line - 3, 0) + let end = Math.min(this.line + 2, lines.length) + + let maxWidth = String(end).length + + let mark, aside + if (color) { + let { bold, gray, red } = pico.createColors(true) + mark = text => bold(red(text)) + aside = text => gray(text) + } else { + mark = aside = str => str + } + + return lines + .slice(start, end) + .map((line, index) => { + let number = start + 1 + index + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' + if (number === this.line) { + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') + } + return ' ' + aside(gutter) + line + }) + .join('\n') + } + + toString() { + let code = this.showSourceCode() + if (code) { + code = '\n\n' + code + '\n' + } + return this.name + ': ' + this.message + code + } +} + +module.exports = CssSyntaxError +CssSyntaxError.default = CssSyntaxError diff --git a/gsplat/node_modules/postcss/lib/declaration.d.ts b/gsplat/node_modules/postcss/lib/declaration.d.ts new file mode 100644 index 0000000..655deea --- /dev/null +++ b/gsplat/node_modules/postcss/lib/declaration.d.ts @@ -0,0 +1,148 @@ +import Container from './container.js' +import Node from './node.js' + +declare namespace Declaration { + export interface DeclarationRaws extends Record { + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the property and value for declarations. + */ + between?: string + + /** + * The content of the important statement, if it is not just `!important`. + */ + important?: string + + /** + * Declaration value with comments. + */ + value?: { + raw: string + value: string + } + } + + export interface DeclarationProps { + /** Whether the declaration has an `!important` annotation. */ + important?: boolean + /** Name of the declaration. */ + prop: string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: DeclarationRaws + /** Value of the declaration. */ + value: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Declaration_ as default } +} + +/** + * It represents a class that handles + * [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations) + * + * ```js + * Once (root, { Declaration }) { + * const color = new Declaration({ prop: 'color', value: 'black' }) + * root.append(color) + * } + * ``` + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first?.first + * + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + * ``` + */ +declare class Declaration_ extends Node { + /** + * It represents a specificity of the declaration. + * + * If true, the CSS declaration will have an + * [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important) + * specifier. + * + * ```js + * const root = postcss.parse('a { color: black !important; color: red }') + * + * root.first.first.important //=> true + * root.first.last.important //=> undefined + * ``` + */ + important: boolean + + parent: Container | undefined + + /** + * The property name for a CSS declaration. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.prop //=> 'color' + * ``` + */ + prop: string + + raws: Declaration.DeclarationRaws + + type: 'decl' + + /** + * The property value for a CSS declaration. + * + * Any CSS comments inside the value string will be filtered out. + * CSS comments present in the source value will be available in + * the `raws` property. + * + * Assigning new `value` would ignore the comments in `raws` + * property while compiling node to string. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.value //=> 'black' + * ``` + */ + value: string + + /** + * It represents a getter that returns `true` if a declaration starts with + * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS. + * + * ```js + * const root = postcss.parse(':root { --one: 1 }') + * const one = root.first.first + * + * one.variable //=> true + * ``` + * + * ```js + * const root = postcss.parse('$one: 1') + * const one = root.first + * + * one.variable //=> true + * ``` + */ + variable: boolean + + constructor(defaults?: Declaration.DeclarationProps) + assign(overrides: Declaration.DeclarationProps | object): this + clone(overrides?: Partial): Declaration + cloneAfter(overrides?: Partial): Declaration + cloneBefore(overrides?: Partial): Declaration +} + +declare class Declaration extends Declaration_ {} + +export = Declaration diff --git a/gsplat/node_modules/postcss/lib/declaration.js b/gsplat/node_modules/postcss/lib/declaration.js new file mode 100644 index 0000000..a04bdec --- /dev/null +++ b/gsplat/node_modules/postcss/lib/declaration.js @@ -0,0 +1,24 @@ +'use strict' + +let Node = require('./node') + +class Declaration extends Node { + constructor(defaults) { + if ( + defaults && + typeof defaults.value !== 'undefined' && + typeof defaults.value !== 'string' + ) { + defaults = { ...defaults, value: String(defaults.value) } + } + super(defaults) + this.type = 'decl' + } + + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$' + } +} + +module.exports = Declaration +Declaration.default = Declaration diff --git a/gsplat/node_modules/postcss/lib/document.d.ts b/gsplat/node_modules/postcss/lib/document.d.ts new file mode 100644 index 0000000..f018f6e --- /dev/null +++ b/gsplat/node_modules/postcss/lib/document.d.ts @@ -0,0 +1,68 @@ +import Container, { ContainerProps } from './container.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Document { + export interface DocumentProps extends ContainerProps { + nodes?: Root[] + + /** + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * Every parser saves its own properties. + */ + raws?: Record + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Document_ as default } +} + +/** + * Represents a file and contains all its parsed nodes. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + * + * ```js + * const document = htmlParser( + * '' + * ) + * document.type //=> 'document' + * document.nodes.length //=> 2 + * ``` + */ +declare class Document_ extends Container { + parent: undefined + type: 'document' + + constructor(defaults?: Document.DocumentProps) + + assign(overrides: Document.DocumentProps | object): this + clone(overrides?: Partial): Document + cloneAfter(overrides?: Partial): Document + cloneBefore(overrides?: Partial): Document + + /** + * Returns a `Result` instance representing the document’s CSS roots. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * const document = postcss.document() + * document.append(root1) + * document.append(root2) + * const result = document.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current document’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Document extends Document_ {} + +export = Document diff --git a/gsplat/node_modules/postcss/lib/document.js b/gsplat/node_modules/postcss/lib/document.js new file mode 100644 index 0000000..4468991 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/document.js @@ -0,0 +1,33 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Document extends Container { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }) + + if (!this.nodes) { + this.nodes = [] + } + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + + return lazy.stringify() + } +} + +Document.registerLazyResult = dependant => { + LazyResult = dependant +} + +Document.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Document +Document.default = Document diff --git a/gsplat/node_modules/postcss/lib/fromJSON.d.ts b/gsplat/node_modules/postcss/lib/fromJSON.d.ts new file mode 100644 index 0000000..e1deedb --- /dev/null +++ b/gsplat/node_modules/postcss/lib/fromJSON.d.ts @@ -0,0 +1,9 @@ +import { JSONHydrator } from './postcss.js' + +interface FromJSON extends JSONHydrator { + default: FromJSON +} + +declare const fromJSON: FromJSON + +export = fromJSON diff --git a/gsplat/node_modules/postcss/lib/fromJSON.js b/gsplat/node_modules/postcss/lib/fromJSON.js new file mode 100644 index 0000000..09f2b89 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/fromJSON.js @@ -0,0 +1,54 @@ +'use strict' + +let Declaration = require('./declaration') +let PreviousMap = require('./previous-map') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Input = require('./input') +let Root = require('./root') +let Rule = require('./rule') + +function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON(n)) + + let { inputs: ownInputs, ...defaults } = json + if (ownInputs) { + inputs = [] + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input.prototype } + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + } + } + inputs.push(inputHydrated) + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) + } + if (defaults.source) { + let { inputId, ...source } = defaults.source + defaults.source = source + if (inputId != null) { + defaults.source.input = inputs[inputId] + } + } + if (defaults.type === 'root') { + return new Root(defaults) + } else if (defaults.type === 'decl') { + return new Declaration(defaults) + } else if (defaults.type === 'rule') { + return new Rule(defaults) + } else if (defaults.type === 'comment') { + return new Comment(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } +} + +module.exports = fromJSON +fromJSON.default = fromJSON diff --git a/gsplat/node_modules/postcss/lib/input.d.ts b/gsplat/node_modules/postcss/lib/input.d.ts new file mode 100644 index 0000000..c718bd1 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/input.d.ts @@ -0,0 +1,194 @@ +import { CssSyntaxError, ProcessOptions } from './postcss.js' +import PreviousMap from './previous-map.js' + +declare namespace Input { + export interface FilePosition { + /** + * Column of inclusive start position in source file. + */ + column: number + + /** + * Column of exclusive end position in source file. + */ + endColumn?: number + + /** + * Line of exclusive end position in source file. + */ + endLine?: number + + /** + * Absolute path to the source file. + */ + file?: string + + /** + * Line of inclusive start position in source file. + */ + line: number + + /** + * Source code. + */ + source?: string + + /** + * URL for the source file. + */ + url: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Input_ as default } +} + +/** + * Represents the source CSS. + * + * ```js + * const root = postcss.parse(css, { from: file }) + * const input = root.source.input + * ``` + */ +declare class Input_ { + /** + * Input CSS source. + * + * ```js + * const input = postcss.parse('a{}', { from: file }).input + * input.css //=> "a{}" + * ``` + */ + css: string + + /** + * The absolute path to the CSS source file defined + * with the `from` option. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.file //=> '/home/ai/a.css' + * ``` + */ + file?: string + + /** + * The flag to indicate whether or not the source code has Unicode BOM. + */ + hasBOM: boolean + + /** + * The unique ID of the CSS source. It will be created if `from` option + * is not provided (because PostCSS does not know the file path). + * + * ```js + * const root = postcss.parse(css) + * root.source.input.file //=> undefined + * root.source.input.id //=> "" + * ``` + */ + id?: string + + /** + * The input source map passed from a compilation step before PostCSS + * (for example, from Sass compiler). + * + * ```js + * root.source.input.map.consumer().sources //=> ['a.sass'] + * ``` + */ + map: PreviousMap + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + error( + message: string, + start: + | { + column: number + line: number + } + | { + offset: number + }, + end: + | { + column: number + line: number + } + | { + offset: number + }, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Returns `CssSyntaxError` with information about the error and its position. + */ + error( + message: string, + line: number, + column: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + error( + message: string, + offset: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Converts source offset to line and column. + * + * @param offset Source offset. + */ + fromOffset(offset: number): { col: number; line: number } | null + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). Optionally takes an + * end position, exclusive. + * + * ```js + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + * root.source.input.origin(1, 1, 1, 4) + * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 } + * ``` + * + * @param line Line for inclusive start position in input CSS. + * @param column Column for inclusive start position in input CSS. + * @param endLine Line for exclusive end position in input CSS. + * @param endColumn Column for exclusive end position in input CSS. + * + * @return Position in input source. + */ + origin( + line: number, + column: number, + endLine?: number, + endColumn?: number + ): false | Input.FilePosition + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css) + * root.source.input.from //=> "" + * ``` + */ + get from(): string +} + +declare class Input extends Input_ {} + +export = Input diff --git a/gsplat/node_modules/postcss/lib/input.js b/gsplat/node_modules/postcss/lib/input.js new file mode 100644 index 0000000..4b5ee5e --- /dev/null +++ b/gsplat/node_modules/postcss/lib/input.js @@ -0,0 +1,248 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { fileURLToPath, pathToFileURL } = require('url') +let { isAbsolute, resolve } = require('path') +let { nanoid } = require('nanoid/non-secure') + +let terminalHighlight = require('./terminal-highlight') +let CssSyntaxError = require('./css-syntax-error') +let PreviousMap = require('./previous-map') + +let fromOffsetCache = Symbol('fromOffsetCache') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(resolve && isAbsolute) + +class Input { + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString() + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true + this.css = this.css.slice(1) + } else { + this.hasBOM = false + } + + if (opts.from) { + if ( + !pathAvailable || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from + } else { + this.file = resolve(opts.from) + } + } + + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts) + if (map.text) { + this.map = map + let file = map.consumer().file + if (!this.file && file) this.file = this.mapResolve(file) + } + } + + if (!this.file) { + this.id = '' + } + if (this.map) this.map.file = this.from + } + + error(message, line, column, opts = {}) { + let result, endLine, endColumn + + if (line && typeof line === 'object') { + let start = line + let end = column + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset) + line = pos.line + column = pos.col + } else { + line = start.line + column = start.column + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset) + endLine = pos.line + endColumn = pos.col + } else { + endLine = end.line + endColumn = end.column + } + } else if (!column) { + let pos = this.fromOffset(line) + line = pos.line + column = pos.col + } + + let origin = this.origin(line, column, endLine, endColumn) + if (origin) { + result = new CssSyntaxError( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ) + } else { + result = new CssSyntaxError( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ) + } + + result.input = { column, endColumn, endLine, line, source: this.css } + if (this.file) { + if (pathToFileURL) { + result.input.url = pathToFileURL(this.file).toString() + } + result.input.file = this.file + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n') + lineToIndex = new Array(lines.length) + let prevIndex = 0 + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex + prevIndex += lines[i].length + 1 + } + + this[fromOffsetCache] = lineToIndex + } else { + lineToIndex = this[fromOffsetCache] + } + lastLine = lineToIndex[lineToIndex.length - 1] + + let min = 0 + if (offset >= lastLine) { + min = lineToIndex.length - 1 + } else { + let max = lineToIndex.length - 2 + let mid + while (min < max) { + mid = min + ((max - min) >> 1) + if (offset < lineToIndex[mid]) { + max = mid - 1 + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1 + } else { + min = mid + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer() + + let from = consumer.originalPositionFor({ column, line }) + if (!from.source) return false + + let to + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }) + } + + let fromUrl + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source) + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) + ) + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + } + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl) + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source) + if (source) result.source = source + + return result + } + + toJSON() { + let json = {} + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name] + } + } + if (this.map) { + json.map = { ...this.map } + if (json.map.consumerCache) { + json.map.consumerCache = undefined + } + } + return json + } + + get from() { + return this.file || this.id + } +} + +module.exports = Input +Input.default = Input + +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input) +} diff --git a/gsplat/node_modules/postcss/lib/lazy-result.d.ts b/gsplat/node_modules/postcss/lib/lazy-result.d.ts new file mode 100644 index 0000000..dd291aa --- /dev/null +++ b/gsplat/node_modules/postcss/lib/lazy-result.d.ts @@ -0,0 +1,190 @@ +import Document from './document.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace LazyResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { LazyResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by `Processor#process`. + * + * ```js + * const lazy = postcss([autoprefixer]).process(css) + * ``` + */ +declare class LazyResult_ + implements PromiseLike> +{ + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }).catch(error => { + * console.error(error) + * }) + * ``` + */ + catch: Promise>['catch'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onFinally on any error or when all plugins will finish work. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).finally(() => { + * console.log('processing ended') + * }) + * ``` + */ + finally: Promise>['finally'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { + * console.log(result.css) + * }) + * ``` + */ + then: Promise>['then'] + + /** + * @param processor Processor used for this transformation. + * @param css CSS to parse and transform. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, css: string, opts: ResultOptions) + + /** + * Run plugin in async way and return `Result`. + * + * @return Result with output content. + */ + async(): Promise> + + /** + * Run plugin in sync way and return `Result`. + * + * @return Result with output content. + */ + sync(): Result + + /** + * Alias for the `LazyResult#css` property. + * + * ```js + * lazy + '' === lazy.css + * ``` + * + * @return Output CSS. + */ + toString(): string + + /** + * Processes input CSS through synchronous plugins + * and calls `Result#warnings`. + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get content(): string + + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns `Result#css`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get css(): string + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#map`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get map(): SourceMap + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#messages`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get messages(): Message[] + + /** + * Options from the `Processor#process` call. + */ + get opts(): ResultOptions + + /** + * Returns a `Processor` instance, which will be used + * for CSS transformations. + */ + get processor(): Processor + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#root`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get root(): RootNode + + /** + * Returns the default string description of an object. + * Required to implement the Promise interface. + */ + get [Symbol.toStringTag](): string +} + +declare class LazyResult< + RootNode = Document | Root +> extends LazyResult_ {} + +export = LazyResult diff --git a/gsplat/node_modules/postcss/lib/lazy-result.js b/gsplat/node_modules/postcss/lib/lazy-result.js new file mode 100644 index 0000000..126f40c --- /dev/null +++ b/gsplat/node_modules/postcss/lib/lazy-result.js @@ -0,0 +1,550 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let MapGenerator = require('./map-generator') +let stringify = require('./stringify') +let Container = require('./container') +let Document = require('./document') +let warnOnce = require('./warn-once') +let Result = require('./result') +let parse = require('./parse') +let Root = require('./root') + +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +} + +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +} + +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +} + +const CHILDREN = 0 + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' +} + +function getEvents(node) { + let key = false + let type = TYPE_TO_CLASS_NAME[node.type] + if (node.type === 'decl') { + key = node.prop.toLowerCase() + } else if (node.type === 'atrule') { + key = node.name.toLowerCase() + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } +} + +function toStack(node) { + let events + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit'] + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit'] + } else { + events = getEvents(node) + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } +} + +function cleanMarks(node) { + node[isClean] = false + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) + return node +} + +let postcss = {} + +class LazyResult { + constructor(processor, css, opts) { + this.stringified = false + this.processed = false + + let root + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css) + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root) + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {} + if (!opts.map.inline) opts.map.inline = false + opts.map.prev = css.map + } + } else { + let parser = parse + if (opts.syntax) parser = opts.syntax.parse + if (opts.parser) parser = opts.parser + if (parser.parse) parser = parser.parse + + try { + root = parser(css, opts) + } catch (error) { + this.processed = true + this.error = error + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container.rebuild(root) + } + } + + this.result = new Result(processor, root, opts) + this.helpers = { ...postcss, postcss, result: this.result } + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }) + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync() + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin + try { + if (node) node.addToError(error) + this.error = error + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin + error.setMessage() + } else if (plugin.postcssVersion) { + if (process.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin + let pluginVer = plugin.postcssVersion + let runtimeVer = this.result.processor.version + let a = pluginVer.split('.') + let b = runtimeVer.split('.') + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ) + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err) + } + return error + } + + prepareVisitors() { + this.listeners = {} + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = [] + this.listeners[type].push([plugin, cb]) + } + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]) + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ) + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]) + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0 + } + + async runAsync() { + this.plugin = 0 + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i] + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + try { + await promise + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + let stack = [toStack(root)] + while (stack.length > 0) { + let promise = this.visitTick(stack) + if (isPromise(promise)) { + try { + await promise + } catch (e) { + let node = stack[stack.length - 1].node + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ) + + await Promise.all(roots) + } else { + await visitor(root, this.helpers) + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ) + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true + + this.sync() + + let opts = this.result.opts + let str = stringify + if (opts.syntax) str = opts.syntax.stringify + if (opts.stringifier) str = opts.stringifier + if (str.stringify) str = str.stringify + + let map = new MapGenerator(str, this.result.root, this.result.opts) + let data = map.generate() + this.result.css = data[0] + this.result.map = data[1] + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + this.walkSync(root) + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot) + } + } else { + this.visitSync(this.listeners.OnceExit, root) + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin + let promise + try { + promise = visitor(node, this.helpers) + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1] + let { node, visitors } = visit + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop() + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex] + visit.visitorIndex += 1 + if (visit.visitorIndex === visitors.length) { + visit.visitors = [] + visit.visitorIndex = 0 + } + this.result.lastPlugin = plugin + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator + let child + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1 + if (!child[isClean]) { + child[isClean] = true + stack.push(toStack(child)) + return + } + } + visit.iterator = 0 + delete node.indexes[iterator] + } + + let events = visit.events + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex] + visit.eventIndex += 1 + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true + visit.iterator = node.getIterator() + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event] + return + } + } + stack.pop() + } + + walkSync(node) { + node[isClean] = true + let events = getEvents(node) + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child) + }) + } + } else { + let visitors = this.listeners[event] + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } + + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } +} + +LazyResult.registerPostcss = dependant => { + postcss = dependant +} + +module.exports = LazyResult +LazyResult.default = LazyResult + +Root.registerLazyResult(LazyResult) +Document.registerLazyResult(LazyResult) diff --git a/gsplat/node_modules/postcss/lib/list.d.ts b/gsplat/node_modules/postcss/lib/list.d.ts new file mode 100644 index 0000000..1a74d74 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/list.d.ts @@ -0,0 +1,57 @@ +declare namespace list { + type List = { + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * ```js + * Once (root, { list }) { + * list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + * } + * ``` + * + * @param str Comma-separated values. + * @return Split values. + */ + comma(str: string): string[] + + default: List + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * ```js + * Once (root, { list }) { + * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param str Space-separated values. + * @return Split values. + */ + space(str: string): string[] + + /** + * Safely splits values. + * + * ```js + * Once (root, { list }) { + * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param string separated values. + * @param separators array of separators. + * @param last boolean indicator. + * @return Split values. + */ + split(string: string, separators: string[], last: boolean): string[] + } +} + +// eslint-disable-next-line @typescript-eslint/no-redeclare +declare const list: list.List + +export = list diff --git a/gsplat/node_modules/postcss/lib/list.js b/gsplat/node_modules/postcss/lib/list.js new file mode 100644 index 0000000..1b31f98 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/list.js @@ -0,0 +1,58 @@ +'use strict' + +let list = { + comma(string) { + return list.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t'] + return list.split(string, spaces) + }, + + split(string, separators, last) { + let array = [] + let current = '' + let split = false + + let func = 0 + let inQuote = false + let prevQuote = '' + let escape = false + + for (let letter of string) { + if (escape) { + escape = false + } else if (letter === '\\') { + escape = true + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false + } + } else if (letter === '"' || letter === "'") { + inQuote = true + prevQuote = letter + } else if (letter === '(') { + func += 1 + } else if (letter === ')') { + if (func > 0) func -= 1 + } else if (func === 0) { + if (separators.includes(letter)) split = true + } + + if (split) { + if (current !== '') array.push(current.trim()) + current = '' + split = false + } else { + current += letter + } + } + + if (last || current !== '') array.push(current.trim()) + return array + } +} + +module.exports = list +list.default = list diff --git a/gsplat/node_modules/postcss/lib/map-generator.js b/gsplat/node_modules/postcss/lib/map-generator.js new file mode 100644 index 0000000..523b463 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/map-generator.js @@ -0,0 +1,359 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { dirname, relative, resolve, sep } = require('path') +let { pathToFileURL } = require('url') + +let Input = require('./input') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(dirname && resolve && relative && sep) + +class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify + this.mapOpts = opts.map || {} + this.root = root + this.opts = opts + this.css = cssString + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute + + this.memoizedFileURLs = new Map() + this.memoizedPaths = new Map() + this.memoizedURLs = new Map() + } + + addAnnotation() { + let content + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()) + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root) + } else { + content = this.outputFile() + '.map' + } + let eol = '\n' + if (this.css.includes('\r\n')) eol = '\r\n' + + this.css += eol + '/*# sourceMappingURL=' + content + ' */' + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)) + let root = prev.root || dirname(prev.file) + let map + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text) + if (map.sourcesContent) { + map.sourcesContent = map.sourcesContent.map(() => null) + } + } else { + map = prev.consumer() + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))) + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i] + if (node.type !== 'comment') continue + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i) + } + } + } else if (this.css) { + this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '') + } + } + + generate() { + this.clearAnnotation() + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = '' + this.stringify(this.root, i => { + result += i + }) + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString() + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer() + prev.file = this.outputFile() + this.map = SourceMapGenerator.fromSourceMap(prev) + } else { + this.map = new SourceMapGenerator({ file: this.outputFile() }) + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + }) + } + + if (this.isSourcesContent()) this.setSourcesContent() + if (this.root && this.previous().length > 0) this.applyPrevMaps() + if (this.isAnnotation()) this.addAnnotation() + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = '' + this.map = new SourceMapGenerator({ file: this.outputFile() }) + + let line = 1 + let column = 1 + + let noSource = '' + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + } + + let lines, last + this.stringify(this.root, (str, node, type) => { + this.css += str + + if (node && type !== 'end') { + mapping.generated.line = line + mapping.generated.column = column - 1 + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.start.line + mapping.original.column = node.source.start.column - 1 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + this.map.addMapping(mapping) + } + } + + lines = str.match(/\n/g) + if (lines) { + line += lines.length + last = str.lastIndexOf('\n') + column = str.length - last + } else { + column += str.length + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} } + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes) + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.end.line + mapping.original.column = node.source.end.column - 1 + mapping.generated.line = line + mapping.generated.column = column - 2 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + mapping.generated.line = line + mapping.generated.column = column - 1 + this.map.addMapping(mapping) + } + } + } + }) + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file) + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.' + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)) + } + + let path = relative(from, file) + this.memoizedPaths.set(file, path) + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = [] + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map) + } + } + }) + } else { + let input = new Input(this.css, this.opts) + if (input.map) this.previousMaps.push(input.map) + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {} + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from + if (from && !already[from]) { + already[from] = true + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)) + this.map.setSourceContent(fromUrl, node.source.input.css) + } + } + }) + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + this.map.setSourceContent(from, this.css) + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer) { + return Buffer.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path) + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString() + this.memoizedFileURLs.set(path, fileURL) + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path) + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/') + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) + this.memoizedURLs.set(path, url) + + return url + } +} + +module.exports = MapGenerator diff --git a/gsplat/node_modules/postcss/lib/no-work-result.d.ts b/gsplat/node_modules/postcss/lib/no-work-result.d.ts new file mode 100644 index 0000000..8039076 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/no-work-result.d.ts @@ -0,0 +1,46 @@ +import LazyResult from './lazy-result.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace NoWorkResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { NoWorkResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root` + * are accessed. See the example below for details. + * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined. + * + * ```js + * const noWorkResult = postcss().process(css) // No plugins are defined. + * // CSS is not parsed + * let root = noWorkResult.root // now css is parsed because we accessed the root + * ``` + */ +declare class NoWorkResult_ implements LazyResult { + catch: Promise>['catch'] + finally: Promise>['finally'] + then: Promise>['then'] + constructor(processor: Processor, css: string, opts: ResultOptions) + async(): Promise> + sync(): Result + toString(): string + warnings(): Warning[] + get content(): string + get css(): string + get map(): SourceMap + get messages(): Message[] + get opts(): ResultOptions + get processor(): Processor + get root(): Root + get [Symbol.toStringTag](): string +} + +declare class NoWorkResult extends NoWorkResult_ {} + +export = NoWorkResult diff --git a/gsplat/node_modules/postcss/lib/no-work-result.js b/gsplat/node_modules/postcss/lib/no-work-result.js new file mode 100644 index 0000000..a0609f7 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/no-work-result.js @@ -0,0 +1,135 @@ +'use strict' + +let MapGenerator = require('./map-generator') +let stringify = require('./stringify') +let warnOnce = require('./warn-once') +let parse = require('./parse') +const Result = require('./result') + +class NoWorkResult { + constructor(processor, css, opts) { + css = css.toString() + this.stringified = false + + this._processor = processor + this._css = css + this._opts = opts + this._map = undefined + let root + + let str = stringify + this.result = new Result(this._processor, root, this._opts) + this.result.css = css + + let self = this + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }) + + let map = new MapGenerator(str, root, this._opts, css) + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate() + if (generatedCSS) { + this.result.css = generatedCSS + } + if (generatedMap) { + this.result.map = generatedMap + } + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } + + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root + let parser = parse + + try { + root = parser(this._css, this._opts) + } catch (error) { + this.error = error + } + + if (this.error) { + throw this.error + } else { + this._root = root + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } +} + +module.exports = NoWorkResult +NoWorkResult.default = NoWorkResult diff --git a/gsplat/node_modules/postcss/lib/node.d.ts b/gsplat/node_modules/postcss/lib/node.d.ts new file mode 100644 index 0000000..71b3015 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/node.d.ts @@ -0,0 +1,536 @@ +import AtRule = require('./at-rule.js') + +import { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document from './document.js' +import Input from './input.js' +import { Stringifier, Syntax } from './postcss.js' +import Result from './result.js' +import Root from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +declare namespace Node { + export type ChildNode = AtRule.default | Comment | Declaration | Rule + + export type AnyNode = + | AtRule.default + | Comment + | Declaration + | Document + | Root + | Rule + + export type ChildProps = + | AtRuleProps + | CommentProps + | DeclarationProps + | RuleProps + + export interface Position { + /** + * Source line in file. In contrast to `offset` it starts from 1. + */ + column: number + + /** + * Source column in file. + */ + line: number + + /** + * Source offset in file. It starts from 0. + */ + offset: number + } + + export interface Range { + /** + * End position, exclusive. + */ + end: Position + + /** + * Start position, inclusive. + */ + start: Position + } + + /** + * Source represents an interface for the {@link Node.source} property. + */ + export interface Source { + /** + * The inclusive ending position for the source + * code of a node. + */ + end?: Position + + /** + * The source file from where a node has originated. + */ + input: Input + + /** + * The inclusive starting position for the source + * code of a node. + */ + start?: Position + } + + /** + * Interface represents an interface for an object received + * as parameter by Node class constructor. + */ + export interface NodeProps { + source?: Source + } + + export interface NodeErrorOptions { + /** + * An ending index inside a node's string that should be highlighted as + * source of error. + */ + endIndex?: number + /** + * An index inside a node's string that should be highlighted as source + * of error. + */ + index?: number + /** + * Plugin name that created this error. PostCSS will set it automatically. + */ + plugin?: string + /** + * A word inside a node's string, that should be highlighted as source + * of error. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-shadow + class Node extends Node_ {} + export { Node as default } +} + +/** + * It represents an abstract class that handles common + * methods for other CSS abstract syntax tree nodes. + * + * Any node that represents CSS selector or value should + * not extend the `Node` class. + */ +declare abstract class Node_ { + /** + * It represents parent of the current node. + * + * ```js + * root.nodes[0].parent === root //=> true + * ``` + */ + parent: Container | Document | undefined + + /** + * It represents unnecessary whitespace and characters present + * in the css source code. + * + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * The properties of the raws object are decided by parser, + * the default parser uses the following properties: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and */. + * - `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS filters out the comments inside selectors, declaration values + * and at-rule parameters but it stores the origin content in raws. + * + * ```js + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + * ``` + */ + raws: any + + /** + * It represents information related to origin of a node and is required + * for generating source maps. + * + * The nodes that are created manually using the public APIs + * provided by PostCSS will have `source` undefined and + * will be absent in the source map. + * + * For this reason, the plugin developer should consider + * duplicating nodes as the duplicate node will have the + * same source as the original node by default or assign + * source to a node created manually. + * + * ```js + * decl.source.input.from //=> '/home/ai/source.css' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + * ``` + * + * ```js + * // Incorrect method, source not specified! + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }) + * + * // Correct method, source is inherited when duplicating. + * const prefixed = decl.clone({ + * prop: '-moz-' + decl.prop + * }) + * ``` + * + * ```js + * if (atrule.name === 'add-link') { + * const rule = postcss.rule({ + * selector: 'a', + * source: atrule.source + * }) + * + * atrule.parent.insertBefore(atrule, rule) + * } + * ``` + */ + source?: Node.Source + + /** + * It represents type of a node in + * an abstract syntax tree. + * + * A type of node helps in identification of a node + * and perform operation based on it's type. + * + * ```js + * const declaration = new Declaration({ + * prop: 'color', + * value: 'black' + * }) + * + * declaration.type //=> 'decl' + * ``` + */ + type: string + + constructor(defaults?: object) + + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * ```js + * decl.after('color: black') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + after(newNode: Node | Node.ChildProps | Node[] | string): this + + /** + * It assigns properties to an existing node instance. + * + * ```js + * decl.assign({ prop: 'word-wrap', value: 'break-word' }) + * ``` + * + * @param overrides New properties to override the node. + * + * @return `this` for method chaining. + */ + assign(overrides: object): this + + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * ```js + * decl.before('content: ""') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + before(newNode: Node | Node.ChildProps | Node[] | string): this + + /** + * Clear the code style properties for the node and its children. + * + * ```js + * node.raws.before //=> ' ' + * node.cleanRaws() + * node.raws.before //=> undefined + * ``` + * + * @param keepBetween Keep the `raws.between` symbols. + */ + cleanRaws(keepBetween?: boolean): void + + /** + * It creates clone of an existing node, which includes all the properties + * and their values, that includes `raws` but not `type`. + * + * ```js + * decl.raws.before //=> "\n " + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) + * cloned.raws.before //=> "\n " + * cloned.toString() //=> -moz-transform: scale(0) + * ``` + * + * @param overrides New properties to override in the clone. + * + * @return Duplicate of the node instance. + */ + clone(overrides?: object): Node + + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param overrides New properties to override in the clone. + * @return New node. + */ + cloneAfter(overrides?: object): Node + + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * ```js + * decl.cloneBefore({ prop: '-moz-' + decl.prop }) + * ``` + * + * @param overrides Mew properties to override in the clone. + * + * @return New node + */ + cloneBefore(overrides?: object): Node + + /** + * It creates an instance of the class `CssSyntaxError` and parameters passed + * to this method are assigned to the error instance. + * + * The error instance will have description for the + * error, original position of the node in the + * source, showing line and column number. + * + * If any previous map is present, it would be used + * to get original position of the source. + * + * The Previous Map here is referred to the source map + * generated by previous compilation, example: Less, + * Stylus and Sass. + * + * This method returns the error instance instead of + * throwing it. + * + * ```js + * if (!variables[name]) { + * throw decl.error(`Unknown variable ${name}`, { word: name }) + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + * ``` + * + * @param message Description for the error instance. + * @param options Options for the error instance. + * + * @return Error instance is returned. + */ + error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError + + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * ```js + * if (comment.text === 'delete next') { + * const next = comment.next() + * if (next) { + * next.remove() + * } + * } + * ``` + * + * @return Next node. + */ + next(): Node.ChildNode | undefined + + /** + * Get the position for a word or an index inside the node. + * + * @param opts Options. + * @return Position. + */ + positionBy(opts?: Pick): Node.Position + + /** + * Convert string index to line/column. + * + * @param index The symbol number in the node’s string. + * @return Symbol position in file. + */ + positionInside(index: number): Node.Position + + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * ```js + * const annotation = decl.prev() + * if (annotation.type === 'comment') { + * readAnnotation(annotation.text) + * } + * ``` + * + * @return Previous node. + */ + prev(): Node.ChildNode | undefined + + /** + * Get the range for a word or start and end index inside the node. + * The start index is inclusive; the end index is exclusive. + * + * @param opts Options. + * @return Range. + */ + rangeBy( + opts?: Pick + ): Node.Range + + /** + * Returns a `raws` value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * ```js + * const root = postcss.parse('a { background: white }') + * root.nodes[0].append({ prop: 'color', value: 'black' }) + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * ``` + * + * @param prop Name of code style property. + * @param defaultType Name of default value, it can be missed + * if the value is the same as prop. + * @return {string} Code style value. + */ + raw(prop: string, defaultType?: string): string + + /** + * It removes the node from its parent and deletes its parent property. + * + * ```js + * if (decl.prop.match(/^-webkit-/)) { + * decl.remove() + * } + * ``` + * + * @return `this` for method chaining. + */ + remove(): this + + /** + * Inserts node(s) before the current node and removes the current node. + * + * ```js + * AtRule: { + * mixin: atrule => { + * atrule.replaceWith(mixinRules[atrule.params]) + * } + * } + * ``` + * + * @param nodes Mode(s) to replace current one. + * @return Current node to methods chain. + */ + replaceWith( + ...nodes: ( + | Node.ChildNode + | Node.ChildNode[] + | Node.ChildProps + | Node.ChildProps[] + )[] + ): this + + /** + * Finds the Root instance of the node’s tree. + * + * ```js + * root.nodes[0].nodes[0].root() === root + * ``` + * + * @return Root parent. + */ + root(): Root + + /** + * Fix circular links on `JSON.stringify()`. + * + * @return Cleaned object. + */ + toJSON(): object + + /** + * It compiles the node to browser readable cascading style sheets string + * depending on it's type. + * + * ```js + * new Rule({ selector: 'a' }).toString() //=> "a {}" + * ``` + * + * @param stringifier A syntax to use in string generation. + * @return CSS string of this node. + */ + toString(stringifier?: Stringifier | Syntax): string + + /** + * It is a wrapper for {@link Result#warn}, providing convenient + * way of generating warnings. + * + * ```js + * Declaration: { + * bad: (decl, { result }) => { + * decl.warn(result, 'Deprecated property: bad') + * } + * } + * ``` + * + * @param result The `Result` instance that will receive the warning. + * @param message Description for the warning. + * @param options Options for the warning. + * + * @return `Warning` instance is returned + */ + warn(result: Result, message: string, options?: WarningOptions): Warning +} + +declare class Node extends Node_ { } + +export = Node diff --git a/gsplat/node_modules/postcss/lib/node.js b/gsplat/node_modules/postcss/lib/node.js new file mode 100644 index 0000000..d79dd56 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/node.js @@ -0,0 +1,381 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let CssSyntaxError = require('./css-syntax-error') +let Stringifier = require('./stringifier') +let stringify = require('./stringify') + +function cloneNode(obj, parent) { + let cloned = new obj.constructor() + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i] + let type = typeof value + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent + } else if (i === 'source') { + cloned[i] = value + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)) + } else { + if (type === 'object' && value !== null) value = cloneNode(value) + cloned[i] = value + } + } + + return cloned +} + +class Node { + constructor(defaults = {}) { + this.raws = {} + this[isClean] = false + this[my] = true + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = [] + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()) + } else { + this.append(node) + } + } + } else { + this[name] = defaults[name] + } + } + } + + addToError(error) { + error.postcssNode = this + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ) + } + return error + } + + after(add) { + this.parent.insertAfter(this, add) + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name] + } + return this + } + + before(add) { + this.parent.insertBefore(this, add) + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before + delete this.raws.after + if (!keepBetween) delete this.raws.between + } + + clone(overrides = {}) { + let cloned = cloneNode(this) + for (let name in overrides) { + cloned[name] = overrides[name] + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertAfter(this, cloned) + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertBefore(this, cloned) + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts) + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty() + } + return true + } + } + } + + markDirty() { + if (this[isClean]) { + this[isClean] = false + let next = this + while ((next = next.parent)) { + next[isClean] = false + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index + 1] + } + + positionBy(opts, stringRepresentation) { + let pos = this.source.start + if (opts.index) { + pos = this.positionInside(opts.index, stringRepresentation) + } else if (opts.word) { + stringRepresentation = this.toString() + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) pos = this.positionInside(index, stringRepresentation) + } + return pos + } + + positionInside(index, stringRepresentation) { + let string = stringRepresentation || this.toString() + let column = this.source.start.column + let line = this.source.start.line + + for (let i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + } + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + } + + if (opts.word) { + let stringRepresentation = this.toString() + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) { + start = this.positionInside(index, stringRepresentation) + end = this.positionInside(index + opts.word.length, stringRepresentation) + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + } + } else if (opts.index) { + start = this.positionInside(opts.index) + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + } + } else if (opts.endIndex) { + end = this.positionInside(opts.endIndex) + } else if (opts.index) { + end = this.positionInside(opts.index + 1) + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line } + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier() + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this) + } + this.parent = undefined + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this + let foundSelf = false + for (let node of nodes) { + if (node === this) { + foundSelf = true + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node) + bookmark = node + } else { + this.parent.insertBefore(bookmark, node) + } + } + + if (!foundSelf) { + this.remove() + } + } + + return this + } + + root() { + let result = this + while (result.parent && result.parent.type !== 'document') { + result = result.parent + } + return result + } + + toJSON(_, inputs) { + let fixed = {} + let emitInputs = inputs == null + inputs = inputs || new Map() + let inputsNextIndex = 0 + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name] + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }) + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs) + } else if (name === 'source') { + let inputId = inputs.get(value.input) + if (inputId == null) { + inputId = inputsNextIndex + inputs.set(value.input, inputsNextIndex) + inputsNextIndex++ + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + } + } else { + fixed[name] = value + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()) + } + return this.proxyCache + } + + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify + let result = '' + stringifier(this, i => { + result += i + }) + return result + } + + warn(result, text, opts) { + let data = { node: this } + for (let i in opts) data[i] = opts[i] + return result.warn(text, data) + } + + get proxyOf() { + return this + } +} + +module.exports = Node +Node.default = Node diff --git a/gsplat/node_modules/postcss/lib/parse.d.ts b/gsplat/node_modules/postcss/lib/parse.d.ts new file mode 100644 index 0000000..4c943a4 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/parse.d.ts @@ -0,0 +1,9 @@ +import { Parser } from './postcss.js' + +interface Parse extends Parser { + default: Parse +} + +declare const parse: Parse + +export = parse diff --git a/gsplat/node_modules/postcss/lib/parse.js b/gsplat/node_modules/postcss/lib/parse.js new file mode 100644 index 0000000..971431f --- /dev/null +++ b/gsplat/node_modules/postcss/lib/parse.js @@ -0,0 +1,42 @@ +'use strict' + +let Container = require('./container') +let Parser = require('./parser') +let Input = require('./input') + +function parse(css, opts) { + let input = new Input(css, opts) + let parser = new Parser(input) + try { + parser.parse() + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser' + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser' + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser' + } + } + } + throw e + } + + return parser.root +} + +module.exports = parse +parse.default = parse + +Container.registerParse(parse) diff --git a/gsplat/node_modules/postcss/lib/parser.js b/gsplat/node_modules/postcss/lib/parser.js new file mode 100644 index 0000000..e1e2e19 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/parser.js @@ -0,0 +1,610 @@ +'use strict' + +let Declaration = require('./declaration') +let tokenizer = require('./tokenize') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Root = require('./root') +let Rule = require('./rule') + +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +} + +function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i] + let pos = token[3] || token[2] + if (pos) return pos + } +} + +class Parser { + constructor(input) { + this.input = input + + this.root = new Root() + this.current = this.root + this.spaces = '' + this.semicolon = false + this.customProperty = false + + this.createTokenizer() + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } + } + + atrule(token) { + let node = new AtRule() + node.name = token[1].slice(1) + if (node.name === '') { + this.unnamedAtrule(node, token) + } + this.init(node, token[2]) + + let type + let prev + let shift + let last = false + let open = false + let params = [] + let brackets = [] + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + type = token[0] + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']') + } else if (type === '{' && brackets.length > 0) { + brackets.push('}') + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]) + node.source.end.offset++ + this.semicolon = true + break + } else if (type === '{') { + open = true + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1 + prev = params[shift] + while (prev && prev[0] === 'space') { + prev = params[--shift] + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]) + node.source.end.offset++ + } + } + this.end(token) + break + } else { + params.push(token) + } + } else { + params.push(token) + } + + if (this.tokenizer.endOfFile()) { + last = true + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params) + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params) + this.raw(node, 'params', params) + if (last) { + token = params[params.length - 1] + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + this.spaces = node.raws.between + node.raws.between = '' + } + } else { + node.raws.afterName = '' + node.params = '' + } + + if (open) { + node.nodes = [] + this.current = node + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens) + if (colon === false) return + + let founded = 0 + let token + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j] + if (token[0] !== 'space') { + founded += 1 + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0 + let token, type, prev + for (let [i, element] of tokens.entries()) { + token = element + type = token[0] + + if (type === '(') { + brackets += 1 + } + if (type === ')') { + brackets -= 1 + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token) + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token + } + return false + } + + comment(token) { + let node = new Comment() + this.init(node, token[2]) + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + + let text = token[1].slice(2, -2) + if (/^\s*$/.test(text)) { + node.text = '' + node.raws.left = text + node.raws.right = '' + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/) + node.text = match[2] + node.raws.left = match[1] + node.raws.right = match[3] + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input) + } + + decl(tokens, customProperty) { + let node = new Declaration() + this.init(node, tokens[0][2]) + + let last = tokens[tokens.length - 1] + if (last[0] === ';') { + this.semicolon = true + tokens.pop() + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ) + node.source.end.offset++ + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens) + node.raws.before += tokens.shift()[1] + } + node.source.start = this.getPosition(tokens[0][2]) + + node.prop = '' + while (tokens.length) { + let type = tokens[0][0] + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1] + } + + node.raws.between = '' + + let token + while (tokens.length) { + token = tokens.shift() + + if (token[0] === ':') { + node.raws.between += token[1] + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]) + } + node.raws.between += token[1] + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0] + node.prop = node.prop.slice(1) + } + + let firstSpaces = [] + let next + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()) + } + + this.precheckMissedSemicolon(tokens) + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i] + if (token[1].toLowerCase() === '!important') { + node.important = true + let string = this.stringFrom(tokens, i) + string = this.spacesFromEnd(tokens) + string + if (string !== ' !important') node.raws.important = string + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0) + let str = '' + for (let j = i; j > 0; j--) { + let type = cache[j][0] + if (str.trim().indexOf('!') === 0 && type !== 'space') { + break + } + str = cache.pop()[1] + str + } + if (str.trim().indexOf('!') === 0) { + node.important = true + node.raws.important = str + tokens = cache + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment') + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join('') + firstSpaces = [] + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty) + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens) + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule() + this.init(node, token[2]) + node.selector = '' + node.raws.between = '' + this.current = node + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.semicolon = false + + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.spaces = '' + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]) + this.current.source.end.offset++ + this.current = this.current.parent + } else { + this.unexpectedClose(token) + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock() + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.root.source.end = this.getPosition(this.tokenizer.position()) + } + + freeSemicolon(token) { + this.spaces += token[1] + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1] + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces + this.spaces = '' + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset) + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node) + node.source = { + input: this.input, + start: this.getPosition(offset) + } + node.raws.before = this.spaces + this.spaces = '' + if (node.type !== 'comment') this.semicolon = false + } + + other(start) { + let end = false + let type = null + let colon = false + let bracket = null + let brackets = [] + let customProperty = start[1].startsWith('--') + + let tokens = [] + let token = start + while (token) { + type = token[0] + tokens.push(token) + + if (type === '(' || type === '[') { + if (!bracket) bracket = token + brackets.push(type === '(' ? ')' : ']') + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token + brackets.push('}') + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty) + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens) + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()) + end = true + break + } else if (type === ':') { + colon = true + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + if (brackets.length === 0) bracket = null + } + + token = this.tokenizer.nextToken() + } + + if (this.tokenizer.endOfFile()) end = true + if (brackets.length > 0) this.unclosedBracket(bracket) + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0] + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()) + } + } + this.decl(tokens, customProperty) + } else { + this.unknownWord(tokens) + } + } + + parse() { + let token + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + + switch (token[0]) { + case 'space': + this.spaces += token[1] + break + + case ';': + this.freeSemicolon(token) + break + + case '}': + this.end(token) + break + + case 'comment': + this.comment(token) + break + + case 'at-word': + this.atrule(token) + break + + case '{': + this.emptyRule(token) + break + + default: + this.other(token) + break + } + } + this.endFile() + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type + let length = tokens.length + let value = '' + let clean = true + let next, prev + + for (let i = 0; i < length; i += 1) { + token = tokens[i] + type = token[0] + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false + } else { + value += token[1] + } + } else { + clean = false + } + } else { + value += token[1] + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], '') + node.raws[prop] = { raw, value } + } + node[prop] = value + } + + rule(tokens) { + tokens.pop() + + let node = new Rule() + this.init(node, tokens[0][2]) + + node.raws.between = this.spacesAndCommentsFromEnd(tokens) + this.raw(node, 'selector', tokens) + this.current = node + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next + let spaces = '' + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1] + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + stringFrom(tokens, from) { + let result = '' + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1] + } + tokens.splice(from, tokens.length - from) + return result + } + + unclosedBlock() { + let pos = this.current.source.start + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word', + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } +} + +module.exports = Parser diff --git a/gsplat/node_modules/postcss/lib/postcss.d.mts b/gsplat/node_modules/postcss/lib/postcss.d.mts new file mode 100644 index 0000000..a8ca8c7 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/postcss.d.mts @@ -0,0 +1,72 @@ +export { + // postcss function / namespace + default, + + // Value exports from postcss.mjs + stringify, + fromJSON, + // @ts-expect-error This value exists, but it’s untyped. + plugin, + parse, + list, + + document, + comment, + atRule, + rule, + decl, + root, + + CssSyntaxError, + Declaration, + Container, + Processor, + Document, + Comment, + Warning, + AtRule, + Result, + Input, + Rule, + Root, + Node, + + // Type-only exports + AcceptedPlugin, + AnyNode, + AtRuleProps, + Builder, + ChildNode, + ChildProps, + CommentProps, + ContainerProps, + DeclarationProps, + DocumentProps, + FilePosition, + Helpers, + JSONHydrator, + Message, + NodeErrorOptions, + NodeProps, + OldPlugin, + Parser, + Plugin, + PluginCreator, + Position, + Postcss, + ProcessOptions, + RootProps, + RuleProps, + Source, + SourceMap, + SourceMapOptions, + Stringifier, + Syntax, + TransformCallback, + Transformer, + WarningOptions, + + // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. + type LazyResult, + +} from './postcss.js' diff --git a/gsplat/node_modules/postcss/lib/postcss.d.ts b/gsplat/node_modules/postcss/lib/postcss.d.ts new file mode 100644 index 0000000..49af61c --- /dev/null +++ b/gsplat/node_modules/postcss/lib/postcss.d.ts @@ -0,0 +1,441 @@ +import { RawSourceMap, SourceMapGenerator } from 'source-map-js' + +import AtRule, { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { ContainerProps } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document, { DocumentProps } from './document.js' +import Input, { FilePosition } from './input.js' +import LazyResult from './lazy-result.js' +import list from './list.js' +import Node, { + AnyNode, + ChildNode, + ChildProps, + NodeErrorOptions, + NodeProps, + Position, + Source +} from './node.js' +import Processor from './processor.js' +import Result, { Message } from './result.js' +import Root, { RootProps } from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +type DocumentProcessor = ( + document: Document, + helper: postcss.Helpers +) => Promise | void +type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise | void +type DeclarationProcessor = ( + decl: Declaration, + helper: postcss.Helpers +) => Promise | void +type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise | void +type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise | void +type CommentProcessor = ( + comment: Comment, + helper: postcss.Helpers +) => Promise | void + +interface Processors { + /** + * Will be called on all`AtRule` nodes. + * + * Will be called again on node or children changes. + */ + AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `AtRule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `Comment` nodes. + * + * Will be called again on node or children changes. + */ + Comment?: CommentProcessor + + /** + * Will be called on all `Comment` nodes after listeners + * for `Comment` event. + * + * Will be called again on node or children changes. + */ + CommentExit?: CommentProcessor + + /** + * Will be called on all `Declaration` nodes after listeners + * for `Declaration` event. + * + * Will be called again on node or children changes. + */ + Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor + + /** + * Will be called on all `Declaration` nodes. + * + * Will be called again on node or children changes. + */ + DeclarationExit?: + | { [prop: string]: DeclarationProcessor } + | DeclarationProcessor + + /** + * Will be called on `Document` node. + * + * Will be called again on children changes. + */ + Document?: DocumentProcessor + + /** + * Will be called on `Document` node, when all children will be processed. + * + * Will be called again on children changes. + */ + DocumentExit?: DocumentProcessor + + /** + * Will be called on `Root` node once. + */ + Once?: RootProcessor + + /** + * Will be called on `Root` node once, when all children will be processed. + */ + OnceExit?: RootProcessor + + /** + * Will be called on `Root` node. + * + * Will be called again on children changes. + */ + Root?: RootProcessor + + /** + * Will be called on `Root` node, when all children will be processed. + * + * Will be called again on children changes. + */ + RootExit?: RootProcessor + + /** + * Will be called on all `Rule` nodes. + * + * Will be called again on node or children changes. + */ + Rule?: RuleProcessor + + /** + * Will be called on all `Rule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + RuleExit?: RuleProcessor +} + +declare namespace postcss { + export { + AnyNode, + AtRule, + AtRuleProps, + ChildNode, + ChildProps, + Comment, + CommentProps, + Container, + ContainerProps, + CssSyntaxError, + Declaration, + DeclarationProps, + Document, + DocumentProps, + FilePosition, + Input, + LazyResult, + list, + Message, + Node, + NodeErrorOptions, + NodeProps, + Position, + Processor, + Result, + Root, + RootProps, + Rule, + RuleProps, + Source, + Warning, + WarningOptions + } + + export type SourceMap = SourceMapGenerator & { + toJSON(): RawSourceMap + } + + export type Helpers = { postcss: Postcss; result: Result } & Postcss + + export interface Plugin extends Processors { + postcssPlugin: string + prepare?: (result: Result) => Processors + } + + export interface PluginCreator { + (opts?: PluginOptions): Plugin | Processor + postcss: true + } + + export interface Transformer extends TransformCallback { + postcssPlugin: string + postcssVersion: string + } + + export interface TransformCallback { + (root: Root, result: Result): Promise | void + } + + export interface OldPlugin extends Transformer { + (opts?: T): Transformer + postcss: Transformer + } + + export type AcceptedPlugin = + | { + postcss: Processor | TransformCallback + } + | OldPlugin + | Plugin + | PluginCreator + | Processor + | TransformCallback + + export interface Parser { + ( + css: { toString(): string } | string, + opts?: Pick + ): RootNode + } + + export interface Builder { + (part: string, node?: AnyNode, type?: 'end' | 'start'): void + } + + export interface Stringifier { + (node: AnyNode, builder: Builder): void + } + + export interface JSONHydrator { + (data: object): Node + (data: object[]): Node[] + } + + export interface Syntax { + /** + * Function to generate AST by string. + */ + parse?: Parser + + /** + * Class to generate string by AST. + */ + stringify?: Stringifier + } + + export interface SourceMapOptions { + /** + * Use absolute path in generated source map. + */ + absolute?: boolean + + /** + * Indicates that PostCSS should add annotation comments to the CSS. + * By default, PostCSS will always add a comment with a path + * to the source map. PostCSS will not add annotations to CSS files + * that do not contain any comments. + * + * By default, PostCSS presumes that you want to save the source map as + * `opts.to + '.map'` and will use this path in the annotation comment. + * A different path can be set by providing a string value for annotation. + * + * If you have set `inline: true`, annotation cannot be disabled. + */ + annotation?: ((file: string, root: Root) => string) | boolean | string + + /** + * Override `from` in map’s sources. + */ + from?: string + + /** + * Indicates that the source map should be embedded in the output CSS + * as a Base64-encoded comment. By default, it is `true`. + * But if all previous maps are external, not inline, PostCSS will not embed + * the map even if you do not set this option. + * + * If you have an inline source map, the result.map property will be empty, + * as the source map will be contained within the text of `result.css`. + */ + inline?: boolean + + /** + * Source map content from a previous processing step (e.g., Sass). + * + * PostCSS will try to read the previous source map + * automatically (based on comments within the source CSS), but you can use + * this option to identify it manually. + * + * If desired, you can omit the previous map with prev: `false`. + */ + prev?: ((file: string) => string) | boolean | object | string + + /** + * Indicates that PostCSS should set the origin content (e.g., Sass source) + * of the source map. By default, it is true. But if all previous maps do not + * contain sources content, PostCSS will also leave it out even if you + * do not set this option. + */ + sourcesContent?: boolean + } + + export interface ProcessOptions { + /** + * The path of the CSS source file. You should always set `from`, + * because it is used in source map generation and syntax error messages. + */ + from?: string | undefined + + /** + * Source map options + */ + map?: boolean | SourceMapOptions + + /** + * Function to generate AST by string. + */ + parser?: Parser | Syntax + + /** + * Class to generate string by AST. + */ + stringifier?: Stringifier | Syntax + + /** + * Object with parse and stringify. + */ + syntax?: Syntax + + /** + * The path where you'll put the output CSS file. You should always set `to` + * to generate correct source maps. + */ + to?: string + } + + export type Postcss = typeof postcss + + /** + * Default function to convert a node tree into a CSS string. + */ + export let stringify: Stringifier + + /** + * Parses source css and returns a new `Root` or `Document` node, + * which contains the source CSS nodes. + * + * ```js + * // Simple CSS concatenation with source map support + * const root1 = postcss.parse(css1, { from: file1 }) + * const root2 = postcss.parse(css2, { from: file2 }) + * root1.append(root2).toResult().css + * ``` + */ + export let parse: Parser + + /** + * Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes. + * + * ```js + * const json = root.toJSON() + * // save to file, send by network, etc + * const root2 = postcss.fromJSON(json) + * ``` + */ + export let fromJSON: JSONHydrator + + /** + * Creates a new `Comment` node. + * + * @param defaults Properties for the new node. + * @return New comment node + */ + export function comment(defaults?: CommentProps): Comment + + /** + * Creates a new `AtRule` node. + * + * @param defaults Properties for the new node. + * @return New at-rule node. + */ + export function atRule(defaults?: AtRuleProps): AtRule + + /** + * Creates a new `Declaration` node. + * + * @param defaults Properties for the new node. + * @return New declaration node. + */ + export function decl(defaults?: DeclarationProps): Declaration + + /** + * Creates a new `Rule` node. + * + * @param default Properties for the new node. + * @return New rule node. + */ + export function rule(defaults?: RuleProps): Rule + + /** + * Creates a new `Root` node. + * + * @param defaults Properties for the new node. + * @return New root node. + */ + export function root(defaults?: RootProps): Root + + /** + * Creates a new `Document` node. + * + * @param defaults Properties for the new node. + * @return New document node. + */ + export function document(defaults?: DocumentProps): Document + + export { postcss as default } +} + +/** + * Create a new `Processor` instance that will apply `plugins` + * as CSS processors. + * + * ```js + * let postcss = require('postcss') + * + * postcss(plugins).process(css, { from, to }).then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param plugins PostCSS plugins. + * @return Processor to process multiple CSS. + */ +declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor +declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor + +export = postcss diff --git a/gsplat/node_modules/postcss/lib/postcss.js b/gsplat/node_modules/postcss/lib/postcss.js new file mode 100644 index 0000000..080ee83 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/postcss.js @@ -0,0 +1,101 @@ +'use strict' + +let CssSyntaxError = require('./css-syntax-error') +let Declaration = require('./declaration') +let LazyResult = require('./lazy-result') +let Container = require('./container') +let Processor = require('./processor') +let stringify = require('./stringify') +let fromJSON = require('./fromJSON') +let Document = require('./document') +let Warning = require('./warning') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Result = require('./result.js') +let Input = require('./input') +let parse = require('./parse') +let list = require('./list') +let Rule = require('./rule') +let Root = require('./root') +let Node = require('./node') + +function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0] + } + return new Processor(plugins) +} + +postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true + // eslint-disable-next-line no-console + console.warn( + name + + ': postcss.plugin was deprecated. Migration guide:\n' + + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' + ) + if (process.env.LANG && process.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ + // eslint-disable-next-line no-console + console.warn( + name + + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + + 'https://www.w3ctech.com/topic/2226' + ) + } + } + let transformer = initializer(...args) + transformer.postcssPlugin = name + transformer.postcssVersion = new Processor().version + return transformer + } + + let cache + Object.defineProperty(creator, 'postcss', { + get() { + if (!cache) cache = creator() + return cache + } + }) + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts) + } + + return creator +} + +postcss.stringify = stringify +postcss.parse = parse +postcss.fromJSON = fromJSON +postcss.list = list + +postcss.comment = defaults => new Comment(defaults) +postcss.atRule = defaults => new AtRule(defaults) +postcss.decl = defaults => new Declaration(defaults) +postcss.rule = defaults => new Rule(defaults) +postcss.root = defaults => new Root(defaults) +postcss.document = defaults => new Document(defaults) + +postcss.CssSyntaxError = CssSyntaxError +postcss.Declaration = Declaration +postcss.Container = Container +postcss.Processor = Processor +postcss.Document = Document +postcss.Comment = Comment +postcss.Warning = Warning +postcss.AtRule = AtRule +postcss.Result = Result +postcss.Input = Input +postcss.Rule = Rule +postcss.Root = Root +postcss.Node = Node + +LazyResult.registerPostcss(postcss) + +module.exports = postcss +postcss.default = postcss diff --git a/gsplat/node_modules/postcss/lib/postcss.mjs b/gsplat/node_modules/postcss/lib/postcss.mjs new file mode 100644 index 0000000..3507598 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/postcss.mjs @@ -0,0 +1,30 @@ +import postcss from './postcss.js' + +export default postcss + +export const stringify = postcss.stringify +export const fromJSON = postcss.fromJSON +export const plugin = postcss.plugin +export const parse = postcss.parse +export const list = postcss.list + +export const document = postcss.document +export const comment = postcss.comment +export const atRule = postcss.atRule +export const rule = postcss.rule +export const decl = postcss.decl +export const root = postcss.root + +export const CssSyntaxError = postcss.CssSyntaxError +export const Declaration = postcss.Declaration +export const Container = postcss.Container +export const Processor = postcss.Processor +export const Document = postcss.Document +export const Comment = postcss.Comment +export const Warning = postcss.Warning +export const AtRule = postcss.AtRule +export const Result = postcss.Result +export const Input = postcss.Input +export const Rule = postcss.Rule +export const Root = postcss.Root +export const Node = postcss.Node diff --git a/gsplat/node_modules/postcss/lib/previous-map.d.ts b/gsplat/node_modules/postcss/lib/previous-map.d.ts new file mode 100644 index 0000000..23edeb5 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/previous-map.d.ts @@ -0,0 +1,81 @@ +import { SourceMapConsumer } from 'source-map-js' + +import { ProcessOptions } from './postcss.js' + +declare namespace PreviousMap { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { PreviousMap_ as default } +} + +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * ```js + * const root = parse(css, { from: 'a.sass.css' }) + * root.input.map //=> PreviousMap + * ``` + */ +declare class PreviousMap_ { + /** + * `sourceMappingURL` content. + */ + annotation?: string + + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + */ + file?: string + + /** + * Was source map inlined by data-uri to input CSS. + */ + inline: boolean + + /** + * Path to source map file. + */ + mapFile?: string + + /** + * The directory with source map file, if source map is in separated file. + */ + root?: string + + /** + * Source map file content. + */ + text?: string + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return Object with source map information. + */ + consumer(): SourceMapConsumer + + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return Is `sourcesContent` present. + */ + withContent(): boolean +} + +declare class PreviousMap extends PreviousMap_ {} + +export = PreviousMap diff --git a/gsplat/node_modules/postcss/lib/previous-map.js b/gsplat/node_modules/postcss/lib/previous-map.js new file mode 100644 index 0000000..f3093df --- /dev/null +++ b/gsplat/node_modules/postcss/lib/previous-map.js @@ -0,0 +1,142 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { existsSync, readFileSync } = require('fs') +let { dirname, join } = require('path') + +function fromBase64(str) { + if (Buffer) { + return Buffer.from(str, 'base64').toString() + } else { + /* c8 ignore next 2 */ + return window.atob(str) + } +} + +class PreviousMap { + constructor(css, opts) { + if (opts.map === false) return + this.loadAnnotation(css) + this.inline = this.startWith(this.annotation, 'data:') + + let prev = opts.map ? opts.map.prev : undefined + let text = this.loadMap(opts.from, prev) + if (!this.mapFile && opts.from) { + this.mapFile = opts.from + } + if (this.mapFile) this.root = dirname(this.mapFile) + if (text) this.text = text + } + + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer(this.text) + } + return this.consumerCache + } + + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/ + let baseUri = /^data:application\/json;base64,/ + let charsetUri = /^data:application\/json;charset=utf-?8,/ + let uri = /^data:application\/json,/ + + if (charsetUri.test(text) || uri.test(text)) { + return decodeURIComponent(text.substr(RegExp.lastMatch.length)) + } + + if (baseCharsetUri.test(text) || baseUri.test(text)) { + return fromBase64(text.substr(RegExp.lastMatch.length)) + } + + let encoding = text.match(/data:application\/json;([^,]+),/)[1] + throw new Error('Unsupported source map encoding ' + encoding) + } + + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() + } + + isMap(map) { + if (typeof map !== 'object') return false + return ( + typeof map.mappings === 'string' || + typeof map._mappings === 'string' || + Array.isArray(map.sections) + ) + } + + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/gm) + if (!comments) return + + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()) + let end = css.indexOf('*/', start) + + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)) + } + } + + loadFile(path) { + this.root = dirname(path) + if (existsSync(path)) { + this.mapFile = path + return readFileSync(path, 'utf-8').toString().trim() + } + } + + loadMap(file, prev) { + if (prev === false) return false + + if (prev) { + if (typeof prev === 'string') { + return prev + } else if (typeof prev === 'function') { + let prevPath = prev(file) + if (prevPath) { + let map = this.loadFile(prevPath) + if (!map) { + throw new Error( + 'Unable to load previous source map: ' + prevPath.toString() + ) + } + return map + } + } else if (prev instanceof SourceMapConsumer) { + return SourceMapGenerator.fromSourceMap(prev).toString() + } else if (prev instanceof SourceMapGenerator) { + return prev.toString() + } else if (this.isMap(prev)) { + return JSON.stringify(prev) + } else { + throw new Error( + 'Unsupported previous source map format: ' + prev.toString() + ) + } + } else if (this.inline) { + return this.decodeInline(this.annotation) + } else if (this.annotation) { + let map = this.annotation + if (file) map = join(dirname(file), map) + return this.loadFile(map) + } + } + + startWith(string, start) { + if (!string) return false + return string.substr(0, start.length) === start + } + + withContent() { + return !!( + this.consumer().sourcesContent && + this.consumer().sourcesContent.length > 0 + ) + } +} + +module.exports = PreviousMap +PreviousMap.default = PreviousMap diff --git a/gsplat/node_modules/postcss/lib/processor.d.ts b/gsplat/node_modules/postcss/lib/processor.d.ts new file mode 100644 index 0000000..50c9a07 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/processor.d.ts @@ -0,0 +1,115 @@ +import Document from './document.js' +import LazyResult from './lazy-result.js' +import NoWorkResult from './no-work-result.js' +import { + AcceptedPlugin, + Plugin, + ProcessOptions, + TransformCallback, + Transformer +} from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Processor { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Processor_ as default } +} + +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.process(css1).then(result => console.log(result.css)) + * processor.process(css2).then(result => console.log(result.css)) + * ``` + */ +declare class Processor_ { + /** + * Plugins added to this processor. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.plugins.length //=> 2 + * ``` + */ + plugins: (Plugin | TransformCallback | Transformer)[] + + /** + * Current PostCSS version. + * + * ```js + * if (result.processor.version.split('.')[0] !== '6') { + * throw new Error('This plugin works only with PostCSS 6') + * } + * ``` + */ + version: string + + /** + * @param plugins PostCSS plugins + */ + constructor(plugins?: AcceptedPlugin[]) + + /** + * Parses source CSS and returns a `LazyResult` Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the `LazyResult` methods. + * + * ```js + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param css String with input CSS or any object with a `toString()` method, + * like a Buffer. Optionally, send a `Result` instance + * and the processor will take the `Root` from it. + * @param opts Options. + * @return Promise proxy. + */ + process( + css: { toString(): string } | LazyResult | Result | Root | string + ): LazyResult | NoWorkResult + process( + css: { toString(): string } | LazyResult | Result | Root | string, + options: ProcessOptions + ): LazyResult + + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin in `Plugin` format. + * * A plugin creator function with `pluginCreator.postcss = true`. + * PostCSS will call this function without argument to get plugin. + * * A function. PostCSS will pass the function a {@link Root} + * as the first argument and current `Result` instance + * as the second. + * * Another `Processor` instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * ```js + * const processor = postcss() + * .use(autoprefixer) + * .use(postcssNested) + * ``` + * + * @param plugin PostCSS plugin or `Processor` with plugins. + * @return Current processor to make methods chain. + */ + use(plugin: AcceptedPlugin): this +} + +declare class Processor extends Processor_ {} + +export = Processor diff --git a/gsplat/node_modules/postcss/lib/processor.js b/gsplat/node_modules/postcss/lib/processor.js new file mode 100644 index 0000000..0629eb4 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/processor.js @@ -0,0 +1,67 @@ +'use strict' + +let NoWorkResult = require('./no-work-result') +let LazyResult = require('./lazy-result') +let Document = require('./document') +let Root = require('./root') + +class Processor { + constructor(plugins = []) { + this.version = '8.4.32' + this.plugins = this.normalize(plugins) + } + + normalize(plugins) { + let normalized = [] + for (let i of plugins) { + if (i.postcss === true) { + i = i() + } else if (i.postcss) { + i = i.postcss + } + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins) + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i) + } else if (typeof i === 'function') { + normalized.push(i) + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error( + 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + + 'one of the syntax/parser/stringifier options as outlined ' + + 'in your PostCSS runner documentation.' + ) + } + } else { + throw new Error(i + ' is not a PostCSS plugin') + } + } + return normalized + } + + process(css, opts = {}) { + if ( + this.plugins.length === 0 && + typeof opts.parser === 'undefined' && + typeof opts.stringifier === 'undefined' && + typeof opts.syntax === 'undefined' + ) { + return new NoWorkResult(this, css, opts) + } else { + return new LazyResult(this, css, opts) + } + } + + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])) + return this + } +} + +module.exports = Processor +Processor.default = Processor + +Root.registerProcessor(Processor) +Document.registerProcessor(Processor) diff --git a/gsplat/node_modules/postcss/lib/result.d.ts b/gsplat/node_modules/postcss/lib/result.d.ts new file mode 100644 index 0000000..c3dcbda --- /dev/null +++ b/gsplat/node_modules/postcss/lib/result.d.ts @@ -0,0 +1,206 @@ +import { + Document, + Node, + Plugin, + ProcessOptions, + Root, + SourceMap, + TransformCallback, + Warning, + WarningOptions +} from './postcss.js' +import Processor from './processor.js' + +declare namespace Result { + export interface Message { + [others: string]: any + + /** + * Source PostCSS plugin name. + */ + plugin?: string + + /** + * Message type. + */ + type: string + } + + export interface ResultOptions extends ProcessOptions { + /** + * The CSS node that was the source of the warning. + */ + node?: Node + + /** + * Name of plugin that created this warning. `Result#warn` will fill it + * automatically with `Plugin#postcssPlugin` value. + */ + plugin?: string + } + + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Result_ as default } +} + +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by `LazyResult#then` + * or `Root#toResult` methods. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }) + * ``` + * + * ```js + * const result2 = postcss.parse(css).toResult() + * ``` + */ +declare class Result_ { + /** + * A CSS string representing of `Result#root`. + * + * ```js + * postcss.parse('a{}').toResult().css //=> "a{}" + * ``` + */ + css: string + + /** + * Last runned PostCSS plugin. + */ + lastPlugin: Plugin | TransformCallback + + /** + * An instance of `SourceMapGenerator` class from the `source-map` library, + * representing changes to the `Result#root` instance. + * + * ```js + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * ``` + * + * ```js + * if (result.map) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()) + * } + * ``` + */ + map: SourceMap + + /** + * Contains messages from plugins (e.g., warnings or custom messages). + * Each message should have type and plugin properties. + * + * ```js + * AtRule: { + * import: (atRule, { result }) { + * const importedFile = parseImport(atRule) + * result.messages.push({ + * type: 'dependency', + * plugin: 'postcss-import', + * file: importedFile, + * parent: result.opts.from + * }) + * } + * } + * ``` + */ + messages: Result.Message[] + + /** + * Options from the `Processor#process` or `Root#toResult` call + * that produced this Result instance.] + * + * ```js + * root.toResult(opts).opts === opts + * ``` + */ + opts: Result.ResultOptions + + /** + * The Processor instance used for this transformation. + * + * ```js + * for (const plugin of result.processor.plugins) { + * if (plugin.postcssPlugin === 'postcss-bad') { + * throw 'postcss-good is incompatible with postcss-bad' + * } + * }) + * ``` + */ + processor: Processor + + /** + * Root node after all transformations. + * + * ```js + * root.toResult().root === root + * ``` + */ + root: RootNode + + /** + * @param processor Processor used for this transformation. + * @param root Root node after all transformations. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions) + + /** + * Returns for `Result#css` content. + * + * ```js + * result + '' === result.css + * ``` + * + * @return String representing of `Result#root`. + */ + toString(): string + + /** + * Creates an instance of `Warning` and adds it to `Result#messages`. + * + * ```js + * if (decl.important) { + * result.warn('Avoid !important', { node: decl, word: '!important' }) + * } + * ``` + * + * @param text Warning message. + * @param opts Warning options. + * @return Created warning. + */ + warn(message: string, options?: WarningOptions): Warning + + /** + * Returns warnings from plugins. Filters `Warning` instances + * from `Result#messages`. + * + * ```js + * result.warnings().forEach(warn => { + * console.warn(warn.toString()) + * }) + * ``` + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `Result#css` property. + * Use it with syntaxes that generate non-CSS output. + * + * ```js + * result.css === result.content + * ``` + */ + get content(): string +} + +declare class Result extends Result_ {} + +export = Result diff --git a/gsplat/node_modules/postcss/lib/result.js b/gsplat/node_modules/postcss/lib/result.js new file mode 100644 index 0000000..a39751d --- /dev/null +++ b/gsplat/node_modules/postcss/lib/result.js @@ -0,0 +1,42 @@ +'use strict' + +let Warning = require('./warning') + +class Result { + constructor(processor, root, opts) { + this.processor = processor + this.messages = [] + this.root = root + this.opts = opts + this.css = undefined + this.map = undefined + } + + toString() { + return this.css + } + + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin + } + } + + let warning = new Warning(text, opts) + this.messages.push(warning) + + return warning + } + + warnings() { + return this.messages.filter(i => i.type === 'warning') + } + + get content() { + return this.css + } +} + +module.exports = Result +Result.default = Result diff --git a/gsplat/node_modules/postcss/lib/root.d.ts b/gsplat/node_modules/postcss/lib/root.d.ts new file mode 100644 index 0000000..98fb4bc --- /dev/null +++ b/gsplat/node_modules/postcss/lib/root.d.ts @@ -0,0 +1,86 @@ +import Container, { ContainerProps } from './container.js' +import Document from './document.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' + +declare namespace Root { + export interface RootRaws extends Record { + /** + * The space symbols after the last child to the end of file. + */ + after?: string + + /** + * Non-CSS code after `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeAfter?: string + + /** + * Non-CSS code before `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeBefore?: string + + /** + * Is the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface RootProps extends ContainerProps { + /** + * Information used to generate byte-to-byte equal node string + * as it was in the origin input. + * */ + raws?: RootRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Root_ as default } +} + +/** + * Represents a CSS file and contains all its parsed nodes. + * + * ```js + * const root = postcss.parse('a{color:black} b{z-index:2}') + * root.type //=> 'root' + * root.nodes.length //=> 2 + * ``` + */ +declare class Root_ extends Container { + parent: Document | undefined + raws: Root.RootRaws + type: 'root' + + constructor(defaults?: Root.RootProps) + + assign(overrides: object | Root.RootProps): this + clone(overrides?: Partial): Root + cloneAfter(overrides?: Partial): Root + cloneBefore(overrides?: Partial): Root + + /** + * Returns a `Result` instance representing the root’s CSS. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * root1.append(root2) + * const result = root1.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current root’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Root extends Root_ {} + +export = Root diff --git a/gsplat/node_modules/postcss/lib/root.js b/gsplat/node_modules/postcss/lib/root.js new file mode 100644 index 0000000..ea574ed --- /dev/null +++ b/gsplat/node_modules/postcss/lib/root.js @@ -0,0 +1,61 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Root extends Container { + constructor(defaults) { + super(defaults) + this.type = 'root' + if (!this.nodes) this.nodes = [] + } + + normalize(child, sample, type) { + let nodes = super.normalize(child) + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before + } else { + delete sample.raws.before + } + } else if (this.first !== sample) { + for (let node of nodes) { + node.raws.before = sample.raws.before + } + } + } + + return nodes + } + + removeChild(child, ignore) { + let index = this.index(child) + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before + } + + return super.removeChild(child) + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + return lazy.stringify() + } +} + +Root.registerLazyResult = dependant => { + LazyResult = dependant +} + +Root.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Root +Root.default = Root + +Container.registerRoot(Root) diff --git a/gsplat/node_modules/postcss/lib/rule.d.ts b/gsplat/node_modules/postcss/lib/rule.d.ts new file mode 100644 index 0000000..04be5d6 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/rule.d.ts @@ -0,0 +1,113 @@ +import Container, { ContainerProps } from './container.js' + +declare namespace Rule { + export interface RuleRaws extends Record { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the selector and `{` for rules. + */ + between?: string + + /** + * Contains `true` if there is semicolon after rule. + */ + ownSemicolon?: string + + /** + * The rule’s selector with comments. + */ + selector?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface RuleProps extends ContainerProps { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: RuleRaws + /** Selector or selectors of the rule. */ + selector?: string + /** Selectors of the rule represented as an array of strings. */ + selectors?: string[] + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Rule_ as default } +} + +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * ```js + * Once (root, { Rule }) { + * let a = new Rule({ selector: 'a' }) + * a.append(…) + * root.append(a) + * } + * ``` + * + * ```js + * const root = postcss.parse('a{}') + * const rule = root.first + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + * ``` + */ +declare class Rule_ extends Container { + parent: Container | undefined + raws: Rule.RuleRaws + /** + * The rule’s full selector represented as a string. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * rule.selector //=> 'a, b' + * ``` + */ + selector: string + + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong'] + * rule.selector //=> 'a, strong' + * ``` + */ + selectors: string[] + + type: 'rule' + + constructor(defaults?: Rule.RuleProps) + assign(overrides: object | Rule.RuleProps): this + clone(overrides?: Partial): Rule + cloneAfter(overrides?: Partial): Rule + cloneBefore(overrides?: Partial): Rule +} + +declare class Rule extends Rule_ {} + +export = Rule diff --git a/gsplat/node_modules/postcss/lib/rule.js b/gsplat/node_modules/postcss/lib/rule.js new file mode 100644 index 0000000..a93ab25 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/rule.js @@ -0,0 +1,27 @@ +'use strict' + +let Container = require('./container') +let list = require('./list') + +class Rule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'rule' + if (!this.nodes) this.nodes = [] + } + + get selectors() { + return list.comma(this.selector) + } + + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen') + this.selector = values.join(sep) + } +} + +module.exports = Rule +Rule.default = Rule + +Container.registerRule(Rule) diff --git a/gsplat/node_modules/postcss/lib/stringifier.d.ts b/gsplat/node_modules/postcss/lib/stringifier.d.ts new file mode 100644 index 0000000..f707a6a --- /dev/null +++ b/gsplat/node_modules/postcss/lib/stringifier.d.ts @@ -0,0 +1,46 @@ +import { + AnyNode, + AtRule, + Builder, + Comment, + Container, + Declaration, + Document, + Root, + Rule +} from './postcss.js' + +declare namespace Stringifier { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Stringifier_ as default } +} + +declare class Stringifier_ { + builder: Builder + constructor(builder: Builder) + atrule(node: AtRule, semicolon?: boolean): void + beforeAfter(node: AnyNode, detect: 'after' | 'before'): string + block(node: AnyNode, start: string): void + body(node: Container): void + comment(node: Comment): void + decl(node: Declaration, semicolon?: boolean): void + document(node: Document): void + raw(node: AnyNode, own: null | string, detect?: string): string + rawBeforeClose(root: Root): string | undefined + rawBeforeComment(root: Root, node: Comment): string | undefined + rawBeforeDecl(root: Root, node: Declaration): string | undefined + rawBeforeOpen(root: Root): string | undefined + rawBeforeRule(root: Root): string | undefined + rawColon(root: Root): string | undefined + rawEmptyBody(root: Root): string | undefined + rawIndent(root: Root): string | undefined + rawSemicolon(root: Root): boolean | undefined + rawValue(node: AnyNode, prop: string): string + root(node: Root): void + rule(node: Rule): void + stringify(node: AnyNode, semicolon?: boolean): void +} + +declare class Stringifier extends Stringifier_ {} + +export = Stringifier diff --git a/gsplat/node_modules/postcss/lib/stringifier.js b/gsplat/node_modules/postcss/lib/stringifier.js new file mode 100644 index 0000000..e07ad12 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/stringifier.js @@ -0,0 +1,353 @@ +'use strict' + +const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false +} + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1) +} + +class Stringifier { + constructor(builder) { + this.builder = builder + } + + atrule(node, semicolon) { + let name = '@' + node.name + let params = node.params ? this.rawValue(node, 'params') : '' + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName + } else if (params) { + name += ' ' + } + + if (node.nodes) { + this.block(node, name + params) + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : '') + this.builder(name + params + end, node) + } + } + + beforeAfter(node, detect) { + let value + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl') + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment') + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule') + } else { + value = this.raw(node, null, 'beforeClose') + } + + let buf = node.parent + let depth = 0 + while (buf && buf.type !== 'root') { + depth += 1 + buf = buf.parent + } + + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent') + if (indent.length) { + for (let step = 0; step < depth; step++) value += indent + } + } + + return value + } + + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen') + this.builder(start + between + '{', node, 'start') + + let after + if (node.nodes && node.nodes.length) { + this.body(node) + after = this.raw(node, 'after') + } else { + after = this.raw(node, 'after', 'emptyBody') + } + + if (after) this.builder(after) + this.builder('}', node, 'end') + } + + body(node) { + let last = node.nodes.length - 1 + while (last > 0) { + if (node.nodes[last].type !== 'comment') break + last -= 1 + } + + let semicolon = this.raw(node, 'semicolon') + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i] + let before = this.raw(child, 'before') + if (before) this.builder(before) + this.stringify(child, last !== i || semicolon) + } + } + + comment(node) { + let left = this.raw(node, 'left', 'commentLeft') + let right = this.raw(node, 'right', 'commentRight') + this.builder('/*' + left + node.text + right + '*/', node) + } + + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon') + let string = node.prop + between + this.rawValue(node, 'value') + + if (node.important) { + string += node.raws.important || ' !important' + } + + if (semicolon) string += ';' + this.builder(string, node) + } + + document(node) { + this.body(node) + } + + raw(node, own, detect) { + let value + if (!detect) detect = own + + // Already had + if (own) { + value = node.raws[own] + if (typeof value !== 'undefined') return value + } + + let parent = node.parent + + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || (parent.type === 'root' && parent.first === node)) { + return '' + } + + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return '' + } + } + + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect] + + // Detect style by other nodes + let root = node.root() + if (!root.rawCache) root.rawCache = {} + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect] + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect) + } else { + let method = 'raw' + capitalize(detect) + if (this[method]) { + value = this[method](root, node) + } else { + root.walk(i => { + value = i.raws[own] + if (typeof value !== 'undefined') return false + }) + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect] + + root.rawCache[detect] = value + return value + } + + rawBeforeClose(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawBeforeComment(root, node) { + let value + root.walkComments(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeDecl(root, node) { + let value + root.walkDecls(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeOpen(root) { + let value + root.walk(i => { + if (i.type !== 'decl') { + value = i.raws.between + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawBeforeRule(root) { + let value + root.walk(i => { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawColon(root) { + let value + root.walkDecls(i => { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, '') + return false + } + }) + return value + } + + rawEmptyBody(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawIndent(root) { + if (root.raws.indent) return root.raws.indent + let value + root.walk(i => { + let p = i.parent + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n') + value = parts[parts.length - 1] + value = value.replace(/\S/g, '') + return false + } + } + }) + return value + } + + rawSemicolon(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawValue(node, prop) { + let value = node[prop] + let raw = node.raws[prop] + if (raw && raw.value === value) { + return raw.raw + } + + return value + } + + root(node) { + this.body(node) + if (node.raws.after) this.builder(node.raws.after) + } + + rule(node) { + this.block(node, this.rawValue(node, 'selector')) + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end') + } + } + + stringify(node, semicolon) { + /* c8 ignore start */ + if (!this[node.type]) { + throw new Error( + 'Unknown AST node type ' + + node.type + + '. ' + + 'Maybe you need to change PostCSS stringifier.' + ) + } + /* c8 ignore stop */ + this[node.type](node, semicolon) + } +} + +module.exports = Stringifier +Stringifier.default = Stringifier diff --git a/gsplat/node_modules/postcss/lib/stringify.d.ts b/gsplat/node_modules/postcss/lib/stringify.d.ts new file mode 100644 index 0000000..06ad0b4 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/stringify.d.ts @@ -0,0 +1,9 @@ +import { Stringifier } from './postcss.js' + +interface Stringify extends Stringifier { + default: Stringify +} + +declare const stringify: Stringify + +export = stringify diff --git a/gsplat/node_modules/postcss/lib/stringify.js b/gsplat/node_modules/postcss/lib/stringify.js new file mode 100644 index 0000000..77bd017 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/stringify.js @@ -0,0 +1,11 @@ +'use strict' + +let Stringifier = require('./stringifier') + +function stringify(node, builder) { + let str = new Stringifier(builder) + str.stringify(node) +} + +module.exports = stringify +stringify.default = stringify diff --git a/gsplat/node_modules/postcss/lib/symbols.js b/gsplat/node_modules/postcss/lib/symbols.js new file mode 100644 index 0000000..a142c26 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/symbols.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports.isClean = Symbol('isClean') + +module.exports.my = Symbol('my') diff --git a/gsplat/node_modules/postcss/lib/terminal-highlight.js b/gsplat/node_modules/postcss/lib/terminal-highlight.js new file mode 100644 index 0000000..6196c9d --- /dev/null +++ b/gsplat/node_modules/postcss/lib/terminal-highlight.js @@ -0,0 +1,70 @@ +'use strict' + +let pico = require('picocolors') + +let tokenizer = require('./tokenize') + +let Input + +function registerInput(dependant) { + Input = dependant +} + +const HIGHLIGHT_THEME = { + ';': pico.yellow, + ':': pico.yellow, + '(': pico.cyan, + ')': pico.cyan, + '[': pico.yellow, + ']': pico.yellow, + '{': pico.yellow, + '}': pico.yellow, + 'at-word': pico.cyan, + 'brackets': pico.cyan, + 'call': pico.cyan, + 'class': pico.yellow, + 'comment': pico.gray, + 'hash': pico.magenta, + 'string': pico.green +} + +function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class' + } + if (value[0] === '#') { + return 'hash' + } + } + + if (!processor.endOfFile()) { + let next = processor.nextToken() + processor.back(next) + if (next[0] === 'brackets' || next[0] === '(') return 'call' + } + + return type +} + +function terminalHighlight(css) { + let processor = tokenizer(new Input(css), { ignoreErrors: true }) + let result = '' + while (!processor.endOfFile()) { + let token = processor.nextToken() + let color = HIGHLIGHT_THEME[getTokenType(token, processor)] + if (color) { + result += token[1] + .split(/\r?\n/) + .map(i => color(i)) + .join('\n') + } else { + result += token[1] + } + } + return result +} + +terminalHighlight.registerInput = registerInput + +module.exports = terminalHighlight diff --git a/gsplat/node_modules/postcss/lib/tokenize.js b/gsplat/node_modules/postcss/lib/tokenize.js new file mode 100644 index 0000000..39a20a3 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/tokenize.js @@ -0,0 +1,266 @@ +'use strict' + +const SINGLE_QUOTE = "'".charCodeAt(0) +const DOUBLE_QUOTE = '"'.charCodeAt(0) +const BACKSLASH = '\\'.charCodeAt(0) +const SLASH = '/'.charCodeAt(0) +const NEWLINE = '\n'.charCodeAt(0) +const SPACE = ' '.charCodeAt(0) +const FEED = '\f'.charCodeAt(0) +const TAB = '\t'.charCodeAt(0) +const CR = '\r'.charCodeAt(0) +const OPEN_SQUARE = '['.charCodeAt(0) +const CLOSE_SQUARE = ']'.charCodeAt(0) +const OPEN_PARENTHESES = '('.charCodeAt(0) +const CLOSE_PARENTHESES = ')'.charCodeAt(0) +const OPEN_CURLY = '{'.charCodeAt(0) +const CLOSE_CURLY = '}'.charCodeAt(0) +const SEMICOLON = ';'.charCodeAt(0) +const ASTERISK = '*'.charCodeAt(0) +const COLON = ':'.charCodeAt(0) +const AT = '@'.charCodeAt(0) + +const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g +const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g +const RE_BAD_BRACKET = /.[\r\n"'(/\\]/ +const RE_HEX_ESCAPE = /[\da-f]/i + +module.exports = function tokenizer(input, options = {}) { + let css = input.css.valueOf() + let ignore = options.ignoreErrors + + let code, next, quote, content, escape + let escaped, escapePos, prev, n, currentToken + + let length = css.length + let pos = 0 + let buffer = [] + let returned = [] + + function position() { + return pos + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, pos) + } + + function endOfFile() { + return returned.length === 0 && pos >= length + } + + function nextToken(opts) { + if (returned.length) return returned.pop() + if (pos >= length) return + + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false + + code = css.charCodeAt(pos) + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: { + next = pos + do { + next += 1 + code = css.charCodeAt(next) + } while ( + code === SPACE || + code === NEWLINE || + code === TAB || + code === CR || + code === FEED + ) + + currentToken = ['space', css.slice(pos, next)] + pos = next - 1 + break + } + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: { + let controlChar = String.fromCharCode(code) + currentToken = [controlChar, controlChar, pos] + break + } + + case OPEN_PARENTHESES: { + prev = buffer.length ? buffer.pop()[1] : '' + n = css.charCodeAt(pos + 1) + if ( + prev === 'url' && + n !== SINGLE_QUOTE && + n !== DOUBLE_QUOTE && + n !== SPACE && + n !== NEWLINE && + n !== TAB && + n !== FEED && + n !== CR + ) { + next = pos + do { + escaped = false + next = css.indexOf(')', next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + break + } else { + unclosed('bracket') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['brackets', css.slice(pos, next + 1), pos, next] + + pos = next + } else { + next = css.indexOf(')', pos + 1) + content = css.slice(pos, next + 1) + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', pos] + } else { + currentToken = ['brackets', content, pos, next] + pos = next + } + } + + break + } + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: { + quote = code === SINGLE_QUOTE ? "'" : '"' + next = pos + do { + escaped = false + next = css.indexOf(quote, next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1 + break + } else { + unclosed('string') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['string', css.slice(pos, next + 1), pos, next] + pos = next + break + } + + case AT: { + RE_AT_END.lastIndex = pos + 1 + RE_AT_END.test(css) + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_AT_END.lastIndex - 2 + } + + currentToken = ['at-word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + case BACKSLASH: { + next = pos + escape = true + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1 + escape = !escape + } + code = css.charCodeAt(next + 1) + if ( + escape && + code !== SLASH && + code !== SPACE && + code !== NEWLINE && + code !== TAB && + code !== CR && + code !== FEED + ) { + next += 1 + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1 + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1 + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + default: { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1 + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length + } else { + unclosed('comment') + } + } + + currentToken = ['comment', css.slice(pos, next + 1), pos, next] + pos = next + } else { + RE_WORD_END.lastIndex = pos + 1 + RE_WORD_END.test(css) + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_WORD_END.lastIndex - 2 + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + buffer.push(currentToken) + pos = next + } + + break + } + } + + pos++ + return currentToken + } + + function back(token) { + returned.push(token) + } + + return { + back, + endOfFile, + nextToken, + position + } +} diff --git a/gsplat/node_modules/postcss/lib/warn-once.js b/gsplat/node_modules/postcss/lib/warn-once.js new file mode 100644 index 0000000..316e1cf --- /dev/null +++ b/gsplat/node_modules/postcss/lib/warn-once.js @@ -0,0 +1,13 @@ +/* eslint-disable no-console */ +'use strict' + +let printed = {} + +module.exports = function warnOnce(message) { + if (printed[message]) return + printed[message] = true + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message) + } +} diff --git a/gsplat/node_modules/postcss/lib/warning.d.ts b/gsplat/node_modules/postcss/lib/warning.d.ts new file mode 100644 index 0000000..b25bba8 --- /dev/null +++ b/gsplat/node_modules/postcss/lib/warning.d.ts @@ -0,0 +1,147 @@ +import { RangePosition } from './css-syntax-error.js' +import Node from './node.js' + +declare namespace Warning { + export interface WarningOptions { + /** + * End position, exclusive, in CSS node string that caused the warning. + */ + end?: RangePosition + + /** + * End index, exclusive, in CSS node string that caused the warning. + */ + endIndex?: number + + /** + * Start index, inclusive, in CSS node string that caused the warning. + */ + index?: number + + /** + * CSS node that caused the warning. + */ + node?: Node + + /** + * Name of the plugin that created this warning. `Result#warn` fills + * this property automatically. + */ + plugin?: string + + /** + * Start position, inclusive, in CSS node string that caused the warning. + */ + start?: RangePosition + + /** + * Word in CSS source that caused the warning. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Warning_ as default } +} + +/** + * Represents a plugin’s warning. It can be created using `Node#warn`. + * + * ```js + * if (decl.important) { + * decl.warn(result, 'Avoid !important', { word: '!important' }) + * } + * ``` + */ +declare class Warning_ { + /** + * Column for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.column //=> 6 + * ``` + */ + column: number + + /** + * Column for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endColumn //=> 4 + * ``` + */ + endColumn?: number + + /** + * Line for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endLine //=> 6 + * ``` + */ + endLine?: number + + /** + * Line for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.line //=> 5 + * ``` + */ + line: number + + /** + * Contains the CSS node that caused the warning. + * + * ```js + * warning.node.toString() //=> 'color: white !important' + * ``` + */ + node: Node + + /** + * The name of the plugin that created this warning. + * When you call `Node#warn` it will fill this property automatically. + * + * ```js + * warning.plugin //=> 'postcss-important' + * ``` + */ + plugin: string + + /** + * The warning message. + * + * ```js + * warning.text //=> 'Try to avoid !important' + * ``` + */ + text: string + + /** + * Type to filter warnings from `Result#messages`. + * Always equal to `"warning"`. + */ + type: 'warning' + + /** + * @param text Warning message. + * @param opts Warning options. + */ + constructor(text: string, opts?: Warning.WarningOptions) + + /** + * Returns a warning position and message. + * + * ```js + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * ``` + * + * @return Warning position and message. + */ + toString(): string +} + +declare class Warning extends Warning_ {} + +export = Warning diff --git a/gsplat/node_modules/postcss/lib/warning.js b/gsplat/node_modules/postcss/lib/warning.js new file mode 100644 index 0000000..3a3d79c --- /dev/null +++ b/gsplat/node_modules/postcss/lib/warning.js @@ -0,0 +1,37 @@ +'use strict' + +class Warning { + constructor(text, opts = {}) { + this.type = 'warning' + this.text = text + + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts) + this.line = range.start.line + this.column = range.start.column + this.endLine = range.end.line + this.endColumn = range.end.column + } + + for (let opt in opts) this[opt] = opts[opt] + } + + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message + } + + if (this.plugin) { + return this.plugin + ': ' + this.text + } + + return this.text + } +} + +module.exports = Warning +Warning.default = Warning diff --git a/gsplat/node_modules/postcss/package.json b/gsplat/node_modules/postcss/package.json new file mode 100755 index 0000000..a0dfbef --- /dev/null +++ b/gsplat/node_modules/postcss/package.json @@ -0,0 +1,88 @@ +{ + "name": "postcss", + "version": "8.4.32", + "description": "Tool for transforming styles with JS plugins", + "engines": { + "node": "^10 || ^12 || >=14" + }, + "exports": { + ".": { + "require": "./lib/postcss.js", + "import": "./lib/postcss.mjs" + }, + "./lib/at-rule": "./lib/at-rule.js", + "./lib/comment": "./lib/comment.js", + "./lib/container": "./lib/container.js", + "./lib/css-syntax-error": "./lib/css-syntax-error.js", + "./lib/declaration": "./lib/declaration.js", + "./lib/fromJSON": "./lib/fromJSON.js", + "./lib/input": "./lib/input.js", + "./lib/lazy-result": "./lib/lazy-result.js", + "./lib/no-work-result": "./lib/no-work-result.js", + "./lib/list": "./lib/list.js", + "./lib/map-generator": "./lib/map-generator.js", + "./lib/node": "./lib/node.js", + "./lib/parse": "./lib/parse.js", + "./lib/parser": "./lib/parser.js", + "./lib/postcss": "./lib/postcss.js", + "./lib/previous-map": "./lib/previous-map.js", + "./lib/processor": "./lib/processor.js", + "./lib/result": "./lib/result.js", + "./lib/root": "./lib/root.js", + "./lib/rule": "./lib/rule.js", + "./lib/stringifier": "./lib/stringifier.js", + "./lib/stringify": "./lib/stringify.js", + "./lib/symbols": "./lib/symbols.js", + "./lib/terminal-highlight": "./lib/terminal-highlight.js", + "./lib/tokenize": "./lib/tokenize.js", + "./lib/warn-once": "./lib/warn-once.js", + "./lib/warning": "./lib/warning.js", + "./package.json": "./package.json" + }, + "main": "./lib/postcss.js", + "types": "./lib/postcss.d.ts", + "keywords": [ + "css", + "postcss", + "rework", + "preprocessor", + "parser", + "source map", + "transform", + "manipulation", + "transpiler" + ], + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "homepage": "https://postcss.org/", + "repository": "postcss/postcss", + "bugs": { + "url": "https://github.com/postcss/postcss/issues" + }, + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "browser": { + "./lib/terminal-highlight": false, + "source-map-js": false, + "path": false, + "url": false, + "fs": false + } +} diff --git a/gsplat/node_modules/rollup/LICENSE.md b/gsplat/node_modules/rollup/LICENSE.md new file mode 100644 index 0000000..7e71438 --- /dev/null +++ b/gsplat/node_modules/rollup/LICENSE.md @@ -0,0 +1,652 @@ +# Rollup core license +Rollup is released under the MIT license: + +The MIT License (MIT) + +Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Licenses of bundled dependencies +The published Rollup artifact additionally contains code with the following licenses: +MIT, ISC + +# Bundled dependencies: +## @jridgewell/sourcemap-codec +License: MIT +By: Rich Harris +Repository: git+https://github.com/jridgewell/sourcemap-codec.git + +> The MIT License +> +> Copyright (c) 2015 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## @rollup/pluginutils +License: MIT +By: Rich Harris +Repository: rollup/plugins + +> The MIT License (MIT) +> +> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## anymatch +License: ISC +By: Elan Shanker +Repository: https://github.com/micromatch/anymatch + +> The ISC License +> +> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## binary-extensions +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/binary-extensions + +> MIT License +> +> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## braces +License: MIT +By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm +Repository: micromatch/braces + +> The MIT License (MIT) +> +> Copyright (c) 2014-2018, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## builtin-modules +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/builtin-modules + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## chokidar +License: MIT +By: Paul Miller, Elan Shanker +Repository: git+https://github.com/paulmillr/chokidar.git + +> The MIT License (MIT) +> +> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the “Software”), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## colorette +License: MIT +By: Jorge Bucaran +Repository: jorgebucaran/colorette + +> Copyright © Jorge Bucaran <> +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## date-time +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/date-time + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## fill-range +License: MIT +By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling +Repository: jonschlinkert/fill-range + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## flru +License: MIT +By: Luke Edwards +Repository: lukeed/flru + +> MIT License +> +> Copyright (c) Luke Edwards (lukeed.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## glob-parent +License: ISC +By: Gulp Team, Elan Shanker, Blaine Bublitz +Repository: gulpjs/glob-parent + +> The ISC License +> +> Copyright (c) 2015, 2019 Elan Shanker +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## is-binary-path +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/is-binary-path + +> MIT License +> +> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## is-extglob +License: MIT +By: Jon Schlinkert +Repository: jonschlinkert/is-extglob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2016, Jon Schlinkert +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-glob +License: MIT +By: Jon Schlinkert, Brian Woodward, Daniel Perez +Repository: micromatch/is-glob + +> The MIT License (MIT) +> +> Copyright (c) 2014-2017, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-number +License: MIT +By: Jon Schlinkert, Olsten Larck, Rouven Weßling +Repository: jonschlinkert/is-number + +> The MIT License (MIT) +> +> Copyright (c) 2014-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## is-reference +License: MIT +By: Rich Harris +Repository: git+https://github.com/Rich-Harris/is-reference.git + +--------------------------------------- + +## locate-character +License: MIT +By: Rich Harris +Repository: git+https://gitlab.com/Rich-Harris/locate-character.git + +--------------------------------------- + +## magic-string +License: MIT +By: Rich Harris +Repository: https://github.com/rich-harris/magic-string + +> Copyright 2018 Rich Harris +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## normalize-path +License: MIT +By: Jon Schlinkert, Blaine Bublitz +Repository: jonschlinkert/normalize-path + +> The MIT License (MIT) +> +> Copyright (c) 2014-2018, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## parse-ms +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/parse-ms + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## picomatch +License: MIT +By: Jon Schlinkert +Repository: micromatch/picomatch + +> The MIT License (MIT) +> +> Copyright (c) 2017-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## pretty-bytes +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/pretty-bytes + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## pretty-ms +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/pretty-ms + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## readdirp +License: MIT +By: Thorsten Lorenz, Paul Miller +Repository: git://github.com/paulmillr/readdirp.git + +> MIT License +> +> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## signal-exit +License: ISC +By: Ben Coe +Repository: https://github.com/tapjs/signal-exit.git + +> The ISC License +> +> Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors +> +> Permission to use, copy, modify, and/or distribute this software +> for any purpose with or without fee is hereby granted, provided +> that the above copyright notice and this permission notice +> appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## time-zone +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/time-zone + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## to-regex-range +License: MIT +By: Jon Schlinkert, Rouven Weßling +Repository: micromatch/to-regex-range + +> The MIT License (MIT) +> +> Copyright (c) 2015-present, Jon Schlinkert. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## yargs-parser +License: ISC +By: Ben Coe +Repository: https://github.com/yargs/yargs-parser.git + +> Copyright (c) 2016, Contributors +> +> Permission to use, copy, modify, and/or distribute this software +> for any purpose with or without fee is hereby granted, provided +> that the above copyright notice and this permission notice +> appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/gsplat/node_modules/rollup/README.md b/gsplat/node_modules/rollup/README.md new file mode 100644 index 0000000..cfb5ce1 --- /dev/null +++ b/gsplat/node_modules/rollup/README.md @@ -0,0 +1,131 @@ +

+ +

+ +

+ + npm version + + + install size + + + code coverage + + + backers + + + sponsors + + + license + + + + Join the chat at https://is.gd/rollup_chat + +

+ +

Rollup

+ +## Overview + +Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today. + +## Quick Start Guide + +Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/command-line-interface/) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/javascript-api/). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/introduction/). + +### Commands + +These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js. + +For browsers: + +```bash +# compile to a `); + preTransformRequest(server, modulePath, base); + }; + await traverseHtml(html, filename, (node) => { + if (!nodeIsElement(node)) { + return; + } + // script tags + if (node.nodeName === 'script') { + const { src, sourceCodeLocation, isModule } = getScriptInfo(node); + if (src) { + const processedUrl = processNodeUrl(src.value, isSrcSet(src), config, htmlPath, originalUrl, server); + if (processedUrl !== src.value) { + overwriteAttrValue(s, sourceCodeLocation, processedUrl); + } + } + else if (isModule && node.childNodes.length) { + addInlineModule(node, 'js'); + } + else if (node.childNodes.length) { + const scriptNode = node.childNodes[node.childNodes.length - 1]; + for (const { url, start, end, } of extractImportExpressionFromClassicScript(scriptNode)) { + const processedUrl = processNodeUrl(url, false, config, htmlPath, originalUrl); + if (processedUrl !== url) { + s.update(start, end, processedUrl); + } + } + } + } + const inlineStyle = findNeedTransformStyleAttribute(node); + if (inlineStyle) { + inlineModuleIndex++; + inlineStyles.push({ + index: inlineModuleIndex, + location: inlineStyle.location, + code: inlineStyle.attr.value, + }); + } + if (node.nodeName === 'style' && node.childNodes.length) { + const children = node.childNodes[0]; + styleUrl.push({ + start: children.sourceCodeLocation.startOffset, + end: children.sourceCodeLocation.endOffset, + code: children.value, + }); + } + // elements with [href/src] attrs + const assetAttrs = assetAttrsConfig[node.nodeName]; + if (assetAttrs) { + for (const p of node.attrs) { + const attrKey = getAttrKey(p); + if (p.value && assetAttrs.includes(attrKey)) { + const processedUrl = processNodeUrl(p.value, isSrcSet(p), config, htmlPath, originalUrl); + if (processedUrl !== p.value) { + overwriteAttrValue(s, node.sourceCodeLocation.attrs[attrKey], processedUrl); + } + } + } + } + }); + await Promise.all([ + ...styleUrl.map(async ({ start, end, code }, index) => { + const url = `${proxyModulePath}?html-proxy&direct&index=${index}.css`; + // ensure module in graph after successful load + const mod = await moduleGraph.ensureEntryFromUrl(url, false); + ensureWatchedFile(watcher, mod.file, config.root); + const result = await server.pluginContainer.transform(code, mod.id); + let content = ''; + if (result) { + if (result.map && 'version' in result.map) { + if (result.map.mappings) { + await injectSourcesContent(result.map, proxyModulePath, config.logger); + } + content = getCodeWithSourcemap('css', result.code, result.map); + } + else { + content = result.code; + } + } + s.overwrite(start, end, content); + }), + ...inlineStyles.map(async ({ index, location, code }) => { + // will transform with css plugin and cache result with css-post plugin + const url = `${proxyModulePath}?html-proxy&inline-css&style-attr&index=${index}.css`; + const mod = await moduleGraph.ensureEntryFromUrl(url, false); + ensureWatchedFile(watcher, mod.file, config.root); + await server?.pluginContainer.transform(code, mod.id); + const hash = getHash(cleanUrl(mod.id)); + const result = htmlProxyResult.get(`${hash}_${index}`); + overwriteAttrValue(s, location, result ?? ''); + }), + ]); + html = s.toString(); + return { + html, + tags: [ + { + tag: 'script', + attrs: { + type: 'module', + src: path$o.posix.join(base, CLIENT_PUBLIC_PATH), + }, + injectTo: 'head-prepend', + }, + ], + }; +}; +function indexHtmlMiddleware(root, server) { + const isDev = isDevServer(server); + const fsUtils = getFsUtils(server.config); + // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` + return async function viteIndexHtmlMiddleware(req, res, next) { + if (res.writableEnded) { + return next(); + } + const url = req.url && cleanUrl(req.url); + // htmlFallbackMiddleware appends '.html' to URLs + if (url?.endsWith('.html') && req.headers['sec-fetch-dest'] !== 'script') { + let filePath; + if (isDev && url.startsWith(FS_PREFIX)) { + filePath = decodeURIComponent(fsPathFromId(url)); + } + else { + filePath = path$o.join(root, decodeURIComponent(url)); + } + if (fsUtils.existsSync(filePath)) { + const headers = isDev + ? server.config.server.headers + : server.config.preview.headers; + try { + let html = await fsp.readFile(filePath, 'utf-8'); + if (isDev) { + html = await server.transformIndexHtml(url, html, req.originalUrl); + } + return send(req, res, html, 'html', { headers }); + } + catch (e) { + return next(e); + } + } + } + next(); + }; +} +function preTransformRequest(server, url, base) { + if (!server.config.server.preTransformRequests) + return; + // transform all url as non-ssr as html includes client-side assets only + try { + url = unwrapId(stripBase(decodeURI(url), base)); + } + catch { + // ignore + return; + } + server.warmupRequest(url); +} + +const logTime = createDebugger('vite:time'); +function timeMiddleware(root) { + // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` + return function viteTimeMiddleware(req, res, next) { + const start = performance.now(); + const end = res.end; + res.end = (...args) => { + logTime?.(`${timeFrom(start)} ${prettifyUrl(req.url, root)}`); + return end.call(res, ...args); + }; + next(); + }; +} + +class ModuleNode { + /** + * Public served url path, starts with / + */ + url; + /** + * Resolved file system path + query + */ + id = null; + file = null; + type; + info; + meta; + importers = new Set(); + clientImportedModules = new Set(); + ssrImportedModules = new Set(); + acceptedHmrDeps = new Set(); + acceptedHmrExports = null; + importedBindings = null; + isSelfAccepting; + transformResult = null; + ssrTransformResult = null; + ssrModule = null; + ssrError = null; + lastHMRTimestamp = 0; + lastInvalidationTimestamp = 0; + /** + * If the module only needs to update its imports timestamp (e.g. within an HMR chain), + * it is considered soft-invalidated. In this state, its `transformResult` should exist, + * and the next `transformRequest` for this module will replace the timestamps. + * + * By default the value is `undefined` if it's not soft/hard-invalidated. If it gets + * soft-invalidated, this will contain the previous `transformResult` value. If it gets + * hard-invalidated, this will be set to `'HARD_INVALIDATED'`. + * @internal + */ + invalidationState; + /** + * @internal + */ + ssrInvalidationState; + /** + * The module urls that are statically imported in the code. This information is separated + * out from `importedModules` as only importers that statically import the module can be + * soft invalidated. Other imports (e.g. watched files) needs the importer to be hard invalidated. + * @internal + */ + staticImportedUrls; + /** + * @param setIsSelfAccepting - set `false` to set `isSelfAccepting` later. e.g. #7870 + */ + constructor(url, setIsSelfAccepting = true) { + this.url = url; + this.type = isDirectCSSRequest(url) ? 'css' : 'js'; + if (setIsSelfAccepting) { + this.isSelfAccepting = false; + } + } + get importedModules() { + const importedModules = new Set(this.clientImportedModules); + for (const module of this.ssrImportedModules) { + importedModules.add(module); + } + return importedModules; + } +} +class ModuleGraph { + resolveId; + urlToModuleMap = new Map(); + idToModuleMap = new Map(); + // a single file may corresponds to multiple modules with different queries + fileToModulesMap = new Map(); + safeModulesPath = new Set(); + /** + * @internal + */ + _unresolvedUrlToModuleMap = new Map(); + /** + * @internal + */ + _ssrUnresolvedUrlToModuleMap = new Map(); + constructor(resolveId) { + this.resolveId = resolveId; + } + async getModuleByUrl(rawUrl, ssr) { + // Quick path, if we already have a module for this rawUrl (even without extension) + rawUrl = removeImportQuery(removeTimestampQuery(rawUrl)); + const mod = this._getUnresolvedUrlToModule(rawUrl, ssr); + if (mod) { + return mod; + } + const [url] = await this._resolveUrl(rawUrl, ssr); + return this.urlToModuleMap.get(url); + } + getModuleById(id) { + return this.idToModuleMap.get(removeTimestampQuery(id)); + } + getModulesByFile(file) { + return this.fileToModulesMap.get(file); + } + onFileChange(file) { + const mods = this.getModulesByFile(file); + if (mods) { + const seen = new Set(); + mods.forEach((mod) => { + this.invalidateModule(mod, seen); + }); + } + } + invalidateModule(mod, seen = new Set(), timestamp = Date.now(), isHmr = false, + /** @internal */ + softInvalidate = false) { + const prevInvalidationState = mod.invalidationState; + const prevSsrInvalidationState = mod.ssrInvalidationState; + // Handle soft invalidation before the `seen` check, as consecutive soft/hard invalidations can + // cause the final soft invalidation state to be different. + // If soft invalidated, save the previous `transformResult` so that we can reuse and transform the + // import timestamps only in `transformRequest`. If there's no previous `transformResult`, hard invalidate it. + if (softInvalidate) { + mod.invalidationState ??= mod.transformResult ?? 'HARD_INVALIDATED'; + mod.ssrInvalidationState ??= mod.ssrTransformResult ?? 'HARD_INVALIDATED'; + } + // If hard invalidated, further soft invalidations have no effect until it's reset to `undefined` + else { + mod.invalidationState = 'HARD_INVALIDATED'; + mod.ssrInvalidationState = 'HARD_INVALIDATED'; + } + // Skip updating the module if it was already invalidated before and the invalidation state has not changed + if (seen.has(mod) && + prevInvalidationState === mod.invalidationState && + prevSsrInvalidationState === mod.ssrInvalidationState) { + return; + } + seen.add(mod); + if (isHmr) { + mod.lastHMRTimestamp = timestamp; + } + else { + // Save the timestamp for this invalidation, so we can avoid caching the result of possible already started + // processing being done for this module + mod.lastInvalidationTimestamp = timestamp; + } + // Don't invalidate mod.info and mod.meta, as they are part of the processing pipeline + // Invalidating the transform result is enough to ensure this module is re-processed next time it is requested + mod.transformResult = null; + mod.ssrTransformResult = null; + mod.ssrModule = null; + mod.ssrError = null; + mod.importers.forEach((importer) => { + if (!importer.acceptedHmrDeps.has(mod)) { + // If the importer statically imports the current module, we can soft-invalidate the importer + // to only update the import timestamps. If it's not statically imported, e.g. watched/glob file, + // we can only soft invalidate if the current module was also soft-invalidated. A soft-invalidation + // doesn't need to trigger a re-load and re-transform of the importer. + const shouldSoftInvalidateImporter = importer.staticImportedUrls?.has(mod.url) || softInvalidate; + this.invalidateModule(importer, seen, timestamp, isHmr, shouldSoftInvalidateImporter); + } + }); + } + invalidateAll() { + const timestamp = Date.now(); + const seen = new Set(); + this.idToModuleMap.forEach((mod) => { + this.invalidateModule(mod, seen, timestamp); + }); + } + /** + * Update the module graph based on a module's updated imports information + * If there are dependencies that no longer have any importers, they are + * returned as a Set. + * + * @param staticImportedUrls Subset of `importedModules` where they're statically imported in code. + * This is only used for soft invalidations so `undefined` is fine but may cause more runtime processing. + */ + async updateModuleInfo(mod, importedModules, importedBindings, acceptedModules, acceptedExports, isSelfAccepting, ssr, + /** @internal */ + staticImportedUrls) { + mod.isSelfAccepting = isSelfAccepting; + const prevImports = ssr ? mod.ssrImportedModules : mod.clientImportedModules; + let noLongerImported; + let resolvePromises = []; + let resolveResults = new Array(importedModules.size); + let index = 0; + // update import graph + for (const imported of importedModules) { + const nextIndex = index++; + if (typeof imported === 'string') { + resolvePromises.push(this.ensureEntryFromUrl(imported, ssr).then((dep) => { + dep.importers.add(mod); + resolveResults[nextIndex] = dep; + })); + } + else { + imported.importers.add(mod); + resolveResults[nextIndex] = imported; + } + } + if (resolvePromises.length) { + await Promise.all(resolvePromises); + } + const nextImports = new Set(resolveResults); + if (ssr) { + mod.ssrImportedModules = nextImports; + } + else { + mod.clientImportedModules = nextImports; + } + // remove the importer from deps that were imported but no longer are. + prevImports.forEach((dep) => { + if (!mod.clientImportedModules.has(dep) && + !mod.ssrImportedModules.has(dep)) { + dep.importers.delete(mod); + if (!dep.importers.size) { + (noLongerImported || (noLongerImported = new Set())).add(dep); + } + } + }); + // update accepted hmr deps + resolvePromises = []; + resolveResults = new Array(acceptedModules.size); + index = 0; + for (const accepted of acceptedModules) { + const nextIndex = index++; + if (typeof accepted === 'string') { + resolvePromises.push(this.ensureEntryFromUrl(accepted, ssr).then((dep) => { + resolveResults[nextIndex] = dep; + })); + } + else { + resolveResults[nextIndex] = accepted; + } + } + if (resolvePromises.length) { + await Promise.all(resolvePromises); + } + mod.acceptedHmrDeps = new Set(resolveResults); + mod.staticImportedUrls = staticImportedUrls; + // update accepted hmr exports + mod.acceptedHmrExports = acceptedExports; + mod.importedBindings = importedBindings; + return noLongerImported; + } + async ensureEntryFromUrl(rawUrl, ssr, setIsSelfAccepting = true) { + return this._ensureEntryFromUrl(rawUrl, ssr, setIsSelfAccepting); + } + /** + * @internal + */ + async _ensureEntryFromUrl(rawUrl, ssr, setIsSelfAccepting = true, + // Optimization, avoid resolving the same url twice if the caller already did it + resolved) { + // Quick path, if we already have a module for this rawUrl (even without extension) + rawUrl = removeImportQuery(removeTimestampQuery(rawUrl)); + let mod = this._getUnresolvedUrlToModule(rawUrl, ssr); + if (mod) { + return mod; + } + const modPromise = (async () => { + const [url, resolvedId, meta] = await this._resolveUrl(rawUrl, ssr, resolved); + mod = this.idToModuleMap.get(resolvedId); + if (!mod) { + mod = new ModuleNode(url, setIsSelfAccepting); + if (meta) + mod.meta = meta; + this.urlToModuleMap.set(url, mod); + mod.id = resolvedId; + this.idToModuleMap.set(resolvedId, mod); + const file = (mod.file = cleanUrl(resolvedId)); + let fileMappedModules = this.fileToModulesMap.get(file); + if (!fileMappedModules) { + fileMappedModules = new Set(); + this.fileToModulesMap.set(file, fileMappedModules); + } + fileMappedModules.add(mod); + } + // multiple urls can map to the same module and id, make sure we register + // the url to the existing module in that case + else if (!this.urlToModuleMap.has(url)) { + this.urlToModuleMap.set(url, mod); + } + this._setUnresolvedUrlToModule(rawUrl, mod, ssr); + return mod; + })(); + // Also register the clean url to the module, so that we can short-circuit + // resolving the same url twice + this._setUnresolvedUrlToModule(rawUrl, modPromise, ssr); + return modPromise; + } + // some deps, like a css file referenced via @import, don't have its own + // url because they are inlined into the main css import. But they still + // need to be represented in the module graph so that they can trigger + // hmr in the importing css file. + createFileOnlyEntry(file) { + file = normalizePath$3(file); + let fileMappedModules = this.fileToModulesMap.get(file); + if (!fileMappedModules) { + fileMappedModules = new Set(); + this.fileToModulesMap.set(file, fileMappedModules); + } + const url = `${FS_PREFIX}${file}`; + for (const m of fileMappedModules) { + if (m.url === url || m.id === file) { + return m; + } + } + const mod = new ModuleNode(url); + mod.file = file; + fileMappedModules.add(mod); + return mod; + } + // for incoming urls, it is important to: + // 1. remove the HMR timestamp query (?t=xxxx) and the ?import query + // 2. resolve its extension so that urls with or without extension all map to + // the same module + async resolveUrl(url, ssr) { + url = removeImportQuery(removeTimestampQuery(url)); + const mod = await this._getUnresolvedUrlToModule(url, ssr); + if (mod?.id) { + return [mod.url, mod.id, mod.meta]; + } + return this._resolveUrl(url, ssr); + } + /** + * @internal + */ + _getUnresolvedUrlToModule(url, ssr) { + return (ssr ? this._ssrUnresolvedUrlToModuleMap : this._unresolvedUrlToModuleMap).get(url); + } + /** + * @internal + */ + _setUnresolvedUrlToModule(url, mod, ssr) { + (ssr + ? this._ssrUnresolvedUrlToModuleMap + : this._unresolvedUrlToModuleMap).set(url, mod); + } + /** + * @internal + */ + async _resolveUrl(url, ssr, alreadyResolved) { + const resolved = alreadyResolved ?? (await this.resolveId(url, !!ssr)); + const resolvedId = resolved?.id || url; + if (url !== resolvedId && + !url.includes('\0') && + !url.startsWith(`virtual:`)) { + const ext = extname$1(cleanUrl(resolvedId)); + if (ext) { + const pathname = cleanUrl(url); + if (!pathname.endsWith(ext)) { + url = pathname + ext + url.slice(pathname.length); + } + } + } + return [url, resolvedId, resolved?.meta]; + } +} + +function notFoundMiddleware() { + // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` + return function vite404Middleware(_, res) { + res.statusCode = 404; + res.end(); + }; +} + +function ansiRegex({onlyFirst = false} = {}) { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +} + +const regex = ansiRegex(); + +function stripAnsi(string) { + if (typeof string !== 'string') { + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + } + + // Even though the regex is global, we don't need to reset the `.lastIndex` + // because unlike `.exec()` and `.test()`, `.replace()` does it automatically + // and doing it manually has a performance penalty. + return string.replace(regex, ''); +} + +function prepareError(err) { + // only copy the information we need and avoid serializing unnecessary + // properties, since some errors may attach full objects (e.g. PostCSS) + return { + message: stripAnsi(err.message), + stack: stripAnsi(cleanStack(err.stack || '')), + id: err.id, + frame: stripAnsi(err.frame || ''), + plugin: err.plugin, + pluginCode: err.pluginCode?.toString(), + loc: err.loc, + }; +} +function buildErrorMessage(err, args = [], includeStack = true) { + if (err.plugin) + args.push(` Plugin: ${colors$1.magenta(err.plugin)}`); + const loc = err.loc ? `:${err.loc.line}:${err.loc.column}` : ''; + if (err.id) + args.push(` File: ${colors$1.cyan(err.id)}${loc}`); + if (err.frame) + args.push(colors$1.yellow(pad$1(err.frame))); + if (includeStack && err.stack) + args.push(pad$1(cleanStack(err.stack))); + return args.join('\n'); +} +function cleanStack(stack) { + return stack + .split(/\n/g) + .filter((l) => /^\s*at/.test(l)) + .join('\n'); +} +function logError(server, err) { + const msg = buildErrorMessage(err, [ + colors$1.red(`Internal server error: ${err.message}`), + ]); + server.config.logger.error(msg, { + clear: true, + timestamp: true, + error: err, + }); + server.ws.send({ + type: 'error', + err: prepareError(err), + }); +} +function errorMiddleware(server, allowNext = false) { + // note the 4 args must be kept for connect to treat this as error middleware + // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` + return function viteErrorMiddleware(err, _req, res, next) { + logError(server, err); + if (allowNext) { + next(); + } + else { + res.statusCode = 500; + res.end(` + + + + + Error + + + + + + `); + } + }; +} + +// https://github.com/vitejs/vite/issues/2820#issuecomment-812495079 +const ROOT_FILES = [ + // '.git', + // https://pnpm.io/workspaces/ + 'pnpm-workspace.yaml', + // https://rushjs.io/pages/advanced/config_files/ + // 'rush.json', + // https://nx.dev/latest/react/getting-started/nx-setup + // 'workspace.json', + // 'nx.json', + // https://github.com/lerna/lerna#lernajson + 'lerna.json', +]; +// npm: https://docs.npmjs.com/cli/v7/using-npm/workspaces#installing-workspaces +// yarn: https://classic.yarnpkg.com/en/docs/workspaces/#toc-how-to-use-it +function hasWorkspacePackageJSON(root) { + const path = join$2(root, 'package.json'); + if (!isFileReadable(path)) { + return false; + } + try { + const content = JSON.parse(fs$l.readFileSync(path, 'utf-8')) || {}; + return !!content.workspaces; + } + catch { + return false; + } +} +function hasRootFile(root) { + return ROOT_FILES.some((file) => fs$l.existsSync(join$2(root, file))); +} +function hasPackageJSON(root) { + const path = join$2(root, 'package.json'); + return fs$l.existsSync(path); +} +/** + * Search up for the nearest `package.json` + */ +function searchForPackageRoot(current, root = current) { + if (hasPackageJSON(current)) + return current; + const dir = dirname$2(current); + // reach the fs root + if (!dir || dir === current) + return root; + return searchForPackageRoot(dir, root); +} +/** + * Search up for the nearest workspace root + */ +function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) { + if (hasRootFile(current)) + return current; + if (hasWorkspacePackageJSON(current)) + return current; + const dir = dirname$2(current); + // reach the fs root + if (!dir || dir === current) + return root; + return searchForWorkspaceRoot(dir, root); +} + +function warmupFiles(server) { + const options = server.config.server.warmup; + const root = server.config.root; + if (options?.clientFiles?.length) { + mapFiles(options.clientFiles, root).then((files) => { + for (const file of files) { + warmupFile(server, file, false); + } + }); + } + if (options?.ssrFiles?.length) { + mapFiles(options.ssrFiles, root).then((files) => { + for (const file of files) { + warmupFile(server, file, true); + } + }); + } +} +async function warmupFile(server, file, ssr) { + // transform html with the `transformIndexHtml` hook as Vite internals would + // pre-transform the imported JS modules linked. this may cause `transformIndexHtml` + // plugins to be executed twice, but that's probably fine. + if (file.endsWith('.html')) { + const url = htmlFileToUrl(file, server.config.root); + if (url) { + try { + const html = await fsp.readFile(file, 'utf-8'); + await server.transformIndexHtml(url, html); + } + catch (e) { + // Unexpected error, log the issue but avoid an unhandled exception + server.config.logger.error(`Pre-transform error (${colors$1.cyan(file)}): ${e.message}`, { + error: e, + timestamp: true, + }); + } + } + } + // for other files, pass it through `transformRequest` with warmup + else { + const url = fileToUrl(file, server.config.root); + await server.warmupRequest(url, { ssr }); + } +} +function htmlFileToUrl(file, root) { + const url = path$o.relative(root, file); + // out of root, ignore file + if (url[0] === '.') + return; + // file within root, create root-relative url + return '/' + normalizePath$3(url); +} +function fileToUrl(file, root) { + const url = path$o.relative(root, file); + // out of root, use /@fs/ prefix + if (url[0] === '.') { + return path$o.posix.join(FS_PREFIX, normalizePath$3(file)); + } + // file within root, create root-relative url + return '/' + normalizePath$3(url); +} +function mapFiles(files, root) { + return glob(files, { + cwd: root, + absolute: true, + }); +} + +function createServer(inlineConfig = {}) { + return _createServer(inlineConfig, { ws: true }); +} +async function _createServer(inlineConfig = {}, options) { + const config = await resolveConfig(inlineConfig, 'serve'); + const initPublicFilesPromise = initPublicFiles(config); + const { root, server: serverConfig } = config; + const httpsOptions = await resolveHttpsConfig(config.server.https); + const { middlewareMode } = serverConfig; + const resolvedWatchOptions = resolveChokidarOptions(config, { + disableGlobbing: true, + ...serverConfig.watch, + }); + const middlewares = connect$1(); + const httpServer = middlewareMode + ? null + : await resolveHttpServer(serverConfig, middlewares, httpsOptions); + const ws = createWebSocketServer(httpServer, config, httpsOptions); + if (httpServer) { + setClientErrorHandler(httpServer, config.logger); + } + // eslint-disable-next-line eqeqeq + const watchEnabled = serverConfig.watch !== null; + const watcher = watchEnabled + ? chokidar.watch( + // config file dependencies and env file might be outside of root + [...new Set([root, ...config.configFileDependencies, config.envDir])], resolvedWatchOptions) + : createNoopWatcher(resolvedWatchOptions); + const moduleGraph = new ModuleGraph((url, ssr) => container.resolveId(url, undefined, { ssr })); + const container = await createPluginContainer(config, moduleGraph, watcher); + const closeHttpServer = createServerCloseFn(httpServer); + let exitProcess; + const devHtmlTransformFn = createDevHtmlTransformFn(config); + let server = { + config, + middlewares, + httpServer, + watcher, + pluginContainer: container, + ws, + moduleGraph, + resolvedUrls: null, + ssrTransform(code, inMap, url, originalCode = code) { + return ssrTransform(code, inMap, url, originalCode, server.config); + }, + transformRequest(url, options) { + return transformRequest(url, server, options); + }, + async warmupRequest(url, options) { + await transformRequest(url, server, options).catch((e) => { + if (e?.code === ERR_OUTDATED_OPTIMIZED_DEP || + e?.code === ERR_CLOSED_SERVER) { + // these are expected errors + return; + } + // Unexpected error, log the issue but avoid an unhandled exception + server.config.logger.error(`Pre-transform error: ${e.message}`, { + error: e, + timestamp: true, + }); + }); + }, + transformIndexHtml(url, html, originalUrl) { + return devHtmlTransformFn(server, url, html, originalUrl); + }, + async ssrLoadModule(url, opts) { + if (isDepsOptimizerEnabled(config, true)) { + await initDevSsrDepsOptimizer(config, server); + } + return ssrLoadModule(url, server, undefined, undefined, opts?.fixStacktrace); + }, + ssrFixStacktrace(e) { + ssrFixStacktrace(e, moduleGraph); + }, + ssrRewriteStacktrace(stack) { + return ssrRewriteStacktrace(stack, moduleGraph); + }, + async reloadModule(module) { + if (serverConfig.hmr !== false && module.file) { + updateModules(module.file, [module], Date.now(), server); + } + }, + async listen(port, isRestart) { + await startServer(server, port); + if (httpServer) { + server.resolvedUrls = await resolveServerUrls(httpServer, config.server, config); + if (!isRestart && config.server.open) + server.openBrowser(); + } + return server; + }, + openBrowser() { + const options = server.config.server; + const url = server.resolvedUrls?.local[0] ?? server.resolvedUrls?.network[0]; + if (url) { + const path = typeof options.open === 'string' + ? new URL(options.open, url).href + : url; + // We know the url that the browser would be opened to, so we can + // start the request while we are awaiting the browser. This will + // start the crawling of static imports ~500ms before. + // preTransformRequests needs to be enabled for this optimization. + if (server.config.server.preTransformRequests) { + setTimeout(() => { + const getMethod = path.startsWith('https:') ? get$1 : get$2; + getMethod(path, { + headers: { + // Allow the history middleware to redirect to /index.html + Accept: 'text/html', + }, + }, (res) => { + res.on('end', () => { + // Ignore response, scripts discovered while processing the entry + // will be preprocessed (server.config.server.preTransformRequests) + }); + }) + .on('error', () => { + // Ignore errors + }) + .end(); + }, 0); + } + openBrowser(path, true, server.config.logger); + } + else { + server.config.logger.warn('No URL available to open in browser'); + } + }, + async close() { + if (!middlewareMode) { + process.off('SIGTERM', exitProcess); + if (process.env.CI !== 'true') { + process.stdin.off('end', exitProcess); + } + } + await Promise.allSettled([ + watcher.close(), + ws.close(), + container.close(), + getDepsOptimizer(server.config)?.close(), + getDepsOptimizer(server.config, true)?.close(), + closeHttpServer(), + ]); + // Await pending requests. We throw early in transformRequest + // and in hooks if the server is closing for non-ssr requests, + // so the import analysis plugin stops pre-transforming static + // imports and this block is resolved sooner. + // During SSR, we let pending requests finish to avoid exposing + // the server closed error to the users. + while (server._pendingRequests.size > 0) { + await Promise.allSettled([...server._pendingRequests.values()].map((pending) => pending.request)); + } + server.resolvedUrls = null; + }, + printUrls() { + if (server.resolvedUrls) { + printServerUrls(server.resolvedUrls, serverConfig.host, config.logger.info); + } + else if (middlewareMode) { + throw new Error('cannot print server URLs in middleware mode.'); + } + else { + throw new Error('cannot print server URLs before server.listen is called.'); + } + }, + bindCLIShortcuts(options) { + bindCLIShortcuts(server, options); + }, + async restart(forceOptimize) { + if (!server._restartPromise) { + server._forceOptimizeOnRestart = !!forceOptimize; + server._restartPromise = restartServer(server).finally(() => { + server._restartPromise = null; + server._forceOptimizeOnRestart = false; + }); + } + return server._restartPromise; + }, + _setInternalServer(_server) { + // Rebind internal the server variable so functions reference the user + // server instance after a restart + server = _server; + }, + _restartPromise: null, + _importGlobMap: new Map(), + _forceOptimizeOnRestart: false, + _pendingRequests: new Map(), + _fsDenyGlob: picomatch$4(config.server.fs.deny, { matchBase: true }), + _shortcutsOptions: undefined, + }; + if (!middlewareMode) { + exitProcess = async () => { + try { + await server.close(); + } + finally { + process.exit(); + } + }; + process.once('SIGTERM', exitProcess); + if (process.env.CI !== 'true') { + process.stdin.on('end', exitProcess); + } + } + const publicFiles = await initPublicFilesPromise; + const onHMRUpdate = async (file, configOnly) => { + if (serverConfig.hmr !== false) { + try { + await handleHMRUpdate(file, server, configOnly); + } + catch (err) { + ws.send({ + type: 'error', + err: prepareError(err), + }); + } + } + }; + const normalizedPublicDir = normalizePath$3(config.publicDir); + const onFileAddUnlink = async (file, isUnlink) => { + file = normalizePath$3(file); + await container.watchChange(file, { event: isUnlink ? 'delete' : 'create' }); + if (config.publicDir && publicFiles) { + if (file.startsWith(normalizedPublicDir)) { + publicFiles[isUnlink ? 'delete' : 'add'](file.slice(normalizedPublicDir.length)); + } + } + await handleFileAddUnlink(file, server, isUnlink); + await onHMRUpdate(file, true); + }; + watcher.on('change', async (file) => { + file = normalizePath$3(file); + await container.watchChange(file, { event: 'update' }); + // invalidate module graph cache on file change + moduleGraph.onFileChange(file); + await onHMRUpdate(file, false); + }); + getFsUtils(config).initWatcher?.(watcher); + watcher.on('add', (file) => { + onFileAddUnlink(file, false); + }); + watcher.on('unlink', (file) => { + onFileAddUnlink(file, true); + }); + ws.on('vite:invalidate', async ({ path, message }) => { + const mod = moduleGraph.urlToModuleMap.get(path); + if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) { + config.logger.info(colors$1.yellow(`hmr invalidate `) + + colors$1.dim(path) + + (message ? ` ${message}` : ''), { timestamp: true }); + const file = getShortName(mod.file, config.root); + updateModules(file, [...mod.importers], mod.lastHMRTimestamp, server, true); + } + }); + if (!middlewareMode && httpServer) { + httpServer.once('listening', () => { + // update actual port since this may be different from initial value + serverConfig.port = httpServer.address().port; + }); + } + // apply server configuration hooks from plugins + const postHooks = []; + for (const hook of config.getSortedPluginHooks('configureServer')) { + postHooks.push(await hook(server)); + } + // Internal middlewares ------------------------------------------------------ + // request timer + if (process.env.DEBUG) { + middlewares.use(timeMiddleware(root)); + } + // cors (enabled by default) + const { cors } = serverConfig; + if (cors !== false) { + middlewares.use(corsMiddleware(typeof cors === 'boolean' ? {} : cors)); + } + // proxy + const { proxy } = serverConfig; + if (proxy) { + const middlewareServer = (isObject$1(serverConfig.middlewareMode) + ? serverConfig.middlewareMode.server + : null) || httpServer; + middlewares.use(proxyMiddleware(middlewareServer, proxy, config)); + } + // base + if (config.base !== '/') { + middlewares.use(baseMiddleware(config.rawBase, middlewareMode)); + } + // open in editor support + middlewares.use('/__open-in-editor', launchEditorMiddleware$1()); + // ping request handler + // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` + middlewares.use(function viteHMRPingMiddleware(req, res, next) { + if (req.headers['accept'] === 'text/x-vite-ping') { + res.writeHead(204).end(); + } + else { + next(); + } + }); + // serve static files under /public + // this applies before the transform middleware so that these files are served + // as-is without transforms. + if (config.publicDir) { + middlewares.use(servePublicMiddleware(server, publicFiles)); + } + // main transform middleware + middlewares.use(transformMiddleware(server)); + // serve static files + middlewares.use(serveRawFsMiddleware(server)); + middlewares.use(serveStaticMiddleware(server)); + // html fallback + if (config.appType === 'spa' || config.appType === 'mpa') { + middlewares.use(htmlFallbackMiddleware(root, config.appType === 'spa', getFsUtils(config))); + } + // run post config hooks + // This is applied before the html middleware so that user middleware can + // serve custom content instead of index.html. + postHooks.forEach((fn) => fn && fn()); + if (config.appType === 'spa' || config.appType === 'mpa') { + // transform index.html + middlewares.use(indexHtmlMiddleware(root, server)); + // handle 404s + middlewares.use(notFoundMiddleware()); + } + // error handler + middlewares.use(errorMiddleware(server, middlewareMode)); + // httpServer.listen can be called multiple times + // when port when using next port number + // this code is to avoid calling buildStart multiple times + let initingServer; + let serverInited = false; + const initServer = async () => { + if (serverInited) + return; + if (initingServer) + return initingServer; + initingServer = (async function () { + await container.buildStart({}); + // start deps optimizer after all container plugins are ready + if (isDepsOptimizerEnabled(config, false)) { + await initDepsOptimizer(config, server); + } + warmupFiles(server); + initingServer = undefined; + serverInited = true; + })(); + return initingServer; + }; + if (!middlewareMode && httpServer) { + // overwrite listen to init optimizer before server start + const listen = httpServer.listen.bind(httpServer); + httpServer.listen = (async (port, ...args) => { + try { + // ensure ws server started + ws.listen(); + await initServer(); + } + catch (e) { + httpServer.emit('error', e); + return; + } + return listen(port, ...args); + }); + } + else { + if (options.ws) { + ws.listen(); + } + await initServer(); + } + return server; +} +async function startServer(server, inlinePort) { + const httpServer = server.httpServer; + if (!httpServer) { + throw new Error('Cannot call server.listen in middleware mode.'); + } + const options = server.config.server; + const hostname = await resolveHostname(options.host); + const configPort = inlinePort ?? options.port; + // When using non strict port for the dev server, the running port can be different from the config one. + // When restarting, the original port may be available but to avoid a switch of URL for the running + // browser tabs, we enforce the previously used port, expect if the config port changed. + const port = (!configPort || configPort === server._configServerPort + ? server._currentServerPort + : configPort) ?? DEFAULT_DEV_PORT; + server._configServerPort = configPort; + const serverPort = await httpServerStart(httpServer, { + port, + strictPort: options.strictPort, + host: hostname.host, + logger: server.config.logger, + }); + server._currentServerPort = serverPort; +} +function createServerCloseFn(server) { + if (!server) { + return () => { }; + } + let hasListened = false; + const openSockets = new Set(); + server.on('connection', (socket) => { + openSockets.add(socket); + socket.on('close', () => { + openSockets.delete(socket); + }); + }); + server.once('listening', () => { + hasListened = true; + }); + return () => new Promise((resolve, reject) => { + openSockets.forEach((s) => s.destroy()); + if (hasListened) { + server.close((err) => { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + } + else { + resolve(); + } + }); +} +function resolvedAllowDir(root, dir) { + return normalizePath$3(path$o.resolve(root, dir)); +} +function resolveServerOptions(root, raw, logger) { + const server = { + preTransformRequests: true, + ...raw, + sourcemapIgnoreList: raw?.sourcemapIgnoreList === false + ? () => false + : raw?.sourcemapIgnoreList || isInNodeModules$1, + middlewareMode: !!raw?.middlewareMode, + }; + let allowDirs = server.fs?.allow; + const deny = server.fs?.deny || ['.env', '.env.*', '*.{crt,pem}']; + if (!allowDirs) { + allowDirs = [searchForWorkspaceRoot(root)]; + } + allowDirs = allowDirs.map((i) => resolvedAllowDir(root, i)); + // only push client dir when vite itself is outside-of-root + const resolvedClientDir = resolvedAllowDir(root, CLIENT_DIR); + if (!allowDirs.some((dir) => isParentDirectory(dir, resolvedClientDir))) { + allowDirs.push(resolvedClientDir); + } + server.fs = { + strict: server.fs?.strict ?? true, + allow: allowDirs, + deny, + cachedChecks: server.fs?.cachedChecks ?? !!process.env.VITE_SERVER_FS_CACHED_CHECKS, + }; + if (server.origin?.endsWith('/')) { + server.origin = server.origin.slice(0, -1); + logger.warn(colors$1.yellow(`${colors$1.bold('(!)')} server.origin should not end with "/". Using "${server.origin}" instead.`)); + } + return server; +} +async function restartServer(server) { + global.__vite_start_time = performance.now(); + const shortcutsOptions = server._shortcutsOptions; + let inlineConfig = server.config.inlineConfig; + if (server._forceOptimizeOnRestart) { + inlineConfig = mergeConfig(inlineConfig, { + optimizeDeps: { + force: true, + }, + }); + } + // Reinit the server by creating a new instance using the same inlineConfig + // This will triger a reload of the config file and re-create the plugins and + // middlewares. We then assign all properties of the new server to the existing + // server instance and set the user instance to be used in the new server. + // This allows us to keep the same server instance for the user. + { + let newServer = null; + try { + // delay ws server listen + newServer = await _createServer(inlineConfig, { ws: false }); + } + catch (err) { + server.config.logger.error(err.message, { + timestamp: true, + }); + server.config.logger.error('server restart failed', { timestamp: true }); + return; + } + await server.close(); + // Assign new server props to existing server instance + const middlewares = server.middlewares; + newServer._configServerPort = server._configServerPort; + newServer._currentServerPort = server._currentServerPort; + Object.assign(server, newServer); + // Keep the same connect instance so app.use(vite.middlewares) works + // after a restart in middlewareMode (.route is always '/') + middlewares.stack = newServer.middlewares.stack; + server.middlewares = middlewares; + // Rebind internal server variable so functions reference the user server + newServer._setInternalServer(server); + } + const { logger, server: { port, middlewareMode }, } = server.config; + if (!middlewareMode) { + await server.listen(port, true); + } + else { + server.ws.listen(); + } + logger.info('server restarted.', { timestamp: true }); + if (shortcutsOptions) { + shortcutsOptions.print = false; + bindCLIShortcuts(server, shortcutsOptions); + } +} +/** + * Internal function to restart the Vite server and print URLs if changed + */ +async function restartServerWithUrls(server) { + if (server.config.server.middlewareMode) { + await server.restart(); + return; + } + const { port: prevPort, host: prevHost } = server.config.server; + const prevUrls = server.resolvedUrls; + await server.restart(); + const { logger, server: { port, host }, } = server.config; + if ((port ?? DEFAULT_DEV_PORT) !== (prevPort ?? DEFAULT_DEV_PORT) || + host !== prevHost || + diffDnsOrderChange(prevUrls, server.resolvedUrls)) { + logger.info(''); + server.printUrls(); + } +} + +var index$1 = { + __proto__: null, + _createServer: _createServer, + createServer: createServer, + resolveServerOptions: resolveServerOptions, + restartServerWithUrls: restartServerWithUrls +}; + +const debugHmr = createDebugger('vite:hmr'); +const whitespaceRE = /\s/; +const normalizedClientDir = normalizePath$3(CLIENT_DIR); +function getShortName(file, root) { + return file.startsWith(withTrailingSlash(root)) + ? path$o.posix.relative(root, file) + : file; +} +async function handleHMRUpdate(file, server, configOnly) { + const { ws, config, moduleGraph } = server; + const shortFile = getShortName(file, config.root); + const fileName = path$o.basename(file); + const isConfig = file === config.configFile; + const isConfigDependency = config.configFileDependencies.some((name) => file === name); + const isEnv = config.inlineConfig.envFile !== false && + getEnvFilesForMode(config.mode).includes(fileName); + if (isConfig || isConfigDependency || isEnv) { + // auto restart server + debugHmr?.(`[config change] ${colors$1.dim(shortFile)}`); + config.logger.info(colors$1.green(`${path$o.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true }); + try { + await restartServerWithUrls(server); + } + catch (e) { + config.logger.error(colors$1.red(e)); + } + return; + } + if (configOnly) { + return; + } + debugHmr?.(`[file change] ${colors$1.dim(shortFile)}`); + // (dev only) the client itself cannot be hot updated. + if (file.startsWith(withTrailingSlash(normalizedClientDir))) { + ws.send({ + type: 'full-reload', + path: '*', + }); + return; + } + const mods = moduleGraph.getModulesByFile(file); + // check if any plugin wants to perform custom HMR handling + const timestamp = Date.now(); + const hmrContext = { + file, + timestamp, + modules: mods ? [...mods] : [], + read: () => readModifiedFile(file), + server, + }; + for (const hook of config.getSortedPluginHooks('handleHotUpdate')) { + const filteredModules = await hook(hmrContext); + if (filteredModules) { + hmrContext.modules = filteredModules; + } + } + if (!hmrContext.modules.length) { + // html file cannot be hot updated + if (file.endsWith('.html')) { + config.logger.info(colors$1.green(`page reload `) + colors$1.dim(shortFile), { + clear: true, + timestamp: true, + }); + ws.send({ + type: 'full-reload', + path: config.server.middlewareMode + ? '*' + : '/' + normalizePath$3(path$o.relative(config.root, file)), + }); + } + else { + // loaded but not in the module graph, probably not js + debugHmr?.(`[no modules matched] ${colors$1.dim(shortFile)}`); + } + return; + } + updateModules(shortFile, hmrContext.modules, timestamp, server); +} +function updateModules(file, modules, timestamp, { config, ws, moduleGraph }, afterInvalidation) { + const updates = []; + const invalidatedModules = new Set(); + const traversedModules = new Set(); + let needFullReload = false; + for (const mod of modules) { + const boundaries = []; + const hasDeadEnd = propagateUpdate(mod, traversedModules, boundaries); + moduleGraph.invalidateModule(mod, invalidatedModules, timestamp, true); + if (needFullReload) { + continue; + } + if (hasDeadEnd) { + needFullReload = hasDeadEnd; + continue; + } + updates.push(...boundaries.map(({ boundary, acceptedVia }) => ({ + type: `${boundary.type}-update`, + timestamp, + path: normalizeHmrUrl(boundary.url), + explicitImportRequired: boundary.type === 'js' + ? isExplicitImportRequired(acceptedVia.url) + : undefined, + acceptedPath: normalizeHmrUrl(acceptedVia.url), + }))); + } + if (needFullReload) { + const reason = typeof needFullReload === 'string' + ? colors$1.dim(` (${needFullReload})`) + : ''; + config.logger.info(colors$1.green(`page reload `) + colors$1.dim(file) + reason, { clear: !afterInvalidation, timestamp: true }); + ws.send({ + type: 'full-reload', + }); + return; + } + if (updates.length === 0) { + debugHmr?.(colors$1.yellow(`no update happened `) + colors$1.dim(file)); + return; + } + config.logger.info(colors$1.green(`hmr update `) + + colors$1.dim([...new Set(updates.map((u) => u.path))].join(', ')), { clear: !afterInvalidation, timestamp: true }); + ws.send({ + type: 'update', + updates, + }); +} +async function handleFileAddUnlink(file, server, isUnlink) { + const modules = [...(server.moduleGraph.getModulesByFile(file) || [])]; + if (isUnlink) { + for (const deletedMod of modules) { + deletedMod.importedModules.forEach((importedMod) => { + importedMod.importers.delete(deletedMod); + }); + } + } + modules.push(...getAffectedGlobModules(file, server)); + if (modules.length > 0) { + updateModules(getShortName(file, server.config.root), unique(modules), Date.now(), server); + } +} +function areAllImportsAccepted(importedBindings, acceptedExports) { + for (const binding of importedBindings) { + if (!acceptedExports.has(binding)) { + return false; + } + } + return true; +} +function propagateUpdate(node, traversedModules, boundaries, currentChain = [node]) { + if (traversedModules.has(node)) { + return false; + } + traversedModules.add(node); + // #7561 + // if the imports of `node` have not been analyzed, then `node` has not + // been loaded in the browser and we should stop propagation. + if (node.id && node.isSelfAccepting === undefined) { + debugHmr?.(`[propagate update] stop propagation because not analyzed: ${colors$1.dim(node.id)}`); + return false; + } + if (node.isSelfAccepting) { + boundaries.push({ boundary: node, acceptedVia: node }); + const result = isNodeWithinCircularImports(node, currentChain); + if (result) + return result; + // additionally check for CSS importers, since a PostCSS plugin like + // Tailwind JIT may register any file as a dependency to a CSS file. + for (const importer of node.importers) { + if (isCSSRequest(importer.url) && !currentChain.includes(importer)) { + propagateUpdate(importer, traversedModules, boundaries, currentChain.concat(importer)); + } + } + return false; + } + // A partially accepted module with no importers is considered self accepting, + // because the deal is "there are parts of myself I can't self accept if they + // are used outside of me". + // Also, the imported module (this one) must be updated before the importers, + // so that they do get the fresh imported module when/if they are reloaded. + if (node.acceptedHmrExports) { + boundaries.push({ boundary: node, acceptedVia: node }); + const result = isNodeWithinCircularImports(node, currentChain); + if (result) + return result; + } + else { + if (!node.importers.size) { + return true; + } + // #3716, #3913 + // For a non-CSS file, if all of its importers are CSS files (registered via + // PostCSS plugins) it should be considered a dead end and force full reload. + if (!isCSSRequest(node.url) && + [...node.importers].every((i) => isCSSRequest(i.url))) { + return true; + } + } + for (const importer of node.importers) { + const subChain = currentChain.concat(importer); + if (importer.acceptedHmrDeps.has(node)) { + boundaries.push({ boundary: importer, acceptedVia: node }); + const result = isNodeWithinCircularImports(importer, subChain); + if (result) + return result; + continue; + } + if (node.id && node.acceptedHmrExports && importer.importedBindings) { + const importedBindingsFromNode = importer.importedBindings.get(node.id); + if (importedBindingsFromNode && + areAllImportsAccepted(importedBindingsFromNode, node.acceptedHmrExports)) { + continue; + } + } + if (!currentChain.includes(importer) && + propagateUpdate(importer, traversedModules, boundaries, subChain)) { + return true; + } + } + return false; +} +/** + * Check importers recursively if it's an import loop. An accepted module within + * an import loop cannot recover its execution order and should be reloaded. + * + * @param node The node that accepts HMR and is a boundary + * @param nodeChain The chain of nodes/imports that lead to the node. + * (The last node in the chain imports the `node` parameter) + * @param currentChain The current chain tracked from the `node` parameter + * @param traversedModules The set of modules that have traversed + */ +function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], traversedModules = new Set()) { + // To help visualize how each parameters work, imagine this import graph: + // + // A -> B -> C -> ACCEPTED -> D -> E -> NODE + // ^--------------------------| + // + // ACCEPTED: the node that accepts HMR. the `node` parameter. + // NODE : the initial node that triggered this HMR. + // + // This function will return true in the above graph, which: + // `node` : ACCEPTED + // `nodeChain` : [NODE, E, D, ACCEPTED] + // `currentChain` : [ACCEPTED, C, B] + // + // It works by checking if any `node` importers are within `nodeChain`, which + // means there's an import loop with a HMR-accepted module in it. + if (traversedModules.has(node)) { + return false; + } + traversedModules.add(node); + for (const importer of node.importers) { + // Node may import itself which is safe + if (importer === node) + continue; + // a PostCSS plugin like Tailwind JIT may register + // any file as a dependency to a CSS file. + // But in that case, the actual dependency chain is separate. + if (isCSSRequest(importer.url)) + continue; + // Check circular imports + const importerIndex = nodeChain.indexOf(importer); + if (importerIndex > -1) { + // Log extra debug information so users can fix and remove the circular imports + if (debugHmr) { + // Following explanation above: + // `importer` : E + // `currentChain` reversed : [B, C, ACCEPTED] + // `nodeChain` sliced & reversed : [D, E] + // Combined : [E, B, C, ACCEPTED, D, E] + const importChain = [ + importer, + ...[...currentChain].reverse(), + ...nodeChain.slice(importerIndex, -1).reverse(), + ]; + debugHmr(colors$1.yellow(`circular imports detected: `) + + importChain.map((m) => colors$1.dim(m.url)).join(' -> ')); + } + return 'circular imports'; + } + // Continue recursively + if (!currentChain.includes(importer)) { + const result = isNodeWithinCircularImports(importer, nodeChain, currentChain.concat(importer), traversedModules); + if (result) + return result; + } + } + return false; +} +function handlePrunedModules(mods, { ws }) { + // update the disposed modules' hmr timestamp + // since if it's re-imported, it should re-apply side effects + // and without the timestamp the browser will not re-import it! + const t = Date.now(); + mods.forEach((mod) => { + mod.lastHMRTimestamp = t; + debugHmr?.(`[dispose] ${colors$1.dim(mod.file)}`); + }); + ws.send({ + type: 'prune', + paths: [...mods].map((m) => m.url), + }); +} +/** + * Lex import.meta.hot.accept() for accepted deps. + * Since hot.accept() can only accept string literals or array of string + * literals, we don't really need a heavy @babel/parse call on the entire source. + * + * @returns selfAccepts + */ +function lexAcceptedHmrDeps(code, start, urls) { + let state = 0 /* LexerState.inCall */; + // the state can only be 2 levels deep so no need for a stack + let prevState = 0 /* LexerState.inCall */; + let currentDep = ''; + function addDep(index) { + urls.add({ + url: currentDep, + start: index - currentDep.length - 1, + end: index + 1, + }); + currentDep = ''; + } + for (let i = start; i < code.length; i++) { + const char = code.charAt(i); + switch (state) { + case 0 /* LexerState.inCall */: + case 4 /* LexerState.inArray */: + if (char === `'`) { + prevState = state; + state = 1 /* LexerState.inSingleQuoteString */; + } + else if (char === `"`) { + prevState = state; + state = 2 /* LexerState.inDoubleQuoteString */; + } + else if (char === '`') { + prevState = state; + state = 3 /* LexerState.inTemplateString */; + } + else if (whitespaceRE.test(char)) { + continue; + } + else { + if (state === 0 /* LexerState.inCall */) { + if (char === `[`) { + state = 4 /* LexerState.inArray */; + } + else { + // reaching here means the first arg is neither a string literal + // nor an Array literal (direct callback) or there is no arg + // in both case this indicates a self-accepting module + return true; // done + } + } + else if (state === 4 /* LexerState.inArray */) { + if (char === `]`) { + return false; // done + } + else if (char === ',') { + continue; + } + else { + error(i); + } + } + } + break; + case 1 /* LexerState.inSingleQuoteString */: + if (char === `'`) { + addDep(i); + if (prevState === 0 /* LexerState.inCall */) { + // accept('foo', ...) + return false; + } + else { + state = prevState; + } + } + else { + currentDep += char; + } + break; + case 2 /* LexerState.inDoubleQuoteString */: + if (char === `"`) { + addDep(i); + if (prevState === 0 /* LexerState.inCall */) { + // accept('foo', ...) + return false; + } + else { + state = prevState; + } + } + else { + currentDep += char; + } + break; + case 3 /* LexerState.inTemplateString */: + if (char === '`') { + addDep(i); + if (prevState === 0 /* LexerState.inCall */) { + // accept('foo', ...) + return false; + } + else { + state = prevState; + } + } + else if (char === '$' && code.charAt(i + 1) === '{') { + error(i); + } + else { + currentDep += char; + } + break; + default: + throw new Error('unknown import.meta.hot lexer state'); + } + } + return false; +} +function lexAcceptedHmrExports(code, start, exportNames) { + const urls = new Set(); + lexAcceptedHmrDeps(code, start, urls); + for (const { url } of urls) { + exportNames.add(url); + } + return urls.size > 0; +} +function normalizeHmrUrl(url) { + if (url[0] !== '.' && url[0] !== '/') { + url = wrapId(url); + } + return url; +} +function error(pos) { + const err = new Error(`import.meta.hot.accept() can only accept string literals or an ` + + `Array of string literals.`); + err.pos = pos; + throw err; +} +// vitejs/vite#610 when hot-reloading Vue files, we read immediately on file +// change event and sometimes this can be too early and get an empty buffer. +// Poll until the file's modified time has changed before reading again. +async function readModifiedFile(file) { + const content = await fsp.readFile(file, 'utf-8'); + if (!content) { + const mtime = (await fsp.stat(file)).mtimeMs; + await new Promise((r) => { + let n = 0; + const poll = async () => { + n++; + const newMtime = (await fsp.stat(file)).mtimeMs; + if (newMtime !== mtime || n > 10) { + r(0); + } + else { + setTimeout(poll, 10); + } + }; + setTimeout(poll, 10); + }); + return await fsp.readFile(file, 'utf-8'); + } + else { + return content; + } +} + +const nonJsRe = /\.json(?:$|\?)/; +const isNonJsRequest = (request) => nonJsRe.test(request); +function definePlugin(config) { + const isBuild = config.command === 'build'; + const isBuildLib = isBuild && config.build.lib; + // ignore replace process.env in lib build + const processEnv = {}; + if (!isBuildLib) { + const nodeEnv = process.env.NODE_ENV || config.mode; + Object.assign(processEnv, { + 'process.env': `{}`, + 'global.process.env': `{}`, + 'globalThis.process.env': `{}`, + 'process.env.NODE_ENV': JSON.stringify(nodeEnv), + 'global.process.env.NODE_ENV': JSON.stringify(nodeEnv), + 'globalThis.process.env.NODE_ENV': JSON.stringify(nodeEnv), + }); + } + // during dev, import.meta properties are handled by importAnalysis plugin. + const importMetaKeys = {}; + const importMetaEnvKeys = {}; + const importMetaFallbackKeys = {}; + if (isBuild) { + importMetaKeys['import.meta.hot'] = `undefined`; + for (const key in config.env) { + const val = JSON.stringify(config.env[key]); + importMetaKeys[`import.meta.env.${key}`] = val; + importMetaEnvKeys[key] = val; + } + // these will be set to a proper value in `generatePattern` + importMetaKeys['import.meta.env.SSR'] = `undefined`; + importMetaFallbackKeys['import.meta.env'] = `undefined`; + } + const userDefine = {}; + const userDefineEnv = {}; + for (const key in config.define) { + userDefine[key] = handleDefineValue(config.define[key]); + // make sure `import.meta.env` object has user define properties + if (isBuild && key.startsWith('import.meta.env.')) { + userDefineEnv[key.slice(16)] = config.define[key]; + } + } + function generatePattern(ssr) { + const replaceProcessEnv = !ssr || config.ssr?.target === 'webworker'; + const define = { + ...(replaceProcessEnv ? processEnv : {}), + ...importMetaKeys, + ...userDefine, + ...importMetaFallbackKeys, + }; + // Additional define fixes based on `ssr` value + if ('import.meta.env.SSR' in define) { + define['import.meta.env.SSR'] = ssr + ''; + } + if ('import.meta.env' in define) { + define['import.meta.env'] = serializeDefine({ + ...importMetaEnvKeys, + SSR: ssr + '', + ...userDefineEnv, + }); + } + // Create regex pattern as a fast check before running esbuild + const patternKeys = Object.keys(userDefine); + if (replaceProcessEnv && Object.keys(processEnv).length) { + patternKeys.push('process.env'); + } + if (Object.keys(importMetaKeys).length) { + patternKeys.push('import.meta.env', 'import.meta.hot'); + } + const pattern = patternKeys.length + ? new RegExp(patternKeys.map(escapeRegex).join('|')) + : null; + return [define, pattern]; + } + const defaultPattern = generatePattern(false); + const ssrPattern = generatePattern(true); + return { + name: 'vite:define', + async transform(code, id, options) { + const ssr = options?.ssr === true; + if (!ssr && !isBuild) { + // for dev we inject actual global defines in the vite client to + // avoid the transform cost. see the `clientInjection` and + // `importAnalysis` plugin. + return; + } + if ( + // exclude html, css and static assets for performance + isHTMLRequest(id) || + isCSSRequest(id) || + isNonJsRequest(id) || + config.assetsInclude(id)) { + return; + } + const [define, pattern] = ssr ? ssrPattern : defaultPattern; + if (!pattern) + return; + // Check if our code needs any replacements before running esbuild + pattern.lastIndex = 0; + if (!pattern.test(code)) + return; + return await replaceDefine(code, id, define, config); + }, + }; +} +async function replaceDefine(code, id, define, config) { + // Because esbuild only allows JSON-serializable values, and `import.meta.env` + // may contain values with raw identifiers, making it non-JSON-serializable, + // we replace it with a temporary marker and then replace it back after to + // workaround it. This means that esbuild is unable to optimize the `import.meta.env` + // access, but that's a tradeoff for now. + const replacementMarkers = {}; + const env = define['import.meta.env']; + if (env && !canJsonParse(env)) { + const marker = `_${getHash(env, env.length - 2)}_`; + replacementMarkers[marker] = env; + define = { ...define, 'import.meta.env': marker }; + } + const esbuildOptions = config.esbuild || {}; + const result = await transform$1(code, { + loader: 'js', + charset: esbuildOptions.charset ?? 'utf8', + platform: 'neutral', + define, + sourcefile: id, + sourcemap: config.command === 'build' ? !!config.build.sourcemap : true, + }); + for (const marker in replacementMarkers) { + result.code = result.code.replaceAll(marker, replacementMarkers[marker]); + } + return { + code: result.code, + map: result.map || null, + }; +} +/** + * Like `JSON.stringify` but keeps raw string values as a literal + * in the generated code. For example: `"window"` would refer to + * the global `window` object directly. + */ +function serializeDefine(define) { + let res = `{`; + const keys = Object.keys(define); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = define[key]; + res += `${JSON.stringify(key)}: ${handleDefineValue(val)}`; + if (i !== keys.length - 1) { + res += `, `; + } + } + return res + `}`; +} +function handleDefineValue(value) { + if (typeof value === 'undefined') + return 'undefined'; + if (typeof value === 'string') + return value; + return JSON.stringify(value); +} +function canJsonParse(value) { + try { + JSON.parse(value); + return true; + } + catch { + return false; + } +} + +const WORKER_FILE_ID = 'worker_file'; +const workerCache = new WeakMap(); +function saveEmitWorkerAsset(config, asset) { + const fileName = asset.fileName; + const workerMap = workerCache.get(config.mainConfig || config); + workerMap.assets.set(fileName, asset); +} +async function bundleWorkerEntry(config, id, query) { + // bundle the file as entry to support imports + const { rollup } = await import('rollup'); + const { plugins, rollupOptions, format } = config.worker; + const bundle = await rollup({ + ...rollupOptions, + input: cleanUrl(id), + plugins: await plugins(), + onwarn(warning, warn) { + onRollupWarning(warning, warn, config); + }, + preserveEntrySignatures: false, + }); + let chunk; + try { + const workerOutputConfig = config.worker.rollupOptions.output; + const workerConfig = workerOutputConfig + ? Array.isArray(workerOutputConfig) + ? workerOutputConfig[0] || {} + : workerOutputConfig + : {}; + const { output: [outputChunk, ...outputChunks], } = await bundle.generate({ + entryFileNames: path$o.posix.join(config.build.assetsDir, '[name]-[hash].js'), + chunkFileNames: path$o.posix.join(config.build.assetsDir, '[name]-[hash].js'), + assetFileNames: path$o.posix.join(config.build.assetsDir, '[name]-[hash].[ext]'), + ...workerConfig, + format, + sourcemap: config.build.sourcemap, + }); + chunk = outputChunk; + outputChunks.forEach((outputChunk) => { + if (outputChunk.type === 'asset') { + saveEmitWorkerAsset(config, outputChunk); + } + else if (outputChunk.type === 'chunk') { + saveEmitWorkerAsset(config, { + fileName: outputChunk.fileName, + source: outputChunk.code, + type: 'asset', + }); + } + }); + } + finally { + await bundle.close(); + } + return emitSourcemapForWorkerEntry(config, query, chunk); +} +function emitSourcemapForWorkerEntry(config, query, chunk) { + const { map: sourcemap } = chunk; + if (sourcemap) { + if (config.build.sourcemap === 'hidden' || + config.build.sourcemap === true) { + const data = sourcemap.toString(); + const mapFileName = chunk.fileName + '.map'; + saveEmitWorkerAsset(config, { + fileName: mapFileName, + type: 'asset', + source: data, + }); + } + } + return chunk; +} +const workerAssetUrlRE = /__VITE_WORKER_ASSET__([a-z\d]{8})__/g; +function encodeWorkerAssetFileName(fileName, workerCache) { + const { fileNameHash } = workerCache; + const hash = getHash(fileName); + if (!fileNameHash.get(hash)) { + fileNameHash.set(hash, fileName); + } + return `__VITE_WORKER_ASSET__${hash}__`; +} +async function workerFileToUrl(config, id, query) { + const workerMap = workerCache.get(config.mainConfig || config); + let fileName = workerMap.bundle.get(id); + if (!fileName) { + const outputChunk = await bundleWorkerEntry(config, id, query); + fileName = outputChunk.fileName; + saveEmitWorkerAsset(config, { + fileName, + source: outputChunk.code, + type: 'asset', + }); + workerMap.bundle.set(id, fileName); + } + return encodeWorkerAssetFileName(fileName, workerMap); +} +function webWorkerPostPlugin() { + return { + name: 'vite:worker-post', + resolveImportMeta(property, { format }) { + // document is undefined in the worker, so we need to avoid it in iife + if (format === 'iife') { + // compiling import.meta + if (!property) { + // rollup only supports `url` property. we only support `url` property as well. + // https://github.com/rollup/rollup/blob/62b648e1cc6a1f00260bb85aa2050097bb4afd2b/src/ast/nodes/MetaProperty.ts#L164-L173 + return `{ + url: self.location.href + }`; + } + // compiling import.meta.url + if (property === 'url') { + return 'self.location.href'; + } + } + return null; + }, + }; +} +function webWorkerPlugin(config) { + const isBuild = config.command === 'build'; + let server; + const isWorker = config.isWorker; + const isWorkerQueryId = (id) => { + const parsedQuery = parseRequest(id); + if (parsedQuery && + (parsedQuery.worker ?? parsedQuery.sharedworker) != null) { + return true; + } + return false; + }; + return { + name: 'vite:worker', + configureServer(_server) { + server = _server; + }, + buildStart() { + if (isWorker) { + return; + } + workerCache.set(config, { + assets: new Map(), + bundle: new Map(), + fileNameHash: new Map(), + }); + }, + load(id) { + if (isBuild && isWorkerQueryId(id)) { + return ''; + } + }, + shouldTransformCachedModule({ id }) { + if (isBuild && config.build.watch && isWorkerQueryId(id)) { + return true; + } + }, + async transform(raw, id, options) { + const ssr = options?.ssr === true; + const query = parseRequest(id); + if (query && query[WORKER_FILE_ID] != null) { + // if import worker by worker constructor will have query.type + // other type will be import worker by esm + const workerType = query['type']; + let injectEnv = ''; + const scriptPath = JSON.stringify(path$o.posix.join(config.base, ENV_PUBLIC_PATH)); + if (workerType === 'classic') { + injectEnv = `importScripts(${scriptPath})\n`; + } + else if (workerType === 'module') { + injectEnv = `import ${scriptPath}\n`; + } + else if (workerType === 'ignore') { + if (isBuild) { + injectEnv = ''; + } + else if (server) { + // dynamic worker type we can't know how import the env + // so we copy /@vite/env code of server transform result into file header + const { moduleGraph } = server; + const module = moduleGraph.getModuleById(ENV_ENTRY); + injectEnv = module?.transformResult?.code || ''; + } + } + if (injectEnv) { + const s = new MagicString(raw); + s.prepend(injectEnv); + return { + code: s.toString(), + map: s.generateMap({ hires: 'boundary' }), + }; + } + return; + } + if (query == null || + (query && (query.worker ?? query.sharedworker) == null)) { + return; + } + // stringified url or `new URL(...)` + let url; + const { format } = config.worker; + const workerConstructor = query.sharedworker != null ? 'SharedWorker' : 'Worker'; + const workerType = isBuild + ? format === 'es' + ? 'module' + : 'classic' + : 'module'; + const workerTypeOption = `{ + ${workerType === 'module' ? `type: "module",` : ''} + name: options?.name + }`; + if (isBuild) { + getDepsOptimizer(config, ssr)?.registerWorkersSource(id); + if (query.inline != null) { + const chunk = await bundleWorkerEntry(config, id, query); + const encodedJs = `const encodedJs = "${Buffer.from(chunk.code).toString('base64')}";`; + const code = + // Using blob URL for SharedWorker results in multiple instances of a same worker + workerConstructor === 'Worker' + ? `${encodedJs} + const blob = typeof window !== "undefined" && window.Blob && new Blob([${workerType === 'classic' + ? '' + : // `URL` is always available, in `Worker[type="module"]` + `'URL.revokeObjectURL(import.meta.url);'+`}atob(encodedJs)], { type: "text/javascript;charset=utf-8" }); + export default function WorkerWrapper(options) { + let objURL; + try { + objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob); + if (!objURL) throw '' + const worker = new ${workerConstructor}(objURL, ${workerTypeOption}); + worker.addEventListener("error", () => { + (window.URL || window.webkitURL).revokeObjectURL(objURL); + }); + return worker; + } catch(e) { + return new ${workerConstructor}( + "data:application/javascript;base64," + encodedJs, + ${workerTypeOption} + ); + }${ + // For module workers, we should not revoke the URL until the worker runs, + // otherwise the worker fails to run + workerType === 'classic' + ? ` finally { + objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL); + }` + : ''} + }` + : `${encodedJs} + export default function WorkerWrapper(options) { + return new ${workerConstructor}( + "data:application/javascript;base64," + encodedJs, + ${workerTypeOption} + ); + } + `; + return { + code, + // Empty sourcemap to suppress Rollup warning + map: { mappings: '' }, + }; + } + else { + url = await workerFileToUrl(config, id, query); + } + } + else { + url = await fileToUrl$1(cleanUrl(id), config, this); + url = injectQuery(url, WORKER_FILE_ID); + url = injectQuery(url, `type=${workerType}`); + } + if (query.url != null) { + return { + code: `export default ${JSON.stringify(url)}`, + map: { mappings: '' }, // Empty sourcemap to suppress Rollup warning + }; + } + return { + code: `export default function WorkerWrapper(options) { + return new ${workerConstructor}( + ${JSON.stringify(url)}, + ${workerTypeOption} + ); + }`, + map: { mappings: '' }, // Empty sourcemap to suppress Rollup warning + }; + }, + renderChunk(code, chunk, outputOptions) { + let s; + const result = () => { + return (s && { + code: s.toString(), + map: config.build.sourcemap + ? s.generateMap({ hires: 'boundary' }) + : null, + }); + }; + workerAssetUrlRE.lastIndex = 0; + if (workerAssetUrlRE.test(code)) { + const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(outputOptions.format, config.isWorker); + let match; + s = new MagicString(code); + workerAssetUrlRE.lastIndex = 0; + // Replace "__VITE_WORKER_ASSET__5aa0ddc0__" using relative paths + const workerMap = workerCache.get(config.mainConfig || config); + const { fileNameHash } = workerMap; + while ((match = workerAssetUrlRE.exec(code))) { + const [full, hash] = match; + const filename = fileNameHash.get(hash); + const replacement = toOutputFilePathInJS(filename, 'asset', chunk.fileName, 'js', config, toRelativeRuntime); + const replacementString = typeof replacement === 'string' + ? JSON.stringify(replacement).slice(1, -1) + : `"+${replacement.runtime}+"`; + s.update(match.index, match.index + full.length, replacementString); + } + } + return result(); + }, + generateBundle(opts) { + // @ts-expect-error asset emits are skipped in legacy bundle + if (opts.__vite_skip_asset_emit__ || isWorker) { + return; + } + const workerMap = workerCache.get(config); + workerMap.assets.forEach((asset) => { + this.emitFile(asset); + workerMap.assets.delete(asset.fileName); + }); + }, + }; +} + +const debug$4 = createDebugger('vite:import-analysis'); +const clientDir = normalizePath$3(CLIENT_DIR); +const skipRE = /\.(?:map|json)(?:$|\?)/; +const canSkipImportAnalysis = (id) => skipRE.test(id) || isDirectCSSRequest(id); +const optimizedDepChunkRE$1 = /\/chunk-[A-Z\d]{8}\.js/; +const optimizedDepDynamicRE$1 = /-[A-Z\d]{8}\.js/; +const hasImportInQueryParamsRE = /[?&]import=?\b/; +const hasViteIgnoreRE = /\/\*\s*@vite-ignore\s*\*\//; +const urlIsStringRE = /^(?:'.*'|".*"|`.*`)$/; +const templateLiteralRE = /^\s*`(.*)`\s*$/; +function isExplicitImportRequired(url) { + return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url); +} +function markExplicitImport(url) { + if (isExplicitImportRequired(url)) { + return injectQuery(url, 'import'); + } + return url; +} +function extractImportedBindings(id, source, importSpec, importedBindings) { + let bindings = importedBindings.get(id); + if (!bindings) { + bindings = new Set(); + importedBindings.set(id, bindings); + } + const isDynamic = importSpec.d > -1; + const isMeta = importSpec.d === -2; + if (isDynamic || isMeta) { + // this basically means the module will be impacted by any change in its dep + bindings.add('*'); + return; + } + const exp = source.slice(importSpec.ss, importSpec.se); + const [match0] = findStaticImports(exp); + if (!match0) { + return; + } + const parsed = parseStaticImport(match0); + if (!parsed) { + return; + } + if (parsed.namespacedImport) { + bindings.add('*'); + } + if (parsed.defaultImport) { + bindings.add('default'); + } + if (parsed.namedImports) { + for (const name of Object.keys(parsed.namedImports)) { + bindings.add(name); + } + } +} +/** + * Server-only plugin that lexes, resolves, rewrites and analyzes url imports. + * + * - Imports are resolved to ensure they exist on disk + * + * - Lexes HMR accept calls and updates import relationships in the module graph + * + * - Bare module imports are resolved (by @rollup-plugin/node-resolve) to + * absolute file paths, e.g. + * + * ```js + * import 'foo' + * ``` + * is rewritten to + * ```js + * import '/@fs//project/node_modules/foo/dist/foo.js' + * ``` + * + * - CSS imports are appended with `.js` since both the js module and the actual + * css (referenced via ``) may go through the transform pipeline: + * + * ```js + * import './style.css' + * ``` + * is rewritten to + * ```js + * import './style.css.js' + * ``` + */ +function importAnalysisPlugin(config) { + const { root, base } = config; + const fsUtils = getFsUtils(config); + const clientPublicPath = path$o.posix.join(base, CLIENT_PUBLIC_PATH); + const enablePartialAccept = config.experimental?.hmrPartialAccept; + let server; + let _env; + let _ssrEnv; + function getEnv(ssr) { + if (!_ssrEnv || !_env) { + const importMetaEnvKeys = {}; + const userDefineEnv = {}; + for (const key in config.env) { + importMetaEnvKeys[key] = JSON.stringify(config.env[key]); + } + for (const key in config.define) { + // non-import.meta.env.* is handled in `clientInjection` plugin + if (key.startsWith('import.meta.env.')) { + userDefineEnv[key.slice(16)] = config.define[key]; + } + } + const env = `import.meta.env = ${serializeDefine({ + ...importMetaEnvKeys, + SSR: '__vite_ssr__', + ...userDefineEnv, + })};`; + _ssrEnv = env.replace('__vite_ssr__', 'true'); + _env = env.replace('__vite_ssr__', 'false'); + } + return ssr ? _ssrEnv : _env; + } + return { + name: 'vite:import-analysis', + configureServer(_server) { + server = _server; + }, + async transform(source, importer, options) { + // In a real app `server` is always defined, but it is undefined when + // running src/node/server/__tests__/pluginContainer.spec.ts + if (!server) { + return null; + } + const ssr = options?.ssr === true; + if (canSkipImportAnalysis(importer)) { + debug$4?.(colors$1.dim(`[skipped] ${prettifyUrl(importer, root)}`)); + return null; + } + const start = performance.now(); + await init; + let imports; + let exports; + source = stripBomTag(source); + try { + [imports, exports] = parse$e(source); + } + catch (_e) { + const e = _e; + const { message, showCodeFrame } = createParseErrorInfo(importer, source); + this.error(message, showCodeFrame ? e.idx : undefined); + } + const depsOptimizer = getDepsOptimizer(config, ssr); + const { moduleGraph } = server; + // since we are already in the transform phase of the importer, it must + // have been loaded so its entry is guaranteed in the module graph. + const importerModule = moduleGraph.getModuleById(importer); + if (!importerModule) { + // This request is no longer valid. It could happen for optimized deps + // requests. A full reload is going to request this id again. + // Throwing an outdated error so we properly finish the request with a + // 504 sent to the browser. + throwOutdatedRequest(importer); + } + if (!imports.length && !this._addedImports) { + importerModule.isSelfAccepting = false; + debug$4?.(`${timeFrom(start)} ${colors$1.dim(`[no imports] ${prettifyUrl(importer, root)}`)}`); + return source; + } + let hasHMR = false; + let isSelfAccepting = false; + let hasEnv = false; + let needQueryInjectHelper = false; + let s; + const str = () => s || (s = new MagicString(source)); + let isPartiallySelfAccepting = false; + const importedBindings = enablePartialAccept + ? new Map() + : null; + const toAbsoluteUrl = (url) => path$o.posix.resolve(path$o.posix.dirname(importerModule.url), url); + const normalizeUrl = async (url, pos, forceSkipImportAnalysis = false) => { + url = stripBase(url, base); + let importerFile = importer; + const optimizeDeps = getDepOptimizationConfig(config, ssr); + if (moduleListContains(optimizeDeps?.exclude, url)) { + if (depsOptimizer) { + await depsOptimizer.scanProcessing; + // if the dependency encountered in the optimized file was excluded from the optimization + // the dependency needs to be resolved starting from the original source location of the optimized file + // because starting from node_modules/.vite will not find the dependency if it was not hoisted + // (that is, if it is under node_modules directory in the package source of the optimized file) + for (const optimizedModule of depsOptimizer.metadata.depInfoList) { + if (!optimizedModule.src) + continue; // Ignore chunks + if (optimizedModule.file === importerModule.file) { + importerFile = optimizedModule.src; + } + } + } + } + const resolved = await this.resolve(url, importerFile); + if (!resolved || resolved.meta?.['vite:alias']?.noResolved) { + // in ssr, we should let node handle the missing modules + if (ssr) { + return [url, url]; + } + // fix#9534, prevent the importerModuleNode being stopped from propagating updates + importerModule.isSelfAccepting = false; + return this.error(`Failed to resolve import "${url}" from "${path$o.relative(process.cwd(), importerFile)}". Does the file exist?`, pos); + } + if (isExternalUrl(resolved.id)) { + return [resolved.id, resolved.id]; + } + const isRelative = url[0] === '.'; + const isSelfImport = !isRelative && cleanUrl(url) === cleanUrl(importer); + // normalize all imports into resolved URLs + // e.g. `import 'foo'` -> `import '/@fs/.../node_modules/foo/index.js'` + if (resolved.id.startsWith(withTrailingSlash(root))) { + // in root: infer short absolute path from root + url = resolved.id.slice(root.length); + } + else if (depsOptimizer?.isOptimizedDepFile(resolved.id) || + // vite-plugin-react isn't following the leading \0 virtual module convention. + // This is a temporary hack to avoid expensive fs checks for React apps. + // We'll remove this as soon we're able to fix the react plugins. + (resolved.id !== '/@react-refresh' && + path$o.isAbsolute(resolved.id) && + fsUtils.existsSync(cleanUrl(resolved.id)))) { + // an optimized deps may not yet exists in the filesystem, or + // a regular file exists but is out of root: rewrite to absolute /@fs/ paths + url = path$o.posix.join(FS_PREFIX, resolved.id); + } + else { + url = resolved.id; + } + // if the resolved id is not a valid browser import specifier, + // prefix it to make it valid. We will strip this before feeding it + // back into the transform pipeline + if (url[0] !== '.' && url[0] !== '/') { + url = wrapId(resolved.id); + } + // make the URL browser-valid if not SSR + if (!ssr) { + // mark non-js/css imports with `?import` + url = markExplicitImport(url); + // If the url isn't a request for a pre-bundled common chunk, + // for relative js/css imports, or self-module virtual imports + // (e.g. vue blocks), inherit importer's version query + // do not do this for unknown type imports, otherwise the appended + // query can break 3rd party plugin's extension checks. + if ((isRelative || isSelfImport) && + !hasImportInQueryParamsRE.test(url) && + !DEP_VERSION_RE.test(url)) { + const versionMatch = importer.match(DEP_VERSION_RE); + if (versionMatch) { + url = injectQuery(url, versionMatch[1]); + } + } + // check if the dep has been hmr updated. If yes, we need to attach + // its last updated timestamp to force the browser to fetch the most + // up-to-date version of this module. + try { + // delay setting `isSelfAccepting` until the file is actually used (#7870) + // We use an internal function to avoid resolving the url again + const depModule = await moduleGraph._ensureEntryFromUrl(unwrapId(url), ssr, canSkipImportAnalysis(url) || forceSkipImportAnalysis, resolved); + if (depModule.lastHMRTimestamp > 0) { + url = injectQuery(url, `t=${depModule.lastHMRTimestamp}`); + } + } + catch (e) { + // it's possible that the dep fails to resolve (non-existent import) + // attach location to the missing import + e.pos = pos; + throw e; + } + // prepend base + url = joinUrlSegments(base, url); + } + return [url, resolved.id]; + }; + const orderedImportedUrls = new Array(imports.length); + const orderedAcceptedUrls = new Array(imports.length); + const orderedAcceptedExports = new Array(imports.length); + await Promise.all(imports.map(async (importSpecifier, index) => { + const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: attributeIndex, } = importSpecifier; + // #2083 User may use escape path, + // so use imports[index].n to get the unescaped string + let specifier = importSpecifier.n; + const rawUrl = source.slice(start, end); + // check import.meta usage + if (rawUrl === 'import.meta') { + const prop = source.slice(end, end + 4); + if (prop === '.hot') { + hasHMR = true; + const endHot = end + 4 + (source[end + 4] === '?' ? 1 : 0); + if (source.slice(endHot, endHot + 7) === '.accept') { + // further analyze accepted modules + if (source.slice(endHot, endHot + 14) === '.acceptExports') { + const importAcceptedExports = (orderedAcceptedExports[index] = + new Set()); + lexAcceptedHmrExports(source, source.indexOf('(', endHot + 14) + 1, importAcceptedExports); + isPartiallySelfAccepting = true; + } + else { + const importAcceptedUrls = (orderedAcceptedUrls[index] = + new Set()); + if (lexAcceptedHmrDeps(source, source.indexOf('(', endHot + 7) + 1, importAcceptedUrls)) { + isSelfAccepting = true; + } + } + } + } + else if (prop === '.env') { + hasEnv = true; + } + return; + } + else if (templateLiteralRE.test(rawUrl)) { + // If the import has backticks but isn't transformed as a glob import + // (as there's nothing to glob), check if it's simply a plain string. + // If so, we can replace the specifier as a plain string to prevent + // an incorrect "cannot be analyzed" warning. + if (!(rawUrl.includes('${') && rawUrl.includes('}'))) { + specifier = rawUrl.replace(templateLiteralRE, '$1'); + } + } + const isDynamicImport = dynamicIndex > -1; + // strip import attributes as we can process them ourselves + if (!isDynamicImport && attributeIndex > -1) { + str().remove(end + 1, expEnd); + } + // static import or valid string in dynamic import + // If resolvable, let's resolve it + if (specifier) { + // skip external / data uri + if (isExternalUrl(specifier) || isDataUrl(specifier)) { + return; + } + // skip ssr external + if (ssr) { + if (shouldExternalizeForSSR(specifier, importer, config)) { + return; + } + if (isBuiltin(specifier)) { + return; + } + } + // skip client + if (specifier === clientPublicPath) { + return; + } + // warn imports to non-asset /public files + if (specifier[0] === '/' && + !(config.assetsInclude(cleanUrl(specifier)) || + urlRE.test(specifier)) && + checkPublicFile(specifier, config)) { + throw new Error(`Cannot import non-asset file ${specifier} which is inside /public. ` + + `JS/CSS files inside /public are copied as-is on build and ` + + `can only be referenced via