@arcgis/core 6.0.0-next.19 → 6.0.0-next.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{e4af2a1ea01df7226ace.js → 3c277a0f099d67090d07.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{eebbde81e56d69dc602f.js → 44f90e75c1dc3d726a95.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{94baa354e50c03b82b25.js → 597db9c90f19092d8d66.js} +1 -1
  5. package/assets/esri/core/workers/chunks/768389f7f8dba6080df7.js +2 -0
  6. package/assets/esri/core/workers/chunks/{ae0563d573baf91e01f7.js → 8e4206068c6953bb7df2.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{bc0f54a2c15502b630ec.js → 949bee7b304e625a7891.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d62afb71f4ece4283994.js → 9bc3afe7013ef4ae737b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{f1df76f098a3cc924832.js → b5df193c93e9c19f9700.js} +1 -1
  10. package/assets/esri/core/workers/chunks/d678828726371243d5eb.js +1 -0
  11. package/assets/esri/core/workers/chunks/{02f8654852d389583891.js → e04fb83ab2634bc15cc7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/e35641a3a4da8cfbcf54.js +1 -0
  13. package/assets/esri/core/workers/chunks/{f3cd610084e3f4d8656b.js → fc76aff0f7d95e517d8f.js} +1 -1
  14. package/config.js +1 -1
  15. package/core/mapCollectionUtils.js +1 -1
  16. package/form/elements.d.ts +46 -8
  17. package/form/elements.js +1 -1
  18. package/geometry/support/Indices.js +1 -1
  19. package/geometry/support/aaBoundingRect.js +1 -1
  20. package/geometry/support/ray.js +1 -1
  21. package/kernel.js +1 -1
  22. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  23. package/package.json +3 -3
  24. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  25. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  26. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  27. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  28. package/views/3d/input/SceneInputManager.js +1 -1
  29. package/views/3d/input/handlers/DragZoom.js +1 -1
  30. package/views/3d/input/handlers/MouseWheelFov.js +1 -1
  31. package/views/3d/layers/graphics/extrudePolygon.js +1 -1
  32. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  33. package/views/3d/layers/support/FeatureTile.js +1 -1
  34. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  35. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  36. package/views/3d/state/controllers/FovController.js +1 -1
  37. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  38. package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
  39. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  40. package/views/3d/terrain/PatchRenderData.js +1 -1
  41. package/views/3d/terrain/TextureReference.js +1 -1
  42. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  43. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  44. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  45. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  46. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  47. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  48. package/views/DOMContainer.d.ts +8 -6
  49. package/views/VideoView.d.ts +8 -6
  50. package/views/View.d.ts +4 -3
  51. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  52. package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
  53. package/views/interactive/editGeometry/operations/ScaleVertex.js +1 -1
  54. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  55. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  56. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +3 -0
  57. package/widgets/ScaleRangeSlider/types.d.ts +3 -3
  58. package/widgets/Search/LocatorSearchSource.d.ts +22 -1
  59. package/widgets/support/SelectionList/GroupLayerItem.d.ts +2 -0
  60. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  61. package/widgets/support/SelectionList/ItemBase.d.ts +2 -0
  62. package/widgets/support/SelectionList/ItemBase.js +1 -1
  63. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  64. package/widgets/support/SelectionList.js +1 -1
  65. package/assets/esri/core/workers/chunks/792c90a67e63b98394c8.js +0 -1
  66. package/assets/esri/core/workers/chunks/b686cd74975da09b9c91.js +0 -2
  67. package/assets/esri/core/workers/chunks/f91bc1cb1014e05be763.js +0 -1
  68. /package/assets/esri/core/workers/chunks/{b686cd74975da09b9c91.js.LICENSE.txt → 768389f7f8dba6080df7.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[491],{32198(t,e,n){function r(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function i(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function a(t){function e(e){t.error=t.hasError?new o(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function i(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(t){return e(t),i()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},4341(t,e,n){n.d(e,{I:()=>i});var r=n(26390);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,a,s,u){return[t,e,n,r,i,o,a,s,u]}n.d(e,{fA:()=>i,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M){return[t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},82534(t,e,n){function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},77690(t,e,n){n.d(e,{B8:()=>s,Ge:()=>d,I0:()=>f,KC:()=>u,a4:()=>h,hZ:()=>o,hs:()=>l,lw:()=>c,mg:()=>a,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,a,s,u,h){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t}function a(t,e){if(t===e){let n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;return m?(m=1/m,t[0]=l*m,t[1]=(-c*r+i*h)*m,t[2]=(s*r-i*a)*m,t[3]=f*m,t[4]=(c*n-i*u)*m,t[5]=(-s*n+i*o)*m,t[6]=d*m,t[7]=(-h*n+r*u)*m,t[8]=(a*n-r*o)*m,t):null}function u(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8];return t[0]=a*c-s*h,t[1]=i*h-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*h-a*u,t[7]=r*u-n*h,t[8]=n*a-r*o,t}function h(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8];return e*(h*o-a*u)+n*(-h*i+a*s)+r*(u*i-o*s)}function c(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=f*r+d*a+m*h,t[1]=f*i+d*s+m*c,t[2]=f*o+d*u+m*l,t[3]=M*r+b*a+g*h,t[4]=M*i+b*s+g*c,t[5]=M*o+b*u+g*l,t[6]=_*r+p*a+v*h,t[7]=_*i+p*s+v*c,t[8]=_*o+p*u+v*l,t}function l(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function f(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[3]=c-g,t[6]=f+b,t[1]=c+g,t[4]=1-h-m,t[7]=d-M,t[2]=f-b,t[5]=d+M,t[8]=1-h-l,t}function d(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(u*j-a*q-h*A)*C,t[2]=(a*T-s*j+h*w)*C,t[3]=(i*T-r*q-o*O)*C,t[4]=(n*q-i*j+o*A)*C,t[5]=(r*j-n*T-o*w)*C,t[6]=(M*S-b*y+g*x)*C,t[7]=(b*v-m*S-g*p)*C,t[8]=(m*y-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=c,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:h,equals:function(t,e){let n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],x=(0,r.FD)();return Math.abs(n-f)<=x*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-d)<=x*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-b)<=x*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-g)<=x*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-_)<=x*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(l-v)<=x*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:function(t){let e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e},mul:M,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;if(!m)return null;let M=1/m;return t[0]=l*M,t[1]=(-c*r+i*h)*M,t[2]=(s*r-i*a)*M,t[3]=f*M,t[4]=(c*n-i*u)*M,t[5]=(-s*n+i*o)*M,t[6]=d*M,t[7]=(-h*n+r*u)*M,t[8]=(a*n-r*o)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=h,t[7]=c,t[8]=l,t},scale:l,scaleByVec2:function(t,e,n){let r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+h,t[7]=f*i+d*s+c,t[8]=f*o+d*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>O,B8:()=>c,C:()=>o,D_:()=>s,N9:()=>p,O7:()=>j,Qw:()=>h,Tl:()=>f,X_:()=>S,e$:()=>m,eL:()=>M,hM:()=>_,hZ:()=>a,hs:()=>d,kN:()=>b,l:()=>w,lw:()=>l,mg:()=>u,o1:()=>A,sC:()=>y,t2:()=>C,t5:()=>T,tZ:()=>E,ut:()=>R});var r=n(51850),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){let n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function h(t,e){return c(t,e)||s(t),t}function c(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(i*T-r*q-o*O)*C,t[2]=(M*S-b*y+g*x)*C,t[3]=(f*y-l*S-d*x)*C,t[4]=(u*j-a*q-h*A)*C,t[5]=(n*q-i*j+o*A)*C,t[6]=(b*v-m*S-g*p)*C,t[7]=(c*S-f*v+d*p)*C,t[8]=(a*T-s*j+h*w)*C,t[9]=(r*j-n*T-o*w)*C,t[10]=(m*y-M*v+g*_)*C,t[11]=(l*v-c*y-d*_)*C,t[12]=(s*A-a*O-u*w)*C,t[13]=(n*O-r*A+i*w)*C,t[14]=(M*p-m*x-b*_)*C,t[15]=(c*x-l*p+f*_)*C,t):null}function l(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15],p=n[0],v=n[1],x=n[2],y=n[3];return t[0]=p*r+v*s+x*l+y*M,t[1]=p*i+v*u+x*f+y*b,t[2]=p*o+v*h+x*d+y*g,t[3]=p*a+v*c+x*m+y*_,p=n[4],v=n[5],x=n[6],y=n[7],t[4]=p*r+v*s+x*l+y*M,t[5]=p*i+v*u+x*f+y*b,t[6]=p*o+v*h+x*d+y*g,t[7]=p*a+v*c+x*m+y*_,p=n[8],v=n[9],x=n[10],y=n[11],t[8]=p*r+v*s+x*l+y*M,t[9]=p*i+v*u+x*f+y*b,t[10]=p*o+v*h+x*d+y*g,t[11]=p*a+v*c+x*m+y*_,p=n[12],v=n[13],x=n[14],y=n[15],t[12]=p*r+v*s+x*l+y*M,t[13]=p*i+v*u+x*f+y*b,t[14]=p*o+v*h+x*d+y*g,t[15]=p*a+v*c+x*m+y*_,t}function f(t,e,n){let r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{let n=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=h,t[5]=c,t[6]=l,t[7]=f,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+h*i+d*o+e[12],t[13]=a*r+c*i+m*o+e[13],t[14]=s*r+l*i+M*o+e[14],t[15]=u*r+f*i+b*o+e[15]}return t}function d(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function m(t,e,n,r){let a=r[0],s=r[1],u=r[2],h=Math.sqrt(a*a+s*s+u*u);if(h<=(0,i.FD)())return void o(t,e);h=1/h,a*=h,s*=h,u*=h;let c=Math.sin(n),l=Math.cos(n),f=1-l,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],x=e[8],y=e[9],S=e[10],w=e[11],A=a*a*f+l,j=s*a*f+u*c,O=u*a*f-s*c,T=a*s*f-u*c,q=s*s*f+l,C=u*s*f+a*c,R=a*u*f+s*c,E=s*u*f-a*c,P=u*u*f+l;t[0]=d*A+g*j+x*O,t[1]=m*A+_*j+y*O,t[2]=M*A+p*j+S*O,t[3]=b*A+v*j+w*O,t[4]=d*T+g*q+x*C,t[5]=m*T+_*q+y*C,t[6]=M*T+p*q+S*C,t[7]=b*T+v*q+w*C,t[8]=d*R+g*E+x*P,t[9]=m*R+_*E+y*P,t[10]=M*R+p*E+S*P,t[11]=b*R+v*E+w*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function M(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+h*r,t[5]=a*i+c*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=h*i-o*r,t[9]=c*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function b(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return s(t);let r=n[0],o=n[1],a=n[2],u=Math.sqrt(r*r+o*o+a*a);if(u<=(0,i.FD)())return null;u=1/u,r*=u,o*=u,a*=u;let h=Math.sin(e),c=Math.cos(e),l=1-c;return t[0]=r*r*l+c,t[1]=o*r*l+a*h,t[2]=a*r*l-o*h,t[3]=0,t[4]=r*o*l-a*h,t[5]=o*o*l+c,t[6]=a*o*l+r*h,t[7]=0,t[8]=r*a*l+o*h,t[9]=o*a*l-r*h,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,h=o+o,c=r*s,l=r*u,f=r*h,d=i*u,m=i*h,M=o*h,b=a*s,g=a*u,_=a*h;return t[0]=1-(d+M),t[1]=l+_,t[2]=f-g,t[3]=0,t[4]=l-_,t[5]=1-(c+M),t[6]=m+b,t[7]=0,t[8]=f+g,t[9]=m-b,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+h*h+c*c),t}function w(t,e){let n=e[0]+e[5]+e[10],r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function A(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,m=o*h,M=o*c,b=a*c,g=s*u,_=s*h,p=s*c,v=r[0],x=r[1],y=r[2];return t[0]=(1-(m+b))*v,t[1]=(f+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(f-p)*x,t[5]=(1-(l+b))*x,t[6]=(M+g)*x,t[7]=0,t[8]=(d+_)*y,t[9]=(M-g)*y,t[10]=(1-(l+m))*y,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function j(t,e,n,r,i){let o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,m=o*l,M=a*c,b=a*l,g=s*l,_=u*h,p=u*c,v=u*l,x=r[0],y=r[1],S=r[2],w=i[0],A=i[1],j=i[2],O=(1-(M+g))*x,T=(d+v)*x,q=(m-p)*x,C=(d-v)*y,R=(1-(f+g))*y,E=(b+_)*y,P=(m+p)*S,I=(b-_)*S,z=(1-(f+M))*S;return t[0]=O,t[1]=T,t[2]=q,t[3]=0,t[4]=C,t[5]=R,t[6]=E,t[7]=0,t[8]=P,t[9]=I,t[10]=z,t[11]=0,t[12]=n[0]+w-(O*w+C*A+P*j),t[13]=n[1]+A-(T*w+R*A+I*j),t[14]=n[2]+j-(q*w+E*A+z*j),t[15]=1,t}function O(t,e,n,r,i,o,a){let s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function T(t,e,n,r){let o=e[0],a=e[1],u=e[2],h=o-n[0],c=a-n[1],l=u-n[2],f=(0,i.FD)();if(Math.abs(h)<f&&Math.abs(c)<f&&Math.abs(l)<f)return void s(t);let d=1/Math.sqrt(h*h+c*c+l*l);h*=d,c*=d,l*=d;let m=r[0],M=r[1],b=r[2],g=M*l-b*c,_=b*h-m*l,p=m*c-M*h;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=c*p-l*_,x=l*g-h*p,y=h*_-c*g;d=Math.sqrt(v*v+x*x+y*y),d?(d=1/d,v*=d,x*=d,y*=d):(v=0,x=0,y=0),t[0]=g,t[1]=v,t[2]=h,t[3]=0,t[4]=_,t[5]=x,t[6]=c,t[7]=0,t[8]=p,t[9]=y,t[10]=l,t[11]=0,t[12]=-(g*o+_*a+p*u),t[13]=-(v*o+x*a+y*u),t[14]=-(h*o+c*a+l*u),t[15]=1}function q(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function R(t){let e=(0,i.FD)(),n=t[0],r=t[1],o=t[2],a=t[4],s=t[5],u=t[6],h=t[8],c=t[9],l=t[10];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(r*r+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e}function E(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const P=l,I=q;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=s*(f*g-d*b)-l*(u*g-h*b)+M*(u*d-h*f),t[1]=-(r*(f*g-d*b)-l*(i*g-o*b)+M*(i*d-o*f)),t[2]=r*(u*g-h*b)-s*(i*g-o*b)+M*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*b)-c*(u*g-h*b)+m*(u*d-h*f)),t[5]=n*(f*g-d*b)-c*(i*g-o*b)+m*(i*d-o*f),t[6]=-(n*(u*g-h*b)-a*(i*g-o*b)+m*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*M)-c*(s*g-h*M)+m*(s*d-h*l),t[9]=-(n*(l*g-d*M)-c*(r*g-o*M)+m*(r*d-o*l)),t[10]=n*(s*g-h*M)-a*(r*g-o*M)+m*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*b-f*M)-c*(s*b-u*M)+m*(s*f-u*l)),t[13]=n*(l*b-f*M)-c*(r*b-i*M)+m*(r*f-i*l),t[14]=-(n*(s*b-u*M)-a*(r*b-i*M)+m*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},copy:o,determinant:function(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8],c=t[9],l=t[10],f=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*a-n*o)*(l*b-f*M)-(e*s-r*o)*(c*b-f*m)+(e*u-i*o)*(c*M-l*m)+(n*s-r*a)*(h*b-f*d)-(n*u-i*a)*(h*M-l*d)+(r*u-i*s)*(h*m-c*d)},equals:function(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],x=e[2],y=e[3],S=e[4],w=e[5],A=e[6],j=e[7],O=e[8],T=e[9],q=e[10],C=e[11],R=e[12],E=e[13],P=e[14],I=e[15],z=(0,i.FD)();return Math.abs(n-p)<=z*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=z*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-y)<=z*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-S)<=z*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(u-w)<=z*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-A)<=z*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-j)<=z*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-O)<=z*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-T)<=z*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-q)<=z*Math.max(1,Math.abs(d),Math.abs(q))&&Math.abs(m-C)<=z*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-R)<=z*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(b-E)<=z*Math.max(1,Math.abs(b),Math.abs(E))&&Math.abs(g-P)<=z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(_-I)<=z*Math.max(1,Math.abs(_),Math.abs(I))},exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[1]=c+g,t[2]=f-b,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=d+M,t[7]=0,t[8]=f+b,t[9]=d-M,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let n=x,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),v(t,e,n),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:A,fromRotationTranslationScaleOrigin:j,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:b,fromXRotation:_,fromYRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:p,frustum:O,getRotation:w,getScale:S,getTranslation:y,hasIdentityRotation:E,identity:s,invert:c,invertOrIdentity:h,isOrthoNormal:R,lookAt:T,mul:P,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){let s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t},perspective:function(t,e,n,r,i){let o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){let i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:m,rotateX:M,rotateY:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-h*r,t[1]=a*i-c*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+h*i,t[9]=a*r+c*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t},rotateZ:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+h*r,t[1]=a*i+c*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=h*i-o*r,t[5]=c*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t},scale:d,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:q,targetTo:function(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],h=r[2],c=i-n[0],l=o-n[1],f=a-n[2],d=c*c+l*l+f*f;d>0&&(d=1/Math.sqrt(d),c*=d,l*=d,f*=d);let m=u*f-h*l,M=h*c-s*f,b=s*l-u*c;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=l*b-f*M,t[5]=f*m-c*b,t[6]=c*M-l*m,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:f,transpose:u},Symbol.toStringTag,{value:"Module"}))},4197(t,e,n){n.d(e,{Vj:()=>c,cj:()=>h,jh:()=>o,l5:()=>s,yH:()=>u});var r=n(34275),i=n(9093);function o(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function u(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let n=o(t.length+e.length);for(let e=0;e<t.length;++e)n[e]=t[e];for(let r=0;r<e.length;++r)n[t.length+r]=e[r];return n}function h(t){return[...t]}function c(t){let e=(0,i.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},70328(t,e,n){n.d(e,{BI:()=>O,C:()=>a,DC:()=>f,Ej:()=>p,Ie:()=>A,Jt:()=>j,Lu:()=>x,Ne:()=>y,RF:()=>l,TF:()=>g,VL:()=>m,aI:()=>q,fA:()=>s,gE:()=>h,gX:()=>_,hZ:()=>w,iT:()=>d,is:()=>T,pg:()=>v,uJ:()=>b,vI:()=>S,vY:()=>u,vt:()=>o,w1:()=>c,yr:()=>M}),n(35522);var r=n(5443),i=(n(19419),n(4197));function o(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let n=0;n<6;n++)t[n]=e[n];return t}function s(t,e,n,r,i,a,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s[4]=i,s[5]=a,s}function u(t,e=o()){return function(t,e,n,r=o()){return w(r,C),function(t,e,n=0,r=e.length/3){let i=t[0],o=t[1],a=t[2],s=t[3],u=t[4],h=t[5];for(let t=0;t<r;t++)i=Math.min(i,e[n+3*t]),o=Math.min(o,e[n+3*t+1]),a=Math.min(a,e[n+3*t+2]),s=Math.max(s,e[n+3*t]),u=Math.max(u,e[n+3*t+1]),h=Math.max(h,e[n+3*t+2]);t[0]=i,t[1]=o,t[2]=a,t[3]=s,t[4]=u,t[5]=h}(r,t,e,n),r}(t,0,t.length/3,e)}function h(t,e=(0,i.jh)(24)){let[n,r,o,a,s,u]=t;return e[0]=n,e[1]=r,e[2]=o,e[3]=n,e[4]=r,e[5]=u,e[6]=n,e[7]=s,e[8]=o,e[9]=n,e[10]=s,e[11]=u,e[12]=a,e[13]=r,e[14]=o,e[15]=a,e[16]=r,e[17]=u,e[18]=a,e[19]=s,e[20]=o,e[21]=a,e[22]=s,e[23]=u,e}function c(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function l(t,e,n=t){n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n[3]=Math.max(t[3],e[3]),n[4]=Math.max(t[4],e[4]),n[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,n,r]){!function(t,e,n,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],n),t[5]=Math.max(t[5],r)}(t,e,n,r)}function m(t){return t[0]>=t[3]?0:t[3]-t[0]}function M(t){return t[1]>=t[4]?0:t[4]-t[1]}function b(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=m(t),n=b(t),r=M(t);return e*e+n*n+r*r}function _(t,e=[0,0,0]){return e[0]=t[0]+m(t)/2,e[1]=t[1]+M(t)/2,e[2]=t[2]+b(t)/2,e}function p(t,e=[0,0,0]){return e[0]=m(t),e[1]=M(t),e[2]=b(t),e}function v(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function x(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function y(t,e,n=t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n!==t&&(n[3]=t[3],n[4]=t[4],n[5]=t[5]),n}function S(t,e,n=t){return n[3]=e[0],n[4]=e[1],n[5]=e[2],n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),t}function w(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function A(t){return t?w(t,C):o(C)}function j(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function O(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=-1/0,t[3]=r,t[4]=i,t[5]=1/0,t}function T(t){return 6===t.length}function q(t,e,n){if(null==t||null==e)return t===e;if(!T(t)||!T(e))return!1;if(n){for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1}else for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];o(),n.d(e,["qv",0,C,"v_",0,R])},19419(t,e,n){n.d(e,{$9:()=>S,C:()=>o,DC:()=>m,HY:()=>y,IO:()=>l,Ie:()=>A,Rj:()=>x,Uc:()=>v,VL:()=>M,VY:()=>s,Wc:()=>g,aI:()=>O,bx:()=>f,fA:()=>a,fT:()=>d,gR:()=>w,gX:()=>_,ib:()=>p,nw:()=>c,pJ:()=>T,tK:()=>h,uJ:()=>b,vt:()=>i,w1:()=>u}),n(34727);var r=n(5443);function i(t=C){return[t[0],t[1],t[2],t[3]]}function o(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,r,o=i()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function s(t,e=i()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function u(t,e,n=new r.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function c(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function l(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function f(t,{xmin:e,ymin:n,xmax:r,ymax:i}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],r),t[3]=Math.max(t[3],i)}function d(t,e,n){if(null==e)o(n,t);else if("length"in e)j(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):(2===e.length||3===e.length)&&(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}}function m(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3])}function M(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function b(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function g(t){return M(t)*b(t)}function _(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function p(t){let e=M(t),n=b(t);return Math.sqrt(e*e+n*n)}function v(t,e){return x(t,e[0],e[1])}function x(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function y(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function S(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function w(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function A(t){return t?o(t,q):i(q)}function j(t){return null!=t&&4===t.length}function O(t,e){return j(t)&&j(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}function T(t,e){if(4!==e.length||t[0]===t[2]||t[1]===t[3])return!1;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];if(r[0]!==t[0]&&r[0]!==t[2]||r[1]!==t[1]&&r[1]!==t[3])return!1;let o=r[1]===i[1]&&r[0]!==i[0],a=r[0]===i[0]&&r[1]!==i[1];if(!o&&!a)return!1}return!0}const q=[1/0,1/0,-1/0,-1/0],C=[0,0,0,0];n.d(e,["qv",0,q])},65720(t,e,n){n.d(e,{C:()=>g,vt:()=>M,Qy:()=>b,ui:()=>_,ST:()=>w,bU:()=>j,pw:()=>S,m7:()=>p,ZU:()=>v,GH:()=>y,Pi:()=>x,LJ:()=>A,c8:()=>q});var r=n(4341),i=n(58083),o=n(35522),a=n(51850),s=n(78955),u=n(91829),h=n(70328),c=n(71351);function l(t){return t?{ray:(0,c.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>l());var f=n(27921);function d(t,e,n,r){let{t0:i,t1:o}=r,a=(0,f.mN)(t,e),s=(0,f.mN)(t,n);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let t=-a/(s-a);if(t<i)return!1;t<o&&(o=t)}else if(a>=0&&s<0){let t=a/(a-s);if(t>o)return!1;t>i&&(i=t)}return r.t0=i,r.t1=o,!0}var m=n(32114);function M(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function b(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function g(t,e){for(let n=0;n<C;n++)(0,f.C)(t[n],e[n]);return t}function _(t,e,n,r=I){let a=(0,i.lw)(m.Rc.get(),e,t);(0,i.B8)(a,a);for(let t=0;t<R;++t){let e=(0,s.Z0)(m.Km.get(),E[t],a);(0,o.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}(n,r)}function p(t,e){return v(t,e.center,e.radius)}function v(t,e,n){for(let r=0;r<C;r++){let i=t[r];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=n)return!1}return!0}function x(t,e,n){for(let r of T)if((0,f.wE)(t[r],e,n))return!0;return!1}function y(t,e,n){let r=(0,h.gX)(e,z),i=(0,h.VL)(e)/2,a=(0,h.yr)(e)/2,s=(0,h.uJ)(e)/2;return n?function(t,e,n,r,i,a){let s=(0,o.Z0)(F,e,a);for(let e=0;e<C;e++){let o=t[e];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*n+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*r+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*i)>0)return!1}return!0}(t,r,i,a,s,n):function(t,e,n,r,i){for(let o=0;o<C;o++){let a=t[o];if(a[0]*e[0]+a[1]*e[1]+a[2]*e[2]+a[3]-(Math.abs(a[0])*n+Math.abs(a[1])*r+Math.abs(a[2])*i)>0)return!1}return!0}(t,r,i,a,s)}function S(t,e){return O(t,function(t,e=l()){return(0,c.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,P.get()))}function w(t,e,n){return O(t,function(t,e,n=l()){let r=(0,o.Bw)(t.vector);return(0,c.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,P.get()))}function A(t,e,n){return function(t,e,n,r){let i={t0:0,t1:1};for(let o of e)if(!d(t[o],n,r,i))return!1;return i.t0<i.t1}(t,T,e,n)}function j(t,e){for(let n=0;n<C;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function O(t,e){for(let n=0;n<C;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const T=[0,1,2,3,5],q={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},C=6,R=8,E=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],P=new r.I(l),I=b(),z=(0,a.vt)(),F=(0,a.vt)()},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>d,LV:()=>h,_I:()=>f,kb:()=>l,vt:()=>u});var r=n(34727),i=n(4341),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?{origin:(0,a.o8)(t.origin),vector:(0,a.o8)(t.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function h(t,e){let n=m.get();return n.origin=t,n.vector=e,n}function c(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.vector,e,t),n}function l(t,e){let n=(0,o.Re)(s.rq.get(),e,t.origin),i=(0,o.Om)(t.vector,n),a=(0,o.Om)(t.vector,t.vector);if(Math.abs(a)<M)return(0,o.hG)(t.origin,e);let u=(0,r.qE)(i/a,0,1),h=(0,o.Re)(s.rq.get(),(0,o.hs)(s.rq.get(),t.vector,u),n);return(0,o.Om)(h,h)}function f(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,i,a){let{vector:u,origin:h}=t,c=(0,o.Re)(s.rq.get(),e,h),l=(0,o.Om)(u,c)/(0,o.m3)(u);return(0,o.hs)(a,u,(0,r.qE)(l,n,i)),(0,o.WQ)(a,a,t.origin)}(0,a.vt)(),(0,a.vt)();const m=new i.I(()=>u()),M=1e-9},27921(t,e,n){n.d(e,{$Q:()=>T,BX:()=>O,C:()=>h,Cr:()=>d,H:()=>C,LV:()=>u,O_:()=>f,Qj:()=>c,T7:()=>w,Ui:()=>S,_I:()=>R,fA:()=>l,gv:()=>A,lU:()=>m,mN:()=>E,mP:()=>x,mR:()=>y,vE:()=>z,vt:()=>s,wE:()=>P});var r=n(34727),i=n(35522),o=n(51850),a=(n(78955),n(44280),n(32114));function s(t=F){return[t[0],t[1],t[2],t[3]]}function u(t=F[0],e=F[1],n=F[2],r=F[3]){return l(t,e,n,r,a.Km.get())}function h(t,e){return l(e[0],e[1],e[2],e[3],t)}function c(t){return t}function l(t,e,n,r,i=s()){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function f(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function d(t,e,n,r=s()){let i=n[0]-e[0],o=n[1]-e[1],a=n[2]-e[2],u=t[0]-e[0],h=t[1]-e[1],c=t[2]-e[2],l=o*c-a*h,f=a*u-i*c,d=i*h-o*u,m=l*l+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=l*M,r[1]=f*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,e,n,r=0,o=Math.floor(1/3*n),a=Math.floor(2/3*n)){if(n<3)return!1;e(b,r);let s=o,u=!1;for(;s<n-1&&!u;)e(g,s),s++,u=!(0,i.t2)(b,g);if(!u)return!1;for(s=Math.max(s,a),u=!1;s<n&&!u;)e(_,s),s++,(0,i.Re)(p,b,g),(0,i.S8)(p,p),(0,i.Re)(v,g,_),(0,i.S8)(v,v),u=!(0,i.t2)(b,_)&&!(0,i.t2)(g,_)&&Math.abs((0,i.Om)(p,v))<M;return u?(d(b,g,_,t),!0):(0!==r||1!==o||2!==a)&&m(t,e,n,0,1,2)}n(32728);const M=.99619469809,b=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)(),p=(0,o.vt)(),v=(0,o.vt)();function x(t,e,n){return e!==t&&h(t,e),t[3]=-(0,i.Om)(t,n),t}function y(t,e,n,r){return(0,i.$A)(_,e,t),f(n,_,r)}function S(t,e,n){return null!=e&&I(z(t,e.origin,e.direction,V,n))}function w(t,e,n){return I(z(t,e.origin,e.vector,0,n))}function A(t,e,n){return I(z(t,e.origin,e.vector,1,n))}function j(t,e){return E(t,e)<=0}function O(t,e){return E(t,e)>=0}function T(t,e){return function(t,e,n,r,o,a,s){let u=(0,i.Om)(t,n),h=E(t,e);if(u>-1e-6&&u<1e-6)return q(h,o,a);let c=-h/u,l=q(u,o,!1);return!(s&&!l&&!q(h,o,a))&&(l?c>r.c0&&(r.c0=c):c<r.c1&&(r.c1=c),r.c0<=r.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0)}function q(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function C(t,e,n,r=!1){let o=e.at(-1),a=E(t,o),s=r?a>0:a<=0;for(let u=0;u<e.length;u++){let h=e.at(u),c=E(t,h),l=r?c>0:c<=0;s!==l&&(0,i.Cc)(n(),o,h,a/(a-c)),l&&(0,i.C)(n(),h),o=h,a=c,s=l}}function R(t,e,n){let r=(0,i.hs)(a.rq.get(),t,-t[3]),o=function(t,e,n){let r=(0,i.hs)(a.rq.get(),t,(0,i.Om)(t,e));return(0,i.Re)(n,e,r),n}(t,(0,i.Re)(a.rq.get(),e,r),a.rq.get());return(0,i.WQ)(n,o,r),n}function E(t,e){return(0,i.Om)(t,e)+t[3]}function P(t,e,n){for(let r=0;r<n;++r)if(j(t,e[r]))return!1;return!0}function I(t){return 0===t||1===t}function z(t,e,n,o,a){let s=(0,i.Om)(t,n),u=E(t,e);if(0===s)return u>=0?2:3;let h=-u/s;return 1&o&&(h=(0,r.qE)(h,0,1)),!(4&o)&&h<0||!(8&o)&&h>1?u>=0?2:3:((0,i.WQ)(a,e,(0,i.hs)(a,n,h)),u>=0?0:1)}const F=[0,0,1,0],V=8;(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>l,Cr:()=>f,LV:()=>c,fA:()=>d,kb:()=>m,vt:()=>u}),n(4576);var r=n(4341),i=(n(77690),n(29242)),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?h((0,a.o8)(t.origin),(0,a.o8)(t.direction)):h((0,a.vt)(),(0,a.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=M.get();return n.origin=t,n.direction=e,n}function l(t,e=u()){return d(t.origin,t.direction,e)}function f(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.direction,e,t),n}function d(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.C)(n.direction,e),n}function m(t,e){let n=(0,o.$A)(s.rq.get(),(0,o.S8)(s.rq.get(),t.direction),(0,o.Re)(s.rq.get(),e,t.origin));return(0,o.Om)(n,n)}const M=new r.I(()=>u());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,i.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),i=n(34304),o=n(58083),a=n(35522),s=n(51850),u=n(91829),h=n(34275);var c=n(71351),l=n(44280),f=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,s.fA)(t,e,n):function(t){return e=t,(0,h.vZ)(e)&&e.length>=3||function(t){return((0,h.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,s.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,s.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,a.C)(this.center,t)}exactEquals(t){return(0,a.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,a.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,u.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,a.hG)(this.center,t)<=this.radius**2}intersects(t){let e=this.radius+t.radius;return(0,a.hG)(this.center,t.center)<=e*e}intersectRay(t,e){if(null==t||!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){let{origin:r,direction:i}=t;e[0]=r[0]+i[0]*n,e[1]=r[1]+i[1]*n,e[2]=r[2]+i[2]*n}return!0}intersectLine(t,e){let n=(0,c.Cr)(t,e);if(!this._intersect(n,m))return[];let{origin:r,direction:o}=n,{t0:u,t1:h}=m,l=t=>{let e=(0,s.vt)();return(0,a.Ln)(e,r,o,t),this.projectPoint(e,e)};return Math.abs(u-h)<(0,i.FD)()?[l(u)]:[l(u),l(h)]}_intersect(t,e){let{origin:n,direction:r}=t,i=M;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;let a=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=a*a-4*o*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(s<0)return!1;let u=Math.sqrt(s);return e.t0=(-a-u)/(2*o),e.t1=(-a+u)/(2*o),!0}projectPoint(t,e){let n=(0,a.Re)(f.rq.get(),t,this.center),r=(0,a.hs)(f.rq.get(),n,this.radius/(0,a.Bw)(n));return(0,a.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){let n=f.rq.get(),r=f.Rc.get();(0,a.$A)(n,t.origin,t.direction),(0,a.$A)(e,n,t.origin),(0,a.hs)(e,e,1/(0,a.Bw)(e)*this.radius);let i=this._angleToSilhouette(t.origin),s=(0,l.g7)(t.origin,e);return(0,o.$0)(r,s+i,n),(0,a.Z0)(e,e,r),e}frustumCoverage(t,e,n){let r=this.radius,i=r*r,o=t+.5*Math.PI,a=e*e+i-2*Math.cos(o)*e*r,s=Math.sqrt(a),u=a-i;if(u<=0)return.5;let h=Math.acos(Math.sqrt(u)/s)-Math.asin(r/(s/Math.sin(o)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){let e=(0,a.Re)(f.rq.get(),t,this.center),n=(0,a.Bw)(e),i=this.radius,o=i+Math.abs(i-n);return(0,r.XM)(i/o)}union(t){let e=(0,a.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,a.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){let{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},44280(t,e,n){n.d(e,{g7:()=>s,gr:()=>a});var r=n(34727),i=n(35522),o=n(51850);function a(t,e){return(0,i.Om)(t,e)/(0,i.Bw)(t)}function s(t,e){let n=(0,i.Om)(t,e)/((0,i.Bw)(t)*(0,i.Bw)(e));return-(0,r.XM)(n)}(0,o.vt)(),(0,o.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>l,Km:()=>f}),n(44208);var r=n(26390),i=n(29242),o=n(9093),a=n(82534),s=n(48163),u=n(51850),h=n(91829);class c{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new c(s.vt)}static createVec3f64(){return new c(u.vt)}static createVec4f64(){return new c(h.vt)}static createMat3f64(){return new c(i.vt)}static createMat4f64(){return new c(o.vt)}static createQuatf64(){return new c(a.vt)}get test(){}}c.createVec2f64();const l=c.createVec3f64(),f=c.createVec4f64(),d=(c.createMat3f64(),c.createMat4f64());c.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,nu:()=>s,wp:()=>o}),n(34727);var r=n(35522),i=n(51850);function o(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),i=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),o=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,i,o),t}function a(t,e,n){n||=t;let i=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-i*e[0],t[1]-i*e[1],t[2]-i*e[2]),(0,r.S8)(n,n)}function s(t,e,n,o=(0,i.vt)()){let a=(0,r.Bw)(t),s=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(a*s);if(c<.9999999999999999){let i=Math.acos(c),l=((1-n)*a+n*s)/Math.sin(i),f=l/a*Math.sin((1-n)*i),d=l/s*Math.sin(n*i);return(0,r.hs)(u,t,f),(0,r.hs)(h,e,d),(0,r.WQ)(o,u,h)}return(0,r.Cc)(o,t,e,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const u=(0,i.vt)(),h=(0,i.vt)()},70491(t,e,n){n.r(e),n.d(e,{default:()=>K});var r=n(32198),i=n(17676),o=n(24326),a=n(91429),s=n(35522),u=n(51850),h=n(11964),c=n(94008),l=n(93687),f=n(15142),d=n(65720),m=n(71351),M=n(620);class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),I[0]=null,N.prune(),W.prune()}add(t){let e=Array.from(t);this._grow(e);let n=g.acquire();for(let t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;let n=g.acquire();for(let r of t){let t=e??this.objectToBoundingSphere(r);C(t.radius)?(n.init(this._root),x(r,t,n)):this._degenerateObjects.delete(r)}g.release(n),this._shrink()}update(t,e){if(!C(e.radius)&&this._isDegenerate(t))return;let n=function(t){return I[0]=t,I}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){let r=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),(0,M.O_)(t.origin,t.direction,V,D)}(r,t))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){let i=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e,n){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),n.applyToMinMax(V,D),(0,M.O_)(t.origin,t.direction,V,D)}(i,t,r))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),!0})}forEach(t){for(let e of this.values())t(e)}*values(){for(let t of this._nodeIteratorValues()){let e=t.node;yield*e.terminals,null!==e.residents&&(yield*e.residents)}yield*this.degenerateObjectValues()}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}*degenerateObjectValues(){yield*this._degenerateObjects.values()}findClosest(t,e,n,r=()=>!0,i=1/0){let o=1/0,a=1/0,u=null,h=T(t,e),c=s=>{if(--i,!r(s))return;let h=this.objectToBoundingSphere(s);if(!(0,d.m7)(n,h))return;let c=q(t,e,h.center),l=c-h.radius,f=c+h.radius;l<o&&(o=l,a=f,u=s)};return v(this._root,r=>{if(i<=0||!(0,d.ZU)(n,r.bounds.center,2*r.bounds.radius)||((0,s.hs)(F,h,2*r.halfSize),(0,s.WQ)(F,F,r.bounds.center),q(t,e,F)>a))return!1;let o=r.node;return o.terminals.forAll(t=>c(t)),null!==o.residents&&o.residents.forAll(t=>c(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,i,o,a){let u=-1/0,h=1/0,c={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};c.setRange(r);let l=q(e,n,t),f=T(e,n),m=T(e,-n),M=t=>{if(!a(t))return;let r=this.objectToBoundingSphere(t),s=q(e,n,r.center)-l,f=s-r.radius,m=s+r.radius;f>h||m<u||!(0,d.m7)(o,r)||i(t,c)};v(this._root,t=>{if(!(0,d.ZU)(o,t.bounds.center,2*t.bounds.radius)||((0,s.hs)(F,f,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l>h)||((0,s.hs)(F,m,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l<u))return!1;let r=t.node;return r.terminals.forAll(t=>M(t)),null!==r.residents&&r.residents.forAll(t=>M(t)),!0},e,n)}forEachNode(t){p(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachIntersectingFrustum(t,e,n=()=>!0){for(let r of this.intersectingFrustumValues(t,n))e(r)}*intersectingFrustumValues(t,e=()=>!0){for(let n of this._nodeIteratorValues(e=>(0,d.ZU)(t,e.bounds.center,2*e.bounds.radius))){let r=n.node;for(let n of r.terminals)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n);if(null!==r.residents)for(let n of r.residents)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n)}}*_nodeIteratorValues(t=()=>!0){yield*_(this._root,t)}forEachNeighbor(t,e){let n=e.radius,r=e.center,i=n=>{let r=this.objectToBoundingSphere(n);return!e.intersects(r)||t(n)},o=!0,a=t=>{o&&=i(t)};p(this._root,t=>{let e=2*t.bounds.radius,i=n+e;if((0,s.hG)(t.bounds.center,r)-i*i>0)return!1;let u=t.node;return u.terminals.forAll(a),o&&null!==u.residents&&u.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){let n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){let r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){let e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){let r=g.acquire().init(t);this._add(e.at(n),r),g.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),B),C(B.radius)&&!this._fitsInsideTree(B))if(S(this._root.node))this._root.bounds.copyFrom(B),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{let t=this._rootBoundsForRootAsSubNode(B);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(B,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){L.center=e.bounds.center,L.radius=e.halfSize,O([t,L],t=>t,k);let n=g.acquire().init(this._root);this._root.initFrom(null,k,k.radius),this._root.increaseHalfSize(1.25),p(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){let e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E,n=0;return p(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){let e=t.radius,n=t.center,r=-1/0,i=this._root.bounds.center,o=this._root.halfSize;for(let t=0;t<3;t++){let a=i[t]-o-(n[t]-e),s=n[t]+e-(i[t]+o),u=Math.max(0,Math.ceil(a/(2*o))),h=Math.max(0,Math.ceil(s/(2*o)))+1,c=2**Math.ceil(Math.log(u+h)*Math.LOG2E);r=Math.max(r,c),Q[t].min=u,Q[t].max=h}for(let t=0;t<3;t++){let e=Q[t].min,n=Q[t].max,a=(r-(e+n))/2;e+=Math.ceil(a),n+=Math.floor(a);let s=i[t]-o-e*o*2;z.center[t]=s+(n+e)*o}let a=r*o;return z.radius=a*P,g.acquire().initFrom(null,z,a,0)}_growRootAsSubNode(t){let e=this._root.node;B.center=this._root.bounds.center,B.radius=this._root.halfSize,this._root.init(t),t.advanceTo(B,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){let t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null,e=this._root.node.children,n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!C(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){let e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){return{children:t.children.map(t=>t?this._nodeToJSON(t):null),residents:t.residents?.map(t=>this.objectToBoundingSphere(t)),terminals:t.terminals?.map(t=>this.objectToBoundingSphere(t))}}}class g{constructor(){this.bounds=new c.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=t??g.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*P}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;let n=R[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}let r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){let e=this.bounds.center;return+(e[0]<t.center[0])+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new l.A(()=>new g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function*_(t,e=()=>!0){let n=[g.acquire().init(t)];for(;0!==n.length;){let t=n.pop();if(e(t)){if(yield t,!t.isLeaf())for(let e=0;e<t.node.children.length;e++)t.node.children[e]&&n.push(g.acquire().init(t).advance(e));g.release(t)}}}function p(t,e){let n=_(t,e);for(let t of n);}function v(t,e,n,r=1){let i=g.acquire().init(t),o=[i];for(function(t,e,n){if(!W.length)for(let t=0;t<8;++t)W.push({index:0,distance:0});for(let n=0;n<8;++n){let r=R[n];W.data[n].index=n,W.data[n].distance=q(t,e,r)}W.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=W.data[t].index}(n,r,Z);0!==o.length;){if(i=o.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){let e=Z[t];i.node.children[e]&&o.push(g.acquire().init(i).advance(e))}g.release(i)}}function x(t,e,n){N.clear();let r=n.advanceTo(e,(t,e)=>{N.push(t.node),N.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=N.length-2;t>=0&&y(N.data[t],N.data[t+1]);t-=2);}function y(t,e){return e>=0&&(t.children[e]=null),!!S(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function S(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function w(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function A(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function j(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function O(t,e,n){V[0]=1/0,V[1]=1/0,V[2]=1/0,D[0]=-1/0,D[1]=-1/0,D[2]=-1/0;for(let n of t){let t=e(n);C(t.radius)&&(w(V,t),A(D,t))}(0,s.Cc)(n.center,V,D,.5),n.radius=Math.max(D[0]-V[0],D[1]-V[1],D[2]-V[2])/2}function T(t,e){let n,r=1/0;for(let i=0;i<8;++i){let o=q(t,e,E[i]);o<r&&(r=o,n=E[i])}return n}function q(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function C(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const R=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],E=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],P=Math.sqrt(3),I=[null],z=new c.iy,F=(0,u.vt)(),V=(0,u.vt)(),D=(0,u.vt)(),N=new f.A,B=new c.iy,L=new c.iy,k=new c.iy,Q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],W=new f.A,Z=[0,0,0,0,0,0,0,0];var H=n(44801);function $(t,e,n){let r=new c.iy;return(0,s.hs)(r.center,t,.5),(0,s.Ln)(r.center,r.center,e,.5),r.radius=(0,s.Io)(r.center,t),(0,s.WQ)(r.center,r.center,n),r}class U{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class X extends U{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class J extends U{constructor(t,e,n,r,i){super(t,e,n),this.start=r,this.end=i,this.type="edge"}}let Y=class{constructor(){this._idToComponent=new Map,this._components=new b(t=>t.bounds),this._edges=new b(t=>t.bounds),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,i.Te)(e);let n=t;n.mbs=new c.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);let r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){let n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){let{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;let r={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(let t of i.components)this._setFetchEdgeLocations(t)}async add(t){let e=new tt(t.id,new c.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){let e=this._idToComponent.get(t.id);if(e){let t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){let e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;let n=H.HY.createView(t.locations),r=Array(n.count),i=(0,u.vt)(),o=(0,u.vt)();for(let a=0;a<n.count;a++){n.position0.getVec(a,i),n.position1.getVec(a,o);let s=$(i,o,t.origin),u=new et(e,a,s);r[a]=u}this._edges.add(r);let{objectIds:a,origin:s}=t;e.info={locations:n,objectIds:a,origin:s}}_addCandidates(t,e,n){let{info:r}=e.component,{origin:i,objectIds:o}=r,a=r.locations,u=a.position0.getVec(e.index,this._tmpP1),h=a.position1.getVec(e.index,this._tmpP2);(0,s.WQ)(u,u,i),(0,s.WQ)(h,h,i);let c=o[a.componentIndex.get(e.index)];this._addEdgeCandidate(t,c,u,h,n),G(t,c,u,n),G(t,c,h,n)}_addEdgeCandidate(t,e,n,r,i){if(!t.returnEdge)return;let o=t.mbs.center,a=(0,h.Cr)(n,r,this._tmpLineSegment),c=(0,h._I)(a,o,this._tmpP3);t.mbs.contains(c)&&i.push(new J(e,(0,u.o8)(c),(0,s.Io)(o,c),(0,u.o8)(n),(0,u.o8)(r)))}};Y=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const K=Y;function G(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new X(e,(0,u.o8)(n),(0,s.Io)(t.mbs.center,n)))}class tt{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,o.c)()}}class et{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[491],{32198(t,e,n){function r(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function i(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function a(t){function e(e){t.error=t.hasError?new o(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function i(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(t){return e(t),i()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},4341(t,e,n){n.d(e,{I:()=>i});var r=n(26390);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,a,s,u){return[t,e,n,r,i,o,a,s,u]}n.d(e,{fA:()=>i,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M){return[t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},82534(t,e,n){function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},77690(t,e,n){n.d(e,{B8:()=>s,Ge:()=>d,I0:()=>f,KC:()=>u,a4:()=>h,hZ:()=>o,hs:()=>l,lw:()=>c,mg:()=>a,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,a,s,u,h){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t}function a(t,e){if(t===e){let n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;return m?(m=1/m,t[0]=l*m,t[1]=(-c*r+i*h)*m,t[2]=(s*r-i*a)*m,t[3]=f*m,t[4]=(c*n-i*u)*m,t[5]=(-s*n+i*o)*m,t[6]=d*m,t[7]=(-h*n+r*u)*m,t[8]=(a*n-r*o)*m,t):null}function u(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8];return t[0]=a*c-s*h,t[1]=i*h-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*h-a*u,t[7]=r*u-n*h,t[8]=n*a-r*o,t}function h(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8];return e*(h*o-a*u)+n*(-h*i+a*s)+r*(u*i-o*s)}function c(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=f*r+d*a+m*h,t[1]=f*i+d*s+m*c,t[2]=f*o+d*u+m*l,t[3]=M*r+b*a+g*h,t[4]=M*i+b*s+g*c,t[5]=M*o+b*u+g*l,t[6]=_*r+p*a+v*h,t[7]=_*i+p*s+v*c,t[8]=_*o+p*u+v*l,t}function l(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function f(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[3]=c-g,t[6]=f+b,t[1]=c+g,t[4]=1-h-m,t[7]=d-M,t[2]=f-b,t[5]=d+M,t[8]=1-h-l,t}function d(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(u*j-a*q-h*A)*C,t[2]=(a*T-s*j+h*w)*C,t[3]=(i*T-r*q-o*O)*C,t[4]=(n*q-i*j+o*A)*C,t[5]=(r*j-n*T-o*w)*C,t[6]=(M*S-b*y+g*x)*C,t[7]=(b*v-m*S-g*p)*C,t[8]=(m*y-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=c,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:h,equals:function(t,e){let n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],x=(0,r.FD)();return Math.abs(n-f)<=x*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-d)<=x*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-b)<=x*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-g)<=x*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-_)<=x*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(l-v)<=x*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:function(t){let e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e},mul:M,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;if(!m)return null;let M=1/m;return t[0]=l*M,t[1]=(-c*r+i*h)*M,t[2]=(s*r-i*a)*M,t[3]=f*M,t[4]=(c*n-i*u)*M,t[5]=(-s*n+i*o)*M,t[6]=d*M,t[7]=(-h*n+r*u)*M,t[8]=(a*n-r*o)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=h,t[7]=c,t[8]=l,t},scale:l,scaleByVec2:function(t,e,n){let r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+h,t[7]=f*i+d*s+c,t[8]=f*o+d*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>O,B8:()=>c,C:()=>o,D_:()=>s,N9:()=>p,O7:()=>j,Qw:()=>h,Tl:()=>f,X_:()=>S,e$:()=>m,eL:()=>M,hM:()=>_,hZ:()=>a,hs:()=>d,kN:()=>b,l:()=>w,lw:()=>l,mg:()=>u,o1:()=>A,sC:()=>y,t2:()=>C,t5:()=>T,tZ:()=>E,ut:()=>R});var r=n(51850),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){let n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function h(t,e){return c(t,e)||s(t),t}function c(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(i*T-r*q-o*O)*C,t[2]=(M*S-b*y+g*x)*C,t[3]=(f*y-l*S-d*x)*C,t[4]=(u*j-a*q-h*A)*C,t[5]=(n*q-i*j+o*A)*C,t[6]=(b*v-m*S-g*p)*C,t[7]=(c*S-f*v+d*p)*C,t[8]=(a*T-s*j+h*w)*C,t[9]=(r*j-n*T-o*w)*C,t[10]=(m*y-M*v+g*_)*C,t[11]=(l*v-c*y-d*_)*C,t[12]=(s*A-a*O-u*w)*C,t[13]=(n*O-r*A+i*w)*C,t[14]=(M*p-m*x-b*_)*C,t[15]=(c*x-l*p+f*_)*C,t):null}function l(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15],p=n[0],v=n[1],x=n[2],y=n[3];return t[0]=p*r+v*s+x*l+y*M,t[1]=p*i+v*u+x*f+y*b,t[2]=p*o+v*h+x*d+y*g,t[3]=p*a+v*c+x*m+y*_,p=n[4],v=n[5],x=n[6],y=n[7],t[4]=p*r+v*s+x*l+y*M,t[5]=p*i+v*u+x*f+y*b,t[6]=p*o+v*h+x*d+y*g,t[7]=p*a+v*c+x*m+y*_,p=n[8],v=n[9],x=n[10],y=n[11],t[8]=p*r+v*s+x*l+y*M,t[9]=p*i+v*u+x*f+y*b,t[10]=p*o+v*h+x*d+y*g,t[11]=p*a+v*c+x*m+y*_,p=n[12],v=n[13],x=n[14],y=n[15],t[12]=p*r+v*s+x*l+y*M,t[13]=p*i+v*u+x*f+y*b,t[14]=p*o+v*h+x*d+y*g,t[15]=p*a+v*c+x*m+y*_,t}function f(t,e,n){let r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{let n=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=h,t[5]=c,t[6]=l,t[7]=f,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+h*i+d*o+e[12],t[13]=a*r+c*i+m*o+e[13],t[14]=s*r+l*i+M*o+e[14],t[15]=u*r+f*i+b*o+e[15]}return t}function d(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function m(t,e,n,r){let a=r[0],s=r[1],u=r[2],h=Math.sqrt(a*a+s*s+u*u);if(h<=(0,i.FD)())return void o(t,e);h=1/h,a*=h,s*=h,u*=h;let c=Math.sin(n),l=Math.cos(n),f=1-l,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],x=e[8],y=e[9],S=e[10],w=e[11],A=a*a*f+l,j=s*a*f+u*c,O=u*a*f-s*c,T=a*s*f-u*c,q=s*s*f+l,C=u*s*f+a*c,R=a*u*f+s*c,E=s*u*f-a*c,P=u*u*f+l;t[0]=d*A+g*j+x*O,t[1]=m*A+_*j+y*O,t[2]=M*A+p*j+S*O,t[3]=b*A+v*j+w*O,t[4]=d*T+g*q+x*C,t[5]=m*T+_*q+y*C,t[6]=M*T+p*q+S*C,t[7]=b*T+v*q+w*C,t[8]=d*R+g*E+x*P,t[9]=m*R+_*E+y*P,t[10]=M*R+p*E+S*P,t[11]=b*R+v*E+w*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function M(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+h*r,t[5]=a*i+c*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=h*i-o*r,t[9]=c*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function b(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return s(t);let r=n[0],o=n[1],a=n[2],u=Math.sqrt(r*r+o*o+a*a);if(u<=(0,i.FD)())return null;u=1/u,r*=u,o*=u,a*=u;let h=Math.sin(e),c=Math.cos(e),l=1-c;return t[0]=r*r*l+c,t[1]=o*r*l+a*h,t[2]=a*r*l-o*h,t[3]=0,t[4]=r*o*l-a*h,t[5]=o*o*l+c,t[6]=a*o*l+r*h,t[7]=0,t[8]=r*a*l+o*h,t[9]=o*a*l-r*h,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,h=o+o,c=r*s,l=r*u,f=r*h,d=i*u,m=i*h,M=o*h,b=a*s,g=a*u,_=a*h;return t[0]=1-(d+M),t[1]=l+_,t[2]=f-g,t[3]=0,t[4]=l-_,t[5]=1-(c+M),t[6]=m+b,t[7]=0,t[8]=f+g,t[9]=m-b,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+h*h+c*c),t}function w(t,e){let n=e[0]+e[5]+e[10],r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function A(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,m=o*h,M=o*c,b=a*c,g=s*u,_=s*h,p=s*c,v=r[0],x=r[1],y=r[2];return t[0]=(1-(m+b))*v,t[1]=(f+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(f-p)*x,t[5]=(1-(l+b))*x,t[6]=(M+g)*x,t[7]=0,t[8]=(d+_)*y,t[9]=(M-g)*y,t[10]=(1-(l+m))*y,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function j(t,e,n,r,i){let o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,m=o*l,M=a*c,b=a*l,g=s*l,_=u*h,p=u*c,v=u*l,x=r[0],y=r[1],S=r[2],w=i[0],A=i[1],j=i[2],O=(1-(M+g))*x,T=(d+v)*x,q=(m-p)*x,C=(d-v)*y,R=(1-(f+g))*y,E=(b+_)*y,P=(m+p)*S,I=(b-_)*S,z=(1-(f+M))*S;return t[0]=O,t[1]=T,t[2]=q,t[3]=0,t[4]=C,t[5]=R,t[6]=E,t[7]=0,t[8]=P,t[9]=I,t[10]=z,t[11]=0,t[12]=n[0]+w-(O*w+C*A+P*j),t[13]=n[1]+A-(T*w+R*A+I*j),t[14]=n[2]+j-(q*w+E*A+z*j),t[15]=1,t}function O(t,e,n,r,i,o,a){let s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function T(t,e,n,r){let o=e[0],a=e[1],u=e[2],h=o-n[0],c=a-n[1],l=u-n[2],f=(0,i.FD)();if(Math.abs(h)<f&&Math.abs(c)<f&&Math.abs(l)<f)return void s(t);let d=1/Math.sqrt(h*h+c*c+l*l);h*=d,c*=d,l*=d;let m=r[0],M=r[1],b=r[2],g=M*l-b*c,_=b*h-m*l,p=m*c-M*h;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=c*p-l*_,x=l*g-h*p,y=h*_-c*g;d=Math.sqrt(v*v+x*x+y*y),d?(d=1/d,v*=d,x*=d,y*=d):(v=0,x=0,y=0),t[0]=g,t[1]=v,t[2]=h,t[3]=0,t[4]=_,t[5]=x,t[6]=c,t[7]=0,t[8]=p,t[9]=y,t[10]=l,t[11]=0,t[12]=-(g*o+_*a+p*u),t[13]=-(v*o+x*a+y*u),t[14]=-(h*o+c*a+l*u),t[15]=1}function q(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function R(t){let e=(0,i.FD)(),n=t[0],r=t[1],o=t[2],a=t[4],s=t[5],u=t[6],h=t[8],c=t[9],l=t[10];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(r*r+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e}function E(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const P=l,I=q;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=s*(f*g-d*b)-l*(u*g-h*b)+M*(u*d-h*f),t[1]=-(r*(f*g-d*b)-l*(i*g-o*b)+M*(i*d-o*f)),t[2]=r*(u*g-h*b)-s*(i*g-o*b)+M*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*b)-c*(u*g-h*b)+m*(u*d-h*f)),t[5]=n*(f*g-d*b)-c*(i*g-o*b)+m*(i*d-o*f),t[6]=-(n*(u*g-h*b)-a*(i*g-o*b)+m*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*M)-c*(s*g-h*M)+m*(s*d-h*l),t[9]=-(n*(l*g-d*M)-c*(r*g-o*M)+m*(r*d-o*l)),t[10]=n*(s*g-h*M)-a*(r*g-o*M)+m*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*b-f*M)-c*(s*b-u*M)+m*(s*f-u*l)),t[13]=n*(l*b-f*M)-c*(r*b-i*M)+m*(r*f-i*l),t[14]=-(n*(s*b-u*M)-a*(r*b-i*M)+m*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},copy:o,determinant:function(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8],c=t[9],l=t[10],f=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*a-n*o)*(l*b-f*M)-(e*s-r*o)*(c*b-f*m)+(e*u-i*o)*(c*M-l*m)+(n*s-r*a)*(h*b-f*d)-(n*u-i*a)*(h*M-l*d)+(r*u-i*s)*(h*m-c*d)},equals:function(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],x=e[2],y=e[3],S=e[4],w=e[5],A=e[6],j=e[7],O=e[8],T=e[9],q=e[10],C=e[11],R=e[12],E=e[13],P=e[14],I=e[15],z=(0,i.FD)();return Math.abs(n-p)<=z*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=z*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-y)<=z*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-S)<=z*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(u-w)<=z*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-A)<=z*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-j)<=z*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-O)<=z*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-T)<=z*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-q)<=z*Math.max(1,Math.abs(d),Math.abs(q))&&Math.abs(m-C)<=z*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-R)<=z*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(b-E)<=z*Math.max(1,Math.abs(b),Math.abs(E))&&Math.abs(g-P)<=z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(_-I)<=z*Math.max(1,Math.abs(_),Math.abs(I))},exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[1]=c+g,t[2]=f-b,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=d+M,t[7]=0,t[8]=f+b,t[9]=d-M,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let n=x,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),v(t,e,n),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:A,fromRotationTranslationScaleOrigin:j,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:b,fromXRotation:_,fromYRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:p,frustum:O,getRotation:w,getScale:S,getTranslation:y,hasIdentityRotation:E,identity:s,invert:c,invertOrIdentity:h,isOrthoNormal:R,lookAt:T,mul:P,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){let s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t},perspective:function(t,e,n,r,i){let o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){let i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:m,rotateX:M,rotateY:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-h*r,t[1]=a*i-c*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+h*i,t[9]=a*r+c*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t},rotateZ:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+h*r,t[1]=a*i+c*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=h*i-o*r,t[5]=c*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t},scale:d,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:q,targetTo:function(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],h=r[2],c=i-n[0],l=o-n[1],f=a-n[2],d=c*c+l*l+f*f;d>0&&(d=1/Math.sqrt(d),c*=d,l*=d,f*=d);let m=u*f-h*l,M=h*c-s*f,b=s*l-u*c;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=l*b-f*M,t[5]=f*m-c*b,t[6]=c*M-l*m,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:f,transpose:u},Symbol.toStringTag,{value:"Module"}))},4197(t,e,n){n.d(e,{Vj:()=>c,cj:()=>h,jh:()=>o,l5:()=>s,yH:()=>u});var r=n(34275),i=n(9093);function o(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function u(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let n=o(t.length+e.length);for(let e=0;e<t.length;++e)n[e]=t[e];for(let r=0;r<e.length;++r)n[t.length+r]=e[r];return n}function h(t){return[...t]}function c(t){let e=(0,i.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},70328(t,e,n){n.d(e,{BI:()=>O,C:()=>a,DC:()=>f,Ej:()=>p,Ie:()=>A,Jt:()=>j,Lu:()=>x,Ne:()=>y,RF:()=>l,TF:()=>g,VL:()=>m,aI:()=>q,fA:()=>s,gE:()=>h,gX:()=>_,hZ:()=>w,iT:()=>d,is:()=>T,pg:()=>v,uJ:()=>b,vI:()=>S,vY:()=>u,vt:()=>o,w1:()=>c,yr:()=>M}),n(35522);var r=n(5443),i=(n(19419),n(4197));function o(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let n=0;n<6;n++)t[n]=e[n];return t}function s(t,e,n,r,i,a,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s[4]=i,s[5]=a,s}function u(t,e=o()){return function(t,e,n,r=o()){return w(r,C),function(t,e,n=0,r=e.length/3){let i=t[0],o=t[1],a=t[2],s=t[3],u=t[4],h=t[5];for(let t=0;t<r;t++)i=Math.min(i,e[n+3*t]),o=Math.min(o,e[n+3*t+1]),a=Math.min(a,e[n+3*t+2]),s=Math.max(s,e[n+3*t]),u=Math.max(u,e[n+3*t+1]),h=Math.max(h,e[n+3*t+2]);t[0]=i,t[1]=o,t[2]=a,t[3]=s,t[4]=u,t[5]=h}(r,t,e,n),r}(t,0,t.length/3,e)}function h(t,e=(0,i.jh)(24)){let[n,r,o,a,s,u]=t;return e[0]=n,e[1]=r,e[2]=o,e[3]=n,e[4]=r,e[5]=u,e[6]=n,e[7]=s,e[8]=o,e[9]=n,e[10]=s,e[11]=u,e[12]=a,e[13]=r,e[14]=o,e[15]=a,e[16]=r,e[17]=u,e[18]=a,e[19]=s,e[20]=o,e[21]=a,e[22]=s,e[23]=u,e}function c(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function l(t,e,n=t){n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n[3]=Math.max(t[3],e[3]),n[4]=Math.max(t[4],e[4]),n[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,n,r]){!function(t,e,n,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],n),t[5]=Math.max(t[5],r)}(t,e,n,r)}function m(t){return t[0]>=t[3]?0:t[3]-t[0]}function M(t){return t[1]>=t[4]?0:t[4]-t[1]}function b(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=m(t),n=b(t),r=M(t);return e*e+n*n+r*r}function _(t,e=[0,0,0]){return e[0]=t[0]+m(t)/2,e[1]=t[1]+M(t)/2,e[2]=t[2]+b(t)/2,e}function p(t,e=[0,0,0]){return e[0]=m(t),e[1]=M(t),e[2]=b(t),e}function v(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function x(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function y(t,e,n=t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n!==t&&(n[3]=t[3],n[4]=t[4],n[5]=t[5]),n}function S(t,e,n=t){return n[3]=e[0],n[4]=e[1],n[5]=e[2],n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),t}function w(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function A(t){return t?w(t,C):o(C)}function j(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function O(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=-1/0,t[3]=r,t[4]=i,t[5]=1/0,t}function T(t){return 6===t.length}function q(t,e,n){if(null==t||null==e)return t===e;if(!T(t)||!T(e))return!1;if(n){for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1}else for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];o(),n.d(e,["qv",0,C,"v_",0,R])},19419(t,e,n){n.d(e,{$9:()=>S,C:()=>o,DC:()=>m,HY:()=>y,IO:()=>l,Ie:()=>A,Rj:()=>x,Uc:()=>v,VL:()=>M,VY:()=>s,Wc:()=>g,aI:()=>O,bx:()=>f,fA:()=>a,fT:()=>d,gR:()=>w,gX:()=>_,ib:()=>p,nw:()=>c,pJ:()=>T,tK:()=>h,uJ:()=>b,vt:()=>i,w1:()=>u}),n(34727);var r=n(5443);function i(t=C){return[t[0],t[1],t[2],t[3]]}function o(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,r,o=i()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function s(t,e=i()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function u(t,e,n=new r.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function c(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function l(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function f(t,{xmin:e,ymin:n,xmax:r,ymax:i}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],r),t[3]=Math.max(t[3],i)}function d(t,e,n){if(null==e)o(n,t);else if("length"in e)j(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):(2===e.length||3===e.length)&&(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}}function m(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3])}function M(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function b(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function g(t){return M(t)*b(t)}function _(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function p(t){let e=M(t),n=b(t);return Math.sqrt(e*e+n*n)}function v(t,e){return x(t,e[0],e[1])}function x(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function y(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function S(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function w(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function A(t){return t?o(t,q):i(q)}function j(t){return null!=t&&4===t.length}function O(t,e){return j(t)&&j(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:null==t&&null==e||t===e}function T(t,e){if(4!==e.length||t[0]===t[2]||t[1]===t[3])return!1;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];if(r[0]!==t[0]&&r[0]!==t[2]||r[1]!==t[1]&&r[1]!==t[3])return!1;let o=r[1]===i[1]&&r[0]!==i[0],a=r[0]===i[0]&&r[1]!==i[1];if(!o&&!a)return!1}return!0}const q=[1/0,1/0,-1/0,-1/0],C=[0,0,0,0];n.d(e,["qv",0,q])},65720(t,e,n){n.d(e,{C:()=>g,vt:()=>M,Qy:()=>b,ui:()=>_,ST:()=>w,bU:()=>j,pw:()=>S,m7:()=>p,ZU:()=>v,GH:()=>y,Pi:()=>x,LJ:()=>A,c8:()=>q});var r=n(4341),i=n(58083),o=n(35522),a=n(51850),s=n(78955),u=n(91829),h=n(70328),c=n(71351);function l(t){return t?{ray:(0,c.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>l());var f=n(27921);function d(t,e,n,r){let{t0:i,t1:o}=r,a=(0,f.mN)(t,e),s=(0,f.mN)(t,n);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let t=-a/(s-a);if(t<i)return!1;t<o&&(o=t)}else if(a>=0&&s<0){let t=a/(a-s);if(t>o)return!1;t>i&&(i=t)}return r.t0=i,r.t1=o,!0}var m=n(32114);function M(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function b(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function g(t,e){for(let n=0;n<C;n++)(0,f.C)(t[n],e[n]);return t}function _(t,e,n,r=I){let a=(0,i.lw)(m.Rc.get(),e,t);(0,i.B8)(a,a);for(let t=0;t<R;++t){let e=(0,s.Z0)(m.Km.get(),E[t],a);(0,o.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}(n,r)}function p(t,e){return v(t,e.center,e.radius)}function v(t,e,n){for(let r=0;r<C;r++){let i=t[r];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=n)return!1}return!0}function x(t,e,n){for(let r of T)if((0,f.wE)(t[r],e,n))return!0;return!1}function y(t,e,n){let r=(0,h.gX)(e,z),i=(0,h.VL)(e)/2,a=(0,h.yr)(e)/2,s=(0,h.uJ)(e)/2;return n?function(t,e,n,r,i,a){let s=(0,o.Z0)(F,e,a);for(let e=0;e<C;e++){let o=t[e];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*n+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*r+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*i)>0)return!1}return!0}(t,r,i,a,s,n):function(t,e,n,r,i){for(let o=0;o<C;o++){let a=t[o];if(a[0]*e[0]+a[1]*e[1]+a[2]*e[2]+a[3]-(Math.abs(a[0])*n+Math.abs(a[1])*r+Math.abs(a[2])*i)>0)return!1}return!0}(t,r,i,a,s)}function S(t,e){return O(t,function(t,e=l()){return(0,c.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,P.get()))}function w(t,e,n){return O(t,function(t,e,n=l()){let r=(0,o.Bw)(t.vector);return(0,c.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,P.get()))}function A(t,e,n){return function(t,e,n,r){let i={t0:0,t1:1};for(let o of e)if(!d(t[o],n,r,i))return!1;return i.t0<i.t1}(t,T,e,n)}function j(t,e){for(let n=0;n<C;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function O(t,e){for(let n=0;n<C;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const T=[0,1,2,3,5],q={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},C=6,R=8,E=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],P=new r.I(l),I=b(),z=(0,a.vt)(),F=(0,a.vt)()},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>d,LV:()=>h,_I:()=>f,kb:()=>l,vt:()=>u});var r=n(34727),i=n(4341),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?{origin:(0,a.o8)(t.origin),vector:(0,a.o8)(t.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function h(t,e){let n=m.get();return n.origin=t,n.vector=e,n}function c(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.vector,e,t),n}function l(t,e){let n=(0,o.Re)(s.rq.get(),e,t.origin),i=(0,o.Om)(t.vector,n),a=(0,o.Om)(t.vector,t.vector);if(Math.abs(a)<M)return(0,o.hG)(t.origin,e);let u=(0,r.qE)(i/a,0,1),h=(0,o.Re)(s.rq.get(),(0,o.hs)(s.rq.get(),t.vector,u),n);return(0,o.Om)(h,h)}function f(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,i,a){let{vector:u,origin:h}=t,c=(0,o.Re)(s.rq.get(),e,h),l=(0,o.Om)(u,c)/(0,o.m3)(u);return(0,o.hs)(a,u,(0,r.qE)(l,n,i)),(0,o.WQ)(a,a,t.origin)}(0,a.vt)(),(0,a.vt)();const m=new i.I(()=>u()),M=1e-9},27921(t,e,n){n.d(e,{$Q:()=>T,BX:()=>O,C:()=>h,Cr:()=>d,H:()=>C,LV:()=>u,O_:()=>f,Qj:()=>c,T7:()=>w,Ui:()=>S,_I:()=>R,fA:()=>l,gv:()=>A,lU:()=>m,mN:()=>E,mP:()=>x,mR:()=>y,vE:()=>z,vt:()=>s,wE:()=>P});var r=n(34727),i=n(35522),o=n(51850),a=(n(78955),n(44280),n(32114));function s(t=F){return[t[0],t[1],t[2],t[3]]}function u(t=F[0],e=F[1],n=F[2],r=F[3]){return l(t,e,n,r,a.Km.get())}function h(t,e){return l(e[0],e[1],e[2],e[3],t)}function c(t){return t}function l(t,e,n,r,i=s()){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function f(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function d(t,e,n,r=s()){let i=n[0]-e[0],o=n[1]-e[1],a=n[2]-e[2],u=t[0]-e[0],h=t[1]-e[1],c=t[2]-e[2],l=o*c-a*h,f=a*u-i*c,d=i*h-o*u,m=l*l+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=l*M,r[1]=f*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,e,n,r=0,o=Math.floor(1/3*n),a=Math.floor(2/3*n)){if(n<3)return!1;e(b,r);let s=o,u=!1;for(;s<n-1&&!u;)e(g,s),s++,u=!(0,i.t2)(b,g);if(!u)return!1;for(s=Math.max(s,a),u=!1;s<n&&!u;)e(_,s),s++,(0,i.Re)(p,b,g),(0,i.S8)(p,p),(0,i.Re)(v,g,_),(0,i.S8)(v,v),u=!(0,i.t2)(b,_)&&!(0,i.t2)(g,_)&&Math.abs((0,i.Om)(p,v))<M;return u?(d(b,g,_,t),!0):(0!==r||1!==o||2!==a)&&m(t,e,n,0,1,2)}n(32728);const M=.99619469809,b=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)(),p=(0,o.vt)(),v=(0,o.vt)();function x(t,e,n){return e!==t&&h(t,e),t[3]=-(0,i.Om)(t,n),t}function y(t,e,n,r){return(0,i.$A)(_,e,t),f(n,_,r)}function S(t,e,n){return null!=e&&I(z(t,e.origin,e.direction,V,n))}function w(t,e,n){return I(z(t,e.origin,e.vector,0,n))}function A(t,e,n){return I(z(t,e.origin,e.vector,1,n))}function j(t,e){return E(t,e)<=0}function O(t,e){return E(t,e)>=0}function T(t,e){return function(t,e,n,r,o,a,s){let u=(0,i.Om)(t,n),h=E(t,e);if(u>-1e-6&&u<1e-6)return q(h,o,a);let c=-h/u,l=q(u,o,!1);return!(s&&!l&&!q(h,o,a))&&(l?c>r.c0&&(r.c0=c):c<r.c1&&(r.c1=c),r.c0<=r.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0)}function q(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function C(t,e,n,r=!1){let o=e.at(-1),a=E(t,o),s=r?a>0:a<=0;for(let u=0;u<e.length;u++){let h=e.at(u),c=E(t,h),l=r?c>0:c<=0;s!==l&&(0,i.Cc)(n(),o,h,a/(a-c)),l&&(0,i.C)(n(),h),o=h,a=c,s=l}}function R(t,e,n){let r=(0,i.hs)(a.rq.get(),t,-t[3]),o=function(t,e,n){let r=(0,i.hs)(a.rq.get(),t,(0,i.Om)(t,e));return(0,i.Re)(n,e,r),n}(t,(0,i.Re)(a.rq.get(),e,r),a.rq.get());return(0,i.WQ)(n,o,r),n}function E(t,e){return(0,i.Om)(t,e)+t[3]}function P(t,e,n){for(let r=0;r<n;++r)if(j(t,e[r]))return!1;return!0}function I(t){return 0===t||1===t}function z(t,e,n,o,a){let s=(0,i.Om)(t,n),u=E(t,e);if(0===s)return u>=0?2:3;let h=-u/s;return 1&o&&(h=(0,r.qE)(h,0,1)),!(4&o)&&h<0||!(8&o)&&h>1?u>=0?2:3:((0,i.WQ)(a,e,(0,i.hs)(a,n,h)),u>=0?0:1)}const F=[0,0,1,0],V=8;(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>l,Cr:()=>f,LV:()=>c,fA:()=>d,kb:()=>m,vt:()=>u});var r=n(4341),i=(n(77690),n(29242)),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?h((0,a.o8)(t.origin),(0,a.o8)(t.direction)):h((0,a.vt)(),(0,a.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=M.get();return n.origin=t,n.direction=e,n}function l(t,e=u()){return d(t.origin,t.direction,e)}function f(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.direction,e,t),n}function d(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.C)(n.direction,e),n}function m(t,e){let n=(0,o.$A)(s.rq.get(),(0,o.S8)(s.rq.get(),t.direction),(0,o.Re)(s.rq.get(),e,t.origin));return(0,o.Om)(n,n)}const M=new r.I(()=>u());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,i.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),i=n(34304),o=n(58083),a=n(35522),s=n(51850),u=n(91829),h=n(34275);var c=n(71351),l=n(44280),f=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,s.fA)(t,e,n):function(t){return e=t,(0,h.vZ)(e)&&e.length>=3||function(t){return((0,h.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,s.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,s.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,a.C)(this.center,t)}exactEquals(t){return(0,a.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,a.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,u.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,a.hG)(this.center,t)<=this.radius**2}intersects(t){let e=this.radius+t.radius;return(0,a.hG)(this.center,t.center)<=e*e}intersectRay(t,e){if(null==t||!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){let{origin:r,direction:i}=t;e[0]=r[0]+i[0]*n,e[1]=r[1]+i[1]*n,e[2]=r[2]+i[2]*n}return!0}intersectLine(t,e){let n=(0,c.Cr)(t,e);if(!this._intersect(n,m))return[];let{origin:r,direction:o}=n,{t0:u,t1:h}=m,l=t=>{let e=(0,s.vt)();return(0,a.Ln)(e,r,o,t),this.projectPoint(e,e)};return Math.abs(u-h)<(0,i.FD)()?[l(u)]:[l(u),l(h)]}_intersect(t,e){let{origin:n,direction:r}=t,i=M;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;let a=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=a*a-4*o*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(s<0)return!1;let u=Math.sqrt(s);return e.t0=(-a-u)/(2*o),e.t1=(-a+u)/(2*o),!0}projectPoint(t,e){let n=(0,a.Re)(f.rq.get(),t,this.center),r=(0,a.hs)(f.rq.get(),n,this.radius/(0,a.Bw)(n));return(0,a.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){let n=f.rq.get(),r=f.Rc.get();(0,a.$A)(n,t.origin,t.direction),(0,a.$A)(e,n,t.origin),(0,a.hs)(e,e,1/(0,a.Bw)(e)*this.radius);let i=this._angleToSilhouette(t.origin),s=(0,l.g7)(t.origin,e);return(0,o.$0)(r,s+i,n),(0,a.Z0)(e,e,r),e}frustumCoverage(t,e,n){let r=this.radius,i=r*r,o=t+.5*Math.PI,a=e*e+i-2*Math.cos(o)*e*r,s=Math.sqrt(a),u=a-i;if(u<=0)return.5;let h=Math.acos(Math.sqrt(u)/s)-Math.asin(r/(s/Math.sin(o)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){let e=(0,a.Re)(f.rq.get(),t,this.center),n=(0,a.Bw)(e),i=this.radius,o=i+Math.abs(i-n);return(0,r.XM)(i/o)}union(t){let e=(0,a.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,a.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){let{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},44280(t,e,n){n.d(e,{g7:()=>s,gr:()=>a});var r=n(34727),i=n(35522),o=n(51850);function a(t,e){return(0,i.Om)(t,e)/(0,i.Bw)(t)}function s(t,e){let n=(0,i.Om)(t,e)/((0,i.Bw)(t)*(0,i.Bw)(e));return-(0,r.XM)(n)}(0,o.vt)(),(0,o.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>l,Km:()=>f}),n(44208);var r=n(26390),i=n(29242),o=n(9093),a=n(82534),s=n(48163),u=n(51850),h=n(91829);class c{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new c(s.vt)}static createVec3f64(){return new c(u.vt)}static createVec4f64(){return new c(h.vt)}static createMat3f64(){return new c(i.vt)}static createMat4f64(){return new c(o.vt)}static createQuatf64(){return new c(a.vt)}get test(){}}c.createVec2f64();const l=c.createVec3f64(),f=c.createVec4f64(),d=(c.createMat3f64(),c.createMat4f64());c.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,nu:()=>s,wp:()=>o}),n(34727);var r=n(35522),i=n(51850);function o(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),i=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),o=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,i,o),t}function a(t,e,n){n||=t;let i=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-i*e[0],t[1]-i*e[1],t[2]-i*e[2]),(0,r.S8)(n,n)}function s(t,e,n,o=(0,i.vt)()){let a=(0,r.Bw)(t),s=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(a*s);if(c<.9999999999999999){let i=Math.acos(c),l=((1-n)*a+n*s)/Math.sin(i),f=l/a*Math.sin((1-n)*i),d=l/s*Math.sin(n*i);return(0,r.hs)(u,t,f),(0,r.hs)(h,e,d),(0,r.WQ)(o,u,h)}return(0,r.Cc)(o,t,e,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const u=(0,i.vt)(),h=(0,i.vt)()},70491(t,e,n){n.r(e),n.d(e,{default:()=>K});var r=n(32198),i=n(17676),o=n(24326),a=n(91429),s=n(35522),u=n(51850),h=n(11964),c=n(94008),l=n(93687),f=n(15142),d=n(65720),m=n(71351),M=n(620);class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),I[0]=null,N.prune(),W.prune()}add(t){let e=Array.from(t);this._grow(e);let n=g.acquire();for(let t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;let n=g.acquire();for(let r of t){let t=e??this.objectToBoundingSphere(r);C(t.radius)?(n.init(this._root),x(r,t,n)):this._degenerateObjects.delete(r)}g.release(n),this._shrink()}update(t,e){if(!C(e.radius)&&this._isDegenerate(t))return;let n=function(t){return I[0]=t,I}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){let r=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),(0,M.O_)(t.origin,t.direction,V,D)}(r,t))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){let i=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e,n){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),n.applyToMinMax(V,D),(0,M.O_)(t.origin,t.direction,V,D)}(i,t,r))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),!0})}forEach(t){for(let e of this.values())t(e)}*values(){for(let t of this._nodeIteratorValues()){let e=t.node;yield*e.terminals,null!==e.residents&&(yield*e.residents)}yield*this.degenerateObjectValues()}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}*degenerateObjectValues(){yield*this._degenerateObjects.values()}findClosest(t,e,n,r=()=>!0,i=1/0){let o=1/0,a=1/0,u=null,h=T(t,e),c=s=>{if(--i,!r(s))return;let h=this.objectToBoundingSphere(s);if(!(0,d.m7)(n,h))return;let c=q(t,e,h.center),l=c-h.radius,f=c+h.radius;l<o&&(o=l,a=f,u=s)};return v(this._root,r=>{if(i<=0||!(0,d.ZU)(n,r.bounds.center,2*r.bounds.radius)||((0,s.hs)(F,h,2*r.halfSize),(0,s.WQ)(F,F,r.bounds.center),q(t,e,F)>a))return!1;let o=r.node;return o.terminals.forAll(t=>c(t)),null!==o.residents&&o.residents.forAll(t=>c(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,i,o,a){let u=-1/0,h=1/0,c={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};c.setRange(r);let l=q(e,n,t),f=T(e,n),m=T(e,-n),M=t=>{if(!a(t))return;let r=this.objectToBoundingSphere(t),s=q(e,n,r.center)-l,f=s-r.radius,m=s+r.radius;f>h||m<u||!(0,d.m7)(o,r)||i(t,c)};v(this._root,t=>{if(!(0,d.ZU)(o,t.bounds.center,2*t.bounds.radius)||((0,s.hs)(F,f,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l>h)||((0,s.hs)(F,m,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l<u))return!1;let r=t.node;return r.terminals.forAll(t=>M(t)),null!==r.residents&&r.residents.forAll(t=>M(t)),!0},e,n)}forEachNode(t){p(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachIntersectingFrustum(t,e,n=()=>!0){for(let r of this.intersectingFrustumValues(t,n))e(r)}*intersectingFrustumValues(t,e=()=>!0){for(let n of this._nodeIteratorValues(e=>(0,d.ZU)(t,e.bounds.center,2*e.bounds.radius))){let r=n.node;for(let n of r.terminals)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n);if(null!==r.residents)for(let n of r.residents)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n)}}*_nodeIteratorValues(t=()=>!0){yield*_(this._root,t)}forEachNeighbor(t,e){let n=e.radius,r=e.center,i=n=>{let r=this.objectToBoundingSphere(n);return!e.intersects(r)||t(n)},o=!0,a=t=>{o&&=i(t)};p(this._root,t=>{let e=2*t.bounds.radius,i=n+e;if((0,s.hG)(t.bounds.center,r)-i*i>0)return!1;let u=t.node;return u.terminals.forAll(a),o&&null!==u.residents&&u.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){let n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){let r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){let e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){let r=g.acquire().init(t);this._add(e.at(n),r),g.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),B),C(B.radius)&&!this._fitsInsideTree(B))if(S(this._root.node))this._root.bounds.copyFrom(B),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{let t=this._rootBoundsForRootAsSubNode(B);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(B,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){L.center=e.bounds.center,L.radius=e.halfSize,O([t,L],t=>t,k);let n=g.acquire().init(this._root);this._root.initFrom(null,k,k.radius),this._root.increaseHalfSize(1.25),p(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){let e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E,n=0;return p(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){let e=t.radius,n=t.center,r=-1/0,i=this._root.bounds.center,o=this._root.halfSize;for(let t=0;t<3;t++){let a=i[t]-o-(n[t]-e),s=n[t]+e-(i[t]+o),u=Math.max(0,Math.ceil(a/(2*o))),h=Math.max(0,Math.ceil(s/(2*o)))+1,c=2**Math.ceil(Math.log(u+h)*Math.LOG2E);r=Math.max(r,c),Q[t].min=u,Q[t].max=h}for(let t=0;t<3;t++){let e=Q[t].min,n=Q[t].max,a=(r-(e+n))/2;e+=Math.ceil(a),n+=Math.floor(a);let s=i[t]-o-e*o*2;z.center[t]=s+(n+e)*o}let a=r*o;return z.radius=a*P,g.acquire().initFrom(null,z,a,0)}_growRootAsSubNode(t){let e=this._root.node;B.center=this._root.bounds.center,B.radius=this._root.halfSize,this._root.init(t),t.advanceTo(B,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){let t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null,e=this._root.node.children,n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!C(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){let e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){return{children:t.children.map(t=>t?this._nodeToJSON(t):null),residents:t.residents?.map(t=>this.objectToBoundingSphere(t)),terminals:t.terminals?.map(t=>this.objectToBoundingSphere(t))}}}class g{constructor(){this.bounds=new c.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=t??g.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*P}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;let n=R[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}let r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){let e=this.bounds.center;return+(e[0]<t.center[0])+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new l.A(()=>new g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function*_(t,e=()=>!0){let n=[g.acquire().init(t)];for(;0!==n.length;){let t=n.pop();if(e(t)){if(yield t,!t.isLeaf())for(let e=0;e<t.node.children.length;e++)t.node.children[e]&&n.push(g.acquire().init(t).advance(e));g.release(t)}}}function p(t,e){let n=_(t,e);for(let t of n);}function v(t,e,n,r=1){let i=g.acquire().init(t),o=[i];for(function(t,e,n){if(!W.length)for(let t=0;t<8;++t)W.push({index:0,distance:0});for(let n=0;n<8;++n){let r=R[n];W.data[n].index=n,W.data[n].distance=q(t,e,r)}W.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=W.data[t].index}(n,r,Z);0!==o.length;){if(i=o.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){let e=Z[t];i.node.children[e]&&o.push(g.acquire().init(i).advance(e))}g.release(i)}}function x(t,e,n){N.clear();let r=n.advanceTo(e,(t,e)=>{N.push(t.node),N.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=N.length-2;t>=0&&y(N.data[t],N.data[t+1]);t-=2);}function y(t,e){return e>=0&&(t.children[e]=null),!!S(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function S(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function w(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function A(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function j(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function O(t,e,n){V[0]=1/0,V[1]=1/0,V[2]=1/0,D[0]=-1/0,D[1]=-1/0,D[2]=-1/0;for(let n of t){let t=e(n);C(t.radius)&&(w(V,t),A(D,t))}(0,s.Cc)(n.center,V,D,.5),n.radius=Math.max(D[0]-V[0],D[1]-V[1],D[2]-V[2])/2}function T(t,e){let n,r=1/0;for(let i=0;i<8;++i){let o=q(t,e,E[i]);o<r&&(r=o,n=E[i])}return n}function q(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function C(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const R=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],E=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],P=Math.sqrt(3),I=[null],z=new c.iy,F=(0,u.vt)(),V=(0,u.vt)(),D=(0,u.vt)(),N=new f.A,B=new c.iy,L=new c.iy,k=new c.iy,Q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],W=new f.A,Z=[0,0,0,0,0,0,0,0];var H=n(44801);function $(t,e,n){let r=new c.iy;return(0,s.hs)(r.center,t,.5),(0,s.Ln)(r.center,r.center,e,.5),r.radius=(0,s.Io)(r.center,t),(0,s.WQ)(r.center,r.center,n),r}class U{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class X extends U{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class J extends U{constructor(t,e,n,r,i){super(t,e,n),this.start=r,this.end=i,this.type="edge"}}let Y=class{constructor(){this._idToComponent=new Map,this._components=new b(t=>t.bounds),this._edges=new b(t=>t.bounds),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,i.Te)(e);let n=t;n.mbs=new c.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);let r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){let n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){let{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;let r={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(let t of i.components)this._setFetchEdgeLocations(t)}async add(t){let e=new tt(t.id,new c.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){let e=this._idToComponent.get(t.id);if(e){let t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){let e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;let n=H.HY.createView(t.locations),r=Array(n.count),i=(0,u.vt)(),o=(0,u.vt)();for(let a=0;a<n.count;a++){n.position0.getVec(a,i),n.position1.getVec(a,o);let s=$(i,o,t.origin),u=new et(e,a,s);r[a]=u}this._edges.add(r);let{objectIds:a,origin:s}=t;e.info={locations:n,objectIds:a,origin:s}}_addCandidates(t,e,n){let{info:r}=e.component,{origin:i,objectIds:o}=r,a=r.locations,u=a.position0.getVec(e.index,this._tmpP1),h=a.position1.getVec(e.index,this._tmpP2);(0,s.WQ)(u,u,i),(0,s.WQ)(h,h,i);let c=o[a.componentIndex.get(e.index)];this._addEdgeCandidate(t,c,u,h,n),G(t,c,u,n),G(t,c,h,n)}_addEdgeCandidate(t,e,n,r,i){if(!t.returnEdge)return;let o=t.mbs.center,a=(0,h.Cr)(n,r,this._tmpLineSegment),c=(0,h._I)(a,o,this._tmpP3);t.mbs.contains(c)&&i.push(new J(e,(0,u.o8)(c),(0,s.Io)(o,c),(0,u.o8)(n),(0,u.o8)(r)))}};Y=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const K=Y;function G(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new X(e,(0,u.o8)(n),(0,s.Io)(t.mbs.center,n)))}class tt{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,o.c)()}}class et{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[161],{51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function u(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function s(){return o(1,1,1)}function l(){return o(1,0,0)}function f(){return o(0,1,0)}function c(){return o(0,0,1)}n.d(e,{CN:()=>a,ci:()=>u,fA:()=>o,o8:()=>i,vt:()=>r});const h=[0,0,0],m=s(),d=l(),M=f(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:M,UNIT_Z:g,ZEROS:h,clone:i,create:r,freeze:a,fromArray:u,fromValues:o,ones:s,unitX:l,unitY:f,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,g,"Cw",0,d,"JP",0,M,"Un",0,m,"uY",0,h])},34304(t,e,n){n.d(e,{DF:()=>s,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const o=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function l(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:s},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,o])},37585(t,e,n){n.d(e,{C:()=>o,Cc:()=>A,Io:()=>g,LI:()=>m,Ln:()=>M,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>c,WQ:()=>u,aI:()=>_,e$:()=>S,hG:()=>y,hZ:()=>a,hs:()=>d,l0:()=>x,qE:()=>h,t2:()=>I});var r=n(34727),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t}function a(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e,n,i){return t[0]=(0,r.qE)(e[0],n[0],i[0]),t[1]=(0,r.qE)(e[1],n[1],i[1]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function M(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function g(t,e){let n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function p(t){let e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function b(t){let e=t[0],n=t[1];return e*e+n*n}function w(t,e){let n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function A(t,e,n,r){let i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function x(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function S(t,e,n,r){let i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){let n=t[0],r=t[1],o=e[0],a=e[1],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const U=p,E=s,N=l,C=f,T=g,q=y,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){let n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));let u=i*i+o*o;u>0&&(u=1/Math.sqrt(u));let s=(n*i+r*o)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},clamp:h,copy:o,cross:function(t,e,n){let r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:T,distance:g,div:C,divide:f,dot:v,equals:_,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:U,length:p,lerp:A,max:c,min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:N,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:w,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],a=e[1]-n[1],u=(r[0]*o+r[1]*a)*(i-1);return o=r[0]*u,a=r[1]*u,t[0]=e[0]+o,t[1]=e[1]+a,t},random:function(t,e=1){let n=2*(0,i.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:S,round:m,scale:d,scaleAndAdd:M,set:a,sqrDist:q,sqrLen:O,squaredDistance:y,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:E,subtract:s,transformMat2:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:x,transformMat3:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,U,"jb",0,E,"xg",0,T])},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>o,C:()=>a,Cc:()=>_,DI:()=>A,Io:()=>p,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>x,T9:()=>M,WQ:()=>s,Z0:()=>U,_S:()=>m,aI:()=>B,ei:()=>E,fw:()=>C,gL:()=>N,hG:()=>b,hZ:()=>u,hs:()=>g,jk:()=>d,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>O,tn:()=>h,ze:()=>v});var r=n(51850),i=n(34304);function o(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function M(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function w(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function x(t,e=t){let n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function _(t,e,n,r){let i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function U(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function E(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,i,o){let a=e[0],u=e[1],s=e[2],l=r*s-i*u,f=i*a-n*s,c=n*u-r*a,h=r*c-i*f,m=i*l-n*c,d=n*f-r*l,M=2*o;return t[0]=a+l*M+2*h,t[1]=u+f*M+2*m,t[2]=s+c*M+2*d,t}const T=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function B(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=e[0],u=e[1],s=e[2],l=(0,i.FD)();return Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))}function F(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2],a=r*r+i*i+o*o;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=o*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const z=l,P=f,L=c,R=p,V=b,D=o,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,e){x(T,t),x(q,e);let n=S(T,q);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){let a=1-o,u=a*a,s=o*o,l=u*a,f=3*o*u,c=3*s*a,h=s*o;return t[0]=e[0]*l+n[0]*f+r[0]*c+i[0]*h,t[1]=e[1]*l+n[1]*f+r[1]*c+i[1]*h,t[2]=e[2]*l+n[2]*f+r[2]*c+i[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],l=i*s-o*u,f=o*a-r*s,c=r*u-i*a,h=Math.sqrt(l*l+f*f+c*c);return t[0]=l/h,t[1]=f/h,t[2]=c/h,t},direction:F,dist:R,distance:p,div:L,divide:c,dot:S,equals:B,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){let a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,l=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*l+i[0]*f,t[1]=e[1]*u+n[1]*s+r[1]*l+i[1]*f,t[2]=e[2]*u+n[2]*s+r[2]*l+i[2]*f,t},inverse:A,len:D,length:o,lerp:_,max:M,min:d,mul:P,multiply:f,negate:v,normalize:x,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=o*e,t},rotateX:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,scaleTo:function(t,e){return g(t,t,e/D(t))},set:u,sign:m,sqrDist:V,sqrLen:W,squaredDistance:b,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:z,subtract:l,transformMat3:E,transformMat4:U,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:N,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,D,"jb",0,z,"lo",0,V,"uE",0,W])},34727(t,e,n){n.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>g,Io:()=>A,KJ:()=>f,OS:()=>U,Sp:()=>m,XM:()=>c,YN:()=>h,ZH:()=>M,b6:()=>x,cU:()=>i,gg:()=>d,hs:()=>s,kU:()=>l,mP:()=>a,or:()=>_,pF:()=>N,qE:()=>o});const r=new Float32Array(1);function i(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e){return 0===e?0:Math.ceil(t/e)*e}function u(t,e,n){return t+(e-t)*n}function s(t,e,n,r,i){return u(r,i,(t-e)/(n-e))}function l(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function c(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function d(t,e,n=1e-6){return!m(t,e,n)&&t>e}function M(t,e,n=1e-6){return!m(t,e,n)&&t<e}function g(t,e,n=1e-6){return m(t,e,n)||t>e}const y=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return y.setFloat64(0,t),y.getBigInt64(0)}const b=1000000n,w=v(1);function v(t){let e=p(t=Math.abs(t)),n=function(t){return y.setBigInt64(0,t),y.getFloat64(0)}(e<=b?b:e-b);return Math.abs(t-n)}function A(t,e,n=w){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&v(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;let r=p(t),i=p(e);return!(r<0!=i<0||(r<i?i-r:r-i)>b)}function x(t,e,n=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;let r=Math.abs(t-e),i=Math.abs(t),o=Math.abs(e);if(0===t||0===e||i<1e-12&&o<1e-12){if(r>.01*n)return!1}else if(r/(i+o)>n)return!1;return!0}function S(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return r[0]=t,r[0]}function _(t){let e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(e,1)&&m(n,1)&&m(r,1))}function U(t,e){return(t%e+e)%e}const E=I(34028234663852886e22);function N(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}n.d(e,["pq",0,E])},97146(t,e,n){n.d(e,{Dg:()=>o,lC:()=>u,my:()=>a,tM:()=>c,uW:()=>i});var r=n(34275);function i(t){return o(t,!0)}function o(t,e){if(Array.isArray(t)){if(t.length<1024)return t}else if(t.length<1024)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n&&=0===t,i&&=t===e,!n&&!i)),n?function(t){if(1===t)return l;if(t<1024)return Array(t).fill(0);if(t>m.length){let e=Math.max(2*m.length,t);m=new Uint8Array(e)}return new Uint8Array(m.buffer,0,t)}(t.length):i?c(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(let n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t,e=t){return t<=1024?Array(t):e<=65536?new Uint16Array(t):new Uint32Array(t)}function u(t,e,n){if(0===e.length)return t.slice();if(0===t.length)return e.slice();let r=a(t.length+e.length,n);for(let e=0;e<t.length;++e)r[e]=t[e];for(let n=0;n<e.length;++n)r[t.length+n]=e[n];return r}let s=h(131072);const l=[0],f=(()=>{let t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function c(t){return 1===t?l:t<1024?Array.from(new Uint16Array(f.buffer,0,t)):t<f.length?new Uint16Array(f.buffer,0,t):(t>s.length&&(s=h(Math.max(2*s.length,t))),new Uint32Array(s.buffer,0,t))}function h(t){let e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let m=new Uint8Array(65536)},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>o});var r=n(34727),i=n(35522);function o(t,e,n,r,i,o=2,a=0){let s=1/(Math.abs(n)+Math.abs(r)+Math.abs(i)),l=n*s,f=r*s,c=i<=0?(l>=0?1:-1)*(1-Math.abs(f)):l,h=i<=0?(f>=0?1:-1)*(1-Math.abs(l)):f,m=e*o+a;t[m]=u(c),t[m+1]=u(h)}function a(t,e,n,r=2,o=0){let a=n*r+o,u=s(e[a]),l=s(e[a+1]),f=1-Math.abs(u)-Math.abs(l);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(l)),t[1]=(l>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=l),(0,i.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}n(51850)},99058(t,e,n){n.d(e,{I$:()=>y,gr:()=>w,In:()=>v});var r=n(4431),i=n(1843),o=n(63907);class a{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=o.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=u[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const u={36244:1,33320:2,36249:4},s={[o.H0.R32UI]:36244,[o.H0.RG32UI]:33320,[o.H0.RGBA32UI]:36249},l=[new a(o.H0.RGBA32UI),new a(o.H0.RG32UI),new a(o.H0.R32UI)];function f(t){let e=1/0,n=null;for(let r of l){let i=r.byteStride,o=(i-t%i)%i;o<e&&(e=o,n=r)}return n??l[2]}var c=n(13030),h=n(90239);class m{constructor(t,e,n){this.elementCount=t,this.elementType=e,this.bufferViewConstructor=n,this.byteSize=function(t){return(0,h.GJ)(t.ElementType)*t.ElementCount}(n)}}const d={u8:new m(1,"uint",c.SL),u32:new m(1,"uint",c.P),vec4u32:new m(4,"uint",c.ml),vec4u8:new m(4,"uint",c.XP),unorm8:new m(1,"float",c.dy),vec4unorm8:new m(4,"float",c.td),snorm16:new m(1,"float",c.Qy),vec2snorm16:new m(2,"float",c.ES),f16:new m(1,"float",c.XW),vec4f16:new m(4,"float",c.jz),f32:new m(1,"float",c.Y$),vec2f32:new m(2,"float",c.gH),vec3f32:new m(3,"float",c.xs),vec4f32:new m(4,"float",c.Eq),mat3f32:new m(9,"float",c.jZ)};class M{constructor(t,e,n,r){this._declaration=t,this._byteOffset=e,this._creationInfo=r,this._startTexel=Math.floor(e/n);let i=r.byteSize;this._numTexels=Math.ceil((e+i)/n)-this._startTexel,this._texelByteStride=n}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class g{constructor(t,e,n,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof e?new ArrayBuffer(e*t.byteStride):e,this.texelElementBuffer=new n(this.buffer,r);let i=this._bufferViews;for(let[t,e]of this.layout.fields)i.set(t,new e.bufferViewConstructor(this.buffer,r+e.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,e){let n=this._bufferViews.get(t);return null!=n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}copyItem(t,e){let{buffer:n,layout:r,byteOffset:i}=this,o=new Uint8Array(n),a=r.byteStride,u=i+t*a,s=i+e*a;o.copyWithin(s,u,u+a)}get usedMemory(){return this.byteLength}}const y=(0,i.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),p=(0,i.BP)().vec2u8("sideness").freeze(),b=(0,r.U)(p),w=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),v=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),A=(0,r.U)(w,1),x=(0,r.U)(v,1);b.concat(A),b.concat(x),new class{constructor(t){this._fields=new Map;let e=0,n=[];for(let r=0;r<t.length;++r){let i=t[r],{type:o}=i,a=d[o];n.push({declaration:i,byteOffset:e,creationInfo:a}),e+=a.byteSize}this.texelFormatInfo=f(e);let{texelByteStride:r}=this;e=Math.ceil(e/r)*r;let i=e,o=this._fields;for(let{declaration:t,byteOffset:e,creationInfo:i}of n)o.set(t.name,new M(t,e,r,i));this.byteStride=i,this.texelStride=Math.ceil(i/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new g(this,t,this.texelElementArrayConstructor)}createView(t,e){return new g(this,t,this.texelElementArrayConstructor,e)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,e,n){n.d(e,{K:()=>u});var r=n(34727),i=n(15142),o=n(35522),a=n(51850);function u(t,e,n){let r=t.vertices.position,i=t.vertices.componentIndex,a=d.position0,u=d.position1,f=d.faceNormal0,h=d.faceNormal1,{edges:m,normals:M}=l(t),g=m.length/4,y=e.allocate(g),p=0,b=g,A=n?.allocate(b),S=0,I=0,_=0;c.length=0;for(let t=0;t<g;++t){let e=4*t;r.getVec(m.data[e],a),r.getVec(m.data[e+1],u);let n=c.pushNew();n.index=4*t,n.length=(0,o.Io)(a,u)}c.sort((t,e)=>e.length-t.length);let U=[],E=[];c.forAll(({length:t,index:l})=>{let c=m.data[l],g=m.data[l+1],b=m.data[l+2],N=m.data[l+3],C=-1===N;if(r.getVec(c,a),r.getVec(g,u),C){let t=3*b;(0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),(0,o.C)(h,f),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h)}else{let t=3*b;if((0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),t=3*N,(0,o.hZ)(h,M.data[t],M.data[t+1],M.data[t+2]),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h),function(t,e){return t.cosAngle>e}(d,v))return;d.cosAngle<-.9999&&(0,o.C)(h,f)}I+=t,_++,C||function(t,e){return t.cosAngle<e}(d,x)?(e.write(y,p++,d),U.push(t)):s(d,w)&&(A&&n&&n.write(A,S++,d),E.push(t))});let N=new Float32Array(U.reverse()),C=new Float32Array(E.reverse()),T=A&&n?{instancesData:A.slice(0,S),lodInfo:{lengths:C}}:void 0;return{regular:{instancesData:y.slice(0,p),lodInfo:{lengths:N}},silhouette:T,averageEdgeLength:I/_}}function s(t,e){let n=(0,r.XM)(t.cosAngle);return(0,o.oW)(g,t.position1,t.position0),n*((0,o.Om)((0,o.$A)(M,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function l(t){let e=t.faces.length/3,n=t.faces,r=t.neighbors,i=t.vertices.position;h.length=m.length=0;for(let t=0;t<e;t++){let e=3*t,a=r[e],u=r[e+1],s=r[e+2],l=n[e],f=n[e+1],c=n[e+2];i.getVec(l,y),i.getVec(f,p),i.getVec(c,b),(0,o.Re)(p,p,y),(0,o.Re)(b,b,y),(0,o.$A)(y,p,b),(0,o.S8)(y,y),m.pushArray(y),(-1===a||l<f)&&(h.push(l),h.push(f),h.push(t),h.push(a)),(-1===u||f<c)&&(h.push(f),h.push(c),h.push(t),h.push(u)),(-1===s||c<l)&&(h.push(c),h.push(l),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const c=new i.A({allocator:t=>t||new f,deallocator:null}),h=new i.A({deallocator:null}),m=new i.A({deallocator:null}),d=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},M=(0,a.vt)(),g=(0,a.vt)(),y=(0,a.vt)(),p=(0,a.vt)(),b=(0,a.vt)(),w=(0,r.kU)(4),v=Math.cos(w),A=(0,r.kU)(35),x=Math.cos(A)},44801(t,e,n){n.d(e,{o6:()=>U,HY:()=>O,hx:()=>E,Jb:()=>q});var r=n(34727),i=n(97146);function o(t,e,n){let o=Array.isArray(t),f=o?t.length/e:t.byteLength/(4*e),c=o?t:new Uint32Array(t,0,f*e),h=n?.minReduction??0,m=n?.originalIndices||null,d=m?m.length:0,M=n?.componentOffsets||null,g=0;if(M)for(let t=0;t<M.length-1;t++){let e=M[t+1]-M[t];e>g&&(g=e)}else g=f;let y=Math.floor(1.1*g)+1;(null==l||l.length<2*y)&&(l=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)l[t]=0;let p=0,b=!!M&&!!m,w=b?d:f,v=(0,i.my)(f),A=new Uint32Array(d),x=1.96,S=0===h?w:Math.ceil(4*x*x/(h*h)*h*(1-h)),I=1,_=M?M[1]:w;for(let t=0;t<w;t++){if(t===S){let e=1-p/t;if(e+x*Math.sqrt(e*(1-e)/t)<h)return null;S*=2}if(t===_){for(let t=0;t<2*y;t++)l[t]=0;if(m)for(let t=M[I-1];t<M[I];t++)A[t]=v[m[t]];_=M[++I]}let n=b?m[t]:t,r=n*e,i=s(c,r,e),o=i%y,u=p;for(;0!==l[2*o+1];){if(l[2*o]===i){let t=l[2*o+1]-1;if(a(c,r,t*e,e)){u=v[t];break}}o++,o>=y&&(o-=y)}u===p&&(l[2*o]=i,l[2*o+1]=n+1,p++),v[n]=u}if(0!==h&&1-p/f<h)return null;if(b){for(let t=M[I-1];t<A.length;t++)A[t]=v[m[t]];v=(0,i.uW)(A)}let U=o?Array(p):new Uint32Array(p*e);p=0;for(let t=0;t<w;t++)v[t]===p&&(u(c,(b?m[t]:t)*e,U,p*e,e),p++);if(m&&!b){let t=new Uint32Array(d);for(let e=0;e<t.length;e++)t[e]=v[m[e]];v=(0,i.uW)(t)}return{buffer:Array.isArray(U)?U:U.buffer,indices:v,uniqueCount:p}}function a(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function u(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function s(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null;function f(t,e,n){let r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),a=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];a(n,r),a(r,i),a(i,n)}let u=0,s=0;for(let t=0;t<n;t++){let e=i[t+1],n=o[t+1];i[t+1]=u,o[t+1]=s,u+=e,s+=n}let l=new Uint32Array(6*r),f=i[n],c=(t,e,n)=>{if(t<e){let r=i[t+1]++;l[2*r]=e,l[2*r+1]=n}else{let r=o[e+1]++;l[2*f+2*r]=t,l[2*f+2*r+1]=n}};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];c(n,r,e),c(r,i,e),c(i,n,e)}let h=(t,e)=>{let n=2*t,r=e-t;for(let t=1;t<r;t++){let e=l[n+2*t],r=l[n+2*t+1],i=t-1;for(;i>=0&&l[n+2*i]>e;i--)l[n+2*i+2]=l[n+2*i],l[n+2*i+3]=l[n+2*i+1];l[n+2*i+2]=e,l[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(f+o[t],f+o[t+1]);let m=new Int32Array(3*r),d=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,M=(t,e)=>{let n=d(t,e);m[3*e+n]=-1},g=(t,e,n,r)=>{let i=d(t,e);m[3*e+i]=r;let o=d(n,r);m[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t],n=i[t+1],r=o[t],a=o[t+1];for(;e<n&&r<a;){let n=l[2*e],i=l[2*f+2*r];n===i?(g(t,l[2*e+1],i,l[2*f+2*r+1]),e++,r++):n<i?(M(t,l[2*e+1]),e++):(M(i,l[2*f+2*r+1]),r++)}for(;e<n;)M(t,l[2*e+1]),e++;for(;r<a;)M(l[2*f+2*r],l[2*f+2*r+1]),r++}return m}var c=n(1843),h=n(99058),m=n(87811),d=n(35522),M=n(51850),g=n(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,e,n){I.seed=this._edgeHashFunction(n);let r=I.getIntRange(0,255),i=I.getIntRange(0,this.settings.variants-1),o=I.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(o/.7,1))+Math.max(0,o-.7)/.30000000000000004)+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,i),t.variantExtension.set(e,a)}}const p=new Float32Array(6),b=new Uint32Array(p.buffer),w=new Uint32Array(1);function v(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+b[0])+b[1])+b[2])+b[3])+b[4])+b[5],w[0]}function A(t){let e=p;e[0]=x(t.position0[0]),e[1]=x(t.position0[1]),e[2]=x(t.position0[2]),e[3]=x(t.position1[0]),e[4]=x(t.position1[1]),e[5]=x(t.position1[2]),w[0]=5381;for(let t=0;t<b.length;t++)w[0]=31*w[0]+b[t];return w[0]}function x(t){return Math.round(1e4*t)/1e4}const S=(0,M.vt)(),I=new m.A;var _=n(93406);function U(t){let e=E(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return C.updateSettings(t.writerSettings),T.updateSettings(t.writerSettings),(0,_.K)(e,C,T)}function E(t,e,n,r){if(e){let e=f(n,r,t.count);return new N(n,r,e,t)}let i=o(t.buffer,t.stride/4,{originalIndices:n}),a=f(i.indices,r,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:a,vertices:h.I$.createView(i.buffer)}}class N{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const C=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,d.WQ)(S,n.faceNormal0,n.faceNormal1),(0,d.S8)(S,S);let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,S[0],S[1],S[2],i)}},T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],i)}{let{typedBuffer:r,typedBufferStride:i}=t.normal2Compressed;(0,g.aT)(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],i)}}},q=(0,c.BP)().vec3f("position0").vec3f("position1"),O=(0,c.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[161],{51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function u(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function s(){return o(1,1,1)}function l(){return o(1,0,0)}function f(){return o(0,1,0)}function c(){return o(0,0,1)}n.d(e,{CN:()=>a,ci:()=>u,fA:()=>o,o8:()=>i,vt:()=>r});const h=[0,0,0],m=s(),d=l(),M=f(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:M,UNIT_Z:g,ZEROS:h,clone:i,create:r,freeze:a,fromArray:u,fromValues:o,ones:s,unitX:l,unitY:f,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,g,"Cw",0,d,"JP",0,M,"Un",0,m,"uY",0,h])},34304(t,e,n){n.d(e,{DF:()=>s,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const o=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function l(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:s},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,o])},37585(t,e,n){n.d(e,{C:()=>o,Cc:()=>A,Io:()=>g,LI:()=>m,Ln:()=>M,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>c,WQ:()=>u,aI:()=>_,e$:()=>S,hG:()=>y,hZ:()=>a,hs:()=>d,l0:()=>x,qE:()=>h,t2:()=>I});var r=n(34727),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t}function a(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e,n,i){return t[0]=(0,r.qE)(e[0],n[0],i[0]),t[1]=(0,r.qE)(e[1],n[1],i[1]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function M(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function g(t,e){let n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function p(t){let e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function b(t){let e=t[0],n=t[1];return e*e+n*n}function w(t,e){let n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function A(t,e,n,r){let i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function x(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function S(t,e,n,r){let i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){let n=t[0],r=t[1],o=e[0],a=e[1],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const U=p,E=s,N=l,C=f,T=g,q=y,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){let n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));let u=i*i+o*o;u>0&&(u=1/Math.sqrt(u));let s=(n*i+r*o)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},clamp:h,copy:o,cross:function(t,e,n){let r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:T,distance:g,div:C,divide:f,dot:v,equals:_,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:U,length:p,lerp:A,max:c,min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:N,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:w,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],a=e[1]-n[1],u=(r[0]*o+r[1]*a)*(i-1);return o=r[0]*u,a=r[1]*u,t[0]=e[0]+o,t[1]=e[1]+a,t},random:function(t,e=1){let n=2*(0,i.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:S,round:m,scale:d,scaleAndAdd:M,set:a,sqrDist:q,sqrLen:O,squaredDistance:y,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:E,subtract:s,transformMat2:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:x,transformMat3:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,U,"jb",0,E,"xg",0,T])},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>o,C:()=>a,Cc:()=>_,DI:()=>A,Io:()=>p,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>x,T9:()=>M,WQ:()=>s,Z0:()=>U,_S:()=>m,aI:()=>B,ei:()=>E,fw:()=>C,gL:()=>N,hG:()=>b,hZ:()=>u,hs:()=>g,jk:()=>d,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>O,tn:()=>h,ze:()=>v});var r=n(51850),i=n(34304);function o(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function M(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function w(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function x(t,e=t){let n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function _(t,e,n,r){let i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function U(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function E(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,i,o){let a=e[0],u=e[1],s=e[2],l=r*s-i*u,f=i*a-n*s,c=n*u-r*a,h=r*c-i*f,m=i*l-n*c,d=n*f-r*l,M=2*o;return t[0]=a+l*M+2*h,t[1]=u+f*M+2*m,t[2]=s+c*M+2*d,t}const T=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function B(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=e[0],u=e[1],s=e[2],l=(0,i.FD)();return Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))}function F(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2],a=r*r+i*i+o*o;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=o*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const z=l,P=f,L=c,R=p,V=b,D=o,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,e){x(T,t),x(q,e);let n=S(T,q);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){let a=1-o,u=a*a,s=o*o,l=u*a,f=3*o*u,c=3*s*a,h=s*o;return t[0]=e[0]*l+n[0]*f+r[0]*c+i[0]*h,t[1]=e[1]*l+n[1]*f+r[1]*c+i[1]*h,t[2]=e[2]*l+n[2]*f+r[2]*c+i[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],l=i*s-o*u,f=o*a-r*s,c=r*u-i*a,h=Math.sqrt(l*l+f*f+c*c);return t[0]=l/h,t[1]=f/h,t[2]=c/h,t},direction:F,dist:R,distance:p,div:L,divide:c,dot:S,equals:B,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){let a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,l=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*l+i[0]*f,t[1]=e[1]*u+n[1]*s+r[1]*l+i[1]*f,t[2]=e[2]*u+n[2]*s+r[2]*l+i[2]*f,t},inverse:A,len:D,length:o,lerp:_,max:M,min:d,mul:P,multiply:f,negate:v,normalize:x,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=o*e,t},rotateX:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,scaleTo:function(t,e){return g(t,t,e/D(t))},set:u,sign:m,sqrDist:V,sqrLen:W,squaredDistance:b,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:z,subtract:l,transformMat3:E,transformMat4:U,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:N,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,D,"jb",0,z,"lo",0,V,"uE",0,W])},34727(t,e,n){n.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>g,Io:()=>A,KJ:()=>f,OS:()=>U,Sp:()=>m,XM:()=>c,YN:()=>h,ZH:()=>M,b6:()=>x,cU:()=>i,gg:()=>d,hs:()=>s,kU:()=>l,mP:()=>a,or:()=>_,pF:()=>N,qE:()=>o});const r=new Float32Array(1);function i(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e){return 0===e?0:Math.ceil(t/e)*e}function u(t,e,n){return t+(e-t)*n}function s(t,e,n,r,i){return u(r,i,(t-e)/(n-e))}function l(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function c(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function d(t,e,n=1e-6){return!m(t,e,n)&&t>e}function M(t,e,n=1e-6){return!m(t,e,n)&&t<e}function g(t,e,n=1e-6){return m(t,e,n)||t>e}const y=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return y.setFloat64(0,t),y.getBigInt64(0)}const b=1000000n,w=v(1);function v(t){let e=p(t=Math.abs(t)),n=function(t){return y.setBigInt64(0,t),y.getFloat64(0)}(e<=b?b:e-b);return Math.abs(t-n)}function A(t,e,n=w){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&v(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;let r=p(t),i=p(e);return!(r<0!=i<0||(r<i?i-r:r-i)>b)}function x(t,e,n=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;let r=Math.abs(t-e),i=Math.abs(t),o=Math.abs(e);if(0===t||0===e||i<1e-12&&o<1e-12){if(r>.01*n)return!1}else if(r/(i+o)>n)return!1;return!0}function S(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return r[0]=t,r[0]}function _(t){let e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(e,1)&&m(n,1)&&m(r,1))}function U(t,e){return(t%e+e)%e}const E=I(34028234663852886e22);function N(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}n.d(e,["pq",0,E])},97146(t,e,n){n.d(e,{Dg:()=>o,lC:()=>u,my:()=>a,tM:()=>c,uW:()=>i});var r=n(34275);function i(t){return o(t,!0)}function o(t,e){if(Array.isArray(t)){if(t.length<1024)return t}else if(t.length<1024)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n&&=0===t,i&&=t===e,!n&&!i)),n?function(t){if(1===t)return l;if(t<1024)return Array(t).fill(0);if(t>m.length){let e=Math.max(2*m.length,t);m=new Uint8Array(e)}return new Uint8Array(m.buffer,0,t)}(t.length):i?c(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(let n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t,e=t){return t<=1024?Array(t):e<=65536?new Uint16Array(t):new Uint32Array(t)}function u(t,e,n){if(0===e.length)return t.slice();if(0===t.length)return e.slice();let r=a(t.length+e.length,n);for(let e=0;e<t.length;++e)r[e]=t[e];for(let n=0;n<e.length;++n)r[t.length+n]=e[n];return r}let s=h(131072);const l=[0],f=(()=>{let t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function c(t){return 1===t?l:t<1024?function(t){let e=Array(t).fill(0);for(let n=0;n<t;n++)e[n]=n;return e}(t):t<f.length?new Uint16Array(f.buffer,0,t):(t>s.length&&(s=h(Math.max(2*s.length,t))),new Uint32Array(s.buffer,0,t))}function h(t){let e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let m=new Uint8Array(65536)},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>o});var r=n(34727),i=n(35522);function o(t,e,n,r,i,o=2,a=0){let s=1/(Math.abs(n)+Math.abs(r)+Math.abs(i)),l=n*s,f=r*s,c=i<=0?(l>=0?1:-1)*(1-Math.abs(f)):l,h=i<=0?(f>=0?1:-1)*(1-Math.abs(l)):f,m=e*o+a;t[m]=u(c),t[m+1]=u(h)}function a(t,e,n,r=2,o=0){let a=n*r+o,u=s(e[a]),l=s(e[a+1]),f=1-Math.abs(u)-Math.abs(l);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(l)),t[1]=(l>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=l),(0,i.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}n(51850)},99058(t,e,n){n.d(e,{I$:()=>y,gr:()=>w,In:()=>v});var r=n(4431),i=n(1843),o=n(63907);class a{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=o.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=u[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const u={36244:1,33320:2,36249:4},s={[o.H0.R32UI]:36244,[o.H0.RG32UI]:33320,[o.H0.RGBA32UI]:36249},l=[new a(o.H0.RGBA32UI),new a(o.H0.RG32UI),new a(o.H0.R32UI)];function f(t){let e=1/0,n=null;for(let r of l){let i=r.byteStride,o=(i-t%i)%i;o<e&&(e=o,n=r)}return n??l[2]}var c=n(13030),h=n(90239);class m{constructor(t,e,n){this.elementCount=t,this.elementType=e,this.bufferViewConstructor=n,this.byteSize=function(t){return(0,h.GJ)(t.ElementType)*t.ElementCount}(n)}}const d={u8:new m(1,"uint",c.SL),u32:new m(1,"uint",c.P),vec4u32:new m(4,"uint",c.ml),vec4u8:new m(4,"uint",c.XP),unorm8:new m(1,"float",c.dy),vec4unorm8:new m(4,"float",c.td),snorm16:new m(1,"float",c.Qy),vec2snorm16:new m(2,"float",c.ES),f16:new m(1,"float",c.XW),vec4f16:new m(4,"float",c.jz),f32:new m(1,"float",c.Y$),vec2f32:new m(2,"float",c.gH),vec3f32:new m(3,"float",c.xs),vec4f32:new m(4,"float",c.Eq),mat3f32:new m(9,"float",c.jZ)};class M{constructor(t,e,n,r){this._declaration=t,this._byteOffset=e,this._creationInfo=r,this._startTexel=Math.floor(e/n);let i=r.byteSize;this._numTexels=Math.ceil((e+i)/n)-this._startTexel,this._texelByteStride=n}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class g{constructor(t,e,n,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof e?new ArrayBuffer(e*t.byteStride):e,this.texelElementBuffer=new n(this.buffer,r);let i=this._bufferViews;for(let[t,e]of this.layout.fields)i.set(t,new e.bufferViewConstructor(this.buffer,r+e.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,e){let n=this._bufferViews.get(t);return null!=n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}copyItem(t,e){let{buffer:n,layout:r,byteOffset:i}=this,o=new Uint8Array(n),a=r.byteStride,u=i+t*a,s=i+e*a;o.copyWithin(s,u,u+a)}get usedMemory(){return this.byteLength}}const y=(0,i.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),p=(0,i.BP)().vec2u8("sideness").freeze(),b=(0,r.U)(p),w=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),v=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),A=(0,r.U)(w,1),x=(0,r.U)(v,1);b.concat(A),b.concat(x),new class{constructor(t){this._fields=new Map;let e=0,n=[];for(let r=0;r<t.length;++r){let i=t[r],{type:o}=i,a=d[o];n.push({declaration:i,byteOffset:e,creationInfo:a}),e+=a.byteSize}this.texelFormatInfo=f(e);let{texelByteStride:r}=this;e=Math.ceil(e/r)*r;let i=e,o=this._fields;for(let{declaration:t,byteOffset:e,creationInfo:i}of n)o.set(t.name,new M(t,e,r,i));this.byteStride=i,this.texelStride=Math.ceil(i/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new g(this,t,this.texelElementArrayConstructor)}createView(t,e){return new g(this,t,this.texelElementArrayConstructor,e)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,e,n){n.d(e,{K:()=>u});var r=n(34727),i=n(15142),o=n(35522),a=n(51850);function u(t,e,n){let r=t.vertices.position,i=t.vertices.componentIndex,a=d.position0,u=d.position1,f=d.faceNormal0,h=d.faceNormal1,{edges:m,normals:M}=l(t),g=m.length/4,y=e.allocate(g),p=0,b=g,A=n?.allocate(b),S=0,I=0,_=0;c.length=0;for(let t=0;t<g;++t){let e=4*t;r.getVec(m.data[e],a),r.getVec(m.data[e+1],u);let n=c.pushNew();n.index=4*t,n.length=(0,o.Io)(a,u)}c.sort((t,e)=>e.length-t.length);let U=[],E=[];c.forAll(({length:t,index:l})=>{let c=m.data[l],g=m.data[l+1],b=m.data[l+2],N=m.data[l+3],C=-1===N;if(r.getVec(c,a),r.getVec(g,u),C){let t=3*b;(0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),(0,o.C)(h,f),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h)}else{let t=3*b;if((0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),t=3*N,(0,o.hZ)(h,M.data[t],M.data[t+1],M.data[t+2]),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h),function(t,e){return t.cosAngle>e}(d,v))return;d.cosAngle<-.9999&&(0,o.C)(h,f)}I+=t,_++,C||function(t,e){return t.cosAngle<e}(d,x)?(e.write(y,p++,d),U.push(t)):s(d,w)&&(A&&n&&n.write(A,S++,d),E.push(t))});let N=new Float32Array(U.reverse()),C=new Float32Array(E.reverse()),T=A&&n?{instancesData:A.slice(0,S),lodInfo:{lengths:C}}:void 0;return{regular:{instancesData:y.slice(0,p),lodInfo:{lengths:N}},silhouette:T,averageEdgeLength:I/_}}function s(t,e){let n=(0,r.XM)(t.cosAngle);return(0,o.oW)(g,t.position1,t.position0),n*((0,o.Om)((0,o.$A)(M,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function l(t){let e=t.faces.length/3,n=t.faces,r=t.neighbors,i=t.vertices.position;h.length=m.length=0;for(let t=0;t<e;t++){let e=3*t,a=r[e],u=r[e+1],s=r[e+2],l=n[e],f=n[e+1],c=n[e+2];i.getVec(l,y),i.getVec(f,p),i.getVec(c,b),(0,o.Re)(p,p,y),(0,o.Re)(b,b,y),(0,o.$A)(y,p,b),(0,o.S8)(y,y),m.pushArray(y),(-1===a||l<f)&&(h.push(l),h.push(f),h.push(t),h.push(a)),(-1===u||f<c)&&(h.push(f),h.push(c),h.push(t),h.push(u)),(-1===s||c<l)&&(h.push(c),h.push(l),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const c=new i.A({allocator:t=>t||new f,deallocator:null}),h=new i.A({deallocator:null}),m=new i.A({deallocator:null}),d=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},M=(0,a.vt)(),g=(0,a.vt)(),y=(0,a.vt)(),p=(0,a.vt)(),b=(0,a.vt)(),w=(0,r.kU)(4),v=Math.cos(w),A=(0,r.kU)(35),x=Math.cos(A)},44801(t,e,n){n.d(e,{o6:()=>U,HY:()=>O,hx:()=>E,Jb:()=>q});var r=n(34727),i=n(97146);function o(t,e,n){let o=Array.isArray(t),f=o?t.length/e:t.byteLength/(4*e),c=o?t:new Uint32Array(t,0,f*e),h=n?.minReduction??0,m=n?.originalIndices||null,d=m?m.length:0,M=n?.componentOffsets||null,g=0;if(M)for(let t=0;t<M.length-1;t++){let e=M[t+1]-M[t];e>g&&(g=e)}else g=f;let y=Math.floor(1.1*g)+1;(null==l||l.length<2*y)&&(l=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)l[t]=0;let p=0,b=!!M&&!!m,w=b?d:f,v=(0,i.my)(f),A=new Uint32Array(d),x=1.96,S=0===h?w:Math.ceil(4*x*x/(h*h)*h*(1-h)),I=1,_=M?M[1]:w;for(let t=0;t<w;t++){if(t===S){let e=1-p/t;if(e+x*Math.sqrt(e*(1-e)/t)<h)return null;S*=2}if(t===_){for(let t=0;t<2*y;t++)l[t]=0;if(m)for(let t=M[I-1];t<M[I];t++)A[t]=v[m[t]];_=M[++I]}let n=b?m[t]:t,r=n*e,i=s(c,r,e),o=i%y,u=p;for(;0!==l[2*o+1];){if(l[2*o]===i){let t=l[2*o+1]-1;if(a(c,r,t*e,e)){u=v[t];break}}o++,o>=y&&(o-=y)}u===p&&(l[2*o]=i,l[2*o+1]=n+1,p++),v[n]=u}if(0!==h&&1-p/f<h)return null;if(b){for(let t=M[I-1];t<A.length;t++)A[t]=v[m[t]];v=(0,i.uW)(A)}let U=o?Array(p):new Uint32Array(p*e);p=0;for(let t=0;t<w;t++)v[t]===p&&(u(c,(b?m[t]:t)*e,U,p*e,e),p++);if(m&&!b){let t=new Uint32Array(d);for(let e=0;e<t.length;e++)t[e]=v[m[e]];v=(0,i.uW)(t)}return{buffer:Array.isArray(U)?U:U.buffer,indices:v,uniqueCount:p}}function a(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function u(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function s(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null;function f(t,e,n){let r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),a=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];a(n,r),a(r,i),a(i,n)}let u=0,s=0;for(let t=0;t<n;t++){let e=i[t+1],n=o[t+1];i[t+1]=u,o[t+1]=s,u+=e,s+=n}let l=new Uint32Array(6*r),f=i[n],c=(t,e,n)=>{if(t<e){let r=i[t+1]++;l[2*r]=e,l[2*r+1]=n}else{let r=o[e+1]++;l[2*f+2*r]=t,l[2*f+2*r+1]=n}};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];c(n,r,e),c(r,i,e),c(i,n,e)}let h=(t,e)=>{let n=2*t,r=e-t;for(let t=1;t<r;t++){let e=l[n+2*t],r=l[n+2*t+1],i=t-1;for(;i>=0&&l[n+2*i]>e;i--)l[n+2*i+2]=l[n+2*i],l[n+2*i+3]=l[n+2*i+1];l[n+2*i+2]=e,l[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(f+o[t],f+o[t+1]);let m=new Int32Array(3*r),d=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,M=(t,e)=>{let n=d(t,e);m[3*e+n]=-1},g=(t,e,n,r)=>{let i=d(t,e);m[3*e+i]=r;let o=d(n,r);m[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t],n=i[t+1],r=o[t],a=o[t+1];for(;e<n&&r<a;){let n=l[2*e],i=l[2*f+2*r];n===i?(g(t,l[2*e+1],i,l[2*f+2*r+1]),e++,r++):n<i?(M(t,l[2*e+1]),e++):(M(i,l[2*f+2*r+1]),r++)}for(;e<n;)M(t,l[2*e+1]),e++;for(;r<a;)M(l[2*f+2*r],l[2*f+2*r+1]),r++}return m}var c=n(1843),h=n(99058),m=n(87811),d=n(35522),M=n(51850),g=n(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,e,n){I.seed=this._edgeHashFunction(n);let r=I.getIntRange(0,255),i=I.getIntRange(0,this.settings.variants-1),o=I.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(o/.7,1))+Math.max(0,o-.7)/.30000000000000004)+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,i),t.variantExtension.set(e,a)}}const p=new Float32Array(6),b=new Uint32Array(p.buffer),w=new Uint32Array(1);function v(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+b[0])+b[1])+b[2])+b[3])+b[4])+b[5],w[0]}function A(t){let e=p;e[0]=x(t.position0[0]),e[1]=x(t.position0[1]),e[2]=x(t.position0[2]),e[3]=x(t.position1[0]),e[4]=x(t.position1[1]),e[5]=x(t.position1[2]),w[0]=5381;for(let t=0;t<b.length;t++)w[0]=31*w[0]+b[t];return w[0]}function x(t){return Math.round(1e4*t)/1e4}const S=(0,M.vt)(),I=new m.A;var _=n(93406);function U(t){let e=E(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return C.updateSettings(t.writerSettings),T.updateSettings(t.writerSettings),(0,_.K)(e,C,T)}function E(t,e,n,r){if(e){let e=f(n,r,t.count);return new N(n,r,e,t)}let i=o(t.buffer,t.stride/4,{originalIndices:n}),a=f(i.indices,r,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:a,vertices:h.I$.createView(i.buffer)}}class N{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const C=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,d.WQ)(S,n.faceNormal0,n.faceNormal1),(0,d.S8)(S,S);let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,S[0],S[1],S[2],i)}},T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],i)}{let{typedBuffer:r,typedBufferStride:i}=t.normal2Compressed;(0,g.aT)(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],i)}}},q=(0,c.BP)().vec3f("position0").vec3f("position1"),O=(0,c.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);