@arcgis/core 4.33.0-next.20250207 → 4.33.0-next.20250209

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 (87) hide show
  1. package/applications/Components/styleUtils.js +1 -1
  2. package/applications/Components/webStyleSymbolUtils.js +1 -1
  3. package/arcade/treeAnalysis.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{5b20ee64248f2d5c937f.js → 08980b1ad3d5d67c6390.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{b1f5344e57ee679a7e81.js → 140d0c4285c6978103ea.js} +7 -7
  7. package/assets/esri/core/workers/chunks/{2a7f5d09cdc0333fa4bd.js → 2611adb4f328f95ee508.js} +1 -1
  8. package/assets/esri/core/workers/chunks/2def7db73a776e759dae.js +1 -0
  9. package/assets/esri/core/workers/chunks/{32f5f00aab55ef16dcf1.js → 5b85f9da022742f602e2.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{bab541feca7ab4d3f993.js → 6ea02ff25f051c08e6c3.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{8e334fa440ae542e2e34.js → 7e49ddb5a2182f2c9ca6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/b97673755cd2cc5164e8.js +1 -0
  13. package/assets/esri/core/workers/chunks/bb9ab85a135d211637f6.js +1 -0
  14. package/assets/esri/core/workers/chunks/c26ffbff1115e76bcb0f.js +1 -0
  15. package/assets/esri/core/workers/chunks/c38c154062cd838dd144.js +1 -0
  16. package/assets/esri/core/workers/chunks/{4decfae8bc5e80878bdd.js → de4384b5833a60e88e31.js} +1 -1
  17. package/assets/esri/core/workers/chunks/e37e5d2e233d7f6ccd52.js +314 -0
  18. package/assets/esri/core/workers/chunks/e93dea6b112ce8e2779b.js +1 -0
  19. package/assets/esri/core/workers/chunks/edb580ce96da6fd66503.js +1 -0
  20. package/chunks/ImageMaterial.glsl.js +4 -4
  21. package/geometry/Mesh.js +1 -1
  22. package/geometry/support/Indices.js +1 -1
  23. package/geometry/support/meshUtils/deduplicate.js +1 -1
  24. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  25. package/geometry/support/triangulationUtils.js +1 -1
  26. package/interfaces.d.ts +3 -28
  27. package/package.json +1 -1
  28. package/support/arcadeUtils.js +1 -1
  29. package/support/revision.js +1 -1
  30. package/symbols/WebStyleSymbol.js +1 -1
  31. package/symbols/support/previewSymbol3D.js +1 -1
  32. package/symbols/support/previewWebStyleSymbol.js +1 -1
  33. package/symbols/support/styleUtils.js +1 -1
  34. package/symbols/support/symbolUtils.js +1 -1
  35. package/symbols/support/utils.js +1 -1
  36. package/symbols/support/webStyleAcceptedFormats.js +5 -0
  37. package/symbols/support/webStyleSymbolUtils.js +1 -1
  38. package/views/3d/glTF/internal/resourceUtils.js +1 -1
  39. package/views/3d/layers/MediaLayerView3D.js +1 -1
  40. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  41. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  42. package/views/3d/layers/graphics/Labeler.js +1 -1
  43. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  44. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  45. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  46. package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
  47. package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
  48. package/views/3d/layers/graphics/pipeline/featureData/processingUtils.js +1 -1
  49. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  50. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  51. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  52. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  53. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandEncoder.js +1 -1
  54. package/views/3d/layers/graphics/pipeline/rendering/RenderGeometryBufferWriter.js +1 -1
  55. package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
  56. package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
  57. package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
  58. package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
  59. package/views/3d/layers/graphics/pipeline/utils.js +5 -0
  60. package/views/3d/layers/graphics/webStyleUtils.js +1 -1
  61. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  62. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  63. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  64. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  65. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  66. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  67. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  68. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  69. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  70. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  71. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  72. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  73. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  74. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  75. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  76. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  77. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  78. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  79. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  80. package/assets/esri/core/workers/chunks/1100d9d114287b6443e2.js +0 -1
  81. package/assets/esri/core/workers/chunks/459af0c3d62c3ed11c19.js +0 -1
  82. package/assets/esri/core/workers/chunks/6ec108bd955e064256b5.js +0 -1
  83. package/assets/esri/core/workers/chunks/7b11bf5799ecb3640b48.js +0 -314
  84. package/assets/esri/core/workers/chunks/81efe1f47fd41b7a5cc1.js +0 -1
  85. package/assets/esri/core/workers/chunks/92871ebb339a7b6ff29c.js +0 -1
  86. package/assets/esri/core/workers/chunks/b3f9d7a676076a7557f5.js +0 -1
  87. package/assets/esri/core/workers/chunks/fe817283bbcbca8fb296.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[36],{83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,a,l,u,c,p,h=t&&t.length,y=h?t[0]*n:e.length,g=o(e,0,y,n,!0),d=[];if(!g||g.next===g.prev)return d;if(h&&(g=f(e,t,g,n)),e.length>80*n){r=a=e[0],i=l=e[1];for(var m=n;m<y;m+=n)(u=e[m])<r&&(r=u),(c=e[m+1])<i&&(i=c),u>a&&(a=u),c>l&&(l=c);p=0!==(p=Math.max(a-r,l-i))?1/p:0}return s(g,d,n,r,i,p),d}function o(e,t,n,r,o){var i,s;if(o===E(e,t,n,r)>0)for(i=t;i<n;i+=r)s=C(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=C(i,e[i],e[i+1],s);if(s&&M(s,s.next)){var a=s.next;N(s),s=a}return s}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(N(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function s(e,t,n,r,o,f,p){if(e){!p&&f&&d(e,r,o,f);for(var h,y,g=e;e.prev!==e.next;)if(h=e.prev,y=e.next,f?l(e,r,o,f):a(e))t.push(h.i/n),t.push(e.i/n),t.push(y.i/n),N(e),e=y.next,g=y.next;else if((e=y)===g){p?1===p?s(e=u(i(e),t,n),t,n,r,o,f,2):2===p&&c(e,t,n,r,o,f):s(i(e),t,n,r,o,f,1);break}}}function a(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(v(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&w(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function l(e,t,n,r){var o=e.prev,i=e,s=e.next;if(w(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,u=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,c=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,f=m(a,l,t,n,r),p=m(u,c,t,n,r),h=e.prevZ,y=e.nextZ;h&&h.z>=f&&y&&y.z<=p;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&w(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,y!==e.prev&&y!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,y.x,y.y)&&w(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&w(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;y&&y.z<=p;){if(y!==e.prev&&y!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,y.x,y.y)&&w(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function u(e,t,n){var r=e;do{var o=r.prev,s=r.next.next;!M(o,s)&&T(o,r,r.next,s)&&S(o,s)&&S(s,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(s.i/n),N(r),N(r.next),r=e=s),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,o,a){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&A(l,u)){var c=R(l,u);return l=i(l,l.next),c=i(c,c.next),s(l,t,n,r,o,a),void s(c,t,n,r,o,a)}u=u.next}l=l.next}while(l!==e)}function f(e,t,n,r){var s,a,l,u=[];for(s=0,a=t.length;s<a;s++)(l=o(e,t[s]*r,s<a-1?t[s+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),u.push(x(l));for(u.sort(p),s=0;s<u.length;s++)n=i(n=y(u[s],n),n.next);return n}function p(e,t){return e.x-t.x}function h(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function y(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,u=n,c=n.x,f=n.y,p=1/0;r=n;do{o>=r.x&&r.x>=c&&o!==r.x&&v(i<f?o:s,i,c,f,i<f?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),S(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var r=R(n,e),o=i(n,n.next);let s=h(r);return i(s,s.next),o=h(o),h(t===n?o:t)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function d(e,t,n,r){var o=e;do{null===o.z&&(o.z=m(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,u=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<u&&(a++,r=r.nextZ);t++);for(l=u;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,u*=2}while(s>1)}(o)}function m(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function x(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function v(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function A(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&T(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(S(e,t)&&S(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||M(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function M(e,t){return e.x===t.x&&e.y===t.y}function T(e,t,n,r){var o=_(w(e,t,n)),i=_(w(e,t,r)),s=_(w(n,r,e)),a=_(w(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function _(e){return e>0?1:e<0?-1:0}function S(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function R(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function C(e,t,n,r){var o=new B(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function N(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(E(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var u=t[a]*n,c=a<l-1?t[a+1]*n:e.length;s-=Math.abs(E(e,u,c,n))}var f=0;for(a=0;a<r.length;a+=3){var p=r[a]*n,h=r[a+1]*n,y=r[a+2]*n;f+=Math.abs((e[p]-e[y])*(e[h+1]-e[p+1])-(e[p]-e[h])*(e[y+1]-e[p+1]))}return 0===s&&0===f?0:Math.abs((f-s)/s)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n}},73354:(e,t,n)=>{n.d(t,{a:()=>f,b:()=>a,c:()=>s,d:()=>o,e:()=>p,f:()=>c,l:()=>u,n:()=>h,t:()=>i});var r=n(40876);function o(e,t,n){i(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function i(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return e;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[4],c=n[5],f=n[6],p=n[8],h=n[9],y=n[10],g=n[12],d=n[13],m=n[14];let x=0,v=0;for(let n=0;n<i;n++){const n=t[x],i=t[x+1],A=t[x+2];e[v]=s*n+u*i+p*A+g,e[v+1]=a*n+c*i+h*A+d,e[v+2]=l*n+f*i+y*A+m,x+=o,v+=r}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[3],c=n[4],f=n[5],p=n[6],h=n[7],y=n[8];let g=0,d=0;for(let n=0;n<i;n++){const n=t[g],i=t[g+1],m=t[g+2];e[d]=s*n+u*i+p*m,e[d+1]=a*n+c*i+h*m,e[d+2]=l*n+f*i+y*m,g+=o,d+=r}}function l(e,t,n,r=3,o=r){const i=Math.min(e.length/r,t.length/o);let s=0,a=0;for(let l=0;l<i;l++)e[a]=n*t[s],e[a+1]=n*t[s+1],e[a+2]=n*t[s+2],s+=o,a+=r;return e}function u(e,t,n,r){c(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,n,o,i=3,s=i){const a=Math.min(e.length/i,t.length/s);let l=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)e[u]=o*(n*t[l])**c,e[u+1]=o*(n*t[l+1])**c,e[u+2]=o*(n*t[l+2])**c,l+=s,u+=i}function f(e,t,n,r=3,o=r){const i=e.length/r;if(i!==Math.ceil(t.length/o))return e;let s=0,a=0;for(let l=0;l<i;l++)e[a]=t[s]+n[0],e[a+1]=t[s+1]+n[1],e[a+2]=t[s+2]+n[2],s+=o,a+=r;return e}function p(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const o=Math.min(e.length/n,t.length/r);let i=0,s=0;for(let a=0;a<o;a++){const o=t[i],a=t[i+1],l=t[i+2],u=o*o+a*a+l*l;if(u>0){const t=1/Math.sqrt(u);e[s]=t*o,e[s+1]=t*a,e[s+2]=t*l}i+=r,s+=n}}n(44208),n(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:h,normalizeView:p,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,u=0;for(let e=0;e<r;e++)o[u]=s[l]>>n,o[u+1]=s[l+1]>>n,o[u+2]=s[l+2]>>n,l+=a,u+=i},transformMat3:a,transformMat3View:s,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,n)=>{n.d(t,{a:()=>i,b:()=>c,l:()=>u,n:()=>a,t:()=>s});var r=n(40876),o=(n(44208),n(53966));function i(e,t,n){s(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function s(e,t,n,r=4,o=r){if(e.length/r!=t.length/o)return;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[3],c=n[4],f=n[5],p=n[6],h=n[7],y=n[8];let g=0,d=0;for(let n=0;n<i;n++){const n=t[g],i=t[g+1],m=t[g+2],x=t[g+3];e[d]=s*n+u*i+p*m,e[d+1]=a*n+c*i+h*m,e[d+2]=l*n+f*i+y*m,e[d+3]=x,g+=o,d+=r}}function a(e,t){const n=Math.min(e.count,t.count),r=e.typedBuffer,o=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*o,n=e*s,a=i[n],l=i[n+1],u=i[n+2],c=a*a+l*l+u*u;if(c>0){const e=1/Math.sqrt(c);r[t]=e*a,r[t+1]=e*l,r[t+2]=e*u}}}function l(e,t,n,r=4){const o=Math.min(e.length/r,t.count),i=t.typedBuffer,s=t.typedBufferStride;let a=0,l=0;for(let t=0;t<o;t++)e[l]=n*i[a],e[l+1]=n*i[a+1],e[l+2]=n*i[a+2],e[l+3]=n*i[a+3],a+=s,l+=r}function u(e,t,n,r){c(e.typedBuffer,t,n,r,e.typedBufferStride)}function c(e,t,n,o,i=4){const s=Math.min(e.length/i,t.count),a=t.typedBuffer,l=t.typedBufferStride;let u=0,c=0;const f=1/r.Tf;for(let t=0;t<s;t++)e[c]=o*(n*a[u])**f,e[c+1]=o*(n*a[u+1])**f,e[c+2]=o*(n*a[u+2])**f,e[c+3]=o*n*a[u+3],u+=l,c+=i}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:a,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t,n,e.typedBufferStride)},transformMat3:s,transformMat3View:i,transformMat4:function(e,t,n,r=4,i=r){if(e.length/r!=t.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const s=e.length/r,a=n[0],l=n[1],u=n[2],c=n[3],f=n[4],p=n[5],h=n[6],y=n[7],g=n[8],d=n[9],m=n[10],x=n[11],v=n[12],A=n[13],w=n[14],M=n[15];let T=0,b=0;for(let n=0;n<s;n++){const n=t[T],o=t[T+1],s=t[T+2],_=t[T+3];e[b]=a*n+f*o+g*s+v*_,e[b+1]=l*n+p*o+d*s+A*_,e[b+2]=u*n+h*o+m*s+w*_,e[b+3]=c*n+y*o+x*s+M*_,T+=i,b+=r}},transformMat4View:function(e,t,n){if(e.count!==t.count)return;const r=e.count,o=n[0],i=n[1],s=n[2],a=n[3],l=n[4],u=n[5],c=n[6],f=n[7],p=n[8],h=n[9],y=n[10],g=n[11],d=n[12],m=n[13],x=n[14],v=n[15],A=e.typedBuffer,w=e.typedBufferStride,M=t.typedBuffer,T=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*w,n=e*T,r=M[n],b=M[n+1],_=M[n+2],S=M[n+3];A[t]=o*r+l*b+p*_+d*S,A[t+1]=i*r+u*b+h*_+m*S,A[t+2]=s*r+c*b+y*_+x*S,A[t+3]=a*r+f*b+g*_+v*S}}},Symbol.toStringTag,{value:"Module"}))},43668:(e,t,n)=>{n.d(t,{M5:()=>f,eV:()=>c});var r=n(78888),o=n(49186),i=n(74887),s=n(84952),a=n(26306);let l=null,u=!0;function c(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch(e){u=!1}const o=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return o.data.set(e,0),o}async function f(e,t){const{arrayBuffer:l,mediaType:u}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const o=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(c){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,i.zf)(e))throw new o.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),t)}},40036:(e,t,n)=>{n.d(t,{default:()=>et});var r=n(90237),o=n(49186),i=n(92474),s=n(53966),a=n(61893),l=n(74887),u=n(36708),c=n(10107),f=(n(44208),n(87811),n(40608)),p=n(51850),h=n(91075),y=n(86738),g=n(39829),d=n(70328),m=n(24770),x=n(16939);const v="Expected location to be a Point instance";class A extends o.A{constructor(){super("invalid-input:location",v)}}var w=n(95696),M=n(18251),T=n(73836),b=n(1193),_=n(27615),S=n(83349),R=n(88582),C=n(95108),N=n(4197),B=n(97146),E=n(34727),Z=n(83047),O=n(38954),F=n(27921);const U=(0,F.vt)();var L,P,j=n(9318);function D(e,t,n,r){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0;for(let t=0;t<o;++t)l+=e[t].length;let u=0,c=0,f=0;const p=(0,N.jh)(3*l);let h=0;for(let l=o-1;l>=0;l--){const y=e[l],g=n===L.CCW_IS_HOLE&&z(y,t,r);if(g&&1!==o)i[u++]=y;else{let e=y.length;for(let t=0;t<u;++t)e+=i[t].length;const n={index:h,pathLengths:new Array(u+1),count:e,holeIndices:new Array(u)};n.pathLengths[0]=y.length,y.length>0&&(a[f++]={index:h,count:y.length}),h=g?$(y,y.length-1,-1,p,h,y.length,t):$(y,0,1,p,h,y.length,t);for(let e=0;e<u;++e){const r=i[e];n.holeIndices[e]=h,n.pathLengths[e+1]=r.length,r.length>0&&(a[f++]={index:h,count:r.length}),h=$(r,0,1,p,h,r.length,t)}u=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<u;++e){const n=i[e];n.length>0&&(a[f++]={index:h,count:n.length}),h=$(n,0,1,p,h,n.length,t)}return s.length=c,a.length=f,{position:p,polygons:s,outlines:a}}function $(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s&&i[2]?i[2]:0,t+=n}return o/3}function z(e,t,n){if(!t)return!(0,C.$3)(e);switch(function(e,t,n){const r=function(e,t,n,r){const o=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],i=r?(0,Z.GA)(r)/(0,Z.G9)(r):1;return(0,F.lU)(e,((e,t)=>(0,O.i)(e,o(t,0)*i,o(t,1)*i,o(t,2))),n)}(U,e,t,n)?(0,F.Qj)(U):[0,0,1];return Math.abs(r[2])>Math.cos((0,E.kU)(80))?R._.Z:Math.abs(r[1])>Math.abs(r[0])?R._.Y:R._.X}(e,e.length-1,n)){case R._.X:return!(0,C.$3)(e,R._.Y,R._.Z);case R._.Y:return!(0,C.$3)(e,R._.X,R._.Z);case R._.Z:return!(0,C.$3)(e,R._.X,R._.Y)}}(P=L||(L={}))[P.NONE=0]="NONE",P[P.CCW_IS_HOLE=1]="CCW_IS_HOLE";var I=n(65806),W=n(51447);function G(e,t,n,r){if(void 0!==r){(0,W.io)(e(),"option: geographic",{replacement:"Use mesh `vertexSpace` and spatial reference to control how operations are performed instead.",version:"4.30",warnOnce:!0});const o="local"===t.type;if(!(0,_.Hq)(t)||r===o)return n.isGeographic||n.isWebMercator&&r;e().warnOnce(`Specifying the 'geographic' parameter (${r}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}switch(t.type){case"georeferenced":return n.isGeographic;case"local":return n.isGeographic||n.isWebMercator}}var H=n(22141),q=n(72258);const V=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const k=(0,p.vt)(),K=(0,p.vt)(),X=(0,p.vt)();var Y=n(9093),J=n(5443),Q=n(57251),ee=n(98764),te=n(48353),ne=n(9762),re=n(73354);const oe=(0,Y.vt)(),ie=(0,N.jh)(24);var se=n(84952);async function ae(e,t,r){const{source:i}=t,{loadGLTFMesh:s}=await(0,l.qr)(Promise.all([n.e(4399),n.e(2282)]).then(n.bind(n,97375)),r),a=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new o.A("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ge(e.map((e=>({name:e.name,mimeType:e.type,source:ue(e)}))))}(e):async function(e,t){const n=await(0,l.nA)(e.map((async e=>{const n=await async function(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(1===n.length)return new de(n[0].partUrl);const i=await e.toBlob(t);return(0,l.Te)(t),de.fromBlob(i,me(o,r))}(e);return(0,l.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,l.G4)(t))throw n.forEach((e=>e.source.dispose())),(0,l.NK)();return ge(n)}(e,t)}return ue(e)}(i,r);(0,l.Te)(r);const u=s(new y.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),a.url,{resolveFile:le(a),signal:r?.signal,expectedType:a.type,unitConversionDisabled:t.unitConversionDisabled});u.then((()=>a.dispose()),(()=>a.dispose()));const{vertexAttributes:c,components:f}=await u;e.vertexAttributes=c,e.components=f}function le(e){const t=(0,se.nM)(e.url);return n=>{const r=(0,se.V1)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function ue(e){return de.fromBlob(e,me(e.name,e.type))}const ce=/^model\/gltf\+json$/,fe=/^model\/gltf-binary$/,pe=/\.gltf$/i,he=/\.glb$/i;function ye({mimeType:e,source:t,name:n}){return ce.test(e)||pe.test(n)?{url:t.url,type:"gltf"}:fe.test(e)||he.test(n)?{url:t.url,type:"glb"}:null}function ge(e){const t=new Map;let n=null,r=null;for(const o of e){const{source:e,name:i}=o;n??=ye(o),"ESRI3DO_NORM.glb"===i&&(r=ye(o)),t.set(i,e.url),e.files.forEach(((e,n)=>t.set(n,e)))}const i=r??n;if(null==i)throw new o.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new de(i.url,(()=>e.forEach((({source:e})=>e.dispose()))),t,i.type)}class de{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){const n=URL.createObjectURL(e);return new de(n,(()=>URL.revokeObjectURL(n)),void 0,t)}}function me(e,t){return ce.test(t)||pe.test(e)?"gltf":fe.test(t)||pe.test(e)?"glb":void 0}var xe=n(69540),ve=n(5503),Ae=n(63579);let we=class extends xe.A{constructor(e){super(e),this.externalSources=new ve.A,this._explicitDisplaySource=null,this.georeferenced=!1,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,Ae.yr)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,Ae.in)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,Ae.eN)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(Ae.yr)}};(0,r._)([(0,c.MZ)()],we.prototype,"externalSources",void 0),(0,r._)([(0,c.MZ)()],we.prototype,"displaySource",null),(0,r._)([(0,c.MZ)()],we.prototype,"_implicitDisplaySource",null),(0,r._)([(0,c.MZ)()],we.prototype,"_explicitDisplaySource",void 0),(0,r._)([(0,c.MZ)()],we.prototype,"georeferenced",void 0),we=(0,r._)([(0,f.$)("esri.geometry.support.meshUtils.Metadata")],we);var Me=n(29242);const Te={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function be(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){Ce[0]=t[0],Ce[4]=t[1],Ce[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Re[n]=e.position[t+n];(0,O.q)(Re,Re,Ce);for(let n=0;n<3;n++)e.position[t+n]=Re[n]}if(t[0]!==t[1]||t[1]!==t[2]){Ce[0]=1/t[0],Ce[4]=1/t[1],Ce[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Re[n]=e.normal[t+n];(0,O.q)(Re,Re,Ce),(0,O.n)(Re,Re);for(let n=0;n<3;n++)e.normal[t+n]=Re[n]}}}}(e,function(e,t,n){const r=(0,q.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){const t=e*r;return[t,t,t]}return[null!=e.width?e.width*r:r,null!=e.depth?e.depth*r:r,null!=e.height?e.height*r:r]}(n?.size,n?.unit,t.spatialReference));const r=(0,_.TE)(t,n),o=t.spatialReference.isGeographic?(0,_.TE)(t):r,i=(0,q.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new b.H({...i,uv:e.uv}),vertexSpace:r,components:[new x.A({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const _e={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Se={south:0,east:1,north:2,west:3,up:4,down:5},Re=(0,p.vt)(),Ce=(0,Me.vt)();var Ne=n(77690),Be=n(58083),Ee=n(67026),Ze=n(82534);const Oe=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function Fe(e,t,n,r=p.uY){if(null!=e){(0,Be.$0)(je,(0,m.$I)(t),(0,m.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ue[n]=e[t+n]-r[n];(0,O.t)(Ue,Ue,je);for(let n=0;n<3;n++)e[t+n]=Ue[n]+r[n]}}}const Ue=(0,p.vt)(),Le=(0,Y.vt)(),Pe=(0,m.vt)(),je=(0,Y.vt)(),De=(0,Me.vt)(),$e=(0,p.vt)(),ze=(0,Ze.vt)(),Ie=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function We(e,t,n=p.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ge[t]=e[r+t]-n[t];(0,O.h)(Ge,Ge,t);for(let t=0;t<3;t++)e[r+t]=Ge[t]+n[t]}}const Ge=(0,p.vt)(),He=(0,p.vt)(),qe=(0,Y.vt)(),Ve=(0,p.vt)();var ke;const Ke="esri.geometry.Mesh";function Xe(){return s.A.getLogger(Ke)}const Ye={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:w.A,local:M.A}};let Je=ke=class extends(i.A.LoadableMixin(a.A.EsriPromiseMixin(h.A))){constructor(e){super(e),this.components=null,this.vertexSpace=new w.A,this.transform=null,this.metadata=new we,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new b.H,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.wB)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){const{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,o=(0,d.gE)(r,ie);if((0,_.Hq)(n)&&e.transform&&(0,re.t)(o,o,e.transform.localMatrix),"georeferenced"===n.type){const e=n.origin;return e&&(0,re.a)(o,o,e),(0,d.w1)((0,d.vY)(o),t)}const i=(0,ee.lO)(t),s=n.origin;if(!(0,Q.canProjectWithoutEngine)(i,t)){const[e,n,r]=s;return new J.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,te.l)(t,s,oe,i),(0,re.t)(o,o,oe),(0,ne.projectBuffer)(o,i,0,o,t,0),(0,d.w1)((0,d.vY)(o),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){const e=(0,_.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:n}=this._transformedExtent;return new y.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(x.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}Xe().error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,m.AU)(e,t,n,Qe),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=G(Oe,o,r,s);(0,_.CK)(e)?function(e,t,n){e.transform??=new T.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new y.A({x:s,y:a,z:l,spatialReference:i}),c=Ue;if(u.equals(n))(0,O.i)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(Oe(),n.spatialReference,i,H.JP);(0,Ee.x8)(ze,(0,m.yo)(t),(0,m.$I)(t));const f=(0,Be.O7)(Le,ze,p.uY,p.Un,c),{localMatrix:h}=o,g=(0,Be.lw)(Le,f,h);o.scale=(0,Be.IL)((0,p.vt)(),g),(0,Be.hs)(g,g,(0,O.u)(Ue,o.scale));const d=o.rotationAxis;o.rotation=(0,m.ui)(g),0===o.rotationAngle&&(o.rotationAxis=d),o.translation=(0,Be.sC)((0,p.vt)(),g)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,ee.lO)(r),i=$e;if(!(0,I.g)(n,i,o)&&((0,H.CN)(Oe(),n.spatialReference,o,"Falling back to mesh origin"),!(0,I.g)(e.origin,i,o)))return void(0,H.CN)(Oe(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;(0,te.l)(o,i,je,o),(0,Ne.z0)(De,je);const p=Pe;(0,O.q)((0,m.yo)(Pe),(0,m.yo)(t),De),p[3]=t[3],!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(Oe(),r,o):(Fe(u,p,3,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&(Fe(c,p,3),!(0,H.si)(c,s,r,u,o,a))||null!=l&&null!=f&&(Fe(f,p,4),!(0,H.Mv)(f,s,r,u,o,l))?(0,H.CN)(Oe(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=$e;if(!(0,I.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(Oe(),n.spatialReference,e.spatialReference,H.JP)}Fe(e.vertexAttributes.position,t,3,r),Fe(e.vertexAttributes.normal,t,3),Fe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Qe,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:r,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,_.Hq)(r)){const[o,i,s]=r.origin;r.origin=(0,p.fA)(o+e,i+t,s+n)}else{for(let r=0;r<i.length;r+=3)i[r]+=e,i[r+1]+=t,i[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r,spatialReference:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=G(Ie,r,o,s);(0,_.CK)(e)?function(e,t,n){e.transform??=new T.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new y.A({x:s,y:a,z:l,spatialReference:i}),c=Ge;if(u.equals(n))(0,O.i)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(Ie(),n.spatialReference,i,H.JP);const f=(0,O.i)(He,t,t,t),h=(0,Be.O7)(qe,Ze.zK,p.uY,f,c),{localMatrix:g}=o,d=(0,Be.lw)(qe,h,g);o.scale=(0,Be.IL)((0,p.vt)(),d),(0,Be.hs)(d,d,(0,O.u)(Ge,o.scale));const x=o.rotationAxis;o.rotation=(0,m.ui)(d),0===o.rotationAngle&&(o.rotationAxis=x),o.translation=(0,Be.sC)((0,p.vt)(),d)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,ee.lO)(r),i=Ve;if(!(0,I.g)(n,i,o)&&((0,H.CN)(Ie(),n.spatialReference,o,"Falling back to mesh origin"),!(0,I.g)(e.origin,i,o)))return void(0,H.CN)(Ie(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(Ie(),r,o):(We(u,t,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&!(0,H.si)(c,s,r,u,o,a)||null!=l&&null!=f&&!(0,H.Mv)(f,s,r,u,o,l)?(0,H.CN)(Ie(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=Ve;if(!(0,I.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(Ie(),n.spatialReference,e.spatialReference,H.JP)}We(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin,i=G(V,r,o.spatialReference,n?.geographic);(0,_.Hq)(r)?function(e,t,n){const{vertexSpace:r}=e;if(!(0,_.Hq)(r))return;const o=K,i=k;if(!(0,I.g)(t,i,e.spatialReference))return void(0,H.CN)(V(),t.spatialReference,e.spatialReference,H.JP);if(!(0,I.g)(n,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void(0,H.CN)(V(),n.spatialReference,e.spatialReference,H.JP)}const s=(0,O.d)(X,i,o);r.origin=(0,O.g)((0,p.vt)(),r.origin,s)}(e,t,o):i?function(e,t,n){const r=(0,p.fA)(n.x,n.y,n.z??0),o=(0,q.UR)(e,new M.A({origin:r}));if(!o)return;const i=(0,p.fA)(t.x,t.y,t.z??0),s=(0,q.UR)({vertexAttributes:o,spatialReference:e.spatialReference,vertexSpace:new M.A({origin:i})},w.A.absolute);if(!s)return;const{position:a,normal:l,tangent:u}=s;e.vertexAttributes.position=a,e.vertexAttributes.normal=l,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=K,o=k;if((0,I.g)(t,o,e.spatialReference)){if(!(0,I.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(V(),n.spatialReference,e.spatialReference,H.JP)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else(0,H.CN)(V(),t.spatialReference,e.spatialReference,H.JP)}(e,t,o)}(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(ae(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneAndModifyVertexAttributes(this.vertexAttributes.clone(),this.vertexSpace.clone(),{preserveMetadata:!0})}cloneAndModifyVertexAttributes(e,t,n){let r=null;if(this.components){const e=new Map,t=new Map;r=this.components.map((n=>n.cloneWithDeduplication(e,t)))}const o={components:r,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:this.transform?.clone()??null,metadata:n?.preserveMetadata?this.metadata.clone():new we};return new ke(o)}cloneShallow(){return new ke({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([n.e(8096).then(n.bind(n,8096)),this.load(e)]);return(0,l.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce(((e,t)=>e+t.memoryUsage),this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(Xe().error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof y.A))return Xe().error(".createBox()",v),null;const n=new ke(be(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=_e,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,u=0,c=0,f=0;for(let r=0;r<e.length;r++){const p=e[r],h=l/3;for(const e of t)a[f++]=h+e;const y=p.corners;for(let e=0;e<4;e++){const t=y[e];let r=0;s[c++]=.25*n[e][0]+p.uvOrigin[0],s[c++]=p.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==p.axis[e]?(o[l++]=.5*p.axis[e],i[u++]=p.axis[e]):(o[l++]=.5*t[r++],i[u++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=Se[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,u=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[u++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new x.A({faces:s,material:n.material}),new x.A({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof y.A?new ke(be(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,u=0,c=0,f=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,p=Math.cos(r),h=Math.sin(r);Re[2]=h;const y=0===e||e===t,g=y?n-1:n;for(let r=0;r<=g;r++){const h=r/g*2*Math.PI;Re[0]=-Math.sin(h)*p,Re[1]=Math.cos(h)*p;for(let e=0;e<3;e++)o[l]=.5*Re[e],i[l]=Re[e],++l;s[u++]=(r+(y?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(a[c++]=f,a[c++]=f+1,a[c++]=f-n),1!==e&&(a[c++]=f,a[c++]=f-n,a[c++]=f-n-1)),f++}}return{position:o,normal:i,uv:s,faces:a}}(t?.densificationFactor||0),e,t)):(Xe().error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof y.A?new ke(be(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,u=0,c=0,f=0;for(let e=0;e<=5;e++){const n=0===e||5===e,p=e<=1||e>=4,h=2===e||4===e,y=n?t-1:t;for(let g=0;g<=y;g++){const d=g/y*2*Math.PI,m=n?0:.5;Re[0]=m*Math.sin(d),Re[1]=m*-Math.cos(d),Re[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Re[t],o[l++]=p?2===t?e<=1?1:-1:0:2===t?0:Re[t]/m;i[u++]=(g+(n?.5:0))/t,i[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||g===t||(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:o,uv:i,faces:s}}(t?.densificationFactor||0),e,t)):(Xe().error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof y.A))return Xe().error(".createPlane()",v),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new ke(be(function(e){const t=Te.facingAxisOrderSwap[e],n=Te.position,r=Te.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],u=Math.abs(l)-1,c=l>=0?1:-1;o[s]=n[e+u]*c,i[s]=r[e+u]*c,s++}}return{position:o,normal:i,uv:new Float32Array(Te.uv),faces:new Uint32Array(Te.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return Xe().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const n=function(e){const t=D(e.rings,e.hasZ,L.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,o=0;for(const e of t.polygons){const i=e.count,s=e.index,a=(0,N.l5)(t.position,3*s,3*i),l=e.holeIndices.map((e=>e-s)),u=(0,B.uW)((0,S.e)(a,l,3));n.push({position:a,faces:u}),r+=a.length,o+=u.length}const i=function(e,t,n){if(1===e.length)return e[0];const r=(0,N.jh)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,B.uW)(o)}}(n,r,o),s=Array.isArray(i.position)?(0,j.b)(i.position,3,{originalIndices:i.faces}):(0,j.b)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,N.xm)(new Float64Array(s.buffer)),i.faces=s.indices,i}(e);return new ke({vertexAttributes:new b.H({position:n.position}),components:[new x.A({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new w.A})}static async createFromGLTF(e,t,r){if(!(e instanceof y.A)){const e=new A;throw Xe().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,l.qr)(Promise.all([n.e(4399),n.e(2282)]).then(n.bind(n,97375)),r);return new ke(await o(e,t,r))}static createWithExternalSource(e,t,n){const r=n?.extent??null,{spatialReference:o}=e,i=n?.transform?.clone()??new T.A,s=(0,_.TE)(e,n),a=n?.unitConversionDisabled,l={source:t,extent:r,unitConversionDisabled:a},u=new we;return u.externalSources.push(l),new ke({metadata:u,transform:i,vertexSpace:s,spatialReference:o})}static createIncomplete(e,t){const{spatialReference:n}=e,r=t?.transform?.clone()??new T.A,i=(0,_.TE)(e,t),s=new ke({transform:r,vertexSpace:i,spatialReference:n});return s.addResolvingPromise(Promise.reject(new o.A("mesh-incomplete","Mesh resources are not complete"))),s}};(0,r._)([(0,c.MZ)({type:[x.A],json:{write:!0}})],Je.prototype,"components",void 0),(0,r._)([(0,c.MZ)({nonNullable:!0,types:Ye,constructOnly:!0,json:{write:!0}})],Je.prototype,"vertexSpace",void 0),(0,r._)([(0,c.MZ)({type:T.A,json:{write:!0}})],Je.prototype,"transform",void 0),(0,r._)([(0,c.MZ)({constructOnly:!0})],Je.prototype,"metadata",void 0),(0,r._)([(0,c.MZ)()],Je.prototype,"hasExtent",null),(0,r._)([(0,c.MZ)()],Je.prototype,"_transformedExtent",null),(0,r._)([(0,c.MZ)()],Je.prototype,"_untransformedBounds",null),(0,r._)([(0,c.MZ)()],Je.prototype,"origin",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Je.prototype,"extent",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Je.prototype,"hasZ",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Je.prototype,"hasM",void 0),(0,r._)([(0,c.MZ)({type:b.H,nonNullable:!0,json:{write:!0}})],Je.prototype,"vertexAttributes",void 0),Je=ke=(0,r._)([(0,f.$)(Ke)],Je);const Qe=(0,m.vt)(),et=Je},97146:(e,t,n)=>{n.d(t,{Dg:()=>i,my:()=>s,tM:()=>c,uW:()=>o});var r=n(34275);function o(e){return i(e,!0)}function i(e,t){if(Array.isArray(e)){if(e.length<r.y9)return e}else if(e.length<r.y9)return Array.from(e);let n=!0,o=!0;return e.some(((e,t)=>(n=n&&0===e,o=o&&e===t,!n&&!o))),n?function(e){if(1===e)return l;if(e<r.y9)return new Array(e).fill(0);if(e>p.length){const t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):o?c(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=r.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=f(131072);const l=[0],u=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function c(e){return 1===e?l:e<r.y9?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)},16939:(e,t,n)=>{n.d(t,{A:()=>d});var r,o=n(90237),i=n(25482),s=n(4718),a=n(53966),l=n(10107),u=n(79901),c=n(40608),f=n(56507),p=n(19211),h=n(80882),y=n(31199);let g=r=class extends i.A{static from(e){return(0,f.PZ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,y.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},a.A.getLogger(this))}castMaterial(e){return(0,f.PZ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?h.A:p.A,e)}clone(){return new r({faces:(0,s.o8)(this.faces),shading:this.shading,material:(0,s.o8)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const n={faces:(0,s.o8)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.MZ)({json:{write:y.B}})],g.prototype,"faces",void 0),(0,o._)([(0,u.w)("faces")],g.prototype,"castFaces",null),(0,o._)([(0,l.MZ)({type:p.A,json:{write:!0}})],g.prototype,"material",void 0),(0,o._)([(0,u.w)("material")],g.prototype,"castMaterial",null),(0,o._)([(0,l.MZ)({json:{write:!0}})],g.prototype,"name",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],g.prototype,"shading",void 0),(0,o._)([(0,l.MZ)({type:Boolean})],g.prototype,"trustSourceNormals",void 0),g=r=(0,o._)([(0,c.$)("esri.geometry.support.MeshComponent")],g);const d=g},95696:(e,t,n)=>{n.d(t,{A:()=>f});var r,o=n(90237),i=n(69540),s=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),u=n(40608);let c=r=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};c.absolute=new r,(0,o._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,o._)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,o._)([(0,u.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const f=c},18251:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(90237),o=n(69540),i=n(25482),s=n(10107),a=(n(44208),n(53966),n(87811),n(93223)),l=n(40608),u=n(51850);let c=class extends(o.A.ClonableMixin(i.A)){constructor(e){super(e),this.type="local",this.origin=(0,u.vt)()}};(0,r._)([(0,a.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r._)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r._)([(0,l.$)("esri.geometry.support.MeshLocalVertexSpace")],c);const f=c},19211:(e,t,n)=>{n.d(t,{A:()=>p});var r,o=n(90237),i=n(68197),s=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(40608)),u=n(35063),c=n(51147);let f=r=class extends s.A{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,a.MZ)({type:i.A,json:{write:!0}})],f.prototype,"color",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTexture",void 0),(0,o._)([(0,a.MZ)({type:c.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTexture",void 0),(0,o._)([(0,a.MZ)({type:c.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,o._)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=r=(0,o._)([(0,l.$)("esri.geometry.support.MeshMaterial")],f);const p=f},80882:(e,t,n)=>{n.d(t,{A:()=>p});var r,o=n(90237),i=n(68197),s=n(10107),a=(n(44208),n(53966),n(87811),n(40608)),l=n(19211),u=n(35063),c=n(51147);let f=r=class extends l.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.MZ)({type:i.A,json:{write:!0}})],f.prototype,"emissiveColor",void 0),(0,o._)([(0,s.MZ)({type:u.A,json:{write:!0}})],f.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.MZ)({type:c.A,json:{write:!0}})],f.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.MZ)({type:u.A,json:{write:!0}})],f.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.MZ)({type:c.A,json:{write:!0}})],f.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],f.prototype,"metallic",void 0),(0,o._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],f.prototype,"roughness",void 0),(0,o._)([(0,s.MZ)({type:u.A,json:{write:!0}})],f.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.MZ)({type:c.A,json:{write:!0}})],f.prototype,"metallicRoughnessTextureTransform",void 0),f=r=(0,o._)([(0,a.$)("esri.geometry.support.MeshMaterialMetallicRoughness")],f);const p=f},35063:(e,t,n)=>{n.d(t,{A:()=>v});var r,o=n(90237),i=(n(44208),n(43668)),s=n(25482),a=n(10107),l=n(56507),u=(n(87811),n(36005)),c=n(40608),f=n(43937),p=n(97159);const h=new WeakMap;let y=0,g=r=class extends s.A{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,p.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r={type:"canvas-element",imageData:d(e.getContext("2d").getImageData(0,0,e.width,e.height))};t[n]=r}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,p.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:d(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=m(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return m(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const{data:e,url:t}=this;return e instanceof HTMLCanvasElement?x(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?x(e):!(!t?.toLowerCase().endsWith(".png")&&!t?.toLocaleLowerCase().startsWith("data:image/png;"))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(h.has(this.data)||h.set(this.data,++y),t(h.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,l.PZ)(r,e)}};function d(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function m(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,i.eV)(n,e.width,e.height)}function x(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,o._)([(0,a.MZ)({type:String,json:{write:p.w}})],g.prototype,"url",null),(0,o._)([(0,a.MZ)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.MZ)()],g.prototype,"data",null),(0,o._)([(0,f.K)("data")],g.prototype,"writeData",null),(0,o._)([(0,u.w)("data")],g.prototype,"readData",null),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],g.prototype,"transparent",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],g.prototype,"wrap",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],g.prototype,"contentHash",null),g=r=(0,o._)([(0,c.$)("esri.geometry.support.MeshTexture")],g);const v=g},51147:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),o=n(69540),i=n(25482),s=n(10107),a=(n(44208),n(53966),n(87811),n(40608));let l=class extends(o.A.ClonableMixin(i.A)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.$)("esri.geometry.support.MeshTextureTransform")],l);const u=l},1193:(e,t,n)=>{n.d(t,{H:()=>p});var r,o=n(90237),i=n(25482),s=n(4718),a=n(53966),l=n(10107),u=n(79901),c=n(40608),f=n(31199);let p=r=class extends i.A{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,f.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,f.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,f.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,f.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,f.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clone(){const e={position:(0,s.o8)(this.position),uv:(0,s.o8)(this.uv),normal:(0,s.o8)(this.normal),tangent:(0,s.o8)(this.tangent),color:(0,s.o8)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.o8)(this.position),normal:(0,s.o8)(this.normal),tangent:(0,s.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,o._)([(0,l.MZ)({json:{write:f.B}})],p.prototype,"color",void 0),(0,o._)([(0,u.w)("color")],p.prototype,"castColor",null),(0,o._)([(0,l.MZ)({nonNullable:!0,json:{write:f.B}})],p.prototype,"position",void 0),(0,o._)([(0,u.w)("position")],p.prototype,"castPosition",null),(0,o._)([(0,l.MZ)({json:{write:f.B}})],p.prototype,"uv",void 0),(0,o._)([(0,u.w)("uv")],p.prototype,"castUv",null),(0,o._)([(0,l.MZ)({json:{write:f.B}})],p.prototype,"normal",void 0),(0,o._)([(0,u.w)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,l.MZ)({json:{write:f.B}})],p.prototype,"tangent",void 0),(0,o._)([(0,u.w)("tangent")],p.prototype,"castTangent",null),p=r=(0,o._)([(0,c.$)("esri.geometry.support.MeshVertexAttributes")],p)},31199:(e,t,n)=>{function r(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function o(e,t,n,o,i){if(!e)return e;if(e instanceof t)return r(e,o,t,i);for(const s of n)if(e instanceof s)return r(new t(e),o,t,i);if(Array.isArray(e))return r(new t(e),o,t,i);{const r=n.map((e=>`'${e.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function i(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>i,b:()=>o})},63579:(e,t,n)=>{n.d(t,{Bq:()=>l,Qp:()=>a,WN:()=>x,dK:()=>v,eN:()=>y,fH:()=>m,in:()=>g,yr:()=>u});var r=n(78888),o=n(4576),i=n(74887),s=n(20557);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.aI)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.Te)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(e),t}}function u(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function c(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const f=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:n}=e;return f.test(t)||p.test(n)}return f.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){if(Array.isArray(e)){const n=e;return n.length>0&&n.every((e=>d(e,t)))}return d(e,t)}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(c(n)&&c(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function d(e,t){return e instanceof a&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},9318:(e,t,n)=>{n.d(t,{b:()=>i});var r=n(34727),o=n(97146);function i(e,t,n){const i=Array.isArray(e),c=i?e.length/t:e.byteLength/(4*t),f=i?e:new Uint32Array(e,0,c*t),p=n?.minReduction??0,h=n?.originalIndices||null,y=h?h.length:0,g=n?.componentOffsets||null;let d=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>d&&(d=t)}else d=c;const m=Math.floor(1.1*d)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let e=0;e<2*m;e++)u[e]=0;let x=0;const v=!!g&&!!h,A=v?y:c;let w=(0,o.my)(c);const M=new Uint32Array(y),T=1.96;let b=0!==p?Math.ceil(4*T*T/(p*p)*p*(1-p)):A,_=1,S=g?g[1]:A;for(let e=0;e<A;e++){if(e===b){const t=1-x/e;if(t+T*Math.sqrt(t*(1-t)/e)<p)return null;b*=2}if(e===S){for(let e=0;e<2*m;e++)u[e]=0;if(h)for(let e=g[_-1];e<g[_];e++)M[e]=w[h[e]];S=g[++_]}const n=v?h[e]:e,r=n*t,o=l(f,r,t);let i=o%m,a=x;for(;0!==u[2*i+1];){if(u[2*i]===o){const e=u[2*i+1]-1;if(s(f,r,e*t,t)){a=w[e];break}}i++,i>=m&&(i-=m)}a===x&&(u[2*i]=o,u[2*i+1]=n+1,x++),w[n]=a}if(0!==p&&1-x/c<p)return null;if(v){for(let e=g[_-1];e<M.length;e++)M[e]=w[h[e]];w=(0,o.uW)(M)}const R=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<A;e++)w[e]===x&&(a(f,(v?h[e]:e)*t,R,x*t,t),x++);if(h&&!v){const e=new Uint32Array(y);for(let t=0;t<e.length;t++)e[t]=w[h[t]];w=(0,o.uW)(e)}return{buffer:Array.isArray(R)?R:R.buffer,indices:w,uniqueCount:x}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},22141:(e,t,n)=>{n.d(t,{$5:()=>M,CN:()=>x,JP:()=>m,KM:()=>b,Mv:()=>S,X4:()=>v,gr:()=>w,qs:()=>T,si:()=>A,xA:()=>_});var r=n(34727),o=n(77690),i=n(29242),s=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(48353),f=n(9762),p=(n(79258),n(21325)),h=n(28735),y=n(13030),g=n(73354),d=n(65686);const m="Projection may be possible after calling projection.load().";function x(e,t,n,r){e.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${n.wkid}).${r?" ":""}${r}`)}function v(e,t,n,r,o,i){return E(C.TO_PCPF,y.xs.fromTypedArray(e),R.NORMAL,y.Xm.fromTypedArray(t),n,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i))?i:null}function A(e,t,n,r,o,i){return E(C.FROM_PCPF,y.xs.fromTypedArray(e),R.NORMAL,y.Xm.fromTypedArray(t),n,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i))?i:null}function w(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function M(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function T(e,t,n){return(0,o.Ge)(U,n),(0,g.b)(t,e,U),(0,r.or)(U)&&(0,g.n)(t,t),t}function b(e,t,n){return(0,o.z0)(U,n),(0,d.t)(t,e,U),(0,r.or)(U)&&(0,g.n)(t,t,4),t}function _(e,t,n,r,o,i){if(!E(C.TO_PCPF,y.xs.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),R.TANGENT,y.Xm.fromTypedArray(t),n,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}function S(e,t,n,r,o,i){if(!E(C.FROM_PCPF,y.xs.fromTypedArray(e,16),R.TANGENT,y.Xm.fromTypedArray(t),n,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i,16)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}var R,C,N;function B(e,t,n,r,i){switch((0,c.l)(r,n,F,r),e===C.FROM_PCPF&&(0,s.B8)(F,F),t){case R.NORMAL:return(0,o.Ge)(i,F);case R.TANGENT:return(0,o.z0)(i,F)}}function E(e,t,n,r,o,i,s,a){if(!t)return;const u=r.count;if(function(e){return e.isWGS84||(0,p.x1)(e)||(0,p.q8)(e)||(0,p.KQ)(e)}(o))for(let r=0;r<u;r++)i.getVec(r,Z),t.getVec(r,O),(0,l.q)(O,O,B(e,n,Z,s,U)),a.setVec(r,O);else for(let o=0;o<u;o++){i.getVec(o,Z),t.getVec(o,O);const u=(0,h.jg)(r.get(o,1));let c=Math.cos(u);n===R.TANGENT!=(e===C.TO_PCPF)&&(c=1/c),B(e,n,Z,s,U),e===C.TO_PCPF?(U[0]*=c,U[1]*=c,U[2]*=c,U[3]*=c,U[4]*=c,U[5]*=c):(U[0]*=c,U[3]*=c,U[6]*=c,U[1]*=c,U[4]*=c,U[7]*=c),(0,l.q)(O,O,U),(0,l.n)(O,O),a.setVec(o,O)}return a}(N=R||(R={}))[N.NORMAL=0]="NORMAL",N[N.TANGENT=1]="TANGENT",function(e){e[e.TO_PCPF=0]="TO_PCPF",e[e.FROM_PCPF=1]="FROM_PCPF"}(C||(C={}));const Z=(0,u.vt)(),O=(0,u.vt)(),F=(0,a.vt)(),U=(0,i.vt)()},72258:(e,t,n)=>{n.d(t,{UR:()=>w,p5:()=>A,xK:()=>R});var r=n(53966),o=n(34727),i=n(83047),s=n(77690),a=n(29242),l=n(58083),u=n(9093),c=n(38954),f=n(51850),p=n(98764),h=n(48353),y=n(65806),g=n(27615),d=n(21325),m=n(73354),x=n(22141);const v=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function A(e,t,{vertexSpace:n,spatialReference:r}){if("georeferenced"===n.type){const o=e;if(!(0,y.g)(t,o,r))return!1;const{origin:i}=n;return(0,c.d)(e,o,i),!0}const o=(0,p.lO)(r),i=e;if(!(0,y.g)(t,i,o))return!1;const{origin:s}=n,a=Z;if(!(0,h.l)(r,s,a,o))return!1;const u=(0,l.B8)(Z,a);return null!=u&&((0,c.t)(e,i,u),!0)}function w(e,t,n){const{vertexSpace:r,transform:o,vertexAttributes:i}=e,a=(0,g.Hq)(r)?o:null,f=_(e.spatialReference,n,O.SOURCE_AND_TARGET);if((0,g.yJ)(r,t)&&(!a||(0,l.t2)(a.localMatrix,u.zK))&&S(f)){const{position:e,normal:t,tangent:r}=i,o=n?.allowBufferReuse;return{position:o?e:e.slice(),normal:o?t:t?.slice(),tangent:o?r:r?.slice()}}switch(e.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const s=M(t,i);if(!(0,h.l)(t,r,C,s))return(0,x.CN)(v(),t,s),null;if(n&&(0,l.lw)(C,C,n.localMatrix),!(0,h.l)(t,o,N,s))return(0,x.CN)(v(),s,t),null;(0,l.B8)(N,N);const a=(0,l.lw)(C,N,C);return b(a,t,i,O.SOURCE_AND_TARGET),T(e,a)}(e,e.vertexSpace,t.origin,n):function({spatialReference:e,vertexAttributes:t,transform:n},{origin:r},o,i){const s=M(e,i);if(!(0,h.l)(e,r,C,s))return(0,x.CN)(v(),e,s),null;n&&(0,l.lw)(C,C,n.localMatrix),b(C,e,i,O.SOURCE);const a=new Float64Array(t.position.length),u=function(e,t,n,r,o){(0,m.t)(r,e,t);const i=new Float64Array(e.length);return(0,x.$5)(r,o,i,n)?i:((0,x.CN)(v(),o,n),null)}(t.position,C,e,a,s);if(!u)return null;const f=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.qs)(o,s,i),(0,x.si)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.normal,C);if(t.normal&&!f)return null;const p=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.KM)(o,s,i),(0,x.Mv)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.tangent,C);if(t.tangent&&!p)return null;if(o){const e=(0,c.v)(E,o);(0,m.a)(u,u,e)}return{position:u,normal:f,tangent:p}}(e,e.vertexSpace,t.origin,n);case"georeferenced":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const a=M(t,i);if(!(0,h.l)(t,o,C,a))return(0,x.CN)(v(),t,a),null;const u=1/_(t,i,O.TARGET);(0,l.hs)(C,C,[u,u,u]);const c=(0,l.B8)(N,C),{position:f,normal:p,tangent:y}=function(e,t,n){if(!t)return e;if(!n){const{position:n,normal:r,tangent:o}=e;return{position:(0,m.a)(new Float64Array(n.length),n,t),tangent:o,normal:r}}const r=T(e,n.localMatrix);return(0,m.a)(r.position,r.position,t),r}(e,r,n),g=new Float64Array(f.length),d=function(e,t,n,r,o){const i=(0,x.gr)(e,t,r,o);if(!i)return(0,x.CN)(v(),t,o),null;const s=new Float64Array(i.length);return(0,m.t)(s,i,n),s}(f,t,c,g,a);if(!d)return null;const A=(0,s.Ge)(B,c),w=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.X4)(e,t,n,r,o,a)?((0,m.b)(a,a,i),a):((0,x.CN)(v(),n,o),null)}(p,f,t,g,a,A,p!==e.normal?p:void 0);if(!w&&p)return null;const b=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.xA)(e,t,n,r,o,a)?((0,m.b)(a,a,i,4),a):((0,x.CN)(v(),n,o),null)}(y,f,t,g,a,A,y!==e.tangent?y:void 0);return!b&&y?null:{position:d,normal:w,tangent:b}}(e,e.vertexSpace,t.origin,n):function({vertexAttributes:e,transform:t,spatialReference:n},{origin:r},o,i){const s=_(n,i,O.SOURCE_AND_TARGET),a=r||!S(s)?(0,l.C)(C,t?.localMatrix??u.zK):null;a&&b(a,n,i,O.SOURCE_AND_TARGET);const{position:f,normal:p,tangent:h}=a?T(e,a):e,y=i?.allowBufferReuse,g=y?f:new Float64Array(f.length);let d=f;if(r&&(d=(0,m.a)(g,d,r)),o){const e=(0,c.v)(E,o);d=(0,m.a)(g,d,e)}return{position:d!==e.position||y?d:d.slice(),normal:p!==e.normal||y?p:p?.slice(),tangent:h!==e.tangent||y?h:h?.slice()}}(e,e.vertexSpace,t.origin,n)}}function M(e,t){return t?.useEllipsoid&&(0,d.B3)(e)?p.Y0:(0,p.lO)(e)}function T(e,t){const n=new Float64Array(e.position.length);(0,m.t)(n,e.position,t);const r=e.normal?new Float32Array(e.normal.length):null,o=e.tangent?new Float32Array(e.tangent.length):null;return r&&e.normal&&(0,x.qs)(e.normal,r,t),o&&e.tangent&&(0,x.KM)(e.tangent,o,t),{position:n,normal:r,tangent:o}}function b(e,t,n,r){const o=_(t,n,r);S(o)||(0,l.hs)(e,e,[o,o,o])}function _(e,t,n){const r=!!(n&O.SOURCE),o=!!(n&O.TARGET),i=t?.sourceUnit,s=t?.targetUnit;if(!i&&!s)return 1;let a=R(i,e);r||!i||S(a)||(v().warn("source unit conversion not supported"),a=1);let l=1/R(s,e);return o||!s||S(l)||(v().warn("target unit conversion not supported"),l=1),a*l}function S(e){return(0,o.Io)(e,1)}function R(e,t){if(null==e)return 1;const n=(0,i.KX)(t);return 1/(0,i.oU)(n,"meters",e)}const C=(0,u.vt)(),N=(0,u.vt)(),B=(0,a.vt)(),E=(0,f.vt)(),Z=(0,u.vt)();var O,F;(F=O||(O={}))[F.NONE=0]="NONE",F[F.SOURCE=1]="SOURCE",F[F.TARGET=2]="TARGET",F[F.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"},27615:(e,t,n)=>{n.d(t,{CK:()=>l,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(38954),o=n(86738),i=n(95696),s=n(18251);function a(e){return null!=e.origin}function l(e){return a(e.vertexSpace)}function u(e,t){if(!a(e))return null;const[n,r,i]=e.origin;return new o.A({x:n,y:r,z:i,spatialReference:t})}function c(e,t){const{x:n,y:r,z:o,spatialReference:a}=e,l=[n,r,o??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(a))?new s.A({origin:l}):new i.A({origin:l})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.p)(e.origin,t.origin))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4594],{65686:(t,n,e)=>{e.d(n,{a:()=>i,b:()=>c,l:()=>f,n:()=>u,t:()=>l});var r=e(40876),o=(e(44208),e(53966));function i(t,n,e){l(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function l(t,n,e,r=4,o=r){if(t.length/r!=n.length/o)return;const i=t.length/r,l=e[0],u=e[1],a=e[2],f=e[3],c=e[4],s=e[5],p=e[6],g=e[7],y=e[8];let d=0,A=0;for(let e=0;e<i;e++){const e=n[d],i=n[d+1],m=n[d+2],T=n[d+3];t[A]=l*e+f*i+p*m,t[A+1]=u*e+c*i+g*m,t[A+2]=a*e+s*i+y*m,t[A+3]=T,d+=o,A+=r}}function u(t,n){const e=Math.min(t.count,n.count),r=t.typedBuffer,o=t.typedBufferStride,i=n.typedBuffer,l=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*o,e=t*l,u=i[e],a=i[e+1],f=i[e+2],c=u*u+a*a+f*f;if(c>0){const t=1/Math.sqrt(c);r[n]=t*u,r[n+1]=t*a,r[n+2]=t*f}}}function a(t,n,e,r=4){const o=Math.min(t.length/r,n.count),i=n.typedBuffer,l=n.typedBufferStride;let u=0,a=0;for(let n=0;n<o;n++)t[a]=e*i[u],t[a+1]=e*i[u+1],t[a+2]=e*i[u+2],t[a+3]=e*i[u+3],u+=l,a+=r}function f(t,n,e,r){c(t.typedBuffer,n,e,r,t.typedBufferStride)}function c(t,n,e,o,i=4){const l=Math.min(t.length/i,n.count),u=n.typedBuffer,a=n.typedBufferStride;let f=0,c=0;const s=1/r.Tf;for(let n=0;n<l;n++)t[c]=o*(e*u[f])**s,t[c+1]=o*(e*u[f+1])**s,t[c+2]=o*(e*u[f+2])**s,t[c+3]=o*e*u[f+3],f+=a,c+=i}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:f,normalize:u,scale:a,scaleView:function(t,n,e){a(t.typedBuffer,n,e,t.typedBufferStride)},transformMat3:l,transformMat3View:i,transformMat4:function(t,n,e,r=4,i=r){if(t.length/r!=n.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const l=t.length/r,u=e[0],a=e[1],f=e[2],c=e[3],s=e[4],p=e[5],g=e[6],y=e[7],d=e[8],A=e[9],m=e[10],T=e[11],R=e[12],v=e[13],h=e[14],E=e[15];let N=0,C=0;for(let e=0;e<l;e++){const e=n[N],o=n[N+1],l=n[N+2],w=n[N+3];t[C]=u*e+s*o+d*l+R*w,t[C+1]=a*e+p*o+A*l+v*w,t[C+2]=f*e+g*o+m*l+h*w,t[C+3]=c*e+y*o+T*l+E*w,N+=i,C+=r}},transformMat4View:function(t,n,e){if(t.count!==n.count)return;const r=t.count,o=e[0],i=e[1],l=e[2],u=e[3],a=e[4],f=e[5],c=e[6],s=e[7],p=e[8],g=e[9],y=e[10],d=e[11],A=e[12],m=e[13],T=e[14],R=e[15],v=t.typedBuffer,h=t.typedBufferStride,E=n.typedBuffer,N=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*h,e=t*N,r=E[e],C=E[e+1],w=E[e+2],S=E[e+3];v[n]=o*r+a*C+p*w+A*S,v[n+1]=i*r+f*C+g*w+m*S,v[n+2]=l*r+c*C+y*w+T*S,v[n+3]=u*r+s*C+d*w+R*S}}},Symbol.toStringTag,{value:"Module"}))},74594:(t,n,e)=>{e.d(n,{projectMeshVertexPositions:()=>u});var r=e(9762),o=e(95696),i=e(21325),l=e(72258);function u(t,n){const e=(0,l.UR)(t,o.A.absolute);if(!e)return null;let u=e.position;return(0,i.aI)(t.spatialReference,n)||(u=new Float64Array(e.position.length),(0,r.projectBuffer)(e.position,t.spatialReference,0,u,n,0))?u:null}},22141:(t,n,e)=>{e.d(n,{$5:()=>E,CN:()=>T,JP:()=>m,KM:()=>C,Mv:()=>S,X4:()=>R,gr:()=>h,qs:()=>N,si:()=>v,xA:()=>w});var r=e(34727),o=e(77690),i=e(29242),l=e(58083),u=e(9093),a=e(38954),f=e(51850),c=e(48353),s=e(9762),p=(e(79258),e(21325)),g=e(28735),y=e(13030),d=e(73354),A=e(65686);const m="Projection may be possible after calling projection.load().";function T(t,n,e,r){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function R(t,n,e,r,o,i){return O(M.TO_PCPF,y.xs.fromTypedArray(t),x.NORMAL,y.Xm.fromTypedArray(n),e,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i))?i:null}function v(t,n,e,r,o,i){return O(M.FROM_PCPF,y.xs.fromTypedArray(t),x.NORMAL,y.Xm.fromTypedArray(n),e,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i))?i:null}function h(t,n,e,r){return(0,s.projectBuffer)(t,n,0,e,r,0)?e:null}function E(t,n,e,r){return(0,s.projectBuffer)(t,n,0,e,r,0)?e:null}function N(t,n,e){return(0,o.Ge)(b,e),(0,d.b)(n,t,b),(0,r.or)(b)&&(0,d.n)(n,n),n}function C(t,n,e){return(0,o.z0)(b,e),(0,A.t)(n,t,b),(0,r.or)(b)&&(0,d.n)(n,n,4),n}function w(t,n,e,r,o,i){if(!O(M.TO_PCPF,y.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),x.TANGENT,y.Xm.fromTypedArray(n),e,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}function S(t,n,e,r,o,i){if(!O(M.FROM_PCPF,y.xs.fromTypedArray(t,16),x.TANGENT,y.Xm.fromTypedArray(n),e,y.Xm.fromTypedArray(r),o,y.xs.fromTypedArray(i,16)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}var x,M,B;function F(t,n,e,r,i){switch((0,c.l)(r,e,G,r),t===M.FROM_PCPF&&(0,l.B8)(G,G),n){case x.NORMAL:return(0,o.Ge)(i,G);case x.TANGENT:return(0,o.z0)(i,G)}}function O(t,n,e,r,o,i,l,u){if(!n)return;const f=r.count;if(function(t){return t.isWGS84||(0,p.x1)(t)||(0,p.q8)(t)||(0,p.KQ)(t)}(o))for(let r=0;r<f;r++)i.getVec(r,_),n.getVec(r,P),(0,a.q)(P,P,F(t,e,_,l,b)),u.setVec(r,P);else for(let o=0;o<f;o++){i.getVec(o,_),n.getVec(o,P);const f=(0,g.jg)(r.get(o,1));let c=Math.cos(f);e===x.TANGENT!=(t===M.TO_PCPF)&&(c=1/c),F(t,e,_,l,b),t===M.TO_PCPF?(b[0]*=c,b[1]*=c,b[2]*=c,b[3]*=c,b[4]*=c,b[5]*=c):(b[0]*=c,b[3]*=c,b[6]*=c,b[1]*=c,b[4]*=c,b[7]*=c),(0,a.q)(P,P,b),(0,a.n)(P,P),u.setVec(o,P)}return u}(B=x||(x={}))[B.NORMAL=0]="NORMAL",B[B.TANGENT=1]="TANGENT",function(t){t[t.TO_PCPF=0]="TO_PCPF",t[t.FROM_PCPF=1]="FROM_PCPF"}(M||(M={}));const _=(0,f.vt)(),P=(0,f.vt)(),G=(0,u.vt)(),b=(0,i.vt)()},72258:(t,n,e)=>{e.d(n,{UR:()=>h,p5:()=>v,xK:()=>x});var r=e(53966),o=e(34727),i=e(83047),l=e(77690),u=e(29242),a=e(58083),f=e(9093),c=e(38954),s=e(51850),p=e(98764),g=e(48353),y=e(65806),d=e(27615),A=e(21325),m=e(73354),T=e(22141);const R=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function v(t,n,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=t;if(!(0,y.g)(n,o,r))return!1;const{origin:i}=e;return(0,c.d)(t,o,i),!0}const o=(0,p.lO)(r),i=t;if(!(0,y.g)(n,i,o))return!1;const{origin:l}=e,u=_;if(!(0,g.l)(r,l,u,o))return!1;const f=(0,a.B8)(_,u);return null!=f&&((0,c.t)(t,i,f),!0)}function h(t,n,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=t,u=(0,d.Hq)(r)?o:null,s=w(t.spatialReference,e,P.SOURCE_AND_TARGET);if((0,d.yJ)(r,n)&&(!u||(0,a.t2)(u.localMatrix,f.zK))&&S(s)){const{position:t,normal:n,tangent:r}=i,o=e?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?r:r?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const l=E(n,i);if(!(0,g.l)(n,r,M,l))return(0,T.CN)(R(),n,l),null;if(e&&(0,a.lw)(M,M,e.localMatrix),!(0,g.l)(n,o,B,l))return(0,T.CN)(R(),l,n),null;(0,a.B8)(B,B);const u=(0,a.lw)(M,B,M);return C(u,n,i,P.SOURCE_AND_TARGET),N(t,u)}(t,t.vertexSpace,n.origin,e):function({spatialReference:t,vertexAttributes:n,transform:e},{origin:r},o,i){const l=E(t,i);if(!(0,g.l)(t,r,M,l))return(0,T.CN)(R(),t,l),null;e&&(0,a.lw)(M,M,e.localMatrix),C(M,t,i,P.SOURCE);const u=new Float64Array(n.position.length),f=function(t,n,e,r,o){(0,m.t)(r,t,n);const i=new Float64Array(t.length);return(0,T.$5)(r,o,i,e)?i:((0,T.CN)(R(),o,e),null)}(n.position,M,t,u,l);if(!f)return null;const s=function(t,n,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,T.qs)(o,l,i),(0,T.si)(l,t,n,e,r,l)?l:((0,T.CN)(R(),r,n),null)}(f,t,u,l,n.normal,M);if(n.normal&&!s)return null;const p=function(t,n,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,T.KM)(o,l,i),(0,T.Mv)(l,t,n,e,r,l)?l:((0,T.CN)(R(),r,n),null)}(f,t,u,l,n.tangent,M);if(n.tangent&&!p)return null;if(o){const t=(0,c.v)(O,o);(0,m.a)(f,f,t)}return{position:f,normal:s,tangent:p}}(t,t.vertexSpace,n.origin,e);case"georeferenced":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const u=E(n,i);if(!(0,g.l)(n,o,M,u))return(0,T.CN)(R(),n,u),null;const f=1/w(n,i,P.TARGET);(0,a.hs)(M,M,[f,f,f]);const c=(0,a.B8)(B,M),{position:s,normal:p,tangent:y}=function(t,n,e){if(!n)return t;if(!e){const{position:e,normal:r,tangent:o}=t;return{position:(0,m.a)(new Float64Array(e.length),e,n),tangent:o,normal:r}}const r=N(t,e.localMatrix);return(0,m.a)(r.position,r.position,n),r}(t,r,e),d=new Float64Array(s.length),A=function(t,n,e,r,o){const i=(0,T.gr)(t,n,r,o);if(!i)return(0,T.CN)(R(),n,o),null;const l=new Float64Array(i.length);return(0,m.t)(l,i,e),l}(s,n,c,d,u);if(!A)return null;const v=(0,l.Ge)(F,c),h=function(t,n,e,r,o,i,l){if(null==t)return null;const u=l??new Float32Array(t.length);return(0,T.X4)(t,n,e,r,o,u)?((0,m.b)(u,u,i),u):((0,T.CN)(R(),e,o),null)}(p,s,n,d,u,v,p!==t.normal?p:void 0);if(!h&&p)return null;const C=function(t,n,e,r,o,i,l){if(null==t)return null;const u=l??new Float32Array(t.length);return(0,T.xA)(t,n,e,r,o,u)?((0,m.b)(u,u,i,4),u):((0,T.CN)(R(),e,o),null)}(y,s,n,d,u,v,y!==t.tangent?y:void 0);return!C&&y?null:{position:A,normal:h,tangent:C}}(t,t.vertexSpace,n.origin,e):function({vertexAttributes:t,transform:n,spatialReference:e},{origin:r},o,i){const l=w(e,i,P.SOURCE_AND_TARGET),u=r||!S(l)?(0,a.C)(M,n?.localMatrix??f.zK):null;u&&C(u,e,i,P.SOURCE_AND_TARGET);const{position:s,normal:p,tangent:g}=u?N(t,u):t,y=i?.allowBufferReuse,d=y?s:new Float64Array(s.length);let A=s;if(r&&(A=(0,m.a)(d,A,r)),o){const t=(0,c.v)(O,o);A=(0,m.a)(d,A,t)}return{position:A!==t.position||y?A:A.slice(),normal:p!==t.normal||y?p:p?.slice(),tangent:g!==t.tangent||y?g:g?.slice()}}(t,t.vertexSpace,n.origin,e)}}function E(t,n){return n?.useEllipsoid&&(0,A.B3)(t)?p.Y0:(0,p.lO)(t)}function N(t,n){const e=new Float64Array(t.position.length);(0,m.t)(e,t.position,n);const r=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return r&&t.normal&&(0,T.qs)(t.normal,r,n),o&&t.tangent&&(0,T.KM)(t.tangent,o,n),{position:e,normal:r,tangent:o}}function C(t,n,e,r){const o=w(n,e,r);S(o)||(0,a.hs)(t,t,[o,o,o])}function w(t,n,e){const r=!!(e&P.SOURCE),o=!!(e&P.TARGET),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let u=x(i,t);r||!i||S(u)||(R().warn("source unit conversion not supported"),u=1);let a=1/x(l,t);return o||!l||S(a)||(R().warn("target unit conversion not supported"),a=1),u*a}function S(t){return(0,o.Io)(t,1)}function x(t,n){if(null==t)return 1;const e=(0,i.KX)(n);return 1/(0,i.oU)(e,"meters",t)}const M=(0,f.vt)(),B=(0,f.vt)(),F=(0,u.vt)(),O=(0,s.vt)(),_=(0,f.vt)();var P,G;(G=P||(P={}))[G.NONE=0]="NONE",G[G.SOURCE=1]="SOURCE",G[G.TARGET=2]="TARGET",G[G.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"},27615:(t,n,e)=>{e.d(n,{CK:()=>a,Hq:()=>u,MW:()=>f,TE:()=>c,yJ:()=>s});var r=e(38954),o=e(86738),i=e(95696),l=e(18251);function u(t){return null!=t.origin}function a(t){return u(t.vertexSpace)}function f(t,n){if(!u(t))return null;const[e,r,i]=t.origin;return new o.A({x:e,y:r,z:i,spatialReference:n})}function c(t,n){const{x:e,y:r,z:o,spatialReference:u}=t,a=[e,r,o??0];return"local"===(n?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(u))?new l.A({origin:a}):new i.A({origin:a})}function s(t,n){return t.type===n.type&&(t.origin===n.origin||null!=t.origin&&null!=n.origin&&(0,r.p)(t.origin,n.origin))}}}]);
@@ -2,14 +2,14 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{terrainDepthTest as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{FloatPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as g}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as p}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as v}from"../views/webgl/ShaderBuilder.js";function c(c){const u=new v,{vertex:m,fragment:w}=u;return n(m,c),u.include(i,c),u.include(t,c),u.fragment.include(r,c),u.include(o,c),u.include(p,c),u.attributes.add(g.POSITION,"vec3"),u.attributes.add(g.UV0,"vec2"),c.perspectiveInterpolation&&u.attributes.add(g.PERSPECTIVEDIVIDE,"float"),u.varyings.add("vpos","vec3"),m.main.add(l`
5
+ import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{terrainDepthTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as d,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as m}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as v}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{NoParameters as c}from"../views/webgl/NoParameters.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class u extends c{}function w(c){const u=new p,{vertex:w,fragment:b}=u,{output:f,perspectiveInterpolation:h}=c;return a(w,c),u.include(i,c),u.include(s,c),u.fragment.include(r,c),u.include(o,c),u.include(v,c),u.attributes.add(m.POSITION,"vec3"),u.attributes.add(m.UV0,"vec2"),h&&u.attributes.add(m.PERSPECTIVEDIVIDE,"float"),w.main.add(d`
6
6
  vpos = position;
7
7
  forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
8
8
  vTexCoord = uv0;
9
9
  gl_Position = transformPosition(proj, view, vpos);
10
- ${c.perspectiveInterpolation?"gl_Position *= perspectiveDivide;":""}`),w.uniforms.add(new a("tex",(e=>e.texture)),new d("opacity",(e=>e.opacity))),u.varyings.add("vTexCoord","vec2"),w.include(s),w.main.add(l`
10
+ ${n(h,"gl_Position *= perspectiveDivide;")}`),u.varyings.add("vpos","vec3"),u.varyings.add("vTexCoord","vec2"),b.include(t),b.uniforms.add(new l("opacity",(e=>e.opacity)),new g("tex",(e=>e.texture))).main.add(d`
11
11
  discardBySlice(vpos);
12
12
  discardByTerrainDepth();
13
- ${c.output===e.ObjectAndLayerIdColor?"fragColor = vec4(0, 0, 0, 1);\n return;":""}
13
+ ${n(f===e.ObjectAndLayerIdColor,"fragColor = vec4(0, 0, 0, 1); return;")}
14
14
  vec4 finalColor = texture(tex, vTexCoord) * opacity;
15
- outputColorHighlightOID(finalColor, vpos);`),u}const u=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{u as I,c as b};
15
+ outputColorHighlightOID(finalColor, vpos);`),u}const b=Object.freeze(Object.defineProperty({__proto__:null,ImageMaterialPassParameters:u,build:w},Symbol.toStringTag,{value:"Module"}));export{b as I,u as a,w as b};
package/geometry/Mesh.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import r from"../core/Error.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import n from"../core/Promise.js";import{throwIfAborted as i,whenOrAbort as a}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as m}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"./Geometry.js";import u from"./Point.js";import d from"./Polygon.js";import{create as f,fromBuffer as x,zero as y}from"./support/aaBoundingBox.js";import{composeAxes as v,create as g}from"./support/axisAngleDegrees.js";import j from"./support/MeshComponent.js";import{componentNotFoundMessage as w,meshNotLoadedMessage as S,invalidLocationMessage as b,invalidPolygonMessage as M,InvalidLocationError as A}from"./support/meshErrors.js";import L from"./support/MeshGeoreferencedVertexSpace.js";import F from"./support/MeshLocalVertexSpace.js";import R from"./support/MeshTransform.js";import{MeshVertexAttributes as C}from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as _,isRelativeVertexSpace as U,selectVertexSpace as P}from"./support/meshVertexSpaceUtils.js";import{triangulate as E}from"./support/triangulationUtils.js";import{centerAt as B}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as G}from"./support/meshUtils/extent.js";import{loadExternal as k}from"./support/meshUtils/loadExternal.js";import{Metadata as I}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as T,createUnitSizeBox as V,extractSingleFaceOfBox as O,createUnitSizeSphere as z,createUnitSizeCylinder as D,convertPlaneSizeParameter as N,createUnitSizePlane as W}from"./support/meshUtils/primitives.js";import{rotate as Z}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";var H;const K="esri.geometry.Mesh";function J(){return s.getLogger(K)}const Q={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:L,local:F}};let X=H=class extends(o.LoadableMixin(n.EsriPromiseMixin(h))){constructor(e){super(e),this.components=null,this.vertexSpace=new L,this.transform=null,this.metadata=new I,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles(c((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,r=this;return G({get transform(){return r.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?f(y):x(e)}get origin(){const e=_(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(j.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}J().error("removeComponent()",w)}}rotate(e,t,r,o){return v(e,t,r,Y),Z(this,Y,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(U(o)){const[s,n,i]=o.origin;o.origin=m(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(q(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(B(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(k(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneAndModifyVertexAttributes(this.vertexAttributes.clone(),this.vertexSpace.clone(),{preserveMetadata:!0})}cloneAndModifyVertexAttributes(e,t,r){let o=null;if(this.components){const e=new Map,t=new Map;o=this.components.map((r=>r.cloneWithDeduplication(e,t)))}const s={components:o,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:this.transform?.clone()??null,metadata:r?.preserveMetadata?this.metadata.clone():new I};return new H(s)}cloneShallow(){return new H({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([import("./support/meshUtils/exporters/gltf/gltfexport.js"),this.load(e)]);return i(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce(((e,t)=>e+t.memoryUsage),this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(J().error(e,S),!1)}static createBox(e,t){if(!(e instanceof u))return J().error(".createBox()",b),null;const r=new H(T(V(),e,t));return t?.imageFace&&"all"!==t.imageFace?O(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new H(T(z(t?.densificationFactor||0),e,t)):(J().error(".createSphere()",b),null)}static createCylinder(e,t){return e instanceof u?new H(T(D(t?.densificationFactor||0),e,t)):(J().error(".createCylinder()",b),null)}static createPlane(e,t){if(!(e instanceof u))return J().error(".createPlane()",b),null;const r=t?.facing??"up",o=N(r,t?.size);return new H(T(W(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof d))return J().error(".createFromPolygon()",M),null;const r=E(e);return new H({vertexAttributes:new C({position:r.position}),components:[new j({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new L})}static async createFromGLTF(e,t,r){if(!(e instanceof u)){const e=new A;throw J().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await a(import("./support/meshUtils/loadGLTFMesh.js"),r);return new H(await o(e,t,r))}static async createFromFiles(e,o,s){t(J(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"});const n=e=>J().error(".createFromFiles()",e.message);if(!(e instanceof u)){const e=new A;throw n(e),e}if(!s?.layer)throw new r("invalid:no-layer","SceneLayer required for file to mesh conversion.");return s.layer.convertMesh(o,{location:e,...s})}static createWithExternalSource(e,t,r){const o=r?.extent??null,{spatialReference:s}=e,n=r?.transform?.clone()??new R,i=P(e,r),a=r?.unitConversionDisabled,c={source:t,extent:o,unitConversionDisabled:a},p=new I;return p.externalSources.push(c),new H({metadata:p,transform:n,vertexSpace:i,spatialReference:s})}static createIncomplete(e,t){const{spatialReference:o}=e,s=t?.transform?.clone()??new R,n=P(e,t),i=new H({transform:s,vertexSpace:n,spatialReference:o});return i.addResolvingPromise(Promise.reject(new r("mesh-incomplete","Mesh resources are not complete"))),i}};e([p({type:[j],json:{write:!0}})],X.prototype,"components",void 0),e([p({nonNullable:!0,types:Q,constructOnly:!0,json:{write:!0}})],X.prototype,"vertexSpace",void 0),e([p({type:R,json:{write:!0}})],X.prototype,"transform",void 0),e([p({constructOnly:!0})],X.prototype,"metadata",void 0),e([p()],X.prototype,"hasExtent",null),e([p()],X.prototype,"_transformedExtent",null),e([p()],X.prototype,"_untransformedBounds",null),e([p()],X.prototype,"origin",null),e([p({readOnly:!0,json:{read:!1}})],X.prototype,"extent",null),e([p({readOnly:!0,json:{read:!1,write:!0,default:!0}})],X.prototype,"hasZ",void 0),e([p({readOnly:!0,json:{read:!1,write:!0,default:!1}})],X.prototype,"hasM",void 0),e([p({type:C,nonNullable:!0,json:{write:!0}})],X.prototype,"vertexAttributes",void 0),X=H=e([l(K)],X);const Y=g(),$=X;export{$ as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import r from"../core/Loadable.js";import o from"../core/Logger.js";import s from"../core/Promise.js";import{throwIfAborted as n,whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as m}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"./Geometry.js";import u from"./Point.js";import h from"./Polygon.js";import{create as d,fromBuffer as f,zero as x}from"./support/aaBoundingBox.js";import{composeAxes as y,create as v}from"./support/axisAngleDegrees.js";import g from"./support/MeshComponent.js";import{componentNotFoundMessage as j,meshNotLoadedMessage as w,invalidLocationMessage as S,invalidPolygonMessage as b,InvalidLocationError as A}from"./support/meshErrors.js";import M from"./support/MeshGeoreferencedVertexSpace.js";import L from"./support/MeshLocalVertexSpace.js";import R from"./support/MeshTransform.js";import{MeshVertexAttributes as C}from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as _,isRelativeVertexSpace as F,selectVertexSpace as U}from"./support/meshVertexSpaceUtils.js";import{triangulate as P}from"./support/triangulationUtils.js";import{centerAt as E}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as B}from"./support/meshUtils/extent.js";import{loadExternal as G}from"./support/meshUtils/loadExternal.js";import{Metadata as k}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as I,createUnitSizeBox as T,extractSingleFaceOfBox as V,createUnitSizeSphere as O,createUnitSizeCylinder as z,convertPlaneSizeParameter as D,createUnitSizePlane as N}from"./support/meshUtils/primitives.js";import{rotate as W}from"./support/meshUtils/rotate.js";import{scale as Z}from"./support/meshUtils/scale.js";var H;const K="esri.geometry.Mesh";function q(){return o.getLogger(K)}const J={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:M,local:L}};let Q=H=class extends(r.LoadableMixin(s.EsriPromiseMixin(l))){constructor(e){super(e),this.components=null,this.vertexSpace=new M,this.transform=null,this.metadata=new k,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,r=this;return B({get transform(){return r.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?d(x):f(e)}get origin(){const e=_(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(g.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}q().error("removeComponent()",j)}}rotate(e,t,r,o){return y(e,t,r,X),W(this,X,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(F(o)){const[s,n,i]=o.origin;o.origin=m(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(Z(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(E(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(G(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneAndModifyVertexAttributes(this.vertexAttributes.clone(),this.vertexSpace.clone(),{preserveMetadata:!0})}cloneAndModifyVertexAttributes(e,t,r){let o=null;if(this.components){const e=new Map,t=new Map;o=this.components.map((r=>r.cloneWithDeduplication(e,t)))}const s={components:o,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:this.transform?.clone()??null,metadata:r?.preserveMetadata?this.metadata.clone():new k};return new H(s)}cloneShallow(){return new H({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([import("./support/meshUtils/exporters/gltf/gltfexport.js"),this.load(e)]);return n(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce(((e,t)=>e+t.memoryUsage),this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(q().error(e,w),!1)}static createBox(e,t){if(!(e instanceof u))return q().error(".createBox()",S),null;const r=new H(I(T(),e,t));return t?.imageFace&&"all"!==t.imageFace?V(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new H(I(O(t?.densificationFactor||0),e,t)):(q().error(".createSphere()",S),null)}static createCylinder(e,t){return e instanceof u?new H(I(z(t?.densificationFactor||0),e,t)):(q().error(".createCylinder()",S),null)}static createPlane(e,t){if(!(e instanceof u))return q().error(".createPlane()",S),null;const r=t?.facing??"up",o=D(r,t?.size);return new H(I(N(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof h))return q().error(".createFromPolygon()",b),null;const r=P(e);return new H({vertexAttributes:new C({position:r.position}),components:[new g({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new M})}static async createFromGLTF(e,t,r){if(!(e instanceof u)){const e=new A;throw q().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await i(import("./support/meshUtils/loadGLTFMesh.js"),r);return new H(await o(e,t,r))}static createWithExternalSource(e,t,r){const o=r?.extent??null,{spatialReference:s}=e,n=r?.transform?.clone()??new R,i=U(e,r),a=r?.unitConversionDisabled,c={source:t,extent:o,unitConversionDisabled:a},p=new k;return p.externalSources.push(c),new H({metadata:p,transform:n,vertexSpace:i,spatialReference:s})}static createIncomplete(e,r){const{spatialReference:o}=e,s=r?.transform?.clone()??new R,n=U(e,r),i=new H({transform:s,vertexSpace:n,spatialReference:o});return i.addResolvingPromise(Promise.reject(new t("mesh-incomplete","Mesh resources are not complete"))),i}};e([c({type:[g],json:{write:!0}})],Q.prototype,"components",void 0),e([c({nonNullable:!0,types:J,constructOnly:!0,json:{write:!0}})],Q.prototype,"vertexSpace",void 0),e([c({type:R,json:{write:!0}})],Q.prototype,"transform",void 0),e([c({constructOnly:!0})],Q.prototype,"metadata",void 0),e([c()],Q.prototype,"hasExtent",null),e([c()],Q.prototype,"_transformedExtent",null),e([c()],Q.prototype,"_untransformedBounds",null),e([c()],Q.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],Q.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Q.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Q.prototype,"hasM",void 0),e([c({type:C,nonNullable:!0,json:{write:!0}})],Q.prototype,"vertexAttributes",void 0),Q=H=e([p(K)],Q);const X=v(),Y=Q;export{Y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{nativeArrayMaxSize as r,isTypedArray as n}from"../../core/typedArrayUtil.js";function t(t){if(Array.isArray(t)){if(t.length<r)return t}else if(t.length<r)return Array.from(t);let i=!0,f=!0;return t.some(((r,n)=>(i=i&&0===r,f=f&&r===n,!i&&!f))),i?w(t.length):f?o(t.length):n(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:e(t)}function e(r){let t=!0;for(const e of r){if(e>=65536)return n(r)?r:new Uint32Array(r);e>=256&&(t=!1)}return t?new Uint8Array(r):new Uint16Array(r)}function i(n){return n<=r?new Array(n):n<=65536?new Uint16Array(n):new Uint32Array(n)}function f(n){return n<=r?new Array(n):new Uint32Array(n)}let a=A(131072);const u=[0],y=(()=>{const r=new Uint16Array(65536);for(let n=0;n<r.length;++n)r[n]=n;return r})();function o(n){return 1===n?u:n<r?Array.from(new Uint16Array(y.buffer,0,n)):n<y.length?new Uint16Array(y.buffer,0,n):(n>a.length&&(a=A(Math.max(2*a.length,n))),new Uint32Array(a.buffer,0,n))}function A(r){const n=new Uint32Array(r);for(let t=0;t<n.length;t++)n[t]=t;return n}let l=new Uint8Array(65536);function w(n){if(1===n)return u;if(n<r)return new Array(n).fill(0);if(n>l.length){const r=Math.max(2*l.length,n);l=new Uint8Array(r)}return new Uint8Array(l.buffer,0,n)}function U(){a=A(131072),l=new Uint8Array(65536)}export{t as compactIndices,o as getContinuousIndexArray,w as getZeroIndexArray,i as newIndexArray,f as newIntArray,U as pruneIndexArrays};
5
+ import{nativeArrayMaxSize as r,isTypedArray as n}from"../../core/typedArrayUtil.js";function t(r){return e(r,!0)}function e(t,e){if(Array.isArray(t)){if(t.length<r)return t}else if(t.length<r)return Array.from(t);let f=!0,a=!0;return t.some(((r,n)=>(f=f&&0===r,a=a&&r===n,!f&&!a))),f?U(t.length):a?A(t.length):n(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:i(t,!e)}function i(r,t){for(const e of r){if(e>=65536)return n(r)?r:new Uint32Array(r);e>=256&&(t=!1)}return t?new Uint8Array(r):new Uint16Array(r)}function f(n){return n<=r?new Array(n):n<=65536?new Uint16Array(n):new Uint32Array(n)}function a(n){return n<=r?new Array(n):new Uint32Array(n)}let u=l(131072);const o=[0],y=(()=>{const r=new Uint16Array(65536);for(let n=0;n<r.length;++n)r[n]=n;return r})();function A(n){return 1===n?o:n<r?Array.from(new Uint16Array(y.buffer,0,n)):n<y.length?new Uint16Array(y.buffer,0,n):(n>u.length&&(u=l(Math.max(2*u.length,n))),new Uint32Array(u.buffer,0,n))}function l(r){const n=new Uint32Array(r);for(let t=0;t<n.length;t++)n[t]=t;return n}let w=new Uint8Array(65536);function U(n){if(1===n)return o;if(n<r)return new Array(n).fill(0);if(n>w.length){const r=Math.max(2*w.length,n);w=new Uint8Array(r)}return new Uint8Array(w.buffer,0,n)}function c(){u=l(131072),w=new Uint8Array(65536)}export{e as compactIndices,t as compactMeshIndices,A as getContinuousIndexArray,U as getZeroIndexArray,f as newIndexArray,a as newIntArray,c as pruneIndexArrays};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{nextHighestPowerOfTwo as t}from"../../../core/mathUtils.js";import{newIndexArray as n,compactIndices as r}from"../Indices.js";function e(e,s,u){const c=Array.isArray(e),a=c?e.length/s:e.byteLength/(4*s),h=c?e:new Uint32Array(e,0,a*s),y=u?.minReduction??0,A=u?.originalIndices||null,g=A?A.length:0,m=u?.componentOffsets||null;let w=0;if(m)for(let t=0;t<m.length-1;t++){const n=m[t+1]-m[t];n>w&&(w=n)}else w=a;const U=Math.floor(1.1*w)+1;(null==i||i.length<2*U)&&(i=new Uint32Array(t(2*U)));for(let t=0;t<2*U;t++)i[t]=0;let b=0;const d=!!m&&!!A,p=d?g:a;let M=n(a);const j=new Uint32Array(g),q=1.96;let I=0!==y?Math.ceil(4*q*q/(y*y)*y*(1-y)):p,k=1,x=m?m[1]:p;for(let t=0;t<p;t++){if(t===I){const n=1-b/t;if(n+q*Math.sqrt(n*(1-n)/t)<y)return null;I*=2}if(t===x){for(let t=0;t<2*U;t++)i[t]=0;if(A)for(let t=m[k-1];t<m[k];t++)j[t]=M[A[t]];x=m[++k]}const n=d?A[t]:t,r=n*s,e=f(h,r,s);let o=e%U,u=b;for(;0!==i[2*o+1];){if(i[2*o]===e){const t=i[2*o+1]-1;if(l(h,r,t*s,s)){u=M[t];break}}o++,o>=U&&(o-=U)}u===b&&(i[2*o]=e,i[2*o+1]=n+1,b++),M[n]=u}if(0!==y&&1-b/a<y)return null;if(d){for(let t=m[k-1];t<j.length;t++)j[t]=M[A[t]];M=r(j)}const C=c?new Array(b):new Uint32Array(b*s);b=0;for(let t=0;t<p;t++)if(M[t]===b){o(h,(d?A[t]:t)*s,C,b*s,s),b++}if(A&&!d){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=M[A[n]];M=r(t)}return{buffer:Array.isArray(C)?C:C.buffer,indices:M,uniqueCount:b}}function l(t,n,r,e){for(let l=0;l<e;l++)if(t[n+l]!==t[r+l])return!1;return!0}function o(t,n,r,e,l){for(let o=0;o<l;o++)r[e+o]=t[n+o]}function f(t,n,r){let e=0;for(let l=0;l<r;l++)e=t[n+l]+e|0,e=e+(e<<11)+(e>>>2)|0;return e>>>0}let i=null;export{e as deduplicate};
5
+ import{nextHighestPowerOfTwo as t}from"../../../core/mathUtils.js";import{newIndexArray as n,compactMeshIndices as r}from"../Indices.js";function e(e,s,u){const c=Array.isArray(e),a=c?e.length/s:e.byteLength/(4*s),h=c?e:new Uint32Array(e,0,a*s),y=u?.minReduction??0,A=u?.originalIndices||null,g=A?A.length:0,m=u?.componentOffsets||null;let w=0;if(m)for(let t=0;t<m.length-1;t++){const n=m[t+1]-m[t];n>w&&(w=n)}else w=a;const U=Math.floor(1.1*w)+1;(null==i||i.length<2*U)&&(i=new Uint32Array(t(2*U)));for(let t=0;t<2*U;t++)i[t]=0;let b=0;const d=!!m&&!!A,p=d?g:a;let M=n(a);const j=new Uint32Array(g),q=1.96;let I=0!==y?Math.ceil(4*q*q/(y*y)*y*(1-y)):p,k=1,x=m?m[1]:p;for(let t=0;t<p;t++){if(t===I){const n=1-b/t;if(n+q*Math.sqrt(n*(1-n)/t)<y)return null;I*=2}if(t===x){for(let t=0;t<2*U;t++)i[t]=0;if(A)for(let t=m[k-1];t<m[k];t++)j[t]=M[A[t]];x=m[++k]}const n=d?A[t]:t,r=n*s,e=f(h,r,s);let o=e%U,u=b;for(;0!==i[2*o+1];){if(i[2*o]===e){const t=i[2*o+1]-1;if(l(h,r,t*s,s)){u=M[t];break}}o++,o>=U&&(o-=U)}u===b&&(i[2*o]=e,i[2*o+1]=n+1,b++),M[n]=u}if(0!==y&&1-b/a<y)return null;if(d){for(let t=m[k-1];t<j.length;t++)j[t]=M[A[t]];M=r(j)}const C=c?new Array(b):new Uint32Array(b*s);b=0;for(let t=0;t<p;t++)if(M[t]===b){o(h,(d?A[t]:t)*s,C,b*s,s),b++}if(A&&!d){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=M[A[n]];M=r(t)}return{buffer:Array.isArray(C)?C:C.buffer,indices:M,uniqueCount:b}}function l(t,n,r,e){for(let l=0;l<e;l++)if(t[n+l]!==t[r+l])return!1;return!0}function o(t,n,r,e,l){for(let o=0;o<l;o++)r[e+o]=t[n+o]}function f(t,n,r){let e=0;for(let l=0;l<r;l++)e=t[n+l]+e|0,e=e+(e<<11)+(e>>>2)|0;return e>>>0}let i=null;export{e as deduplicate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{deprecated as e}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{p as n}from"../../chunks/vec32.js";import o from"../Point.js";import i from"./MeshGeoreferencedVertexSpace.js";import t from"./MeshLocalVertexSpace.js";function c(){return r.getLogger("esri.geometry.Mesh")}function p(e){return null==e.origin}function g(e){return null!=e.origin}function a(e){return g(e.vertexSpace)}function u(e,r){if(!g(e))return null;const[n,i,t]=e.origin;return new o({x:n,y:i,z:t,spatialReference:r})}function l(r,n){const{x:o,y:p,z:g,spatialReference:a}=r,u=[o,p,g??0];void 0!==n?.geographic&&(e(c(),"option: geographic",{replacement:"Use the `vertexSpace` option instead.",version:"4.29",warnOnce:!0}),n.vertexSpace&&c().warn("Deprecated geographic flag ignored since vertexSpace option is provided."));return"local"===(n?.vertexSpace??f(n?.geographic)??s(a))?new t({origin:u}):new i({origin:u})}function s(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function f(e){return null==e?void 0:e?"local":"georeferenced"}function m(e,r){return e.type===r.type&&(e.origin===r.origin||null!=e.origin&&null!=r.origin&&n(e.origin,r.origin))}export{p as isAbsoluteVertexSpace,a as isMeshWithRelativeVertexSpace,g as isRelativeVertexSpace,l as selectVertexSpace,m as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
5
+ import{p as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function p(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,p as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{e as n}from"../../chunks/earcut.js";import{Axis as t}from"./Axis.js";import{isClockwise as e}from"./coordsUtils.js";import{doubleSubArray as o,doubleArrayFrom as r,newDoubleArray as s}from"./DoubleArray.js";import{compactIndices as i}from"./Indices.js";import{leastSignificantAxis as l}from"./polygonUtils.js";import{deduplicate as c}from"./meshUtils/deduplicate.js";function f(t){const e=a(t.rings,t.hasZ,p.CCW_IS_HOLE,t.spatialReference),s=new Array;let l=0,f=0;for(const r of e.polygons){const t=r.count,c=r.index,h=o(e.position,3*c,3*t),a=r.holeIndices.map((n=>n-c)),g=i(n(h,a,3));s.push({position:h,faces:g}),l+=h.length,f+=g.length}const g=h(s,l,f),u=Array.isArray(g.position)?c(g.position,3,{originalIndices:g.faces}):c(g.position.buffer,6,{originalIndices:g.faces});return g.position=r(new Float64Array(u.buffer)),g.faces=u.indices,g}function h(n,t,e){if(1===n.length)return n[0];const o=s(t),r=new Array(e);let l=0,c=0,f=0;for(const s of n){for(let n=0;n<s.position.length;n++)o[l++]=s.position[n];for(const n of s.faces)r[c++]=n+f;f=l/3}return{position:o,faces:i(r)}}function a(n,t,e,o){const r=n.length,i=new Array(r),l=new Array(r),c=new Array(r);let f=0;for(let s=0;s<r;++s)f+=n[s].length;let h=0,a=0,m=0;const d=s(3*f);let y=0;for(let s=r-1;s>=0;s--){const f=n[s],A=e===p.CCW_IS_HOLE&&u(f,t,o);if(A&&1!==r)i[h++]=f;else{let n=f.length;for(let t=0;t<h;++t)n+=i[t].length;const e={index:y,pathLengths:new Array(h+1),count:n,holeIndices:new Array(h)};e.pathLengths[0]=f.length,f.length>0&&(c[m++]={index:y,count:f.length}),y=A?g(f,f.length-1,-1,d,y,f.length,t):g(f,0,1,d,y,f.length,t);for(let o=0;o<h;++o){const n=i[o];e.holeIndices[o]=y,e.pathLengths[o+1]=n.length,n.length>0&&(c[m++]={index:y,count:n.length}),y=g(n,0,1,d,y,n.length,t)}h=0,e.count>0&&(l[a++]=e)}}for(let s=0;s<h;++s){const n=i[s];n.length>0&&(c[m++]={index:y,count:n.length}),y=g(n,0,1,d,y,n.length,t)}return l.length=a,c.length=m,{position:d,polygons:l,outlines:c}}function g(n,t,e,o,r,s,i){r*=3;for(let l=0;l<s;++l){const s=n[t];o[r++]=s[0],o[r++]=s[1],o[r++]=i&&s[2]?s[2]:0,t+=e}return r/3}function u(n,o,r){if(!o)return!e(n);const s=n.length-1;switch(l(n,s,r)){case t.X:return!e(n,t.Y,t.Z);case t.Y:return!e(n,t.X,t.Z);case t.Z:return!e(n,t.X,t.Y)}}var p;!function(n){n[n.NONE=0]="NONE",n[n.CCW_IS_HOLE=1]="CCW_IS_HOLE"}(p||(p={}));export{p as CounterClockwiseMode,u as isCounterClockwise,a as ringsToTriangulationInfo,f as triangulate};
5
+ import{e as n}from"../../chunks/earcut.js";import{Axis as t}from"./Axis.js";import{isClockwise as e}from"./coordsUtils.js";import{doubleSubArray as o,doubleArrayFrom as r,newDoubleArray as s}from"./DoubleArray.js";import{compactMeshIndices as i}from"./Indices.js";import{leastSignificantAxis as l}from"./polygonUtils.js";import{deduplicate as c}from"./meshUtils/deduplicate.js";function f(t){const e=a(t.rings,t.hasZ,p.CCW_IS_HOLE,t.spatialReference),s=new Array;let l=0,f=0;for(const r of e.polygons){const t=r.count,c=r.index,h=o(e.position,3*c,3*t),a=r.holeIndices.map((n=>n-c)),g=i(n(h,a,3));s.push({position:h,faces:g}),l+=h.length,f+=g.length}const g=h(s,l,f),u=Array.isArray(g.position)?c(g.position,3,{originalIndices:g.faces}):c(g.position.buffer,6,{originalIndices:g.faces});return g.position=r(new Float64Array(u.buffer)),g.faces=u.indices,g}function h(n,t,e){if(1===n.length)return n[0];const o=s(t),r=new Array(e);let l=0,c=0,f=0;for(const s of n){for(let n=0;n<s.position.length;n++)o[l++]=s.position[n];for(const n of s.faces)r[c++]=n+f;f=l/3}return{position:o,faces:i(r)}}function a(n,t,e,o){const r=n.length,i=new Array(r),l=new Array(r),c=new Array(r);let f=0;for(let s=0;s<r;++s)f+=n[s].length;let h=0,a=0,m=0;const d=s(3*f);let y=0;for(let s=r-1;s>=0;s--){const f=n[s],A=e===p.CCW_IS_HOLE&&u(f,t,o);if(A&&1!==r)i[h++]=f;else{let n=f.length;for(let t=0;t<h;++t)n+=i[t].length;const e={index:y,pathLengths:new Array(h+1),count:n,holeIndices:new Array(h)};e.pathLengths[0]=f.length,f.length>0&&(c[m++]={index:y,count:f.length}),y=A?g(f,f.length-1,-1,d,y,f.length,t):g(f,0,1,d,y,f.length,t);for(let o=0;o<h;++o){const n=i[o];e.holeIndices[o]=y,e.pathLengths[o+1]=n.length,n.length>0&&(c[m++]={index:y,count:n.length}),y=g(n,0,1,d,y,n.length,t)}h=0,e.count>0&&(l[a++]=e)}}for(let s=0;s<h;++s){const n=i[s];n.length>0&&(c[m++]={index:y,count:n.length}),y=g(n,0,1,d,y,n.length,t)}return l.length=a,c.length=m,{position:d,polygons:l,outlines:c}}function g(n,t,e,o,r,s,i){r*=3;for(let l=0;l<s;++l){const s=n[t];o[r++]=s[0],o[r++]=s[1],o[r++]=i&&s[2]?s[2]:0,t+=e}return r/3}function u(n,o,r){if(!o)return!e(n);const s=n.length-1;switch(l(n,s,r)){case t.X:return!e(n,t.Y,t.Z);case t.Y:return!e(n,t.X,t.Z);case t.Z:return!e(n,t.X,t.Y)}}var p;!function(n){n[n.NONE=0]="NONE",n[n.CCW_IS_HOLE=1]="CCW_IS_HOLE"}(p||(p={}));export{p as CounterClockwiseMode,u as isCounterClockwise,a as ringsToTriangulationInfo,f as triangulate};
package/interfaces.d.ts CHANGED
@@ -1418,9 +1418,8 @@ declare namespace __esri {
1418
1418
  *
1419
1419
  * @param item
1420
1420
  * @param type
1421
- * @param typePriorities
1422
1421
  */
1423
- symbolUrlFromStyleItem(item: any, type: any, typePriorities: string[]): string;
1422
+ symbolUrlFromStyleItem(item: any, type: any): string | nullish;
1424
1423
  }
1425
1424
 
1426
1425
  export const styleUtils: styleUtils;
@@ -1483,10 +1482,10 @@ declare namespace __esri {
1483
1482
  * @param symbolName
1484
1483
  * @param context
1485
1484
  * @param type
1486
- * @param styleItemRead
1485
+ * @param symbolUrlFromStyleItem
1487
1486
  * @param options
1488
1487
  */
1489
- fetchSymbolFromStyle(styleResponse: any, symbolName: string, context: any, type: any, styleItemRead: Function, options?: any | null): Promise<any>;
1488
+ fetchSymbolFromStyle(styleResponse: any, symbolName: string, context: any, type: any, symbolUrlFromStyleItem: Function, options?: any | null): Promise<any>;
1490
1489
  }
1491
1490
 
1492
1491
  export const webStyleSymbolUtils: webStyleSymbolUtils;
@@ -8511,20 +8510,6 @@ declare namespace __esri {
8511
8510
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder Read more...}
8512
8511
  */
8513
8512
  static createCylinder(location: Point, parameters?: CreateCylinderParameters): Mesh;
8514
- /**
8515
- * Creates a mesh geometry from a file or list of files and which is ready to be displayed in the
8516
- * view.
8517
- *
8518
- * @param location The location of the origin of the model. If the location doesn't contain a z-value, z is assumed to be `0`.
8519
- * @param files The files from which to create the mesh.
8520
- * @param parameters Additional parameters.
8521
- * @param parameters.layer The layer to which the files are to be uploaded and which will perform any necessary conversions.
8522
- * @param parameters.signal An [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to abort the loading process. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
8523
- * @deprecated Use {@link module:module:esri/layers/SceneLayer~convertMesh convertMesh} instead.
8524
- *
8525
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromFiles Read more...}
8526
- */
8527
- static createFromFiles(location: Point, files: File[], parameters?: MeshCreateFromFilesParameters): Promise<Mesh>;
8528
8513
  /**
8529
8514
  * Creates a new mesh geometry from a glTF model referenced by the `url` parameter.
8530
8515
  *
@@ -8602,7 +8587,6 @@ declare namespace __esri {
8602
8587
  */
8603
8588
  export interface CreateBoxParameters {
8604
8589
  size?: number | CreateBoxParametersSize;
8605
- geographic?: boolean;
8606
8590
  unit?: LengthUnit;
8607
8591
  vertexSpace?: "local" | "georeferenced";
8608
8592
  material?: MeshMaterial;
@@ -8619,7 +8603,6 @@ declare namespace __esri {
8619
8603
  width?: number;
8620
8604
  depth?: number;
8621
8605
  height?: number;
8622
- geographic?: boolean;
8623
8606
  unit?: LengthUnit;
8624
8607
  densificationFactor?: number;
8625
8608
  vertexSpace?: "local" | "georeferenced";
@@ -8632,7 +8615,6 @@ declare namespace __esri {
8632
8615
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#CreateFromGLTFParameters Read more...}
8633
8616
  */
8634
8617
  export interface CreateFromGLTFParameters {
8635
- geographic?: boolean;
8636
8618
  signal?: AbortSignal | nullish;
8637
8619
  vertexSpace?: "local" | "georeferenced";
8638
8620
  material?: MeshMaterial;
@@ -8649,7 +8631,6 @@ declare namespace __esri {
8649
8631
  depth?: number;
8650
8632
  height?: number;
8651
8633
  facing?: "east" | "west" | "north" | "south" | "up" | "down";
8652
- geographic?: boolean;
8653
8634
  unit?: LengthUnit;
8654
8635
  densificationFactor?: number;
8655
8636
  vertexSpace?: "local" | "georeferenced";
@@ -8666,7 +8647,6 @@ declare namespace __esri {
8666
8647
  width?: number;
8667
8648
  depth?: number;
8668
8649
  height?: number;
8669
- geographic?: boolean;
8670
8650
  unit?: LengthUnit;
8671
8651
  densificationFactor?: number;
8672
8652
  vertexSpace?: "local" | "georeferenced";
@@ -8678,11 +8658,6 @@ declare namespace __esri {
8678
8658
  origin?: Point;
8679
8659
  }
8680
8660
 
8681
- export interface MeshCreateFromFilesParameters {
8682
- layer?: SceneLayer;
8683
- signal?: AbortSignal | nullish;
8684
- }
8685
-
8686
8661
  export interface MeshCreateFromPolygonParameters {
8687
8662
  material?: MeshMaterialProperties;
8688
8663
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250207",
3
+ "version": "4.33.0-next.20250209",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{p as e,c as n,e as r,a as t,r as o,l,b as a,d as i,f as u,s,g as c}from"../chunks/arcade.js";export{h as arcade}from"../chunks/arcade.js";import{ArcadeDate as f}from"../arcade/ArcadeDate.js";import p from"../arcade/Dictionary.js";import m from"../arcade/Feature.js";import{m as d,g as y,n as v,p as g,o as x}from"../chunks/languageUtils.js";export{Voxel}from"../arcade/Voxel.js";import{clone as j}from"../core/lang.js";import{DateOnly as S}from"../core/sql/DateOnly.js";import{TimeOnly as w}from"../core/sql/TimeOnly.js";import E from"../geometry/Extent.js";import A from"../geometry/Multipoint.js";import b from"../geometry/Point.js";import F from"../geometry/Polygon.js";import $ from"../geometry/Polyline.js";import{isArray as P,isString as R,isBoolean as C,isNumber as D}from"./guards.js";const T=/^\$(feature|aggregatedFeatures)\./i,z={vars:{$feature:"any",$view:"any"},spatialReference:null};function I(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function M(e){return null==e?null:P(e)||d(e)?"array":y(e)?"date":R(e)?"text":C(e)?"boolean":D(e)?"number":e instanceof p?"dictionary":v(e)?"feature":e instanceof b?"point":e instanceof F?"polygon":e instanceof $?"polyline":e instanceof A?"multipoint":e instanceof E?"extent":e instanceof S?"dateOnly":e instanceof w?"time":g(e)?"featureSet":x(e)?"featureSetCollection":null}function k(n){if(!n)return null;try{return e(n)}catch(r){}return null}function J(e,r){const t="string"==typeof e?k(e):e;if(!t)return null;try{return r=r||j(z),n(t,r)}catch(o){}return null}function V(e,n,r){return{vars:{$feature:null==e?new m:m.createFromGraphic(e,r),$view:n?.view},spatialReference:n?.sr,timeZone:r??null}}function O(e,n,r){return m.createFromGraphicLikeObject(n,e,r,null)}function Z(e,n){null!=e.vars&&(e.vars.$feature=n)}function q(e,n){let t;try{t=r(e,n)}catch(o){t=null}return t}function G(e,n){let r;try{r=e?e(n):null}catch(t){r=null}return r}function L(e,n){try{return e?e(n):Promise.resolve(null)}catch(r){return Promise.resolve(null)}}function U(e,n){if(!e)return[];const r="string"==typeof e?k(e):e;if(!r)return[];const o=t(r);let l=new Array;o.forEach((e=>{T.test(e)&&(e=e.replace(T,""),l.push(e))}));const a=l.filter((e=>e.includes("*")));return l=l.filter((e=>!a.includes(e))),n&&a.forEach((e=>{const r=new RegExp(`^${e.split(/\*+/).map(I).join(".*")}$`,"i");n.forEach((e=>r.test(e)?l.push(e):null))})),[...new Set(l.sort())]}function B(e){return o(e,"$view")}function H(e,n){return!!e&&o(e,n)}function K(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let n,r;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:l}=t;null!=o?(n=null!=e?f.dateJSAndZoneToArcadeDate(e,o):null,r=null!=l?f.dateJSAndZoneToArcadeDate(l,o):null):(n=null!=e?f.dateJSToArcadeDate(e):null,r=null!=l?f.dateJSToArcadeDate(l):null)}return{view:e.viewingMode&&null!=e.scale?new p({viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=n||null!=r?new p({currentStart:n,currentEnd:r,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function N({url:e,spatialReference:n,lrucache:r,interceptor:t}){const o=u();return o?o.createFeatureSetCollectionFromService(e,n,r,t):null}function Q({layer:e,spatialReference:n,outFields:r,returnGeometry:t,lrucache:o,interceptor:l}){if(null===e)return null;const a=u();return a?a.constructFeatureSet(e,n,r,t??!0,o,l):null}function W(e){if(null===e?.map)return null;const n=u();return n?n.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function X(e,n){return p.convertJsonToArcade(e,n)}function Y(e,n,r=[]){return l(e,n,r)}function _(){return a()}function ee(){return i()}function ne(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function re(e){return"esri.layers.support.LabelClass"===e.declaredClass}function te(e){return"esri.PopupTemplate"===e.declaredClass}function oe(e,n){if(!e)return!1;if("string"==typeof e)return n(e);const r=e;if(ne(r)){if("dot-density"===r.type){const e=r.attributes?.some((e=>n(e.valueExpression)));if(e)return e}const e=r.visualVariables,t=!!e&&e.some((e=>{let r=n(e.valueExpression);return"size"===e.type&&(se(e.minSize)&&(r=r||n(e.minSize.valueExpression)),se(e.maxSize)&&(r=r||n(e.maxSize.valueExpression))),r}));return!(!("valueExpression"in r)||!n(r.valueExpression))||t}if(re(r)){const e=r.labelExpressionInfo?.expression;return!(!e||!n(e))||!1}return!!te(r)&&(!!r.expressionInfos&&r.expressionInfos.some((e=>n(e.expression)))||Array.isArray(r.content)&&r.content.some((e=>"expression"===e.type&&n(e.expressionInfo?.expression))))}function le(e){const n=k(e);return!!n&&s(n)}function ae(e){return oe(e,le)}function ie(e){const n=k(e);return!!n&&c(n)}function ue(e){return oe(e,ie)}function se(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}export{p as Dictionary,m as arcadeFeature,Q as convertFeatureLayerToFeatureSet,X as convertJsonToArcade,W as convertMapToFeatureSetCollection,N as convertServiceUrlToWorkspace,V as createExecContext,O as createFeature,J as createFunction,k as createSyntaxTree,B as dependsOnView,ee as enableFeatureSetOperations,_ as enableGeometryOperations,q as evalSyntaxTree,L as executeAsyncFunction,G as executeFunction,U as extractFieldNames,M as getArcadeType,K as getViewInfo,ae as hasGeometryFunctions,ue as hasGeometryOperations,H as hasVariable,Y as loadScriptDependencies,Z as updateExecContext};
5
+ import{p as e,c as n,e as r,a as t,r as o,l as a,b as i,d as l,f as u,s,g as c}from"../chunks/arcade.js";export{h as arcade}from"../chunks/arcade.js";import{ArcadeDate as f}from"../arcade/ArcadeDate.js";import{toSymbolId as p}from"../arcade/arcadeEnvironment.js";import m from"../arcade/Dictionary.js";import d from"../arcade/Feature.js";import{m as y,g as v,n as x,p as g,o as j}from"../chunks/languageUtils.js";export{Voxel}from"../arcade/Voxel.js";import{clone as S}from"../core/lang.js";import{DateOnly as w}from"../core/sql/DateOnly.js";import{TimeOnly as $}from"../core/sql/TimeOnly.js";import b from"../geometry/Extent.js";import E from"../geometry/Multipoint.js";import A from"../geometry/Point.js";import F from"../geometry/Polygon.js";import P from"../geometry/Polyline.js";import{isArray as C,isString as R,isBoolean as D,isNumber as I}from"./guards.js";const M={vars:{$feature:"any",$view:"any"},spatialReference:null};function T(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function z(e){return null==e?null:C(e)||y(e)?"array":v(e)?"date":R(e)?"text":D(e)?"boolean":I(e)?"number":e instanceof m?"dictionary":x(e)?"feature":e instanceof A?"point":e instanceof F?"polygon":e instanceof P?"polyline":e instanceof E?"multipoint":e instanceof b?"extent":e instanceof w?"dateOnly":e instanceof $?"time":g(e)?"featureSet":j(e)?"featureSetCollection":null}function k(n){if(!n)return null;try{return e(n)}catch(r){}return null}function J(e,r){const t="string"==typeof e?k(e):e;if(!t)return null;try{return r=r||S(M),n(t,r)}catch(o){}return null}function V(e,n,r){return{vars:{$feature:null==e?new d:d.createFromGraphic(e,r),$view:n?.view},spatialReference:n?.sr,timeZone:r??null}}function O(e,n,r){return d.createFromGraphicLikeObject(n,e,r,null)}function Z(e,n){null!=e.vars&&(e.vars.$feature=n)}function q(e,n){let t;try{t=r(e,n)}catch(o){t=null}return t}function G(e,n){let r;try{r=e?e(n):null}catch(t){r=null}return r}function L(e,n){try{return e?e(n):Promise.resolve(null)}catch(r){return Promise.resolve(null)}}const N=new Set(["$feature","$aggregatedFeatures","$voxel"].map((e=>p(e))));function U(e,n){if(!e)return[];const r="string"==typeof e?k(e):e;if(!r)return[];const o=t(r).filter((({varId:e})=>N.has(e))).map((({memberNamePattern:e})=>e)).flatMap((e=>{if(e.includes("*")){if(null==n)return[];const r=new RegExp(`^${e.split(/\*+/).map(T).join(".*")}$`,"i");return n.filter((e=>r.test(e)))}return e.toLowerCase()}));return[...new Set(o.sort())]}function B(e){return o(e,"$view")}function H(e,n){return!!e&&o(e,n)}function K(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let n,r;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:a}=t;null!=o?(n=null!=e?f.dateJSAndZoneToArcadeDate(e,o):null,r=null!=a?f.dateJSAndZoneToArcadeDate(a,o):null):(n=null!=e?f.dateJSToArcadeDate(e):null,r=null!=a?f.dateJSToArcadeDate(a):null)}return{view:e.viewingMode&&null!=e.scale?new m({viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=n||null!=r?new m({currentStart:n,currentEnd:r,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function Q({url:e,spatialReference:n,lrucache:r,interceptor:t}){const o=u();return o?o.createFeatureSetCollectionFromService(e,n,r,t):null}function W({layer:e,spatialReference:n,outFields:r,returnGeometry:t,lrucache:o,interceptor:a}){if(null===e)return null;const i=u();return i?i.constructFeatureSet(e,n,r,t??!0,o,a):null}function X(e){if(null===e?.map)return null;const n=u();return n?n.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function Y(e,n){return m.convertJsonToArcade(e,n)}function _(e,n,r=[]){return a(e,n,r)}function ee(){return i()}function ne(){return l()}function re(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function te(e){return"esri.layers.support.LabelClass"===e.declaredClass}function oe(e){return"esri.PopupTemplate"===e.declaredClass}function ae(e,n){if(!e)return!1;if("string"==typeof e)return n(e);const r=e;if(re(r)){if("dot-density"===r.type){const e=r.attributes?.some((e=>n(e.valueExpression)));if(e)return e}const e=r.visualVariables,t=!!e&&e.some((e=>{let r=n(e.valueExpression);return"size"===e.type&&(ce(e.minSize)&&(r=r||n(e.minSize.valueExpression)),ce(e.maxSize)&&(r=r||n(e.maxSize.valueExpression))),r}));return!(!("valueExpression"in r)||!n(r.valueExpression))||t}if(te(r)){const e=r.labelExpressionInfo?.expression;return!(!e||!n(e))||!1}return!!oe(r)&&(!!r.expressionInfos&&r.expressionInfos.some((e=>n(e.expression)))||Array.isArray(r.content)&&r.content.some((e=>"expression"===e.type&&n(e.expressionInfo?.expression))))}function ie(e){const n=k(e);return!!n&&s(n)}function le(e){return ae(e,ie)}function ue(e){const n=k(e);return!!n&&c(n)}function se(e){return ae(e,ue)}function ce(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}export{m as Dictionary,d as arcadeFeature,W as convertFeatureLayerToFeatureSet,Y as convertJsonToArcade,X as convertMapToFeatureSetCollection,Q as convertServiceUrlToWorkspace,V as createExecContext,O as createFeature,J as createFunction,k as createSyntaxTree,B as dependsOnView,ne as enableFeatureSetOperations,ee as enableGeometryOperations,q as evalSyntaxTree,L as executeAsyncFunction,G as executeFunction,U as extractFieldNames,z as getArcadeType,K as getViewInfo,le as hasGeometryFunctions,se as hasGeometryOperations,H as hasVariable,_ as loadScriptDependencies,Z as updateExecContext};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const a="20250207",f="db43f01f6eaa6452009809f92a25350baf160ddc";export{a as buildDate,f as commitHash};
5
+ const d="20250209",a="69e745d65cc01aadabd02258dbcbad4993b0a7de";export{d as buildDate,a as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import e from"../core/Logger.js";import{throwIfAborted as o}from"../core/promiseUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{enumeration as s}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import i from"../portal/Portal.js";import{r as p,w as a}from"../chunks/persistableUrlUtils.js";import n from"./Symbol.js";import{Thumbnail as m}from"./support/Thumbnail.js";var c;let y=c=class extends n{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=null!=this.portal?this.portal:i.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?.portal,super.read(t,e)}clone(){return new c({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol("webRef",t)}fetchCIMSymbol(t){return this._fetchSymbol("cimRef",t)}async _fetchSymbol(t,r){const s=null!=r?r.cache:null,l=s?this._fetchCacheKey:null;if(null!=s){const t=l&&s.get(l);if(t)return t.clone()}const{resolveWebStyleSymbol:i}=await import("./support/webStyleSymbolUtils.js");o(r);const p=i(this,{portal:this.portal},t,r);p.catch((t=>{e.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",t)}));const a=await p;return"webRef"===t&&"point-3d"===a.type||"cimRef"===t&&"cim"===a.type?(null!=s&&s.set(l,a.clone()),a):null}};t([r({json:{write:!1}})],y.prototype,"color",void 0),t([r({type:String,json:{write:!0}})],y.prototype,"styleName",void 0),t([r({type:i,json:{write:!1}})],y.prototype,"portal",void 0),t([r({type:String,json:{read:p,write:a}})],y.prototype,"styleUrl",void 0),t([r({type:m,json:{read:!1}})],y.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],y.prototype,"name",void 0),t([s({styleSymbolReference:"web-style"},{readOnly:!0})],y.prototype,"type",void 0),t([r()],y.prototype,"_fetchCacheKey",null),y=c=t([l("esri.symbols.WebStyleSymbol")],y);const h=y;export{h as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import e from"../core/Error.js";import o from"../core/Logger.js";import{throwIfAborted as r}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{enumeration as l}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import a from"../portal/Portal.js";import{r as p,w as c}from"../chunks/persistableUrlUtils.js";import m from"./Symbol.js";import{Thumbnail as n}from"./support/Thumbnail.js";var y;let h=y=class extends m{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=null!=this.portal?this.portal:a.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?.portal,super.read(t,e)}clone(){return new y({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){const e=t&&"acceptedFormats"in t?t.acceptedFormats:["web"];return this._fetchSymbol({...t,acceptedFormats:e})}async fetchCIMSymbol(t){const o=await this.fetchSymbol({...t,acceptedFormats:["cim"]});if("cim"!==o?.type)throw new e("webstylesymbol:fetchCIMSymbol","Resolved web style symbol is not of type 'cim'");return o}async _fetchSymbol(t){const e=null!=t?t.cache:null,s=e?this._fetchCacheKey:null;if(null!=e){const t=s&&e.get(s);if(t)return t.clone()}const{resolveWebStyleSymbol:l}=await import("./support/webStyleSymbolUtils.js");r(t);const i=l(this,{portal:this.portal},t);i.catch((t=>{o.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",t)}));const a=await i;return null!=e&&e.set(s,a.clone()),a}};t([s({json:{write:!1}})],h.prototype,"color",void 0),t([s({type:String,json:{write:!0}})],h.prototype,"styleName",void 0),t([s({type:a,json:{write:!1}})],h.prototype,"portal",void 0),t([s({type:String,json:{read:p,write:c}})],h.prototype,"styleUrl",void 0),t([s({type:n,json:{read:!1}})],h.prototype,"thumbnail",void 0),t([s({type:String,json:{write:!0}})],h.prototype,"name",void 0),t([l({styleSymbolReference:"web-style"},{readOnly:!0})],h.prototype,"type",void 0),t([s()],h.prototype,"_fetchCacheKey",null),h=y=t([i("esri.symbols.WebStyleSymbol")],h);const u=h;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import"../../core/has.js";import a from"../../core/Error.js";import s from"../../core/Logger.js";import{pt2px as n}from"../../core/screenUtils.js";import{defaultThematicColor as r,getPatternUrlWithColor as o,dekebabifyLineStyle as i}from"./gfxUtils.js";import{defaultPrimitive as c}from"./IconSymbol3DLayerResource.js";import{defaultPrimitive as p}from"./ObjectSymbol3DLayerResource.js";import{SymbolSizeDefaults as u,adjustColorComponentBrightness as h,getPathSymbolShapes as m,shapes as f,getExtrudeSymbolShapes as y,getTetrahedronShapes as d,getDiamondShapes as b,getCylinderShapes as k,getCubeShapes as v,getInvertedConeShapes as w,getConeShapes as g,getWaterSymbolShapes as x}from"./previewUtils.js";import{tintImageWithColor as M,renderSymbol as L}from"./renderUtils.js";import{isVolumetricSymbol as j,getIconHref as z}from"./utils.js";import{resolveWebStyleSymbol as S}from"./webStyleSymbolUtils.js";const P=u.size,D=u.maxSize,U=u.maxOutlineSize,O=u.lineWidth,R=u.tallSymbolWidth;function C(e){const t=e.outline,l=null!=e.material?e.material.color:null,a=null!=l?l.toHex():null;if(null==t||"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type&&"none"===t.pattern.style)return"fill"===e.type&&"#ffffff"===a?{color:"#bdc3c7",width:.75}:null;const s=n(t.size)||0;return{color:"rgba("+(null!=t.color?t.color.toRgba():"255,255,255,1")+")",width:Math.min(s,U),style:"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type?i(t.pattern.style):null,join:"butt",cap:"patternCap"in t?t.patternCap:"butt"}}async function E(t,l){if(t.thumbnail?.url)return t.thumbnail.url;if("icon"===l.type){const e=l?.resource?.href;if(e)return z(l)}const a=e("esri/images/Legend/legend3dsymboldefault.png");if(t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)){const e=await S(t.styleOrigin,{portal:t.styleOrigin.portal},"webRef").catch((()=>null));if(e&&"thumbnail"in e&&e.thumbnail?.url)return e.thumbnail.url}return a}function q(e,a=1){const s=e.a,n=t(e),r=n.h,o=n.s/a,i=100-(100-n.v)/a,{r:c,g:p,b:u}=l({h:r,s:o,v:i});return[c,p,u,s]}function I(e){return"water"===e.type?null==e.color?null:e.color:null==e.material?.color?null:e.material.color}function Z(e,t=0){const l=I(e);if(!l){if("fill"===e.type)return null;const l=r.r,a=h(l,t);return[a,a,a,100]}const a=l.toRgba();for(let s=0;s<3;s++)a[s]=h(a[s],t);return a}async function H(t,l){const a=t.style;if("none"===a)return null;return{type:"pattern",x:0,y:0,src:await o(e(`esri/symbols/patterns/${a}.png`),l.toCss(!0)),width:5,height:5}}function N(e){return e.outline?C(e):{color:"rgba(0, 0, 0, 1)",width:1.5}}function T(e,t){const l=I(e);if(!l)return null;let a="rgba(";return a+=h(l.r,t)+",",a+=h(l.g,t)+",",a+=h(l.b,t)+",",a+l.a+");"}function W(e,t){const l=T(e,t);if(!l)return{};if("pattern"in e&&null!=e.pattern&&"style"===e.pattern.type&&"none"===e.pattern.style)return null;return{color:l,width:Math.min(e.size?n(e.size):.75,U),style:"pattern"in e&&null!=e.pattern&&"style"===e.pattern.type?i(e.pattern.style):null,cap:"cap"in e?e.cap:null,join:"join"in e?"miter"===e.join?n(2):e.join:null}}function F(e,t,l){const a=null!=l?.75*l:0;return{type:"linear",x1:a?.25*a:0,y1:a?.5*a:0,x2:a||4,y2:a?.5*a:4,colors:[{color:e,offset:0},{color:t,offset:1}]}}function $(e){const t=e.depth,l=e.height,a=e.width;return 0!==a&&0!==t&&0!==l&&a===t&&null!=a&&null!=l&&a<l}function A(e,t,l){const a=[];if(!e)return a;switch(e.type){case"icon":{const l=0,s=0,n=t,r=t;switch(e.resource?.primitive??c){case"circle":a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:Z(e,0),stroke:C(e)});break;case"square":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[l,s]},{command:"L",values:[n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:C(e)});break;case"triangle":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:C(e)});break;case"cross":a.push({shape:{type:"path",path:[{command:"M",values:[.5*n,s]},{command:"L",values:[.5*n,r]},{command:"M",values:[l,.5*r]},{command:"L",values:[n,.5*r]}]},stroke:N(e)});break;case"x":a.push({shape:{type:"path",path:[{command:"M",values:[l,s]},{command:"L",values:[n,r]},{command:"M",values:[n,s]},{command:"L",values:[l,r]}]},stroke:N(e)});break;case"kite":a.push({shape:{type:"path",path:[{command:"M",values:[l,.5*r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,.5*r]},{command:"L",values:[.5*n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:C(e)})}break}case"object":switch(e.resource?.primitive??p){case"cone":{const s=F(Z(e,0),Z(e,-.6),l?R:t),n=g(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s});break}case"inverted-cone":{const l=Z(e,0),s=F(l,Z(e,-.6),t),n=w(t);a.push({shape:n[0],fill:s},{shape:n[1],fill:l});break}case"cube":{const s=v(t,l);a.push({shape:s[0],fill:Z(e,0)},{shape:s[1],fill:Z(e,-.3)},{shape:s[2],fill:Z(e,-.5)});break}case"cylinder":{const s=F(Z(e,0),Z(e,-.6),l?R:t),n=k(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s},{shape:n[2],fill:Z(e,0)});break}case"diamond":{const l=b(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.3)},{shape:l[3],fill:Z(e,-.7)});break}case"sphere":{const l=F(Z(e,0),Z(e,-.6));l.x1=0,l.y1=0,l.x2=.25*t,l.y2=.25*t,a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:l});break}case"tetrahedron":{const l=d(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.6)});break}}break}return a}function B(e){const t="number"==typeof e?.size?e?.size:null;return t?n(t):null}function G(e){return"icon"===e.type?"multiply":"tint"}async function J(e,t){const l=B(t),a=t?.maxSize?n(t.maxSize):null,r=t?.disableUpsampling??!1,o=e.symbolLayers,i=[],c=[];let p=!1,u=0,h=0,m=0;o.forEach((s=>{if("icon"!==s.type&&"object"!==s.type)return;s&&"icon"===s.type&&(m=Math.max(s.size&&n(s.size),m));const o="icon"===s.type?s.size&&n(s.size):0,f=l||o?Math.ceil(Math.min(l||o,a||D)):P;let y="icon"===s.type?s.angle:null;if(null!=t?.rotation&&(y=(y??0)+t.rotation),c.push(y),s?.resource?.href){const t=E(e,s).then((e=>{const t=s?.material?.color,l=G(s);return M(e,f,t,l,r)})).then((e=>{const t=e.width,l=e.height;return u=Math.max(u,t),h=Math.max(h,l),y&&(p=!0),[{shape:{type:"image",x:0,y:0,width:t,height:l,src:e.url},fill:null,stroke:null}]}));i.push(t)}else{let e=f;"icon"===s.type&&l&&(e=f*(o/m));const a="tall"===t?.symbolConfig||t?.symbolConfig?.isTall||"object"===s.type&&$(s);u=Math.max(u,a?R:e),h=Math.max(h,e),y&&s.resource?.primitive&&["square","triangle","x"].includes(s.resource?.primitive)&&(p=!0),i.push(Promise.resolve(A(s,e,a)))}}));const f=await Promise.allSettled(i),y=[];return f.forEach((e=>{"fulfilled"===e.status?y.push(e.value):e.reason&&s.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",e.reason)})),L(y,[u,h],{node:t?.node,scale:!1,opacity:t?.opacity,ariaLabel:t?.ariaLabel,rotations:c,useRotationSize:p})}function K(e,t){const l=e.symbolLayers,a=[],s=j(e),r=B(t),o=(t?.maxSize?n(t.maxSize):null)||U;let i,c=0,p=0;return l.forEach(((e,t)=>{if(!e)return;if("line"!==e.type&&"path"!==e.type)return;const l=[];switch(e.type){case"line":{const a=W(e,0);if(null==a)break;const s=a?.width||0;0===t&&(i=s);const n=Math.min(r||s,o),u=0===t?n:r?n*(s/i):n,h=u>O/2?2*u:O;p=Math.max(p,u),c=Math.max(c,h),a.width=u,l.push({shape:{type:"path",path:[{command:"M",values:[0,.5*p]},{command:"L",values:[c,.5*p]}]},stroke:a});break}case"path":{const t=Math.min(r||P,o),a=Z(e,0),s=Z(e,-.2),n=T(e,-.4),i=n?{color:n,width:1}:{};if("quad"===e.profile){const t=e.width,n=e.height,r=m(t&&n?t/n:1,0===n,0===t),o={...i,join:"bevel"};l.push({shape:r[0],fill:s,stroke:o},{shape:r[1],fill:s,stroke:o},{shape:r[2],fill:a,stroke:o})}else l.push({shape:f.pathSymbol3DLayer[0],fill:s,stroke:i},{shape:f.pathSymbol3DLayer[1],fill:a,stroke:i});p=Math.max(p,t),c=p}}a.push(l)})),Promise.resolve(L(a,[c,p],{node:t?.node,scale:s,opacity:t?.opacity,ariaLabel:t?.ariaLabel}))}async function Q(e,t){const l="mesh-3d"===e.type,a=e.symbolLayers,s=B(t),r=t?.maxSize?n(t.maxSize):null,o=s||P,i=[];let c=0,p=0,u=!1;for(let n=0;n<a.length;n++){const e=a.at(n),t=[];if(!l||"fill"===e.type){switch(e.type){case"fill":{const a=Math.min(o,r||D);if(c=Math.max(c,a),p=Math.max(p,a),u=!0,l){const l=f.meshSymbol3DFill,a=T(e,-.4),s=a?{color:a,width:1,join:"round"}:{};t.push({shape:l[0],fill:Z(e,0),stroke:s},{shape:l[1],fill:Z(e,-.2),stroke:s},{shape:l[2],fill:Z(e,-.6),stroke:s})}else{let l=Z(e,0);const a="pattern"in e?e.pattern:null,s=C(e),n=I(e);null!=a&&"style"===a.type&&"solid"!==a.style&&n&&(l=await H(a,n)),t.push({shape:f.fill[0],fill:l,stroke:s})}break}case"line":{const l=W(e,0);if(null==l)break;const a={stroke:l,shape:f.fill[0]};c=Math.max(c,P),p=Math.max(p,P),t.push(a);break}case"extrude":{const l={join:"round",width:1,...W(e,-.4)},a=Z(e,0),s=Z(e,-.2),n=Math.min(o,r||D),i=y(n);l.width=1,t.push({shape:i[0],fill:s,stroke:l},{shape:i[1],fill:s,stroke:l},{shape:i[2],fill:a,stroke:l});const u=P,h=.7*P+.5*n;c=Math.max(c,u),p=Math.max(p,h);break}case"water":{const l=I(e),a=q(l),s=q(l,2),n=q(l,3),i=x();u=!0,t.push({shape:i[0],fill:a},{shape:i[1],fill:s},{shape:i[2],fill:n});const h=Math.min(o,r||D);c=Math.max(c,h),p=Math.max(p,h);break}}i.push(t)}}return L(i,[c,p],{node:t?.node,scale:u,opacity:t?.opacity,ariaLabel:t?.ariaLabel})}function V(e,t){if(0===e.symbolLayers.length)return Promise.reject(new a("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(e.type){case"point-3d":return J(e,t);case"line-3d":return K(e,t);case"polygon-3d":case"mesh-3d":return Q(e,t)}return Promise.reject(new a("symbolPreview: swatchInfo3D","symbol not supported."))}export{H as getPatternDescriptor,B as getSizeFromOptions,Z as getSymbolLayerFill,V as previewSymbol3D};
5
+ import{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import"../../core/has.js";import a from"../../core/Error.js";import s from"../../core/Logger.js";import{pt2px as n}from"../../core/screenUtils.js";import{defaultThematicColor as r,getPatternUrlWithColor as o,dekebabifyLineStyle as i}from"./gfxUtils.js";import{defaultPrimitive as c}from"./IconSymbol3DLayerResource.js";import{defaultPrimitive as p}from"./ObjectSymbol3DLayerResource.js";import{SymbolSizeDefaults as u,adjustColorComponentBrightness as h,getPathSymbolShapes as m,shapes as f,getExtrudeSymbolShapes as y,getTetrahedronShapes as d,getDiamondShapes as b,getCylinderShapes as k,getCubeShapes as v,getInvertedConeShapes as g,getConeShapes as w,getWaterSymbolShapes as x}from"./previewUtils.js";import{tintImageWithColor as M,renderSymbol as L}from"./renderUtils.js";import{isVolumetricSymbol as j,getIconHref as z}from"./utils.js";import{resolveWebStyleSymbol as S}from"./webStyleSymbolUtils.js";const P=u.size,D=u.maxSize,U=u.maxOutlineSize,O=u.lineWidth,C=u.tallSymbolWidth;function R(e){const t=e.outline,l=null!=e.material?e.material.color:null,a=null!=l?l.toHex():null;if(null==t||"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type&&"none"===t.pattern.style)return"fill"===e.type&&"#ffffff"===a?{color:"#bdc3c7",width:.75}:null;const s=n(t.size)||0;return{color:"rgba("+(null!=t.color?t.color.toRgba():"255,255,255,1")+")",width:Math.min(s,U),style:"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type?i(t.pattern.style):null,join:"butt",cap:"patternCap"in t?t.patternCap:"butt"}}async function E(t,l){if(t.thumbnail?.url)return t.thumbnail.url;if("icon"===l.type){const e=l?.resource?.href;if(e)return z(l)}const a=e("esri/images/Legend/legend3dsymboldefault.png");if(t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)){const e=await S(t.styleOrigin,{portal:t.styleOrigin.portal}).catch((()=>null));if(e&&"thumbnail"in e&&e.thumbnail?.url)return e.thumbnail.url}return a}function q(e,a=1){const s=e.a,n=t(e),r=n.h,o=n.s/a,i=100-(100-n.v)/a,{r:c,g:p,b:u}=l({h:r,s:o,v:i});return[c,p,u,s]}function I(e){return"water"===e.type?null==e.color?null:e.color:null==e.material?.color?null:e.material.color}function Z(e,t=0){const l=I(e);if(!l){if("fill"===e.type)return null;const l=r.r,a=h(l,t);return[a,a,a,100]}const a=l.toRgba();for(let s=0;s<3;s++)a[s]=h(a[s],t);return a}async function H(t,l){const a=t.style;if("none"===a)return null;return{type:"pattern",x:0,y:0,src:await o(e(`esri/symbols/patterns/${a}.png`),l.toCss(!0)),width:5,height:5}}function N(e){return e.outline?R(e):{color:"rgba(0, 0, 0, 1)",width:1.5}}function T(e,t){const l=I(e);if(!l)return null;let a="rgba(";return a+=h(l.r,t)+",",a+=h(l.g,t)+",",a+=h(l.b,t)+",",a+l.a+");"}function W(e,t){const l=T(e,t);if(!l)return{};if("pattern"in e&&null!=e.pattern&&"style"===e.pattern.type&&"none"===e.pattern.style)return null;return{color:l,width:Math.min(e.size?n(e.size):.75,U),style:"pattern"in e&&null!=e.pattern&&"style"===e.pattern.type?i(e.pattern.style):null,cap:"cap"in e?e.cap:null,join:"join"in e?"miter"===e.join?n(2):e.join:null}}function F(e,t,l){const a=null!=l?.75*l:0;return{type:"linear",x1:a?.25*a:0,y1:a?.5*a:0,x2:a||4,y2:a?.5*a:4,colors:[{color:e,offset:0},{color:t,offset:1}]}}function $(e){const t=e.depth,l=e.height,a=e.width;return 0!==a&&0!==t&&0!==l&&a===t&&null!=a&&null!=l&&a<l}function A(e,t,l){const a=[];if(!e)return a;switch(e.type){case"icon":{const l=0,s=0,n=t,r=t;switch(e.resource?.primitive??c){case"circle":a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:Z(e,0),stroke:R(e)});break;case"square":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[l,s]},{command:"L",values:[n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:R(e)});break;case"triangle":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:R(e)});break;case"cross":a.push({shape:{type:"path",path:[{command:"M",values:[.5*n,s]},{command:"L",values:[.5*n,r]},{command:"M",values:[l,.5*r]},{command:"L",values:[n,.5*r]}]},stroke:N(e)});break;case"x":a.push({shape:{type:"path",path:[{command:"M",values:[l,s]},{command:"L",values:[n,r]},{command:"M",values:[n,s]},{command:"L",values:[l,r]}]},stroke:N(e)});break;case"kite":a.push({shape:{type:"path",path:[{command:"M",values:[l,.5*r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,.5*r]},{command:"L",values:[.5*n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:R(e)})}break}case"object":switch(e.resource?.primitive??p){case"cone":{const s=F(Z(e,0),Z(e,-.6),l?C:t),n=w(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s});break}case"inverted-cone":{const l=Z(e,0),s=F(l,Z(e,-.6),t),n=g(t);a.push({shape:n[0],fill:s},{shape:n[1],fill:l});break}case"cube":{const s=v(t,l);a.push({shape:s[0],fill:Z(e,0)},{shape:s[1],fill:Z(e,-.3)},{shape:s[2],fill:Z(e,-.5)});break}case"cylinder":{const s=F(Z(e,0),Z(e,-.6),l?C:t),n=k(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s},{shape:n[2],fill:Z(e,0)});break}case"diamond":{const l=b(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.3)},{shape:l[3],fill:Z(e,-.7)});break}case"sphere":{const l=F(Z(e,0),Z(e,-.6));l.x1=0,l.y1=0,l.x2=.25*t,l.y2=.25*t,a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:l});break}case"tetrahedron":{const l=d(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.6)});break}}break}return a}function B(e){const t="number"==typeof e?.size?e?.size:null;return t?n(t):null}function G(e){return"icon"===e.type?"multiply":"tint"}async function J(e,t){const l=B(t),a=t?.maxSize?n(t.maxSize):null,r=t?.disableUpsampling??!1,o=e.symbolLayers,i=[],c=[];let p=!1,u=0,h=0,m=0;o.forEach((s=>{if("icon"!==s.type&&"object"!==s.type)return;s&&"icon"===s.type&&(m=Math.max(s.size&&n(s.size),m));const o="icon"===s.type?s.size&&n(s.size):0,f=l||o?Math.ceil(Math.min(l||o,a||D)):P;let y="icon"===s.type?s.angle:null;if(null!=t?.rotation&&(y=(y??0)+t.rotation),c.push(y),s?.resource?.href){const t=E(e,s).then((e=>{const t=s?.material?.color,l=G(s);return M(e,f,t,l,r)})).then((e=>{const t=e.width,l=e.height;return u=Math.max(u,t),h=Math.max(h,l),y&&(p=!0),[{shape:{type:"image",x:0,y:0,width:t,height:l,src:e.url},fill:null,stroke:null}]}));i.push(t)}else{let e=f;"icon"===s.type&&l&&(e=f*(o/m));const a="tall"===t?.symbolConfig||t?.symbolConfig?.isTall||"object"===s.type&&$(s);u=Math.max(u,a?C:e),h=Math.max(h,e),y&&s.resource?.primitive&&["square","triangle","x"].includes(s.resource?.primitive)&&(p=!0),i.push(Promise.resolve(A(s,e,a)))}}));const f=await Promise.allSettled(i),y=[];return f.forEach((e=>{"fulfilled"===e.status?y.push(e.value):e.reason&&s.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",e.reason)})),L(y,[u,h],{node:t?.node,scale:!1,opacity:t?.opacity,ariaLabel:t?.ariaLabel,rotations:c,useRotationSize:p})}function K(e,t){const l=e.symbolLayers,a=[],s=j(e),r=B(t),o=(t?.maxSize?n(t.maxSize):null)||U;let i,c=0,p=0;return l.forEach(((e,t)=>{if(!e)return;if("line"!==e.type&&"path"!==e.type)return;const l=[];switch(e.type){case"line":{const a=W(e,0);if(null==a)break;const s=a?.width||0;0===t&&(i=s);const n=Math.min(r||s,o),u=0===t?n:r?n*(s/i):n,h=u>O/2?2*u:O;p=Math.max(p,u),c=Math.max(c,h),a.width=u,l.push({shape:{type:"path",path:[{command:"M",values:[0,.5*p]},{command:"L",values:[c,.5*p]}]},stroke:a});break}case"path":{const t=Math.min(r||P,o),a=Z(e,0),s=Z(e,-.2),n=T(e,-.4),i=n?{color:n,width:1}:{};if("quad"===e.profile){const t=e.width,n=e.height,r=m(t&&n?t/n:1,0===n,0===t),o={...i,join:"bevel"};l.push({shape:r[0],fill:s,stroke:o},{shape:r[1],fill:s,stroke:o},{shape:r[2],fill:a,stroke:o})}else l.push({shape:f.pathSymbol3DLayer[0],fill:s,stroke:i},{shape:f.pathSymbol3DLayer[1],fill:a,stroke:i});p=Math.max(p,t),c=p}}a.push(l)})),Promise.resolve(L(a,[c,p],{node:t?.node,scale:s,opacity:t?.opacity,ariaLabel:t?.ariaLabel}))}async function Q(e,t){const l="mesh-3d"===e.type,a=e.symbolLayers,s=B(t),r=t?.maxSize?n(t.maxSize):null,o=s||P,i=[];let c=0,p=0,u=!1;for(let n=0;n<a.length;n++){const e=a.at(n),t=[];if(!l||"fill"===e.type){switch(e.type){case"fill":{const a=Math.min(o,r||D);if(c=Math.max(c,a),p=Math.max(p,a),u=!0,l){const l=f.meshSymbol3DFill,a=T(e,-.4),s=a?{color:a,width:1,join:"round"}:{};t.push({shape:l[0],fill:Z(e,0),stroke:s},{shape:l[1],fill:Z(e,-.2),stroke:s},{shape:l[2],fill:Z(e,-.6),stroke:s})}else{let l=Z(e,0);const a="pattern"in e?e.pattern:null,s=R(e),n=I(e);null!=a&&"style"===a.type&&"solid"!==a.style&&n&&(l=await H(a,n)),t.push({shape:f.fill[0],fill:l,stroke:s})}break}case"line":{const l=W(e,0);if(null==l)break;const a={stroke:l,shape:f.fill[0]};c=Math.max(c,P),p=Math.max(p,P),t.push(a);break}case"extrude":{const l={join:"round",width:1,...W(e,-.4)},a=Z(e,0),s=Z(e,-.2),n=Math.min(o,r||D),i=y(n);l.width=1,t.push({shape:i[0],fill:s,stroke:l},{shape:i[1],fill:s,stroke:l},{shape:i[2],fill:a,stroke:l});const u=P,h=.7*P+.5*n;c=Math.max(c,u),p=Math.max(p,h);break}case"water":{const l=I(e),a=q(l),s=q(l,2),n=q(l,3),i=x();u=!0,t.push({shape:i[0],fill:a},{shape:i[1],fill:s},{shape:i[2],fill:n});const h=Math.min(o,r||D);c=Math.max(c,h),p=Math.max(p,h);break}}i.push(t)}}return L(i,[c,p],{node:t?.node,scale:u,opacity:t?.opacity,ariaLabel:t?.ariaLabel})}function V(e,t){if(0===e.symbolLayers.length)return Promise.reject(new a("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(e.type){case"point-3d":return J(e,t);case"line-3d":return K(e,t);case"polygon-3d":case"mesh-3d":return Q(e,t)}return Promise.reject(new a("symbolPreview: swatchInfo3D","symbol not supported."))}export{H as getPatternDescriptor,B as getSizeFromOptions,Z as getSymbolLayerFill,V as previewSymbol3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../request.js";import{pt2px as e}from"../../core/screenUtils.js";import{SymbolSizeDefaults as i}from"./previewUtils.js";import{fetchWebStyleSymbol as n}from"./utils.js";function r(e,i,r){const h=e.thumbnail?.url;return h?t(h,{responseType:"image"}).then((t=>{const e=s(t.data,r);return r?.node?(r.node.appendChild(e),r.node):e})):n(e).then((t=>t?i(t,r):null))}function s(t,n){const r=!/\\.svg$/i.test(t.src)&&n?.disableUpsampling,s=Math.max(t.width,t.height);let h=null!=n?.maxSize?e(n.maxSize):i.maxSize;r&&(h=Math.min(s,h));const o="number"==typeof n?.size?n?.size:null,m=Math.min(h,null!=o?e(o):s);if(m!==s){const e=0!==t.width&&0!==t.height?t.width/t.height:1;e>=1?(t.width=m,t.height=m/e):(t.width=m*e,t.height=m)}return t}export{r as previewWebStyleSymbol};
5
+ import t from"../../request.js";import{pt2px as e}from"../../core/screenUtils.js";import{SymbolSizeDefaults as i}from"./previewUtils.js";import{defaultAcceptedFormats as n}from"./webStyleAcceptedFormats.js";async function o(e,i,o){const r=e.thumbnail?.url;if(r){const e=s((await t(r,{responseType:"image"})).data,o);return o?.node?(o.node.appendChild(e),o.node):e}const a=await e.fetchSymbol({acceptedFormats:n});return a?i(a,o):null}function s(t,n){const o=!/\\.svg$/i.test(t.src)&&n?.disableUpsampling,s=Math.max(t.width,t.height);let r=null!=n?.maxSize?e(n.maxSize):i.maxSize;o&&(r=Math.min(s,r));const a="number"==typeof n?.size?n?.size:null,h=Math.min(r,null!=a?e(a):s);if(h!==s){const e=0!==t.width&&0!==t.height?t.width/t.height:1;e>=1?(t.width=h,t.height=h/e):(t.width=h*e,t.height=h)}return t}export{o as previewWebStyleSymbol};