@arcgis/core 4.28.0-next.20230711 → 4.28.0-next.20230713
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/08ee2bd914867fd2cbd5.js +1 -0
- package/assets/esri/core/workers/chunks/{4f92fd5167e22c602e8a.js → 169b04f05f5c875c5083.js} +1 -1
- package/assets/esri/core/workers/chunks/{d2f9988b576ac968dd92.js → 3a614d35dec6deebd041.js} +1 -1
- package/assets/esri/core/workers/chunks/55109f141c9f120833f6.js +1 -0
- package/assets/esri/core/workers/chunks/{086173d3ada7857eea15.js → 7c585aee0f931e6b56c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{27fec382097efdcfee8a.js → 839d9039f0628ee98466.js} +1 -1
- package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
- package/assets/esri/core/workers/chunks/{f156387d6c645b18a8dd.js → b2a0e3e1dfccda7ed12e.js} +1 -1
- package/assets/esri/core/workers/chunks/d4881b238c8a93390cde.js +1 -0
- package/assets/esri/core/workers/chunks/dcb004dfba27335c7c3c.js +1 -0
- package/assets/esri/core/workers/chunks/e3610549f4c573e705ba.js +1 -0
- package/assets/esri/core/workers/chunks/{ad38aede3ec854191511.js → f6e24113643784bc6731.js} +1 -1
- package/assets/esri/core/workers/chunks/{3a0e2535f6cdb2e65667.js → fb610982b1366cdbc0c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5583921a498172edd5ac.js → fcab431f13b4a9f92dbf.js} +1 -1
- package/assets/esri/themes/base/_mixins.scss +3 -1
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +6 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +6 -2
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +3 -1
- package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +6 -2
- package/assets/esri/themes/base/widgets/_ColorPicker.scss +3 -1
- package/assets/esri/themes/base/widgets/_Expand.scss +3 -1
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +3 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +6 -2
- package/assets/esri/themes/base/widgets/_Popup.scss +3 -1
- package/assets/esri/themes/base/widgets/_ScaleBar.scss +7 -2
- package/assets/esri/themes/base/widgets/_SnappingControls.scss +6 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +6 -2
- package/assets/esri/themes/base/widgets/_Widget.scss +3 -1
- package/copyright.txt +19 -20
- package/core/Collection.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/set.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +17 -21
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/widgets/ElevationProfile/support/ProfileGenerationError.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00b023cb63f23bc074b8.js +0 -1
- package/assets/esri/core/workers/chunks/1e413a44b35bfecbfa59.js +0 -1
- package/assets/esri/core/workers/chunks/71c029f95cb4666ae207.js +0 -1
- package/assets/esri/core/workers/chunks/c9ef45225947ccc2bd4c.js +0 -1
- package/assets/esri/core/workers/chunks/dda6fab95d50c1215808.js +0 -1
- package/assets/esri/core/workers/chunks/f5f0a5318337439d464e.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7528],{22303:(e,t,r)=>{r.d(t,{Z:()=>p});var i,n,o=r(35270),s=r(22021),l=r(75215);function a(e){return(0,s.uZ)((0,l.vU)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class c{static blendColors(e,t,r,i=new c){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return c.fromArray((0,o.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,i=(1<<r)-1;let n=Number("0x"+e.substr(1));return isNaN(n)?null:(["b","g","r"].forEach((e=>{const o=n&i;n>>=r,t[e]=4===r?17*o:o})),t.a=1,t)}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.St)(e)?(0,o.h$)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return null!=e?new c([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}c.prototype.declaredClass="esri.Color",(n=(i=c||(c={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const p=c},92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,n=r(43697),o=r(96674),s=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=i=class extends o.wq{static get allTime(){return h}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&r===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,s.JE)(t,e));let r=this.end;if(r){const t=(0,s.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,s.Nm)(t,1,e)}return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:o}=this;return null!=n&&(r.start=(0,s.Nm)(n,e,t)),null!=o&&(r.end=(0,s.Nm)(o,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,n._)([(0,u.j)("esri.TimeExtent")],p);const h=new p,d=new p({start:void 0,end:void 0}),y=p},46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}function o(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>o,c:()=>i,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:o,fromValues:n},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{a:()=>d,c:()=>m,g:()=>c,j:()=>N,k:()=>g,m:()=>p,s:()=>u});var i=r(46521),n=r(94961),o=r(65617),s=r(46851),l=r(17896),a=r(98766);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function h(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,h,d,y=r[0],g=r[1],m=r[2],b=r[3];return c=n*y+o*g+l*m+a*b,c<0&&(c=-c,y=-y,g=-g,m=-m,b=-b),1-c>(0,s.g)()?(u=Math.acos(c),p=Math.sin(u),h=Math.sin((1-i)*u)/p,d=Math.sin(i*u)/p):(h=1-i,d=i),e[0]=h*n+d*y,e[1]=h*o+d*g,e[2]=h*l+d*m,e[3]=h*a+d*b,e}function d(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function g(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const m=a.c,b=a.s,f=a.a,v=p,w=a.b,S=a.d,_=a.l,x=a.e,C=x,j=a.f,V=j,M=a.n,N=a.g,z=a.h,R=(0,o.c)(),q=(0,o.f)(1,0,0),I=(0,o.f)(0,1,0),T=(0,n.a)(),A=(0,n.a)(),F=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:f,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:d,copy:m,dot:S,equals:z,exactEquals:N,fromEuler:g,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:C,length:x,lerp:_,mul:v,multiply:p,normalize:M,random:function(e){const t=s.R,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.e)(t,r);return i<-.999999?((0,l.f)(R,q,t),(0,l.B)(R)<1e-6&&(0,l.f)(R,I,t),(0,l.n)(R,R),u(e,R,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.f)(R,t,r),e[0]=R[0],e[1]=R[1],e[2]=R[2],e[3]=1+i,M(e,e))},scale:w,set:b,setAxes:function(e,t,r,i){const n=F;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],M(e,y(e,n))},setAxisAngle:u,slerp:h,sqlerp:function(e,t,r,i,n,o){return h(T,t,n,o),h(A,r,i,o),h(e,T,A,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}function o(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>n,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,createView:o,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>a,St:()=>n,VL:()=>s,h$:()=>o,rW:()=>u});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function o(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...o(e)]}function l(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function a(e,t,r,i=1){const n=(e%360+360)%360/360,o=r<=.5?r*(t+1):r+t-r*t,s=2*r-o;return[Math.round(255*l(s,o,n+1/3)),Math.round(255*l(s,o,n)),Math.round(255*l(s,o,n-1/3)),i]}function u(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,o=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const l=[0,0,0,1];let a;return o&&(a=s&i,s>>=r,l[3]=n*a/255),a=s&i,s>>=r,l[2]=n*a,a=s&i,s>>=r,l[1]=n*a,a=s&i,s>>=r,l[0]=n*a,l}},68251:(e,t,r)=>{r.d(t,{BV:()=>s});var i=r(22021);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.uZ)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},28576:(e,t,r)=>{r.d(t,{B:()=>p});var i=r(81153),n=r(17452),o=r(41123),s=r(7628),l=r(31263),a=r(5600),u=r(66094),c=r(25929);function p(e){const t=e?.origins??[void 0];return(r,o)=>{const p=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const o=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,c.r)(e,t,r);return o.type===String?i:"function"==typeof o.type?new o.type({url:i}):void 0},write:{writer(t,s,a,p){if(!p||!p.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,p)):void(s[a]=t.write({},p));const g=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),m=(0,c.t)(g,{...p,verifyItemRelativeUrls:p&&p.verifyItemRelativeUrls?{writtenUrls:p.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},c.M.NO),b=o.type!==String&&(!(0,i.l)(this)||p&&p.origin&&this.originIdOf(r)>(0,l.M9)(p.origin)),f={object:this,propertyName:r,value:t,targetUrl:m,dest:s,targetPropertyName:a,context:p,params:e};p&&p.portalItem&&m&&!(0,n.YP)(m)?b?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:s,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),c=y(o,r,t),p=(0,u.B)(c),g=(0,n.Ml)(a.path),m=i?.compress??!1;p===g?(t.resources&&d({...e,resource:a,content:c,compress:m,updates:t.resources.toUpdate}),s[l]=r):h(e)}(f):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(f):p&&p.portalItem&&(null==m||null!=(0,c.i)(m)||(0,n.jc)(m)||b)?h(f):s[a]=m}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.a;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=(0,a.CJ)(r,e,o);for(const e in p)t[e]=p[e]}}}function h(e){const{targetUrl:t,params:i,value:s,context:l,dest:a,targetPropertyName:p}=e;if(!l.portalItem)return;const h=(0,c.p)(t),g=h?.filename??(0,o.D)(),m=i?.prefix??h?.prefix,b=y(s,t,l),f=(0,n.v_)(m,g),v=`${f}.${(0,u.B)(b)}`,w=l.portalItem.resourceFromPath(v);(0,n.jc)(t)&&l.resources&&l.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{w.path=`${f}.${(0,u.B)(e)}`,a[p]=w.itemRelativeUrl})).catch((()=>{})));const S=i?.compress??!1;l.resources&&d({...e,resource:w,content:b,compress:S,updates:l.resources.toAdd}),a[p]=w.itemRelativeUrl}function d({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},70921:(e,t,r)=>{r.d(t,{R:()=>o,Z:()=>n});var i=r(46791);function n(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function o(e){return e}},35463:(e,t,r)=>{r.d(t,{JE:()=>s,Nm:()=>o,rJ:()=>l}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function o(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=n[r],{getter:o,setter:s,multiplier:l}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[s](i[o]()+t*l)}return i}function s(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function l(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>n,z:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,n=r(43697),o=r(67676),s=r(35454),l=r(96674),a=r(67900),u=r(20941),c=r(5600),p=(r(75215),r(80442),r(71715)),h=r(52011),d=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,o.e$)(g,"orthometric");const m=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let b=i=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(f(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.$C)(e)||m.read(e)||(r&&r.messages&&r.messages.push(f(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal"}}}})],b.prototype,"heightModel",void 0),(0,n._)([(0,d.c)("web-scene","heightModel")],b.prototype,"writeHeightModel",null),(0,n._)([(0,p.r)(["web-scene","service"],"heightModel")],b.prototype,"readHeightModel",null),(0,n._)([(0,c.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],b.prototype,"heightUnit",void 0),(0,n._)([(0,p.r)("web-scene","heightUnit")],b.prototype,"readHeightUnit",null),(0,n._)([(0,p.r)("service","heightUnit")],b.prototype,"readHeightUnitService",null),(0,n._)([(0,c.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],b.prototype,"vertCRS",void 0),(0,n._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],b.prototype,"readVertCRS",null),b=i=(0,n._)([(0,h.j)("esri.geometry.HeightModelInfo")],b);const v=b},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(43697),n=r(46791),o=r(20102),s=r(92604),l=r(16453),a=r(95330),u=r(5600),c=r(75215),p=(r(67676),r(80442),r(71715)),h=r(52011),d=r(17896),y=r(65617),g=r(6570),m=r(87085),b=r(54295),f=r(17287),v=r(38009),w=r(16859),S=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),V=r(2368),M=r(68251),N=r(96674),z=r(28576),R=r(51305),q=r(94961),I=r(46851);const T=(0,y.c)(),A=(0,q.a)(),F=(0,q.a)(),D=(0,q.a)(),Z=(0,y.f)(0,0,1),k=(0,y.f)(0,1,0),L=(0,y.f)(1,0,0);function P(e){(0,d.c)(T,e),(0,d.n)(T,T);const t=Math.atan2(T[1],T[0]),r=(0,R.s)((0,q.a)(),Z,-t);(0,d.y)(T,T,r);const i=-1*Math.atan2(T[2],T[0]);return[(0,I.a)(t)+270,(0,I.a)(i)+90]}function B(e,t){return(0,R.s)(F,Z,(0,I.t)(e-270)),(0,R.s)(D,k,(0,I.t)(t-90)),(0,R.m)(A,F,D),(0,d.c)(T,L),(0,d.y)(T,T,A),(0,d.n)(T,T),[T[0],T[1],T[2]]}var E=r(90578);let U=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],U.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],U.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],U.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],U.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],U.prototype,"point",void 0),U=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSlice")],U);const O=U;var Y=r(25929);let J=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{origins:{service:{read:Y.r}},write:{enabled:!0,isRequired:!0}}}),(0,z.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,u.Cb)({type:[c.z8],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,u.Cb)({type:[O],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSection")],J);const $=J;let H=class extends N.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let G=class extends N.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,u.Cb)({type:["discrete","continuous"],json:{write:!0}})],G.prototype,"continuity",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasNoData",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"noData",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"offset",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"scale",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"type",void 0),G=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelFormat")],G);const Q=G;let X=class extends N.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:Q,json:{write:!0}})],X.prototype,"originalFormat",void 0),(0,i._)([(0,u.Cb)({type:Q,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"renderingFormat",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],X.prototype,"unit",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],X.prototype,"volumeId",void 0),(0,i._)([(0,u.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariable")],X);const K=X;var ee=r(22974),te=r(22303);let re=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var ne=r(70921),oe=r(22021);let se=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelColorStop")],se);const le=se;let ae=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,u.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ae.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelOpacityStop")],ae);const ue=ae;let ce=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!1,write:!0}})],ce.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ce.prototype,"range",void 0),ce=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRangeFilter")],ce);const pe=ce;var he,de;(de=he||(he={}))[de.Color=1]="Color",de[de.Alpha=2]="Alpha",de[de.Both=3]="Both";let ye=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.Z.ofType(le)),this.opacityStops=new(n.Z.ofType(ue))}set colorStops(e){this._set("colorStops",(0,ne.Z)(e,this._get("colorStops"),n.Z.ofType(le)))}set opacityStops(e){this._set("opacityStops",(0,ne.Z)(e,this._get("opacityStops"),n.Z.ofType(ue)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==he.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==he.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:he.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,oe.uZ)(e.position,0,1),i=Math.round(255*(0,oe.uZ)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===he.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=he.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:he.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==he.Both)if(i.type===he.Color){const[n,o]=this.getPreviousNext(t,r,he.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,oe.t7)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,he.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;me.forEach((r=>{i.color[r]=Math.round((0,oe.t7)(t[r],s[r],e))}))}else-1!==n?me.forEach((e=>{i.color[e]=r[n].color[e]})):me.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new te.Z;me.forEach((e=>{u[e]=Math.round((0,oe.t7)(l[e],a[e],s))})),u.a=(0,oe.uZ)(1-(0,oe.t7)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,oe.uZ)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,u.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType(ue),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,u.Cb)({type:pe,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,u.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const ge=ye,me=["r","g","b"];let be=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelUniqueValue")],be);const fe=be;var ve;let we=ve=class extends N.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.Z.ofType(fe)),this.isosurfaces=new(n.Z.ofType(ie))}clone(){return new ve({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(fe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=ve=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariableStyle")],we);const Se=we;var _e=r(94139),xe=r(82971),Ce=r(8744);let je=class extends N.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],je.prototype,"values",void 0),je=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIrregularSpacing")],je);const Ve=je;let Me=class extends N.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],Me.prototype,"scale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],Me.prototype,"offset",void 0),Me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRegularSpacing")],Me);const Ne=Me;let ze=class extends N.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,u.Cb)({type:Ve,json:{write:!0}})],ze.prototype,"irregularSpacing",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isPositiveUp",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"quantity",void 0),(0,i._)([(0,u.Cb)({type:Ne,json:{write:!0}})],ze.prototype,"regularSpacing",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ze.prototype,"size",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"unit",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1}})],ze.prototype,"isRegular",null),ze=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDimension")],ze);const Re=ze,qe="esri.layers.voxel.VoxelVolume",Ie=s.Z.getLogger(qe);let Te=class extends N.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=xe.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return Ie.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ce.fS)(this.spatialReference,e.spatialReference))return Ie.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,d.b)(t,t,this.originInLayerSpace3D),(0,d.E)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new _e.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.g)(e);if((0,d.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,d.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new _e.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new _e.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"dimensions",void 0),(0,i._)([(0,u.Cb)({type:xe.Z,json:{read:{enabled:!1}}})],Te.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1}})],Te.prototype,"zDimension",null),(0,i._)([(0,u.Cb)({type:[Boolean],json:{read:!1}})],Te.prototype,"isValid",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"originInLayerSpace3D",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,u.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Te.prototype,"volumeType",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"sizeInVoxels",null),Te=(0,i._)([(0,h.j)(qe)],Te);const Ae=Te;var Fe;let De=Fe=class extends N.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Fe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"apronWidth",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"brickSize",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"maxLodLevel",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"nodeSize",void 0),De=Fe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeIndex")],De);const Ze=De;let ke=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],ke.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ke.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],ke.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],ke.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"point",void 0),ke=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDynamicSection")],ke);const Le=ke;var Pe;let Be=Pe=class extends N.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.Z.ofType(O)),this.dynamicSections=new(n.Z.ofType(Le))}set slices(e){this._set("slices",(0,ne.Z)(e,this._get("slices"),n.Z.ofType(O)))}set dynamicSections(e){this._set("dynamicSections",(0,ne.Z)(e,this._get("dynamicSections"),n.Z.ofType(Le)))}clone(){return new Pe({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"volumeId",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{default:1,write:!0}})],Be.prototype,"verticalExaggeration",void 0),(0,i._)([(0,u.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Be.prototype,"exaggerationMode",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{default:0,write:!0}})],Be.prototype,"verticalOffset",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(O),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Be.prototype,"slices",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Be.prototype,"dynamicSections",null),Be=Pe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeStyle")],Be);const Ee=Be;var Ue=r(32163);const Oe="esri.layers.VoxelLayer",Ye=s.Z.getLogger(Oe);let Je=class extends((0,_.Vt)((0,f.Y)((0,v.q)((0,w.I)((0,S.M)((0,l.R)((0,b.V)(m.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new n.Z,this.volumes=new n.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(n.Z.ofType(Ee)),this.variableStyles=new(n.Z.ofType(Se)),this.sections=new(n.Z.ofType($)),e?.constantUpscaling&&(this.test={constantUpscaling:!0})}set url(e){this._set("url",(0,x.Nm)(e,Ye))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(a.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new o.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Ae.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ue.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new $({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),Ye.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else Ye.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else Ye.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,d.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,u.Cb)({type:["Voxel"]})],Je.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)(C.rn)],Je.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Je.prototype,"title",void 0),(0,i._)([(0,u.Cb)(C.HQ)],Je.prototype,"url",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType($),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Je.prototype,"sections",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Je.prototype,"currentVariableId",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Ee),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Je.prototype,"volumeStyles",void 0),(0,i._)([(0,u.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Je.prototype,"renderMode",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Se),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Je.prototype,"variableStyles",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Je.prototype,"enableSlices",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Je.prototype,"enableSections",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Je.prototype,"enableDynamicSections",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Je.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,u.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Je.prototype,"shading",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],Je.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Je.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(K)})],Je.prototype,"variables",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Ae)})],Je.prototype,"volumes",void 0),(0,i._)([(0,u.Cb)({type:Ze})],Je.prototype,"index",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Je.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Je.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],Je.prototype,"type",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],Je.prototype,"version",void 0),(0,i._)([(0,p.r)("service","version")],Je.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:g.Z})],Je.prototype,"fullExtent",void 0),(0,i._)([(0,p.r)("service","fullExtent",["fullExtent"])],Je.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],Je.prototype,"voxelFields",null),(0,i._)([(0,u.Cb)(C.C_)],Je.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Je.prototype,"defaultPopupTemplate",null),Je=(0,i._)([(0,h.j)(Oe)],Je);const $e=Je},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66094:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(17452);function n(e){return o[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var i=r(51773),n=r(35671),o=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(29986);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},d){if(!r)return null;const g=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.Z({fieldName:t.name,isEditable:(0,n.Hp)(t,e),label:t.alias,format:h(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},d);if(!g.length)return null;const m=function(e){const t=(0,n.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.Z,new o.Z];return new i.Z({title:m,content:b,fieldInfos:g})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Fv)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:d(e)?-1:d(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function h(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,n.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function d(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7528],{22303:(e,t,r)=>{r.d(t,{Z:()=>p});var i,n,o=r(35270),s=r(22021),l=r(75215);function a(e){return(0,s.uZ)((0,l.vU)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class c{static blendColors(e,t,r,i=new c){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return c.fromArray((0,o.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,i=(1<<r)-1;let n=Number("0x"+e.substr(1));return isNaN(n)?null:(["b","g","r"].forEach((e=>{const o=n&i;n>>=r,t[e]=4===r?17*o:o})),t.a=1,t)}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.St)(e)?(0,o.h$)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return null!=e?new c([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}c.prototype.declaredClass="esri.Color",(n=(i=c||(c={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const p=c},92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,n=r(43697),o=r(96674),s=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=i=class extends o.wq{static get allTime(){return h}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&r===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,s.JE)(t,e));let r=this.end;if(r){const t=(0,s.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,s.Nm)(t,1,e)}return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:o}=this;return null!=n&&(r.start=(0,s.Nm)(n,e,t)),null!=o&&(r.end=(0,s.Nm)(o,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,n._)([(0,u.j)("esri.TimeExtent")],p);const h=new p,d=new p({start:void 0,end:void 0}),y=p},46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}function o(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>o,c:()=>i,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:o,fromValues:n},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{a:()=>d,c:()=>m,g:()=>c,j:()=>N,k:()=>g,m:()=>p,s:()=>u});var i=r(46521),n=r(94961),o=r(65617),s=r(46851),l=r(17896),a=r(98766);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function h(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,h,d,y=r[0],g=r[1],m=r[2],b=r[3];return c=n*y+o*g+l*m+a*b,c<0&&(c=-c,y=-y,g=-g,m=-m,b=-b),1-c>(0,s.g)()?(u=Math.acos(c),p=Math.sin(u),h=Math.sin((1-i)*u)/p,d=Math.sin(i*u)/p):(h=1-i,d=i),e[0]=h*n+d*y,e[1]=h*o+d*g,e[2]=h*l+d*m,e[3]=h*a+d*b,e}function d(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function g(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const m=a.c,b=a.s,f=a.a,v=p,w=a.b,S=a.d,_=a.l,x=a.e,C=x,j=a.f,V=j,M=a.n,N=a.g,z=a.h,R=(0,o.c)(),q=(0,o.f)(1,0,0),I=(0,o.f)(0,1,0),T=(0,n.a)(),A=(0,n.a)(),F=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:f,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:d,copy:m,dot:S,equals:z,exactEquals:N,fromEuler:g,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:C,length:x,lerp:_,mul:v,multiply:p,normalize:M,random:function(e){const t=s.R,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.e)(t,r);return i<-.999999?((0,l.f)(R,q,t),(0,l.B)(R)<1e-6&&(0,l.f)(R,I,t),(0,l.n)(R,R),u(e,R,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.f)(R,t,r),e[0]=R[0],e[1]=R[1],e[2]=R[2],e[3]=1+i,M(e,e))},scale:w,set:b,setAxes:function(e,t,r,i){const n=F;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],M(e,y(e,n))},setAxisAngle:u,slerp:h,sqlerp:function(e,t,r,i,n,o){return h(T,t,n,o),h(A,r,i,o),h(e,T,A,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}function o(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>n,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,createView:o,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>a,St:()=>n,VL:()=>s,h$:()=>o,rW:()=>u});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function o(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...o(e)]}function l(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function a(e,t,r,i=1){const n=(e%360+360)%360/360,o=r<=.5?r*(t+1):r+t-r*t,s=2*r-o;return[Math.round(255*l(s,o,n+1/3)),Math.round(255*l(s,o,n)),Math.round(255*l(s,o,n-1/3)),i]}function u(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,o=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const l=[0,0,0,1];let a;return o&&(a=s&i,s>>=r,l[3]=n*a/255),a=s&i,s>>=r,l[2]=n*a,a=s&i,s>>=r,l[1]=n*a,a=s&i,s>>=r,l[0]=n*a,l}},68251:(e,t,r)=>{r.d(t,{BV:()=>s});var i=r(22021);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.uZ)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},28576:(e,t,r)=>{r.d(t,{B:()=>p});var i=r(81153),n=r(17452),o=r(41123),s=r(7628),l=r(31263),a=r(5600),u=r(66094),c=r(25929);function p(e){const t=e?.origins??[void 0];return(r,o)=>{const p=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const o=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,c.r)(e,t,r);return o.type===String?i:"function"==typeof o.type?new o.type({url:i}):void 0},write:{writer(t,s,a,p){if(!p||!p.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,p)):void(s[a]=t.write({},p));const g=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),m=(0,c.t)(g,{...p,verifyItemRelativeUrls:p&&p.verifyItemRelativeUrls?{writtenUrls:p.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},c.M.NO),b=o.type!==String&&(!(0,i.l)(this)||p&&p.origin&&this.originIdOf(r)>(0,l.M9)(p.origin)),f={object:this,propertyName:r,value:t,targetUrl:m,dest:s,targetPropertyName:a,context:p,params:e};p&&p.portalItem&&m&&!(0,n.YP)(m)?b?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:s,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),c=y(o,r,t),p=(0,u.B)(c),g=(0,n.Ml)(a.path),m=i?.compress??!1;p===g?(t.resources&&d({...e,resource:a,content:c,compress:m,updates:t.resources.toUpdate}),s[l]=r):h(e)}(f):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(f):p&&p.portalItem&&(null==m||null!=(0,c.i)(m)||(0,n.jc)(m)||b)?h(f):s[a]=m}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.a;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=(0,a.CJ)(r,e,o);for(const e in p)t[e]=p[e]}}}function h(e){const{targetUrl:t,params:i,value:s,context:l,dest:a,targetPropertyName:p}=e;if(!l.portalItem)return;const h=(0,c.p)(t),g=h?.filename??(0,o.D)(),m=i?.prefix??h?.prefix,b=y(s,t,l),f=(0,n.v_)(m,g),v=`${f}.${(0,u.B)(b)}`,w=l.portalItem.resourceFromPath(v);(0,n.jc)(t)&&l.resources&&l.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{w.path=`${f}.${(0,u.B)(e)}`,a[p]=w.itemRelativeUrl})).catch((()=>{})));const S=i?.compress??!1;l.resources&&d({...e,resource:w,content:b,compress:S,updates:l.resources.toAdd}),a[p]=w.itemRelativeUrl}function d({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},70921:(e,t,r)=>{r.d(t,{R:()=>o,Z:()=>n});var i=r(46791);function n(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function o(e){return e}},35463:(e,t,r)=>{r.d(t,{JE:()=>s,Nm:()=>o,rJ:()=>l}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function o(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=n[r],{getter:o,setter:s,multiplier:l}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[s](i[o]()+t*l)}return i}function s(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function l(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>n,z:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,n=r(43697),o=r(67676),s=r(35454),l=r(96674),a=r(67900),u=r(20941),c=r(5600),p=(r(75215),r(80442),r(71715)),h=r(52011),d=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,o.e$)(g,"orthometric");const m=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let b=i=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(f(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.$C)(e)||m.read(e)||(r&&r.messages&&r.messages.push(f(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal"}}}})],b.prototype,"heightModel",void 0),(0,n._)([(0,d.c)("web-scene","heightModel")],b.prototype,"writeHeightModel",null),(0,n._)([(0,p.r)(["web-scene","service"],"heightModel")],b.prototype,"readHeightModel",null),(0,n._)([(0,c.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],b.prototype,"heightUnit",void 0),(0,n._)([(0,p.r)("web-scene","heightUnit")],b.prototype,"readHeightUnit",null),(0,n._)([(0,p.r)("service","heightUnit")],b.prototype,"readHeightUnitService",null),(0,n._)([(0,c.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],b.prototype,"vertCRS",void 0),(0,n._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],b.prototype,"readVertCRS",null),b=i=(0,n._)([(0,h.j)("esri.geometry.HeightModelInfo")],b);const v=b},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(43697),n=r(46791),o=r(20102),s=r(92604),l=r(16453),a=r(95330),u=r(5600),c=r(75215),p=(r(67676),r(80442),r(71715)),h=r(52011),d=r(17896),y=r(65617),g=r(6570),m=r(87085),b=r(54295),f=r(17287),v=r(38009),w=r(16859),S=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),V=r(2368),M=r(68251),N=r(96674),z=r(28576),R=r(51305),q=r(94961),I=r(46851);const T=(0,y.c)(),A=(0,q.a)(),F=(0,q.a)(),D=(0,q.a)(),Z=(0,y.f)(0,0,1),k=(0,y.f)(0,1,0),L=(0,y.f)(1,0,0);function P(e){(0,d.c)(T,e),(0,d.n)(T,T);const t=Math.atan2(T[1],T[0]),r=(0,R.s)((0,q.a)(),Z,-t);(0,d.y)(T,T,r);const i=-1*Math.atan2(T[2],T[0]);return[(0,I.a)(t)+270,(0,I.a)(i)+90]}function B(e,t){return(0,R.s)(F,Z,(0,I.t)(e-270)),(0,R.s)(D,k,(0,I.t)(t-90)),(0,R.m)(A,F,D),(0,d.c)(T,L),(0,d.y)(T,T,A),(0,d.n)(T,T),[T[0],T[1],T[2]]}var U=r(90578);let E=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],E.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],E.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,U.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],E.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,U.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],E.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],E.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],E.prototype,"point",void 0),E=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSlice")],E);const O=E;var Y=r(25929);let J=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{origins:{service:{read:Y.r}},write:{enabled:!0,isRequired:!0}}}),(0,z.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,u.Cb)({type:[c.z8],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,u.Cb)({type:[O],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSection")],J);const $=J;let H=class extends N.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let G=class extends N.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,u.Cb)({type:["discrete","continuous"],json:{write:!0}})],G.prototype,"continuity",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasNoData",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"noData",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"offset",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],G.prototype,"scale",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"type",void 0),G=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelFormat")],G);const Q=G;let X=class extends N.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:Q,json:{write:!0}})],X.prototype,"originalFormat",void 0),(0,i._)([(0,u.Cb)({type:Q,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"renderingFormat",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],X.prototype,"unit",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],X.prototype,"volumeId",void 0),(0,i._)([(0,u.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariable")],X);const K=X;var ee=r(22974),te=r(22303);let re=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var ne=r(70921),oe=r(22021);let se=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelColorStop")],se);const le=se;let ae=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,u.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ae.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelOpacityStop")],ae);const ue=ae;let ce=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!1,write:!0}})],ce.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ce.prototype,"range",void 0),ce=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRangeFilter")],ce);const pe=ce;var he,de;(de=he||(he={}))[de.Color=1]="Color",de[de.Alpha=2]="Alpha",de[de.Both=3]="Both";let ye=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.Z.ofType(le)),this.opacityStops=new(n.Z.ofType(ue))}set colorStops(e){this._set("colorStops",(0,ne.Z)(e,this._get("colorStops"),n.Z.ofType(le)))}set opacityStops(e){this._set("opacityStops",(0,ne.Z)(e,this._get("opacityStops"),n.Z.ofType(ue)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==he.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==he.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:he.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,oe.uZ)(e.position,0,1),i=Math.round(255*(0,oe.uZ)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===he.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=he.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:he.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==he.Both)if(i.type===he.Color){const[n,o]=this.getPreviousNext(t,r,he.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,oe.t7)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,he.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;me.forEach((r=>{i.color[r]=Math.round((0,oe.t7)(t[r],s[r],e))}))}else-1!==n?me.forEach((e=>{i.color[e]=r[n].color[e]})):me.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new te.Z;me.forEach((e=>{u[e]=Math.round((0,oe.t7)(l[e],a[e],s))})),u.a=(0,oe.uZ)(1-(0,oe.t7)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,oe.uZ)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,u.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType(ue),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,u.Cb)({type:pe,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,u.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const ge=ye,me=["r","g","b"];let be=class extends((0,V.J)(N.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,u.Cb)({type:te.Z,json:{type:[c.z8],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelUniqueValue")],be);const fe=be;var ve;let we=ve=class extends N.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.Z.ofType(fe)),this.isosurfaces=new(n.Z.ofType(ie))}clone(){return new ve({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(fe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=ve=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariableStyle")],we);const Se=we;var _e=r(94139),xe=r(82971),Ce=r(8744);let je=class extends N.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],je.prototype,"values",void 0),je=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIrregularSpacing")],je);const Ve=je;let Me=class extends N.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],Me.prototype,"scale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],Me.prototype,"offset",void 0),Me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRegularSpacing")],Me);const Ne=Me;let ze=class extends N.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,u.Cb)({type:Ve,json:{write:!0}})],ze.prototype,"irregularSpacing",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isPositiveUp",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"quantity",void 0),(0,i._)([(0,u.Cb)({type:Ne,json:{write:!0}})],ze.prototype,"regularSpacing",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ze.prototype,"size",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"unit",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1}})],ze.prototype,"isRegular",null),ze=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDimension")],ze);const Re=ze,qe="esri.layers.voxel.VoxelVolume",Ie=s.Z.getLogger(qe);let Te=class extends N.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=xe.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return Ie.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ce.fS)(this.spatialReference,e.spatialReference))return Ie.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,d.b)(t,t,this.originInLayerSpace3D),(0,d.E)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new _e.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.g)(e);if((0,d.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,d.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new _e.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new _e.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"dimensions",void 0),(0,i._)([(0,u.Cb)({type:xe.Z,json:{read:{enabled:!1}}})],Te.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1}})],Te.prototype,"zDimension",null),(0,i._)([(0,u.Cb)({type:[Boolean],json:{read:!1}})],Te.prototype,"isValid",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"originInLayerSpace3D",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,u.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Te.prototype,"volumeType",null),(0,i._)([(0,u.Cb)({type:[Number],json:{read:!1}})],Te.prototype,"sizeInVoxels",null),Te=(0,i._)([(0,h.j)(qe)],Te);const Ae=Te;var Fe;let De=Fe=class extends N.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Fe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"apronWidth",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"brickSize",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"maxLodLevel",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"nodeSize",void 0),De=Fe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeIndex")],De);const Ze=De;let ke=class extends((0,V.J)(N.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=P(this.normal);return M.BV.normalize((0,c.q9)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,u.Cb)({type:Boolean,json:{default:!0,write:!0}})],ke.prototype,"enabled",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],ke.prototype,"label",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,U.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],ke.prototype,"orientation",null),(0,i._)([(0,u.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,U.p)((e=>M.BV.normalize((0,c.q9)(e),0,!0)))],ke.prototype,"tilt",null),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"normal",void 0),(0,i._)([(0,u.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"point",void 0),ke=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDynamicSection")],ke);const Le=ke;var Pe;let Be=Pe=class extends N.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.Z.ofType(O)),this.dynamicSections=new(n.Z.ofType(Le))}set slices(e){this._set("slices",(0,ne.Z)(e,this._get("slices"),n.Z.ofType(O)))}set dynamicSections(e){this._set("dynamicSections",(0,ne.Z)(e,this._get("dynamicSections"),n.Z.ofType(Le)))}clone(){return new Pe({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,u.Cb)({type:c.z8,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"volumeId",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{default:1,write:!0}})],Be.prototype,"verticalExaggeration",void 0),(0,i._)([(0,u.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Be.prototype,"exaggerationMode",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{default:0,write:!0}})],Be.prototype,"verticalOffset",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(O),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Be.prototype,"slices",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Be.prototype,"dynamicSections",null),Be=Pe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeStyle")],Be);const Ue=Be;var Ee=r(32163);const Oe="esri.layers.VoxelLayer",Ye=s.Z.getLogger(Oe);let Je=class extends((0,_.Vt)((0,f.Y)((0,v.q)((0,w.I)((0,S.M)((0,l.R)((0,b.V)(m.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new n.Z,this.volumes=new n.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(n.Z.ofType(Ue)),this.variableStyles=new(n.Z.ofType(Se)),this.sections=new(n.Z.ofType($))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,x.Nm)(e,Ye))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(a.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new o.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Ae.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ee.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new $({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),Ye.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)Ye.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else Ye.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else Ye.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,d.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,u.Cb)({type:["Voxel"]})],Je.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)(C.rn)],Je.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Je.prototype,"title",void 0),(0,i._)([(0,u.Cb)(C.HQ)],Je.prototype,"url",null),(0,i._)([(0,u.Cb)({type:n.Z.ofType($),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Je.prototype,"sections",void 0),(0,i._)([(0,u.Cb)({type:c.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Je.prototype,"currentVariableId",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Ue),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Je.prototype,"volumeStyles",void 0),(0,i._)([(0,u.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Je.prototype,"renderMode",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Se),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Je.prototype,"variableStyles",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Je.prototype,"enableSlices",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Je.prototype,"enableSections",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Je.prototype,"enableDynamicSections",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Je.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,u.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Je.prototype,"shading",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],Je.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Je.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(K)})],Je.prototype,"variables",void 0),(0,i._)([(0,u.Cb)({type:n.Z.ofType(Ae)})],Je.prototype,"volumes",void 0),(0,i._)([(0,u.Cb)({type:Ze})],Je.prototype,"index",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Je.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Je.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],Je.prototype,"type",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],Je.prototype,"version",void 0),(0,i._)([(0,p.r)("service","version")],Je.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:g.Z})],Je.prototype,"fullExtent",void 0),(0,i._)([(0,p.r)("service","fullExtent",["fullExtent"])],Je.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],Je.prototype,"voxelFields",null),(0,i._)([(0,u.Cb)(C.C_)],Je.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Je.prototype,"defaultPopupTemplate",null),Je=(0,i._)([(0,h.j)(Oe)],Je);const $e=Je},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66094:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(17452);function n(e){return o[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var i=r(51773),n=r(35671),o=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(29986);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},d){if(!r)return null;const g=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.Z({fieldName:t.name,isEditable:(0,n.Hp)(t,e),label:t.alias,format:h(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},d);if(!g.length)return null;const m=function(e){const t=(0,n.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.Z,new o.Z];return new i.Z({title:m,content:b,fieldInfos:g})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Fv)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:d(e)?-1:d(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function h(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,n.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function d(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7096,5732,9880],{99880:(t,e,s)=>{s.d(e,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(17452);const a=r.Z.getLogger("esri.assets");function l(t){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,t)}},5732:(t,e,s)=>{s.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,s)=>{s.d(e,{A:()=>p,a:()=>l,d:()=>m,e:()=>d,f:()=>f,g:()=>y,h:()=>x,i:()=>o,j:()=>v,k:()=>u,m:()=>h,s:()=>r,t:()=>a,w:()=>c,y:()=>S,z:()=>M});var i=s(65617),n=s(46851);function r(t,e,s,i,n,r,o,a,l,h,c,u,d,f,m,p,_){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=c,t[10]=u,t[11]=d,t[12]=f,t[13]=m,t[14]=p,t[15]=_,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const s=e[1],i=e[2],n=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=s,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[11]=e[14],t[12]=n,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15],y=s*a-i*o,b=s*l-n*o,x=s*h-r*o,v=i*l-n*a,M=i*h-r*a,S=n*h-r*l,w=c*p-u*m,I=c*_-d*m,E=c*g-f*m,B=u*_-d*p,A=u*g-f*p,C=d*g-f*_;let z=y*C-b*A+x*B+v*E-M*I+S*w;return z?(z=1/z,t[0]=(a*C-l*A+h*B)*z,t[1]=(n*A-i*C-r*B)*z,t[2]=(p*S-_*M+g*v)*z,t[3]=(d*M-u*S-f*v)*z,t[4]=(l*E-o*C-h*I)*z,t[5]=(s*C-n*E+r*I)*z,t[6]=(_*x-m*S-g*b)*z,t[7]=(c*S-d*x+f*b)*z,t[8]=(o*A-a*E+h*w)*z,t[9]=(i*E-s*A-r*w)*z,t[10]=(m*M-p*x+g*y)*z,t[11]=(u*x-c*M-f*y)*z,t[12]=(a*I-o*B-l*w)*z,t[13]=(s*B-i*I+n*w)*z,t[14]=(p*b-m*v-_*y)*z,t[15]=(c*v-u*b+d*y)*z,t):null}function h(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=e[9],f=e[10],m=e[11],p=e[12],_=e[13],g=e[14],y=e[15];let b=s[0],x=s[1],v=s[2],M=s[3];return t[0]=b*i+x*a+v*u+M*p,t[1]=b*n+x*l+v*d+M*_,t[2]=b*r+x*h+v*f+M*g,t[3]=b*o+x*c+v*m+M*y,b=s[4],x=s[5],v=s[6],M=s[7],t[4]=b*i+x*a+v*u+M*p,t[5]=b*n+x*l+v*d+M*_,t[6]=b*r+x*h+v*f+M*g,t[7]=b*o+x*c+v*m+M*y,b=s[8],x=s[9],v=s[10],M=s[11],t[8]=b*i+x*a+v*u+M*p,t[9]=b*n+x*l+v*d+M*_,t[10]=b*r+x*h+v*f+M*g,t[11]=b*o+x*c+v*m+M*y,b=s[12],x=s[13],v=s[14],M=s[15],t[12]=b*i+x*a+v*u+M*p,t[13]=b*n+x*l+v*d+M*_,t[14]=b*r+x*h+v*f+M*g,t[15]=b*o+x*c+v*m+M*y,t}function c(t,e,s){const i=s[0],n=s[1],r=s[2];if(e===t)t[12]=e[0]*i+e[4]*n+e[8]*r+e[12],t[13]=e[1]*i+e[5]*n+e[9]*r+e[13],t[14]=e[2]*i+e[6]*n+e[10]*r+e[14],t[15]=e[3]*i+e[7]*n+e[11]*r+e[15];else{const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7],f=e[8],m=e[9],p=e[10],_=e[11];t[0]=s,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=p,t[11]=_,t[12]=s*i+h*n+f*r+e[12],t[13]=o*i+c*n+m*r+e[13],t[14]=a*i+u*n+p*r+e[14],t[15]=l*i+d*n+_*r+e[15]}return t}function u(t,e,s){const i=s[0],n=s[1],r=s[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,s,i){let r,o,a,l,h,c,u,d,f,m,p,_,g,y,b,x,v,M,S,w,I,E,B,A,C=i[0],z=i[1],F=i[2],O=Math.sqrt(C*C+z*z+F*F);return O<(0,n.g)()?null:(O=1/O,C*=O,z*=O,F*=O,r=Math.sin(s),o=Math.cos(s),a=1-o,l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5],m=e[6],p=e[7],_=e[8],g=e[9],y=e[10],b=e[11],x=C*C*a+o,v=z*C*a+F*r,M=F*C*a-z*r,S=C*z*a-F*r,w=z*z*a+o,I=F*z*a+C*r,E=C*F*a+z*r,B=z*F*a-C*r,A=F*F*a+o,t[0]=l*x+d*v+_*M,t[1]=h*x+f*v+g*M,t[2]=c*x+m*v+y*M,t[3]=u*x+p*v+b*M,t[4]=l*S+d*w+_*I,t[5]=h*S+f*w+g*I,t[6]=c*S+m*w+y*I,t[7]=u*S+p*w+b*I,t[8]=l*E+d*B+_*A,t[9]=h*E+f*B+g*A,t[10]=c*E+m*B+y*A,t[11]=u*E+p*B+b*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,s){if(0===e)return o(t);let i,r,a,l=s[0],h=s[1],c=s[2],u=Math.sqrt(l*l+h*h+c*c);return u<(0,n.g)()?null:(u=1/u,l*=u,h*=u,c*=u,i=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+c*i,t[2]=c*l*a-h*i,t[3]=0,t[4]=l*h*a-c*i,t[5]=h*h*a+r,t[6]=c*h*a+l*i,t[7]=0,t[8]=l*c*a+h*i,t[9]=h*c*a-l*i,t[10]=c*c*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=s,t[7]=0,t[8]=0,t[9]=-s,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=i+i,l=n+n,h=r+r,c=i*a,u=i*l,d=i*h,f=n*l,m=n*h,p=r*h,_=o*a,g=o*l,y=o*h;return t[0]=1-(f+p),t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-(c+p),t[6]=m+_,t[7]=0,t[8]=d+g,t[9]=m-_,t[10]=1-(c+f),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}const g=(0,i.c)();function y(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=e[3],l=n+n,h=r+r,c=o+o,u=n*l,d=n*h,f=n*c,m=r*h,p=r*c,_=o*c,g=a*l,y=a*h,b=a*c,x=i[0],v=i[1],M=i[2];return t[0]=(1-(m+_))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*v,t[5]=(1-(u+_))*v,t[6]=(p+g)*v,t[7]=0,t[8]=(f+y)*M,t[9]=(p-g)*M,t[10]=(1-(u+m))*M,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}function b(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t[6]=e[6]-s[6],t[7]=e[7]-s[7],t[8]=e[8]-s[8],t[9]=e[9]-s[9],t[10]=e[10]-s[10],t[11]=e[11]-s[11],t[12]=e[12]-s[12],t[13]=e[13]-s[13],t[14]=e[14]-s[14],t[15]=e[15]-s[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function v(t,e){if(t===e)return!0;const s=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=t[9],f=t[10],m=t[11],p=t[12],_=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],M=e[3],S=e[4],w=e[5],I=e[6],E=e[7],B=e[8],A=e[9],C=e[10],z=e[11],F=e[12],O=e[13],N=e[14],R=e[15],T=(0,n.g)();return Math.abs(s-b)<=T*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(i-x)<=T*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(r-v)<=T*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-M)<=T*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-S)<=T*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(l-w)<=T*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=T*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(c-E)<=T*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-B)<=T*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(d-A)<=T*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=T*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(m-z)<=T*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(p-F)<=T*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(_-O)<=T*Math.max(1,Math.abs(_),Math.abs(O))&&Math.abs(g-N)<=T*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-R)<=T*Math.max(1,Math.abs(y),Math.abs(R))}function M(t){const e=(0,n.g)(),s=t[0],i=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],c=t[9],u=t[10];return Math.abs(1-(s*s+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},adjoint:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15];return t[0]=a*(d*g-f*_)-u*(l*g-h*_)+p*(l*f-h*d),t[1]=-(i*(d*g-f*_)-u*(n*g-r*_)+p*(n*f-r*d)),t[2]=i*(l*g-h*_)-a*(n*g-r*_)+p*(n*h-r*l),t[3]=-(i*(l*f-h*d)-a*(n*f-r*d)+u*(n*h-r*l)),t[4]=-(o*(d*g-f*_)-c*(l*g-h*_)+m*(l*f-h*d)),t[5]=s*(d*g-f*_)-c*(n*g-r*_)+m*(n*f-r*d),t[6]=-(s*(l*g-h*_)-o*(n*g-r*_)+m*(n*h-r*l)),t[7]=s*(l*f-h*d)-o*(n*f-r*d)+c*(n*h-r*l),t[8]=o*(u*g-f*p)-c*(a*g-h*p)+m*(a*f-h*u),t[9]=-(s*(u*g-f*p)-c*(i*g-r*p)+m*(i*f-r*u)),t[10]=s*(a*g-h*p)-o*(i*g-r*p)+m*(i*h-r*a),t[11]=-(s*(a*f-h*u)-o*(i*f-r*u)+c*(i*h-r*a)),t[12]=-(o*(u*_-d*p)-c*(a*_-l*p)+m*(a*d-l*u)),t[13]=s*(u*_-d*p)-c*(i*_-n*p)+m*(i*d-n*u),t[14]=-(s*(a*_-l*p)-o*(i*_-n*p)+m*(i*l-n*a)),t[15]=s*(a*d-l*u)-o*(i*d-n*u)+c*(i*l-n*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],s=t[1],i=t[2],n=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],f=t[12],m=t[13],p=t[14],_=t[15];return(e*o-s*r)*(u*_-d*p)-(e*a-i*r)*(c*_-d*m)+(e*l-n*r)*(c*p-u*m)+(s*a-i*o)*(h*_-d*f)-(s*l-n*o)*(h*p-u*f)+(i*l-n*a)*(h*m-c*f)},equals:v,exactEquals:x,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=s+s,a=i+i,l=n+n,h=s*o,c=i*o,u=i*a,d=n*o,f=n*a,m=n*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-m,t[1]=c+g,t[2]=d-_,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=f+p,t[7]=0,t[8]=d+_,t[9]=f-p,t[10]=1-h-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const s=g,i=-e[0],n=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=i*i+n*n+r*r+o*o;return u>0?(s[0]=2*(a*o+c*i+l*r-h*n)/u,s[1]=2*(l*o+c*n+h*i-a*r)/u,s[2]=2*(h*o+c*r+a*n-l*i)/u):(s[0]=2*(a*o+c*i+l*r-h*n),s[1]=2*(l*o+c*n+h*i-a*r),s[2]=2*(h*o+c*r+a*n-l*i)),_(t,e,s),t},fromRotation:m,fromRotationTranslation:_,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,s,i,n){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,c=o+o,u=a+a,d=r*h,f=r*c,m=r*u,p=o*c,_=o*u,g=a*u,y=l*h,b=l*c,x=l*u,v=i[0],M=i[1],S=i[2],w=n[0],I=n[1],E=n[2],B=(1-(p+g))*v,A=(f+x)*v,C=(m-b)*v,z=(f-x)*M,F=(1-(d+g))*M,O=(_+y)*M,N=(m+b)*S,R=(_-y)*S,T=(1-(d+p))*S;return t[0]=B,t[1]=A,t[2]=C,t[3]=0,t[4]=z,t[5]=F,t[6]=O,t[7]=0,t[8]=N,t[9]=R,t[10]=T,t[11]=0,t[12]=s[0]+w-(B*w+z*I+N*E),t[13]=s[1]+I-(A*w+F*I+R*E),t[14]=s[2]+E-(C*w+O*I+T*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:p,fromYRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-s,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=s,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=0,t[3]=0,t[4]=-s,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,n,r,o){const a=1/(s-e),l=1/(n-i),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(n+i)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const s=e[0]+e[5]+e[10];let i=0;return s>0?(i=2*Math.sqrt(s+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},getScaling:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(s*s+i*i+n*n),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:M,lookAt:function(t,e,s,i){const r=e[0],a=e[1],l=e[2];let h=r-s[0],c=a-s[1],u=l-s[2];const d=(0,n.g)();if(Math.abs(h)<d&&Math.abs(c)<d&&Math.abs(u)<d)return void o(t);let f=1/Math.sqrt(h*h+c*c+u*u);h*=f,c*=f,u*=f;const m=i[0],p=i[1],_=i[2];let g=p*u-_*c,y=_*h-m*u,b=m*c-p*h;f=Math.sqrt(g*g+y*y+b*b),f?(f=1/f,g*=f,y*=f,b*=f):(g=0,y=0,b=0);let x=c*b-u*y,v=u*g-h*b,M=h*y-c*g;f=Math.sqrt(x*x+v*v+M*M),f?(f=1/f,x*=f,v*=f,M*=f):(x=0,v=0,M=0),t[0]=g,t[1]=x,t[2]=h,t[3]=0,t[4]=y,t[5]=v,t[6]=c,t[7]=0,t[8]=b,t[9]=M,t[10]=u,t[11]=0,t[12]=-(g*r+y*a+b*l),t[13]=-(x*r+v*a+M*l),t[14]=-(h*r+c*a+u*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},ortho:function(t,e,s,i,n,r,o){const a=1/(e-s),l=1/(i-n),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+s)*a,t[13]=(n+i)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,s,i,n){const r=1/Math.tan(e/2);let o;return t[0]=r/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},perspectiveFromFieldOfView:function(t,e,s,i){const n=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(n+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(n-r)*h*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},rotate:d,rotateX:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*n+h*i,t[5]=o*n+c*i,t[6]=a*n+u*i,t[7]=l*n+d*i,t[8]=h*n-r*i,t[9]=c*n-o*i,t[10]=u*n-a*i,t[11]=d*n-l*i,t},rotateY:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n-h*i,t[1]=o*n-c*i,t[2]=a*n-u*i,t[3]=l*n-d*i,t[8]=r*i+h*n,t[9]=o*i+c*n,t[10]=a*i+u*n,t[11]=l*i+d*n,t},rotateZ:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n+h*i,t[1]=o*n+c*i,t[2]=a*n+u*i,t[3]=l*n+d*i,t[4]=h*n-r*i,t[5]=c*n-o*i,t[6]=u*n-a*i,t[7]=d*n-l*i,t},scale:u,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:b,targetTo:function(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=i[0],l=i[1],h=i[2];let c=n-s[0],u=r-s[1],d=o-s[2],f=c*c+u*u+d*d;f>0&&(f=1/Math.sqrt(f),c*=f,u*=f,d*=f);let m=l*d-h*u,p=h*c-a*d,_=a*u-l*c;return f=m*m+p*p+_*_,f>0&&(f=1/Math.sqrt(f),m*=f,p*=f,_*=f),t[0]=m,t[1]=p,t[2]=_,t[3]=0,t[4]=u*_-d*p,t[5]=d*m-c*_,t[6]=c*p-u*m,t[7]=0,t[8]=c,t[9]=u,t[10]=d,t[11]=0,t[12]=n,t[13]=r,t[14]=o,t[15]=1,t},translate:c,transpose:a},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,s)=>{s.d(e,{Z:()=>z});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),l=s(22974),h=s(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),f=s(58971),m=s(5600),p=s(52421),_=s(52011),g=s(10661);class y{constructor(t,e,s,i,n){this.target=t,this.added=e,this.removed=s,this.start=i,this.deleteCount=n}}const b=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1}));function x(t){return t?t instanceof C?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function v(t){if(t&&t.length)return t[0]}function M(t,e,s,i){const n=Math.min(t.length-s,e.length-i);let r=0;for(;r<n&&t[s+r]===e[i+r];)r++;return r}function S(t,e,s,i){e&&e.forEach(((e,n,r)=>{t.push(e),S(t,s.call(i,e,n,r),s,i)}))}const w=new Set,I=new Set,E=new Set,B=new Map;let A=0,C=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,x(t)),this._emitAfterChanges(i.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,s={removed:!1,callback:e};return t.push(s),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,t.splice(t.indexOf(s),1)}))}return this._emitter.on(t,e)}once(t,e){return this.on(t,e)}add(t,e){if((0,f.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e??null);return this._splice(s,0,[t]),this._emitAfterChanges(i.ADD),this}addMany(t,e=this._items.length){if((0,f.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e);return this._splice(s,0,x(t)),this._emitAfterChanges(i.ADD),this}at(t){if((0,f.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...t){(0,f.it)(this._observable);const e=t.map(x);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)t.call(e,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(t,e){return(0,f.it)(this._observable),this._items.every(t,e)}filter(t,e){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:s})}find(t,e){return(0,f.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,f.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,f.it)(this._observable);const s=[];return S(s,this,t,e),new c(s)}forEach(t,e){return(0,f.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,f.it)(this._observable),this._items[t]}getNextIndex(t){(0,f.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,f.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,f.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,f.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,f.it)(this._observable);const s=this._items.map(t,e);return new c({items:s})}reorder(t,e=this.length-1){(0,f.it)(this._observable);const s=this.indexOf(t);if(-1!==s){if(e<0?e=0:e>=this.length&&(e=this.length-1),s!==e){if(this._emitBeforeChanges(i.MOVE))return t;this._splice(s,1),this._splice(e,0,[t]),this._emitAfterChanges(i.MOVE)}return t}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),t}push(...t){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(i.ADD)),this.length}reduce(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(t,e):s.reduce(t)}reduceRight(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(t,e):s.reduceRight(t)}remove(t){return(0,f.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,f.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(i.REMOVE))return;const e=v(this._splice(t,1));return this._emitAfterChanges(i.REMOVE),e}removeMany(t){if((0,f.it)(this._observable),!t||!t.length||this._emitBeforeChanges(i.REMOVE))return[];const e=t instanceof c?t.toArray():t,s=this._items,n=[],r=e.length;for(let t=0;t<r;t++){const i=e[t],r=s.indexOf(i);if(r>-1){const i=1+M(e,s,t+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),t+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),t}slice(t=0,e=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,f.it)(this._observable),this._items.some(t,e)}sort(t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(i.MOVE),this}splice(t,e,...s){(0,f.it)(this._observable);const n=(e?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(t,e,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...t){return(0,f.it)(this._observable),!t.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,t),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t<0&&(t+=this.length),e){if(o=i.splice(t,e),this.hasEventListener("before-remove")){const e=b.acquire();e.target=this,e.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(s,1),i.splice(t,0,r),t+=1,s-=1,n-=1);b.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=b.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let s=0;s<e;s++)t.reset(o[s]),this.emit("after-remove",t);b.release(t)}}if(s&&s.length){if(n){const t=[];for(const e of s){const s=n.ensureType(e);null==s&&null!=e||t.push(s)}s=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const l of s)e?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const t of s)i.push(t);else i.splice(t,0,...s);this._set("length",i.length)}}if((s&&s.length||o&&o.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,t,e);this.emit("after-splice",i)}return o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=t,this.emit("before-changes",s),e=s.defaultPrevented,b.release(s)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=b.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),b.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;w.clear(),I.clear(),E.clear();for(const{added:e,removed:s}of t){if(e)if(0===E.size&&0===I.size)for(const t of e)w.add(t);else for(const t of e)I.has(t)?(E.add(t),I.delete(t)):E.has(t)||w.add(t);if(s)if(0===E.size&&0===w.size)for(const t of s)I.add(t);else for(const t of s)w.has(t)?w.delete(t):(E.delete(t),I.add(t))}const s=r.Z.acquire();w.forEach((t=>{s.push(t)}));const i=r.Z.acquire();I.forEach((t=>{i.push(t)}));const n=this._items,o=e.items,a=r.Z.acquire();if(E.forEach((t=>{o.indexOf(t)!==n.indexOf(t)&&a.push(t)})),e.listeners&&(s.length||i.length||a.length)){const t={target:this,added:s,removed:i,moved:a},n=e.listeners.length;for(let s=0;s<n;s++){const i=e.listeners[s];i.removed||i.callback.call(this,t)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),E.clear()}};C.ofType=t=>{if(!t)return c;if(B.has(t))return B.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const s in t.typeMap){const i=t.typeMap[s].prototype.declaredClass;e?e+=` | ${i}`:e=i}let s=class extends c{};return(0,n._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,_.j)(`esri.core.Collection<${e}>`)],s),B.set(t,s),s},(0,n._)([(0,m.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,m.Cb)()],C.prototype,"items",null),C=c=(0,n._)([(0,_.j)("esri.core.Collection")],C);const z=C},32448:(t,e,s)=>{s.d(e,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const s=this._listenersMap&&this._listenersMap.get(t);if(!s)return!1;const i=this._target||this;return[...s].forEach((t=>{t.call(i,e)})),s.length>0}on(t,e){if(Array.isArray(t)){const s=t.map((t=>this.on(t,e)));return(0,r.AL)(s)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(t)||[];return s.push(e),this._listenersMap.set(t,s),(0,r.kB)((()=>{const s=this._listenersMap&&this._listenersMap.get(t)||[],i=s.indexOf(e);i>=0&&s.splice(i,1)}))}once(t,e){const s=this.on(t,(t=>{s.remove(),e.call(null,t)}));return s}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let s=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),t.EventedAccessor=s}(a||(a={}));const l=a},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},52421:(t,e,s)=>{function i(t){return(e,s)=>{e[s]=t}}s.d(e,{c:()=>i})},10661:(t,e,s)=>{s.d(e,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,s)=>{s.d(e,{Ed:()=>h,UI:()=>c,mt:()=>m,q6:()=>f,vr:()=>p});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(t,e,s){return(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))}async function c(t,e,s){return(await(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))).map((t=>t.value))}function u(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return u(await t)}catch(t){return d(t)}}async function m(t){try{return u(await t)}catch(t){return(0,o.r9)(t),d(t)}}function p(t,e){return new _(t,e)}let _=class extends n.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=t(s),this.promise.then((t=>{this._result=u(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],_.prototype,"value",null),(0,i._)([(0,a.Cb)()],_.prototype,"error",null),(0,i._)([(0,a.Cb)()],_.prototype,"finished",null),(0,i._)([(0,a.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],_)},24133:(t,e,s)=>{s.d(e,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}s=b.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(b.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;b.push(n)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),M.clear();s||v.length>0;){if(s||(s=v.pop(),n=v.data[v.length-1],r=M.pop()??0,o=!0),s.leaf&&(e=(0,i.cq)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),v.push(s),this._condense(v),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(v.push(s),M.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let s=t;for(x.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else x.pushArray(s.children);s=x.pop()??null}}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new I(t.slice(e,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,s,h,this._compareMinX);for(let n=e;n<=s;n+=h){const e=Math.min(n+h-1,s);y(t,n,e,l,this._compareMinY);for(let s=n;s<=e;s+=l){const n=Math.min(s+l-1,e);o.children.push(this._build(t,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=m(t,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);v.clear();const r=this._chooseSubtree(n,this._data,e,v);for(r.children.push(t),h(r,n);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(n,v,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new E(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(s,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),h=p(e,a),c=d(e)+d(a);h<i?(i=h,r=o,n=c<n?c:n):h===i&&c<n&&(n=c,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const b=new n.Z,x=new n.Z,v=new n.Z,M=new n.Z({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,s)=>{s.d(e,{Qc:()=>c,WU:()=>a,lt:()=>h});var i=s(19153),n=s(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,n.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const s=t.split("-");s.length>1&&s[0]in r&&(t=s[0],e=!0),e||(t="en")}const[s,i,o="#,##0.###"]=r[t];return{decimal:s,group:i,pattern:o}}function a(t,e){const s=o((e={...e}).locale);e.customs=s;const i=e.pattern||s.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===s.fractional&&(s.places=0),e.replace(a,function(t,e,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=e.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.substring(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.substring(0,n));const t=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=i[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let c,u,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const t=i[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(u=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-c;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",u&&(c=u,u=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(t,h[0],{decimal:n,group:i,places:s.places,round:s.round}))}(t,i,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),s=t.pattern||e.pattern,n=e.group,r=e.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const h=s.split(";");1===h.length&&h.push("-"+h[0]);const c=d(h,(e=>(e="(?:"+(0,i.Qs)(e,".")+")").replace(l,(e=>{const s={signed:!1,separator:t.strict?n:[n,""],fractional:t.fractional,decimal:r,exponent:!1},i=e.split(".");let o=t.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=t.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(s.fractional=!0),!t.places&&+o<i[1].length&&(o+=","+i[1].length),s.places=o);const l=i[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=u(t),s=d(t.fractional,(e=>{let s="";return e&&0!==t.places&&(s="\\"+t.decimal,t.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+t.places+"}"),s}),!0);let i=e+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(t.exponent,(e=>e?"([eE]"+u({signed:t.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function c(t,e){const s=h(e),i=new RegExp("^"+s.regexp+"$").exec(t);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],s.factor*=-1}return n=n.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(n)*s.factor}function u(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,i.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const s=t.groupSize,n=t.groupSize2;if(n){const t="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*["+e+"]\\d{"+s+"})";return s-n>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+e+"]\\d{"+s+"})*)"}),!0)}const d=(t,e,s)=>{if(!(t instanceof Array))return e(t);const i=[];for(let s=0;s<t.length;s++)i.push(e(t[s]));return f(i.join("|"),Boolean(s))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,s)=>{s.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(t,e,s={}){return c(t,e,s,f)}function h(t,e,s={}){return c(t,e,s,m)}function c(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.hw)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.aQ)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function u(t,e,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),s(t)}const f=l(t,((t,s)=>{u(),(0,i.vT)(t)&&(a=t,h=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,n.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??f)])}))}(t,m,e)}function f(t){return!0}function m(t){return!!t}s(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},16306:(t,e,s)=>{s.d(e,{aX:()=>M});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),h=s(8744),c=s(40488),u=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function p(t,e,s){const i="string"==typeof t?(0,m.mN)(t):t,n=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,u.default)(i.path+"/simplify",o);var l;return function(t,e,s){const i=(0,d.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=s,e}))}(a.geometries,r,n)}const _=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function b(t,e,s){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(t),new n.Z(t)}const s=(0,l.x3)(t),i=[];for(const t of s){const s=[];i.push(s),s.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const n=t[i][0],r=t[i][1],o=t[i+1][0],a=t[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),h=(a-r)/l,c=(o-n)/l,u=l/e;if(u>1){for(let t=1;t<=u-1;t++){const i=t*e,o=c*i+n,a=h*i+r;s.push([o,a])}const t=(l+Math.floor(u-1)*e)/2,i=c*t+n,o=h*t+r;s.push([i,o])}s.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new a.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,c.Sx)(e,!0)}return s&&(t=(0,l.Sy)(t,s)),t}function x(t,e,s){if(Array.isArray(t)){const i=t[0];if(i>e){const s=(0,l.XZ)(i,e);t[0]=i+s*(-2*e)}else if(i<s){const e=(0,l.XZ)(i,s);t[0]=i+e*(-2*s)}}else{const i=t.x;if(i>e){const s=(0,l.XZ)(i,e);t=t.clone().offset(s*(-2*e),0)}else if(i<s){const e=(0,l.XZ)(i,s);t=t.clone().offset(e*(-2*s),0)}}return t}function v(t,e){let s=-1;for(let i=0;i<e.cutIndexes.length;i++){const n=e.cutIndexes[i],r=e.geometries[i],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const i=e[t][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<e.length;s++){const e=r.getPoint(t,s);r.setPoint(t,s,e.clone().offset(i,0))}return!0}}))}if(n===s){if(g(t))for(const e of(0,l.x3)(r))t[n]=t[n].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[n]=t[n].addPath(e)}else s=n,t[n]=r}return t}async function M(t,e,s){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??i.default.geometryServiceUrl;let r,m,g,y,S,w,I,E,B=0;const A=[],C=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,m=(0,h.C5)(r),g=r.isWebMercator,w=g?102100:4326,y=l.UZ[w].maxX,S=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),m)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),y,S));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>x(t,y,S))),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,m);C.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,s=(0,l.XZ)(t.xmin,S)*(2*y);let i=0===s?e.clone():(0,l.Sy)(e.clone(),s);t.offset(s,0),t.intersects(I)&&t.xmax!==y?(B=t.xmax>B?t.xmax:B,i=b(i,g),A.push(i),C.push("cut")):t.intersects(E)&&t.xmin!==S?(B=t.xmax*(2*y)>B?t.xmax*(2*y):B,i=b(i,g,360),A.push(i),C.push("cut")):C.push(i)}else C.push(e.clone());else C.push(e);else C.push(e);let z=(0,l.XZ)(B,y),F=-90;const O=z,N=new a.Z;for(;z>0;){const t=360*z-180;N.addPath([[t,F],[t,-1*F]]),F*=-1,z--}if(A.length>0&&O>0){const e=v(A,await async function(t,e,s,i){const n=(0,f.en)(t),r=e[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},a=await(0,u.default)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(n,A,N,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=e.shift(),o=t[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,c.$)(n):n)}}if(!i.length)return r;const o=await p(n,i,s),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(g?(0,c.$)(o.shift()):o.shift())}return a}const R=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)R.push(e);else{const t=A.shift();R.push(!0===g?(0,c.$)(t):t)}}return R}},73913:(t,e,s)=>{s.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const s=h(t);for(const t of s)for(const s of t)s[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,s)=>{s.d(e,{Kd:()=>a,Ze:()=>u,qe:()=>h});var i=s(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===n&&(n=o()),n}const l=[];function h(t){return l.push(t),(0,i.kB)((()=>l.splice(l.indexOf(t),1)))}const c=[];function u(t){return c.push(t),(0,i.kB)((()=>l.splice(c.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();n!==t&&(n=t,[...c].forEach((e=>{e.call(null,t)})),[...l].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,s)=>{s.d(e,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,s)=>{s.d(e,{Z:()=>_});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),c=s(29730),u=s(70272),d=s(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new u.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,c.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var m=s(11490);const p=(0,o.Ue)();class _{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,o.JR)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let n;if(this._markedIds.add(e),s?(t.displayId=s.displayId,n=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);n=(0,l.$)(null!=n?n:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(e,n),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,s)=>{s.r(e),s.d(e,{default:()=>$}),s(66577);var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(17452),h=s(44547),c=s(37455),u=s(8744),d=s(40488),f=s(70272),m=s(5428),p=s(57191),_=s(37427),g=s(64106),y=s(14808),b=s(35671);const x=/^\s*"([\S\s]*)"\s*$/,v=/""/g,M="\n",S=[","," ",";","|","\t"];function*w(t,e,s){let i=0;for(;i<=t.length;){const n=t.indexOf(e,i),r=t.substring(i,n>-1?n:void 0);i+=r.length+e.length,s&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":M;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function B(t,e,s){t=t.trim(),e=e?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...S])).filter((t=>null!=t));for(const s of n){const n=z(t,s).length,r=z(e,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const i=O(C(t,e).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:e,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*A(t,e,s,i=(()=>Object.create(null))){const n=I(t);n.next();let r="",o="",a=0,l=i(),h=0;t:for(const t of n){const n=E(t,s);for(const t of n)if(r+=o+t,o="",a+=F(t),a%2==0){if(a>0){const t=x.exec(r);if(!t){l=i(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(v,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=s;0===a?(yield l,l=i(),h=0):o=M}}function C(t,e){const s=z(t,e).filter((t=>null!=t)),i=s.map((t=>(0,b.q6)(t)));for(let t=i.length-1;t>=0;t--)i[t]||(i.splice(t,1),s.splice(t,1));return{names:i,aliases:s}}function z(t,e){if(!t?.length)return[];const s=[];let i="",n="",r=0;const o=E(t,e);for(const t of o)if(i+=n+t,n="",r+=F(t),r%2==0){if(r>0){const t=x.exec(i);t&&s.push(t[1].replaceAll(v,'"'))}else s.push(i);i="",r=0}else n=e;return s}function F(t){let e=0,s=0;for(s=t.indexOf('"',s);s>=0;)e++,s=t.indexOf('"',s+1);return e}function O(t,e,s){e=(0,b.q6)(e)?.toLowerCase(),s=(0,b.q6)(s)?.toLowerCase();const i=t.map((t=>t.toLowerCase())),n=e?t[i.indexOf(e)]:null,r=s?t[i.indexOf(s)]:null;return{longitudeFieldName:n||t[i.indexOf(X.find((t=>i.includes(t))))],latitudeFieldName:r||t[i.indexOf(D.find((t=>i.includes(t))))]}}function N(t,e,s,i,n){const r=[],o=A(t,s,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<s.length;t++){const e=s[t],o=i[t];if(e===n.longitudeFieldName||e===n.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,s;switch(R(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",s=36;break;default:t="esriFieldTypeString",s=255}r.push({name:e,type:t,alias:o,length:s})}}return r}function R(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let s=!1;if(""!==t){if(e.test(t))s=!0;else{let e=Z(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";s=!0}else s=!0}else s=!0}return s?/^[-]?\d*[.,]?\d*$/.test(t)?"string":T(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function T(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let s=!0;if(!q&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!L.test(t[i]),i++;s=!e}}return s}const Z=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),s=new RegExp("["+t.group+"\\s\\xa0]","g"),i=t.factor;return n=>{const r=e.exec(n);if(t.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(s,"").replace(t.decimal,"."),+o*t.factor}}(),L=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,q=Number.isNaN(new Date("technology 10").getTime()),D=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],X=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var k=s(25278),j=s(99514),Y=s(82971);const P=(0,k.bU)("esriGeometryPoint"),V=["csv"],U=[0,0];class J{constructor(t,e){this.x=t,this.y=e}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[s]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),i=function(t,e){const s=e.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,l.vt)(e.url,V)||"csv",drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:c,locationInfo:u}=B(a,h,s);if(!c)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:s});if(!u)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:s});i.locationInfo=u,i.delimiter=c;const{names:d,aliases:f}=C(a,c),m=N(t,i.delimiter,d,f,i.locationInfo);if(s.fields?.length){const t=new j.Z(s.fields);for(const e of m){const s=t.get(e.name);s&&Object.assign(e,s)}}if(!m.some((t=>"esriFieldTypeOID"===t.type&&(n.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=t.name,m.unshift(t)}n.fields=m;const p=new j.Z(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=p.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=p.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const t=n.timeInfo;if(t.startTimeField){const e=p.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=p.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=p.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(n.timeInfo=null)}return i}(s,t);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const n=await this._createFeatures(s);this._queryEngine.featureStore.addMany(n);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=o,a){const{start:t,end:e}=a;i.layerDefinition.timeInfo.timeExtent=[t,e]}return i}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const n=(0,l.mN)(e);return(await(0,i.default)(n.path,{query:{...n.query,...s},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:s,extent:i,timeInfo:n}=t.layerDefinition,r=new p.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new g.q({fields:s,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:e,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=n.fields.filter((t=>t.name!==i)).map((t=>t.name));let p=0;const _={};for(const t of n.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,b.os)(t);void 0!==e&&(_[t.name]=e)}const g=A(t,l,this._delimiter,(0,k.Dm)(_,i));for(const t of g){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[s]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[s]=l;for(const i in t)if(i!==e&&i!==s)if(n.isDateField(i)){const e=new Date(t[i]);t[i]=T(e,t[i])?e.getTime():null}else if(n.isNumericField(i)){const e=Z(t[i]);isNaN(e)?t[i]=null:t[i]=e}t[i]=p,p++,o.push(new J(l,r)),a.push(t)}}if(!(0,u.fS)({wkid:4326},r))if((0,u.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,U);else o=(0,h.oj)(c.N,o,Y.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:s}=o[t],n=a[t];n[i]=t+1,y.push(new f.u_(new m.Z([],[e,s]),n,null,n[i]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=Z(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,_._W)(u.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,s)=>{s.d(e,{Dm:()=>c,Hq:()=>u,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(t,e){if((0,i.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this.${e} = null;`;for(const e in t)s+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function u(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,s)=>{s.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,n.mN)(t):(0,i.d9)(t)}function a(t,e,s){const i={};for(const n in t){if("declaredClass"===n)continue;const r=t[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let t=0;t<r.length;t++)i[n][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s&&s[n]);i[n]=e?t:JSON.stringify(t)}else i[n]=e?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>h});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|