@arcgis/core 4.30.0-next.20240321 → 4.30.0-next.20240322
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/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/parser.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/arcade/validation/languageKeywords.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4e4ad7ac43a72a2f88a1.js → 0005267c754235ae6784.js} +1 -1
- package/assets/esri/core/workers/chunks/07fd6804c7eaa8d2ac3f.js +1 -0
- package/assets/esri/core/workers/chunks/{ff4151d794ec73064fac.js → 10b4fbdc0f8be85737f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{8fc69ac4cce6d4dd5513.js → 18a9b472007d4f2b7bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{f484d2a3deb3c60d7038.js → 1ad1cdde4db5ab793623.js} +1 -1
- package/assets/esri/core/workers/chunks/36dfc55dc536b1831918.js +1 -0
- package/assets/esri/core/workers/chunks/{cee492b97e841a6d4678.js → 5b41ec1bd24314f6f153.js} +1 -1
- package/assets/esri/core/workers/chunks/{d518a0adc3d88700235c.js → 65680926c761bf53fd14.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c78ccff1c7f8ae90b06.js → 671892e733d8976e48bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{4be6d5660ec1c8ac7606.js → 70188e0aa47da1aa1a7f.js} +1 -1
- package/assets/esri/core/workers/chunks/7c212395100080cf122e.js +1 -0
- package/assets/esri/core/workers/chunks/8c07e1000522c3251ac0.js +1 -0
- package/assets/esri/core/workers/chunks/9d240e70a24520b2a810.js +1 -0
- package/assets/esri/core/workers/chunks/{ee1345b212cde1ff4755.js → a7ac2c5e701f44a67aa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a747af5273646ab848c.js → c38c6cae22627fbf6f3b.js} +1 -1
- package/assets/esri/core/workers/chunks/c4d2ff515fc70b07cb5f.js +1 -0
- package/assets/esri/core/workers/chunks/{96fd6fd8cbb3a2ee088e.js → caa03837b9c173ea493f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd5a078b7919f749ba3e.js → d90ee005599c44bfb6ad.js} +1 -1
- package/assets/esri/core/workers/chunks/dc3a6ab23a13ec5deed7.js +1 -0
- package/assets/esri/core/workers/chunks/{eb3e82ed1653ecf348da.js → e1a2f7282d889e251809.js} +1 -1
- package/assets/esri/core/workers/chunks/{52274afa07468bc555aa.js → ec52127b5ada8410acf3.js} +13 -13
- package/assets/esri/core/workers/chunks/f8693321bbd8a93666c7.js +1 -0
- package/assets/esri/core/workers/chunks/{fe7dfb8546d0fc40843c.js → fec0d24e8841ba1994f0.js} +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/index.js +5 -0
- package/chunks/languageUtils.js +1 -1
- package/core/number.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/undoredo/support/DataEditingContext.js +5 -0
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +5 -0
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/arcade/lib/arcade-parser.js +0 -5
- package/arcade/lib/assert.js +0 -5
- package/arcade/lib/character.js +0 -5
- package/arcade/lib/comment-handler.js +0 -5
- package/arcade/lib/error-handler.js +0 -5
- package/arcade/lib/parser.js +0 -5
- package/arcade/lib/scanner.js +0 -5
- package/arcade/lib/tokenizer.js +0 -5
- package/arcade/lib/types.js +0 -5
- package/assets/esri/core/workers/chunks/12b95408753cea053a40.js +0 -1
- package/assets/esri/core/workers/chunks/16397420fb6067b47b25.js +0 -1
- package/assets/esri/core/workers/chunks/1fdbeb110fae52b96bb3.js +0 -1
- package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +0 -1
- package/assets/esri/core/workers/chunks/7b07f3bc68a54974cd03.js +0 -1
- package/assets/esri/core/workers/chunks/ad95daa3f4ad7030bf24.js +0 -1
- package/assets/esri/core/workers/chunks/c2573c1cb7c714435acc.js +0 -1
- package/assets/esri/core/workers/chunks/df38774f63984be0a478.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5720],{68197:(e,t,r)=>{r.d(t,{A:()=>d});var i,o,n=r(40876),s=r(34727),l=r(56507);function a(e){return(0,s.qE)((0,l.Vr)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function p(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class c{static blendColors(e,t,r,i=new c){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return c.fromArray((0,n.z$)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),o=parseInt(e.substring(3,4),16),n=5===e.length?15:parseInt(e.substring(4),16);return c.fromArray([r+16*r,i+16*i,o+16*o,(n+16*n)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),o=parseInt(e.substring(5,7),16),n=7===e.length?255:parseInt(e.substring(7),16);return c.fromArray([r,i,o,n/255],t)}default:return null}}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,n.V6)(e)?(0,n.TS)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return null!=e?new c([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,o=4===r||8===r,n=`#${p(this.r,i)}${p(this.g,i)}${p(this.b,i)}${o?p(Math.round(255*this.a),i):""}`;return t?n.toUpperCase():n}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}c.prototype.declaredClass="esri.Color",(o=(i=c||(c={})).AlphaMode||(i.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=c},60945:(e,t,r)=>{r.d(t,{A:()=>m});var i,o=r(90237),n=r(25482),s=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),c=r(56400);let d=i=class extends n.oY{static get allTime(){return h}static get empty(){return y}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,o=e.end?.getTime()??e.end;return t===i&&r===o}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,e,t));let o=this.end;if(o){const r=(0,s.lL)(o,e,t);o=o.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new i({start:r,end:o})}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,o=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let s,l;return o>=t&&o<=r?s=o:t>=o&&t<=n&&(s=t),r>=o&&r<=n?l=r:n>=t&&n<=r&&(l=n),null==s||null==l||isNaN(s)||isNaN(l)?i.empty:new i({start:s===-1/0?null:new Date(s),end:l===1/0?null:new Date(l)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:n,end:l}=this;return null!=n&&(o.start=(0,s.S1)(n,e,t,r)),null!=l&&(o.end=(0,s.S1)(l,e,t,r)),o}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,o._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,o._)([(0,a.w)("end")],d.prototype,"readEnd",null),(0,o._)([(0,p.K)("end")],d.prototype,"writeEnd",null),(0,o._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,o._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,o._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,o._)([(0,a.w)("start")],d.prototype,"readStart",null),(0,o._)([(0,p.K)("start")],d.prototype,"writeStart",null),d=i=(0,o._)([(0,u.$)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},69540:(e,t,r)=>{r.d(t,{O:()=>p,P:()=>c});var i=r(90237),o=r(69622),n=(r(44208),r(4718)),s=(r(53966),r(97768)),l=r(35666),a=r(88620),u=r(40608);const p=e=>{let t=class extends e{clone(){const e=(0,a.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},o=new Map;for(const e in t){const s=t[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[e];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,n.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?o.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(o.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,r]of o)e.set(t,r,l.Gr.DEFAULTS)}return u}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let c=class extends(p(o.A)){};c=(0,i._)([(0,u.$)("esri.core.Clonable")],c)},69052:(e,t,r)=>{r.d(t,{ie:()=>l});var i=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,i,o=0,n=!1){return(i-=o)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),n&&i===r&&(i=t),i+o}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}new o(0,2*Math.PI),new o(-Math.PI,Math.PI);const l=new o(0,360)},4902:(e,t,r)=>{r.d(t,{PH:()=>l,sA:()=>s});var i=r(90237),o=r(40608);let n=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,o.$)("esri.core.Identifiable")],a)},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>m});const i={Base64:0,Hex:1,String:2,Raw:3},o=8,n=(1<<o)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){const t=[];for(let r=0,i=e.length*o;r<i;r+=o)t[r>>5]|=(e.charCodeAt(r/o)&n)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=o)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,o,n){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,n)),o),r)}function p(e,t,r,i,o,n,s){return u(t&r|~t&i,e,t,o,n,s)}function c(e,t,r,i,o,n,s){return u(t&i|r&~i,e,t,o,n,s)}function d(e,t,r,i,o,n,s){return u(t^r^i,e,t,o,n,s)}function h(e,t,r,i,o,n,s){return u(r^(t|~i),e,t,o,n,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,o=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=o,y=n;r=p(r,i,o,n,e[t],7,-680876936),n=p(n,r,i,o,e[t+1],12,-389564586),o=p(o,n,r,i,e[t+2],17,606105819),i=p(i,o,n,r,e[t+3],22,-1044525330),r=p(r,i,o,n,e[t+4],7,-176418897),n=p(n,r,i,o,e[t+5],12,1200080426),o=p(o,n,r,i,e[t+6],17,-1473231341),i=p(i,o,n,r,e[t+7],22,-45705983),r=p(r,i,o,n,e[t+8],7,1770035416),n=p(n,r,i,o,e[t+9],12,-1958414417),o=p(o,n,r,i,e[t+10],17,-42063),i=p(i,o,n,r,e[t+11],22,-1990404162),r=p(r,i,o,n,e[t+12],7,1804603682),n=p(n,r,i,o,e[t+13],12,-40341101),o=p(o,n,r,i,e[t+14],17,-1502002290),i=p(i,o,n,r,e[t+15],22,1236535329),r=c(r,i,o,n,e[t+1],5,-165796510),n=c(n,r,i,o,e[t+6],9,-1069501632),o=c(o,n,r,i,e[t+11],14,643717713),i=c(i,o,n,r,e[t],20,-373897302),r=c(r,i,o,n,e[t+5],5,-701558691),n=c(n,r,i,o,e[t+10],9,38016083),o=c(o,n,r,i,e[t+15],14,-660478335),i=c(i,o,n,r,e[t+4],20,-405537848),r=c(r,i,o,n,e[t+9],5,568446438),n=c(n,r,i,o,e[t+14],9,-1019803690),o=c(o,n,r,i,e[t+3],14,-187363961),i=c(i,o,n,r,e[t+8],20,1163531501),r=c(r,i,o,n,e[t+13],5,-1444681467),n=c(n,r,i,o,e[t+2],9,-51403784),o=c(o,n,r,i,e[t+7],14,1735328473),i=c(i,o,n,r,e[t+12],20,-1926607734),r=d(r,i,o,n,e[t+5],4,-378558),n=d(n,r,i,o,e[t+8],11,-2022574463),o=d(o,n,r,i,e[t+11],16,1839030562),i=d(i,o,n,r,e[t+14],23,-35309556),r=d(r,i,o,n,e[t+1],4,-1530992060),n=d(n,r,i,o,e[t+4],11,1272893353),o=d(o,n,r,i,e[t+7],16,-155497632),i=d(i,o,n,r,e[t+10],23,-1094730640),r=d(r,i,o,n,e[t+13],4,681279174),n=d(n,r,i,o,e[t],11,-358537222),o=d(o,n,r,i,e[t+3],16,-722521979),i=d(i,o,n,r,e[t+6],23,76029189),r=d(r,i,o,n,e[t+9],4,-640364487),n=d(n,r,i,o,e[t+12],11,-421815835),o=d(o,n,r,i,e[t+15],16,530742520),i=d(i,o,n,r,e[t+2],23,-995338651),r=h(r,i,o,n,e[t],6,-198630844),n=h(n,r,i,o,e[t+7],10,1126891415),o=h(o,n,r,i,e[t+14],15,-1416354905),i=h(i,o,n,r,e[t+5],21,-57434055),r=h(r,i,o,n,e[t+12],6,1700485571),n=h(n,r,i,o,e[t+3],10,-1894986606),o=h(o,n,r,i,e[t+10],15,-1051523),i=h(i,o,n,r,e[t+1],21,-2054922799),r=h(r,i,o,n,e[t+8],6,1873313359),n=h(n,r,i,o,e[t+15],10,-30611744),o=h(o,n,r,i,e[t+6],15,-1560198380),i=h(i,o,n,r,e[t+13],21,1309151649),r=h(r,i,o,n,e[t+4],6,-145523070),n=h(n,r,i,o,e[t+11],10,-1120210379),o=h(o,n,r,i,e[t+2],15,718787259),i=h(i,o,n,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),o=s(o,u),n=s(n,y)}return[r,i,o,n]}function m(e,t=i.Hex){const r=t||i.Base64,n=y(l(e),e.length*o);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,o=4*e.length;i<o;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return a(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let o=0;o<4;o++)8*r+6*o>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-o)&63))}return t.join("")}(n)}}},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),o=r(80200),n=r(76553),s=r(84952),l=r(13069),a=r(96156),u=r(35666),p=r(10107),c=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const o=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.z4)(t,r);return{type:String,read:(e,t,r)=>{const o=(0,d.r)(e,t,r);return i.type===String?o:"function"==typeof i.type?new i.type({url:o}):void 0},write:{writer(t,o,l,a){if(!a?.resources)return"string"==typeof t?void(o[l]=(0,d.t)(t,a)):void(o[l]=t.write({},a));const p=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(p,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,n.H)(this)||a?.origin&&this.originIdOf(r)>(0,u.aB)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:o,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.oP)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:n,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(o,r,t),p=(0,c.n)(u),d=(0,s.Zo)(a.path),h=i?.compress??!1;p===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),n[l]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):a?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.w8)(h)||f)?y(v):o[l]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,p.rM)(r,e,i);for(const e in o)t[e]=o[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:a,dest:u,targetPropertyName:p}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(n,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,o.d)(y.jsonString):h?.filename??(0,l.lk)(),v=(0,s.fj)(r?.prefix??h?.prefix,f),b=`${v}.${(0,c.n)(y)}`;if(r?.contentAddressed&&a.resources&&"json"===y.type){const e=a.resources.toKeep.find((({resource:e})=>e.path===b))??a.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[p]=e.resource.itemRelativeUrl)}const S=a.portalItem.resourceFromPath(b);(0,s.w8)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.tk)(t).then((e=>{S.path=`${v}.${(0,c.n)({type:"blob",blob:e})}`,u[p]=S.itemRelativeUrl})).catch((()=>{})));const w=r?.compress??!1;a.resources&&m({...e,resource:S,content:y,compress:w,updates:a.resources.toAdd}),u[p]=S.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},29242:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,l,a){return[e,t,r,i,o,n,s,l,a]}r.d(t,{fA:()=>o,vt:()=>i,zK:()=>n});const n=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:o},Symbol.toStringTag,{value:"Module"}))},82534:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>o,vt:()=>i,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:o,create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},67026:(e,t,r)=>{r.d(t,{A6:()=>m,Xd:()=>p,Xr:()=>h,hZ:()=>f,lw:()=>c,t2:()=>Z,x8:()=>u});var i=r(29242),o=r(82534),n=r(51850),s=r(34304),l=r(38954),a=r(87317);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function p(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.FD)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],l=r[0],a=r[1],u=r[2],p=r[3];return e[0]=i*p+s*l+o*u-n*a,e[1]=o*p+s*a+n*l-i*u,e[2]=n*p+s*u+i*a-o*l,e[3]=s*p-i*l-o*a-n*u,e}function d(e,t,r,i){const o=t[0],n=t[1],l=t[2],a=t[3];let u,p,c,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return p=o*y+n*m+l*g+a*f,p<0&&(p=-p,y=-y,m=-m,g=-g,f=-f),1-p>(0,s.FD)()?(u=Math.acos(p),c=Math.sin(u),d=Math.sin((1-i)*u)/c,h=Math.sin(i*u)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*l+h*g,e[3]=d*a+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),p=Math.cos(i);return e[0]=n*a*p-s*l*u,e[1]=s*l*p+n*a*u,e[2]=s*a*u-n*l*p,e[3]=s*a*p+n*l*u,e}const g=a.c,f=a.s,v=a.f,b=c,S=a.b,w=a.g,_=a.l,M=a.i,x=M,A=a.j,j=A,V=a.n,Z=a.a,I=a.e,T=(0,n.vt)(),N=(0,n.fA)(1,0,0),z=(0,n.fA)(0,1,0),R=(0,o.vt)(),P=(0,o.vt)(),F=(0,i.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:g,dot:w,equals:I,exactEquals:Z,fromEuler:m,fromMat3:y,getAxisAngle:p,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-o*l,e[3]=n*l,e},len:x,length:M,lerp:_,mul:b,multiply:c,normalize:V,random:function(e){const t=s.Ov,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*o),e[3]=l*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=o*a+n*l,e[2]=n*a-o*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-n*l,e[1]=o*a+s*l,e[2]=n*a+i*l,e[3]=s*a-o*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+o*l,e[1]=o*a-i*l,e[2]=n*a+s*l,e[3]=s*a-n*l,e},rotationTo:function(e,t,r){const i=(0,l.k)(t,r);return i<-.999999?((0,l.b)(T,N,t),(0,l.H)(T)<1e-6&&(0,l.b)(T,z,t),(0,l.n)(T,T),u(e,T,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(T,t,r),e[0]=T[0],e[1]=T[1],e[2]=T[2],e[3]=1+i,V(e,e))},scale:S,set:f,setAxes:function(e,t,r,i){const o=F;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(R,t,o,n),d(P,r,i,n),d(e,R,P,2*n*(1-n)),e},sqrLen:j,squaredLength:A,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},76620:(e,t,r)=>{r.d(t,{A:()=>b});var i,o=r(90237),n=r(4576),s=r(66552),l=r(25482),a=r(83047),u=r(67076),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937);const y=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.Xy)(m,"orthometric");const g=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,p.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,h.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,c.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,p.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,c.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,c.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,p.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,d.$)("esri.geometry.HeightModelInfo")],f);const b=f},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),o=(r(59456),r(78888)),n=r(49186),s=r(65529),l=r(4902),a=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(92602),m=r(5443),g=r(16930);let f=0,v=class extends(s.A.EventedMixin((0,l.sA)(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||y.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({type:m.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.$)("esri.layers.Layer")],v);const b=v},9006:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ke});var i=r(90237),o=r(13874),n=r(5503),s=r(49186),l=r(53966),a=r(92071),u=r(74887),p=r(10107),c=r(56507),d=(r(87811),r(44208),r(36005)),h=r(40608),y=r(38954),m=r(51850),g=r(5443),f=r(4146),v=r(52136),b=r(18768),S=r(69208),w=r(16131),_=r(8303),M=r(25036),x=r(58947),A=r(60694),j=r(55785),V=r(20437),Z=r(69540),I=r(69052),T=r(25482),N=r(87024),z=r(67026),R=r(82534),P=r(34304);const F=(0,m.vt)(),D=(0,R.vt)(),L=(0,R.vt)(),O=(0,R.vt)(),E=(0,m.fA)(0,0,1),U=(0,m.fA)(0,1,0),q=(0,m.fA)(1,0,0);function $(e){(0,y.c)(F,e),(0,y.n)(F,F);const t=Math.atan2(F[1],F[0]),r=(0,z.x8)((0,R.vt)(),E,-t);(0,y.u)(F,F,r);const i=-1*Math.atan2(F[2],F[0]);return[(0,P.ct)(t)+270,(0,P.ct)(i)+90]}function C(e,t){return(0,z.x8)(L,E,(0,P.DF)(e-270)),(0,z.x8)(O,U,(0,P.DF)(t-90)),(0,z.lw)(D,L,O),(0,y.c)(F,q),(0,y.u)(F,F,D),(0,y.n)(F,F),[F[0],F[1],F[2]]}var B=r(79901);let k=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}set orientation(e){const t=C(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}set tilt(e){const t=C(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],k.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],k.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],k.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],k.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],k.prototype,"point",void 0),k=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSlice")],k);const Y=k;var H=r(97159);let G=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],G.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{origins:{service:{read:H.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.P)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],G.prototype,"href",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],G.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"point",void 0),(0,i._)([(0,p.MZ)({type:[c.jz],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.MZ)({type:[Y],json:{write:!0}})],G.prototype,"slices",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{default:0,write:!0}})],G.prototype,"timeId",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"variableId",void 0),G=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSection")],G);const J=G;let W=class extends T.oY{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"specularFactor",void 0),W=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSimpleShading")],W);const K=W;let Q=class extends T.oY{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.MZ)({type:["discrete","continuous"],json:{write:!0}})],Q.prototype,"continuity",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasNoData",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"noData",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"offset",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"scale",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelFormat")],Q);const X=Q;let ee=class extends T.oY{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,p.MZ)({type:X,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,p.MZ)({type:X,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,p.MZ)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(4718),ie=r(68197);let oe=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=ie.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],oe.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],oe.prototype,"value",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],oe.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],oe.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],oe.prototype,"colorLocked",void 0),oe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIsosurface")],oe);const ne=oe;var se=r(62885),le=r(34727);let ae=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let pe=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.MZ)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],pe.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],pe.prototype,"position",void 0),pe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelOpacityStop")],pe);const ce=pe;let de=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRangeFilter")],de);const he=de;var ye,me;(me=ye||(ye={}))[me.Color=1]="Color",me[me.Alpha=2]="Alpha",me[me.Both=3]="Both";let ge=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.A.ofType(ue)),this.opacityStops=new(n.A.ofType(ce))}set colorStops(e){this._set("colorStops",(0,se.V)(e,this._get("colorStops"),n.A.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.V)(e,this._get("opacityStops"),n.A.ofType(ce)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==ye.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:ye.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,le.qE)(e.position,0,1),i=Math.round(255*(0,le.qE)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===ye.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=ye.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:ye.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==ye.Both)if(i.type===ye.Color){const[o,n]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,le.Cc)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,ye.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cc)(t[r],s[r],e))}))}else-1!==o?ve.forEach((e=>{i.color[e]=r[o].color[e]})):ve.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),l=t[i].color,a=t[o].color,u=new ie.A;ve.forEach((e=>{u[e]=Math.round((0,le.Cc)(l[e],a[e],s))})),u.a=(0,le.qE)(1-(0,le.Cc)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,le.qE)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.MZ)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(ce),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ge.prototype,"opacityStops",null),(0,i._)([(0,p.MZ)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,p.MZ)({type:[ie.A],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=ie.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelUniqueValue")],be);const Se=be;var we;let _e=we=class extends T.oY{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.A.ofType(Se)),this.isosurfaces=new(n.A.ofType(ne))}clone(){return new we({variableId:this.variableId,label:this.label,transferFunction:(0,re.o8)(this.transferFunction),uniqueValues:(0,re.o8)(this.uniqueValues),isosurfaces:(0,re.o8)(this.isosurfaces)})}};(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],_e.prototype,"variableId",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],_e.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],_e.prototype,"transferFunction",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Se),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],_e.prototype,"uniqueValues",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(ne),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],_e.prototype,"isosurfaces",void 0),_e=we=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariableStyle")],_e);const Me=_e;var xe=r(86738),Ae=r(16930),je=r(21325);let Ve=class extends T.oY{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Ve.prototype,"values",void 0),Ve=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIrregularSpacing")],Ve);const Ze=Ve;let Ie=class extends T.oY{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"scale",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"offset",void 0),Ie=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRegularSpacing")],Ie);const Te=Ie;let Ne=class extends T.oY{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.MZ)({type:Ze,json:{write:!0}})],Ne.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ne.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ne.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"quantity",void 0),(0,i._)([(0,p.MZ)({type:Te,json:{write:!0}})],Ne.prototype,"regularSpacing",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ne.prototype,"size",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"unit",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{read:!1}})],Ne.prototype,"isRegular",null),Ne=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDimension")],Ne);const ze=Ne;let Re=class extends T.oY{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Ae.A.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.A.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,je.aI)(this.spatialReference,e.spatialReference))return l.A.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.fA)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.A({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.ci)(e);if((0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.A({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.A({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:[ze],json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"dimensions",void 0),(0,i._)([(0,p.MZ)({type:Ae.A,json:{read:{enabled:!1}}})],Re.prototype,"spatialReference",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1}})],Re.prototype,"zDimension",null),(0,i._)([(0,p.MZ)({type:[Boolean],json:{read:!1}})],Re.prototype,"isValid",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.MZ)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Re.prototype,"volumeType",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"sizeInVoxels",null),Re=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolume")],Re);const Pe=Re;var Fe;let De=Fe=class extends T.oY{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Fe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"apronWidth",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"brickSize",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"nodeSize",void 0),De=Fe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeIndex")],De);const Le=De;let Oe=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}set orientation(e){const t=C(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}set tilt(e){const t=C(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ee=Oe;var Ue;let qe=Ue=class extends T.oY{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.A.ofType(Y)),this.dynamicSections=new(n.A.ofType(Ee))}set slices(e){this._set("slices",(0,se.V)(e,this._get("slices"),n.A.ofType(Y)))}set dynamicSections(e){this._set("dynamicSections",(0,se.V)(e,this._get("dynamicSections"),n.A.ofType(Ee)))}clone(){return new Ue({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.o8)(this.slices),dynamicSections:(0,re.o8)(this.dynamicSections)})}};(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"volumeId",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{default:1,write:!0}})],qe.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.MZ)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],qe.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{default:0,write:!0}})],qe.prototype,"verticalOffset",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Y),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],qe.prototype,"slices",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(Ee),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],qe.prototype,"dynamicSections",null),qe=Ue=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeStyle")],qe);const $e=qe;var Ce=r(30291);let Be=class extends((0,x.w6)((0,b.b)((0,w.q)((0,_.A)((0,M.j)((0,a.P)((0,S.d)((0,v.p)(f.A))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new K,this.opacity=1,this.variables=new n.A,this.volumes=new n.A,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(n.A.ofType($e)),this.variableStyles=new(n.A.ofType(Me)),this.sections=new(n.A.ofType(J))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,A.Jf)(e,l.A.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.QP).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.A("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.A.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Pe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new V.A({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new V.A({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new V.A({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new V.A({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new V.A({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new V.A({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ce.tn)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.at(o);return n?.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),l.A.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else l.A.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else l.A.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.fA)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.MZ)({type:["Voxel"]})],Be.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)(j.fV)],Be.prototype,"legendEnabled",void 0),(0,i._)([(0,p.MZ)({json:{write:!0}})],Be.prototype,"title",void 0),(0,i._)([(0,p.MZ)(j.OZ)],Be.prototype,"url",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Be.prototype,"sections",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Be.prototype,"currentVariableId",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType($e),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Be.prototype,"volumeStyles",void 0),(0,i._)([(0,p.MZ)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Be.prototype,"renderMode",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Me),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Be.prototype,"variableStyles",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Be.prototype,"enableSlices",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Be.prototype,"enableSections",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Be.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Be.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.MZ)({type:K,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Be.prototype,"shading",void 0),(0,i._)([(0,p.MZ)({type:["show","hide"]})],Be.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Be.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(te)})],Be.prototype,"variables",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Pe)})],Be.prototype,"volumes",void 0),(0,i._)([(0,p.MZ)({type:Le})],Be.prototype,"index",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Be.prototype,"minScale",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Be.prototype,"maxScale",void 0),(0,i._)([(0,p.MZ)({json:{read:!1},readOnly:!0})],Be.prototype,"type",void 0),(0,i._)([(0,p.MZ)({readOnly:!0,json:{name:"serviceVersion"}})],Be.prototype,"version",void 0),(0,i._)([(0,d.w)("service","version")],Be.prototype,"readVersion",null),(0,i._)([(0,p.MZ)({type:g.A})],Be.prototype,"fullExtent",void 0),(0,i._)([(0,d.w)("service","fullExtent",["fullExtent"])],Be.prototype,"readFullExtent",null),(0,i._)([(0,p.MZ)({readOnly:!0,clonable:!1,json:{read:!1}})],Be.prototype,"voxelFields",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],Be.prototype,"popupEnabled",void 0),(0,i._)([(0,p.MZ)({type:o.A,json:{read:!1}})],Be.prototype,"popupTemplate",null),(0,i._)([(0,p.MZ)({readOnly:!0})],Be.prototype,"defaultPopupTemplate",null),Be=(0,i._)([(0,h.$)("esri.layers.VoxelLayer")],Be);const ke=Be},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),o=r(92602),n=r(70333),s=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),m=r(40608),g=r(43937),f=r(83531),v=r(20655),b=r(80812),S=r(41318),w=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(8823)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.It)(r);let o,s;if(i)o=r.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,a=!1,u=!1;if(!s)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?S.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(90237),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20437:(e,t,r)=>{r.d(t,{A:()=>g});var i,o=r(90237),n=r(66552),s=r(25482),l=r(10107),a=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),c=r(40608),d=r(72088),h=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 m=i=class extends s.oY{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,o._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,o._)([(0,l.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,u.e)(h.m)],m.prototype,"type",void 0),(0,o._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,o._)([(0,c.$)("esri.layers.support.Field")],m);const g=m},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>M}),r(44208);var i,o=r(90237),n=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,o._)([(0,a.$)("esri.layers.support.CodedValue")],p);const c=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,l.e)(c)],d.prototype,"type",void 0),d=(0,o._)([(0,a.$)("esri.layers.support.Domain")],d);const h=d;var y;let m=y=class extends h{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 y({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,s.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,o._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(49186);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,o._)([(0,l.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,o._)([(0,a.$)("esri.layers.support.InheritedDomain")],v);const b=v;var S;let w=S=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.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]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,s.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]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,l.e)({range:"range"})],w.prototype,"type",void 0),w=S=(0,o._)([(0,a.$)("esri.layers.support.RangeDomain")],w);const _=w,M={key:"type",base:h,typeMap:{range:w,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},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"})},85648:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(84952);function o(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return a[t]||s}(e.url)}(e)]||l}const n={},s="text/plain",l=n[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)n[a[e]]=e},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),o=r(30524),n=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),l=(r(67336),r(92094),r(23721),r(41227)),a=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(c),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.A({fieldName:t.name,isEditable:(0,o.R$)(t,e),label:t.alias,format:d(t),visible:p(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,o.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.A,new n.A];return new i.A({title:g,content:f,fieldInfos:m})}const p=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Bz)(e,t);function c(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.A({digitSeparator:!0,places:0});case"double":return new a.A({digitSeparator:!0,places:2});case"string":return(0,o.JL)(e.name)?new a.A({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5720],{68197:(e,t,r)=>{r.d(t,{A:()=>d});var i,o,n=r(40876),s=r(34727),l=r(56507);function a(e){return(0,s.qE)((0,l.Vr)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function p(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class c{static blendColors(e,t,r,i=new c){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return c.fromArray((0,n.z$)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),o=parseInt(e.substring(3,4),16),n=5===e.length?15:parseInt(e.substring(4),16);return c.fromArray([r+16*r,i+16*i,o+16*o,(n+16*n)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),o=parseInt(e.substring(5,7),16),n=7===e.length?255:parseInt(e.substring(7),16);return c.fromArray([r,i,o,n/255],t)}default:return null}}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,n.V6)(e)?(0,n.TS)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return null!=e?new c([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,o=4===r||8===r,n=`#${p(this.r,i)}${p(this.g,i)}${p(this.b,i)}${o?p(Math.round(255*this.a),i):""}`;return t?n.toUpperCase():n}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}c.prototype.declaredClass="esri.Color",(o=(i=c||(c={})).AlphaMode||(i.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=c},60945:(e,t,r)=>{r.d(t,{A:()=>m});var i,o=r(90237),n=r(25482),s=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),c=r(56400);let d=i=class extends n.oY{static get allTime(){return h}static get empty(){return y}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,o=e.end?.getTime()??e.end;return t===i&&r===o}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,e,t));let o=this.end;if(o){const r=(0,s.lL)(o,e,t);o=o.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new i({start:r,end:o})}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,o=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let s,l;return o>=t&&o<=r?s=o:t>=o&&t<=n&&(s=t),r>=o&&r<=n?l=r:n>=t&&n<=r&&(l=n),null==s||null==l||isNaN(s)||isNaN(l)?i.empty:new i({start:s===-1/0?null:new Date(s),end:l===1/0?null:new Date(l)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:n,end:l}=this;return null!=n&&(o.start=(0,s.S1)(n,e,t,r)),null!=l&&(o.end=(0,s.S1)(l,e,t,r)),o}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,o._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,o._)([(0,a.w)("end")],d.prototype,"readEnd",null),(0,o._)([(0,p.K)("end")],d.prototype,"writeEnd",null),(0,o._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,o._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,o._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,o._)([(0,a.w)("start")],d.prototype,"readStart",null),(0,o._)([(0,p.K)("start")],d.prototype,"writeStart",null),d=i=(0,o._)([(0,u.$)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},69540:(e,t,r)=>{r.d(t,{O:()=>p,P:()=>c});var i=r(90237),o=r(69622),n=(r(44208),r(4718)),s=(r(53966),r(97768)),l=r(35666),a=r(88620),u=r(40608);const p=e=>{let t=class extends e{clone(){const e=(0,a.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},o=new Map;for(const e in t){const s=t[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[e];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,n.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?o.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(o.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,r]of o)e.set(t,r,l.Gr.DEFAULTS)}return u}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let c=class extends(p(o.A)){};c=(0,i._)([(0,u.$)("esri.core.Clonable")],c)},69052:(e,t,r)=>{r.d(t,{ie:()=>l});var i=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,i,o=0,n=!1){return(i-=o)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),n&&i===r&&(i=t),i+o}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}new o(0,2*Math.PI),new o(-Math.PI,Math.PI);const l=new o(0,360)},4902:(e,t,r)=>{r.d(t,{PH:()=>l,sA:()=>s});var i=r(90237),o=r(40608);let n=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,o.$)("esri.core.Identifiable")],a)},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>m});const i={Base64:0,Hex:1,String:2,Raw:3},o=8,n=(1<<o)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){const t=[];for(let r=0,i=e.length*o;r<i;r+=o)t[r>>5]|=(e.charCodeAt(r/o)&n)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=o)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,o,n){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,n)),o),r)}function p(e,t,r,i,o,n,s){return u(t&r|~t&i,e,t,o,n,s)}function c(e,t,r,i,o,n,s){return u(t&i|r&~i,e,t,o,n,s)}function d(e,t,r,i,o,n,s){return u(t^r^i,e,t,o,n,s)}function h(e,t,r,i,o,n,s){return u(r^(t|~i),e,t,o,n,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,o=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=o,y=n;r=p(r,i,o,n,e[t],7,-680876936),n=p(n,r,i,o,e[t+1],12,-389564586),o=p(o,n,r,i,e[t+2],17,606105819),i=p(i,o,n,r,e[t+3],22,-1044525330),r=p(r,i,o,n,e[t+4],7,-176418897),n=p(n,r,i,o,e[t+5],12,1200080426),o=p(o,n,r,i,e[t+6],17,-1473231341),i=p(i,o,n,r,e[t+7],22,-45705983),r=p(r,i,o,n,e[t+8],7,1770035416),n=p(n,r,i,o,e[t+9],12,-1958414417),o=p(o,n,r,i,e[t+10],17,-42063),i=p(i,o,n,r,e[t+11],22,-1990404162),r=p(r,i,o,n,e[t+12],7,1804603682),n=p(n,r,i,o,e[t+13],12,-40341101),o=p(o,n,r,i,e[t+14],17,-1502002290),i=p(i,o,n,r,e[t+15],22,1236535329),r=c(r,i,o,n,e[t+1],5,-165796510),n=c(n,r,i,o,e[t+6],9,-1069501632),o=c(o,n,r,i,e[t+11],14,643717713),i=c(i,o,n,r,e[t],20,-373897302),r=c(r,i,o,n,e[t+5],5,-701558691),n=c(n,r,i,o,e[t+10],9,38016083),o=c(o,n,r,i,e[t+15],14,-660478335),i=c(i,o,n,r,e[t+4],20,-405537848),r=c(r,i,o,n,e[t+9],5,568446438),n=c(n,r,i,o,e[t+14],9,-1019803690),o=c(o,n,r,i,e[t+3],14,-187363961),i=c(i,o,n,r,e[t+8],20,1163531501),r=c(r,i,o,n,e[t+13],5,-1444681467),n=c(n,r,i,o,e[t+2],9,-51403784),o=c(o,n,r,i,e[t+7],14,1735328473),i=c(i,o,n,r,e[t+12],20,-1926607734),r=d(r,i,o,n,e[t+5],4,-378558),n=d(n,r,i,o,e[t+8],11,-2022574463),o=d(o,n,r,i,e[t+11],16,1839030562),i=d(i,o,n,r,e[t+14],23,-35309556),r=d(r,i,o,n,e[t+1],4,-1530992060),n=d(n,r,i,o,e[t+4],11,1272893353),o=d(o,n,r,i,e[t+7],16,-155497632),i=d(i,o,n,r,e[t+10],23,-1094730640),r=d(r,i,o,n,e[t+13],4,681279174),n=d(n,r,i,o,e[t],11,-358537222),o=d(o,n,r,i,e[t+3],16,-722521979),i=d(i,o,n,r,e[t+6],23,76029189),r=d(r,i,o,n,e[t+9],4,-640364487),n=d(n,r,i,o,e[t+12],11,-421815835),o=d(o,n,r,i,e[t+15],16,530742520),i=d(i,o,n,r,e[t+2],23,-995338651),r=h(r,i,o,n,e[t],6,-198630844),n=h(n,r,i,o,e[t+7],10,1126891415),o=h(o,n,r,i,e[t+14],15,-1416354905),i=h(i,o,n,r,e[t+5],21,-57434055),r=h(r,i,o,n,e[t+12],6,1700485571),n=h(n,r,i,o,e[t+3],10,-1894986606),o=h(o,n,r,i,e[t+10],15,-1051523),i=h(i,o,n,r,e[t+1],21,-2054922799),r=h(r,i,o,n,e[t+8],6,1873313359),n=h(n,r,i,o,e[t+15],10,-30611744),o=h(o,n,r,i,e[t+6],15,-1560198380),i=h(i,o,n,r,e[t+13],21,1309151649),r=h(r,i,o,n,e[t+4],6,-145523070),n=h(n,r,i,o,e[t+11],10,-1120210379),o=h(o,n,r,i,e[t+2],15,718787259),i=h(i,o,n,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),o=s(o,u),n=s(n,y)}return[r,i,o,n]}function m(e,t=i.Hex){const r=t||i.Base64,n=y(l(e),e.length*o);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,o=4*e.length;i<o;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return a(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let o=0;o<4;o++)8*r+6*o>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-o)&63))}return t.join("")}(n)}}},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),o=r(80200),n=r(76553),s=r(84952),l=r(13069),a=r(96156),u=r(35666),p=r(10107),c=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const o=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.z4)(t,r);return{type:String,read:(e,t,r)=>{const o=(0,d.r)(e,t,r);return i.type===String?o:"function"==typeof i.type?new i.type({url:o}):void 0},write:{writer(t,o,l,a){if(!a?.resources)return"string"==typeof t?void(o[l]=(0,d.t)(t,a)):void(o[l]=t.write({},a));const p=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(p,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,n.H)(this)||a?.origin&&this.originIdOf(r)>(0,u.aB)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:o,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.oP)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:n,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(o,r,t),p=(0,c.n)(u),d=(0,s.Zo)(a.path),h=i?.compress??!1;p===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),n[l]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):a?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.w8)(h)||f)?y(v):o[l]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,p.rM)(r,e,i);for(const e in o)t[e]=o[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:a,dest:u,targetPropertyName:p}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(n,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,o.d)(y.jsonString):h?.filename??(0,l.lk)(),v=(0,s.fj)(r?.prefix??h?.prefix,f),b=`${v}.${(0,c.n)(y)}`;if(r?.contentAddressed&&a.resources&&"json"===y.type){const e=a.resources.toKeep.find((({resource:e})=>e.path===b))??a.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[p]=e.resource.itemRelativeUrl)}const S=a.portalItem.resourceFromPath(b);(0,s.w8)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.tk)(t).then((e=>{S.path=`${v}.${(0,c.n)({type:"blob",blob:e})}`,u[p]=S.itemRelativeUrl})).catch((()=>{})));const w=r?.compress??!1;a.resources&&m({...e,resource:S,content:y,compress:w,updates:a.resources.toAdd}),u[p]=S.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},29242:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,l,a){return[e,t,r,i,o,n,s,l,a]}r.d(t,{fA:()=>o,vt:()=>i,zK:()=>n});const n=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:o},Symbol.toStringTag,{value:"Module"}))},82534:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>o,vt:()=>i,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:o,create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},67026:(e,t,r)=>{r.d(t,{A6:()=>m,Xd:()=>p,Xr:()=>h,hZ:()=>f,lw:()=>c,t2:()=>Z,x8:()=>u});var i=r(29242),o=r(82534),n=r(51850),s=r(34304),l=r(38954),a=r(87317);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function p(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.FD)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],l=r[0],a=r[1],u=r[2],p=r[3];return e[0]=i*p+s*l+o*u-n*a,e[1]=o*p+s*a+n*l-i*u,e[2]=n*p+s*u+i*a-o*l,e[3]=s*p-i*l-o*a-n*u,e}function d(e,t,r,i){const o=t[0],n=t[1],l=t[2],a=t[3];let u,p,c,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return p=o*y+n*m+l*g+a*f,p<0&&(p=-p,y=-y,m=-m,g=-g,f=-f),1-p>(0,s.FD)()?(u=Math.acos(p),c=Math.sin(u),d=Math.sin((1-i)*u)/c,h=Math.sin(i*u)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*l+h*g,e[3]=d*a+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),p=Math.cos(i);return e[0]=n*a*p-s*l*u,e[1]=s*l*p+n*a*u,e[2]=s*a*u-n*l*p,e[3]=s*a*p+n*l*u,e}const g=a.c,f=a.s,v=a.f,b=c,S=a.b,w=a.g,_=a.l,M=a.i,x=M,A=a.j,j=A,V=a.n,Z=a.a,I=a.e,T=(0,n.vt)(),N=(0,n.fA)(1,0,0),z=(0,n.fA)(0,1,0),R=(0,o.vt)(),P=(0,o.vt)(),F=(0,i.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:g,dot:w,equals:I,exactEquals:Z,fromEuler:m,fromMat3:y,getAxisAngle:p,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-o*l,e[3]=n*l,e},len:x,length:M,lerp:_,mul:b,multiply:c,normalize:V,random:function(e){const t=s.Ov,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*o),e[3]=l*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=o*a+n*l,e[2]=n*a-o*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-n*l,e[1]=o*a+s*l,e[2]=n*a+i*l,e[3]=s*a-o*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+o*l,e[1]=o*a-i*l,e[2]=n*a+s*l,e[3]=s*a-n*l,e},rotationTo:function(e,t,r){const i=(0,l.k)(t,r);return i<-.999999?((0,l.b)(T,N,t),(0,l.H)(T)<1e-6&&(0,l.b)(T,z,t),(0,l.n)(T,T),u(e,T,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(T,t,r),e[0]=T[0],e[1]=T[1],e[2]=T[2],e[3]=1+i,V(e,e))},scale:S,set:f,setAxes:function(e,t,r,i){const o=F;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(R,t,o,n),d(P,r,i,n),d(e,R,P,2*n*(1-n)),e},sqrLen:j,squaredLength:A,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},54239:(e,t,r)=>{r.d(t,{A:()=>b});var i,o=r(90237),n=r(4576),s=r(66552),l=r(25482),a=r(83047),u=r(67076),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937);const y=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.Xy)(m,"orthometric");const g=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,p.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,h.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,c.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,p.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,c.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,c.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,p.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,d.$)("esri.geometry.HeightModelInfo")],f);const b=f},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),o=(r(59456),r(78888)),n=r(49186),s=r(65529),l=r(4902),a=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(92602),m=r(5443),g=r(16930);let f=0,v=class extends(s.A.EventedMixin((0,l.sA)(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||y.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({type:m.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.$)("esri.layers.Layer")],v);const b=v},9006:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ke});var i=r(90237),o=r(13874),n=r(5503),s=r(49186),l=r(53966),a=r(92071),u=r(74887),p=r(10107),c=r(56507),d=(r(87811),r(44208),r(36005)),h=r(40608),y=r(38954),m=r(51850),g=r(5443),f=r(4146),v=r(52136),b=r(18768),S=r(69208),w=r(16131),_=r(8303),M=r(25036),x=r(58947),A=r(60694),j=r(55785),V=r(20437),Z=r(69540),I=r(69052),T=r(25482),N=r(87024),z=r(67026),R=r(82534),P=r(34304);const F=(0,m.vt)(),D=(0,R.vt)(),L=(0,R.vt)(),O=(0,R.vt)(),E=(0,m.fA)(0,0,1),U=(0,m.fA)(0,1,0),q=(0,m.fA)(1,0,0);function $(e){(0,y.c)(F,e),(0,y.n)(F,F);const t=Math.atan2(F[1],F[0]),r=(0,z.x8)((0,R.vt)(),E,-t);(0,y.u)(F,F,r);const i=-1*Math.atan2(F[2],F[0]);return[(0,P.ct)(t)+270,(0,P.ct)(i)+90]}function C(e,t){return(0,z.x8)(L,E,(0,P.DF)(e-270)),(0,z.x8)(O,U,(0,P.DF)(t-90)),(0,z.lw)(D,L,O),(0,y.c)(F,q),(0,y.u)(F,F,D),(0,y.n)(F,F),[F[0],F[1],F[2]]}var B=r(79901);let k=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}set orientation(e){const t=C(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}set tilt(e){const t=C(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],k.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],k.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],k.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],k.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],k.prototype,"point",void 0),k=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSlice")],k);const Y=k;var H=r(97159);let G=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],G.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{origins:{service:{read:H.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.P)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],G.prototype,"href",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],G.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"point",void 0),(0,i._)([(0,p.MZ)({type:[c.jz],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.MZ)({type:[Y],json:{write:!0}})],G.prototype,"slices",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{default:0,write:!0}})],G.prototype,"timeId",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"variableId",void 0),G=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSection")],G);const J=G;let W=class extends T.oY{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"specularFactor",void 0),W=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSimpleShading")],W);const K=W;let Q=class extends T.oY{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.MZ)({type:["discrete","continuous"],json:{write:!0}})],Q.prototype,"continuity",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasNoData",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"noData",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"offset",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Q.prototype,"scale",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelFormat")],Q);const X=Q;let ee=class extends T.oY{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,p.MZ)({type:X,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,p.MZ)({type:X,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,p.MZ)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(4718),ie=r(68197);let oe=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=ie.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],oe.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],oe.prototype,"value",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],oe.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],oe.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],oe.prototype,"colorLocked",void 0),oe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIsosurface")],oe);const ne=oe;var se=r(62885),le=r(34727);let ae=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let pe=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.MZ)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],pe.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],pe.prototype,"position",void 0),pe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelOpacityStop")],pe);const ce=pe;let de=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRangeFilter")],de);const he=de;var ye,me;(me=ye||(ye={}))[me.Color=1]="Color",me[me.Alpha=2]="Alpha",me[me.Both=3]="Both";let ge=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.A.ofType(ue)),this.opacityStops=new(n.A.ofType(ce))}set colorStops(e){this._set("colorStops",(0,se.V)(e,this._get("colorStops"),n.A.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.V)(e,this._get("opacityStops"),n.A.ofType(ce)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==ye.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:ye.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,le.qE)(e.position,0,1),i=Math.round(255*(0,le.qE)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===ye.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=ye.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:ye.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==ye.Both)if(i.type===ye.Color){const[o,n]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,le.Cc)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,ye.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cc)(t[r],s[r],e))}))}else-1!==o?ve.forEach((e=>{i.color[e]=r[o].color[e]})):ve.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),l=t[i].color,a=t[o].color,u=new ie.A;ve.forEach((e=>{u[e]=Math.round((0,le.Cc)(l[e],a[e],s))})),u.a=(0,le.qE)(1-(0,le.Cc)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,le.qE)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.MZ)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(ce),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ge.prototype,"opacityStops",null),(0,i._)([(0,p.MZ)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,p.MZ)({type:[ie.A],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,Z.O)(T.oY)){constructor(){super(...arguments),this.color=ie.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.MZ)({type:ie.A,json:{type:[c.jz],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelUniqueValue")],be);const Se=be;var we;let _e=we=class extends T.oY{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.A.ofType(Se)),this.isosurfaces=new(n.A.ofType(ne))}clone(){return new we({variableId:this.variableId,label:this.label,transferFunction:(0,re.o8)(this.transferFunction),uniqueValues:(0,re.o8)(this.uniqueValues),isosurfaces:(0,re.o8)(this.isosurfaces)})}};(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],_e.prototype,"variableId",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],_e.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],_e.prototype,"transferFunction",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Se),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],_e.prototype,"uniqueValues",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(ne),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],_e.prototype,"isosurfaces",void 0),_e=we=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariableStyle")],_e);const Me=_e;var xe=r(86738),Ae=r(16930),je=r(21325);let Ve=class extends T.oY{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Ve.prototype,"values",void 0),Ve=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIrregularSpacing")],Ve);const Ze=Ve;let Ie=class extends T.oY{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"scale",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"offset",void 0),Ie=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRegularSpacing")],Ie);const Te=Ie;let Ne=class extends T.oY{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.MZ)({type:Ze,json:{write:!0}})],Ne.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ne.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ne.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"quantity",void 0),(0,i._)([(0,p.MZ)({type:Te,json:{write:!0}})],Ne.prototype,"regularSpacing",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:!0}})],Ne.prototype,"size",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Ne.prototype,"unit",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{read:!1}})],Ne.prototype,"isRegular",null),Ne=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDimension")],Ne);const ze=Ne;let Re=class extends T.oY{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Ae.A.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.A.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,je.aI)(this.spatialReference,e.spatialReference))return l.A.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.fA)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.A({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.ci)(e);if((0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.A({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.A({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:[ze],json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"dimensions",void 0),(0,i._)([(0,p.MZ)({type:Ae.A,json:{read:{enabled:!1}}})],Re.prototype,"spatialReference",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1}})],Re.prototype,"zDimension",null),(0,i._)([(0,p.MZ)({type:[Boolean],json:{read:!1}})],Re.prototype,"isValid",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.MZ)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Re.prototype,"volumeType",null),(0,i._)([(0,p.MZ)({type:[Number],json:{read:!1}})],Re.prototype,"sizeInVoxels",null),Re=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolume")],Re);const Pe=Re;var Fe;let De=Fe=class extends T.oY{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Fe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"apronWidth",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"brickSize",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"nodeSize",void 0),De=Fe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeIndex")],De);const Le=De;let Oe=class extends((0,Z.O)(T.oY)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(e),0,!0)}set orientation(e){const t=C(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=$(this.normal);return I.ie.normalize((0,c.GB)(t),0,!0)}set tilt(e){const t=C(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.MZ)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,p.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.w)((e=>I.ie.normalize((0,c.GB)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,p.MZ)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ee=Oe;var Ue;let qe=Ue=class extends T.oY{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.A.ofType(Y)),this.dynamicSections=new(n.A.ofType(Ee))}set slices(e){this._set("slices",(0,se.V)(e,this._get("slices"),n.A.ofType(Y)))}set dynamicSections(e){this._set("dynamicSections",(0,se.V)(e,this._get("dynamicSections"),n.A.ofType(Ee)))}clone(){return new Ue({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.o8)(this.slices),dynamicSections:(0,re.o8)(this.dynamicSections)})}};(0,i._)([(0,p.MZ)({type:c.jz,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"volumeId",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{default:1,write:!0}})],qe.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.MZ)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],qe.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{default:0,write:!0}})],qe.prototype,"verticalOffset",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Y),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],qe.prototype,"slices",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(Ee),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],qe.prototype,"dynamicSections",null),qe=Ue=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeStyle")],qe);const $e=qe;var Ce=r(30291);let Be=class extends((0,x.w6)((0,b.b)((0,w.q)((0,_.A)((0,M.j)((0,a.P)((0,S.d)((0,v.p)(f.A))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new K,this.opacity=1,this.variables=new n.A,this.volumes=new n.A,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(n.A.ofType($e)),this.variableStyles=new(n.A.ofType(Me)),this.sections=new(n.A.ofType(J))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,A.Jf)(e,l.A.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.QP).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.A("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.A.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Pe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new V.A({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new V.A({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new V.A({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new V.A({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new V.A({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new V.A({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ce.tn)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.at(o);return n?.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),l.A.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)l.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else l.A.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else l.A.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.fA)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.MZ)({type:["Voxel"]})],Be.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)(j.fV)],Be.prototype,"legendEnabled",void 0),(0,i._)([(0,p.MZ)({json:{write:!0}})],Be.prototype,"title",void 0),(0,i._)([(0,p.MZ)(j.OZ)],Be.prototype,"url",null),(0,i._)([(0,p.MZ)({type:n.A.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Be.prototype,"sections",void 0),(0,i._)([(0,p.MZ)({type:c.jz,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Be.prototype,"currentVariableId",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType($e),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Be.prototype,"volumeStyles",void 0),(0,i._)([(0,p.MZ)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Be.prototype,"renderMode",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Me),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Be.prototype,"variableStyles",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Be.prototype,"enableSlices",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Be.prototype,"enableSections",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Be.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Be.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.MZ)({type:K,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Be.prototype,"shading",void 0),(0,i._)([(0,p.MZ)({type:["show","hide"]})],Be.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Be.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(te)})],Be.prototype,"variables",void 0),(0,i._)([(0,p.MZ)({type:n.A.ofType(Pe)})],Be.prototype,"volumes",void 0),(0,i._)([(0,p.MZ)({type:Le})],Be.prototype,"index",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Be.prototype,"minScale",void 0),(0,i._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Be.prototype,"maxScale",void 0),(0,i._)([(0,p.MZ)({json:{read:!1},readOnly:!0})],Be.prototype,"type",void 0),(0,i._)([(0,p.MZ)({readOnly:!0,json:{name:"serviceVersion"}})],Be.prototype,"version",void 0),(0,i._)([(0,d.w)("service","version")],Be.prototype,"readVersion",null),(0,i._)([(0,p.MZ)({type:g.A})],Be.prototype,"fullExtent",void 0),(0,i._)([(0,d.w)("service","fullExtent",["fullExtent"])],Be.prototype,"readFullExtent",null),(0,i._)([(0,p.MZ)({readOnly:!0,clonable:!1,json:{read:!1}})],Be.prototype,"voxelFields",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],Be.prototype,"popupEnabled",void 0),(0,i._)([(0,p.MZ)({type:o.A,json:{read:!1}})],Be.prototype,"popupTemplate",null),(0,i._)([(0,p.MZ)({readOnly:!0})],Be.prototype,"defaultPopupTemplate",null),Be=(0,i._)([(0,h.$)("esri.layers.VoxelLayer")],Be);const ke=Be},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),o=r(92602),n=r(70333),s=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),m=r(40608),g=r(43937),f=r(83531),v=r(20655),b=r(80812),S=r(41318),w=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(8823)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.It)(r);let o,s;if(i)o=r.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,a=!1,u=!1;if(!s)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?S.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(90237),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20437:(e,t,r)=>{r.d(t,{A:()=>g});var i,o=r(90237),n=r(66552),s=r(25482),l=r(10107),a=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),c=r(40608),d=r(72088),h=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 m=i=class extends s.oY{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,o._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,o._)([(0,l.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,u.e)(h.m)],m.prototype,"type",void 0),(0,o._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,o._)([(0,c.$)("esri.layers.support.Field")],m);const g=m},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>M}),r(44208);var i,o=r(90237),n=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,o._)([(0,a.$)("esri.layers.support.CodedValue")],p);const c=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,l.e)(c)],d.prototype,"type",void 0),d=(0,o._)([(0,a.$)("esri.layers.support.Domain")],d);const h=d;var y;let m=y=class extends h{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 y({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,s.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,o._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(49186);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,o._)([(0,l.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,o._)([(0,a.$)("esri.layers.support.InheritedDomain")],v);const b=v;var S;let w=S=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.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]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,s.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]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,l.e)({range:"range"})],w.prototype,"type",void 0),w=S=(0,o._)([(0,a.$)("esri.layers.support.RangeDomain")],w);const _=w,M={key:"type",base:h,typeMap:{range:w,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},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"})},85648:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(84952);function o(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return a[t]||s}(e.url)}(e)]||l}const n={},s="text/plain",l=n[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)n[a[e]]=e},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),o=r(30524),n=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),l=(r(67336),r(92094),r(23721),r(41227)),a=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(c),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.A({fieldName:t.name,isEditable:(0,o.R$)(t,e),label:t.alias,format:d(t),visible:p(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,o.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.A,new n.A];return new i.A({title:g,content:f,fieldInfos:m})}const p=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Bz)(e,t);function c(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.A({digitSeparator:!0,places:0});case"double":return new a.A({digitSeparator:!0,places:2});case"string":return(0,o.JL)(e.name)?new a.A({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
|