UNPKG

@cearth/tools

Version:
10 lines 475 kB
var Tools=function(S,h){"use strict";var jn=typeof document<"u"?document.currentScript:null;function ri(n){return an(n)||un(n)||ls(n)}function an(n){return"modelMatrix"in n}function un(n){return"position"in n}function ls(n){return"positions"in n}const ss={[h.WebGLConstants.BYTE]:Int8Array,[h.WebGLConstants.UNSIGNED_BYTE]:Uint8Array,[h.WebGLConstants.SHORT]:Int16Array,[h.WebGLConstants.UNSIGNED_SHORT]:Uint16Array,[h.WebGLConstants.INT]:Int32Array,[h.WebGLConstants.UNSIGNED_INT]:Uint32Array,[h.WebGLConstants.FLOAT]:Float32Array,[h.WebGLConstants.DOUBLE]:Float64Array};var es=(n=>(n[n.x=0]="x",n[n.y=1]="y",n[n.z=2]="z",n))(es||{});S.Xyz_Hpr=(n=>(n.x="roll",n.y="pitch",n.z="heading",n))(S.Xyz_Hpr||{}),(n=>{function t(e){for(let[d,i]of Object.entries(n))if(e===i)return d}n.toKey=t;function l(e){return new h.Cartesian3(e.roll,-e.pitch,-e.heading)}n.toCartesian3=l;function s(e){return new h.HeadingPitchRoll(-e[t("heading")],-e[t("pitch")],e[t("roll")])}n.toHeadingPitchRoll=s})(S.Xyz_Hpr||(S.Xyz_Hpr={}));var ds=(n=>(n[n.heading=0]="heading",n[n.pitch=1]="pitch",n[n.roll=2]="roll",n))(ds||{});function En(n){const t=n==null?void 0:n.world,{translation:l,rotation:s,scale:e}=t&&typeof t=="object"?t:{translation:t,rotation:t,scale:t};return{...n,worldTranslation:l,worldRotation:s,worldScale:e}}function Bt(n){if(n.axis){const{axis:l,angle:s}=n;return h.Quaternion.fromAxisAngle(l,s)}const t=S.Xyz_Hpr.toHeadingPitchRoll(n);return h.Quaternion.fromHeadingPitchRoll(t)}function hi(n,t,l){const s=h.Matrix3.fromQuaternion(n),e=h.Matrix4.fromRotation(s),d=h.Matrix4.inverseTransformation(t,new h.Matrix4),i=h.Matrix4.multiply(d,e,e);return On(i)}function On(n,t){const l=h.Matrix4.getMatrix3(n,new h.Matrix3),s=h.Quaternion.fromRotationMatrix(l);return h.HeadingPitchRoll.fromQuaternion(s,t)}function mi(n,t,l){l=l??new h.Matrix4;const s=h.Matrix4.inverse(t,new h.Matrix4);return h.Matrix4.multiply(s,n,l)}function is(n,t,l){let s=h.Quaternion.computeAxis(n,new h.Cartesian3);if(s.equals(h.Cartesian3.ZERO))return null;const e=h.Quaternion.computeAngle(n);return s=h.Matrix4.multiplyByPointAsVector(t,s,s),h.Quaternion.fromAxisAngle(s,e)}function Zi(n,t,l){let s=h.Quaternion.computeAxis(n,new h.Cartesian3);if(s.equals(h.Cartesian3.ZERO))return null;const e=h.Quaternion.computeAngle(n),d=h.Matrix4.inverse(t,new h.Matrix4);return s=h.Matrix4.multiplyByPointAsVector(d,s,s),h.Quaternion.fromAxisAngle(s,e)}function Xn(n,t){let{translation:l,rotation:s,scale:e}=n;const{referFrame:d,worldTranslation:i,worldRotation:c,worldScale:o}=En(t);let a=null;return l&&(i||(l=h.Matrix4.multiplyByPointAsVector(d,l,new h.Cartesian3))),s&&(a=Bt(s),c||(a=is(a,d))),e&&(o||(e=h.Matrix4.multiplyByPointAsVector(d,e,new h.Cartesian3))),{translation:l,rotation:a,scale:e}}function cs(n,t){let{translation:l,rotation:s,scale:e}=n;const{referFrame:d,worldTranslation:i,worldRotation:c,worldScale:o}=En(t),a=d?h.Matrix4.inverse(d,new h.Matrix4):null;let u=null;if(l&&i&&(l=h.Matrix4.multiplyByPointAsVector(a,l,new h.Cartesian3)),s&&(u=Bt(s),c)){let X=h.Quaternion.computeAxis(u,new h.Cartesian3);if(!X.equals(h.Cartesian3.ZERO)){const r=h.Quaternion.computeAngle(u);X=h.Matrix4.multiplyByPointAsVector(a,X,X),u=h.Quaternion.fromAxisAngle(X,r)}}return e&&o&&(e=h.Matrix4.multiplyByPointAsVector(a,e,new h.Cartesian3)),{translation:l,rotation:u,scale:e}}function bs(n,t){const l=t==null?void 0:t.defaultMatrix;let{translation:s,rotation:e,scale:d}=Xn(n,t);if(l){if(s||(s=h.Matrix4.getTranslation(l,new h.Cartesian3)),!e){const c=h.Matrix4.getMatrix3(l,new h.Matrix3);e=h.Quaternion.fromRotationMatrix(c)}d||(d=h.Matrix4.getScale(l,new h.Cartesian3))}const i=new h.TranslationRotationScale(s??void 0,e??void 0,d??void 0);return h.Matrix4.fromTranslationRotationScale(i)}function Gi(n){const{translation:t,rotation:l,scale:s}=n,e=l?Bt(l):void 0,d=new h.TranslationRotationScale(t??void 0,e,s??void 0);return h.Matrix4.fromTranslationRotationScale(d)}function os(n,t,l){const s=h.Cartesian3.subtract(t,n,new h.Cartesian3),e=h.Cartesian3.subtract(l,n,new h.Cartesian3),d=h.Cartesian3.cross(s,e,s);return h.Cartesian3.normalize(d,s)}function Wi(n,t,l){const s=os(n,t,l);return h.Plane.fromPointNormal(s,n)}function*pi(n,t=!0,l,s){const e=n.length,d=t?e:e-1,i=l||s?h.Cartesian3.prototype.equalsEpsilon:h.Cartesian3.prototype.equals;for(let c=0;c<d;c++){const o=n[c];let a=(c+1)%e,u=n[a],X=c;for(;i.call(o,u,l,s);){if(a=(++X+1)%e,a===c)return;u=n[a]}c=X,yield[o,u]}}function vt(n,t,l){l=l??new h.Matrix4;const s=h.Matrix4.inverse(t,new h.Matrix4),e=h.Matrix4.multiply(n,s,s);return h.Matrix4.multiply(t,e,l)}function Vi(n,t,l,s){s=s??new h.Matrix4;const e=h.Matrix4.inverse(l,new h.Matrix4);let d=h.Matrix4.multiply(e,n,e);return d=h.Matrix4.multiply(t,d,d),h.Matrix4.multiply(l,d,s)}function yi(n,t,l){const s=h.Matrix4.fromTranslation(n);return vt(s,t,l)}function Li(n,t,l,s){const e=h.Quaternion.fromAxisAngle(n,t),d=h.Matrix3.fromQuaternion(e),i=h.Matrix4.fromRotation(d);return vt(i,l,s)}function xi(n,t,l){const s=h.Matrix4.fromScale(n);return vt(s,t,l)}function Ri(n,t,l){const s=h.Matrix3.fromScale(t);if(l)for(const e of n)h.Cartesian3.subtract(e,l,e),h.Matrix3.multiplyByVector(s,e,e),h.Cartesian3.add(e,l,e);else{const e=h.Matrix3.fromScale(t);for(const d of n)h.Matrix3.multiplyByVector(e,d,d)}return n}function Ki(n,t){const{translation:l,rotation:s,scale:e}=n;let d;if(s){const{axis:c,angle:o}=s;d=h.Quaternion.fromAxisAngle(c,o)}const i=new h.TranslationRotationScale(l??void 0,d,e??void 0);return h.Matrix4.fromTranslationRotationScale(i,t??void 0)}function Si(n){let t=n.boundingSphere;if(t)return t;let l=n.geometryInstances;if(l){l=Array.isArray(l)?l:[l];const e=l.map(d=>d.geometry.boundingSphere);return h.BoundingSphere.fromBoundingSpheres(e)}const s=n.positions;return(s==null?void 0:s.length)>0?h.BoundingSphere.fromPoints(s):null}function zi(n,t){t=t??new h.Cartesian3;const l=n.position;if(l)return l instanceof h.Cartesian3?l:l.getValue(h.JulianDate.now(),t);const s=n.modelMatrix;if(s)return h.Matrix4.getTranslation(s,t);const e=n.positions;return(e==null?void 0:e.length)>0?h.BoundingSphere.fromPoints(e).center:null}function Yi(n,t,l){let{translation:s,rotation:e,scale:d}=Xn(t,l);const i=new h.TranslationRotationScale(s??void 0,e??void 0,d??void 0),c=h.Matrix4.fromTranslationRotationScale(i);return as(n,c)}function as(n,t){const l=n.modelMatrix;if(l)return h.Matrix4.multiply(t,l,l),n.modelMatrix=l,!0;const s=n.position;if(s){if("scale"in n){const d=h.Matrix4.getTranslation(t,new h.Cartesian3);h.Cartesian3.add(s,d,s);const i=n.scale??1,c=h.Matrix4.getScale(t,new h.Cartesian3);n.scale=h.Cartesian3.maximumComponent(c)*i}else h.Matrix4.multiplyByPoint(t,s,s);return n.position=s,!0}const e=n.positions;if((e==null?void 0:e.length)>0){for(const d of e)h.Matrix4.multiplyByPoint(t,d,d);return n.positions=e,!0}return!1}function Mi(n,t,l){const s=Xs(n),e=bs(t,{...l,defaultMatrix:s});return us(n,e)}function us(n,t){if(an(n))return n.modelMatrix=t,!0;const l=h.Matrix4.getTranslation(t,new h.Cartesian3);if(un(n)){if(n.position=l,"scale"in n){const e=h.Matrix4.getScale(t,new h.Cartesian3);n.scale=h.Cartesian3.maximumComponent(e)}return!0}const s=n.positions;if((s==null?void 0:s.length)>0){const e=h.BoundingSphere.fromPoints(s);h.Cartesian3.subtract(l,e.center,l);for(const d of s)h.Cartesian3.add(d,l,d);return n.positions=s,!0}return!1}function Xs(n){if(an(n))return n.modelMatrix;if(un(n)){const l=n.position,s=n.scale??1,e=new h.TranslationRotationScale(l,void 0,new h.Cartesian3(s,s,s));return h.Matrix4.fromTranslationRotationScale(e)}const t=n.positions;if((t==null?void 0:t.length)>0){const l=h.BoundingSphere.fromPoints(t);return h.Matrix4.fromTranslation(l.center)}return null}function gi(n,t){var V,y;let{translation:l,rotation:s,scale:e}=Xn(t,t);const{reset:d,referFrame:i}=t,c=h.JulianDate.now(),o=!d;if(s){let R=s;if(o){const x=(V=n.orientation)==null?void 0:V.getValue(c);x&&(R=h.Quaternion.multiply(s,x,x))}n.orientation=R}if(l){let R=l;if(o){const x=(y=n.position)==null?void 0:y.getValue(c);x&&(R=h.Cartesian3.add(x,l,x))}n.position=R}if(!i)return;const{translation:a,rotation:u,scale:X}=cs(t,t),r=new h.TranslationRotationScale(a??void 0,u??void 0,X??void 0);let m=h.Matrix4.fromTranslationRotationScale(r);if(m=vt(m,i,m),X){const R=n.box;R&&rs(R,X);const x=n.cylinder;x&&hs(x,X);const f=n.ellipse;f&&ms(f,X);const M=n.ellipsoid;M&&Zs(M,X);const g=n.model;g&&Gs(g,X,d);const z=n.plane;z&&Ws(z,X)}const Z=n.corridor;Z&&ps(Z,m,X);const W=n.polygon;W&&Vs(W,m,X);const G=n.polyline;G&&ys(G,m,X);const p=n.polylineVolume;p&&Ls(p,m,X);const L=n.wall;L&&xs(L,m,X)}function rs(n,t){var e;const l=h.JulianDate.now(),s=(e=n.dimensions)==null?void 0:e.getValue(l);s&&(n.dimensions=h.Cartesian3.multiplyComponents(s,t,s))}function hs(n,t){var o,a,u;const l=h.JulianDate.now(),s=(o=n.length)==null?void 0:o.getValue(l);s!=null&&(n.length=s*t.z);const e=Math.max(t.x,t.y),d=(a=n.topRadius)==null?void 0:a.getValue(l);d!=null&&(n.topRadius=d*e);const i=t.z,c=(u=n.bottomRadius)==null?void 0:u.getValue(l);c!=null&&(n.bottomRadius=c*i)}function ms(n,t){var a,u,X,r;const l=h.JulianDate.now(),s=Math.max(t.x,t.y),e=t.z,d=(a=n.semiMajorAxis)==null?void 0:a.getValue(l);d!=null&&(n.semiMajorAxis=d*s);const i=(u=n.semiMinorAxis)==null?void 0:u.getValue(l);i!=null&&(n.semiMinorAxis=i*s);const c=(X=n.height)==null?void 0:X.getValue(l);c!=null&&(n.height=c*e);const o=(r=n.extrudedHeight)==null?void 0:r.getValue(l);o!=null&&(n.extrudedHeight=o*e)}function Zs(n,t){var d,i;const l=h.JulianDate.now(),s=(d=n.radii)==null?void 0:d.getValue(l);s!=null&&(n.radii=h.Cartesian3.multiplyComponents(s,t,s));const e=(i=n.innerRadii)==null?void 0:i.getValue(l);e!=null&&(n.innerRadii=h.Cartesian3.multiplyComponents(e,t,e))}function Gs(n,t,l){var e;let s=h.Cartesian3.maximumComponent(t);if(!l){const d=h.JulianDate.now(),i=((e=n.scale)==null?void 0:e.getValue(d))??1;s*=i}n.scale=s}function Ws(n,t){var d;const l=h.JulianDate.now(),s=h.Cartesian2.fromCartesian3(t),e=(d=n.dimensions)==null?void 0:d.getValue(l);e&&(n.dimensions=h.Cartesian2.multiplyComponents(e,s,e))}function ps(n,t,l){var X,r,m;const s=h.JulianDate.now(),e=new h.Cartesian3,d=(X=n.positions)==null?void 0:X.getValue(s);if((d==null?void 0:d.length)>0){for(const Z of d)h.Matrix4.multiplyByPoint(t,Z,Z);n.dimensions=d}const i=l??h.Matrix4.getScale(t,e),c=Math.max(i.x,i.y);((r=n.width)==null?void 0:r.getValue(s))!=null&&(n.width=c*scale);const a=(m=n.height)==null?void 0:m.getValue(s),u=i.z;a!=null&&(n.height=a*u)}function Vs(n,t,l){var u,X,r;const s=h.JulianDate.now(),e=new h.Cartesian3,d=(u=n.hierarchy)==null?void 0:u.getValue(s);d&&(An(d,t),n.hierarchy=d);const c=(l??h.Matrix4.getScale(t,e)).z,o=(X=n.height)==null?void 0:X.getValue(s);o!=null&&(n.height=o*c);const a=(r=n.extrudedHeight)==null?void 0:r.getValue(s);a!=null&&(n.extrudedHeight=a*c)}function An(n,t){const{positions:l,holes:s}=n;for(const e of l)h.Matrix4.multiplyByPoint(t,e,e);n.positions=l;for(const e of s)An(e,t)}function ys(n,t,l){var a,u;const s=h.JulianDate.now(),e=new h.Cartesian3,d=(a=n.positions)==null?void 0:a.getValue(s);if((d==null?void 0:d.length)>0){for(const X of d)h.Matrix4.multiplyByPoint(t,X,X);n.positions=d}const i=l??h.Matrix4.getScale(t,e),c=Math.max(i.x,i.y);((u=n.width)==null?void 0:u.getValue(s))!=null&&(n.width=c*scale)}function Ls(n,t,l){var a,u;const s=h.JulianDate.now(),e=new h.Cartesian3,d=(a=n.positions)==null?void 0:a.getValue(s);if((d==null?void 0:d.length)>0){for(const X of d)h.Matrix4.multiplyByPoint(t,X,X);n.positions=d}const i=l??h.Matrix4.getScale(t,e),c=h.Cartesian2.fromCartesian3(i),o=(u=n.shape)==null?void 0:u.getValue(s);if(o!=null){for(const X of o)h.Cartesian2.multiplyComponents(X,c,X);n.shape=o}}function xs(n,t,l){var u,X,r;const s=h.JulianDate.now(),e=new h.Cartesian3,d=(u=n.positions)==null?void 0:u.getValue(s);if((d==null?void 0:d.length)>0){for(const m of d)h.Matrix4.multiplyByPoint(t,m,m);n.positions=d}const c=(l??h.Matrix4.getScale(t,e)).z,o=(X=n.minimumHeights)==null?void 0:X.getValue(s);o!=null&&(graphicsgraphics.minimumHeights=o.map(m=>m*c));const a=(r=n.maximumHeights)==null?void 0:r.getValue(s);a!=null&&(graphicsgraphics.maximumHeights=a.map(m=>m*c))}function fi(n,t,l){var W,G,p,L;const s=h.JulianDate.now(),e=(W=n.position)==null?void 0:W.getValue(s);if(!e)return null;const d=(G=n.orientation)==null?void 0:G.getValue(s),i=((L=(p=n.model)==null?void 0:p.scale)==null?void 0:L.getValue(s))??1,c=new h.Cartesian3(i,i,i),o=t(e,l),a=h.Matrix4.inverse(o,new h.Matrix4),u=h.Matrix4.multiplyByPoint(a,e,new h.Cartesian3),X={translation:u,position:e,scale:c,rotation:new h.Cartesian3};let r;if(d){const V=h.Matrix3.fromQuaternion(d),y=h.Matrix4.fromRotation(V),R=h.Matrix4.multiply(a,y,y),x=On(R);r=S.Xyz_Hpr.toCartesian3(x),X.rotation=r}const m=new h.TranslationRotationScale(u??void 0,r?Bt(r):void 0,c??void 0);let Z=h.Matrix4.fromTranslationRotationScale(m);return X.matrix=Z,X}function Ti(n){return n.values.length/n.componentsPerAttribute}function Ci(n){return h.ComponentDatatype.getSizeInBytes(n.componentDatatype)*n.componentsPerAttribute}function Fi(n){const{componentDatatype:t,vertexBuffer:l}=n,s=ss[t];if(!s)throw new Error("不支持的数据类型");const e=l.sizeInBytes,d=h.ComponentDatatype.getSizeInBytes(t),i=e/d;let c=new s(i);return l.getBufferData(c,0,0,e),c}new h.Cartesian2,new h.Cartesian3,new h.Cartesian4;const Dn=[new h.Cartesian2,new h.Cartesian2,new h.Cartesian2,new h.Cartesian2],rn=[new h.Cartesian3,new h.Cartesian3,new h.Cartesian3,new h.Cartesian3];new h.Cartesian4,new h.Cartesian4,new h.Cartesian4,new h.Cartesian4;const Ni=[new h.Cartographic,new h.Cartographic,new h.Cartographic,new h.Cartographic];new h.Rectangle,new h.Rectangle,new h.Rectangle,new h.Rectangle,new h.Matrix2,new h.Matrix2,new h.Matrix2,new h.Matrix2,new h.Matrix3,new h.Matrix3,new h.Matrix3,new h.Matrix3,new h.Matrix4,new h.Matrix4,new h.Matrix4,new h.Matrix4,new h.Quaternion,new h.Quaternion,new h.Quaternion,new h.Quaternion,new h.HeadingPitchRoll,new h.HeadingPitchRoll,new h.HeadingPitchRoll,new h.HeadingPitchRoll;function Ji(n,t=[]){const{stride:l,vertexArray:s}=n,e=s.length/l,d=rn[0];for(let i=0;i<e;i++)n.encoding.decodePosition(s,i,d),h.Cartesian3.pack(d,t,t.length);return t}function Hi(n,t,l){return n.encoding.decodePosition(n.vertexArray,t,l)}function Rs(n){const{stride:t,vertices:l,indices:s,encoding:e}=n,d=l.length/t,i=rn[0],c=new Float32Array(d*3),o=Dn[0],a=new Float32Array(d*2),u=new Float32Array(d);for(let X=0;X<d;X++){e.decodePosition(l,X,i),h.Cartesian3.pack(i,c,X*3);const r=e.decodeHeight(l,X);u[X]=r,e.decodeTextureCoordinates(l,X,o),h.Cartesian2.pack(o,a,X*2)}return{attributes:{position:{array:c,vectorSize:3},uv:{array:a,vectorSize:2},height:{array:u,vectorSize:1}},indices:s.slice(),count:d}}function _n(n,t){const l=n._surface._tilesToRender,s=[],e=new h.Rectangle;for(const d of l){const{rectangle:i}=d;h.Rectangle.intersection(t,i,e)&&s.push(d)}return s}function Ii(n){const t=n._surface._tilesToRender;return Ks(t)}function Ks(n){const t=new Set;for(const d of n)t.add(d.level);const l=[...t],s=Math.min.apply(Math,l),e=Math.max.apply(Math,l);return{min:s,max:e}}function qn(n){return n.map(t=>{const{mesh:l,terrainData:s}=t.data,e=Rs(l),{x:d,y:i,level:c}=t,o=[s._minimumHeight,s._maximumHeight];return{data:e,encoding:l.encoding,rectangle:t.rectangle,heightRange:o,x:d,y:i,level:c}})}function ki(n){const{x:t,y:l,level:s}=n;return n.data.terrainData.upsample(n.tilingScheme,t,l,s,t,l,s)}function Ss(n){var t=typeof n;return n&&(t==="object"||t==="function")}function zs(n){var t=n;return n!=null&&(t=n.constructor,t==null&&(t=typeof n)),t}function Pi(n){switch(n){case void 0:return"undefined";case null:return"null"}let t=typeof n;switch(t){case"function":return n.name;case"string":return n;default:return t}}function Qi(n){let t=zs(n);return Pi(t)}function Bi(n){return n==null||Ss(n)?zs(n):typeof n}var wt=(n=>(n.equal="equal",n.intersect="intersect",n.intersectEqual="intersectEqual",n))(wt||{});(n=>{function t(l){let s;switch(l){case"equal":s=(e,d)=>e===d;case"intersect":s=(e,d)=>e&d;default:s=(e,d)=>(e&d)===e}return s}n.getEqualFun=t})(wt||(wt={}));const vi=[globalThis.Worker,globalThis.SharedWorker,globalThis.ServiceWorker].filter(n=>n),wi=["Worker","SharedWorker","ServiceWorker"];function Ui(n){if(vi.some(l=>n instanceof l))return!0;const t=Qi(n);return wi.includes(t)}var $n=(n=>(n.Ing="进行中",n.End="结束",n))($n||{}),ji=Object.defineProperty,Ei=(n,t,l)=>t in n?ji(n,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[t]=l,hn=(n,t,l)=>Ei(n,typeof t!="symbol"?t+"":t,l);const Ys=`(function(){"use strict";function n(){const r=globalThis.currentWorkerType;if(r)return r;let e=globalThis.SharedWorkerGlobalScope;return typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="SharedWorker":(e=globalThis.DedicatedWorkerGlobalScope,typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="DedicatedWorker":(e=globalThis.Window,typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="Window":globalThis.currentWorkerType="unknown"))}function t(r){switch(n()){case"SharedWorker":{globalThis.addEventListener("connect",function(e){for(const o of e.ports)o.addEventListener("message",r),o.start()});break}default:globalThis.addEventListener("message",r)}}globalThis.listenMessage||(globalThis.listenMessage=t)})(); `,Oi='(function(){"use strict";function b(t){var e=t;return t!=null&&(e=t.constructor,e==null&&(e=typeof t)),e}var u=(t=>(t.equal="equal",t.intersect="intersect",t.intersectEqual="intersectEqual",t))(u||{});(t=>{function e(r){let s;switch(r){case"equal":s=(o,n)=>o===n;case"intersect":s=(o,n)=>o&n;default:s=(o,n)=>(o&n)===o}return s}t.getEqualFun=e})(u||(u={}));function d(){const t=globalThis.currentWorkerType;if(t)return t;let e=globalThis.SharedWorkerGlobalScope;return typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="SharedWorker":(e=globalThis.DedicatedWorkerGlobalScope,typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="DedicatedWorker":(e=globalThis.Window,typeof e=="function"&&globalThis instanceof e?globalThis.currentWorkerType="Window":globalThis.currentWorkerType="unknown"))}function h(t,e,r){const s=/(^\\s*(async\\s+)?function\\s*(\\s|\\*)\\s*)[A-Za-z_$]+[\\w$]*(\\s*\\()/,o=/^[A-Za-z_$]+[\\w$]*$/,n=s.test(t),a=e&&o.test(e);if(n&&a&&(t=t.replace(s,`$1${e}$4`)),!n&&a)var i=`var ${e} = ${t} ; return ${e}`;else i=`return (${t})`;return new Function(i)()}function f(t){const{name:e,args:r,this:s}=t,o=s??globalThis,n=globalThis[e];return typeof n=="function"?n.apply(o,r):r||s?{error:"函数不存在",state:"结束"}:{data:n,state:"结束"}}function g(t){const e=b(t);if(e==="object"||e===Object){const{transfer:r,targetOrigin:s}=t;return"data"in t||"error"in t||Array.isArray(r)||typeof s=="string"}return!1}function c(t,e){const{data:r,...s}=g(t)?t:{data:t},o={...e,...s};if(r instanceof ReadableStream){const n=new WritableStream({write:function(a,i){return c(a,{...o,state:"进行中"})},close:function(a){l(void 0,{state:"结束",...o})},abort:function(a){l(void 0,{state:"结束",...o,error:a})}});return r.pipeTo(n)}return r instanceof Promise?r.then(function(n){c(n,{state:"结束",...o})},function(n){l(void 0,{...o,error:n,state:"结束"})}):l(r,{state:"结束",...o})}function l(t,e){const{port:r,...s}=e,{transfer:o,targetOrigin:n,...a}=g(t)?{...s,...t}:{...s,data:t};a.state==null&&(a.state="结束");const i={transfer:o,targetOrigin:n};return(r??globalThis).postMessage(a,i)}function T(t){const e=t.data,r=t.currentTarget;if(e){const s=f(e);c(s,{execId:e.id,port:r})}}function p(t,e){const r=h(t,e);return e=e??r.name,globalThis[e]=r,!0}function y(t){return delete globalThis[t]}Object.assign(globalThis,{execCMD:f,messageListener:T,setCMD:p,removeCMD:y,sendMessage:c}),d(),listenMessage(T)})();\n',mn="event";function Ms(n,t){t=t??n.name;const l=n.toString();return`globalThis['${t}'] = ${l};`}function tl(n,t){const l=typeof n=="string"?n:n.toString();t=t??[];const s=t.map(function(d){return Ss(d)?JSON.stringify(d):d}),e=s.length>0?`,${s.join(",")}`:"";return`(${l}).call(this${e});`}function Ai(n,t){return n.name?Ms(n):tl(n,t)}function gs(n){return`globalThis.listenMessage(${typeof n=="string"?n:n.toString()});`}function Di(n){const t=n.map(function(s){return`${s}.call(this,${mn});`}).join(` `),l=`function(${mn}){${t}}`;return gs(l)}function _i(n){const t=n.map(function(s){return tl(s,[mn])}).join(` `),l=`function(${mn}){${t}}`;return gs(l)}function qi(n,t){const l=new Blob(n,{type:"text/javascript",...t});return URL.createObjectURL(l)}function fs(n){return n.name||n.fun?[n]:Object.entries(n).map(function([t,l]){return{name:t,fun:l}})}function $i(n,t){const{code:l,named:s,iife:e,message:d}=n,i=[],c=[],o=e||[],a=[],u=[],X=Array.isArray(l)?l:l?[l]:[];for(const y of X){const R=Bi(y);if(R===Object||R==="object"){const x=fs(y);i.push(...x)}else c.push(y)}const r=Array.isArray(s)?s:s?[s]:[];for(const y of r)if(typeof y=="function")i.push({fun:y});else{const R=fs(y);i.push(...R)}const m=Array.isArray(d)?d:d?[d]:[];for(const y of m)switch(typeof y){case"string":{u.push(y);break}case"function":{a.push(y);break}default:{const{name:R,fun:x}=y;x?a.push(x):R&&u.push(R)}}const Z=i.map(function({name:y,fun:R}){return`${Ms(R,y)} `}),W=c.map(function(y){return typeof y=="function"?`${Ai(y)} `:y}),G=o.map(function(y){return`${tl(y)} `}),p=[],L=_i(a);p.push(`${L} `);const V=Di(u);return p.push(`${V} `),[`${Ys} `,...Z,...W,...G,...p]}function tc(n,t){const l=n?$i(n):[];return t||l.unshift(Ys,Oi),qi(l)}function Ts(n){return n&&Array.isArray(n.args)&&Array.isArray(n.transfer)}const Cs=class ai{constructor(t){if(hn(this,"id",++ai.instanceCount),hn(this,"execCount",0),t)for(const l of Object.keys(t))this.setCMDToSelf(l)}get port(){return this.getPort(this.worker)}get workerAndPort(){const t=this.worker;return[t,this.getPort(t)]}getPort(t){return t.port||t}execStarted(t,l){++t.executingCount}execEnded(t){--t.executingCount}getExecId(t){return t=t??"匿名",`${t}_${this.execCount}`}getExecRecord(t){return{id:this.getExecId(t.name),...t}}listenResponse(t,l){const s=new AbortController,e=s.signal;let d=null;const i=this.getPort(l);return new Promise((c,o)=>{i.addEventListener("message",u=>{const X=u.data,{execId:r,state:m,error:Z,data:W}=X;if(t!==r)return;if(d){if(m===$n.End){s.abort(),Z&&d.error(Z),W!==void 0&&d.enqueue(W),d.close(),this.execEnded(l);return}if(Z){d.error(Z);return}d.enqueue(W);return}if(Z){o(Z),s.abort();return}if(m===$n.End){s.abort(),c(W),this.execEnded(l);return}const G=new ReadableStream({start:p=>{d=p,Z&&d.error(Z),d.enqueue(W)}});c(G)},{signal:e});const a=u=>{if(s.abort(),d){d.error(u),d.close(),this.execEnded(l);return}o(u)};l.addEventListener("error",a,{signal:e}),i.addEventListener("messageerror",a,{signal:e})}).catch(c=>{throw this.execEnded(l),c})}execCMD(t,l){++this.execCount;const s=this.getExecRecord(t),[e,d]=this.workerAndPort;this.execStarted(e,s);const i=this.listenResponse(s.id,e);d.postMessage(s,l);const c=t.name;return c in this?i:i.then(o=>(this.setCMDToSelf(c),o))}setCMDToSelf(t,l){const s=(...e)=>{const d=e[0];let i;return e.length===1&&Ts(d)&&(i=d.transfer,e=d.args),this.execCMD({name:t,args:e.length>0?e:void 0},i)};return Reflect.defineProperty(this,t,{configurable:!0,enumerable:!0,...l?{get:s}:{value:s,writable:!0}})}};hn(Cs,"instanceCount",0);let nc=Cs;function lc(n){const{url:t,name:l}=n;return new Worker(t,{name:l})}class sc extends nc{constructor(t,l){super(t==null?void 0:t.named),hn(this,"worker");const{id:s}=this;let e=(typeof l=="string"?l:l==null?void 0:l.name)||`DynamicWorker/${s}`,d=t;if(!Ui(t)){const i=typeof t=="string",{getWorker:c,noDep:o}=l||{},a=i?t:tc(t,o);d=(c||lc)({url:a,name:e,clientId:s,id:s}),i||URL.revokeObjectURL(a)}d.executingCount=0,d.name=e,d.id=d.clientId=s,this.worker=d}get executingCount(){return this.worker.executingCount}setCMD(t,l,s){const e=l||t.name;if(!e)return Promise.reject("没有函数的名字");const d=typeof t=="function"?t.toString():t;return this.execCMD({name:"setCMD",args:[d,e]}).then(i=>(i&&this.setCMDToSelf(e,s),i))}removeCMD(t){return this.execCMD({name:"removeCMD",args:[t]}).then(l=>(l&&Reflect.deleteProperty(this,t),l))}}function ec(n){return new Proxy(n,{get:function(t,l,s){const e=t[l];return typeof e=="function"?e.bind(t):e||function(...d){const i=d[0];let c;return d.length===1&&Ts(i)&&(c=i.transfer,d=i.args),t.execCMD({name:l,args:d.length>0?d:void 0},c)}},set:function(t,l,s,e){return t.setCMD(s,l,typeof s!="function")},deleteProperty:function(t,l){return t.removeCMD(l)},has:function(t,l){return l in t},ownKeys:function(t){return Reflect.ownKeys(t)}})}function dc(n,t){const l=new sc(n,t);return ec(l)}const ic=1/Math.PI*180,cc=1/180*Math.PI,bc={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...bc}};const w=globalThis.mathgl.config;function oc(n,{precision:t=w.precision}={}){return n=hc(n),`${parseFloat(n.toPrecision(t))}`}function ht(n){return Array.isArray(n)||ArrayBuffer.isView(n)&&!(n instanceof DataView)}function ac(n){return Xc(n)}function uc(n){return rc(n)}function Xc(n,t){return nl(n,l=>l*cc,t)}function rc(n,t){return nl(n,l=>l*ic,t)}function xt(n,t,l){return nl(n,s=>Math.max(t,Math.min(l,s)))}function O(n,t,l){const s=w.EPSILON;l&&(w.EPSILON=l);try{if(n===t)return!0;if(ht(n)&&ht(t)){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!O(n[e],t[e]))return!1;return!0}return n&&n.equals?n.equals(t):t&&t.equals?t.equals(n):typeof n=="number"&&typeof t=="number"?Math.abs(n-t)<=w.EPSILON*Math.max(1,Math.abs(n),Math.abs(t)):!1}finally{w.EPSILON=s}}function hc(n){return Math.round(n/w.EPSILON)*w.EPSILON}function mc(n){return n.clone?n.clone():new Array(n.length)}function nl(n,t,l){if(ht(n)){const s=n;l=l||mc(s);for(let e=0;e<l.length&&e<s.length;++e){const d=typeof n=="number"?n:n[e];l[e]=t(d,e,l)}return l}return t(n)}class Zn extends Array{clone(){return new this.constructor().copy(this)}fromArray(t,l=0){for(let s=0;s<this.ELEMENTS;++s)this[s]=t[s+l];return this.check()}toArray(t=[],l=0){for(let s=0;s<this.ELEMENTS;++s)t[l+s]=this[s];return t}toObject(t){return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:ht(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(w)}formatString(t){let l="";for(let s=0;s<this.ELEMENTS;++s)l+=(s>0?", ":"")+oc(this[s],t);return`${t.printTypes?this.constructor.name:""}[${l}]`}equals(t){if(!t||this.length!==t.length)return!1;for(let l=0;l<this.ELEMENTS;++l)if(!O(this[l],t[l]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let l=0;l<this.ELEMENTS;++l)if(this[l]!==t[l])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,l,s){if(s===void 0)return this.lerp(this,t,l);for(let e=0;e<this.ELEMENTS;++e){const d=t[e],i=typeof l=="number"?l:l[e];this[e]=d+s*(i-d)}return this.check()}min(t){for(let l=0;l<this.ELEMENTS;++l)this[l]=Math.min(t[l],this[l]);return this.check()}max(t){for(let l=0;l<this.ELEMENTS;++l)this[l]=Math.max(t[l],this[l]);return this.check()}clamp(t,l){for(let s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],t[s]),l[s]);return this.check()}add(...t){for(const l of t)for(let s=0;s<this.ELEMENTS;++s)this[s]+=l[s];return this.check()}subtract(...t){for(const l of t)for(let s=0;s<this.ELEMENTS;++s)this[s]-=l[s];return this.check()}scale(t){if(typeof t=="number")for(let l=0;l<this.ELEMENTS;++l)this[l]*=t;else for(let l=0;l<this.ELEMENTS&&l<t.length;++l)this[l]*=t[l];return this.check()}multiplyByScalar(t){for(let l=0;l<this.ELEMENTS;++l)this[l]*=t;return this.check()}check(){if(w.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let t=this.length===this.ELEMENTS;for(let l=0;l<this.ELEMENTS;++l)t=t&&Number.isFinite(this[l]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let l=0;l<this.ELEMENTS;++l)this[l]=t;return this.check()}addScalar(t){for(let l=0;l<this.ELEMENTS;++l)this[l]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let l=0;l<this.ELEMENTS;++l)this[l]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,l){for(let s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],t),l);return this.check()}get elements(){return this}}function Zc(n,t){if(n.length!==t)return!1;for(let l=0;l<n.length;++l)if(!Number.isFinite(n[l]))return!1;return!0}function C(n){if(!Number.isFinite(n))throw new Error(`Invalid number ${JSON.stringify(n)}`);return n}function Ut(n,t,l=""){if(w.debug&&!Zc(n,t))throw new Error(`math.gl: ${l} some fields set to invalid numbers'`);return n}function ct(n,t){if(!n)throw new Error(`math.gl assertion ${t}`)}let ll=class extends Zn{get x(){return this[0]}set x(t){this[0]=C(t)}get y(){return this[1]}set y(t){this[1]=C(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let l=0;l<this.ELEMENTS;++l)t+=this[l]*this[l];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let l=0;for(let s=0;s<this.ELEMENTS;++s){const e=this[s]-t[s];l+=e*e}return C(l)}dot(t){let l=0;for(let s=0;s<this.ELEMENTS;++s)l+=this[s]*t[s];return C(l)}normalize(){const t=this.magnitude();if(t!==0)for(let l=0;l<this.ELEMENTS;++l)this[l]/=t;return this.check()}multiply(...t){for(const l of t)for(let s=0;s<this.ELEMENTS;++s)this[s]*=l[s];return this.check()}divide(...t){for(const l of t)for(let s=0;s<this.ELEMENTS;++s)this[s]/=l[s];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return ct(t>=0&&t<this.ELEMENTS,"index is out of range"),C(this[t])}setComponent(t,l){return ct(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=l,this.check()}addVectors(t,l){return this.copy(t).add(l)}subVectors(t,l){return this.copy(t).subtract(l)}multiplyVectors(t,l){return this.copy(t).multiply(l)}addScaledVector(t,l){return this.add(new this.constructor(t).multiplyScalar(l))}};const F=1e-6;let B=typeof Float32Array<"u"?Float32Array:Array;const mt=Math.random;function dt(n){return n>=0?Math.round(n):n%.5===0?Math.floor(n):Math.round(n)}function Fs(){const n=new B(2);return B!=Float32Array&&(n[0]=0,n[1]=0),n}function Gc(n){const t=new B(2);return t[0]=n[0],t[1]=n[1],t}function Wc(n,t){const l=new B(2);return l[0]=n,l[1]=t,l}function pc(n,t){return n[0]=t[0],n[1]=t[1],n}function Vc(n,t,l){return n[0]=t,n[1]=l,n}function Ns(n,t,l){return n[0]=t[0]+l[0],n[1]=t[1]+l[1],n}function q(n,t,l){return n[0]=t[0]-l[0],n[1]=t[1]-l[1],n}function Js(n,t,l){return n[0]=t[0]*l[0],n[1]=t[1]*l[1],n}function Hs(n,t,l){return n[0]=t[0]/l[0],n[1]=t[1]/l[1],n}function yc(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n}function Lc(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n}function xc(n,t,l){return n[0]=Math.min(t[0],l[0]),n[1]=Math.min(t[1],l[1]),n}function Rc(n,t,l){return n[0]=Math.max(t[0],l[0]),n[1]=Math.max(t[1],l[1]),n}function Kc(n,t){return n[0]=dt(t[0]),n[1]=dt(t[1]),n}function Sc(n,t,l){return n[0]=t[0]*l,n[1]=t[1]*l,n}function Is(n,t,l,s){return n[0]=t[0]+l[0]*s,n[1]=t[1]+l[1]*s,n}function ks(n,t){const l=t[0]-n[0],s=t[1]-n[1];return Math.sqrt(l*l+s*s)}function Ps(n,t){const l=t[0]-n[0],s=t[1]-n[1];return l*l+s*s}function Qs(n){const t=n[0],l=n[1];return Math.sqrt(t*t+l*l)}function Bs(n){const t=n[0],l=n[1];return t*t+l*l}function zc(n,t){return n[0]=-t[0],n[1]=-t[1],n}function Yc(n,t){return n[0]=1/t[0],n[1]=1/t[1],n}function Mc(n,t){const l=t[0],s=t[1];let e=l*l+s*s;return e>0&&(e=1/Math.sqrt(e)),n[0]=t[0]*e,n[1]=t[1]*e,n}function gc(n,t){return n[0]*t[0]+n[1]*t[1]}function Rt(n,t,l){const s=t[0]*l[1]-t[1]*l[0];return n[0]=n[1]=0,n[2]=s,n}function fc(n,t,l,s){const e=t[0],d=t[1];return n[0]=e+s*(l[0]-e),n[1]=d+s*(l[1]-d),n}function Tc(n,t){t=t===void 0?1:t;const l=mt()*2*Math.PI;return n[0]=Math.cos(l)*t,n[1]=Math.sin(l)*t,n}function vs(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[2]*e,n[1]=l[1]*s+l[3]*e,n}function ws(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[2]*e+l[4],n[1]=l[1]*s+l[3]*e+l[5],n}function sl(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[3]*e+l[6],n[1]=l[1]*s+l[4]*e+l[7],n}function el(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[4]*e+l[12],n[1]=l[1]*s+l[5]*e+l[13],n}function Cc(n,t,l,s){const e=t[0]-l[0],d=t[1]-l[1],i=Math.sin(s),c=Math.cos(s);return n[0]=e*c-d*i+l[0],n[1]=e*i+d*c+l[1],n}function Fc(n,t){const l=n[0],s=n[1],e=t[0],d=t[1],i=Math.sqrt((l*l+s*s)*(e*e+d*d)),c=i&&(l*e+s*d)/i;return Math.acos(Math.min(Math.max(c,-1),1))}function Nc(n){return n[0]=0,n[1]=0,n}function Jc(n){return`vec2(${n[0]}, ${n[1]})`}function Hc(n,t){return n[0]===t[0]&&n[1]===t[1]}function dl(n,t){const l=n[0],s=n[1],e=t[0],d=t[1];return Math.abs(l-e)<=F*Math.max(1,Math.abs(l),Math.abs(e))&&Math.abs(s-d)<=F*Math.max(1,Math.abs(s),Math.abs(d))}const Ic=Qs,kc=q,Pc=Js,Qc=Hs,Bc=ks,vc=Ps,wc=Bs,Uc=function(){const n=Fs();return function(t,l,s,e,d,i){let c,o;for(l||(l=2),s||(s=0),e?o=Math.min(e*l+s,t.length):o=t.length,c=s;c<o;c+=l)n[0]=t[c],n[1]=t[c+1],d(n,n,i),t[c]=n[0],t[c+1]=n[1];return t}}(),jc=Object.freeze(Object.defineProperty({__proto__:null,add:Ns,angle:Fc,ceil:yc,clone:Gc,copy:pc,create:Fs,cross:Rt,dist:Bc,distance:ks,div:Qc,divide:Hs,dot:gc,equals:dl,exactEquals:Hc,floor:Lc,forEach:Uc,fromValues:Wc,inverse:Yc,len:Ic,length:Qs,lerp:fc,max:Rc,min:xc,mul:Pc,multiply:Js,negate:zc,normalize:Mc,random:Tc,rotate:Cc,round:Kc,scale:Sc,scaleAndAdd:Is,set:Vc,sqrDist:vc,sqrLen:wc,squaredDistance:Ps,squaredLength:Bs,str:Jc,sub:kc,subtract:q,transformMat2:vs,transformMat2d:ws,transformMat3:sl,transformMat4:el,zero:Nc},Symbol.toStringTag,{value:"Module"}));function Us(n,t,l){const s=t[0],e=t[1],d=l[3]*s+l[7]*e||1;return n[0]=(l[0]*s+l[4]*e)/d,n[1]=(l[1]*s+l[5]*e)/d,n}function js(n,t,l){const s=t[0],e=t[1],d=t[2],i=l[3]*s+l[7]*e+l[11]*d||1;return n[0]=(l[0]*s+l[4]*e+l[8]*d)/i,n[1]=(l[1]*s+l[5]*e+l[9]*d)/i,n[2]=(l[2]*s+l[6]*e+l[10]*d)/i,n}function Ec(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[2]*e,n[1]=l[1]*s+l[3]*e,n[2]=t[2],n}function Oc(n,t,l){const s=t[0],e=t[1];return n[0]=l[0]*s+l[2]*e,n[1]=l[1]*s+l[3]*e,n[2]=t[2],n[3]=t[3],n}function Es(n,t,l){const s=t[0],e=t[1],d=t[2];return n[0]=l[0]*s+l[3]*e+l[6]*d,n[1]=l[1]*s+l[4]*e+l[7]*d,n[2]=l[2]*s+l[5]*e+l[8]*d,n[3]=t[3],n}class it extends ll{constructor(t=0,l=0){super(2),ht(t)&&arguments.length===1?this.copy(t):(w.debug&&(C(t),C(l)),this[0]=t,this[1]=l)}set(t,l){return this[0]=t,this[1]=l,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return w.debug&&(C(t.x),C(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return el(this,this,t),this.check()}transformAsVector(t){return Us(this,this,t),this.check()}transformByMatrix3(t){return sl(this,this,t),this.check()}transformByMatrix2x3(t){return ws(this,this,t),this.check()}transformByMatrix2(t){return vs(this,this,t),this.check()}}function il(){const n=new B(3);return B!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function Ac(n){const t=new B(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function Gn(n){const t=n[0],l=n[1],s=n[2];return Math.sqrt(t*t+l*l+s*s)}function cl(n,t,l){const s=new B(3);return s[0]=n,s[1]=t,s[2]=l,s}function Dc(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function _c(n,t,l,s){return n[0]=t,n[1]=l,n[2]=s,n}function qc(n,t,l){return n[0]=t[0]+l[0],n[1]=t[1]+l[1],n[2]=t[2]+l[2],n}function bl(n,t,l){return n[0]=t[0]-l[0],n[1]=t[1]-l[1],n[2]=t[2]-l[2],n}function Os(n,t,l){return n[0]=t[0]*l[0],n[1]=t[1]*l[1],n[2]=t[2]*l[2],n}function As(n,t,l){return n[0]=t[0]/l[0],n[1]=t[1]/l[1],n[2]=t[2]/l[2],n}function $c(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n[2]=Math.ceil(t[2]),n}function t0(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n[2]=Math.floor(t[2]),n}function n0(n,t,l){return n[0]=Math.min(t[0],l[0]),n[1]=Math.min(t[1],l[1]),n[2]=Math.min(t[2],l[2]),n}function l0(n,t,l){return n[0]=Math.max(t[0],l[0]),n[1]=Math.max(t[1],l[1]),n[2]=Math.max(t[2],l[2]),n}function s0(n,t){return n[0]=dt(t[0]),n[1]=dt(t[1]),n[2]=dt(t[2]),n}function Ds(n,t,l){return n[0]=t[0]*l,n[1]=t[1]*l,n[2]=t[2]*l,n}function e0(n,t,l,s){return n[0]=t[0]+l[0]*s,n[1]=t[1]+l[1]*s,n[2]=t[2]+l[2]*s,n}function _s(n,t){const l=t[0]-n[0],s=t[1]-n[1],e=t[2]-n[2];return Math.sqrt(l*l+s*s+e*e)}function qs(n,t){const l=t[0]-n[0],s=t[1]-n[1],e=t[2]-n[2];return l*l+s*s+e*e}function $s(n){const t=n[0],l=n[1],s=n[2];return t*t+l*l+s*s}function d0(n,t){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n}function i0(n,t){return n[0]=1/t[0],n[1]=1/t[1],n[2]=1/t[2],n}function te(n,t){const l=t[0],s=t[1],e=t[2];let d=l*l+s*s+e*e;return d>0&&(d=1/Math.sqrt(d)),n[0]=t[0]*d,n[1]=t[1]*d,n[2]=t[2]*d,n}function jt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Kt(n,t,l){const s=t[0],e=t[1],d=t[2],i=l[0],c=l[1],o=l[2];return n[0]=e*o-d*c,n[1]=d*i-s*o,n[2]=s*c-e*i,n}function c0(n,t,l,s){const e=t[0],d=t[1],i=t[2];return n[0]=e+s*(l[0]-e),n[1]=d+s*(l[1]-d),n[2]=i+s*(l[2]-i),n}function b0(n,t,l,s){const e=Math.acos(Math.min(Math.max(jt(t,l),-1),1)),d=Math.sin(e),i=Math.sin((1-s)*e)/d,c=Math.sin(s*e)/d;return n[0]=i*t[0]+c*l[0],n[1]=i*t[1]+c*l[1],n[2]=i*t[2]+c*l[2],n}function o0(n,t,l,s,e,d){const i=d*d,c=i*(2*d-3)+1,o=i*(d-2)+d,a=i*(d-1),u=i*(3-2*d);return n[0]=t[0]*c+l[0]*o+s[0]*a+e[0]*u,n[1]=t[1]*c+l[1]*o+s[1]*a+e[1]*u,n[2]=t[2]*c+l[2]*o+s[2]*a+e[2]*u,n}function a0(n,t,l,s,e,d){const i=1-d,c=i*i,o=d*d,a=c*i,u=3*d*c,X=3*o*i,r=o*d;return n[0]=t[0]*a+l[0]*u+s[0]*X+e[0]*r,n[1]=t[1]*a+l[1]*u+s[1]*X+e[1]*r,n[2]=t[2]*a+l[2]*u+s[2]*X+e[2]*r,n}function u0(n,t){t=t===void 0?1:t;const l=mt()*2*Math.PI,s=mt()*2-1,e=Math.sqrt(1-s*s)*t;return n[0]=Math.cos(l)*e,n[1]=Math.sin(l)*e,n[2]=s*t,n}function Wn(n,t,l){const s=t[0],e=t[1],d=t[2];let i=l[3]*s+l[7]*e+l[11]*d+l[15];return i=i||1,n[0]=(l[0]*s+l[4]*e+l[8]*d+l[12])/i,n[1]=(l[1]*s+l[5]*e+l[9]*d+l[13])/i,n[2]=(l[2]*s+l[6]*e+l[10]*d+l[14])/i,n}function ol(n,t,l){const s=t[0],e=t[1],d=t[2];return n[0]=s*l[0]+e*l[3]+d*l[6],n[1]=s*l[1]+e*l[4]+d*l[7],n[2]=s*l[2]+e*l[5]+d*l[8],n}function al(n,t,l){const s=l[0],e=l[1],d=l[2],i=l[3],c=t[0],o=t[1],a=t[2];let u=e*a-d*o,X=d*c-s*a,r=s*o-e*c,m=e*r-d*X,Z=d*u-s*r,W=s*X-e*u;const G=i*2;return u*=G,X*=G,r*=G,m*=2,Z*=2,W*=2,n[0]=c+u+m,n[1]=o+X+Z,n[2]=a+r+W,n}function ne(n,t,l,s){const e=[],d=[];return e[0]=t[0]-l[0],e[1]=t[1]-l[1],e[2]=t[2]-l[2],d[0]=e[0],d[1]=e[1]*Math.cos(s)-e[2]*Math.sin(s),d[2]=e[1]*Math.sin(s)+e[2]*Math.cos(s),n[0]=d[0]+l[0],n[1]=d[1]+l[1],n[2]=d[2]+l[2],n}function le(n,t,l,s){const e=[],d=[];return e[0]=t[0]-l[0],e[1]=t[1]-l[1],e[2]=t[2]-l[2],d[0]=e[2]*Math.sin(s)+e[0]*Math.cos(s),d[1]=e[1],d[2]=e[2]*Math.cos(s)-e[0]*Math.sin(s),n[0]=d[0]+l[0],n[1]=d[1]+l[1],n[2]=d[2]+l[2],n}function se(n,t,l,s){const e=[],d=[];return e[0]=t[0]-l[0],e[1]=t[1]-l[1],e[2]=t[2]-l[2],d[0]=e[0]*Math.cos(s)-e[1]*Math.sin(s),d[1]=e[0]*Math.sin(s)+e[1]*Math.cos(s),d[2]=e[2],n[0]=d[0]+l[0],n[1]=d[1]+l[1],n[2]=d[2]+l[2],n}function ee(n,t){const l=n[0],s=n[1],e=n[2],d=t[0],i=t[1],c=t[2],o=Math.sqrt((l*l+s*s+e*e)*(d*d+i*i+c*c)),a=o&&jt(n,t)/o;return Math.acos(Math.min(Math.max(a,-1),1))}function X0(n){return n[0]=0,n[1]=0,n[2]=0,n}function r0(n){return`vec3(${n[0]}, ${n[1]}, ${n[2]})`}function h0(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function m0(n,t){const l=n[0],s=n[1],e=n[2],d=t[0],i=t[1],c=t[2];return Math.abs(l-d)<=F*Math.max(1,Math.abs(l),Math.abs(d))&&Math.abs(s-i)<=F*Math.max(1,Math.abs(s),Math.abs(i))&&Math.abs(e-c)<=F*Math.max(1,Math.abs(e),Math.abs(c))}const Z0=bl,G0=Os,W0=As,p0=_s,V0=qs,de=Gn,y0=$s,L0=function(){const n=il();return function(t,l,s,e,d,i){let c,o;for(l||(l=3),s||(s=0),e?o=Math.min(e*l+s,t.length):o=t.length,c=s;c<o;c+=l)n[0]=t[c],n[1]=t[c+1],n[2]=t[c+2],d(n,n,i),t[c]=n[0],t[c+1]=n[1],t[c+2]=n[2];return t}}(),x0=Object.freeze(Object.defineProperty({__proto__:null,add:qc,angle:ee,bezier:a0,ceil:$c,clone:Ac,copy:Dc,create:il,cross:Kt,dist:p0,distance:_s,div:W0,divide:As,dot:jt,equals:m0,exactEquals:h0,floor:t0,forEach:L0,fromValues:cl,hermite:o0,inverse:i0,len:de,length:Gn,lerp:c0,max:l0,min:n0,mul:G0,multiply:Os,negate:d0,normalize:te,random:u0,rotateX:ne,rotateY:le,rotateZ:se,round:s0,scale:Ds,scaleAndAdd:e0,set:_c,slerp:b0,sqrDist:V0,sqrLen:y0,squaredDistance:qs,squaredLength:$s,str:r0,sub:Z0,subtract:bl,transformMat3:ol,transformMat4:Wn,transformQuat:al,zero:X0},Symbol.toStringTag,{value:"Module"})),ul=[0,0,0];let pn;class N extends ll{static get ZERO(){return pn||(pn=new N(0,0,0),Object.freeze(pn)),pn}constructor(t=0,l=0,s=0){super(-0,-0,-0),arguments.length===1&&ht(t)?this.copy(t):(w.debug&&(C(t),C(l),C(s)),this[0]=t,this[1]=l,this[2]=s)}set(t,l,s){return this[0]=t,this[1]=l,this[2]=s,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return w.debug&&(C(t.x),C(t.y),C(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=C(t)}angle(t){return ee(this,t)}cross(t){return Kt(this,this,t),this.check()}rotateX({radians:t,origin:l=ul}){return ne(this,this,l,t),this.check()}rotateY({radians:t,origin:l=ul}){return le(this,this,l,t),this.check()}rotateZ({radians:t,origin:l=ul}){return se(this,this,l,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return Wn(this,this,t),this.check()}transformAsVector(t){return js(this,this,t),this.check()}transformByMatrix3(t){return ol(this,this,t),this.check()}transformByMatrix2(t){return Ec(this,this,t),this.check()}transformByQuaternion(t){return al(this,this,t),this.check()}}let Vn;class bt extends ll{static get ZERO(){return Vn||(Vn=new bt(0,0,0,0),Object.freeze(Vn)),Vn}constructor(t=0,l=0,s=0,e=0){super(-0,-0,-0,-0),ht(t)&&arguments.length===1?this.copy(t):(w.debug&&(C(t),C(l),C(s),C(e)),this[0]=t,this[1]=l,this[2]=s,this[3]=e)}set(t,l,s,e){return this[0]=t,this[1]=l,this[2]=s,this[3]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return w.debug&&(C(t.x),C(t.y),C(t.z),C(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=C(t)}get w(){return this[3]}set w(t){this[3]=C(t)}transform(t){return Wn(this,this,t),this.check()}transformByMatrix3(t){return Es(this,this,t),this.check()}transformByMatrix2(t){return Oc(this,this,t),this.check()}transformByQuaternion(t){return al(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}let ie=class extends Zn{toString(){let t="[";if(w.printRowMajor){t+="row-major:";for(let l=0;l<this.RANK;++l)for(let s=0;s<this.RANK;++s)t+=` ${this[s*this.RANK+l]}`}else{t+="column-major:";for(let l=0;l<this.ELEMENTS;++l)t+=` ${this[l]}`}return t+="]",t}getElementIndex(t,l){return l*this.RANK+t}getElement(t,l){return this[l*this.RANK+t]}setElement(t,l,s){return this[l*this.RANK+t]=C(s),this}getColumn(t,l=new Array(this.RANK).fill(-0)){const s=t*this.RANK;for(let e=0;e<this.RANK;++e)l[e]=this[s+e];return l}setColumn(t,l){const s=t*this.RANK;for(let e=0;e<this.RANK;++e)this[s+e]=l[e];return this}};function ce(){const n=new B(9);return B!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function R0(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n}function K0(n){const t=new B(9);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function S0(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function z0(n,t,l,s,e,d,i,c,o){const a=new B(9);return a[0]=n,a[1]=t,a[2]=l,a[3]=s,a[4]=e,a[5]=d,a[6]=i,a[7]=c,a[8]=o,a}function Y0(n,t,l,s,e,d,i,c,o,a){return n[0]=t,n[1]=l,n[2]=s,n[3]=e,n[4]=d,n[5]=i,n[6]=c,n[7]=o,n[8]=a,n}function M0(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=1,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function Xl(n,t){if(n===t){const l=t[1],s=t[2],e=t[5];n[1]=t[3],n[2]=t[6],n[3]=l,n[5]=t[7],n[6]=s,n[7]=e}else n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8];return n}function rl(n,t){const l=t[0],s=t[1],e=t[2],d=t[3],i=t[4],c=t[5],o=t[6],a=t[7],u=t[8],X=u*i-c*a,r=-u*d+c*o,m=a*d-i*o;let Z=l*X+s*r+e*m;return Z?(Z=1/Z,n[0]=X*Z,n[1]=(-u*s+e*a)*Z,n[2]=(c*s-e*i)*Z,n[3]=r*Z,n[4]=(u*l-e*o)*Z,n[5]=(-c*l+e*d)*Z,n[6]=m*Z,n[7]=(-a*l+s*o)*Z,n[8]=(i*l-s*d)*Z,n):null}function g0(n,t){const l=t[0],s=t[1],e=t[2],d=t[3],i=t[4],c=t[5],o=t[6],a=t[7],u=t[8];return n[0]=i*u-c*a,n[1]=e*a-s*u,n[2]=s*c-e*i,n[3]=c*o-d*u,n[4]=l*u-e*o,n[5]=e*d-l*c,n[6]=d*a-i*o,n[7]=s*o-l*a,n[8]=l*i-s*d,n}function hl(n){const t=n[0],l=n[1],s=n[2],e=n[3],d=n[4],i=n[5],c=n[6],o=n[7],a=n[8];return t*(a*d-i*o)+l*(-a*e+i*c)+s*(o*e-d*c)}function yn(n,t,l){const s=t[0],e=t[1],d=t[2],i=t[3],c=t[4],o=t[5],a=t[6],u=t[7],X=t[8],r=l[0],m=l[1],Z=l[2],W=l[3],G=l[4],p=l[5],L=l[6],V=l[7],y=l[8];return n[0]=r*s+m*i+Z*a,n[1]=r*e+m*c+Z*u,n[2]=r*d+m*o+Z*X,n[3]=W*s+G*i+p*a,n[4]=W*e+G*c+p*u,n[5]=W*d+G*o+p*X,n[6]=L*s+V*i+y*a,n[7]=L*e+V*c+y*u,n[8]=L*d+V*o+y*X,n}function be(n,t,l){const s=t[0],e=t[1],d=t[2],i=t[3],c=t[4],o=t[5],a=t[6],u=t[7],X=t[8],r=l[0],m=l[1];return n[0]=s,n[1]=e,n[2]=d,n[3]=i,n[4]=c,n[5]=o,n[6]=r*s+m*i+a,n[7]=r*e+m*c+u,n[8]=r*d+m*o+X,n}function oe(n,t,l){const s=t[0],e=t[1],d=t[2],i=t[3],c=t[4],o=t[5],a=t[6],u=t[7],X=t[8],r=Math.sin(l),m=Math.cos(l);return n[0]=m*s+r*i,n[1]=m*e+r*c,n[2]=m*d+r*o,n[3]=m*i-r*s,n[4]=m*c-r*e,n[5]=m*o-r*d,n[6]=a,n[7]=u,n[8]=X,n}function ml(n,t,l){const s=l[0],e=l[1];return n[0]=s*t[0],n[1]=s*t[1],n[2]=s*t[2],n[3]=e*t[3],n[4]=e*t[4],n[5]=e*t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function f0(n,t){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=1,n[5]=0,n[6]=t[0],n[7]=t[1],n[8]=1,n}function T0(n,t){const l=Math.sin(t),s=Math.cos(t);return n[0]=s,n[1]=l,n[2]=0,n[3]=-l,n[4]=s,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function C0(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=t[1],n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function F0(n,t){return n[0]=t[0],n[1]=t[1],n[2]=0,n[3]=t[2],n[4]=t[3],n[5]=0,n[6]=t[4],n[7]=t[5],n[8]=1,n}function ae(n,t){const l=t[0],s=t[1],e=t[2],d=t[3],i=l+l,c=s+s,o=e+e,a=l*i,u=s*i,X=s*c,r=e*i,m=e*c,Z=e*o,W=d*i,G=d*c,p=d*o;return n[0]=1-X-Z,n[3]=u-p,n[6]=r+G,n[1]=u+p,n[4]=1-a-Z,n[7]=m-W,n[2]=r-G,n[5]=m+W,n[8]=1-a-X,n}function Zl(n,t){const l=t[0],s=t[1],e=t[2],d=t[3],i=t[4],c=t[5],o=t[6],a=t[7],u=t[8],X=t[9],r=t[10],m=t[11],Z=t[12],W=t[13],G=t[14],p=t[15],L=l*c-s*i,V=l*o-e*i,y=l*a-d*i,R=s*o-e*c,x=s*a-d*c,f=e*a-d*o,M=u*W-X*Z,g=u*G-r*Z,z=u*p-m*Z,J=X*G-r*W,H=X*p-m*W,I=r*p-m*G;let T=L*I-V*H+y*J+R*z-x*g+f*M;return T?(T=1/T,n[0]=(c*I-o*H+a*J)*T,n[1]=(o*z-i*I-a*g)*T,n[2]=(i*H-c*z+a*M)*T,n[3]=(e*H-s*I-d*J)*T,n[4]=(l*I-e*z+d*g)*T,n[5]=(s*z-l*H-d*M)*T,n[6]=(W*f-G*x+p*R)*T,n[7]=(G*y-Z*f-p*V)*T,n[8]=(Z*x-W*y+p*L)*T,n):null}function N0(n,t,l){return n[0]=2/t,n[1]=0,n[2]=0,n[3]=0,n[4]=-2/l,n[5]=0,n[6]=-1,n[7]=1,n[8]=1,n}function J0(n){return`mat3(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]}, ${n[4]}, ${n[5]}, ${n[6]}, ${n[7]}, ${n[8]})`}function H0(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]+n[3]*n[3]+n[4]*n[4]+n[5]*n[5]+n[6]*n[6]+n[7]*n[7]+n[8]*n[8])}function I0(n,t,l){return n[0]=t[0]+l[0],n[1]=t[1]+l[1],n[2]=t[2]+l[2],n[3]=t[3]+l[3],n[4]=t[4]+l[4],n[5]=t[5]+l[5],n[6]=t[6]+l[6],n[7]=t[7]+l[7],n[8]=t[8]+l[8],n}function ue(n,t,l){return n[0]=t[0]-l[0],n[1]=t[1]-l[1],n[2]=t[2]-l[2],n[3]=t[3]-l[3],n[4]=t[4]-l[4],n[5]=t[5]-l[5],n[6]=t[6]-l[6],n[7]=t[7]-l[7],n[8]=t[8]-l[8],n}function k0(n,t,l){return n[0]=t[0]*l,n[1]=t[1]*l,n[2]=t[2]*l,n[3]=t[3]*l,n[4]=t[4]*l,n[5]=t[5]*l,n[6]=t[6]*l,n[7]=t[7]*l,n[8]=t[8]*l,n}function P0(n,t,l,s){return n[0]=t[0]+l[0]*s,n[1]=t[1]+l[1]*s,n[2]=t[2]+l[2]*s,n[3]=t[3]+l[3]*s,n[4]=t[4]+l[4]*s,n[5]=t[5]+l[5]*s,n[6]=t[6]+l[6]*s,n[7]=t[7]+l[7]*s,n[8]=t[8]+l[8]*s,n}function Q0(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]}function B0(n,t){const l=n[0],s=n[1],e=n[2],d=n[3],i=n[4],c=n[5],o=n[6],a=n[7],u=n[8],X=t[0],r=t[1],m=t[2],Z=t[3],W=t[4],G=t[5],p=t[6],L=t[7],V=t[8];return Math.abs(l-X)<=F*Math.max(1,Math.abs(l),Math.abs(X))&&Math.abs(s-r)<=F*Math.max(1,Math.abs(s),Math.abs(r))&&Math.abs(e-m)<=F*Math.max(1,Math.abs(e),Math.abs(m))&&Math.abs(d-Z)<=F*Math.max(1,Math.abs(d),Math.abs(Z))&&Math.abs(i-W)<=F*Math.max(1,Math.abs(i),Math.abs(W))&&Math.abs(c-G)<=F*Math.max(1,Math.abs(c),Math.abs(G))&&Math.abs(o-p)<=F*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-L)<=F*Math.max(1,Math.abs(a),Math.abs(L))&&Math.abs(u-V)<=F*Math.max(1,Math.abs(u),Math.abs(V))}const v0=Object.freeze(Object.defineProperty({__proto__:null,add:I0,adjoint:g0,clone:K0,copy:S0,create:ce,determinant:hl,equals:B0,exactEquals:Q0,frob:H0,fromMat2d:F0,fromMat4:R0,fromQuat:ae,fromRotation:T0,fromScaling:C0,fromTranslation:f0,fromValues:z0,identity:M0,invert:rl,mul:yn,multiply:yn,multiplyScalar:k0,multiplyScalarAndAdd:P0,normalFromMat4:Zl,projection:N0,rotate:oe,scale:ml,set:Y0,str:J0,sub:ue,subtract:ue,translate:be,transpose:Xl},Symbol.toStringTag,{value:"Module"}));var Gl;(function(n){n[n.COL0ROW0=0]="COL0ROW0",n[n.COL0ROW1=1]="COL0ROW1",n[n.COL0ROW2=2]="COL0ROW2",n[n.COL1ROW0=3]="COL1ROW0",n[n.COL1ROW1=4]="COL1ROW1",n[n.COL1ROW2=5]="COL1ROW2",n[n.COL2ROW0=6]="COL2ROW0",n[n.COL2ROW1=7]="COL2ROW1",n[n.COL2ROW2=8]="COL2ROW2"})(Gl||(Gl={}));const w0=Object.freeze([1,0,0,0,1,0,0,0,1]);class St extends ie{static get IDENTITY(){return j0()}static get ZERO(){return U0()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){r