@arcgis/core 6.0.0-next.30 → 6.0.0-next.31

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 (113) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/00d1c99779bd91b1d10e.js +1 -0
  3. package/assets/esri/core/workers/chunks/0694c7bcfe71692e2ccf.js +1 -0
  4. package/assets/esri/core/workers/chunks/{e2c6cd8dac01e129ccfe.js → 0e445ec3523de9f2dfa2.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0f6c0d42100c21367e5c.js +1 -0
  6. package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +1 -0
  7. package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +1 -0
  8. package/assets/esri/core/workers/chunks/{0b4481b57a611b15f65c.js → 1eaf8bfdd3765a90ccc2.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{8ca2bb3c0551bb1898b6.js → 3fdcc383bbd9cf0d274c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{fefdd10bdd5a4c8d8ed0.js → 4741fac6b6b4202a97c5.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ad21757d78e372fa2ed6.js → 4a979fce1c971b614a18.js} +1 -1
  12. package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +1 -0
  13. package/assets/esri/core/workers/chunks/{865cebc5c982c040ab6f.js → 55a9eaeb152a3abada67.js} +1 -1
  14. package/assets/esri/core/workers/chunks/572aec57593a08b8045b.js +1 -0
  15. package/assets/esri/core/workers/chunks/6029773458ab98600f67.js +1 -0
  16. package/assets/esri/core/workers/chunks/6b5c073dddd89d06ed80.js +1 -0
  17. package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +1 -0
  18. package/assets/esri/core/workers/chunks/7e211d8a8ad6c6a7cf3e.js +1 -0
  19. package/assets/esri/core/workers/chunks/{64b360625c68cb863a08.js → 84940d8e14caf5a27e04.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c90388932a7825d9d933.js → 85de980c5b296ec69323.js} +1 -1
  21. package/assets/esri/core/workers/chunks/89dc49e784f7ba3b93ea.js +1 -0
  22. package/assets/esri/core/workers/chunks/{9d40786c5ceface786ba.js → 8a485130781b49dbf608.js} +1 -1
  23. package/assets/esri/core/workers/chunks/8d13f11d0bcc8d3a4bdf.js +1 -0
  24. package/assets/esri/core/workers/chunks/8da2a10318f49d0dc73a.js +1 -0
  25. package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +1 -0
  26. package/assets/esri/core/workers/chunks/{1dc6f093028530a492e6.js → 90ba0af9690dc32b2958.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{71f792a20077aa739f87.js → a607541959169741a943.js} +1 -1
  28. package/assets/esri/core/workers/chunks/b2d6b1ac9fbb50c7c8ab.js +1 -0
  29. package/assets/esri/core/workers/chunks/b657363113f4a37e634b.js +1 -0
  30. package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +1 -0
  31. package/assets/esri/core/workers/chunks/{4419732baf3459a80e6d.js → ceb2d5b0a23f0ab81f68.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{7030a4d0714a35995a58.js → d09d8cd43e846d467827.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{12b84262dedc6b393136.js → d9a240a3c6bf85124474.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{8f008eedb11685ee2048.js → e096c1d9d53af74d3207.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e30fdde253e5521473a2.js +1 -0
  36. package/assets/esri/core/workers/chunks/e4e2edfdc85dd14e66d4.js +1 -0
  37. package/assets/esri/core/workers/chunks/{ba4520ddcb6a49988da6.js → f21edbfdcab111d8a6cd.js} +1 -1
  38. package/assets/esri/core/workers/chunks/f4d91d470ca5fea0bd26.js +1 -0
  39. package/assets/esri/core/workers/chunks/f717005e14a7e9141df7.js +1 -0
  40. package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +1 -0
  41. package/assets/esri/core/workers/chunks/{b5eff28cf482d920b9ea.js → f7fb6cb7f08c16384443.js} +1 -1
  42. package/assets/esri/core/workers/chunks/fcc3902d6d9eda6f09f5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{28a821de9dbf10324033.js → fd031150d3a7f896e6b3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{cc97e4fd0dacad970a23.js → ffaaa388773e60869df0.js} +1 -1
  45. package/config.js +1 -1
  46. package/core/scheduling.js +1 -1
  47. package/geometry/Mesh.d.ts +2 -125
  48. package/geometry/Mesh.js +1 -1
  49. package/geometry/support/meshErrors.js +1 -1
  50. package/geometry/support/plane.js +1 -1
  51. package/geometry/support/polygonUtils.js +1 -1
  52. package/interfaces.d.ts +0 -3
  53. package/kernel.js +1 -1
  54. package/layers/SceneLayer.js +1 -1
  55. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  56. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  57. package/layers/mixins/ArcGISImageService.js +1 -1
  58. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  59. package/layers/support/featureLayerUtils.js +1 -1
  60. package/package.json +2 -2
  61. package/support/arcadeUtils.js +1 -1
  62. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  63. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  64. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  65. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  66. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  67. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  68. package/views/3d/environment/SunLighting.d.ts +10 -8
  69. package/views/3d/environment/VirtualLighting.d.ts +10 -8
  70. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  71. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  72. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  73. package/views/3d/terrain/PlanarPatch.js +1 -1
  74. package/views/3d/terrain/SphericalPatch.js +1 -1
  75. package/views/3d/webgl-engine/lib/Path.js +1 -1
  76. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  77. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  78. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  79. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  80. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  81. package/views/support/TextureCompressionWorker.js +1 -1
  82. package/views/webgl/Texture.js +1 -1
  83. package/webscene/Environment.d.ts +1 -1
  84. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  85. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  86. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  87. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  88. package/widgets/BatchAttributeForm.js +1 -1
  89. package/widgets/FeatureForm.js +1 -1
  90. package/assets/esri/core/workers/chunks/02335385b1476fe322eb.js +0 -1
  91. package/assets/esri/core/workers/chunks/07b726a46864501b90a0.js +0 -1
  92. package/assets/esri/core/workers/chunks/189321d88026bd7e6d3e.js +0 -1
  93. package/assets/esri/core/workers/chunks/18d47ab571b613fbe719.js +0 -1
  94. package/assets/esri/core/workers/chunks/1967b9c96045a5802d08.js +0 -1
  95. package/assets/esri/core/workers/chunks/199a7f97916679e0257c.js +0 -1
  96. package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +0 -1
  97. package/assets/esri/core/workers/chunks/2cd60fd062d954322c1f.js +0 -1
  98. package/assets/esri/core/workers/chunks/2d3e0e4442dbc6ec6def.js +0 -1
  99. package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +0 -1
  100. package/assets/esri/core/workers/chunks/3105336a05f38a95ebea.js +0 -1
  101. package/assets/esri/core/workers/chunks/4fb2fcc95f852bf8f86c.js +0 -1
  102. package/assets/esri/core/workers/chunks/59bc55880e6fd8ce20c0.js +0 -1
  103. package/assets/esri/core/workers/chunks/5f787809b74eed7b9a91.js +0 -1
  104. package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +0 -1
  105. package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +0 -1
  106. package/assets/esri/core/workers/chunks/7d3f7940815fa5dc244e.js +0 -1
  107. package/assets/esri/core/workers/chunks/999c23da883eb11cb29e.js +0 -1
  108. package/assets/esri/core/workers/chunks/9bc3afe7013ef4ae737b.js +0 -1
  109. package/assets/esri/core/workers/chunks/bab1d010970d98c25470.js +0 -1
  110. package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +0 -1
  111. package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +0 -1
  112. package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +0 -1
  113. package/assets/esri/core/workers/chunks/f0d0ed155275c2e6d3da.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7005],{82534(t,e,n){function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>a,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,i])},67026(t,e,n){n.d(e,{A6:()=>M,Xd:()=>l,Xr:()=>d,lw:()=>c,x8:()=>u});var r=n(29242),a=n(82534),i=n(51850),s=n(34304),h=n(35522),o=n(78955);function u(t,e,n){n*=.5;let r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){let n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,s.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function c(t,e,n){let r=e[0],a=e[1],i=e[2],s=e[3],h=n[0],o=n[1],u=n[2],l=n[3];return t[0]=r*l+s*h+a*u-i*o,t[1]=a*l+s*o+i*h-r*u,t[2]=i*l+s*u+r*o-a*h,t[3]=s*l-r*h-a*o-i*u,t}function f(t,e,n,r){let a,i,h,o,u,l=e[0],c=e[1],f=e[2],d=e[3],m=n[0],M=n[1],g=n[2],v=n[3];return i=l*m+c*M+f*g+d*v,i<0&&(i=-i,m=-m,M=-M,g=-g,v=-v),1-i>(0,s.FD)()?(a=Math.acos(i),h=Math.sin(a),o=Math.sin((1-r)*a)/h,u=Math.sin(r*a)/h):(o=1-r,u=r),t[0]=o*l+u*m,t[1]=o*c+u*M,t[2]=o*f+u*g,t[3]=o*d+u*v,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function m(t,e){let n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);let a=(r+1)%3,i=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*a+a]-e[3*i+i]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*a+i]-e[3*i+a])*n,t[a]=(e[3*a+r]+e[3*r+a])*n,t[i]=(e[3*i+r]+e[3*r+i])*n}return t}function M(t,e,n,r){let a=.5*Math.PI/180;e*=a,n*=a,r*=a;let i=Math.sin(e),s=Math.cos(e),h=Math.sin(n),o=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=i*o*l-s*h*u,t[1]=s*h*l+i*o*u,t[2]=s*o*u-i*h*l,t[3]=s*o*l+i*h*u,t}const g=o.C,v=o.hZ,_=o.WQ,b=c,P=o.hs,j=o.Om,p=o.Cc,x=o.Bw,w=x,C=o.m3,A=C,z=o.S8,S=o.t2,q=o.aI,Q=(0,i.vt)(),y=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),V=(0,a.vt)(),R=(0,a.vt)(),H=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:_,calculateW:function(t,e){let n=e[0],r=e[1],a=e[2];return t[0]=n,t[1]=r,t[2]=a,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-a*a)),t},conjugate:d,copy:g,dot:j,equals:q,exactEquals:S,fromEuler:M,fromMat3:m,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){let n=e[0],r=e[1],a=e[2],i=e[3],s=n*n+r*r+a*a+i*i,h=s?1/s:0;return t[0]=-n*h,t[1]=-r*h,t[2]=-a*h,t[3]=i*h,t},len:w,length:x,lerp:p,mul:b,multiply:c,normalize:z,random:function(t){let e=s.Ov,n=e(),r=e(),a=e(),i=Math.sqrt(1-n),h=Math.sqrt(n);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=h*Math.sin(2*Math.PI*a),t[3]=h*Math.cos(2*Math.PI*a),t},rotateX:function(t,e,n){n*=.5;let r=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(n),o=Math.cos(n);return t[0]=r*o+s*h,t[1]=a*o+i*h,t[2]=i*o-a*h,t[3]=s*o-r*h,t},rotateY:function(t,e,n){n*=.5;let r=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(n),o=Math.cos(n);return t[0]=r*o-i*h,t[1]=a*o+s*h,t[2]=i*o+r*h,t[3]=s*o-a*h,t},rotateZ:function(t,e,n){n*=.5;let r=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(n),o=Math.cos(n);return t[0]=r*o+a*h,t[1]=a*o-r*h,t[2]=i*o+s*h,t[3]=s*o-i*h,t},rotationTo:function(t,e,n){let r=(0,h.Om)(e,n);return r<-.999999?((0,h.$A)(Q,y,e),(0,h.Il)(Q)<1e-6&&(0,h.$A)(Q,O,e),(0,h.S8)(Q,Q),u(t,Q,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,h.$A)(Q,e,n),t[0]=Q[0],t[1]=Q[1],t[2]=Q[2],t[3]=1+r,z(t,t))},scale:P,set:v,setAxes:function(t,e,n,r){let a=H;return a[0]=n[0],a[3]=n[1],a[6]=n[2],a[1]=r[0],a[4]=r[1],a[7]=r[2],a[2]=-e[0],a[5]=-e[1],a[8]=-e[2],z(t,m(t,a))},setAxisAngle:u,slerp:f,sqlerp:function(t,e,n,r,a,i){return f(V,e,a,i),f(R,n,r,i),f(t,V,R,2*i*(1-i)),t},sqrLen:A,squaredLength:C,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"})),n.d(e,["hZ",0,v,"t2",0,S])},48353(t,e,n){n.d(e,{l:()=>u});var r=n(34727),a=n(58083),i=n(51850);function s(t,e,n){let r=Math.sin(t),a=Math.cos(t),i=Math.sin(e),s=Math.cos(e),h=n;return h[0]=-r,h[4]=-i*a,h[8]=s*a,h[12]=0,h[1]=a,h[5]=-i*r,h[9]=s*r,h[13]=0,h[2]=0,h[6]=s,h[10]=i,h[14]=0,h[3]=0,h[7]=0,h[11]=0,h[15]=1,h}var h=n(37539),o=n(21325);function u(t,e,n,r){let i=(0,h.Tp)(t,r);if(null==i)return!1;let u=i.source.spatialReferenceId,m=i.dest.spatialReferenceId;if(u===m&&!l(m)&&(0!==u||(0,o.aI)(t,r)))return(0,a.kN)(n,e),!0;if(l(m)){let t=h.w5[u][10],r=h.w5[10][m];return null!=t&&null!=r&&(t(e,0,f,0),r(f,0,d,0),s(c*f[0],c*f[1],n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}let M=l(u);if((3===m||11===m||2===m||5===m)&&(2===u||M||3===u||5===u)){let t=h.w5[u][10],r=h.w5[10][m];return null!=t&&null!=r&&(t(e,0,f,0),r(f,0,d,0),M?function(t,e,n){s(t,e,n),(0,a.mg)(n,n)}(c*f[0],c*f[1],n):(0,a.D_)(n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const c=(0,r.kU)(1),f=(0,i.vt)(),d=(0,i.vt)()},27921(t,e,n){n.d(e,{$Q:()=>p,BX:()=>j,C:()=>u,Cr:()=>d,H:()=>w,LV:()=>o,O_:()=>f,Qj:()=>l,T7:()=>_,Ui:()=>v,_I:()=>C,fA:()=>c,gv:()=>b,mN:()=>A,mP:()=>M,mR:()=>g,vE:()=>q,vt:()=>h,wE:()=>z});var r=n(34727),a=n(35522),i=n(51850),s=(n(78955),n(44280),n(32114));function h(t=Q){return[t[0],t[1],t[2],t[3]]}function o(t=Q[0],e=Q[1],n=Q[2],r=Q[3]){return c(t,e,n,r,s.Km.get())}function u(t,e){return c(e[0],e[1],e[2],e[3],t)}function l(t){return t}function c(t,e,n,r,a=h()){return a[0]=t,a[1]=e,a[2]=n,a[3]=r,a}function f(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],a=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*a,n[1]=e[1]*a,n[2]=e[2]*a,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function d(t,e,n,r=h()){let a=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],o=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],c=i*l-s*u,f=s*o-a*l,d=a*u-i*o,m=c*c+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=c*M,r[1]=f*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}n(32728),(0,i.vt)(),(0,i.vt)();const m=(0,i.vt)();function M(t,e,n){return e!==t&&u(t,e),t[3]=-(0,a.Om)(t,n),t}function g(t,e,n,r){return(0,a.$A)(m,e,t),f(n,m,r)}function v(t,e,n){return null!=e&&S(q(t,e.origin,e.direction,y,n))}function _(t,e,n){return S(q(t,e.origin,e.vector,0,n))}function b(t,e,n){return S(q(t,e.origin,e.vector,1,n))}function P(t,e){return A(t,e)<=0}function j(t,e){return A(t,e)>=0}function p(t,e){return function(t,e,n,r,i,s,h,o){let u=(0,a.Om)(t,n),l=A(t,e);if(u>=-o&&u<=o)return x(l,i,s);let c=-l/u,f=x(u,i,!1);return!(h&&!f&&!x(l,i,s))&&(f?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,1e-6)}function x(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function w(t,e,n,r=!1){let i=e.at(-1),s=A(t,i),h=r?s>0:s<=0;for(let o=0;o<e.length;o++){let u=e.at(o),l=A(t,u),c=r?l>0:l<=0;h!==c&&(0,a.Cc)(n(),i,u,s/(s-l)),c&&(0,a.C)(n(),u),i=u,s=l,h=c}}function C(t,e,n){let r=(0,a.hs)(s.rq.get(),t,-t[3]),i=function(t,e,n){let r=(0,a.hs)(s.rq.get(),t,(0,a.Om)(t,e));return(0,a.Re)(n,e,r),n}(t,(0,a.Re)(s.rq.get(),e,r),s.rq.get());return(0,a.WQ)(n,i,r),n}function A(t,e){return(0,a.Om)(t,e)+t[3]}function z(t,e,n){for(let r=0;r<n;++r)if(P(t,e[r]))return!1;return!0}function S(t){return 0===t||1===t}function q(t,e,n,i,s){let h=(0,a.Om)(t,n),o=A(t,e);if(0===h)return o>=0?2:3;let u=-o/h;return 1&i&&(u=(0,r.qE)(u,0,1)),!(4&i)&&u<0||!(8&i)&&u>1?o>=0?2:3:((0,a.WQ)(s,e,(0,a.hs)(s,n,u)),o>=0?0:1)}(0,i.vt)(),(0,i.vt)();const Q=[0,0,1,0],y=8;(0,i.vt)()},44280(t,e,n){n.d(e,{g7:()=>h,gr:()=>s});var r=n(34727),a=n(35522),i=n(51850);function s(t,e){return(0,a.Om)(t,e)/(0,a.Bw)(t)}function h(t,e){let n=(0,a.Om)(t,e)/((0,a.Bw)(t)*(0,a.Bw)(e));return-(0,r.XM)(n)}(0,i.vt)(),(0,i.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>c,Km:()=>f}),n(44208);var r=n(26390),a=n(29242),i=n(9093),s=n(82534),h=n(48163),o=n(51850),u=n(91829);class l{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 l(h.vt)}static createVec3f64(){return new l(o.vt)}static createVec4f64(){return new l(u.vt)}static createMat3f64(){return new l(a.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(s.vt)}get test(){}}l.createVec2f64();const c=l.createVec3f64(),f=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>s,nu:()=>h,wp:()=>i}),n(34727);var r=n(35522),a=n(51850);function i(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),a=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,a,i),t}function s(t,e,n){n||=t;let a=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-a*e[0],t[1]-a*e[1],t[2]-a*e[2]),(0,r.S8)(n,n)}function h(t,e,n,i=(0,a.vt)()){let s=(0,r.Bw)(t),h=(0,r.Bw)(e),l=(0,r.Om)(t,e)/(s*h);if(l<.9999999999999999){let a=Math.acos(l),c=((1-n)*s+n*h)/Math.sin(a),f=c/s*Math.sin((1-n)*a),d=c/h*Math.sin(n*a);return(0,r.hs)(o,t,f),(0,r.hs)(u,e,d),(0,r.WQ)(i,o,u)}return(0,r.Cc)(i,t,e,n)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const o=(0,a.vt)(),u=(0,a.vt)()},57005(t,e,n){n.d(e,{ab:()=>_t,gm:()=>zt});var r=n(77690),a=n(29242),i=n(9093),s=n(67026),h=n(82534),o=n(35522),u=n(51850),l=n(78955),c=n(91829),f=n(73941),d=n(98764),m=n(48353),M=n(9762),g=n(37539),v=n(27921),_=n(21325),b=n(48163),P=n(46610);const j=1e-6,p=(0,u.vt)(),x=(0,u.vt)();function w(t,e,n,r,a,i,s,h,o,u){return function(t,e,n){let r=gt(t.maxVert[0],t.minVert[0]),a=0;for(let e=1;e<7;++e){let n=gt(t.maxVert[e],t.minVert[e]);n>r&&(r=n,a=e)}ft(e,t.minVert[a]),ft(n,t.maxVert[a])}(t,r,a),gt(r,a)<j?1:(lt(s,r,a),mt(s,s),function(t,e,n,r){let{data:a,size:i}=t,s=-1/0,h=0;for(let t=0;t<a.length;t+=i){R[0]=a[t]-e[0],R[1]=a[t+1]-e[1],R[2]=a[t+2]-e[2];let r=n[0]*R[0]+n[1]*R[1]+n[2]*R[2],i=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],o=R[0]*R[0]+R[1]*R[1]+R[2]*R[2]-r*r/i;o>s&&(s=o,h=t)}return ft(r,a,h),s}(e,r,s,i)<j?2:(lt(h,a,i),mt(h,h),lt(o,i,r),mt(o,o),dt(n,h,s),mt(n,n),W(e,n,s,h,o,u),0))}const C=(0,u.vt)(),A=(0,u.vt)(),z=(0,u.vt)(),S=(0,u.vt)(),q=(0,u.vt)(),Q=(0,u.vt)(),y=(0,u.vt)(),O=(0,u.vt)();function V(t,e,n,r,a,i,s,h,o){(function(t,e,n,r,a){!function(t,e,n,r,a){let{data:i,size:s}=t;ft(r,i),ft(a,r),n[0]=vt(X,e),n[1]=n[0];for(let t=s;t<i.length;t+=s){let s=i[t]*e[0]+i[t+1]*e[1]+i[t+2]*e[2];s<n[0]&&(n[0]=s,ft(r,i,t)),s>n[1]&&(n[1]=s,ft(a,i,t))}}(t,e,H,a,r);let i=vt(n,e);H[1]-j<=i&&(r[0]=void 0),H[0]+j>=i&&(a[0]=void 0)})(t,e,n,C,A),void 0!==C[0]&&(lt(z,C,n),mt(z,z),lt(S,C,r),mt(S,S),lt(q,C,a),mt(q,q),dt(Q,S,i),mt(Q,Q),dt(y,q,s),mt(y,y),dt(O,z,h),mt(O,O),W(t,Q,i,S,z,o),W(t,y,s,q,S,o),W(t,O,h,z,q,o)),void 0!==A[0]&&(lt(z,A,n),mt(z,z),lt(S,A,r),mt(S,S),lt(q,A,a),mt(q,q),dt(Q,S,i),mt(Q,Q),dt(y,q,s),mt(y,y),dt(O,z,h),mt(O,O),W(t,Q,i,S,z,o),W(t,y,s,q,S,o),W(t,O,h,z,q,o))}const R=[0,0,0],H=(0,b.vt)(),I=(0,u.vt)(),L=(0,u.vt)(),B=(0,u.vt)(),D=(0,u.vt)(),F=(0,u.vt)(),Z=(0,u.vt)();function W(t,e,n,r,a,i){if(Mt(e)<j)return;dt(I,n,e),dt(L,r,e),dt(B,a,e),k(t,e,H),F[1]=H[0],D[1]=H[1],Z[1]=D[1]-F[1];let s=[n,r,a],h=[I,L,B];for(let n=0;n<3;++n){k(t,s[n],H),F[0]=H[0],D[0]=H[1],k(t,h[n],H),F[2]=H[0],D[2]=H[1],Z[0]=D[0]-F[0],Z[2]=D[2]-F[2];let r=ot(Z);r<i.quality&&(ft(i.b0,s[n]),ft(i.b1,e),ft(i.b2,h[n]),i.quality=r)}}const X=(0,u.vt)();function k(t,e,n){let{data:r,size:a}=t,i=1/0,s=-1/0,h=e[0],o=e[1],u=e[2];for(let t=0;t<r.length;t+=a){let e=r[t]*h+r[t+1]*o+r[t+2]*u;i=Math.min(i,e),s=Math.max(s,e)}n[0]=i,n[1]=s}function K(t,e,n){n.setCenter(t),n.setHalfSize((0,o.hs)(e,e,.5)),n.setQuaternion(h.zK)}const T=(0,u.vt)(),Y=(0,u.vt)(),E=(0,u.vt)(),$=(0,u.vt)(),N=(0,u.vt)(),G=(0,u.vt)();function U(t,e,n){ft(T,e),Math.abs(e[0])>Math.abs(e[1])&&Math.abs(e[0])>Math.abs(e[2])?T[0]=0:Math.abs(e[1])>Math.abs(e[2])?T[1]=0:T[2]=0,Mt(T)<j&&(T[0]=T[1]=T[2]=1),dt(Y,e,T),mt(Y,Y),dt(E,e,Y),mt(E,E),J(t,e,Y,E,$,N),lt(G,N,$),it(e,Y,E,$,N,G,n)}function J(t,e,n,r,a,i){k(t,e,H),a[0]=H[0],i[0]=H[1],k(t,n,H),a[1]=H[0],i[1]=H[1],k(t,r,H),a[2]=H[0],i[2]=H[1]}const tt=(0,u.vt)(),et=(0,u.vt)(),nt=(0,u.vt)(),rt=(0,a.fA)(1,0,0,0,1,0,0,0,1),at=(0,h.vt)();function it(t,e,n,r,a,i,s){rt[0]=t[0],rt[1]=t[1],rt[2]=t[2],rt[3]=e[0],rt[4]=e[1],rt[5]=e[2],rt[6]=n[0],rt[7]=n[1],rt[8]=n[2],s.setQuaternion(function(t,e){let n=e[0]+e[4]+e[8];if(n>0){let r=Math.sqrt(n+1);t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r}else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);let r=(n+1)%3,a=(n+2)%3,i=Math.sqrt(e[3*n+n]-e[3*r+r]-e[3*a+a]+1);t[n]=.5*i,i=.5/i,t[3]=(e[3*r+a]-e[3*a+r])*i,t[r]=(e[3*r+n]+e[3*n+r])*i,t[a]=(e[3*a+n]+e[3*n+a])*i}return t}(at,rt)),ut(tt,r,a),ct(tt,tt,.5),ct(et,t,tt[0]),ct(nt,e,tt[1]),ut(et,et,nt),ct(nt,n,tt[2]),s.setCenter((0,o.WQ)(et,et,nt)),s.setHalfSize((0,o.hs)(tt,i,.5))}class st{constructor(t){this.minVert=Array(7),this.maxVert=Array(7),this.buffer=new ArrayBuffer(448);let e=0;this.minProj=new Float64Array(this.buffer,e,7),e+=56,this.maxProj=new Float64Array(this.buffer,e,7),e+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.minProj[t]=1/0,this.maxProj[t]=-1/0;let n=Array(7),r=Array(7),{data:a,size:i}=t;for(let t=0;t<a.length;t+=i){let e=a[t];e<this.minProj[0]&&(this.minProj[0]=e,n[0]=t),e>this.maxProj[0]&&(this.maxProj[0]=e,r[0]=t),e=a[t+1],e<this.minProj[1]&&(this.minProj[1]=e,n[1]=t),e>this.maxProj[1]&&(this.maxProj[1]=e,r[1]=t),e=a[t+2],e<this.minProj[2]&&(this.minProj[2]=e,n[2]=t),e>this.maxProj[2]&&(this.maxProj[2]=e,r[2]=t),e=a[t]+a[t+1]+a[t+2],e<this.minProj[3]&&(this.minProj[3]=e,n[3]=t),e>this.maxProj[3]&&(this.maxProj[3]=e,r[3]=t),e=a[t]+a[t+1]-a[t+2],e<this.minProj[4]&&(this.minProj[4]=e,n[4]=t),e>this.maxProj[4]&&(this.maxProj[4]=e,r[4]=t),e=a[t]-a[t+1]+a[t+2],e<this.minProj[5]&&(this.minProj[5]=e,n[5]=t),e>this.maxProj[5]&&(this.maxProj[5]=e,r[5]=t),e=a[t]-a[t+1]-a[t+2],e<this.minProj[6]&&(this.minProj[6]=e,n[6]=t),e>this.maxProj[6]&&(this.maxProj[6]=e,r[6]=t)}for(let t=0;t<7;++t){let e=n[t];ft(this.minVert[t],a,e),e=r[t],ft(this.maxVert[t],a,e)}}}class ht{constructor(){this.b0=(0,u.fA)(1,0,0),this.b1=(0,u.fA)(0,1,0),this.b2=(0,u.fA)(0,0,1),this.quality=0}}function ot(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function ut(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function lt(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function ct(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function ft(t,e,n=0){t[0]=e[n],t[1]=e[n+1],t[2]=e[n+2]}function dt(t,e,n){let r=e[0],a=e[1],i=e[2],s=n[0],h=n[1],o=n[2];t[0]=a*o-i*h,t[1]=i*s-r*o,t[2]=r*h-a*s}function mt(t,e){let n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];if(n>0){let r=1/Math.sqrt(n);t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r}}function Mt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function gt(t,e){let n=e[0]-t[0],r=e[1]-t[1],a=e[2]-t[2];return n*n+r*r+a*a}function vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}class _t{constructor(t=u.uY,e=qt,n=h.zK){this._data=[t[0],t[1],t[2],e[0],e[1],e[2],n[0],n[1],n[2],n[3]]}clone(){return _t.fromData(this._data)}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){let e=new _t;return e._copyFromData(t),e}static fromJSON(t){return new _t(t.center,t.halfSize,t.quaternion)}copy(t){this._copyFromData(t.data)}_copyFromData(t){for(let e=0;e<10;++e)this._data[e]=t[e]}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}setCenter(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenterFromValues(t,e,n){this._data[0]=t,this._data[1]=e,this._data[2]=n}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}setHalfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}setHalfSizeFromValues(t,e,n){this._data[3]=t,this._data[4]=e,this._data[5]=n}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}getQuaternionConjugate(t){return t[0]=-this._data[6],t[1]=-this._data[7],t[2]=-this._data[8],t[3]=this._data[9],t}setQuaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){let e=this._data,n=(0,s.hZ)(bt,e[6],e[7],e[8],e[9]);for(let r=0;r<8;++r){let a=t[r];a[0]=(1&r?-1:1)*e[3],a[1]=(2&r?-1:1)*e[4],a[2]=(4&r?-1:1)*e[5],(0,o.gL)(a,a,n),a[0]+=e[0],a[1]+=e[1],a[2]+=e[2]}return t}getAxes(t){let e=this._data,n=(0,s.hZ)(bt,e[6],e[7],e[8],e[9]);return(0,o.gL)(t[0],[1,0,0],n),(0,o.gL)(t[1],[0,1,0],n),(0,o.gL)(t[2],[0,0,1],n),t}intersectsFrustum(t){let{centerX:e,centerY:n,centerZ:r}=this,a=t.planes;for(let t of a){let a=(0,v.Qj)(t),i=this.projectedRadius(a);if(e*a[0]+n*a[1]+r*a[2]+t[3]-i>0)return!1}let i=this.getAxes(Bt),s=t.points,h=this.getHalfSize(Rt);for(let t=0;t<3;++t){let a=i[t],u=-a[0]*e-a[1]*n-a[2]*r,l=h[t],c=!0,f=!0;for(let t of s){let e=(0,o.Om)(t,a)+u;c&&=e>l,f&&=e<-l}if(c||f)return!1}if(this.getCorners(Lt).some(e=>t.intersectsPoint(e)))return!0;let u=Xt;for(let t=0;t<3;++t){let a=i[t];u[t]=a[0]*e+a[1]*n+a[2]*r}if(t.points.some(t=>(t=>{for(let e=0;e<3;++e){let n=i[e],r=h[e],a=n[0]*t[0]+n[1]*t[1]+n[2]*t[2]-u[e];if(a>r||a<-r)return!1}return!0})(t)))return!0;let l=t.lines,c=Wt;for(let t=0;t<8;++t){let a=l[t].direction;for(let t of i){(0,o.$A)(c,a,t);let i=(0,o.Il)(c);if(!(i>0))continue;(0,o.hs)(c,c,1/i);let h=this.projectedRadius(c),u=c[0]*e+c[1]*n+c[2]*r,l=u-h,f=u+h,d=!1,m=!1,M=!0;for(let t of s){let e=(0,o.Om)(c,t);if(e>f){if(m){M=!1;break}d=!0}else{if(!(e<l)){M=!1;break}if(d){M=!1;break}m=!0}}if(M)return!1}}return!0}intersectsFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}intersectsFrustumConservativeApproximationWithMargin(t,e){return this.signedDistanceRangePlane(t[0]).min<=e&&this.signedDistanceRangePlane(t[1]).min<=e&&this.signedDistanceRangePlane(t[2]).min<=e&&this.signedDistanceRangePlane(t[3]).min<=e&&this.signedDistanceRangePlane(t[4]).min<=e&&this.signedDistanceRangePlane(t[5]).min<=e}get radius(){let t=this._data[3],e=this._data[4],n=this._data[5];return Math.sqrt(t*t+e*e+n*n)}intersectsPoint(t){let e=this.getAxes(Bt),n=this.getHalfSize(Rt),r=this.getCenter(Vt);for(let a=0;a<3;++a){let i=e[a],s=n[a],h=(0,o.Om)(i,t)-(0,o.Om)(i,r);if(h>s||h<-s)return!1}return!0}intersectSphere(t){let{center:e,radius:n}=t,r=this._data,a=r[3],i=r[4],s=r[5],h=a+i+s+n,o=r[0]-e[0];if(Math.abs(o)>h)return!1;let u=r[1]-e[1];if(Math.abs(u)>h)return!1;let l=r[2]-e[2];if(Math.abs(l)>h)return!1;let c=-r[6],f=-r[7],d=-r[8],m=f*l-d*u,M=d*o-c*l,g=c*u-f*o,v=f*g-d*M,_=d*m-c*g,b=c*M-f*m,P=2*r[9],j=Math.abs(o+m*P+2*v),p=Math.abs(u+M*P+2*_),x=Math.abs(l+g*P+2*b),w=j-Math.min(j,a),C=p-Math.min(p,i),A=x-Math.min(x,s);return w*w+C*C+A*A<=n*n}intersectSphereWithMBS(t,e=this.radius){let n=this._data,{center:r,radius:a}=t,i=e+a,s=n[0]-r[0];if(s>i)return!1;let h=n[1]-r[1];if(h>i)return!1;let o=n[2]-r[2];if(o>i||s*s+h*h+o*o>i*i)return!1;let u=-n[6],l=-n[7],c=-n[8],f=l*o-c*h,d=c*s-u*o,m=u*h-l*s,M=l*m-c*d,g=c*f-u*m,v=u*d-l*f,_=2*n[9],b=Math.abs(s+f*_+2*M),P=Math.abs(h+d*_+2*g),j=Math.abs(o+m*_+2*v),p=b-Math.min(b,n[3]),x=P-Math.min(P,n[4]),w=j-Math.min(j,n[5]);return p*p+x*x+w*w<a*a}intersectPlane(t){let e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],n=this.projectedRadius((0,v.Qj)(t));return e>n?1:e<-n?-1:0}intersectRay(t,e,n=0){let r=this._data,a=bt;a[0]=-r[6],a[1]=-r[7],a[2]=-r[8],a[3]=r[9],pt[0]=t[0]-r[0],pt[1]=t[1]-r[1],pt[2]=t[2]-r[2];let i=(0,o.gL)(pt,pt,bt),s=(0,o.gL)(xt,e,bt),h=-1/0,u=1/0,l=this.getHalfSize(Rt);for(let t=0;t<3;t++){let e=i[t],r=s[t],a=l[t]+n;if(Math.abs(r)>1e-6){let t=(a-e)/r,n=(-a-e)/r;h=Math.max(h,Math.min(t,n)),u=Math.min(u,Math.max(t,n))}else if(e>a||e<-a)return!1}return h<=u}projectedArea(t,e,n,a){let i=this.getQuaternion(Pt);(0,s.Xr)(bt,i),pt[0]=t[0]-this._data[0],pt[1]=t[1]-this._data[1],pt[2]=t[2]-this._data[2],(0,o.gL)(pt,pt,bt);let h=this.getHalfSize(Rt),u=pt[0]<-h[0]?-1:+(pt[0]>h[0]),c=pt[1]<-h[1]?-1:+(pt[1]>h[1]),f=pt[2]<-h[2]?-1:+(pt[2]>h[2]),d=Math.abs(u)+Math.abs(c)+Math.abs(f);if(0===d)return 1/0;let m=1===d?4:6,M=6*(u+3*c+9*f+13);(0,r.I0)(Ht,i),(0,r.hs)(Ht,Ht,h);let g=this.getCenter(Vt);for(let t=0;t<m;t++){let n=At[M+t];(0,o.hZ)(pt,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),(0,o.ei)(pt,pt,Ht),(0,o.WQ)(wt,g,pt),wt[3]=1,(0,l.Z0)(wt,wt,e);let r=1/Math.max(1e-6,wt[3]);Ct[2*t]=wt[0]*r,Ct[2*t+1]=wt[1]*r}let v=2*m-2,_=Ct[0]*(Ct[3]-Ct[v+1])+Ct[v]*(Ct[1]-Ct[v-1]);for(let t=2;t<v;t+=2)_+=Ct[t]*(Ct[t+3]-Ct[t-1]);return Math.abs(_)*n*a*.125}projectedRadius(t){let e=this._data;return(0,o.fw)(pt,t,-e[6],-e[7],-e[8],e[9]),Math.abs(pt[0]*e[3])+Math.abs(pt[1]*e[4])+Math.abs(pt[2]*e[5])}signedDistancePlane(t,e){let n=this._data,r=t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+e,a=this.projectedRadius(t);return r>a?r-a:r<-a?r+a:0}signedDistanceRangePlane(t){let e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],n=this.projectedRadius((0,v.Qj)(t));return{min:e-n,max:e+n}}toAaBoundingBox(t){let e=this.getQuaternion(Pt),n=(0,r.I0)(Ht,e),a=this._data[3]*Math.abs(n[0])+this._data[4]*Math.abs(n[3])+this._data[5]*Math.abs(n[6]),i=this._data[3]*Math.abs(n[1])+this._data[4]*Math.abs(n[4])+this._data[5]*Math.abs(n[7]),s=this._data[3]*Math.abs(n[2])+this._data[4]*Math.abs(n[5])+this._data[5]*Math.abs(n[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-i,t[2]=this._data[2]-s,t[3]=this._data[0]+a,t[4]=this._data[1]+i,t[5]=this._data[2]+s}transform(t,e,n,r=0,a=(0,d.lO)(n),i=(0,d.lO)(e),h=(0,g.jd)(e,i)){if(n===a)e.isGeographic?function(t,e,n,r,a=(0,d.lO)(n)){let i=(0,f.tO)(n),h=1+Math.max(0,r)/(i.radius+t.centerZ);t.getCenter(Ot),Ot[2]+=r,(0,M.projectBuffer)(Ot,n,0,Ot,a,0),e.setCenter(Ot);let u=t.getQuaternion(Pt);e.setQuaternion(u),(0,s.Xr)(bt,u),(0,o.hZ)(Dt,0,0,1),(0,o.gL)(Dt,Dt,bt);let l=t.getHalfSize(Rt);(0,o.hZ)(Dt,l[0]*Math.abs(Dt[0]),l[1]*Math.abs(Dt[1]),l[2]*Math.abs(Dt[2])),(0,o.hs)(Dt,Dt,i.inverseFlattening),(0,o.WQ)(Dt,l,Dt),e.setHalfSize((0,o.hs)(Dt,Dt,h))}(this,t,e,r,i):function(t,e,n,r,a=(0,d.lO)(n),i=(0,g.jd)(n,a)){t.getCorners(Lt);let h=t.getCenter(Vt);h[2]+=r,(0,m.l)(n,h,It,a),e.setCenterFromValues(It[12],It[13],It[14]);let u=2*Math.sqrt(1+It[0]+It[5]+It[10]);bt[0]=(It[6]-It[9])/u,bt[1]=(It[8]-It[2])/u,bt[2]=(It[1]-It[4])/u,bt[3]=.25*u;let l=t.getQuaternion(Pt);e.setQuaternion((0,s.lw)(bt,bt,l)),(0,s.Xr)(bt,bt),(0,o.hZ)(Ft,0,0,0);let c=e.getCenter(Vt);for(let t of Lt)t[2]+=r,i(t,0,t,0),(0,o.jb)(Dt,t,c),(0,o.gL)(Dt,Dt,bt),(0,o.tn)(Dt,Dt),(0,o.T9)(Ft,Ft,Dt);e.setHalfSize(Ft)}(this,t,e,r,i,h);else if(e.isGeographic&&(n.isWebMercator||(0,_.r1)(n)))!function(t,e,n,r,a){let i=e.getCenter(Vt);i[2]+=a;let s=(0,d.lO)(n);(0,M.projectBuffer)(i,t,0,i,s,0),St(s,e,i,n,r)}(e,this,n,t,r);else if(e.isWebMercator&&(0,_.r1)(n))!function(t,e,n,r,a){let i=e.getCenter(Vt);i[2]+=a,St(t,e,i,n,r)}(e,this,n,t,r);else{let a=this.getCenter(Vt);a[2]+=r,(0,M.projectBuffer)(a,e,0,a,n,0),t.setCenter(a),this!==t&&(t.setQuaternion(this.getQuaternion(Pt)),t.setHalfSize(this.getHalfSize(Rt)))}}}const bt=(0,h.vt)(),Pt=(0,h.vt)(),jt=(0,h.vt)(),pt=(0,u.vt)(),xt=(0,u.vt)(),wt=(0,c.vt)();const Ct=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],At=(()=>{let t=new Int8Array(162),e=0,n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),t})();function zt(t,e,n,r,a){let i=t.getQuaternion(Pt);a.setQuaternion(i),(0,s.Xr)(bt,i);let h=t.getCenter(Vt),l=t.getHalfSize(Rt);if(1===r){(0,o.gL)(Dt,h,bt),(0,o.tn)(Ft,Dt),(0,o.jk)(Zt,Ft,l),(0,o.jb)(Zt,Ft,Zt);let r=(0,o.Bw)(Zt);(0,o.WQ)(Zt,Ft,l);let i=(0,o.Bw)(Zt);if(r<n)a.setCenter(h),(0,o.hZ)(Dt,n,n,n),a.setHalfSize((0,o.WQ)(Dt,l,Dt));else{let s=i>0?1+e/i:1,h=r>0?1+n/r:1,u=(h+s)/2,c=(h-s)/2;(0,o.hs)(Zt,Ft,c),a.setHalfSize((0,o.Ln)(Zt,Zt,l,u)),(0,o.hs)(Zt,Ft,u),(0,o.Ln)(Zt,Zt,l,c),(0,o._S)(Dt,Dt),(0,o.lw)(Dt,Zt,Dt);let f=t.getQuaternion(jt);a.setCenter((0,o.gL)(Dt,Dt,f))}}else{a.setCenter((0,o.Ln)(Dt,h,u.Cb,(n+e)/2));let t=(0,o.gL)(Dt,u.Cb,bt);(0,o.tn)(t,t),a.setHalfSize((0,o.Ln)(Ft,l,t,(n-e)/2))}return a}function St(t,e,n,a,i){let s=e.getQuaternion(Pt),h=(0,r.I0)(Ht,s),o=e.getHalfSize(Rt);for(let t=0;t<8;++t){for(let e=0;e<3;++e)Ot[e]=o[e]*(t&1<<e?-1:1);for(let e=0;e<3;++e){let r=n[e];for(let t=0;t<3;++t)r+=Ot[t]*h[3*t+e];Qt[3*t+e]=r}}(0,M.projectBuffer)(Qt,t,0,Qt,a,0,8),function(t,e=new _t){(function(t,e){let{data:n,size:r}=t,a=n.length/r;if(a<=0)return;let i=new st(t);ut(p,i.minProj,i.maxProj),ct(p,p,.5),lt(x,i.maxProj,i.minProj);let s=ot(x),h=new ht;h.quality=s,a<14&&(t=new P.K(new Float64Array(i.buffer,112,42),3));let o=(0,u.vt)(),l=(0,u.vt)(),c=(0,u.vt)(),f=(0,u.vt)(),d=(0,u.vt)(),m=(0,u.vt)(),M=(0,u.vt)();switch(w(i,t,M,o,l,c,f,d,m,h)){case 1:return void K(p,x,e);case 2:return void U(t,f,e)}V(t,M,o,l,c,f,d,m,h),J(t,h.b0,h.b1,h.b2,$,N);let g=(0,u.vt)();lt(g,N,$),h.quality=ot(g),h.quality<s?it(h.b0,h.b1,h.b2,$,N,g,e):K(p,x,e)})(t,e)}(yt,i)}const qt=(0,u.CN)(-1,-1,-1),Qt=Array(24),yt=new P.K(Qt,3),Ot=(0,u.vt)(),Vt=(0,u.vt)(),Rt=(0,u.vt)(),Ht=(0,a.vt)(),It=(0,i.vt)(),Lt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Bt=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()],Dt=(0,u.vt)(),Ft=(0,u.vt)(),Zt=(0,u.vt)(),Wt=(0,u.vt)(),Xt=[0,0,0]},46610(t,e,n){n.d(e,{K:()=>r,n:()=>a});class r{constructor(t,e,n=e){this.data=t,this.size=e,this.stride=n}}class a extends r{constructor(t,e,n,r=!1,a=n){super(t,n,a),this.indices=e,this.exclusive=r}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9567],{29242(t,n,r){function e(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,r,e,a,u,i,o,c){return[t,n,r,e,a,u,i,o,c]}r.d(n,{fA:()=>a,vt:()=>e});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:a},Symbol.toStringTag,{value:"Module"})),r.d(n,["zK",0,u])},34304(t,n,r){r.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let e=1e-6;function a(){return e}const u=Math.random,i=Math.PI/180,o=180/Math.PI;function c(t){return t*i}function f(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:u,equals:function(t,n){return Math.abs(t-n)<=e*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){e=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),r.d(n,["Ov",0,u])},77690(t,n,r){r.d(n,{B8:()=>o,Ge:()=>M,I0:()=>s,KC:()=>c,a4:()=>f,hZ:()=>u,hs:()=>l,lw:()=>h,mg:()=>i,z0:()=>a});var e=r(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,a,u,i,o,c,f){return t[0]=n,t[1]=r,t[2]=e,t[3]=a,t[4]=u,t[5]=i,t[6]=o,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let r=n[1],e=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;return m?(m=1/m,t[0]=l*m,t[1]=(-h*e+a*f)*m,t[2]=(o*e-a*i)*m,t[3]=s*m,t[4]=(h*r-a*c)*m,t[5]=(-o*r+a*u)*m,t[6]=M*m,t[7]=(-f*r+e*c)*m,t[8]=(i*r-e*u)*m,t):null}function c(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8];return t[0]=i*h-o*f,t[1]=a*f-e*h,t[2]=e*o-a*i,t[3]=o*c-u*h,t[4]=r*h-a*c,t[5]=a*u-r*o,t[6]=u*f-i*c,t[7]=e*c-r*f,t[8]=r*i-e*u,t}function f(t){let n=t[0],r=t[1],e=t[2],a=t[3],u=t[4],i=t[5],o=t[6],c=t[7],f=t[8];return n*(f*u-i*c)+r*(-f*a+i*o)+e*(c*a-u*o)}function h(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1],m=r[2],b=r[3],d=r[4],x=r[5],p=r[6],y=r[7],v=r[8];return t[0]=s*e+M*i+m*f,t[1]=s*a+M*o+m*h,t[2]=s*u+M*c+m*l,t[3]=b*e+d*i+x*f,t[4]=b*a+d*o+x*h,t[5]=b*u+d*c+x*l,t[6]=p*e+y*i+v*f,t[7]=p*a+y*o+v*h,t[8]=p*u+y*c+v*l,t}function l(t,n,r){let e=r[0],a=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function s(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=r+r,o=e+e,c=a+a,f=r*i,h=e*i,l=e*o,s=a*i,M=a*o,m=a*c,b=u*i,d=u*o,x=u*c;return t[0]=1-l-m,t[3]=h-x,t[6]=s+d,t[1]=h+x,t[4]=1-f-m,t[7]=M-b,t[2]=s-d,t[5]=M+b,t[8]=1-f-l,t}function M(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=n[9],s=n[10],M=n[11],m=n[12],b=n[13],d=n[14],x=n[15],p=r*o-e*i,y=r*c-a*i,v=r*f-u*i,g=e*c-a*o,q=e*f-u*o,P=a*f-u*c,I=h*b-l*m,S=h*d-s*m,R=h*x-M*m,E=l*d-s*b,k=l*x-M*b,N=s*x-M*d,F=p*N-y*k+v*E+g*R-q*S+P*I;return F?(F=1/F,t[0]=(o*N-c*k+f*E)*F,t[1]=(c*R-i*N-f*S)*F,t[2]=(i*k-o*R+f*I)*F,t[3]=(a*k-e*N-u*E)*F,t[4]=(r*N-a*R+u*S)*F,t[5]=(e*R-r*k-u*I)*F,t[6]=(b*P-d*q+x*g)*F,t[7]=(d*v-m*P-x*y)*F,t[8]=(m*q-b*v+x*p)*F,t):null}function m(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const b=h,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8],s=n[0],M=n[1],m=n[2],b=n[3],d=n[4],x=n[5],p=n[6],y=n[7],v=n[8],g=(0,e.FD)();return Math.abs(r-s)<=g*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-M)<=g*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-m)<=g*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(i-b)<=g*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-d)<=g*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(c-x)<=g*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-p)<=g*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-y)<=g*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-v)<=g*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},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,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:s,fromRotation:function(t,n){let r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[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:o,isOrthoNormal:function(t){let n=(0,e.FD)(),r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+i*i+f*f))<=n&&Math.abs(1-(a*a+o*o+h*h))<=n&&Math.abs(1-(u*u+c*c+l*l))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let r=n[0],e=n[1],a=n[2],u=n[4],i=n[5],o=n[6],c=n[8],f=n[9],h=n[10],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;if(!m)return null;let b=1/m;return t[0]=l*b,t[1]=(-h*e+a*f)*b,t[2]=(o*e-a*i)*b,t[3]=s*b,t[4]=(h*r-a*c)*b,t[5]=(-o*r+a*u)*b,t[6]=M*b,t[7]=(-f*r+e*c)*b,t[8]=(i*r-e*u)*b,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=Math.sin(r),M=Math.cos(r);return t[0]=M*e+s*i,t[1]=M*a+s*o,t[2]=M*u+s*c,t[3]=M*i-s*e,t[4]=M*o-s*a,t[5]=M*c-s*u,t[6]=f,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){let e=r[0],a=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1];return t[0]=e,t[1]=a,t[2]=u,t[3]=i,t[4]=o,t[5]=c,t[6]=s*e+M*i+f,t[7]=s*a+M*o+h,t[8]=s*u+M*c+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,r){r.d(n,{C:()=>u,Cc:()=>q,Io:()=>d,LI:()=>M,Ln:()=>b,Om:()=>g,Re:()=>c,S8:()=>v,T9:()=>l,WQ:()=>o,aI:()=>R,e$:()=>I,hG:()=>x,hZ:()=>i,hs:()=>m,l0:()=>P,qE:()=>s,t2:()=>S});var e=r(34727),a=r(34304);function u(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function s(t,n,r,a){return t[0]=(0,e.qE)(n[0],r[0],a[0]),t[1]=(0,e.qE)(n[1],r[1],a[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function d(t,n){let r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function x(t,n){let r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function p(t){let n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function y(t){let n=t[0],r=t[1];return n*n+r*r}function v(t,n){let r=n[0],e=n[1],a=r*r+e*e;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function q(t,n,r,e){let a=n[0],u=n[1];return t[0]=a+e*(r[0]-a),t[1]=u+e*(r[1]-u),t}function P(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a+r[4],t[1]=r[1]*e+r[3]*a+r[5],t}function I(t,n,r,e){let a=n[0]-r[0],u=n[1]-r[1],i=Math.sin(e),o=Math.cos(e);return t[0]=a*o-u*i+r[0],t[1]=a*i+u*o+r[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function R(t,n){let r=t[0],e=t[1],u=n[0],i=n[1],o=(0,a.FD)();return Math.abs(r-u)<=o*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))}const E=p,k=c,N=f,F=h,_=d,K=x,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(t,n){let r=t[0],e=t[1],a=n[0],u=n[1],i=r*r+e*e;i>0&&(i=1/Math.sqrt(i));let o=a*a+u*u;o>0&&(o=1/Math.sqrt(o));let c=(r*a+e*u)*i*o;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:s,copy:u,cross:function(t,n,r){let e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:_,distance:d,div:F,divide:h,dot:g,equals:R,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:E,length:p,lerp:q,max:l,min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:N,multiply:f,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:v,projectAndScale:function(t,n,r,e,a){let u=n[0]-r[0],i=n[1]-r[1],o=(e[0]*u+e[1]*i)*(a-1);return u=e[0]*o,i=e[1]*o,t[0]=n[0]+u,t[1]=n[1]+i,t},random:function(t,n=1){let r=2*(0,a.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:I,round:M,scale:m,scaleAndAdd:b,set:i,sqrDist:K,sqrLen:D,squaredDistance:x,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:k,subtract:c,transformMat2:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a,t[1]=r[1]*e+r[3]*a,t},transformMat2d:P,transformMat3:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[3]*a+r[6],t[1]=r[1]*e+r[4]*a+r[7],t},transformMat4:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[4]*a+r[12],t[1]=r[1]*e+r[5]*a+r[13],t}},Symbol.toStringTag,{value:"Module"})),r.d(n,["Il",0,E,"jb",0,k,"xg",0,_])},34727(t,n,r){r.d(n,{$8:()=>P,Cc:()=>i,Hx:()=>b,Io:()=>g,KJ:()=>f,OS:()=>R,Sp:()=>s,XM:()=>h,YN:()=>l,ZH:()=>m,b6:()=>q,cU:()=>a,gg:()=>M,hs:()=>o,kU:()=>c,or:()=>S,pF:()=>k,qE:()=>u});const e=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n,r){return t+(n-t)*r}function o(t,n,r,e,a){return i(e,a,(t-n)/(r-n))}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function h(t){return Math.acos(u(t,-1,1))}function l(t){return Math.asin(u(t,-1,1))}function s(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function M(t,n,r=1e-6){return!s(t,n,r)&&t>n}function m(t,n,r=1e-6){return!s(t,n,r)&&t<n}function b(t,n,r=1e-6){return s(t,n,r)||t>n}const d=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function x(t){return d.setFloat64(0,t),d.getBigInt64(0)}const p=1000000n,y=v(1);function v(t){let n=x(t=Math.abs(t)),r=function(t){return d.setBigInt64(0,t),d.getFloat64(0)}(n<=p?p:n-p);return Math.abs(t-r)}function g(t,n,r=y){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&v(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;let e=x(t),a=x(n);return!(e<0!=a<0||(e<a?a-e:e-a)>p)}function q(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let e=Math.abs(t-n),a=Math.abs(t),u=Math.abs(n);if(0===t||0===n||a<1e-12&&u<1e-12){if(e>.01*r)return!1}else if(e/(a+u)>r)return!1;return!0}function P(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return e[0]=t,e[0]}function S(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(s(n,1)&&s(r,1)&&s(e,1))}function R(t,n){return(t%n+n)%n}const E=I(34028234663852886e22);function k(t,n,r){if(void 0===r||0==+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}r.d(n,["pq",0,E])},19419(t,n,r){r.d(n,{$9:()=>P,C:()=>u,DC:()=>m,HY:()=>q,IO:()=>l,Ie:()=>S,Rj:()=>g,Uc:()=>v,VL:()=>b,VY:()=>o,Wc:()=>x,aI:()=>E,bx:()=>s,fA:()=>i,fT:()=>M,gR:()=>I,gX:()=>p,ib:()=>y,nw:()=>h,pJ:()=>k,tK:()=>f,uJ:()=>d,vt:()=>a,w1:()=>c}),r(34727);var e=r(5443);function a(t=F){return[t[0],t[1],t[2],t[3]]}function u(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function i(t,n,r,e,u=a()){return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u}function o(t,n=a()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function c(t,n,r=new e.A){return r.xmin=t[0],r.ymin=t[1],r.xmax=t[2],r.ymax=t[3],r.spatialReference=n,r}function f(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function h(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function l(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function s(t,{xmin:n,ymin:r,xmax:e,ymax:a}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],a)}function M(t,n,r){if(null==n)u(r,t);else if("length"in n)R(n)?(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[2]),r[3]=Math.max(t[3],n[3])):(2===n.length||3===n.length)&&(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[0]),r[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":r[0]=Math.min(t[0],n.xmin),r[1]=Math.min(t[1],n.ymin),r[2]=Math.max(t[2],n.xmax),r[3]=Math.max(t[3],n.ymax);break;case"point":r[0]=Math.min(t[0],n.x),r[1]=Math.min(t[1],n.y),r[2]=Math.max(t[2],n.x),r[3]=Math.max(t[3],n.y)}}function m(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])}function b(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function d(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function x(t){return b(t)*d(t)}function p(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function y(t){let n=b(t),r=d(t);return Math.sqrt(n*n+r*r)}function v(t,n){return g(t,n[0],n[1])}function g(t,n,r){return n>=t[0]&&r>=t[1]&&n<=t[2]&&r<=t[3]}function q(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function P(t,n,r){return Math.max(n[0],t[0])-r<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-r<=Math.min(n[3],t[3])}function I(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function S(t){return t?u(t,N):a(N)}function R(t){return null!=t&&4===t.length}function E(t,n){return R(t)&&R(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:null==t&&null==n||t===n}function k(t,n){if(4!==n.length||t[0]===t[2]||t[1]===t[3])return!1;for(let r=0;r<n.length;r++){let e=n[r],a=n[(r+1)%n.length];if(e[0]!==t[0]&&e[0]!==t[2]||e[1]!==t[1]&&e[1]!==t[3])return!1;let u=e[1]===a[1]&&e[0]!==a[0],i=e[0]===a[0]&&e[1]!==a[1];if(!u&&!i)return!1}return!0}const N=[1/0,1/0,-1/0,-1/0],F=[0,0,0,0];r.d(n,["qv",0,N])},4305(t,n,r){r.d(n,{B4:()=>c,jK:()=>h,lM:()=>s,m_:()=>l,ty:()=>m});var e=r(34727),a=(r(37585),r(19419)),u=r(15507);const i=[0,0];function o(t){let n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function c(t,n,r,e,a){let[u,i,c,f]=o(a);return[t[0]*u+n[0]*i+r[0]*c+e[0]*f,t[1]*u+n[1]*i+r[1]*c+e[1]*f]}function f(t,n,r,e,a){let[u,i,c,f]=o(a);return t*u+n*i+r*c+e*f}function h(t,n,r){let e=t,[a,o,c]=n.b,f=(0,u.RS)([0,0],e,o,r),h=(0,u.RS)(i,o,c,r),l=(0,u.RS)([0,0],c,a,r),s=(0,u.RS)([0,0],f,h,r),M=(0,u.RS)([0,0],h,l,r);return[{b:[(0,u.RS)([],s,M,r),f,s]},{b:[[...a],M,l]}]}function l(t,n,r){let a=t,[i,o,f]=n.b,h=(0,u.R)(r,[.1,.5,.9],t=>{let n=1-t,[r,e]=c(a,o,f,i,t);return[r,e,3*n*n*(o[0]-a[0])+6*n*t*(f[0]-o[0])+3*t*t*(i[0]-f[0]),3*n*n*(o[1]-a[1])+6*n*t*(f[1]-o[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*o[0]+a[0])+6*t*(i[0]-2*f[0]+o[0]),6*n*(f[1]-2*o[1]+a[1])+6*t*(i[1]-2*f[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0,s=h.map(t=>{let n=c(a,o,f,i,t),[e,u]=n,h=r[0]-e,s=r[1]-u,M=Math.sqrt(h*h+s*s);return l=Math.min(M,l),{t,curvePoint:n,distance:M}}),M=[];for(let t of s){let{t:n,distance:r}=t;(0,e.b6)(r,l)&&!M.some(({t})=>(0,e.Sp)(t,n))&&M.push(t)}return M}function s(t,n,r){let e=n,[u,i,o]=r.b;if((0,a.tK)(t,e),(0,a.tK)(t,u),(0,a.Rj)(t,i[0],i[1])&&(0,a.Rj)(t,o[0],o[1]))return t;for(let n of M(e[0],i[0],o[0],u[0]))n>0&&n<1&&(0,a.nw)(t,f(e[0],i[0],o[0],u[0],n));for(let n of M(e[1],i[1],o[1],u[1]))n>0&&n<1&&(0,a.IO)(t,f(e[1],i[1],o[1],u[1],n));return t}function M(t,n,r,e){let a=3*(3*(n-r)-t+e),u=6*(t-2*n+r),i=3*(n-t);if(0===a)return 0===u?[]:[-i/u];let o=Math.sqrt(u*u-4*a*i);return[(-u+o)/(2*a),(-u-o)/(2*a)]}function m(t,n,r){let e=0,a=[n];for(let n=0;n<16;n++){let n=t,i=[];for(let t of a)i.push(...h(n,t,.5)),n=t.b[0];a=i,n=t,e=0;let o=0;for(let t of a){let[r,a,i]=t.b,c=Math.sqrt((0,u.kb)(n,r));e+=(c+(Math.sqrt((0,u.kb)(n,a))+Math.sqrt((0,u.kb)(a,i))+Math.sqrt((0,u.kb)(i,r))))/2,o+=c,n=r}if(e-o<r)return e}return e}},513(t,n,r){r.d(n,{KP:()=>i,X0:()=>h,fM:()=>f,mq:()=>c,zW:()=>l});var e=r(19419),a=r(59803),u=r(15507);class i{constructor(t,n,r,e,a,u){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=a,this.isInvalid=u}get startPoint(){let{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){let{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){let{cx:r,cy:e,radius:a}=t;return[r+a*Math.cos(n),e+a*Math.sin(n)]}function c(t,n){if(t.isInvalid)return(0,u.RS)([0,0],t.startPoint,t.endPoint,n);let{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function f(t,n){if(t.isInvalid)return(0,a.T)(t.startPoint,t.endPoint,n);let{cx:r,cy:e,thetaStart:i,thetaEnd:c}=t,[f,h]=n,l=(0,u.Pf)((0,u.yN)(i,c),Math.atan2(h-e,f-r)),s=o(t,l);return{t:(l-i)/(c-i),curvePoint:s,distance:Math.sqrt((0,u.kb)(n,s))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;let{cx:r,cy:a,radius:i,thetaStart:c,thetaEnd:f}=n;(0,e.tK)(t,o(n,c)),(0,e.tK)(t,o(n,f));let h=(0,u.yN)(c,f),l=Math.PI/2,s=0;for(let n of[[r+i,a],[r,a+i],[r-i,a],[r,a-i]])s=(0,u.Cp)(h,s),s>h.min&&s<h.max&&(0,e.tK)(t,n),s+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;let{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},50954(t,n,r){r.d(n,{GX:()=>h,pM:()=>f});var e=r(77690),a=r(29242),u=(r(37585),r(513)),i=r(15507);const o=(0,a.vt)();function c(t,n,r){let[a,u]=t,[c,f]=n,[h,l]=r;(0,e.hZ)(o,a,c,h,u,f,l,1,1,1);let s=(0,e.a4)(o),M=4*s/((0,i.kb)(t,n)+(0,i.kb)(n,r)+(0,i.kb)(r,t));if(!isFinite(M)||Math.abs(M)<1e-8)return null;let m=a**2+u**2,b=c**2+f**2,d=h**2+l**2;(0,e.hZ)(o,m,b,d,u,f,l,1,1,1);let x=(0,e.a4)(o);return(0,e.hZ)(o,m,b,d,a,c,h,1,1,1),[x/s*.5,(0,e.a4)(o)/s*-.5]}function f(t,n){let[r,e]=n.c,a=c(t,e,r),o=null==a,f=a??(0,i.RS)([],t,r,.5),[h,l]=t,[s,M]=e,[m,b]=r,[d,x]=f,p=h-d,y=l-x,v=Math.sqrt(p*p+y*y),g=(0,i.t7)(l-x,h-d),q=(0,i.t7)(M-x,s-d),P=(0,i.t7)(b-x,m-d);return(q-g)*(P-q)<0&&(P+=2*Math.sign(g-P)*Math.PI),new u.KP(d,x,v,g,P,o)}function h(t,n,r){let e=(0,u.mq)(t,r/2),a=(0,u.mq)(t,r),i=(0,u.mq)(t,(r+1)/2);return[{c:[a,e]},{c:[[...n.c[0]],i]}]}},79567(t,n,r){r.d(n,{e:()=>h});var e=r(19419),a=r(4305),u=r(513),i=r(50954),o=r(52006),c=r(49663),f=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,a.lM)(t,n,r);if((0,o.aO)(r)){let e=(0,i.pM)(n,r);return(0,u.X0)(t,e)}if((0,o.DA)(r)){let e=(0,c.io)(n,r);return(0,u.X0)(t,e)}return(0,f.DL)(t,n,r)}},52006(t,n,r){function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function a(t){return"curveRings"in t?t.curveRings:t.curvePaths}function u(t){return"b"in t}function i(t){return"c"in t}function o(t){return Array.isArray(t)}function c(t){return"a"in t}function f(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function l(t,n){return a(t).flat().some(t=>function(t,n){return!(o(t)||(u(t)?n.has("cubic-bezier"):i(t)?n.has("circular-arc"):!f(t)&&!h(t)||n.has("elliptic-arc")))}(t,n))}function s(t){return o(t)?t:u(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function M(t){if(u(t)){let[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(i(t)){let[n,r]=t.c;return{c:[[...n],[...r]]}}if(o(t))return[...t];if(f(t)){let[n,r,e,a]=t.a;return{a:[[...n],[...r],e,a]}}if(h(t)){let[n,r,e,a,u,i,o]=t.a;return{a:[[...n],[...r],e,a,u,i,o]}}return t}r.d(n,{DA:()=>f,Ed:()=>e,FD:()=>a,FG:()=>c,V8:()=>l,Xq:()=>o,aO:()=>i,n1:()=>u,tk:()=>M,wY:()=>h,yP:()=>s}),r(4576)},49663(t,n,r){r.d(n,{io:()=>i,xG:()=>o});var e=r(34727),a=(r(37585),r(513)),u=r(15507);function i(t,n){let[r,i,o,c]=n.a,[f,h]=t,[l,s]=r,[M,m]=i,b=f-M,d=h-m,x=Math.sqrt(b*b+d*d),p=l-M,y=s-m,v=Math.sqrt(p*p+y*y),g=0===x||0===v||!(0,e.b6)(x,v),q=x,[P,I]=(0,u.Gz)((0,u.t7)(h-m,f-M),Math.atan2(s-m,l-M),o,c);return new a.KP(M,m,q,P,I,g)}function o(t,n,r){let{cx:e,cy:u,thetaStart:i,thetaEnd:o}=t,[c,f,h,l]=n.a,s=i*(1-r)+o*r;return[{a:[(0,a.mq)(t,r),[e,u],+(Math.abs(s-i)<Math.PI),l]},{a:[[...c],[e,u],+(Math.abs(o-s)<Math.PI),l]}]}},46068(t,n,r){r.d(n,{DL:()=>M,ED:()=>l,SW:()=>c,Uk:()=>h,pb:()=>s,xm:()=>m}),r(77690);var e=r(29242),a=(r(37585),r(19419)),u=r(52006),i=r(15507);class o{constructor(t,n,r,e,a,u,i,o,c){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=a,this.sinR=u,this.u1=i,this.u2=o,this.isInvalid=c}}function c(t,n){let[r,e,a,u,c,f,h]=n.a,[l,s]=t,[M,m]=r,[b,d]=e,x=f*h,p=Math.cos(c),y=Math.sin(c),[v,g]=(0,i.Gz)((0,i.t7)(1/x*(s-d)*p-1/x*(l-b)*y,1/f*(s-d)*y+1/f*(l-b)*p),Math.atan2(1/x*(m-d)*p-1/x*(M-b)*y,1/f*(m-d)*y+1/f*(M-b)*p),a,u);return new o(b,d,f,x,p,y,v,g,0===f||0===x)}function f(t,n){let{a:r,b:e,cosR:a,sinR:u,cx:i,cy:o}=t,c=Math.cos(n),f=Math.sin(n);return[r*c*a-e*f*u+i,r*c*u+e*f*a+o]}function h(t,n){let{u1:r,u2:e}=t;return f(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,u.tk)(n)];let[e,[a,i],o,c,f,l,s]=n.a,{u1:M,u2:m}=t,b=M*(1-r)+m*r;return[{a:[[...h(t,r)],[a,i],+(Math.abs(b-M)<Math.PI),c,f,l,s]},{a:[[...e],[a,i],+(Math.abs(m-b)<Math.PI),c,f,l,s]}]}function s(t,n){let{a:r,b:e,cosR:a,sinR:u,u1:o,u2:c}=t,h=Math.PI/6,l=[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],s=(0,i.R)(n,l,n=>{let i=Math.cos(n),o=Math.sin(n),[c,h]=f(t,n);return[c,h,-r*a*o-e*u*i,-r*u*o+e*a*i,-r*a*i+e*u*o,-r*u*i-e*a*o]}),M=(0,i.yN)(o,c),m=new Set(s.map(t=>(0,i.Cp)(M,t)).filter(t=>t>M.min&&t<M.max));m.add(o),m.add(c);let b,d,x=1/0;for(let r of m){let e=f(t,r),[a,u]=e,i=n[0]-a,h=n[1]-u,l=i*i+h*h;l<x&&(b=(r-o)/(c-o),d=e,x=l)}return{t:b,curvePoint:d,distance:Math.sqrt(x)}}function M(t,n,r){let e=c(n,r),{a:u,b:o,u1:h,u2:l,cosR:s,sinR:M,isInvalid:m}=e,b=r.a[0];if((0,a.tK)(t,n),(0,a.tK)(t,b),m)return t;let d=Math.atan2(-o*M,u*s),x=d+Math.PI,p=Math.atan2(o*s,u*M),y=p+Math.PI,v=(0,i.yN)(h,l);for(let n of[d,x,p,y].map(t=>(0,i.Cp)(v,t)))n>v.min&&n<v.max&&(0,a.tK)(t,f(e,n));return t}function m(t,n,r){let[e,a,u,o,l,s,M]=n.a,m=c(t,n),{u1:b,u2:d,isInvalid:x}=m,p=d-b;if(x)return Math.sqrt((0,i.kb)(t,e));let y=[0,0],v=0,g=[h(m,0),h(m,.25),h(m,.5),h(m,.75),h(m,1)];for(let t=0;t<14;t++){let t=g.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(g[r]),e.push(f(m,b+(2*r+1)*n));e.push(g[g.length-1]),g=e,v=0;let u=0;for(let t=1;t<g.length;t++){let n=g[t-1],r=g[t];if(v+=Math.sqrt((0,i.kb)(n,r)),t>1){let e=g[t-2],o=(0,i.M_)(y,e,n,a,r);u+=o?Math.sqrt((0,i.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else u+=v}if(u-v<r)return v}return v}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},59803(t,n,r){r.d(n,{T:()=>u});var e=r(34727),a=r(15507);function u(t,n,r){let[u,i]=t,[o,c]=n,[f,h]=r,[l,s]=[o-u,c-i],M=l*(f-u)+s*(h-i);M/=l**2+s**2,M=isNaN(M)?0:(0,e.qE)(M,0,1);let m=(0,a.RS)([0,0],t,n,M);return{t:M,curvePoint:m,distance:Math.sqrt((0,a.kb)(m,r))}}},15507(t,n,r){r.d(n,{Cp:()=>b,Gz:()=>m,M_:()=>c,Pf:()=>d,R:()=>x,RS:()=>u,kb:()=>i,t7:()=>h,yE:()=>o,yN:()=>M});var e=r(34727),a=r(37585);function u(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function i(t,n){return(0,a.hG)(t,n)}function o(t,n,r){let e=i(n,r);if(0===e)return i(n,t);let a=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return a*a/e}function c(t,n,r,e,a){let[u,i]=n,[o,c]=r,[f,h]=e,[l,s]=a,M=(u-o)*(h-s)-(i-c)*(f-l);if(0===M)return null;let m=(u*c-i*o)*(f-l)-(u-o)*(f*s-h*l),b=(u*c-i*o)*(h-s)-(i-c)*(f*s-h*l);return t[0]=m/M,t[1]=b/M,t}const f=2*Math.PI;function h(t,n){let r=Math.atan2(t,n);return r<0?r+f:r}function l(t){return Math.abs(t)%f}function s(t){let n=l(t);return n<Math.PI?n:f-n}function M(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,a){if((0,e.Sp)(l(t-n),0))return r?[t,t]:[t,a?t-f:t+f];let[u,i]=a?[t-f,t]:[t,t+f];return[t,b({min:u,max:i},n)]}function b({min:t,max:n},r){let e;return e=n-r,e>=f?(e-=e%f,r+e):(e=r-t,e>=f?(e-=e%f,r-e):r)}function d(t,n){let r=b(t,n);return r>t.min&&r<t.max?r:s(r-t.min)<s(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let a=n;for(let n=0;n<e;n++){let[n,e,u,i,o,c]=r(a),f=t[0]-n,h=t[1]-e,l=-u,s=-i;a+=-(2*f*l+2*h*s)/(2*l*l+2*f*-o+2*s*s+2*h*-c||1e-6)}return a})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9478],{34727(e,t,n){n.d(t,{$8:()=>C,Cc:()=>l,Hx:()=>d,Io:()=>A,KJ:()=>s,OS:()=>V,Sp:()=>h,XM:()=>f,YN:()=>c,ZH:()=>y,b6:()=>M,cU:()=>a,gg:()=>p,hs:()=>u,kU:()=>o,or:()=>U,pF:()=>T,qE:()=>i});const r=new Float32Array(1);function a(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function i(e,t,n){return Math.min(Math.max(e,t),n)}function l(e,t,n){return e+(t-e)*n}function u(e,t,n,r,a){return l(r,a,(e-t)/(n-t))}function o(e){return e*Math.PI/180}function s(e){return 180*e/Math.PI}function f(e){return Math.acos(i(e,-1,1))}function c(e){return Math.asin(i(e,-1,1))}function h(e,t,n=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=n}function p(e,t,n=1e-6){return!h(e,t,n)&&e>t}function y(e,t,n=1e-6){return!h(e,t,n)&&e<t}function d(e,t,n=1e-6){return h(e,t,n)||e>t}const g=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function b(e){return g.setFloat64(0,e),g.getBigInt64(0)}const m=1000000n,w=x(1);function x(e){let t=b(e=Math.abs(e)),n=function(e){return g.setBigInt64(0,e),g.getFloat64(0)}(t<=m?m:t-m);return Math.abs(e-n)}function A(e,t,n=w){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;if(null!=n&&x(Math.min(Math.abs(e),Math.abs(t)))<n)return Math.abs(e-t)<=n;let r=b(e),a=b(t);return!(r<0!=a<0||(r<a?a-r:r-a)>m)}function M(e,t,n=1e-6){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;let r=Math.abs(e-t),a=Math.abs(e),i=Math.abs(t);if(0===e||0===t||a<1e-12&&i<1e-12){if(r>.01*n)return!1}else if(r/(a+i)>n)return!1;return!0}function C(e){return D(Math.max(-F,Math.min(e,F)))}function D(e){return r[0]=e,r[0]}function U(e){let t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],r=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(h(t,1)&&h(n,1)&&h(r,1))}function V(e,t){return(e%t+t)%t}const F=D(34028234663852886e22);function T(e,t,n){if(void 0===n||0==+n)return Math[e](t);if(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0)return NaN;let r=t.toString().split("e");return r=(t=Math[e](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}n.d(t,["pq",0,F])},43946(e,t,n){n.d(t,{D4:()=>f,Hh:()=>l});var r=n(2741);const a=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34028234663852886e22,34028234663852886e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null;function l(){return i||(i=n.e(382).then(()=>n(30382)).then(({default:e})=>e({locateFile:e=>(0,r.s)(`esri/layers/raster/formats/${e}`)})).then(e=>{!function(e){let t,{_malloc:n,_free:r,memory:i,_lerc_getBlobInfo:l,_lerc_getDataRanges:s,_lerc_decode_4D:f}=e,c=e=>{let r=e.map(e=>function(e){return 16+(e>>3<<3)}(e)),a=r.reduce((e,t)=>e+t),l=n(a);t=new Uint8Array(i.buffer);let u=r[0];r[0]=l;for(let e=1;e<r.length;e++){let t=r[e];r[e]=r[e-1]+u,u=t}return r};u.getBlobInfo=e=>{let n=new Uint8Array(48),a=new Uint8Array(24),[u,f,h]=c([e.length,n.length,a.length]);t.set(e,u),t.set(n,f),t.set(a,h);let p=l(u,e.length,f,h,12,3);if(p)throw r(u),Error(`lerc-getBlobInfo: error code is ${p}`);t=new Uint8Array(i.buffer),o(t,f,n),o(t,h,a);let y=new Uint32Array(n.buffer),d=new Float64Array(a.buffer),[g,b,,m,w,x,A,M,C,D,U]=y,V=0===A,F={version:g,depthCount:D,width:m,height:w,validPixelCount:A,bandCount:x,blobSize:M,maskCount:C,dataType:b,minValue:d[0],maxValue:d[1],maxZerror:d[2],statistics:[],bandCountWithNoData:U};if(U&&D>1)return r(u),F;if(1===D&&1===x){r(u);let e=V?0:d[0],t=V?0:d[1];return F.statistics.push({minValue:e,maxValue:t}),F}let T=D*x*8,k=new Uint8Array(T),I=new Uint8Array(T),N=u,_=0,v=0,P=!1;if(t.byteLength<u+2*T?(r(u),P=!0,[N,_,v]=c([e.length,T,T]),t.set(e,N)):[_,v]=c([T,T]),t.set(k,_),t.set(I,v),p=s(N,e.length,D,x,_,v),p)throw r(N),P||r(_),Error(`lerc-getDataRanges: error code is ${p}`);t=new Uint8Array(i.buffer),o(t,_,k),o(t,v,I);let z=new Float64Array(k.buffer),S=new Float64Array(I.buffer),B=F.statistics;for(let e=0;e<x;e++)if(D>1){let t=z.slice(e*D,(e+1)*D),n=S.slice(e*D,(e+1)*D),r=V?0:Math.min.apply(null,t),a=V?0:Math.max.apply(null,n);B.push({minValue:r,maxValue:a,depthStats:{minValues:t,maxValues:n}})}else B.push({minValue:V?0:z[e],maxValue:V?0:S[e]});return r(N),P||r(_),F},u.decode=(e,n)=>{let{maskCount:l,depthCount:u,bandCount:s,width:h,height:p,dataType:y,bandCountWithNoData:d,validPixelCount:g}=n,b=a[y],m=h*p,w=new Uint8Array(m*s),x=m*u*s*b.size,A=new Uint8Array(x),M=new Uint8Array(s),C=new Uint8Array(8*s);if(0===g)return{data:A,maskData:w,noDataValues:null};let[D,U,V,F,T]=c([e.length,w.length,A.length,M.length,C.length]);t.set(e,D),t.set(w,U),t.set(A,V),t.set(M,F),t.set(C,T);let k=f(D,e.length,l,U,u,h,p,s,y,V,F,T);if(k)throw r(D),Error(`lerc-decode: error code is ${k}`);t=new Uint8Array(i.buffer),o(t,V,A),o(t,U,w);let I=null;if(d){o(t,F,M),o(t,T,C),I=[];let e=new Float64Array(C.buffer);for(let t=0;t<M.length;t++)I.push(M[t]?e[t]:null)}return r(D),{data:A,maskData:w,noDataValues:I}}}(e)}),i)}const u={getBlobInfo:null,decode:null};function o(e,t,n){n.set(e.slice(t,t+n.length))}function s(e,t,n,r,a){if(n<2)return e;let i=new r(t*n);for(let r=0,a=0;r<t;r++)for(let l=0,u=r;l<n;l++,u+=t)i[u]=e[a++];return i}function f(e,t={}){let n=t.inputOffset??0,r=e instanceof Uint8Array?e.subarray(n):new Uint8Array(e,n),i=u.getBlobInfo(r),{data:l,maskData:o,noDataValues:f}=u.decode(r,i),{width:c,height:h,bandCount:p,depthCount:y,dataType:d,maskCount:g,statistics:b}=i,m=a[d],w=new m.ctor(l.buffer),x=[],A=[],M=c*h,C=M*y,D=a.find(e=>e.pixelType===t.outputPixelType)??m,U=D.pixelType!==m.pixelType;for(let e=0;e<p;e++){let n=e*C,r=n+C,a=w.subarray(n,r),i=U?new D.ctor(a):a;if(t.returnInterleaved)x.push(i);else{let e=s(i,M,y,D.ctor);x.push(e)}A.push(o.subarray(n,r))}let V=0===g?null:1===g?A[0]:new Uint8Array(M);if(g>1){V.set(A[0]);for(let e=1;e<A.length;e++){let t=A[e];for(let e=0;e<M;e++)V[e]=V[e]&t[e]}}let{noDataValue:F}=t,T=null!=F&&D.range[0]<=F&&D.range[1]>=F,{validPixelCount:k}=i;if(g>0&&T)for(let e=0;e<p;e++){let t=x[e];if(0===k)t.fill(F);else{let n=A[e]||V;for(let e=0;e<M;e++)0===n[e]&&(t[e]=F)}}let I=g===p&&p>1?A:null;return{width:c,height:h,bandCount:p,pixelType:D.pixelType,depthCount:y,statistics:b,pixels:x,mask:V,validPixelCount:k,bandMasks:I,noDataValues:f}}},59478(e,t,n){n.r(t),n.d(t,{default:()=>o});var r=n(34727),a=n(43946);const i=(0,r.$8)(-1/0);function l(e,t={}){let n=t.noDataValue??i,r=(0,a.D4)(e,{...t,noDataValue:n,outputPixelType:"F32"});return{pixelData:r.pixels[0],width:r.width,height:r.height,minValue:r.statistics[0].minValue,maxValue:r.statistics[0].maxValue,noDataValue:n,maskData:t.returnMask?r.mask:null,validPixelCount:r.validPixelCount}}class u{async _decode(e){await(0,a.Hh)();let t=l(e.buffer,e.options),n=[t.pixelData.buffer];return t.maskData&&n.push(t.maskData.buffer),{result:t,transferList:n}}}function o(){return new u}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2810],{4341(e,t,r){r.d(t,{I:()=>a});var i=r(26390);class a{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*n);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,n));e++)this._items.push(this._allocator())}}const n=1024},11964(e,t,r){r.d(t,{Cr:()=>u,H6:()=>d,LV:()=>h,_I:()=>m,kb:()=>c,vt:()=>l});var i=r(34727),a=r(4341),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function h(e,t){let r=p.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.vector,t,e),r}function c(e,t){let r=(0,n.Re)(o.rq.get(),t,e.origin),a=(0,n.Om)(e.vector,r),s=(0,n.Om)(e.vector,e.vector);if(Math.abs(s)<_)return(0,n.hG)(e.origin,t);let l=(0,i.qE)(a/s,0,1),h=(0,n.Re)(o.rq.get(),(0,n.hs)(o.rq.get(),e.vector,l),r);return(0,n.Om)(h,h)}function m(e,t,r){return d(e,t,0,1,r)}function d(e,t,r,a,s){let{vector:l,origin:h}=e,u=(0,n.Re)(o.rq.get(),t,h),c=(0,n.Om)(l,u)/(0,n.m3)(l);return(0,n.hs)(s,l,(0,i.qE)(c,r,a)),(0,n.WQ)(s,s,e.origin)}(0,s.vt)(),(0,s.vt)();const p=new a.I(()=>l()),_=1e-9},80754(e,t,r){r.d(t,{kS:()=>h,kd:()=>l});var i=r(82799),a=r(16930),n=r(60408),s=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,a]=e.b;r[0]+=t,i[0]+=t,a[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},71351(e,t,r){r.d(t,{C:()=>c,Cr:()=>m,LV:()=>u,fA:()=>d,kb:()=>p,vt:()=>l});var i=r(4341),a=(r(77690),r(29242)),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?h((0,s.o8)(e.origin),(0,s.o8)(e.direction)):h((0,s.vt)(),(0,s.vt)())}function h(e,t){return{origin:e,direction:t}}function u(e,t){let r=_.get();return r.origin=e,r.direction=t,r}function c(e,t=l()){return d(e.origin,e.direction,t)}function m(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.direction,t,e),r}function d(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.C)(r.direction,t),r}function p(e,t){let r=(0,n.$A)(o.rq.get(),(0,n.S8)(o.rq.get(),e.direction),(0,n.Re)(o.rq.get(),t,e.origin));return(0,n.Om)(r,r)}const _=new i.I(()=>l());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,a.vt)()},94008(e,t,r){r.d(t,{iy:()=>d}),r(44208),r(53966);var i=r(34727),a=r(34304),n=r(58083),s=r(35522),o=r(51850),l=r(91829),h=r(34275);var u=r(71351),c=r(44280),m=r(32114);class d{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,o.fA)(e,t,r):function(e){return t=e,(0,h.vZ)(t)&&t.length>=3||function(e){return((0,h.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,o.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,o.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return(0,s.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e||!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){let{origin:i,direction:a}=e;t[0]=i[0]+a[0]*r,t[1]=i[1]+a[1]*r,t[2]=i[2]+a[2]*r}return!0}intersectLine(e,t){let r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];let{origin:i,direction:n}=r,{t0:l,t1:h}=p,c=e=>{let t=(0,o.vt)();return(0,s.Ln)(t,i,n,e),this.projectPoint(t,t)};return Math.abs(l-h)<(0,a.FD)()?[c(l)]:[c(l),c(h)]}_intersect(e,t){let{origin:r,direction:i}=e,a=_;a[0]=r[0]-this.center[0],a[1]=r[1]-this.center[1],a[2]=r[2]-this.center[2];let n=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===n)return!1;let s=2*(i[0]*a[0]+i[1]*a[1]+i[2]*a[2]),o=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-this.radius**2);if(o<0)return!1;let l=Math.sqrt(o);return t.t0=(-s-l)/(2*n),t.t1=(-s+l)/(2*n),!0}projectPoint(e,t){let r=(0,s.Re)(m.rq.get(),e,this.center),i=(0,s.hs)(m.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){let r=m.rq.get(),i=m.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=(0,c.g7)(e.origin,t);return(0,n.$0)(i,o+a,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){let i=this.radius,a=i*i,n=e+.5*Math.PI,s=t*t+a-2*Math.cos(n)*t*i,o=Math.sqrt(s),l=s-a;if(l<=0)return.5;let h=Math.acos(Math.sqrt(l)/o)-Math.asin(i/(o/Math.sin(n)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(e){let t=(0,s.Re)(m.rq.get(),e,this.center),r=(0,s.Bw)(t),a=this.radius,n=a+Math.abs(a-r);return(0,i.XM)(a/n)}union(e){let t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new d;const p={t0:0,t1:0},_=(0,o.vt)();(0,o.vt)(),(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>a});var i=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",a)))})}},31217(e,t,r){r.d(t,{D:()=>a});var i=r(56507);async function a(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},76200(e,t,r){r.d(t,{h:()=>K});var i=r(49186),a=r(65529),n=r(44208),s=r(97768),o=r(17676),l=r(34275),h=r(24326),u=r(84952),c=r(38969),m=r(31217),d=r(95117),p=r(53966),_=r(2741);let g;const f=[171,75,84,88,32,50,48,187,13,10,26,10];function T(e){return ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e)}function x(e,t){return e.getUint16(t,!0)+65536*e.getUint8(t+2)}function E(e,t,r){return t<=e.byteLength&&r<=e.byteLength-t}function A(e){return p.A.getLogger("esri.libs.basisu.textureMetadata").error(`Invalid or unsupported ${e} texture metadata`),null}var M=r(63907),R=r(21231),w=r(42293);const b=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let C=null,D=null;async function S(){return D??(g??=(async()=>{let e=await(await r.e(9321).then(()=>r(49321))).default({locateFile:e=>(0,_.s)(`esri/libs/basisu/${e}`)});return e.initializeBasis(),e})(),D=g,C=await D),D}function y(e,t){let r=function(e){let t=T(e);if(t.byteLength<77)return A("Basis");let r=t.getUint16(0,!0),i=t.getUint16(2,!0),a=t.getUint16(4,!0),n=t.getUint8(20);if(17011!==r||19!==i||77!==a||0!==n)return A("Basis");let s=t.getUint32(8,!0),o=x(t,14),l=x(t,17),h=t.getUint16(21,!0),u=!!(4&h),c=t.getUint32(65,!0);if(0===l||o<l||!(1&h)||u&&o%2!=0||!E(t,77,s)||c<77||!E(t,c,23*o))return A("Basis");let m=x(t,c),d=t.getUint8(c+3);if(0!==m||0!==d)return A("Basis");let p=t.getUint16(c+5,!0),_=t.getUint16(c+7,!0),g=1;for(let e=1;e<o;++e){let r=c+23*e;if(0!==x(t,r))break;let i=t.getUint8(r+3);g=Math.max(g,i+1)}return 0===p||0===_||g>16?A("Basis"):{width:p,height:_,levels:g,hasAlpha:u}}(e);return r?v(r,t):0}function F(e,t){let r=function(e){let t=T(e);if(t.byteLength<80||!f.every((e,r)=>t.getUint8(r)===e))return A("KTX2");let r=t.getUint32(12,!0),i=t.getUint32(16,!0),a=t.getUint32(20,!0),n=t.getUint32(24,!0),s=t.getUint32(28,!0),o=t.getUint32(36,!0),l=t.getUint32(40,!0),h=t.getUint32(44,!0),u=t.getUint32(48,!0),c=t.getUint32(52,!0);if(0!==r||1!==i||0===a||0===n||0!==s||1!==o&&6!==o||6===o&&a!==n||0===l||l>32||!E(t,80,24*l)||u<80||44!==c&&60!==c||!E(t,u,c))return A("KTX2");let m=t.getUint32(u,!0),d=t.getUint8(u+12),p=t.getUint8(u+14);if(m!==c||1!==p&&2!==p||163!==d&&166!==d||(163===d?1!==h:0!==h&&2!==h))return A("KTX2");for(let e=0;e<l;++e){let r=80+24*e,i=Number(t.getBigUint64(r,!0)),a=Number(t.getBigUint64(r+8,!0));if(i<80||0===a||!E(t,i,a))return A("KTX2")}let _=t.getUint32(56,!0),g=t.getUint32(60,!0),x=Number(t.getBigUint64(64,!0)),M=Number(t.getBigUint64(72,!0));if(g>0&&(_<80||!E(t,_,g))||1===h&&(x<80||!E(t,x,M)))return A("KTX2");let R=15&t.getUint8(u+31);return{width:a,height:n,levels:l,hasAlpha:163===d?60===c:3===R}}(e);return r?v(r,t):0}function v({levels:e,hasAlpha:t,width:r,height:i},a){let n=(0,w.MW)(t?M.CQ.COMPRESSED_RGBA8_ETC2_EAC:M.CQ.COMPRESSED_RGB8_ETC2),s=a&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*s)}function I(e,t,r,i,a,n,s,o,l=!1){let{compressedTextureETC:h,compressedTextureS3TC:u}=e.capabilities,{basisFormat:c,internalFormat:m}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:M.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ETC2:M.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?M.H0.SRGB8_ALPHA8:6408}}(null!=h,null!=u,i,l),d=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<d;e++)p.push(new Uint8Array(s(e,c))),o(e,c,p[e]);return t.internalFormat=m,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=a,t.height=n,new R.A(e,t,{type:"compressed",levels:p})}function U(e,t){let r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return b().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==M.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return b().error("Unsupported KTX1 image"),null;let i=r[7],a=1,n=r[9],s=r[10];if(3&n||3&s)return null;let o=n,l=s;!1!==t&&(a=Math.max(1,r[14]));let h,u,c=e.byteOffset+64,m=[];for(let t=0;t<a;++t)u=(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0,c+=4,h=new Uint8Array(e.buffer,c,u),m.push(h),c+=u,n=Math.max(1,n>>1),s=Math.max(1,s>>1);return{textureData:{type:"compressed",levels:m},internalFormat:i,width:o,height:l}}const P=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function H(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=H("DXT1"),B=H("DXT3"),G=H("DXT5");function N(e,t){let r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return P().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return P().error("Unsupported format, must contain a FourCC code"),null;let i,a,n=r[21];switch(n){case O:i=8,a=M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case B:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case G:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return P().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(n)),null}let s=1,o=r[4],l=r[3];(3&o||3&l)&&(P().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);let h=o,u=l;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let c,m,d=e.byteOffset+r[1]+4,p=[];for(let t=0;t<s;++t)m=(o+3>>2)*(l+3>>2)*i,c=new Uint8Array(e.buffer,d,m),p.push(c),d+=m,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:h,height:u}}function L(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function X(e,t){let[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){let a=Math.max(e,t),n=e*t;if(a<=i&&n<=r)return[e,t];let s=Math.min(Math.sqrt(r/n),i/a);return[L(Math.round(e*s),i),L(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Q(e,r,i)}function Q(e,t,r){if(e instanceof ImageData)return Q(function(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);let a=document.createElement("canvas");return a.width=t,a.height=r,a.getContext("2d").drawImage(e,0,0,a.width,a.height),a}var W=r(620),V=r(67171),k=r(12541);const q=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class K{constructor(e,t){this._data=e,this.id=(0,h.c)(),this.events=new a.bk,this._parameters={...Y,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!(0,u.w8)(e.src)&&("auto"!==e.preload||!e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){let t=[];(0,c.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,u.DB)(e.src)||(0,u.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){let t=new V.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,k.tl)(e)||(0,k.tr)(e)||(0,k.CR)(e)||(0,k.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return q?0:this._texture?.usedMemory??function(e,t){if(null==e)return 0;if((0,l.mw)(e)||(0,l.mg)(e))return"image/ktx2"===t.encoding?F(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;let{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?z(e):t,a=t.pixelFormat??6408,n=(0,w.wH)(a);return(t.mipmap?4/3:1)*r*i*n||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;let t=this._data;return null==t?(this._texture=new R.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,l.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,l.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,l.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,l.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,l.mw)(t)||(0,l.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,l.mw)(t)||(0,l.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,l.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,l.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){let i=N(r,t.hasMipmap??!1);if(null==i)throw Error("DDS texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){let i=U(r,t.hasMipmap??!1);if(null==i)throw Error("KTX1 texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){C??=await S();let a=new C.KTX2File(new Uint8Array(r));if(!function(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}(a))return null;let n=i&&2===a.getDFDTransferFunc();a.startTranscoding();let s=I(e,t,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(e,t)=>a.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>a.transcodeImage(r,e,0,0,t,0,-1,-1),n);return a.close(),a.delete(),s}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){C??=await S();let i=new C.BasisFile(new Uint8Array(r));if(!function(e){return e.getNumImages()>=1&&!e.isUASTC()}(i))return null;i.startTranscoding();let a=I(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,W.vA)(this._parameters.width>0&&this._parameters.height>0);let r=this._createDescriptor(e);return(6407===r.pixelFormat||6408===r.pixelFormat)&&(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new R.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{let i=await(0,m.D)(t,{signal:r});return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{let i=await(0,d.y)(t,t.src,!1,r);return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((a,n)=>{let l=()=>{t.removeEventListener("loadeddata",h),t.removeEventListener("error",u),(0,s.xt)(c)},h=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(e,t)))},u=e=>{l(),n(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",h),t.addEventListener("error",u);let c=(0,o.u7)(r,()=>u((0,o.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=X(r,e.parameters));let i=z(r);this._parameters.width=i.width,this._parameters.height=i.height;let a=this._createDescriptor(e);return a.width=i.width,a.height=i.height,a.compress=this._parameters.compressionOptions,this._texture=new R.A(e,a,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){let t=new AbortController;this._loadingController=t;let r=e(t.signal);this._loadingPromise=r;let i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){let e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function z(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const Y={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(e,t,r){r.d(t,{Uy:()=>l,h7:()=>m});var i=r(35522),a=r(51850),n=r(70328);class s{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const o=(0,n.vt)();function l(e,t,r,a,n,o){if(!e.visible)return;let l=(0,i.jb)(M,a,r),{tolerance:h}=t,c=new s(h,!1,t.options.normalRequired);if(e.boundingInfo)u(e.readPrimitivePosition,e.boundingInfo,r,l,h,n,c,o);else{let t=e.readPrimitivePosition;!function(e,t,r,a,n,s,o,l){let h=t,u=R,c=Math.abs(h[0]),m=Math.abs(h[1]),d=Math.abs(h[2]),f=c>=m?c>=d?0:2:m>=d?1:2,x=f,E=h[x]<0?2:1,A=(f+E)%3,M=(f+(3-E))%3,w=h[A]/h[x],b=h[M]/h[x],C=1/h[x],D=p,S=_,y=g,{normalRequired:F}=o;for(let t=r;t<a;++t){let r=3*t;n(u[0],r),n(u[1],r+1),n(u[2],r+2),s&&(s.applyToVertex(u[0],u[0][0],u[0][1],u[0][2],t),s.applyToVertex(u[1],u[1][0],u[1][1],u[1][2],t),s.applyToVertex(u[2],u[2][0],u[2][1],u[2][2],t)),(0,i.jb)(D,u[0],e),(0,i.jb)(S,u[1],e),(0,i.jb)(y,u[2],e);let a=D[A]-w*D[x],o=D[M]-b*D[x],h=S[A]-w*S[x],c=S[M]-b*S[x],m=y[A]-w*y[x],d=y[M]-b*y[x],p=m*c-d*h,_=a*d-o*m,g=h*o-c*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;let f=p+_+g;if(0===f)continue;let E=p*(C*D[x])+_*(C*S[x])+g*(C*y[x]);if(E*Math.sign(f)<0)continue;let R=E/f;R>=0&&l(R,R,F?T(u):null,t)}}(r,l,0,e.faceCount,t,n,c,o)}}const h=(0,a.vt)();function u(e,t,r,a,s,l,c,m){if(null==t)return;let p=function(e,t){return(0,i.hZ)(t,1/e[0],1/e[1],1/e[2])}(a,h);if((0,n.C)(o,t.box),l?.applyToAabb(o),function(e,t,r,i){return function(e,t,r,i){let a=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0],s=Math.min(a,n),o=Math.max(a,n),l=(e[1]-i-t[1])*r[1],h=(e[4]+i-t[1])*r[1];if(o=Math.min(o,Math.max(l,h)),o<0||(s=Math.max(s,Math.min(l,h)),s>o))return!1;let u=(e[2]-i-t[2])*r[2],c=(e[5]+i-t[2])*r[2];return o=Math.min(o,Math.max(u,c)),!(o<0||(s=Math.max(s,Math.min(u,c)),s>o))&&s<1/0}(e,t,r,i)}(o,r,p,s)){let{primitiveIndices:i}=t,n=i.length;if(n>1e3){let i=t.children;if(void 0!==i){for(let t of i)u(e,t,r,a,s,l,c,m);return}}d(r,a,0,n,e,i,l,c,m)}}const c=(0,a.vt)();function m(e,t,r,i,a,n,s,o,l,h=null,u=0){let m=e[0],d=e[1],p=e[2],_=t[0],g=t[1],T=t[2];for(let e=r;e<i;++e){let t=u+(h?.[e]??e),r=3*t,i=s*a[r],x=n[i],E=n[i+1],M=n[i+2],R=s*a[r+1],w=n[R],b=n[R+1],C=n[R+2],D=s*a[r+2],S=w-x,y=b-E,F=C-M,v=n[D]-x,I=n[D+1]-E,U=n[D+2]-M,P=g*U-I*T,H=T*v-U*_,O=_*I-v*g,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=m-x,L=d-E,X=p-M,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(_*W+g*V+T*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,o?f(S,y,F,v,I,U,c):null,t)}}function d(e,t,r,i,a,n,s,o,l){let h=e[0],u=e[1],m=e[2],d=t[0],p=t[1],_=t[2],{normalRequired:g}=o;for(let e=r;e<i;++e){let t=n[e],r=3*t,[i,o,T]=a(b,r),[x,E,M]=a(b,r+1),[R,C,D]=a(b,r+2);null!=s&&([i,o,T]=s.applyToVertex(w,i,o,T,e),[x,E,M]=s.applyToVertex(w,x,E,M,e),[R,C,D]=s.applyToVertex(w,R,C,D,e));let S=x-i,y=E-o,F=M-T,v=R-i,I=C-o,U=D-T,P=p*U-I*_,H=_*v-U*d,O=d*I-v*p,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=h-i,L=u-o,X=m-T,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(d*W+p*V+_*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,g?f(S,y,F,v,I,U,c):null,t)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(e,t,r,a,n,s,o){return(0,i.hZ)(x,e,t,r),(0,i.hZ)(E,a,n,s),(0,i.$A)(o,x,E),(0,i.S8)(o,o),o}function T(e){return(0,i.jb)(x,e[1],e[0]),(0,i.jb)(E,e[2],e[0]),(0,i.$A)(c,x,E),(0,i.S8)(c,c),c}const x=(0,a.vt)(),E=(0,a.vt)(),A=1e-7*1e-7,M=(0,a.vt)(),R=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],w=(0,a.vt)(),b=(0,a.vt)()},74810(e,t,r){r.d(t,{Jr:()=>n});var i=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:s,emissiveFactor:o,occlusionTexture:l}){return null==e&&null==t&&null==s&&(null==o||(0,i.t2)(o,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const s=(0,a.CN)(1,1,.5),o=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,o,"SY",0,l,"mb",0,s])},21231(e,t,r){r.d(t,{A:()=>g});var i=r(49186),a=r(44208),n=r(53966),s=r(97768),o=r(93637),l=r(17676),h=r(94656),u=r(63907),c=r(67171),m=r(12541);class d extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new d(e,t)}}const p=!!(0,a.A)("esri-tests-disable-gpu-memory-measurements"),_=()=>n.A.getLogger("esri/views/webgl/Texture");class g{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{let r=d.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return p?0:(0,c.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){let r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!(0,m.Qp)(e)&&this._descriptor.internalFormat&&(0,o.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,m.Qp)(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,a,n,s,o=0){s||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update uninitialized texture!");let l=this._descriptor;l.internalFormat=(0,m.mq)(l);let{context:h,pixelFormat:u,dataType:c,target:d,isImmutable:p}=l;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");let f=h.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+a>l.width||r+n>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:T}=h;o&&(a&&n||_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,o)),(0,m.Kv)(s)?T.texSubImage2D(d,e,t,r,a,n,u,c,s):(0,m.Qp)(s)?T.compressedTexSubImage2D(d,e,t,r,a,n,l.internalFormat,s.levels[e]):T.texSubImage2D(d,e,t,r,a,n,u,c,s),o&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(f,g.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,a,n,s,o,l){l||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update an uninitialized texture!");let h=this._descriptor;h.internalFormat=(0,m.mq)(h);let{context:u,pixelFormat:c,dataType:d,isImmutable:p,target:f}=h;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,m.re)(f)||_().warn("Attempting to set 3D texture data on a non-3D texture");let T=u.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||a<0||t+n>h.width||r+s>h.height||a+o>h.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:x}=u;if((0,m.Qp)(l))l=l.levels[e],x.compressedTexSubImage3D(f,e,t,r,a,n,s,o,h.internalFormat,l);else{let i=l;x.texSubImage3D(f,e,t,r,a,n,s,o,c,d,i)}u.bindTexture(T,g.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){let e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,(0,m.QE)(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);let t=this._descriptor.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,g.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){let e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,m.QE)(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,m.QE)(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),(0,m.QE)(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&=(this._applySamplingMode(),!1),this._wrapModeDirty&&=(this._applyWrapMode(),!1),this._shadowFilterDirty&&=(this._applyShadowMode(),!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){let r=this._descriptor,a=r.context?.gl;if(!a)return;(0,h.Y2)(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),(0,m.QE)(r);let n=r.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,h.Y2)(a);let s=t??r.target,o=(0,m.re)(s);if((0,m.Kv)(e))this._setDataFromTexImageSource(e,s);else{let{width:t,height:n,depth:l}=r;if(null==t||null==n)throw new i.A("texture:missing-size","Width and height must be specified!");if(o&&null==l)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=(0,m.mq)(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,n,l),(0,m.Qp)(e)){if(!(0,m.tl)(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,n,l,e),(0,h.Y2)(a),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,h.Y2)(a),r.context.bindTexture(n,g.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){let e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,+!!r),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,+!!i)}_setDataFromTexImageSource(e,t){let{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,m.mq)(i);let a=(0,m.re)(t),{width:n,height:s,depth:o}=(0,m.Eo)(e);i.width&&i.height,i.width||=n,i.height||=s,a&&i.depth,a&&(i.depth=o),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,s,o),this._texImage(t,0,i.internalFormat,n,s,o,e),(0,h.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,h.Y2)(r))}_setDataFromCompressedSource(e,t,r){let i=this._descriptor,{width:a,height:n,depth:s}=i,o=e.levels,l=(0,m.FV)(r,a,n,s),h=Math.min(l,o.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,h),this._forEachMipmapLevel((e,i,a,n)=>{let s=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,i,a,n,s)},h)}_texStorage(e,t,r,a,n,s){let{gl:o}=this._descriptor.context;if(!(0,m.tr)(t)&&!(0,m.tl)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized or compressed internal format");if(!this._descriptor.isImmutable)return;let l=r?(0,m.FV)(e,a,n,s):1;if((0,m.re)(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");o.texStorage3D(e,l,t,a,n,s)}else o.texStorage2D(e,l,t,a,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e),{isImmutable:u,pixelFormat:c,dataType:d}=this._descriptor;if(u){if(null!=o){let r=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,a,n,s,c,d,r)}else l.texSubImage2D(e,t,0,0,a,n,c,d,r)}}else{let u=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,a,n,s,0,c,d,u)}else l.texImage2D(e,t,r,a,n,0,c,d,u)}}_compressedTexImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e);if(this._descriptor.isImmutable){if(null!=o)if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,a,n,s,r,o)}else l.compressedTexSubImage2D(e,t,0,0,a,n,r,o)}else if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,a,n,s,0,o)}else l.compressedTexImage2D(e,t,r,a,n,0,o)}async _compressOnWorker(e){let{width:t,height:r,context:i,flipped:a,preMultiplyAlpha:n,hasMipmap:s,compress:o}=this._descriptor;if(!o)return;let{compressionTracker:h,compressionCallback:u,preserveSourceBitmap:c}=o,{compressedTextureETC:m,compressedTextureS3TC:d}=i.capabilities;if(!g.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!m&&!d)return;this.abortCompression();let p=new AbortController;this._compressionAbortController=p,h?.increment();let f,T=!1,x=!1;try{e instanceof ImageBitmap?c?(f=await createImageBitmap(e),(0,l.Te)(p),x=!0):f=e:e instanceof Uint8Array?(f=e.buffer,T=this.descriptor.flipped):(f=await createImageBitmap(e,{imageOrientation:a?"flipY":"none"}),(0,l.Te)(p),x=!0);let i={data:f,width:t,height:r,needsFlip:T,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:n,isOpaque:this._descriptor.isOpaque,hasMipmap:s,hasETC:!!m,hasS3TC:!!d},o=await g.compressionWorkerHandle.invoke(i,p.signal,1);if((0,l.Te)(p),o.compressedTexture&&this.hasWebGLTextureObject){let e=this.usedMemory;this._descriptor.internalFormat=o.internalFormat,this._setData(o.compressedTexture),u?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||_().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),x&&f instanceof ImageBitmap&&f.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:a,depth:n,hasMipmap:s,target:o}=this._descriptor,l=32879===o;if(null==r||null==a||l&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,a,n),s&&(1!==r||1!==a||l&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),a=Math.max(1,a>>1),l&&(n=Math.max(1,n>>1))}_applySamplingMode(){let e=this._descriptor,t=e.context?.gl,r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):(9984===r||9986===r)&&(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){let e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){let e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,h.Y2)(t)}_applyAnisotropicFilteringParameters(){let e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>n,e:()=>s});var i=r(63907),a=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,a.MW)(e.internalFormat))*(34067===e.target?6:1))}},42293(e,t,r){r.d(t,{MW:()=>l,wH:()=>o,yu:()=>s});var i=r(94656),a=r(63907);const n=new Set([a.pe.BYTE,a.pe.SHORT,a.pe.INT,a.pe.UNSIGNED_BYTE,a.pe.UNSIGNED_SHORT,a.pe.UNSIGNED_INT]);function s(e,t,r,a=0){let s=e.gl;e.bindBuffer(r);for(let o of r.layout){let r=t.get(o.name);if(null==r){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}let l=a*o.stride;if(o.count<=4)o.integer&&n.has(o.type)?s.vertexAttribIPointer(r,o.count,o.type,o.stride,o.offset+l):s.vertexAttribPointer(r,o.count,o.type,o.normalized,o.stride,o.offset+l),s.enableVertexAttribArray(r),o.divisor>0&&s.vertexAttribDivisor(r,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)s.vertexAttribPointer(r+e,3,o.type,o.normalized,o.stride,o.offset+12*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)s.vertexAttribPointer(r+e,4,o.type,o.normalized,o.stride,o.offset+16*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if((0,i.en)()){let t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${l}:`,t,o)}}}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function l(e){switch(e){case 6406:case 6409:case 6403:case 36244:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:case a.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case a.H0.RGBA4:case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.RG8:case a.H0.RG8I:case a.H0.RG8UI:case a.H0.RG8_SNORM:case a.H0.RGB565:case a.H0.RGB5_A1:case a.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case a.H0.RGB8:case a.H0.RGB8I:case a.H0.RGB8UI:case a.H0.RGB8_SNORM:case a.H0.SRGB8:case a.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case a.H0.RGBA8:case a.H0.R32F:case a.H0.R11F_G11F_B10F:case a.H0.RG16F:case a.H0.R32I:case a.H0.R32UI:case a.H0.RG16I:case a.H0.RG16UI:case a.H0.RGBA8I:case a.H0.RGBA8UI:case a.H0.RGBA8_SNORM:case a.H0.SRGB8_ALPHA8:case a.H0.RGB9_E5:case a.H0.RGB10_A2UI:case a.H0.RGB10_A2:case a.SB.DEPTH_COMPONENT32F:case a.iE.DEPTH24_STENCIL8:return 4;case a.iE.DEPTH32F_STENCIL8:return 5;case a.H0.RGB16F:case a.H0.RGB16I:case a.H0.RGB16UI:return 6;case a.H0.RG32F:case a.H0.RG32I:case a.H0.RG32UI:case a.H0.RGBA16F:case a.H0.RGBA16I:case a.H0.RGBA16UI:return 8;case a.H0.RGB32F:case a.H0.RGB32I:case a.H0.RGB32UI:return 12;case a.H0.RGBA32F:case a.H0.RGBA32I:case a.H0.RGBA32UI:return 16;case a.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case a.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case a.CQ.COMPRESSED_R11_EAC:case a.CQ.COMPRESSED_SIGNED_R11_EAC:case a.CQ.COMPRESSED_RGB8_ETC2:case a.CQ.COMPRESSED_SRGB8_ETC2:case a.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case a.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case a.CQ.COMPRESSED_RG11_EAC:case a.CQ.COMPRESSED_SIGNED_RG11_EAC:case a.CQ.COMPRESSED_RGBA8_ETC2_EAC:case a.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656(e,t,r){r.d(t,{Y2:()=>h,en:()=>l,u1:()=>s});var i=r(49186),a=r(44208),n=r(53966);function s(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const o=!!(0,a.A)("enable-feature:webgl-debug");function l(){return o}function h(e,t=l()){if(t){let t=s(e);if(t){let e=Error().stack;n.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},12541(e,t,r){r.d(t,{CR:()=>u,Eo:()=>T,FV:()=>g,Kv:()=>p,QE:()=>l,QJ:()=>c,Qp:()=>d,mq:()=>f,re:()=>_,tl:()=>m,tr:()=>h});var i=r(49186),a=r(53966),n=r(93637),s=r(63907);const o=()=>a.A.getLogger("esri/views/webgl/textureUtils");function l(e){let{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&o().error("Negative dimension parameters are not allowed!");let{internalFormat:a}=e;if(a&&(u(a)||c(a))){let{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:a}=e;a&&o().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&o().error("Depth textures cannot sample mipmaps"):(9728!==i&&o().error("Depth textures without filtering must use NEAREST filtering"),r&&o().error("Depth textures without filtering cannot use compare function"))}}function h(e){return function(e){return s.XN.includes(e)}(e)||u(e)||c(e)}function u(e){return(0,n.a4)(s.SB,e)}function c(e){return(0,n.a4)(s.iE,e)}function m(e){return null!=e&&(0,n.a4)(s.CQ,e)}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function g(e,t,r,i=1){let a=Math.max(t,r);return 32879===e&&(a=Math.max(a,i)),Math.floor(Math.log2(a))+1}function f(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case s.ld.FLOAT:switch(e.pixelFormat){case 6408:return s.H0.RGBA32F;case 6407:return s.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case s.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return s.H0.RGBA8;case 6407:return s.H0.RGB8}}let{pixelFormat:t}=e;return e.internalFormat=34041===t?s.iE.DEPTH24_STENCIL8:6402===t?s.SB.DEPTH_COMPONENT24:t,e.internalFormat}function T(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}},49788(e,t,r){r.d(t,["Q",0,1/255.5,"v",0,.9960861056751468])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2810],{4341(e,t,r){r.d(t,{I:()=>a});var i=r(26390);class a{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*n);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,n));e++)this._items.push(this._allocator())}}const n=1024},11964(e,t,r){r.d(t,{Cr:()=>u,H6:()=>d,LV:()=>h,_I:()=>m,kb:()=>c,vt:()=>l});var i=r(34727),a=r(4341),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function h(e,t){let r=p.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.vector,t,e),r}function c(e,t){let r=(0,n.Re)(o.rq.get(),t,e.origin),a=(0,n.Om)(e.vector,r),s=(0,n.Om)(e.vector,e.vector);if(Math.abs(s)<_)return(0,n.hG)(e.origin,t);let l=(0,i.qE)(a/s,0,1),h=(0,n.Re)(o.rq.get(),(0,n.hs)(o.rq.get(),e.vector,l),r);return(0,n.Om)(h,h)}function m(e,t,r){return d(e,t,0,1,r)}function d(e,t,r,a,s){let{vector:l,origin:h}=e,u=(0,n.Re)(o.rq.get(),t,h),c=(0,n.Om)(l,u)/(0,n.m3)(l);return(0,n.hs)(s,l,(0,i.qE)(c,r,a)),(0,n.WQ)(s,s,e.origin)}(0,s.vt)(),(0,s.vt)();const p=new a.I(()=>l()),_=1e-9},80754(e,t,r){r.d(t,{kS:()=>h,kd:()=>l});var i=r(82799),a=r(16930),n=r(60408),s=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,a]=e.b;r[0]+=t,i[0]+=t,a[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},71351(e,t,r){r.d(t,{C:()=>c,Cr:()=>m,LV:()=>u,fA:()=>d,kb:()=>p,vt:()=>l});var i=r(4341),a=(r(77690),r(29242)),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?h((0,s.o8)(e.origin),(0,s.o8)(e.direction)):h((0,s.vt)(),(0,s.vt)())}function h(e,t){return{origin:e,direction:t}}function u(e,t){let r=_.get();return r.origin=e,r.direction=t,r}function c(e,t=l()){return d(e.origin,e.direction,t)}function m(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.direction,t,e),r}function d(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.C)(r.direction,t),r}function p(e,t){let r=(0,n.$A)(o.rq.get(),(0,n.S8)(o.rq.get(),e.direction),(0,n.Re)(o.rq.get(),t,e.origin));return(0,n.Om)(r,r)}const _=new i.I(()=>l());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,a.vt)()},94008(e,t,r){r.d(t,{iy:()=>d}),r(44208),r(53966);var i=r(34727),a=r(34304),n=r(58083),s=r(35522),o=r(51850),l=r(91829),h=r(34275);var u=r(71351),c=r(44280),m=r(32114);class d{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,o.fA)(e,t,r):function(e){return t=e,(0,h.vZ)(t)&&t.length>=3||function(e){return((0,h.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,o.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,o.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return(0,s.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e||!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){let{origin:i,direction:a}=e;t[0]=i[0]+a[0]*r,t[1]=i[1]+a[1]*r,t[2]=i[2]+a[2]*r}return!0}intersectLine(e,t){let r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];let{origin:i,direction:n}=r,{t0:l,t1:h}=p,c=e=>{let t=(0,o.vt)();return(0,s.Ln)(t,i,n,e),this.projectPoint(t,t)};return Math.abs(l-h)<(0,a.FD)()?[c(l)]:[c(l),c(h)]}_intersect(e,t){let{origin:r,direction:i}=e,a=_;a[0]=r[0]-this.center[0],a[1]=r[1]-this.center[1],a[2]=r[2]-this.center[2];let n=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===n)return!1;let s=2*(i[0]*a[0]+i[1]*a[1]+i[2]*a[2]),o=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-this.radius**2);if(o<0)return!1;let l=Math.sqrt(o);return t.t0=(-s-l)/(2*n),t.t1=(-s+l)/(2*n),!0}projectPoint(e,t){let r=(0,s.Re)(m.rq.get(),e,this.center),i=(0,s.hs)(m.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){let r=m.rq.get(),i=m.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=(0,c.g7)(e.origin,t);return(0,n.$0)(i,o+a,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){let i=this.radius,a=i*i,n=e+.5*Math.PI,s=t*t+a-2*Math.cos(n)*t*i,o=Math.sqrt(s),l=s-a;if(l<=0)return.5;let h=Math.acos(Math.sqrt(l)/o)-Math.asin(i/(o/Math.sin(n)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(e){let t=(0,s.Re)(m.rq.get(),e,this.center),r=(0,s.Bw)(t),a=this.radius,n=a+Math.abs(a-r);return(0,i.XM)(a/n)}union(e){let t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new d;const p={t0:0,t1:0},_=(0,o.vt)();(0,o.vt)(),(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>a});var i=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",a)))})}},31217(e,t,r){r.d(t,{D:()=>a});var i=r(56507);async function a(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},76200(e,t,r){r.d(t,{h:()=>K});var i=r(49186),a=r(65529),n=r(44208),s=r(97768),o=r(17676),l=r(34275),h=r(24326),u=r(84952),c=r(38969),m=r(31217),d=r(95117),p=r(53966),_=r(2741);let g;const f=[171,75,84,88,32,50,48,187,13,10,26,10];function T(e){return ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e)}function x(e,t){return e.getUint16(t,!0)+65536*e.getUint8(t+2)}function E(e,t,r){return t<=e.byteLength&&r<=e.byteLength-t}function A(e){return p.A.getLogger("esri.libs.basisu.textureMetadata").error(`Invalid or unsupported ${e} texture metadata`),null}var M=r(63907),R=r(21231),w=r(42293);const b=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let C=null,D=null;async function S(){return D??(g??=(async()=>{let e=await(await r.e(9321).then(()=>r(49321))).default({locateFile:e=>(0,_.s)(`esri/libs/basisu/${e}`)});return e.initializeBasis(),e})(),D=g,C=await D),D}function y(e,t){let r=function(e){let t=T(e);if(t.byteLength<77)return A("Basis");let r=t.getUint16(0,!0),i=t.getUint16(2,!0),a=t.getUint16(4,!0),n=t.getUint8(20);if(17011!==r||19!==i||77!==a||0!==n)return A("Basis");let s=t.getUint32(8,!0),o=x(t,14),l=x(t,17),h=t.getUint16(21,!0),u=!!(4&h),c=t.getUint32(65,!0);if(0===l||o<l||!(1&h)||u&&o%2!=0||!E(t,77,s)||c<77||!E(t,c,23*o))return A("Basis");let m=x(t,c),d=t.getUint8(c+3);if(0!==m||0!==d)return A("Basis");let p=t.getUint16(c+5,!0),_=t.getUint16(c+7,!0),g=1;for(let e=1;e<o;++e){let r=c+23*e;if(0!==x(t,r))break;let i=t.getUint8(r+3);g=Math.max(g,i+1)}return 0===p||0===_||g>16?A("Basis"):{width:p,height:_,levels:g,hasAlpha:u}}(e);return r?v(r,t):0}function F(e,t){let r=function(e){let t=T(e);if(t.byteLength<80||!f.every((e,r)=>t.getUint8(r)===e))return A("KTX2");let r=t.getUint32(12,!0),i=t.getUint32(16,!0),a=t.getUint32(20,!0),n=t.getUint32(24,!0),s=t.getUint32(28,!0),o=t.getUint32(36,!0),l=t.getUint32(40,!0),h=t.getUint32(44,!0),u=t.getUint32(48,!0),c=t.getUint32(52,!0);if(0!==r||1!==i||0===a||0===n||0!==s||1!==o&&6!==o||6===o&&a!==n||0===l||l>32||!E(t,80,24*l)||u<80||44!==c&&60!==c||!E(t,u,c))return A("KTX2");let m=t.getUint32(u,!0),d=t.getUint8(u+12),p=t.getUint8(u+14);if(m!==c||1!==p&&2!==p||163!==d&&166!==d||(163===d?1!==h:0!==h&&2!==h))return A("KTX2");for(let e=0;e<l;++e){let r=80+24*e,i=Number(t.getBigUint64(r,!0)),a=Number(t.getBigUint64(r+8,!0));if(i<80||0===a||!E(t,i,a))return A("KTX2")}let _=t.getUint32(56,!0),g=t.getUint32(60,!0),x=Number(t.getBigUint64(64,!0)),M=Number(t.getBigUint64(72,!0));if(g>0&&(_<80||!E(t,_,g))||1===h&&(x<80||!E(t,x,M)))return A("KTX2");let R=15&t.getUint8(u+31);return{width:a,height:n,levels:l,hasAlpha:163===d?60===c:3===R}}(e);return r?v(r,t):0}function v({levels:e,hasAlpha:t,width:r,height:i},a){let n=(0,w.MW)(t?M.CQ.COMPRESSED_RGBA8_ETC2_EAC:M.CQ.COMPRESSED_RGB8_ETC2),s=a&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*s)}function I(e,t,r,i,a,n,s,o,l=!1){let{compressedTextureETC:h,compressedTextureS3TC:u}=e.capabilities,{basisFormat:c,internalFormat:m}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:M.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ETC2:M.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?M.H0.SRGB8_ALPHA8:6408}}(null!=h,null!=u,i,l),d=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<d;e++)p.push(new Uint8Array(s(e,c))),o(e,c,p[e]);return t.internalFormat=m,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=a,t.height=n,new R.A(e,t,{type:"compressed",levels:p})}function U(e,t){let r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return b().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==M.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return b().error("Unsupported KTX1 image"),null;let i=r[7],a=1,n=r[9],s=r[10];if(3&n||3&s)return null;let o=n,l=s;!1!==t&&(a=Math.max(1,r[14]));let h,u,c=e.byteOffset+64,m=[];for(let t=0;t<a;++t)u=(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0,c+=4,h=new Uint8Array(e.buffer,c,u),m.push(h),c+=u,n=Math.max(1,n>>1),s=Math.max(1,s>>1);return{textureData:{type:"compressed",levels:m},internalFormat:i,width:o,height:l}}const P=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function H(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=H("DXT1"),B=H("DXT3"),G=H("DXT5");function N(e,t){let r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return P().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return P().error("Unsupported format, must contain a FourCC code"),null;let i,a,n=r[21];switch(n){case O:i=8,a=M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case B:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case G:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return P().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(n)),null}let s=1,o=r[4],l=r[3];(3&o||3&l)&&(P().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);let h=o,u=l;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let c,m,d=e.byteOffset+r[1]+4,p=[];for(let t=0;t<s;++t)m=(o+3>>2)*(l+3>>2)*i,c=new Uint8Array(e.buffer,d,m),p.push(c),d+=m,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:h,height:u}}function L(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function X(e,t){let[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){let a=Math.max(e,t),n=e*t;if(a<=i&&n<=r)return[e,t];let s=Math.min(Math.sqrt(r/n),i/a);return[L(Math.round(e*s),i),L(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Q(e,r,i)}function Q(e,t,r){if(e instanceof ImageData)return Q(function(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);let a=document.createElement("canvas");return a.width=t,a.height=r,a.getContext("2d").drawImage(e,0,0,a.width,a.height),a}var W=r(620),V=r(67171),k=r(12541);const q=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class K{constructor(e,t){this._data=e,this.id=(0,h.c)(),this.events=new a.bk,this._parameters={...Y,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!(0,u.w8)(e.src)&&("auto"!==e.preload||!e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){let t=[];(0,c.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,u.DB)(e.src)||(0,u.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){let t=new V.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,k.tl)(e)||(0,k.tr)(e)||(0,k.CR)(e)||(0,k.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return q?0:this._texture?.usedMemory??function(e,t){if(null==e)return 0;if((0,l.mw)(e)||(0,l.mg)(e))return"image/ktx2"===t.encoding?F(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;let{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?z(e):t,a=t.pixelFormat??6408,n=(0,w.wH)(a);return(t.mipmap?4/3:1)*r*i*n||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;let t=this._data;return null==t?(this._texture=new R.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,l.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,l.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,l.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,l.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,l.mw)(t)||(0,l.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,l.mw)(t)||(0,l.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,l.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,l.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){let i=N(r,t.hasMipmap??!1);if(null==i)throw Error("DDS texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){let i=U(r,t.hasMipmap??!1);if(null==i)throw Error("KTX1 texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){C??=await S();let a=new C.KTX2File(new Uint8Array(r));if(!function(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}(a))return null;let n=i&&2===a.getDFDTransferFunc();a.startTranscoding();let s=I(e,t,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(e,t)=>a.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>a.transcodeImage(r,e,0,0,t,0,-1,-1),n);return a.close(),a.delete(),s}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){C??=await S();let i=new C.BasisFile(new Uint8Array(r));if(!function(e){return e.getNumImages()>=1&&!e.isUASTC()}(i))return null;i.startTranscoding();let a=I(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,W.vA)(this._parameters.width>0&&this._parameters.height>0);let r=this._createDescriptor(e);return(6407===r.pixelFormat||6408===r.pixelFormat)&&(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new R.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{let i=await(0,m.D)(t,{signal:r});return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{let i=await(0,d.y)(t,t.src,!1,r);return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((a,n)=>{let l=()=>{t.removeEventListener("loadeddata",h),t.removeEventListener("error",u),(0,s.xt)(c)},h=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(e,t)))},u=e=>{l(),n(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",h),t.addEventListener("error",u);let c=(0,o.u7)(r,()=>u((0,o.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=X(r,e.parameters));let i=z(r);this._parameters.width=i.width,this._parameters.height=i.height;let a=this._createDescriptor(e);return a.width=i.width,a.height=i.height,a.compress=this._parameters.compressionOptions,this._texture=new R.A(e,a,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){let t=new AbortController;this._loadingController=t;let r=e(t.signal);this._loadingPromise=r;let i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){let e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function z(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const Y={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(e,t,r){r.d(t,{Uy:()=>l,h7:()=>m});var i=r(35522),a=r(51850),n=r(70328);class s{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const o=(0,n.vt)();function l(e,t,r,a,n,o){if(!e.visible)return;let l=(0,i.jb)(M,a,r),{tolerance:h}=t,c=new s(h,!1,t.options.normalRequired);if(e.boundingInfo)u(e.readPrimitivePosition,e.boundingInfo,r,l,h,n,c,o);else{let t=e.readPrimitivePosition;!function(e,t,r,a,n,s,o,l){let h=t,u=R,c=Math.abs(h[0]),m=Math.abs(h[1]),d=Math.abs(h[2]),f=c>=m?c>=d?0:2:m>=d?1:2,x=f,E=h[x]<0?2:1,A=(f+E)%3,M=(f+(3-E))%3,w=h[A]/h[x],b=h[M]/h[x],C=1/h[x],D=p,S=_,y=g,{normalRequired:F}=o;for(let t=r;t<a;++t){let r=3*t;n(u[0],r),n(u[1],r+1),n(u[2],r+2),s&&(s.applyToVertex(u[0],u[0][0],u[0][1],u[0][2],t),s.applyToVertex(u[1],u[1][0],u[1][1],u[1][2],t),s.applyToVertex(u[2],u[2][0],u[2][1],u[2][2],t)),(0,i.jb)(D,u[0],e),(0,i.jb)(S,u[1],e),(0,i.jb)(y,u[2],e);let a=D[A]-w*D[x],o=D[M]-b*D[x],h=S[A]-w*S[x],c=S[M]-b*S[x],m=y[A]-w*y[x],d=y[M]-b*y[x],p=m*c-d*h,_=a*d-o*m,g=h*o-c*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;let f=p+_+g;if(0===f)continue;let E=p*(C*D[x])+_*(C*S[x])+g*(C*y[x]);if(E*Math.sign(f)<0)continue;let R=E/f;R>=0&&l(R,R,F?T(u):null,t)}}(r,l,0,e.faceCount,t,n,c,o)}}const h=(0,a.vt)();function u(e,t,r,a,s,l,c,m){if(null==t)return;let p=function(e,t){return(0,i.hZ)(t,1/e[0],1/e[1],1/e[2])}(a,h);if((0,n.C)(o,t.box),l?.applyToAabb(o),function(e,t,r,i){return function(e,t,r,i){let a=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0],s=Math.min(a,n),o=Math.max(a,n),l=(e[1]-i-t[1])*r[1],h=(e[4]+i-t[1])*r[1];if(o=Math.min(o,Math.max(l,h)),o<0||(s=Math.max(s,Math.min(l,h)),s>o))return!1;let u=(e[2]-i-t[2])*r[2],c=(e[5]+i-t[2])*r[2];return o=Math.min(o,Math.max(u,c)),!(o<0||(s=Math.max(s,Math.min(u,c)),s>o))&&s<1/0}(e,t,r,i)}(o,r,p,s)){let{primitiveIndices:i}=t,n=i.length;if(n>1e3){let i=t.children;if(void 0!==i){for(let t of i)u(e,t,r,a,s,l,c,m);return}}d(r,a,0,n,e,i,l,c,m)}}const c=(0,a.vt)();function m(e,t,r,i,a,n,s,o,l,h=null,u=0){let m=e[0],d=e[1],p=e[2],_=t[0],g=t[1],T=t[2];for(let e=r;e<i;++e){let t=u+(h?.[e]??e),r=3*t,i=s*a[r],x=n[i],E=n[i+1],M=n[i+2],R=s*a[r+1],w=n[R],b=n[R+1],C=n[R+2],D=s*a[r+2],S=w-x,y=b-E,F=C-M,v=n[D]-x,I=n[D+1]-E,U=n[D+2]-M,P=g*U-I*T,H=T*v-U*_,O=_*I-v*g,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=m-x,L=d-E,X=p-M,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(_*W+g*V+T*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,o?f(S,y,F,v,I,U,c):null,t)}}function d(e,t,r,i,a,n,s,o,l){let h=e[0],u=e[1],m=e[2],d=t[0],p=t[1],_=t[2],{normalRequired:g}=o;for(let e=r;e<i;++e){let t=n[e],r=3*t,[i,o,T]=a(b,r),[x,E,M]=a(b,r+1),[R,C,D]=a(b,r+2);null!=s&&([i,o,T]=s.applyToVertex(w,i,o,T,e),[x,E,M]=s.applyToVertex(w,x,E,M,e),[R,C,D]=s.applyToVertex(w,R,C,D,e));let S=x-i,y=E-o,F=M-T,v=R-i,I=C-o,U=D-T,P=p*U-I*_,H=_*v-U*d,O=d*I-v*p,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=h-i,L=u-o,X=m-T,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(d*W+p*V+_*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,g?f(S,y,F,v,I,U,c):null,t)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(e,t,r,a,n,s,o){return(0,i.hZ)(x,e,t,r),(0,i.hZ)(E,a,n,s),(0,i.$A)(o,x,E),(0,i.S8)(o,o),o}function T(e){return(0,i.jb)(x,e[1],e[0]),(0,i.jb)(E,e[2],e[0]),(0,i.$A)(c,x,E),(0,i.S8)(c,c),c}const x=(0,a.vt)(),E=(0,a.vt)(),A=1e-7*1e-7,M=(0,a.vt)(),R=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],w=(0,a.vt)(),b=(0,a.vt)()},74810(e,t,r){r.d(t,{Jr:()=>n});var i=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:s,emissiveFactor:o,occlusionTexture:l}){return null==e&&null==t&&null==s&&(null==o||(0,i.t2)(o,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const s=(0,a.CN)(1,1,.5),o=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,o,"SY",0,l,"mb",0,s])},21231(e,t,r){r.d(t,{A:()=>g});var i=r(49186),a=r(44208),n=r(53966),s=r(97768),o=r(93637),l=r(17676),h=r(94656),u=r(63907),c=r(67171),m=r(12541);class d extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new d(e,t)}}const p=!!(0,a.A)("esri-tests-disable-gpu-memory-measurements"),_=()=>n.A.getLogger("esri/views/webgl/Texture");class g{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{let r=d.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return p?0:(0,c.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){let r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!(0,m.Qp)(e)&&this._descriptor.internalFormat&&(0,o.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,m.Qp)(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,a,n,s,o=0){s||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update uninitialized texture!");let l=this._descriptor;l.internalFormat=(0,m.mq)(l);let{context:h,pixelFormat:u,dataType:c,target:d,isImmutable:p}=l;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");let f=h.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+a>l.width||r+n>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:T}=h;o&&(a&&n||_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,o)),(0,m.Kv)(s)?T.texSubImage2D(d,e,t,r,a,n,u,c,s):(0,m.Qp)(s)?T.compressedTexSubImage2D(d,e,t,r,a,n,l.internalFormat,s.levels[e]):T.texSubImage2D(d,e,t,r,a,n,u,c,s),o&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(f,g.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,a,n,s,o,l){l||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update an uninitialized texture!");let h=this._descriptor;h.internalFormat=(0,m.mq)(h);let{context:u,pixelFormat:c,dataType:d,isImmutable:p,target:f}=h;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,m.re)(f)||_().warn("Attempting to set 3D texture data on a non-3D texture");let T=u.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||a<0||t+n>h.width||r+s>h.height||a+o>h.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:x}=u;if((0,m.Qp)(l))l=l.levels[e],x.compressedTexSubImage3D(f,e,t,r,a,n,s,o,h.internalFormat,l);else{let i=l;x.texSubImage3D(f,e,t,r,a,n,s,o,c,d,i)}u.bindTexture(T,g.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){let e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,(0,m.QE)(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);let t=this._descriptor.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,g.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){let e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,m.QE)(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,m.QE)(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),(0,m.QE)(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&=(this._applySamplingMode(),!1),this._wrapModeDirty&&=(this._applyWrapMode(),!1),this._shadowFilterDirty&&=(this._applyShadowMode(),!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){let r=this._descriptor,a=r.context?.gl;if(!a)return;(0,h.Y2)(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),(0,m.QE)(r);let n=r.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,h.Y2)(a);let s=t??r.target,o=(0,m.re)(s);if((0,m.Kv)(e))this._setDataFromTexImageSource(e,s);else{let{width:t,height:n,depth:l}=r;if(null==t||null==n)throw new i.A("texture:missing-size","Width and height must be specified!");if(o&&null==l)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=(0,m.mq)(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,n,l),(0,m.Qp)(e)){if(!(0,m.tl)(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,n,l,e),(0,h.Y2)(a),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,h.Y2)(a),r.context.bindTexture(n,g.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){let e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,+!!r),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,+!!i)}_setDataFromTexImageSource(e,t){let{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,m.mq)(i);let a=(0,m.re)(t),{width:n,height:s,depth:o}=(0,m.Eo)(e);i.width&&i.height,i.width||=n,i.height||=s,a&&i.depth,a&&(i.depth=o),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,s,o),this._texImage(t,0,i.internalFormat,n,s,o,e),(0,h.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,h.Y2)(r))}_setDataFromCompressedSource(e,t,r){let i=this._descriptor,{width:a,height:n,depth:s}=i,o=e.levels,l=(0,m.FV)(r,a,n,s),h=Math.min(l,o.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,h),this._forEachMipmapLevel((e,i,a,n)=>{let s=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,i,a,n,s)},h)}_texStorage(e,t,r,a,n,s){let{gl:o}=this._descriptor.context;if(!(0,m.tr)(t)&&!(0,m.tl)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized or compressed internal format");if(!this._descriptor.isImmutable)return;let l=r?(0,m.FV)(e,a,n,s):1;if((0,m.re)(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");o.texStorage3D(e,l,t,a,n,s)}else o.texStorage2D(e,l,t,a,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e),{isImmutable:u,pixelFormat:c,dataType:d}=this._descriptor;if(u){if(null!=o){let r=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,a,n,s,c,d,r)}else l.texSubImage2D(e,t,0,0,a,n,c,d,r)}}else{let u=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,a,n,s,0,c,d,u)}else l.texImage2D(e,t,r,a,n,0,c,d,u)}}_compressedTexImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e);if(this._descriptor.isImmutable){if(null!=o)if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,a,n,s,r,o)}else l.compressedTexSubImage2D(e,t,0,0,a,n,r,o)}else if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,a,n,s,0,o)}else l.compressedTexImage2D(e,t,r,a,n,0,o)}async _compressOnWorker(e){let{width:t,height:r,context:i,flipped:a,preMultiplyAlpha:n,hasMipmap:s,compress:o}=this._descriptor;if(!o)return;let{compressionTracker:h,compressionCallback:u,preserveSourceBitmap:c}=o,{compressedTextureETC:m,compressedTextureS3TC:d}=i.capabilities;if(!g.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!m&&!d)return;this.abortCompression();let p=new AbortController;this._compressionAbortController=p,h?.increment();let f,T=!1,x=!1;try{e instanceof ImageBitmap?c?(f=await createImageBitmap(e),(0,l.Te)(p),x=!0):f=e:e instanceof Uint8Array?(f=e.buffer,T=this.descriptor.flipped):(f=await createImageBitmap(e,{imageOrientation:a?"flipY":"none"}),(0,l.Te)(p),x=!0);let i={data:f,width:t,height:r,needsFlip:T,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:n,isOpaque:this._descriptor.isOpaque,hasMipmap:s,hasETC:!!m,hasS3TC:!!d},o=await g.compressionWorkerHandle.invoke(i,p.signal,1);if((0,l.Te)(p),o.compressedTexture&&this.hasWebGLTextureObject){let e=this.usedMemory;this._descriptor.internalFormat=o.internalFormat,this._setData(o.compressedTexture),u?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||_().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),x&&f instanceof ImageBitmap&&f.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:a,depth:n,hasMipmap:s,target:o}=this._descriptor,l=32879===o;if(null==r||null==a||l&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,a,n),s&&(1!==r||1!==a||l&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),a=Math.max(1,a>>1),l&&(n=Math.max(1,n>>1))}_applySamplingMode(){let e=this._descriptor,t=e.context?.gl,r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):(9984===r||9986===r)&&(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i),null!=e.maxMipLevel&&t.texParameteri(e.target,t.TEXTURE_MAX_LEVEL,e.maxMipLevel)}_applyWrapMode(){let e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){let e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,h.Y2)(t)}_applyAnisotropicFilteringParameters(){let e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>n,e:()=>s});var i=r(63907),a=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,a.MW)(e.internalFormat))*(34067===e.target?6:1))}},42293(e,t,r){r.d(t,{MW:()=>l,wH:()=>o,yu:()=>s});var i=r(94656),a=r(63907);const n=new Set([a.pe.BYTE,a.pe.SHORT,a.pe.INT,a.pe.UNSIGNED_BYTE,a.pe.UNSIGNED_SHORT,a.pe.UNSIGNED_INT]);function s(e,t,r,a=0){let s=e.gl;e.bindBuffer(r);for(let o of r.layout){let r=t.get(o.name);if(null==r){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}let l=a*o.stride;if(o.count<=4)o.integer&&n.has(o.type)?s.vertexAttribIPointer(r,o.count,o.type,o.stride,o.offset+l):s.vertexAttribPointer(r,o.count,o.type,o.normalized,o.stride,o.offset+l),s.enableVertexAttribArray(r),o.divisor>0&&s.vertexAttribDivisor(r,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)s.vertexAttribPointer(r+e,3,o.type,o.normalized,o.stride,o.offset+12*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)s.vertexAttribPointer(r+e,4,o.type,o.normalized,o.stride,o.offset+16*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if((0,i.en)()){let t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${l}:`,t,o)}}}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function l(e){switch(e){case 6406:case 6409:case 6403:case 36244:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:case a.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case a.H0.RGBA4:case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.RG8:case a.H0.RG8I:case a.H0.RG8UI:case a.H0.RG8_SNORM:case a.H0.RGB565:case a.H0.RGB5_A1:case a.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case a.H0.RGB8:case a.H0.RGB8I:case a.H0.RGB8UI:case a.H0.RGB8_SNORM:case a.H0.SRGB8:case a.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case a.H0.RGBA8:case a.H0.R32F:case a.H0.R11F_G11F_B10F:case a.H0.RG16F:case a.H0.R32I:case a.H0.R32UI:case a.H0.RG16I:case a.H0.RG16UI:case a.H0.RGBA8I:case a.H0.RGBA8UI:case a.H0.RGBA8_SNORM:case a.H0.SRGB8_ALPHA8:case a.H0.RGB9_E5:case a.H0.RGB10_A2UI:case a.H0.RGB10_A2:case a.SB.DEPTH_COMPONENT32F:case a.iE.DEPTH24_STENCIL8:return 4;case a.iE.DEPTH32F_STENCIL8:return 5;case a.H0.RGB16F:case a.H0.RGB16I:case a.H0.RGB16UI:return 6;case a.H0.RG32F:case a.H0.RG32I:case a.H0.RG32UI:case a.H0.RGBA16F:case a.H0.RGBA16I:case a.H0.RGBA16UI:return 8;case a.H0.RGB32F:case a.H0.RGB32I:case a.H0.RGB32UI:return 12;case a.H0.RGBA32F:case a.H0.RGBA32I:case a.H0.RGBA32UI:return 16;case a.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case a.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case a.CQ.COMPRESSED_R11_EAC:case a.CQ.COMPRESSED_SIGNED_R11_EAC:case a.CQ.COMPRESSED_RGB8_ETC2:case a.CQ.COMPRESSED_SRGB8_ETC2:case a.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case a.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case a.CQ.COMPRESSED_RG11_EAC:case a.CQ.COMPRESSED_SIGNED_RG11_EAC:case a.CQ.COMPRESSED_RGBA8_ETC2_EAC:case a.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656(e,t,r){r.d(t,{Y2:()=>h,en:()=>l,u1:()=>s});var i=r(49186),a=r(44208),n=r(53966);function s(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const o=!!(0,a.A)("enable-feature:webgl-debug");function l(){return o}function h(e,t=l()){if(t){let t=s(e);if(t){let e=Error().stack;n.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},12541(e,t,r){r.d(t,{CR:()=>u,Eo:()=>T,FV:()=>g,Kv:()=>p,QE:()=>l,QJ:()=>c,Qp:()=>d,mq:()=>f,re:()=>_,tl:()=>m,tr:()=>h});var i=r(49186),a=r(53966),n=r(93637),s=r(63907);const o=()=>a.A.getLogger("esri/views/webgl/textureUtils");function l(e){let{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&o().error("Negative dimension parameters are not allowed!");let{internalFormat:a}=e;if(a&&(u(a)||c(a))){let{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:a}=e;a&&o().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&o().error("Depth textures cannot sample mipmaps"):(9728!==i&&o().error("Depth textures without filtering must use NEAREST filtering"),r&&o().error("Depth textures without filtering cannot use compare function"))}}function h(e){return function(e){return s.XN.includes(e)}(e)||u(e)||c(e)}function u(e){return(0,n.a4)(s.SB,e)}function c(e){return(0,n.a4)(s.iE,e)}function m(e){return null!=e&&(0,n.a4)(s.CQ,e)}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function g(e,t,r,i=1){let a=Math.max(t,r);return 32879===e&&(a=Math.max(a,i)),Math.floor(Math.log2(a))+1}function f(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case s.ld.FLOAT:switch(e.pixelFormat){case 6408:return s.H0.RGBA32F;case 6407:return s.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case s.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return s.H0.RGBA8;case 6407:return s.H0.RGB8}}let{pixelFormat:t}=e;return e.internalFormat=34041===t?s.iE.DEPTH24_STENCIL8:6402===t?s.SB.DEPTH_COMPONENT24:t,e.internalFormat}function T(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}},49788(e,t,r){r.d(t,["Q",0,1/255.5,"v",0,.9960861056751468])}}]);