@arcgis/core 4.33.0-next.20250227 → 4.33.0-next.20250228
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/WebLinkChart.js +1 -1
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +2 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{3170552a6310725d7730.js → 05b7c739115be0490583.js} +1 -1
- package/assets/esri/core/workers/chunks/2c227d97d00b3849f441.js +1 -0
- package/assets/esri/core/workers/chunks/2ce80c764cca9e6a20cd.js +1 -0
- package/assets/esri/core/workers/chunks/6f9bfa6ed34ef6efcc6f.js +1 -0
- package/assets/esri/core/workers/chunks/8abd2235aa702d8b239f.js +1 -0
- package/assets/esri/core/workers/chunks/a288c2474ef193f9fbd3.js +1 -0
- package/assets/esri/core/workers/chunks/{e118245566be994a53da.js → a901c445d36f1a9e7df8.js} +1 -1
- package/assets/esri/core/workers/chunks/a91f2d1deb950f46ad09.js +1 -0
- package/assets/esri/core/workers/chunks/b8416f2560710258c239.js +1 -0
- package/assets/esri/core/workers/chunks/f45ef721d21388846101.js +1 -0
- package/assets/esri/core/workers/chunks/{2d4bfd747580ed3b6f4d.js → fdab6921d007929ab288.js} +1 -1
- package/assets/esri/themes/base/widgets/_Sketch.scss +4 -4
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/interfaces.d.ts +17 -15
- package/intl/duration.js +1 -1
- package/intl/locale.js +1 -1
- package/intl/messages.js +1 -1
- package/layers/BingMapsLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/support/rasterDatasets/covJSONParser.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +11 -11
- package/views/3d/webgl-engine/core/shaderLibrary/util/LookupCubemapFromTextureArray.glsl.js +39 -0
- package/views/3d/webgl-engine/core/shaderModules/Texture2DArrayBindUniform.js +5 -0
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/chartUtilsAm5.js +1 -1
- package/assets/esri/core/workers/chunks/22e7db720724f2426d74.js +0 -1
- package/assets/esri/core/workers/chunks/2515ace848cf078c6263.js +0 -1
- package/assets/esri/core/workers/chunks/2c348d0e8131f08391cb.js +0 -1
- package/assets/esri/core/workers/chunks/380128e2cb74798478c1.js +0 -1
- package/assets/esri/core/workers/chunks/68ac336f7384bbca85ab.js +0 -1
- package/assets/esri/core/workers/chunks/823bf95f42cc42f20e22.js +0 -1
- package/assets/esri/core/workers/chunks/84e50d3ff298b7b66070.js +0 -1
- package/assets/esri/core/workers/chunks/aa98a6c38e82d384403c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,a.MZ)()],t.prototype,"title",null),(0,s._)([(0,a.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>y});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),h=i(86738),f=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,h=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+h*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+h*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),h=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let m=s=class extends f.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const y=m},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),a=i(78888),n=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),h=i(3694),f=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),x=i(4718),v=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,x.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,o[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:o},valid:!0,data:new Array(n*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a,n){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;n.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.G4)(l))return;const p=new w.U(e,t,i,r),m={...a,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,f.u7)(n,(()=>t((0,f.NK)())));const i=_(r);let a=this._pendingTilemapRequests[i];if(!a){a=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ge});var s=i(90237),r=i(13874),a=i(69540),n=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),h=i(10107),f=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),x=i(89015),v=i(16131),b=i(8303),I=i(63660),_=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),M=i(20437),C=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),E=i(16930),L=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function V(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function $(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?a=e:V(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter(((e,t)=>!(t===a||t===n)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[a]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),h=null==u||"CRS84"===u?4326:Number(u),f=new E.A({wkid:h}),[p,d]=s[a],[m,y]=s[n],g=new N.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:f});return{width:Math.round(g.width/r[a]),height:Math.round(g.height/r[n]),extent:g,dimensions:o}}function U(e){const t=(0,L.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function G(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=U(r)),a&&(t[e].unit=a.label?U(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const a=e.label?U(e.label):null;if(r.Label=a,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Z(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function H(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var q=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:h,pixelType:f}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new E.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/h},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new W.A({width:u,height:h,pixelType:f,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,Y.lD)(e,t,r,a)),l=null!=s.statistics,u=null!=s.histograms,h=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),f=await(0,c.Lx)([o,h]);if(!f[0].value&&f[1].value)throw new n.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,l||(s.statistics=f[1].value?.statistics),u||(s.histograms=f[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map((e=>new q.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),n=(0,X.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],Q.prototype,"source",void 0),(0,s._)([(0,h.MZ)()],Q.prototype,"url",null),Q=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,K.eH)(i[0]),l=a?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new n.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new n.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new n.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:o}=s[e];if(!("ndarray"===a.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new n.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!V(t[t.length-2]))throw new n.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=$(e),{ranges:a}=e,n=Object.keys(a).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=G(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:h}=a[s],f=h.length>2?e*h.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=h.slice(0,-2),m="float"===l?"f32":Z(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const a=B.A.createEmptyBand(m,y),n=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[H(p,d,s)+f]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const h=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:n}}(t)}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ae=i(21325),ne=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new E.A({wkid:t});if(e=String(e).trim(),(0,ae.jp)(e))return new E.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(n);const l=new E.A(t?{wkid:t}:{wkt:n}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new E.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function he(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,ne.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ne.mX)(e);t.spatialReference=ce(i)}}else if((0,ne.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ne.V6)(e,"GeodataXform"),i=ce((0,ne.v7)(t,"SpatialReference/WKID")||(0,ne.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ne.v7)(t,"PolynomialOrder")??1,r=(0,ne.Ui)(t,"CoeffX/Double"),a=(0,ne.Ui)(t,"CoeffY/Double"),n=(0,ne.Ui)(t,"InverseCoeffX/Double"),o=(0,ne.Ui)(t,"InverseCoeffY/Double"),l=le(r,a),c=le(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ne.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,ne.mX)(e)));else if((0,ne.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ne.v7)(e,"NoDataValue"),i=(0,ne.V6)(e,"Histograms/HistItem"),s=(0,ne.v7)(i,"HistMin"),r=(0,ne.v7)(i,"HistMax"),a=(0,ne.v7)(i,"BucketCount"),n=(0,ne.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,ne.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=(0,ne.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(re.Ru):null}return t}var fe=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new E.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let h=!0;if(a){const e=a.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(a=null,c=u)}const f=new ee({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,fe.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new n.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new n.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=he(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ye=i(84952),ge=i(86738),we=i(20223),xe=i(87045),ve=i(25943),be=i(73037),Ie=i(82371);let _e=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal});if(!h)return null;const f=o?n.tileSize:r.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=r.blockBoundary[e];if("jpg"!==r.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=r,{x:w,y:x}=this.getPyramidPixelSize(e),v=Math.round((a.xmin-m.x)/w)%y,b=Math.round((a.xmax-m.x)/w)%y||y,I=Math.round((m.y-a.ymax)/x)%g,_=Math.round((m.y-a.ymin)/x)%g||g,S=i===d.minCol?v:0,A=t===d.minRow?I:0,T=i===d.maxCol?b:y,R=t===d.maxRow?_:g;return(0,Y.z$)(p,{x:S,y:A},{width:T-S,height:R-A}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new n.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new n.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new n.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return xe.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=a))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return xe.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=a}))})}return xe.A.fromJSON(e)}(s.tileInfo,s):xe.A.fromJSON(s.tileInfo);(0,me.Lw)(a);const[o,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,h=.5/r.width*u.x,f=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=a.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const x=this.computeBlockBoundary(c,m,y,a.origin,g,d),v=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:v,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,transposeInfo:b,blockBoundary:x}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ye.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new ve.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=E.A.fromJSON(t.spatialReference||e.spatialReference),a=new ge.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),n=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??a));let h=n;return l>0&&(h=r.find((e=>Math.abs(e.scale-l)<s))??n,this._levelOffset=h.level-n.level),[u,h]}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],_e.prototype,"tileType",void 0),_e=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],_e);const Se=_e;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Me=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new B.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),x=new Uint8Array(w),v=[];let b=0;for(y=0;y<d;y++)v.push(b),x.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(x.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:v,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(h!==r||f!==a){let e=_.mask;if(e)for(y=0;y<a;y++)if(T=y*r,y<f)for(A=h;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),_.mask=e,y=0;y<f;y++)for(T=y*r,A=0;A<h;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(h/l/u**y)-1,t=Math.ceil(f/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=a**h,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ne.V6)(e,"MRF_META/Raster");if(!t)throw new n.A("mrf:open","not a valid MRF format");const i=(0,ne.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),o=((0,ne.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new n.A("mrf:open","currently does not support compression "+o);const l=(0,ne.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new n.A("mrf:open","currently does not support pixel type "+l);const u=(0,ne.V6)(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=(0,ne.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,ne.V6)(e,"MRF_META/CachedSource"))throw new n.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,ne.V6)(e,"MRF_META/GeoTags"),g=(0,ne.V6)(y,"BoundingBox");let w,x=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,ne.mX)(y,"Projection")||"";let a=E.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new E.A({wkid:e}))}else a=ce(r)??E.A.WGS84;else x=!0,a=new E.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=a}else x=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new E.A({wkid:3857})});const v=(0,ne.V6)(e,"MRF_META/Rsets"),b=parseInt(v?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new we.A({origin:new ge.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:b}),S=new ge.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:x,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,ne.mX)(e,"datafile"),R=(0,ne.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return he(t)}catch{return null}}};(0,s._)([(0,h.MZ)()],Me.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Me.prototype,"_storageIndex",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Me.prototype,"datasetFormat",void 0),Me=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Me);const Ce=Me;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),a=r.map((e=>e.name)),n=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})})),{displayFieldName:"",fields:r,features:n}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(47915);const Ne=(e,t)=>e.get(t)?.values,Ee=(e,t)=>e.get(t)?.values?.[0];let Le=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new n.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,ke.uT)(i),l=[];await this._readIFDs(l,i,s,r,0,a?8:4,t);const{imageInfo:c,rasterInfo:u}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new E.A({wkid:3857}));const x=new N.A({...t.extent,spatialReference:g}),v=new ge.A(x?{x:x.xmin,y:x.ymax,spatialReference:g}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:v,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ge.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Ee(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:x,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ge.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),f=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:l,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new n.A("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new n.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=l[0].get("PREDICTOR")?.values?.[0],d=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new n.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!m){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ge.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,u)}y.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||m||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(u),this.updateTileInfo()}async _readIFDs(e,t,i,s,r,a=4,n){if(!s)return null;(s>=t.byteLength||s<0)&&(t=(await this.request(this.url,{range:{from:s+r,to:s+r+this._bufferSize},responseType:"array-buffer",signal:n})).data,r=s+r,s=0);const o=await this._readIFD(t,i,s,r,De.A.tiffTags,a,n);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-r,r,a,n)}async _readIFD(e,t,i,s,r=De.A.tiffTags,a=4,n){if(!e)return null;const o=(0,ke.JM)(e,t,i,s,r,a);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const r=i.map((e=>e.offlineOffsetSize)).filter(re.Ru),a=Math.min.apply(null,r.map((e=>e[0])));if(Math.min.apply(null,r.map((e=>e[0]+e[1])))-a<=this._bufferSize){const{data:r}=await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:n});e=r,s=a,i.forEach((i=>(0,ke.Cr)(e,t,i,s)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),r=i?.values;if(r&&r.length>4){const a=r[0]+"."+r[1]+"."+r[2],o=await this._readIFD(e,t,i.valueOffset+6-s,s,De.A.geoKeys,2,n);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[a]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:s,to:s+o.requiredBufferSize+4},responseType:"array-buffer",signal:n});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,s,De.A.tiffTags,4,n)}}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const s=h[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let x,v,b;if(o!==y||l!==g){let e=w.mask;if(e)for(x=0;x<g;x++)if(b=x*y,x<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),w.mask=e,x=0;x<l;x++)for(b=x*y,v=0;v<o;v++)e[b+v]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const h=Ne(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<f||i<p)return null;const y=Ee(l,"IMAGEWIDTH"),g=Ee(l,"IMAGELENGTH"),w=Ee(l,"TILEWIDTH"),x=Ee(l,"TILELENGTH"),v=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;v[s]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;v.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%x||x}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return he(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,h.MZ)()],Le.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Le.prototype,"_headerInfo",void 0),(0,s._)([(0,h.MZ)()],Le.prototype,"_bufferSize",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Le);const Be=Le,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Ce}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),a){if(!this.supportedFormats.has(a))throw new n.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new n.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(a).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,ze.get(a).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var Ve=i(6049),$e=i(30291),Ue=i(92935);let je=class extends((0,g.dM)((0,A.j)((0,v.q)((0,b.A)((0,_.H)((0,w.d)((0,x.o)((0,I.G)((0,T.e)((0,y.b)((0,S.J)((0,l.P)(a.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ue.X.SAVE:return r(this,t);case Ue.X.SAVE_AS:return a(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,C.rZ)("Pixel Value"),(0,C.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,C.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,C.DV)(t),s=(0,C.y6)();e.push(i,s)}if(r){const t=(0,C.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==C.F_.rawServicePixelValue))),s=(0,$e.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,C.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,f.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof n.A)throw e;throw new n.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ue.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ue.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new n.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new n.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,Ve.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),a=r.findIndex((e=>null==e));if(a>-1)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new n.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new n.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,Ve.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof n.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,s._)([(0,h.MZ)({clonable:!1})],je.prototype,"_primaryRasters",void 0),(0,s._)([(0,h.MZ)(R.fV)],je.prototype,"legendEnabled",void 0),(0,s._)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],je.prototype,"isReference",void 0),(0,s._)([(0,h.MZ)({type:["show","hide"]})],je.prototype,"listMode",void 0),(0,s._)([(0,h.MZ)({json:{read:!0,write:!0}})],je.prototype,"blendMode",void 0),(0,s._)([(0,h.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],je.prototype,"rasterFunction",void 0),(0,s._)([(0,h.MZ)()],je.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],je.prototype,"version",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"type",void 0),(0,s._)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],je.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],je.prototype,"popupEnabled",void 0),(0,s._)([(0,h.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],je.prototype,"popupTemplate",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],je.prototype,"defaultPopupTemplate",null),(0,s._)([(0,h.MZ)({readOnly:!0,type:[M.A]})],je.prototype,"fields",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,type:[M.A]})],je.prototype,"rasterFields",null),(0,s._)([(0,h.MZ)({constructOnly:!0})],je.prototype,"source",void 0),je=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],je);const Ge=je},56551:(e,t,i)=>{i.d(t,{H:()=>p});var s=i(90237),r=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let h=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],h.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],h.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],h.prototype,"renderer",void 0),h=(0,s._)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],h);const f=h,p=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const u=c},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>f,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function h(e,t,i){const h=(0,c.Dl)(e),{rasterFunction:f,sourceJSON:p}=t||{},d=f?JSON.stringify(f.rasterFunctionDefinition||f):null,m=(0,c.lF)({...h.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=h.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,x=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,v=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,x,v,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),M=n.A.fromJSON(g.spatialReference||g.extent.spatialReference),C="fulfilled"===_[0].status?_[0].value?.data:null,O=C?.features?.length?u.A.fromJSON(C):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const V=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:M,pixelSize:new a.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:M}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:V})}function f(e,t,i){return h(e,{sourceJSON:t},i)}function p(e,t,i){return h(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(90237),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var i,n,o=a(90237),s=a(67996),r=a(5503),l=a(49186),h=a(53966),d=a(91869),u=a(92071),c=a(74887),p=a(36708),y=a(10107),g=(a(44208),a(87811),a(40608)),m=a(35666),f=a(5443),M=a(86738),L=a(82799),b=a(4146),w=a(90708),T=a(15375);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absolute-value";var C=a(80340),k=a(70643),N=a(85342),v=a(69860),x=a(30504),D=a(63074),E=a(16131),I=a(25036),_=a(10873),A=a(8460),S=a(88613);let R=class extends((0,E.q)((0,D.dM)((0,I.j)((0,u.P)(b.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(k.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(k.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new l.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new l.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new C.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,S.fetchKnowledgeGraph)(this.url).then((async i=>{i.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),i.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const n=this.linkChart?.linkChartProperties;if(n?.originIdOf("entitiesUrl")===m.Gr.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await s.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:n?.entitiesUrl,relationshipsUrl:n?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:n?.layoutSettings??void 0,layoutMode:(0,x.k5)(n.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=v.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,d.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,c.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):h.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,x.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings}),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,c.Te)(t?.signal)}catch(e){throw(0,c.zf)(e)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,d.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,s=new Map,r=new Map,u=new Map,p=new Uint8Array(a.length),y=new Float64Array(a.length),g=new Float64Array(a.length),m=new Float64Array(a.length),b=new Float64Array(a.length),C=new Uint32Array(i.length),k=new Uint32Array(i.length),N=new Float64Array(i.length),v=new Float64Array(i.length),x=[],D=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let E,I="organic-standard",_=0,S=0;const R=A.i6.apply;switch(I="geographic-organic-standard"===e?"organic-standard":e,I){case"organic-standard":E=A.pM.apply;break;case"organic-community":E=A.Tu.apply;break;case"hierarchical-bottom-to-top":E=A.$C.apply;break;case"radial-root-centric":E=A.vJ.apply;break;case"tree-left-to-right":E=A.Xq.apply;break;default:E=A.Wg.apply}let z=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[T.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?p[_]=A.tx.IsGeographic:p[_]=A.tx.None;const n=t.lockedNodeLocations.get(i.attributes[T.dr]);y[_]=n.x,g[_]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){p[_]=A.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[_]=t?.x,g[_]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[_]=e.x,g[_]=e.y):p[_]=A.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[_]=e.x,g[_]=e.y):p[_]=A.tx.IsMovable;break;default:p[_]=A.tx.IsMovable}(null==y[_]||null==g[_]||Number.isNaN(y[_])||Number.isNaN(g[_]))&&(p[_]=A.tx.IsMovable,y[_]=0,g[_]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!z&&t?.lockedNodeLocations?.has(i.attributes[T.dr])&&(z=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;m[_]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;b[_]=r?new Date(r).getTime():NaN,y[_]=0,g[_]=0,p[_]=A.tx.IsMovable}else p[_]=A.tx.IsMovable,y[_]=0,g[_]=0;u.set(i.attributes[T.dr],_),x[_]={feature:i,typeName:a},_++})),z&&h.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let G=!1;const P=new Map;i.forEach((a=>{const i=a.feature.attributes[T.Cz],o=a.feature.attributes[T.KQ],s=u.get(i),r=u.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,c=l?.endField,p=c?a.feature.attributes[c]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const l=P.get(t),h=l?.has(a.typeName);h||(C[S]=s,k[S]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(N[S]=d?new Date(d).getTime():NaN,v[S]=p?new Date(p).getTime():NaN),void 0===l?P.set(t,new Map([[a.typeName,S]])):l.set(a.typeName,S),S++),n.push(a)}else G=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),G&&h.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const F=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),O=this._convertValidatedOrganicSettingsToCalculationSettings(F);await(0,A.Hh)();let U=A.JT.Error,Z=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:U,links:Z,graphics:a}=R((()=>t?.signal?.aborted??!1),p,y,g,m,b,C.subarray(0,S),k.subarray(0,S),N.subarray(0,S),v.subarray(0,S),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),U===A.JT.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:U,links:Z}=E((()=>t?.signal?.aborted??!1),p,y,g,C.subarray(0,S),k.subarray(0,S),O.computationBudgetTime,O.idealEdgeLengthMultiplier,O.repulsionRadiusMultiplier));if((0,c.Te)(t?.signal),U===A.JT.Error)throw new l.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(U===A.JT.Canceled)throw(0,c.NK)();for(let e=0;e<x.length;e++){if(g[e]>84.9999?g[e]=84.9999:g[e]<-84.9999&&(g[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),x[e].feature.attributes[T.T1]=new M.A(y[e],g[e]),o.has(x[e].typeName)){const t=o.get(x[e].typeName);t?.set(x[e].feature.attributes[T.dr],x[e].feature)}else{const t=new Map;t.set(x[e].feature.attributes[T.dr],x[e].feature),o.set(x[e].typeName,t)}r.set(x[e].feature.attributes[T.dr],x[e].feature);const t=(0,w.Ux)(x[e].feature.attributes[T.T1]);this.entityLinkChartDiagramLookup.set(x[e].feature.attributes[T.dr],x[e].feature.attributes[T.T1]?t:null);const a=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,x[e].typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(a.members,x[e].feature.attributes[T.dr],(()=>({id:x[e].feature.attributes[T.dr],linkChartLocation:void 0}))).linkChartLocation=x[e].feature.attributes[T.T1],x[e].feature.attributes[T.T1].x<D.xmin&&(D.xmin=x[e].feature.attributes[T.T1].x),x[e].feature.attributes[T.T1].x>D.xmax&&(D.xmax=x[e].feature.attributes[T.T1].x),x[e].feature.attributes[T.T1].y<D.ymin&&(D.ymin=x[e].feature.attributes[T.T1].y),x[e].feature.attributes[T.T1].y>D.ymax&&(D.ymax=x[e].feature.attributes[T.T1].y)}if(this.linkChartExtent.xmin=D.xmin,this.linkChartExtent.xmax=D.xmax,this.linkChartExtent.ymin=D.ymin,this.linkChartExtent.ymax=D.ymax,!Z)throw new l.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const B=new Map,j=new Map,Q=new Map,J=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],l=o.feature.attributes[T.Cz],c=o.feature.attributes[T.KQ];let p=l+"-"+c;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;p+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=P.get(p).get(o.typeName),g=0===y?0:Z?.vertexEndIndex[y-1];if(!J.has(y)){if(J.add(y),Z.types[y]===A.J.Recursive){const e=[Z.vertices[2*g],Z.vertices[2*g+1]],t=[Z.vertices[2*(g+1)],Z.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(Z.types[y]!==A.J.Regular){h.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<Z.vertexEndIndex[y];e++)i.push([Z.vertices[2*e],Z.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=x[u.get(l)]?.feature.attributes[T.T1],t=x[u.get(c)]?.feature.attributes[T.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);B.has(p)?B.get(p).push(i):B.set(p,[i])}const m=B.get(p);j.has(p)||(j.set(p,new Map),Q.set(p,new Map));const f=j.get(p),M=Q.get(p);f.has(o.typeName)||(f.set(o.typeName,m.shift()),M.set(o.typeName,0));const b=f.get(o.typeName);M.set(o.typeName,M.get(o.typeName)+1);const C=new L.A({paths:[b]});if(o.feature.attributes[T.T1]=C,s.has(o.typeName)){const e=s.get(o.typeName);e?.set(o.feature.attributes[T.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[T.dr],o.feature),s.set(o.typeName,e)}r.set(o.feature.attributes[T.dr],o.feature);const k=(0,w.Ux)(o.feature.attributes[T.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[T.dr],o.feature.attributes[T.T1]?k:null);const N=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(N.members,o.feature.attributes[T.dr],(()=>({id:o.feature.attributes[T.dr],linkChartLocation:void 0}))).linkChartLocation=k}for(const e of n)e.feature.attributes[T.M1]=Q.get(e.feature.attributes[T.Cz]+"-"+e.feature.attributes[T.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:o,links:s,idMap:r}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new M.A({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,c.Te)(t)}catch(e){throw(0,c.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,c.Te)(t)}catch(e){throw(0,c.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const t of e)this.sublayerIdsCache.has(t.typeName)||(this.sublayerIdsCache.set(t.typeName,new Set),a.push(t.typeName)),this.sublayerIdsCache.get(t.typeName).add(t.id);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a),this.dataManager.sublayerCaches.set(e,new Map)}}await(0,N.qN)(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&i.lockedNodeLocations.set(e,new M.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,i)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=m.Gr.PORTAL_ITEM&&e<m.Gr.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[T.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[T.KQ]);if(t&&a){const i=(0,w.Ux)(new L.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[T.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[T.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n=e=>a(e)&&e>=0,o={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return o;const{computationBudgetTime:s,autoRepulsionRadius:r,repulsionRadiusMultiplier:l,absoluteIdealEdgeLength:d,multiplicativeIdealEdgeLength:u,idealEdgeLengthType:c}=t;return(e=>a(e)&&e>=1)(s)?o.computationBudgetTime=s:s&&h.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),o.autoRepulsionRadius=r,!r&&(e=>a(e)&&e>=1)(l)?o.repulsionRadiusMultiplier=l:r||(o.autoRepulsionRadius=!0,h.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(i).includes(e))(c)?o.idealEdgeLengthType=c:void 0!==c&&h.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===c&&n(d)?o.absoluteIdealEdgeLength=d:"absolute-value"===c&&void 0!==d?h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===c&&n(u)?o.multiplicativeIdealEdgeLength=u:"multiplier"===c&&void 0!==u&&h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),o}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===i.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new k.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),a=new Set((e.entityTypes??[]).map((e=>e.name))),i=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName))));this.setAtOrigin("layers",e,(0,m.OL)(this.originIdOf("layers")))}else this.layers=new r.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(h.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,o._)([(0,y.MZ)(_.OZ)],R.prototype,"url",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"membershipModified",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataManager",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,o._)([(0,y.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(k.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,o._)([(0,y.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,o._)([(0,y.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"linkChartExtent",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,o._)([(0,y.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(k.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,o._)([(0,g.$)("esri.layers.LinkChartLayer")],R);const z=R}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8417],{7562:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(66552),o=r(25482),s=r(4718),l=r(10107),d=(r(44208),r(53966),r(40608)),u=r(43937);const c=new n.J({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete",EnvelopeAggregate:"envelope-aggregate",CentroidAggregate:"centroid-aggregate",ConvexHullAggregate:"convex-hull-aggregate"});let m=i=class extends o.A{constructor(e){super(e),this.maxPointCount=void 0,this.maxRecordCount=void 0,this.maxVertexCount=void 0,this.onStatisticField=null,this.outStatisticFieldName=null,this.statisticType=null,this.statisticParameters=null}writeStatisticParameters(e,t){"percentile-continuous"!==this.statisticType&&"percentile-discrete"!==this.statisticType||(t.statisticParameters=(0,s.o8)(e))}clone(){return new i({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:(0,s.o8)(this.statisticParameters)})}};(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxPointCount",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxRecordCount",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxVertexCount",void 0),(0,a._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"onStatisticField",void 0),(0,a._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"outStatisticFieldName",void 0),(0,a._)([(0,l.MZ)({type:String,json:{read:{source:"statisticType",reader:c.read},write:{target:"statisticType",writer:c.write}}})],m.prototype,"statisticType",void 0),(0,a._)([(0,l.MZ)({type:Object})],m.prototype,"statisticParameters",void 0),(0,a._)([(0,u.K)("statisticParameters")],m.prototype,"writeStatisticParameters",null),m=i=(0,a._)([(0,d.$)("esri.rest.support.StatisticDefinition")],m);const p=m},10838:(e,t,r)=>{r.d(t,{ao:()=>m,ud:()=>p,xO:()=>y});var i=r(49186),a=r(36563),n=r(74887),o=r(73444);const s={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){if(function(e){return e in s}(e)){const t=s[e];return!0===t?e:t}return null}const d=[],u=new Map;function c(e){for(const t of u.keys())h(e.pattern,t)&&u.delete(t)}function m(e){return d.includes(e)||(c(e),d.unshift(e)),(0,a.hA)((()=>{const t=d.indexOf(e);t>-1&&(d.splice(t,1),c(e))}))}async function p(e){const t=(0,o.JK)();u.has(e)||u.set(e,async function(e,t){const r=[];for(const i of d)if(h(i.pattern,e))try{return await i.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new i.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new i.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=u.get(e);return r&&await g.add(r),r}function y(e){const t=(0,o.ZS)(e);return t?l(e)??l(t.language):null}function h(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,o.Ml)((()=>{u.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,n.Tw)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},20437:(e,t,r)=>{r.d(t,{A:()=>g});var i,a=r(90237),n=r(66552),o=r(25482),s=r(10107),l=r(56507),d=(r(44208),r(87811),r(93223)),u=r(36005),c=r(40608),m=r(80451),p=r(98453);const y=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=class extends o.A{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,a._)([(0,s.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,a._)([(0,s.MZ)()],h.prototype,"description",void 0),(0,a._)([(0,u.w)("description")],h.prototype,"readDescription",null),(0,a._)([(0,s.MZ)({types:m.gK,json:{read:{reader:m.rS},write:!0}})],h.prototype,"domain",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,a._)([(0,s.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,a._)([(0,d.e)(p.m)],h.prototype,"type",void 0),(0,a._)([(0,s.MZ)()],h.prototype,"valueType",void 0),(0,a._)([(0,u.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,a._)([(0,s.MZ)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,a._)([(0,c.$)("esri.layers.support.Field")],h);const g=h},27348:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(66552),o=r(25482),s=r(4718),l=r(10107),d=(r(44208),r(53966),r(40608)),u=r(5443);const c=new n.J({upperLeft:"upper-left",lowerLeft:"lower-left"});let m=i=class extends o.A{constructor(e){super(e),this.extent=null,this.mode="view",this.originPosition="upper-left",this.tolerance=1}clone(){return new i((0,s.o8)({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}};(0,a._)([(0,l.MZ)({type:u.A,json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],m.prototype,"extent",void 0),(0,a._)([(0,l.MZ)({type:["view","edit"],json:{write:!0}})],m.prototype,"mode",void 0),(0,a._)([(0,l.MZ)({type:String,json:{read:c.read,write:c.write}})],m.prototype,"originPosition",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],m.prototype,"tolerance",void 0),m=i=(0,a._)([(0,d.$)("esri.rest.support.QuantizationParameters")],m);const p=m},27733:(e,t,r)=>{r.d(t,{L:()=>R});var i,a=r(90237),n=r(66552),o=r(25482),s=r(10107),l=r(79901),d=r(93223),u=r(36005),c=r(40608),m=r(56507),p=r(90360),y=r(20437),h=r(49053),g=(r(44208),r(53966),r(87811),r(16930)),T=r(50498);let S=i=class extends o.A{constructor(e){super(e),this.type="query-table"}clone(){const{workspaceId:e,query:t,oidFields:r,spatialReference:a,geometryType:n}=this,o={workspaceId:e,query:t,oidFields:r,spatialReference:a?.clone()??void 0,geometryType:n};return new i(o)}};var f;(0,a._)([(0,d.e)({queryTable:"query-table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],S.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"workspaceId",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"query",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"oidFields",void 0),(0,a._)([(0,s.MZ)({type:g.A,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,a._)([(0,d.e)(T.gy)],S.prototype,"geometryType",void 0),S=i=(0,a._)([(0,c.$)("esri.layers.support.source.QueryTableDataSource")],S);let w=f=class extends o.A{constructor(e){super(e),this.type="raster"}clone(){const{workspaceId:e,dataSourceName:t}=this;return new f({workspaceId:e,dataSourceName:t})}};var v;(0,a._)([(0,d.e)({raster:"raster"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],w.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"dataSourceName",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"workspaceId",void 0),w=f=(0,a._)([(0,c.$)("esri.layers.support.source.RasterDataSource")],w);let A=v=class extends o.A{constructor(e){super(e),this.type="table"}clone(){const{workspaceId:e,gdbVersion:t,dataSourceName:r}=this;return new v({workspaceId:e,gdbVersion:t,dataSourceName:r})}};var M,b;(0,a._)([(0,d.e)({table:"table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],A.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"workspaceId",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"gdbVersion",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"dataSourceName",void 0),A=v=(0,a._)([(0,c.$)("esri.layers.support.source.TableDataSource")],A);const _=(0,n.O)()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let Z=M=class extends o.A{constructor(e){super(e),this.type="join-table"}readLeftTableSource(e,t,r){return C()(e,t,r)}castLeftTableSource(e){return(0,m.aq)(k(),e)}readRightTableSource(e,t,r){return C()(e,t,r)}castRightTableSource(e){return(0,m.aq)(k(),e)}clone(){const{leftTableKey:e,rightTableKey:t,leftTableSource:r,rightTableSource:i,joinType:a}=this,n={leftTableKey:e,rightTableKey:t,leftTableSource:r?.clone()??void 0,rightTableSource:i?.clone()??void 0,joinType:a};return new M(n)}};(0,a._)([(0,d.e)({joinTable:"join-table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],Z.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],Z.prototype,"leftTableKey",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],Z.prototype,"rightTableKey",void 0),(0,a._)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"leftTableSource",void 0),(0,a._)([(0,u.w)("leftTableSource")],Z.prototype,"readLeftTableSource",null),(0,a._)([(0,l.w)("leftTableSource")],Z.prototype,"castLeftTableSource",null),(0,a._)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"rightTableSource",void 0),(0,a._)([(0,u.w)("rightTableSource")],Z.prototype,"readRightTableSource",null),(0,a._)([(0,l.w)("rightTableSource")],Z.prototype,"castRightTableSource",null),(0,a._)([(0,d.e)(_)],Z.prototype,"joinType",void 0),Z=M=(0,a._)([(0,c.$)("esri.layers.support.source.JoinTableDataSource")],Z);let j=null;function C(){return j||(j=(0,p.C)({types:k()})),j}let E=null;function k(){return E||(E={key:"type",base:null,typeMap:{"data-layer":R,"map-layer":h.f}}),E}const x={key:"type",base:null,typeMap:{"join-table":Z,"query-table":S,raster:w,table:A}};let R=class extends o.A{static{b=this}constructor(e){super(e),this.type="data-layer"}clone(){const{fields:e,dataSource:t}=this;return new b({fields:e,dataSource:t})}};(0,a._)([(0,d.e)({dataLayer:"data-layer"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],R.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:[y.A],json:{write:!0}})],R.prototype,"fields",void 0),(0,a._)([(0,s.MZ)({types:x,json:{write:!0}})],R.prototype,"dataSource",void 0),R=b=(0,a._)([(0,c.$)("esri.layers.support.source.DataLayerSource")],R),R.from=(0,m.dp)(R)},39357:(e,t,r)=>{r.d(t,{H:()=>l});var i,a=r(90237),n=r(25482),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));let l=i=class extends n.A{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,a._)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,a._)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=i=(0,a._)([(0,s.$)("esri.layers.support.CodedValue")],l)},40876:(e,t,r)=>{r.d(t,{TS:()=>n,Tf:()=>u,V6:()=>a,c4:()=>o,qh:()=>d,z$:()=>l});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 a(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...n(e)]}function s(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 l(e,t,r,i=1){const a=(e%360+360)%360/360,n=r<=.5?r*(t+1):r+t-r*t,o=2*r-n;return[Math.round(255*s(o,n,a+1/3)),Math.round(255*s(o,n,a)),Math.round(255*s(o,n,a-1/3)),i]}function d(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,a=t?1:17,n=t?9===e.length:5===e.length;let o=Number("0x"+e.slice(1));if(isNaN(o))return null;const s=[0,0,0,1];let l;return n&&(l=o&i,o>>=r,s[3]=a*l/255),l=o&i,o>>=r,s[2]=a*l,l=o&i,o>>=r,s[1]=a*l,l=o&i,o>>=r,s[0]=a*l,s}const u=2.2},49053:(e,t,r)=>{r.d(t,{f:()=>u});var i,a=r(90237),n=r(25482),o=r(10107),s=r(56507),l=(r(44208),r(87811),r(93223)),d=r(40608);let u=i=class extends n.A{constructor(e){super(e),this.type="map-layer"}clone(){const{mapLayerId:e,gdbVersion:t}=this;return new i({mapLayerId:e,gdbVersion:t})}};(0,a._)([(0,l.e)({mapLayer:"map-layer"}),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),(0,a._)([(0,o.MZ)({type:s.jz,json:{write:{isRequired:!0}}})],u.prototype,"mapLayerId",void 0),(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"gdbVersion",void 0),u=i=(0,a._)([(0,d.$)("esri.layers.support.source.MapLayerSource")],u)},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>u,yR:()=>m});var i=r(66552),a=r(5443),n=r(91075),o=r(48526),s=r(86738),l=r(39829),d=r(82799);const u=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),m={base:n.A,key:"type",typeMap:{extent:a.A,multipoint:o.A,point:s.A,polyline:d.A,polygon:l.A}}},53177:(e,t,r)=>{r.d(t,{A:()=>m});var i,a=r(90237),n=r(4718),o=r(10107),s=(r(44208),r(53966),r(93223)),l=r(40608),d=r(39357),u=r(76357);let c=class extends u.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,a._)([(0,o.MZ)({type:[d.H],json:{write:{isRequired:!0}}})],c.prototype,"codedValues",void 0),(0,a._)([(0,s.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=i=(0,a._)([(0,l.$)("esri.layers.support.CodedValueDomain")],c);const m=c},56400:(e,t,r)=>{r.d(t,{ZS:()=>c,hv:()=>m,wr:()=>p,qU:()=>n,N5:()=>l,P6:()=>u,L5:()=>o,n$:()=>s});const i=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var a=r(96285);const n="system",o="unknown",s="UTC",l=Intl.DateTimeFormat().resolvedOptions().timeZone,d="shortOffset";function u(e,t=!1){return{json:{read:{source:e,reader:(t,r)=>r[e]?c(r[e]):null},write:!!t&&{allowNull:!0,writer(t,r){r[e]=t?function(e){return{timeZoneIANA:e}}(t):null}}}}}function c(e,t=n){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,t=n){if(!e||!i.has(e.timeZone))return t;const r=i.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?r:function(e){const t=a.c9.local().setZone(e),r=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===r?"Etc/UTC":`Etc/GMT${a.mQ.instance(-r).formatOffset(0,"narrow")}`}(r)}(e,t):t}function m(e,t,r,i,a){if(t&&"date"===a)return{timeZone:s,timeZoneName:void 0};const n=i.timeStyle||i.hour,l=r===o;return{timeZone:l?"timestamp-offset"===a?void 0:e??s:r,timeZoneName:l&&n?d:void 0}}function p(e){const t=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map((e=>e.toLowerCase())));return e===n||e===o||t.has(e.toLowerCase())||r.has(e.toLowerCase())}},58174:(e,t,r)=>{r.d(t,{x:()=>i});const i=new(r(66552).J)({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"})},61956:(e,t,r)=>{r.d(t,{A:()=>C});var i=r(90237),a=r(66552),n=r(25482),o=r(4718),s=r(10107),l=r(79901),d=r(93223),u=r(40608),c=r(43937),m=r(56507),p=r(86738),y=r(16930),h=r(65864),g=r(50498),T=r(27733),S=r(69540);r(44208),r(53966),r(87811);let f=class extends(S.A.ClonableMixin(n.A)){constructor(e){super(e),this.onFields=null,this.operator=null,this.searchTerm=null,this.searchType=null}};(0,i._)([(0,s.MZ)({type:[String],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.onFields&&this.onFields.length>0}}}}})],f.prototype,"onFields",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"operator",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"searchTerm",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"searchType",void 0),f=(0,i._)([(0,u.$)("esri.rest.support.FullTextSearch")],f);const w=f;var v,A=r(27348),M=r(58174),b=r(7562),_=r(79677);const Z=new a.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let j=class extends n.A{static{v=this}static from(e){return(0,m.PZ)(v,e)}constructor(e){super(e),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(e){return"number"==typeof e||"object"==typeof e?e:null}writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeParameterValues(e,t){if(e){const r={};for(const t in e){const i=e[t];Array.isArray(i)?r[t]=i.map((e=>e instanceof Date?e.getTime():e)):i instanceof Date?r[t]=i.getTime():r[t]=i}t.parameterValues=r}}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,t.where="1=1"}writeWhere(e,t){t.where=e||"1=1"}clone(){return new v((0,o.o8)({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};(0,i._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"aggregateIds",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],j.prototype,"cacheHint",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"compactGeometryEnabled",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"datumTransformation",void 0),(0,i._)([(0,l.w)("datumTransformation")],j.prototype,"castDatumTransformation",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"defaultSpatialReferenceEnabled",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],j.prototype,"distance",void 0),(0,i._)([(0,s.MZ)({type:T.L,json:{write:!0}})],j.prototype,"dynamicDataSource",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"formatOf3DObjects",void 0),(0,i._)([(0,s.MZ)({type:[w],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],j.prototype,"fullText",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"gdbVersion",void 0),(0,i._)([(0,s.MZ)({types:g.yR,json:{read:h.rS,write:!0}})],j.prototype,"geometry",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],j.prototype,"geometryPrecision",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],j.prototype,"groupByFieldsForStatistics",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"having",void 0),(0,i._)([(0,s.MZ)({type:Date})],j.prototype,"historicMoment",void 0),(0,i._)([(0,c.K)("historicMoment")],j.prototype,"writeHistoricMoment",null),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],j.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,s.MZ)({type:Number,cast:e=>e<1?1:e>j.MAX_MAX_RECORD_COUNT_FACTOR?j.MAX_MAX_RECORD_COUNT_FACTOR:e,json:{write:{overridePolicy:e=>({enabled:e>1})}}})],j.prototype,"maxRecordCountFactor",void 0),(0,i._)([(0,s.MZ)({type:["xyFootprint"],json:{write:!0}})],j.prototype,"multipatchOption",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],j.prototype,"num",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"objectIds",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],j.prototype,"orderByFields",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],j.prototype,"outFields",void 0),(0,i._)([(0,s.MZ)({type:y.A,json:{name:"outSR",write:!0}})],j.prototype,"outSpatialReference",void 0),(0,i._)([(0,s.MZ)({type:[b.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],j.prototype,"outStatistics",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"parameterValues",void 0),(0,i._)([(0,c.K)("parameterValues")],j.prototype,"writeParameterValues",null),(0,i._)([(0,s.MZ)({type:p.A,json:{write:!0}})],j.prototype,"pixelSize",void 0),(0,i._)([(0,s.MZ)({type:A.A,json:{write:!0}})],j.prototype,"quantizationParameters",void 0),(0,i._)([(0,s.MZ)({type:[Object],json:{write:!0}})],j.prototype,"rangeValues",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],j.prototype,"relationParameter",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"resultType",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"returnCentroid",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"returnDistinctValues",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!0,write:!0}})],j.prototype,"returnExceededLimitFeatures",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],j.prototype,"returnGeometry",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"returnQueryGeometry",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"returnM",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"returnZ",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],j.prototype,"returnTrueCurves",void 0),(0,i._)([(0,s.MZ)({type:y.A,json:{write:!0}})],j.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,d.e)(M.x,{ignoreUnknown:!1,name:"spatialRel"})],j.prototype,"spatialRelationship",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],j.prototype,"start",void 0),(0,i._)([(0,c.K)("start"),(0,c.K)("num")],j.prototype,"writeStart",null),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"sqlFormat",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"text",void 0),(0,i._)([(0,s.MZ)({type:_.A,json:{write:!0}})],j.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],j.prototype,"timeReferenceUnknownClient",void 0),(0,i._)([(0,d.e)(Z,{ignoreUnknown:!1}),(0,s.MZ)({json:{write:{overridePolicy(e){return{enabled:!!e&&null!=this.distance}}}}})],j.prototype,"units",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{overridePolicy(e){return{enabled:null!=e||null!=this.start&&this.start>0}}}}})],j.prototype,"where",void 0),(0,i._)([(0,c.K)("where")],j.prototype,"writeWhere",null),j=v=(0,i._)([(0,u.$)("esri.rest.support.Query")],j);const C=j},65864:(e,t,r)=>{r.d(t,{$B:()=>h,Bi:()=>p,Rg:()=>m,U9:()=>u,ZC:()=>d,fT:()=>c,rS:()=>y,xD:()=>T});var i=r(5443),a=r(91075),n=r(48526),o=r(86738),s=r(39829),l=r(82799);function d(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function c(e){return void 0!==e.x&&void 0!==e.y}function m(e){return void 0!==e.paths||void 0!==e.curvePaths}function p(e){return void 0!==e.rings||void 0!==e.curveRings}function y(e){return null==e?null:e instanceof a.A?e:c(e)?o.A.fromJSON(e):m(e)?l.A.fromJSON(e):p(e)?s.A.fromJSON(e):u(e)?n.A.fromJSON(e):d(e)?i.A.fromJSON(e):null}function h(e){return e?c(e)?"esriGeometryPoint":m(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":d(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:s.A};function T(e){return e&&g[e]||null}},69540:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),a=r(69622),n=(r(44208),r(4718)),o=(r(53966),r(97768)),s=r(35666),l=r(88620),d=r(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},a=new Map;for(const e in t){const o=t[e],l=r?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||l!==s.Gr.USER&&l!==s.Gr.DEFAULTS&&l!==s.Gr.WEB_MAP&&l!==s.Gr.WEB_SCENE)continue;const u=this[e];let c=null;c="function"==typeof d?d(u):"reference"===d?u:(0,n.TU)(u),null!=u&&null==c||(l===s.Gr.DEFAULTS?a.set(e,c):i[e]=c)}const d=new(0,Object.getPrototypeOf(this).constructor)(i);if(a.size){const e=(0,l.oY)(d)?.store;if(e)for(const[t,r]of a)e.set(t,r,s.Gr.DEFAULTS)}return d}};return t=(0,i._)([(0,d.$)("esri.core.Clonable")],t),t};let c=class extends(u(a.A)){};c=(0,i._)([(0,d.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=u;const m=c},73444:(e,t,r)=>{r.d(t,{JK:()=>l,Ml:()=>y,ZS:()=>u,oQ:()=>m});var i=r(36563);let a;const n=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale,o=globalThis.document?.documentElement;function s(){const e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return n??e??t??"en"}function l(){return void 0===a&&(a=s()),a}const d=/^(?<language>[a-z]{2,3})(?:-[a-z]{3})?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function u(e=l()){return d.exec(e)?.groups}const c=[];function m(e){return c.push(e),(0,i.hA)((()=>c.splice(c.indexOf(e),1)))}const p=[];function y(e){return p.push(e),(0,i.hA)((()=>p.splice(p.indexOf(e),1)))}function h(){const e=s();a!==e&&([...p].forEach((t=>t(e))),a=e,[...c].forEach((t=>t(e))))}globalThis.addEventListener?.("languagechange",h),o&&new MutationObserver((()=>{h()})).observe(o,{attributeFilter:["lang"]})},76357:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),a=r(66552),n=r(25482),o=r(10107),s=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const d=new a.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.A{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.e)(d),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i._)([(0,l.$)("esri.layers.support.Domain")],u);const c=u},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(25482),o=r(88930),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),u=r(43937),c=r(56400);let m=class extends n.A{static{i=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}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?.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?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,a=e.end?.getTime()??e.end;return t===i&&r===a}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let a=this.end;if(a){const r=(0,o.lL)(a,e,t);a=a.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:a})}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,a=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,s;return a>=t&&a<=r?o=a:t>=a&&t<=n&&(o=t),r>=a&&r<=n?s=r:n>=t&&n<=r&&(s=n),null==o||null==s||isNaN(o)||isNaN(s)?i.empty:new i({start:o===-1/0?null:new Date(o),end:s===1/0?null:new Date(s)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const a=new i,{start:n,end:s}=this;return null!=n&&(a.start=(0,o.S1)(n,e,t,r)),null!=s&&(a.end=(0,o.S1)(s,e,t,r)),a}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.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,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),(0,a._)([(0,l.w)("end")],m.prototype,"readEnd",null),(0,a._)([(0,u.K)("end")],m.prototype,"writeEnd",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),(0,a._)([(0,l.w)("start")],m.prototype,"readStart",null),(0,a._)([(0,u.K)("start")],m.prototype,"writeStart",null),m=i=(0,a._)([(0,d.$)("esri.time.TimeExtent")],m);const p=m,y=new m,h=new m({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>h}),r(44208);var i,a=r(53177),n=r(76357),o=r(90237),s=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let d=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o._)([(0,s.e)({inherited:"inherited"})],d.prototype,"type",void 0),d=i=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],d);const u=d;var c,m=r(10107);let p=class extends n.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,m.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],p.prototype,"maxValue",void 0),(0,o._)([(0,m.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],p.prototype,"minValue",void 0),(0,o._)([(0,s.e)({range:"range"})],p.prototype,"type",void 0),p=c=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],p);const y=p,h={key:"type",base:n.A,typeMap:{range:y,"coded-value":a.A,inherited:u}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return y.fromJSON(e);case"codedValue":return a.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},88930:(e,t,r)=>{r.d(t,{S1:()=>s,lL:()=>d,mi:()=>l,t:()=>u,vf:()=>o});var i=r(97770),a=r(56400),n=r(96285);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,r,o=a.qU){const s=new n.oh((0,i.wj)(o)),l=n.c9.fromJSDate(e,{zone:s}),d="decades"===r||"centuries"===r?"year":c(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,r="milliseconds"){const i=e.getTime(),a=u(t,r,"milliseconds");return new Date(i+a)}function d(e,t,r=a.qU){const o=new n.oh((0,i.wj)(r)),s=n.c9.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const l=c(t);return s.startOf(l).toJSDate()}function u(e,t,r){return 0===e?0:e*o[t]/o[r]}function c(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},91829:(e,t,r)=>{function i(){return[0,0,0,0]}function a(e,t,r,i){return[e,t,r,i]}function n(e,t,r,i){return[e,t,r,i]}function o(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function s(){return a(1,1,1,1)}function l(){return a(1,0,0,0)}function d(){return a(0,1,0,0)}function u(){return a(0,0,1,0)}function c(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>p,ci:()=>o,fA:()=>a,uY:()=>m,vt:()=>i});const m=[0,0,0,0],p=s(),y=l(),h=d(),g=u(),T=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_W:T,UNIT_X:y,UNIT_Y:h,UNIT_Z:g,ZEROS:m,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,freeze:n,fromArray:o,fromValues:a,ones:s,unitW:c,unitX:l,unitY:d,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93223:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(66552),a=r(10107);function n(e,t={}){const r=e instanceof i.J?e:new i.J(e,t),{alwaysWriteDefaults:n,default:o,ignoreUnknown:s=!0,name:l,nonNullable:d,readOnly:u=!1}=t;return(0,a.MZ)({type:s?r.apiValues:String,json:{type:r.jsonValues,default:o,name:l,read:!u&&{reader:r.read},write:{writer:r.write,alwaysWriteDefaults:n}},nonNullable:d,readOnly:u})}},95488:(e,t,r)=>{r.d(t,{I:()=>a});var i=r(11406);class a extends i.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},97770:(e,t,r)=>{r.d(t,{Ey:()=>C,F8:()=>j,J2:()=>b,Yq:()=>_,_v:()=>w,iS:()=>Z,wj:()=>E});var i=r(66552),a=r(73444),n=r(56400),o=r(96285);const s={year:void 0,month:void 0,day:void 0,weekday:void 0},l={hour:void 0,minute:void 0,second:void 0},d={timeZone:n.n$},u={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},m={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},h={...y,second:"numeric"},g={hourCycle:"h23"},T={...y,...g},S={...h,...g},f={"short-date":u,"short-date-short-time":{...u,...y},"short-date-short-time-24":{...u,...T},"short-date-long-time":{...u,...h},"short-date-long-time-24":{...u,...S},"short-date-le":u,"short-date-le-short-time":{...u,...y},"short-date-le-short-time-24":{...u,...T},"short-date-le-long-time":{...u,...h},"short-date-le-long-time-24":{...u,...S},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...y},"long-month-day-year-short-time-24":{...c,...T},"long-month-day-year-long-time":{...c,...h},"long-month-day-year-long-time-24":{...c,...S},"day-short-month-year":m,"day-short-month-year-short-time":{...m,...y},"day-short-month-year-short-time-24":{...m,...T},"day-short-month-year-long-time":{...m,...h},"day-short-month-year-long-time-24":{...m,...S},"long-date":p,"long-date-short-time":{...p,...y},"long-date-short-time-24":{...p,...T},"long-date-long-time":{...p,...h},"long-date-long-time-24":{...p,...S},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":h},w=(0,i.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),v={ar:"ar-u-nu-latn-ca-gregory"};let A=new WeakMap;const M=f["short-date-short-time"];function b(e){return f[e]}function _(e,t=M){return function(e){let t=A.get(e);if(!t){const r=(0,a.JK)(),i=v[r]||r,o=E(e.timeZone??n.qU),s={...e,timeZone:o};t=new Intl.DateTimeFormat(i,s),A.set(e,t)}return t}(t).format(e)}function Z(e,t=M){return _(new Date(e),{...t,...d,...l})}function j(e,t=M){return _(new Date(`1970-01-01T${e}Z`),{...t,...d,...s})}function C(e,t=M){if(t.timeZone)return _(new Date(e),t);const r=o.c9.fromISO(e,{setZone:!0}),i=(0,a.JK)(),s=v[i]??i,l=0===r.offset?n.n$:t.timeZone,d={...t,timeZone:l};return r.toLocaleString(d,{locale:s})}function E(e){switch(e){case n.qU:return n.N5;case n.L5:return n.n$;default:return e}}(0,a.Ml)((()=>{A=new WeakMap}))},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3804],{4172:(e,t,r)=>{r.d(t,{g:()=>f});var s=r(49186),i=(r(44208),r(53966)),n=r(97768),a=r(74887),o=r(44794);(r(36708),r(35982)).B;new Set;var c=r(94656),l=r(63907),h=r(36421),u=r(67171);function _(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&i.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===l.Ap.TEXTURE_3D||e===l.Ap.TEXTURE_2D_ARRAY}function A(e,t,r,s=1){let i=Math.max(t,r);return e===l.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}function E(e){if(null!=e.internalFormat)return e.internalFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.internalFormat;switch(e.dataType){case l.ld.FLOAT:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA32F;case l.Ab.RGB:return l.H0.RGB32F;default:throw new s.A("Unable to derive format")}case l.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA8;case l.Ab.RGB:return l.H0.RGB8}}return e.internalFormat=e.pixelFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.pixelFormat}class g extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case l.H0.R16F:case l.H0.R16I:case l.H0.R16UI:case l.H0.R32F:case l.H0.R32I:case l.H0.R32UI:case l.H0.R8_SNORM:case l.H0.R8:case l.H0.R8I:case l.H0.R8UI:this.pixelFormat=l.Ab.RED}}static validate(e,t){return new g(e,t)}}const T=()=>i.A.getLogger("esri/views/webgl/Texture");let f=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}constructor(e,t=null,r=null){if(this.type=h.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._compressionAbortController=(0,o.v)(null),"context"in e)this._descriptor=e,r=t;else{const r=g.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,u.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController.value}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(l.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}setData(e){this.abortCompression(),!d(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in l.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e)}updateData(t,r,i,n,a,o,c=0){o||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=E(l);const{context:h,pixelFormat:u,dataType:_,target:p,isImmutable:A}=l;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const g=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+n>l.width||i+a>l.height)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=h;c&&(n&&a||T().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,c)),m(o)?f.texSubImage2D(p,t,r,i,n,a,u,_,o):d(o)?f.compressedTexSubImage2D(p,t,r,i,n,a,l.internalFormat,o.levels[t]):f.texSubImage2D(p,t,r,i,n,a,u,_,o),c&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),h.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,n,a,o,c,l){l||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update an uninitialized texture!");const h=this._descriptor;h.internalFormat=E(h);const{context:u,pixelFormat:_,dataType:m,isImmutable:A,target:g}=h;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");p(g)||T().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||n<0||r+a>h.width||i+o>h.height||n+c>h.depth)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:R}=u;if(d(l))l=l.levels[t],R.compressedTexSubImage3D(g,t,r,i,n,a,o,c,h.internalFormat,l);else{const e=l;R.texSubImage3D(g,t,r,i,n,a,o,c,_,m,e)}u.bindTexture(f,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,_(t)}t.samplingMode===l.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=l.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===l.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=l.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,_(e)}e.samplingMode===l.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.Cj.LINEAR):e.samplingMode===l.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,_(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController.value=(0,n.DC)(this._compressionAbortController.value))}_setData(t,r){const i=this._descriptor,n=i.context?.gl;if(!n)return;(0,c.Y2)(n),this._glName||(this._glName=n.createTexture(),i.context.instanceCounter.increment(l.vt.Texture,this)),_(i);const a=i.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);i.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const o=r??i.target,h=p(o);if(m(t))this._setDataFromTexImageSource(t,o);else{const{width:e,height:r,depth:a}=i;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(h&&null==a)throw new s.A("Depth must be specified!");if(i.internalFormat=E(i),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(o,i.internalFormat,i.hasMipmap,e,r,a),d(t)){if(!(i.internalFormat in l.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,i.internalFormat,o)}else this._texImage(o,0,i.internalFormat,e,r,a,t),(0,c.Y2)(n),i.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,c.Y2)(n),i.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=l.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=l.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,s=this._descriptor;s.internalFormat=E(s);const i=p(t),{width:n,height:a,depth:o}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);s.width&&s.height,s.width||(s.width=n),s.height||(s.height=a),i&&s.depth,i&&(s.depth=o),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,s.internalFormat,s.hasMipmap,n,a,o),this._texImage(t,0,s.internalFormat,n,a,o,e),(0,c.Y2)(r),s.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const s=this._descriptor,{width:i,height:n,depth:a}=s,o=e.levels,c=A(r,i,n,a),l=Math.min(c,o.length)-1;this._descriptor.context.gl.texParameteri(s.target,s.context.gl.TEXTURE_MAX_LEVEL,l),this._forEachMipmapLevel(((e,s,i,n)=>{const a=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,s,i,n,a)}),l)}_texStorage(e,t,r,i,n,a){const{gl:o}=this._descriptor.context;if(!(t in l.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?A(e,i,n,a):1;if(p(e)){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");o.texStorage3D(e,c,t,i,n,a)}else o.texStorage2D(e,c,t,i,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e),{isImmutable:h,pixelFormat:u,dataType:_}=this._descriptor;if(h){if(null!=o){const r=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,i,n,a,u,_,r)}else c.texSubImage2D(e,t,0,0,i,n,u,_,r)}}else{const h=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,i,n,a,0,u,_,h)}else c.texImage2D(e,t,r,i,n,0,u,_,h)}}_compressedTexImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=o)if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,i,n,a,r,o)}else c.compressedTexSubImage2D(e,t,0,0,i,n,r,o)}else if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,i,n,a,0,o)}else c.compressedTexImage2D(e,t,r,i,n,0,o)}async compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null;if(s&&(t||r)){const i=new AbortController;this._compressionAbortController.value=i;const n={data:await createImageBitmap(e),flipped:this.descriptor.flipped,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r};s.invoke(n,this._compressionAbortController.value.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture)),i===this._compressionAbortController.value&&(this._compressionAbortController.value=null)})).catch((e=>{(0,a.zf)(e)||i!==this._compressionAbortController.value||(this._compressionAbortController.value=null)}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:n,hasMipmap:a,target:o}=this._descriptor;const c=o===l.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==n)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,n),a&&(1!==r||1!==i||c&&1!==n)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,s=e.samplingMode;r===l.Cj.LINEAR_MIPMAP_NEAREST||r===l.Cj.LINEAR_MIPMAP_LINEAR?(r=l.Cj.LINEAR,e.hasMipmap||(s=l.Cj.LINEAR)):r!==l.Cj.NEAREST_MIPMAP_NEAREST&&r!==l.Cj.NEAREST_MIPMAP_LINEAR||(r=l.Cj.NEAREST,e.hasMipmap||(s=l.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,s)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},14113:(e,t,r)=>{r.d(t,{N5:()=>c});var s=r(49186),i=(r(44208),r(53966)),n=r(69270);const a=()=>i.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends o{constructor(){super(...arguments),this.vertex=new _,this.fragment=new _,this.attributes=new d,this.varyings=new m,this.extensions=new p,this.outputs=new A}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),s=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,a=n.uniforms.generateSource(),o=n.code.generateSource(),c=n.main.generateSource(t),l="vertex"===e?T:g,h=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${l}\n${h.join("\n")}\n${a.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${c.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return t=>{for(let i=0;i<s;++i)r[i](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i)=>{for(let n=0;n<s;++n)r[n](e,t,i)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i,n)=>{for(let a=0;a<s;++a)r[a](e,n,t,i)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new s.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else a().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class h{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new s.A("Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class _ extends o{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new h(this),this.code=new u(this),this.constants=new E(this)}get builder(){return this}}class d{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?a().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach(((r,s)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("vertex"===e?"out":"in")+` ${r.type} ${s};`))),t}}class p{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class A{constructor(){this._entries=new Map}add(e,t,r=0){const s=this._entries.get(r);s?.name!==e||s?.type!==t?this._entries.set(r,{name:e,type:t}):a().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:A.DEFAULT_NAME,type:A.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}class E{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let s="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":s=E._numberToFloatStr(r);break;case"int":s=E._numberToIntStr(r);break;case"bool":s=r.toString();break;case"vec2":s=`vec2(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])})`;break;case"vec3":s=`vec3(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])})`;break;case"vec4":s=`vec4(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])}, ${E._numberToFloatStr(r[3])})`;break;case"ivec2":s=`ivec2(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])})`;break;case"ivec3":s=`ivec3(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])})`;break;case"ivec4":s=`ivec4(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])}, ${E._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":s=`${t}(${Array.prototype.map.call(r,(e=>E._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${s};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n#endif",T="precision highp float;\n precision highp sampler2D;\n \n invariant gl_Position;\n "},35982:(e,t,r)=>{r.d(t,{B:()=>c});var s=r(4576),i=r(36563),n=r(53966),a=r(74887),o=r(29953);class c{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,o.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,a.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>l,yu:()=>o}),r(44208);var s=r(94656),i=r(63907),n=r(62298);function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function o(e,t,r,i,o=0){const c=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const l=o*r.stride;if(r.count<=4)c.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+l),c.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=a(e),s=(0,n._)(r.type),i=r.offset,o=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${l}${o}:`,t,r)}}}function c(e,t,r,s){const n=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)n.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function l(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>a});var s=r(63907),i=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>h,en:()=>c});var s=r(49186),i=r(44208),n=r(53966);const a=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),o=!!(0,i.A)("enable-feature:webgl-debug");function c(){return o}function l(){return o}function h(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;a().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3804],{4172:(e,t,r)=>{r.d(t,{g:()=>f});var s=r(49186),i=(r(44208),r(53966)),n=r(97768),a=r(74887),o=r(44794);(r(36708),r(35982)).B;new Set;var c=r(94656),l=r(63907),h=r(36421),u=r(67171);function _(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&i.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===l.Ap.TEXTURE_3D||e===l.Ap.TEXTURE_2D_ARRAY}function A(e,t,r,s=1){let i=Math.max(t,r);return e===l.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}function E(e){if(null!=e.internalFormat)return e.internalFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.internalFormat;switch(e.dataType){case l.ld.FLOAT:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA32F;case l.Ab.RGB:return l.H0.RGB32F;default:throw new s.A("Unable to derive format")}case l.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA8;case l.Ab.RGB:return l.H0.RGB8}}return e.internalFormat=e.pixelFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.pixelFormat}class g extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case l.H0.R16F:case l.H0.R16I:case l.H0.R16UI:case l.H0.R32F:case l.H0.R32I:case l.H0.R32UI:case l.H0.R8_SNORM:case l.H0.R8:case l.H0.R8I:case l.H0.R8UI:this.pixelFormat=l.Ab.RED}}static validate(e,t){return new g(e,t)}}const T=()=>i.A.getLogger("esri/views/webgl/Texture");let f=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}constructor(e,t=null,r=null){if(this.type=h.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._compressionAbortController=(0,o.v)(null),"context"in e)this._descriptor=e,r=t;else{const r=g.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,u.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController.value}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(l.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}setData(e){this.abortCompression(),!d(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in l.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e)}updateData(t,r,i,n,a,o,c=0){o||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=E(l);const{context:h,pixelFormat:u,dataType:_,target:p,isImmutable:A}=l;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const g=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+n>l.width||i+a>l.height)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=h;c&&(n&&a||T().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,c)),m(o)?f.texSubImage2D(p,t,r,i,n,a,u,_,o):d(o)?f.compressedTexSubImage2D(p,t,r,i,n,a,l.internalFormat,o.levels[t]):f.texSubImage2D(p,t,r,i,n,a,u,_,o),c&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),h.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,n,a,o,c,l){l||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update an uninitialized texture!");const h=this._descriptor;h.internalFormat=E(h);const{context:u,pixelFormat:_,dataType:m,isImmutable:A,target:g}=h;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");p(g)||T().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||n<0||r+a>h.width||i+o>h.height||n+c>h.depth)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:R}=u;if(d(l))l=l.levels[t],R.compressedTexSubImage3D(g,t,r,i,n,a,o,c,h.internalFormat,l);else{const e=l;R.texSubImage3D(g,t,r,i,n,a,o,c,_,m,e)}u.bindTexture(f,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,_(t)}t.samplingMode===l.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=l.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===l.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=l.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,_(e)}e.samplingMode===l.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.Cj.LINEAR):e.samplingMode===l.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,_(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController.value=(0,n.DC)(this._compressionAbortController.value))}_setData(t,r){const i=this._descriptor,n=i.context?.gl;if(!n)return;(0,c.Y2)(n),this._glName||(this._glName=n.createTexture(),i.context.instanceCounter.increment(l.vt.Texture,this)),_(i);const a=i.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);i.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const o=r??i.target,h=p(o);if(m(t))this._setDataFromTexImageSource(t,o);else{const{width:e,height:r,depth:a}=i;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(h&&null==a)throw new s.A("Depth must be specified!");if(i.internalFormat=E(i),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(o,i.internalFormat,i.hasMipmap,e,r,a),d(t)){if(!(i.internalFormat in l.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,i.internalFormat,o)}else this._texImage(o,0,i.internalFormat,e,r,a,t),(0,c.Y2)(n),i.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,c.Y2)(n),i.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=l.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=l.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,s=this._descriptor;s.internalFormat=E(s);const i=p(t),{width:n,height:a,depth:o}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);s.width&&s.height,s.width||(s.width=n),s.height||(s.height=a),i&&s.depth,i&&(s.depth=o),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,s.internalFormat,s.hasMipmap,n,a,o),this._texImage(t,0,s.internalFormat,n,a,o,e),(0,c.Y2)(r),s.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const s=this._descriptor,{width:i,height:n,depth:a}=s,o=e.levels,c=A(r,i,n,a),l=Math.min(c,o.length)-1;this._descriptor.context.gl.texParameteri(s.target,s.context.gl.TEXTURE_MAX_LEVEL,l),this._forEachMipmapLevel(((e,s,i,n)=>{const a=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,s,i,n,a)}),l)}_texStorage(e,t,r,i,n,a){const{gl:o}=this._descriptor.context;if(!(t in l.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?A(e,i,n,a):1;if(p(e)){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");o.texStorage3D(e,c,t,i,n,a)}else o.texStorage2D(e,c,t,i,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e),{isImmutable:h,pixelFormat:u,dataType:_}=this._descriptor;if(h){if(null!=o){const r=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,i,n,a,u,_,r)}else c.texSubImage2D(e,t,0,0,i,n,u,_,r)}}else{const h=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,i,n,a,0,u,_,h)}else c.texImage2D(e,t,r,i,n,0,u,_,h)}}_compressedTexImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=o)if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,i,n,a,r,o)}else c.compressedTexSubImage2D(e,t,0,0,i,n,r,o)}else if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,i,n,a,0,o)}else c.compressedTexImage2D(e,t,r,i,n,0,o)}async compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null;if(s&&(t||r)){const i=new AbortController;this._compressionAbortController.value=i;const n={data:await createImageBitmap(e),flipped:this.descriptor.flipped,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r};s.invoke(n,this._compressionAbortController.value.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture)),i===this._compressionAbortController.value&&(this._compressionAbortController.value=null)})).catch((e=>{(0,a.zf)(e)||i!==this._compressionAbortController.value||(this._compressionAbortController.value=null)}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:n,hasMipmap:a,target:o}=this._descriptor;const c=o===l.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==n)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,n),a&&(1!==r||1!==i||c&&1!==n)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,s=e.samplingMode;r===l.Cj.LINEAR_MIPMAP_NEAREST||r===l.Cj.LINEAR_MIPMAP_LINEAR?(r=l.Cj.LINEAR,e.hasMipmap||(s=l.Cj.LINEAR)):r!==l.Cj.NEAREST_MIPMAP_NEAREST&&r!==l.Cj.NEAREST_MIPMAP_LINEAR||(r=l.Cj.NEAREST,e.hasMipmap||(s=l.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,s)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},14113:(e,t,r)=>{r.d(t,{N5:()=>c});var s=r(49186),i=(r(44208),r(53966)),n=r(69270);const a=()=>i.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends o{constructor(){super(...arguments),this.vertex=new _,this.fragment=new _,this.attributes=new d,this.varyings=new m,this.extensions=new p,this.outputs=new A}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),s=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,a=n.uniforms.generateSource(),o=n.code.generateSource(),c=n.main.generateSource(t),l="vertex"===e?T:g,h=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${l}\n${h.join("\n")}\n${a.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${c.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return t=>{for(let i=0;i<s;++i)r[i](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i)=>{for(let n=0;n<s;++n)r[n](e,t,i)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i,n)=>{for(let a=0;a<s;++a)r[a](e,n,t,i)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new s.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else a().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class h{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new s.A("Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class _ extends o{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new h(this),this.code=new u(this),this.constants=new E(this)}get builder(){return this}}class d{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?a().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach(((r,s)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("vertex"===e?"out":"in")+` ${r.type} ${s};`))),t}}class p{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class A{constructor(){this._entries=new Map}add(e,t,r=0){const s=this._entries.get(r);s?.name!==e||s?.type!==t?this._entries.set(r,{name:e,type:t}):a().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:A.DEFAULT_NAME,type:A.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}class E{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let s="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":s=E._numberToFloatStr(r);break;case"int":s=E._numberToIntStr(r);break;case"bool":s=r.toString();break;case"vec2":s=`vec2(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])})`;break;case"vec3":s=`vec3(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])})`;break;case"vec4":s=`vec4(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])}, ${E._numberToFloatStr(r[3])})`;break;case"ivec2":s=`ivec2(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])})`;break;case"ivec3":s=`ivec3(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])})`;break;case"ivec4":s=`ivec4(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])}, ${E._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":s=`${t}(${Array.prototype.map.call(r,(e=>E._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${s};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp sampler2DArray;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump sampler2DArray;\n#endif",T="precision highp float;\n precision highp sampler2D;\n precision highp sampler2DArray;\n \n invariant gl_Position;\n "},35982:(e,t,r)=>{r.d(t,{B:()=>c});var s=r(4576),i=r(36563),n=r(53966),a=r(74887),o=r(29953);class c{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,o.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,a.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>l,yu:()=>o}),r(44208);var s=r(94656),i=r(63907),n=r(62298);function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function o(e,t,r,i,o=0){const c=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const l=o*r.stride;if(r.count<=4)c.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+l),c.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=a(e),s=(0,n._)(r.type),i=r.offset,o=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${l}${o}:`,t,r)}}}function c(e,t,r,s){const n=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)n.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function l(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>a});var s=r(63907),i=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>h,en:()=>c});var s=r(49186),i=r(44208),n=r(53966);const a=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),o=!!(0,i.A)("enable-feature:webgl-debug");function c(){return o}function l(){return o}function h(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;a().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}}}]);
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
gap: var(--calcite-spacing-sm, 8px);
|
|
14
14
|
justify-content: flex-start;
|
|
15
15
|
|
|
16
|
+
&:dir(rtl) {
|
|
17
|
+
flex-flow: row-reverse wrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
&.esri-sketch--vertical {
|
|
17
21
|
flex-flow: column wrap;
|
|
18
22
|
justify-content: flex-start;
|
|
@@ -42,10 +46,6 @@
|
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
&:dir(rtl) {
|
|
46
|
-
flex-flow: row-reverse wrap;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
49
|
&__popover-wrapper {
|
|
50
50
|
inline-size: max-content;
|
|
51
51
|
min-inline-size: 300px;
|