@arcgis/core 4.29.6 → 4.29.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4984e2b79d862114d6a6.js → 1a8d56e01ddfec2257c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb525a131b6841276b.js → 1e4d779a884f13762601.js} +1 -1
- package/assets/esri/core/workers/chunks/{2447a4d5886aeb0ff72a.js → 205597cd91cb7ff3d2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c50daccd84ba5545bfe.js → 22ebdec0867e44d8d58c.js} +1 -1
- package/assets/esri/core/workers/chunks/{da4616b02dd0c3dd3d5d.js → 321547d796a2ecd72ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c3ae96ec90e9ed7dd50.js → 32be478638e9e643ea32.js} +1 -1
- package/assets/esri/core/workers/chunks/{a61f337802ae963d7f65.js → 59f03847a9eb96e5f65c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a98d2e026f63a581b1e.js → 5b08309b184f5d8345a0.js} +1 -1
- package/assets/esri/core/workers/chunks/631bda7b99a27f4453c1.js +1 -0
- package/assets/esri/core/workers/chunks/{c527692694688a5b3b07.js → 658a8ee9a4f24bc03f7f.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{48db6e0bbb1a9c043193.js → b7a78246d25dc07f173d.js} +1 -1
- package/assets/esri/core/workers/chunks/{60ab18c6a04d4b2f1d4c.js → bb05528d2ca12c57a031.js} +1 -1
- package/assets/esri/core/workers/chunks/{5227f9eea6988aadad7f.js → cf0dc0ccbeaf9458de6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f59b5ea05caca8a1a398.js → d40408be9bbcb0021d18.js} +1 -1
- package/assets/esri/core/workers/chunks/df6fbabbc74a408575fc.js +1 -0
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +8 -2
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +5 -0
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/assets/esri/core/workers/chunks/a068f0c8c1c632e8b2cb.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256],{44728:(e,t,r)=>{r.d(t,{c:()=>d});var i,n,o=r(46988),s=r(53648),l=r(53368);function a(e){return(0,s.qk)((0,l.Wu)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class p{static blendColors(e,t,r,i=new p){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])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.ec)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){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),n=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),n=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.kv)(e)?(0,o.SQ)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([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?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||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,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}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=p.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new p(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}}p.prototype.declaredClass="esri.Color",(n=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=p},25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),o=r(40504),s=r(94360),l=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends o.am{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,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.aU)(r,e,t));let n=this.end;if(n){const r=(0,s.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:o,end:l}=this;return null!=o&&(n.start=(0,s.g1)(o,e,t,r)),null!=l&&(n.end=(0,s.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,a.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,a.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},3856:(e,t,r)=>{r.d(t,{m:()=>p,q:()=>c});var i=r(41948),n=r(43780),o=(r(9456),r(62088)),s=(r(66360),r(70680)),l=r(71448),a=r(20916),u=r(12552);const c=e=>{let t=class extends e{clone(){const e=(0,a.m6)(this);(0,s.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},n=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.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,o.gx)(c),null!=c&&null==p||(a===l.sT.DEFAULTS?n.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,a.m6)(u)?.store;if(e)for(const[t,r]of n)e.set(t,r,l.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let p=class extends(c(n.c)){};p=(0,i._)([(0,u.c)("esri.core.Clonable")],p)},27368:(e,t,r)=>{r.d(t,{sD:()=>s});var i=r(53648);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qk)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},22156:(e,t,r)=>{r.d(t,{MR:()=>s,qm:()=>l});var i=r(41948),n=r(12552);let o=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-"+o++})}};return t=(0,i._)([(0,n.c)("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:o++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,n.c)("esri.core.Identifiable")],a)},77380:(e,t,r)=>{r.d(t,{I:()=>m,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-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*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(l(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;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("")}(o);case i.String:return a(o);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 n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},90636:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(20744),n=r(77380),o=r(4644),s=r(28176),l=r(63564),a=r(44296),u=r(71448),c=r(1580),p=r(73960),d=r(91952);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.EF)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{writer(t,n,l,a){if(!a?.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,a)):void(n[l]=t.write({},a));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,o.w)(this)||a?.origin&&this.originIdOf(r)>(0,u.CQ)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.ic)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(n,r,t),c=(0,p.e)(u),d=(0,s.wt)(a.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),o[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.ue)(h)||f)?y(v):n[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,c.aq)(r,e,i);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:a,dest:u,targetPropertyName:c}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(o,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${c}" 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,n.I)(y.jsonString):h?.filename??(0,l.g1)(),v=(0,s.kn)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.e)(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[c]=e.resource.itemRelativeUrl)}const q=a.portalItem.resourceFromPath(b);(0,s.ue)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.SW)(t).then((e=>{q.path=`${v}.${(0,p.e)({type:"blob",blob:e})}`,u[c]=q.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;a.resources&&m({...e,resource:q,content:y,compress:S,updates:a.resources.toAdd}),u[c]=q.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},68612:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}r.d(t,{IJ:()=>o,Su:()=>i,WK:()=>n});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,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:n},Symbol.toStringTag,{value:"Module"}))},2620:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{IJ:()=>o,Su:()=>i,ct:()=>n});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,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"}))},41512:(e,t,r)=>{r.d(t,{C0:()=>c,WO:()=>f,Wu:()=>m,fO:()=>h,iW:()=>p,sF:()=>T,yG:()=>u});var i=r(68612),n=r(2620),o=r(62484),s=r(47364),l=r(98472),a=r(74784);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.Au)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=n*y+o*m+l*g+a*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.Au)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+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 n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const g=a.c,f=a.s,v=a.g,b=p,q=a.d,S=a.h,w=a.l,_=a.i,x=_,j=a.j,V=j,I=a.n,T=a.a,A=a.e,N=(0,o.Su)(),M=(0,o.WK)(1,0,0),R=(0,o.WK)(0,1,0),z=(0,n.Su)(),F=(0,n.Su)(),D=(0,i.Su)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:g,dot:S,equals:A,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:x,length:_,lerp:w,mul:b,multiply:p,normalize:I,random:function(e){const t=s.QR,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.k)(t,r);return i<-.999999?((0,l.b)(N,M,t),(0,l.D)(N)<1e-6&&(0,l.b)(N,R,t),(0,l.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,I(e,e))},scale:q,set:f,setAxes:function(e,t,r,i){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],I(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(z,t,n,o),d(F,r,i,o),d(e,z,F,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},63564:(e,t,r)=>{r.d(t,{Mr:()=>s,cf:()=>o,g1:()=>n});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>b});var i,n=r(41948),o=r(92400),s=r(14628),l=r(40504),a=r(24296),u=r(69504),c=r(1580),p=(r(9456),r(66360),r(33600)),d=r(12552),h=r(18996);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.sH)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.am{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.c("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.oG)(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._2)(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.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.qq)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.G)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,p.E)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,p.E)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,p.E)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,p.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n._)([(0,d.c)("esri.geometry.HeightModelInfo")],f);const b=f},81436:(e,t,r)=>{r.d(t,{c:()=>b});var i=r(41948),n=(r(60708),r(2600)),o=r(20744),s=r(77860),l=r(22156),a=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),g=r(56156);let f=0,v=class extends(s.c.EventedMixin((0,l.MR)(a.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,g.c.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.c.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(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.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,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:g.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const b=v},59496:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(41948),n=r(82692),o=r(2952),s=r(20744),l=r(66360),a=r(26496),u=r(10860),c=r(1580),p=r(53368),d=(r(72052),r(9456),r(33600)),h=r(12552),y=r(98472),m=r(62484),g=r(95247),f=r(81436),v=r(38724),b=r(16660),q=r(28584),S=r(66576),w=r(98768),_=r(3116),x=r(87072),j=r(48212),V=r(21488),I=r(600),T=r(3856),A=r(27368),N=r(40504),M=r(90636),R=r(41512),z=r(2620),F=r(47364);const D=(0,m.Su)(),P=(0,z.Su)(),E=(0,z.Su)(),O=(0,z.Su)(),U=(0,m.WK)(0,0,1),L=(0,m.WK)(0,1,0),C=(0,m.WK)(1,0,0);function k(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.yG)((0,z.Su)(),U,-t);(0,y.u)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,F.Yf)(t)+270,(0,F.Yf)(i)+90]}function B(e,t){return(0,R.yG)(E,U,(0,F.Af)(e-270)),(0,R.yG)(O,L,(0,F.Af)(t-90)),(0,R.iW)(P,E,O),(0,y.c)(D,C),(0,y.u)(D,D,P),(0,y.n)(D,D),[D[0],D[1],D[2]]}var W=r(33392);let $=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"point",void 0),$=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSlice")],$);const H=$;var G=r(91952);let J=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{service:{read:G.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.O)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,c.qq)({type:[p.Ab],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.qq)({type:[H],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSection")],J);const K=J;let Y=class extends N.am{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSimpleShading")],Y);const Q=Y;let X=class extends N.am{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.qq)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelFormat")],X);const Z=X;let ee=class extends N.am{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,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({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.c)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(62088),ie=r(44728);let ne=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ne.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],ne.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ne.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],ne.prototype,"colorLocked",void 0),ne=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIsosurface")],ne);const oe=ne;var se=r(30604),le=r(53648);let ae=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let ce=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.qq)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelOpacityStop")],ce);const pe=ce;let de=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.c)("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,T.q)(N.am)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.c.ofType(ue)),this.opacityStops=new(o.c.ofType(pe))}set colorStops(e){this._set("colorStops",(0,se.q)(e,this._get("colorStops"),o.c.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.q)(e,this._get("opacityStops"),o.c.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==ye.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type: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.qk)(e.position,0,1),i=Math.round(255*(0,le.qk)(1-e.opacity,0,1));let n=!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,n=!0;break}n||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[n,o]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,le.Cq)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,ye.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cq)(t[r],s[r],e))}))}else-1!==n?ve.forEach((e=>{i.color[e]=r[n].color[e]})):ve.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new ie.c;ve.forEach((e=>{u[e]=Math.round((0,le.Cq)(l[e],a[e],s))})),u.a=(0,le.qk)(1-(0,le.Cq)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,le.qk)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.qq)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,c.qq)({type:o.c.ofType(pe),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,c.qq)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,c.qq)({type:[ie.c],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelUniqueValue")],be);const qe=be;var Se;let we=Se=class extends N.am{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.c.ofType(qe)),this.isosurfaces=new(o.c.ofType(oe))}clone(){return new Se({variableId:this.variableId,label:this.label,transferFunction:(0,re.ct)(this.transferFunction),uniqueValues:(0,re.ct)(this.uniqueValues),isosurfaces:(0,re.ct)(this.isosurfaces)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(qe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=Se=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariableStyle")],we);const _e=we;var xe=r(67776),je=r(56156),Ve=r(60544);let Ie=class extends N.am{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Ie.prototype,"values",void 0),Ie=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIrregularSpacing")],Ie);const Te=Ie;let Ae=class extends N.am{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ne=Ae;let Me=class extends N.am{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,c.qq)({type:Te,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.qq)({type:Ne,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDimension")],Me);const Re=Me;let ze=class extends N.am{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=je.c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.c.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ve.yK)(this.spatialReference,e.spatialReference))return l.c.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.WK)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.H)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.c({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.eu)(e);if((0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.c({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.c({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"dimensions",void 0),(0,i._)([(0,c.qq)({type:je.c,json:{read:{enabled:!1}}})],ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1}})],ze.prototype,"zDimension",null),(0,i._)([(0,c.qq)({type:[Boolean],json:{read:!1}})],ze.prototype,"isValid",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.qq)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],ze.prototype,"volumeType",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"sizeInVoxels",null),ze=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolume")],ze);const Fe=ze;var De;let Pe=De=class extends N.am{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new De;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,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"apronWidth",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"brickSize",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"nodeSize",void 0),Pe=De=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeIndex")],Pe);const Ee=Pe;let Oe=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ue=Oe;var Le;let Ce=Le=class extends N.am{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.c.ofType(H)),this.dynamicSections=new(o.c.ofType(Ue))}set slices(e){this._set("slices",(0,se.q)(e,this._get("slices"),o.c.ofType(H)))}set dynamicSections(e){this._set("dynamicSections",(0,se.q)(e,this._get("dynamicSections"),o.c.ofType(Ue)))}clone(){return new Le({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.ct)(this.slices),dynamicSections:(0,re.ct)(this.dynamicSections)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],Ce.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:1,write:!0}})],Ce.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.qq)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ce.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:0,write:!0}})],Ce.prototype,"verticalOffset",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(H),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ce.prototype,"slices",null),(0,i._)([(0,c.qq)({type:o.c.ofType(Ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ce.prototype,"dynamicSections",null),Ce=Le=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeStyle")],Ce);const ke=Ce;var Be=r(65548);let We=class extends((0,x.G6)((0,b.u)((0,S.Y)((0,w.K)((0,_.I)((0,a.U)((0,q.G)((0,v.C)(f.c))))))))){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 Q,this.opacity=1,this.variables=new o.c,this.volumes=new o.c,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(o.c.ofType(ke)),this.variableStyles=new(o.c.ofType(_e)),this.sections=new(o.c.ofType(K))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,j.oR)(e,l.c.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.CE).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.c("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.c("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.c("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.c.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Fe.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 I.c({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new I.c({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 I.c({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new I.c({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new I.c({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,Be.Ap)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new K({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.c.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.c.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.c.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.c.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.c.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.c.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.WK)(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,c.qq)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)(V.Uj)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.qq)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.qq)(V.qW)],We.prototype,"url",null),(0,i._)([(0,c.qq)({type:o.c.ofType(K),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ke),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.qq)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.qq)({type:Q,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.qq)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.qq)({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}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(te)})],We.prototype,"variables",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(Fe)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.qq)({type:Ee})],We.prototype,"index",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.qq)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.qq)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.E)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.qq)({type:g.c})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.E)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.qq)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"voxelFields",null),(0,i._)([(0,c.qq)({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}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.qq)({type:n.c,json:{read:!1}})],We.prototype,"popupTemplate",null),(0,i._)([(0,c.qq)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),We=(0,i._)([(0,h.c)("esri.layers.VoxelLayer")],We);const $e=We},28584:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>w});var i=r(41948),n=r(6220),o=r(47620),s=r(2600),l=r(40196),a=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),g=r(18996),f=r(71068),v=r(54872),b=r(9764),q=r(53039),S=r(46940);const w=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,c.mG)(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(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.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,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(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,S.CI)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,f.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,s.c)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.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.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.c("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.qq)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},600:(e,t,r)=>{r.d(t,{c:()=>g});var i,n=r(41948),o=r(14628),s=r(40504),l=r(1580),a=r(53368),u=(r(72052),r(9456),r(9968)),c=r(33600),p=r(12552),d=r(89812),h=r(36408);const y=new o.O({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.am{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,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.qq)()],m.prototype,"description",void 0),(0,n._)([(0,c.E)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.qq)({type:a.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.G)(h.M)],m.prototype,"type",void 0),(0,n._)([(0,l.qq)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.E)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.qq)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.c)("esri.layers.support.Field")],m);const g=m},89812:(e,t,r)=>{r.d(t,{h4:()=>x,i2:()=>_}),r(9456);var i,n=r(41948),o=r(62088),s=r(1580),l=(r(66360),r(9968)),a=r(12552),u=r(40504);r(72052);let c=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,a.c)("esri.layers.support.CodedValue")],c);const p=new(r(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.G)(p)],d.prototype,"type",void 0),d=(0,n._)([(0,a.c)("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,o.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,s.qq)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.G)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,n._)([(0,a.c)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(20744);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,n._)([(0,l.G)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,n._)([(0,a.c)("esri.layers.support.InheritedDomain")],v);const b=v;var q;let S=q=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new q({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.qq)({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]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.qq)({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]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.G)({range:"range"})],S.prototype,"type",void 0),S=q=(0,n._)([(0,a.c)("esri.layers.support.RangeDomain")],S);const w=S,_={key:"type",base:h,typeMap:{range:S,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},36408:(e,t,r)=>{r.d(t,{M:()=>i});const i=new(r(14628).O)({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"})},73960:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(28176);function n(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},65548:(e,t,r)=>{r.d(t,{Ap:()=>u});var i=r(82692),n=r(564),o=r(3739),s=(r(73312),r(67300),r(18480),r(72944)),l=(r(53568),r(15024),r(63116),r(13428)),a=r(76992);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(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.c({fieldName:t.name,isEditable:(0,n.Yn)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,n.G2)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.c,new o.c];return new i.c({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.iY)(e,t);function p(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.c({digitSeparator:!0,places:0});case"double":return new a.c({digitSeparator:!0,places:2});case"string":return(0,n.Gm)(e.name)?new a.c({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([[8256],{44728:(e,t,r)=>{r.d(t,{c:()=>d});var i,n,o=r(46988),s=r(53648),l=r(53368);function a(e){return(0,s.qk)((0,l.Wu)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class p{static blendColors(e,t,r,i=new p){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])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.ec)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){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),n=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),n=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.kv)(e)?(0,o.SQ)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([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?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||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,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}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=p.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new p(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}}p.prototype.declaredClass="esri.Color",(n=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=p},25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),o=r(40504),s=r(94360),l=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends o.am{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,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.aU)(r,e,t));let n=this.end;if(n){const r=(0,s.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:o,end:l}=this;return null!=o&&(n.start=(0,s.g1)(o,e,t,r)),null!=l&&(n.end=(0,s.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,a.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,a.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},3856:(e,t,r)=>{r.d(t,{m:()=>p,q:()=>c});var i=r(41948),n=r(43780),o=(r(9456),r(62088)),s=(r(66360),r(70680)),l=r(71448),a=r(20916),u=r(12552);const c=e=>{let t=class extends e{clone(){const e=(0,a.m6)(this);(0,s.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},n=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.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,o.gx)(c),null!=c&&null==p||(a===l.sT.DEFAULTS?n.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,a.m6)(u)?.store;if(e)for(const[t,r]of n)e.set(t,r,l.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let p=class extends(c(n.c)){};p=(0,i._)([(0,u.c)("esri.core.Clonable")],p)},27368:(e,t,r)=>{r.d(t,{sD:()=>s});var i=r(53648);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qk)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},22156:(e,t,r)=>{r.d(t,{MR:()=>s,qm:()=>l});var i=r(41948),n=r(12552);let o=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-"+o++})}};return t=(0,i._)([(0,n.c)("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:o++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,n.c)("esri.core.Identifiable")],a)},77380:(e,t,r)=>{r.d(t,{I:()=>m,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-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*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(l(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;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("")}(o);case i.String:return a(o);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 n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},90636:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(20744),n=r(77380),o=r(4644),s=r(28176),l=r(63564),a=r(44296),u=r(71448),c=r(1580),p=r(73960),d=r(91952);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.EF)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{writer(t,n,l,a){if(!a?.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,a)):void(n[l]=t.write({},a));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,o.w)(this)||a?.origin&&this.originIdOf(r)>(0,u.CQ)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.ic)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(n,r,t),c=(0,p.e)(u),d=(0,s.wt)(a.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),o[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.ue)(h)||f)?y(v):n[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,c.aq)(r,e,i);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:a,dest:u,targetPropertyName:c}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(o,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${c}" 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,n.I)(y.jsonString):h?.filename??(0,l.g1)(),v=(0,s.kn)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.e)(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[c]=e.resource.itemRelativeUrl)}const q=a.portalItem.resourceFromPath(b);(0,s.ue)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.SW)(t).then((e=>{q.path=`${v}.${(0,p.e)({type:"blob",blob:e})}`,u[c]=q.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;a.resources&&m({...e,resource:q,content:y,compress:S,updates:a.resources.toAdd}),u[c]=q.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},68612:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}r.d(t,{IJ:()=>o,Su:()=>i,WK:()=>n});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,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:n},Symbol.toStringTag,{value:"Module"}))},2620:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{IJ:()=>o,Su:()=>i,ct:()=>n});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,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"}))},41512:(e,t,r)=>{r.d(t,{C0:()=>c,WO:()=>f,Wu:()=>m,fO:()=>h,iW:()=>p,sF:()=>T,yG:()=>u});var i=r(68612),n=r(2620),o=r(62484),s=r(47364),l=r(98472),a=r(74784);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.Au)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=n*y+o*m+l*g+a*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.Au)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+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 n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const g=a.c,f=a.s,v=a.f,b=p,q=a.b,S=a.g,w=a.l,_=a.i,x=_,j=a.j,V=j,I=a.n,T=a.a,A=a.e,N=(0,o.Su)(),M=(0,o.WK)(1,0,0),R=(0,o.WK)(0,1,0),z=(0,n.Su)(),F=(0,n.Su)(),D=(0,i.Su)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:g,dot:S,equals:A,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:x,length:_,lerp:w,mul:b,multiply:p,normalize:I,random:function(e){const t=s.QR,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.k)(t,r);return i<-.999999?((0,l.b)(N,M,t),(0,l.H)(N)<1e-6&&(0,l.b)(N,R,t),(0,l.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,I(e,e))},scale:q,set:f,setAxes:function(e,t,r,i){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],I(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(z,t,n,o),d(F,r,i,o),d(e,z,F,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},63564:(e,t,r)=>{r.d(t,{Mr:()=>s,cf:()=>o,g1:()=>n});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>b});var i,n=r(41948),o=r(92400),s=r(14628),l=r(40504),a=r(24296),u=r(69504),c=r(1580),p=(r(9456),r(66360),r(33600)),d=r(12552),h=r(18996);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.sH)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.am{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.c("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.oG)(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._2)(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.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.qq)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.G)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,p.E)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,p.E)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,p.E)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,p.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n._)([(0,d.c)("esri.geometry.HeightModelInfo")],f);const b=f},81436:(e,t,r)=>{r.d(t,{c:()=>b});var i=r(41948),n=(r(60708),r(2600)),o=r(20744),s=r(77860),l=r(22156),a=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),g=r(56156);let f=0,v=class extends(s.c.EventedMixin((0,l.MR)(a.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,g.c.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.c.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(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.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,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:g.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const b=v},59496:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(41948),n=r(82692),o=r(2952),s=r(20744),l=r(66360),a=r(26496),u=r(10860),c=r(1580),p=r(53368),d=(r(72052),r(9456),r(33600)),h=r(12552),y=r(98472),m=r(62484),g=r(95247),f=r(81436),v=r(38724),b=r(16660),q=r(28584),S=r(66576),w=r(98768),_=r(3116),x=r(87072),j=r(48212),V=r(21488),I=r(600),T=r(3856),A=r(27368),N=r(40504),M=r(90636),R=r(41512),z=r(2620),F=r(47364);const D=(0,m.Su)(),P=(0,z.Su)(),E=(0,z.Su)(),O=(0,z.Su)(),U=(0,m.WK)(0,0,1),L=(0,m.WK)(0,1,0),C=(0,m.WK)(1,0,0);function k(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.yG)((0,z.Su)(),U,-t);(0,y.u)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,F.Yf)(t)+270,(0,F.Yf)(i)+90]}function B(e,t){return(0,R.yG)(E,U,(0,F.Af)(e-270)),(0,R.yG)(O,L,(0,F.Af)(t-90)),(0,R.iW)(P,E,O),(0,y.c)(D,C),(0,y.u)(D,D,P),(0,y.n)(D,D),[D[0],D[1],D[2]]}var W=r(33392);let $=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"point",void 0),$=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSlice")],$);const H=$;var G=r(91952);let J=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{service:{read:G.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.O)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,c.qq)({type:[p.Ab],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.qq)({type:[H],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSection")],J);const K=J;let Y=class extends N.am{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSimpleShading")],Y);const Q=Y;let X=class extends N.am{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.qq)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelFormat")],X);const Z=X;let ee=class extends N.am{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,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({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.c)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(62088),ie=r(44728);let ne=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ne.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],ne.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ne.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],ne.prototype,"colorLocked",void 0),ne=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIsosurface")],ne);const oe=ne;var se=r(30604),le=r(53648);let ae=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let ce=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.qq)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelOpacityStop")],ce);const pe=ce;let de=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.c)("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,T.q)(N.am)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.c.ofType(ue)),this.opacityStops=new(o.c.ofType(pe))}set colorStops(e){this._set("colorStops",(0,se.q)(e,this._get("colorStops"),o.c.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.q)(e,this._get("opacityStops"),o.c.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==ye.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type: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.qk)(e.position,0,1),i=Math.round(255*(0,le.qk)(1-e.opacity,0,1));let n=!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,n=!0;break}n||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[n,o]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,le.Cq)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,ye.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cq)(t[r],s[r],e))}))}else-1!==n?ve.forEach((e=>{i.color[e]=r[n].color[e]})):ve.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new ie.c;ve.forEach((e=>{u[e]=Math.round((0,le.Cq)(l[e],a[e],s))})),u.a=(0,le.qk)(1-(0,le.Cq)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,le.qk)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.qq)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,c.qq)({type:o.c.ofType(pe),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,c.qq)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,c.qq)({type:[ie.c],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelUniqueValue")],be);const qe=be;var Se;let we=Se=class extends N.am{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.c.ofType(qe)),this.isosurfaces=new(o.c.ofType(oe))}clone(){return new Se({variableId:this.variableId,label:this.label,transferFunction:(0,re.ct)(this.transferFunction),uniqueValues:(0,re.ct)(this.uniqueValues),isosurfaces:(0,re.ct)(this.isosurfaces)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(qe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=Se=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariableStyle")],we);const _e=we;var xe=r(67776),je=r(56156),Ve=r(60544);let Ie=class extends N.am{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Ie.prototype,"values",void 0),Ie=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIrregularSpacing")],Ie);const Te=Ie;let Ae=class extends N.am{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ne=Ae;let Me=class extends N.am{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,c.qq)({type:Te,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.qq)({type:Ne,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDimension")],Me);const Re=Me;let ze=class extends N.am{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=je.c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.c.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ve.yK)(this.spatialReference,e.spatialReference))return l.c.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.WK)(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,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.c({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.eu)(e);if((0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.c({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.c({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"dimensions",void 0),(0,i._)([(0,c.qq)({type:je.c,json:{read:{enabled:!1}}})],ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1}})],ze.prototype,"zDimension",null),(0,i._)([(0,c.qq)({type:[Boolean],json:{read:!1}})],ze.prototype,"isValid",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.qq)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],ze.prototype,"volumeType",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"sizeInVoxels",null),ze=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolume")],ze);const Fe=ze;var De;let Pe=De=class extends N.am{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new De;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,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"apronWidth",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"brickSize",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"nodeSize",void 0),Pe=De=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeIndex")],Pe);const Ee=Pe;let Oe=class extends((0,T.q)(N.am)){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]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ue=Oe;var Le;let Ce=Le=class extends N.am{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.c.ofType(H)),this.dynamicSections=new(o.c.ofType(Ue))}set slices(e){this._set("slices",(0,se.q)(e,this._get("slices"),o.c.ofType(H)))}set dynamicSections(e){this._set("dynamicSections",(0,se.q)(e,this._get("dynamicSections"),o.c.ofType(Ue)))}clone(){return new Le({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.ct)(this.slices),dynamicSections:(0,re.ct)(this.dynamicSections)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],Ce.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:1,write:!0}})],Ce.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.qq)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ce.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:0,write:!0}})],Ce.prototype,"verticalOffset",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(H),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ce.prototype,"slices",null),(0,i._)([(0,c.qq)({type:o.c.ofType(Ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ce.prototype,"dynamicSections",null),Ce=Le=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeStyle")],Ce);const ke=Ce;var Be=r(65548);let We=class extends((0,x.G6)((0,b.u)((0,S.Y)((0,w.K)((0,_.I)((0,a.U)((0,q.G)((0,v.C)(f.c))))))))){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 Q,this.opacity=1,this.variables=new o.c,this.volumes=new o.c,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(o.c.ofType(ke)),this.variableStyles=new(o.c.ofType(_e)),this.sections=new(o.c.ofType(K))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,j.oR)(e,l.c.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.CE).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.c("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.c("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.c("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.c.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Fe.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 I.c({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new I.c({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 I.c({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new I.c({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new I.c({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,Be.Ap)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new K({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.c.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.c.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.c.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.c.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.c.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.c.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.WK)(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,c.qq)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)(V.Uj)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.qq)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.qq)(V.qW)],We.prototype,"url",null),(0,i._)([(0,c.qq)({type:o.c.ofType(K),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ke),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.qq)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.qq)({type:Q,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.qq)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.qq)({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}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(te)})],We.prototype,"variables",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(Fe)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.qq)({type:Ee})],We.prototype,"index",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.qq)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.qq)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.E)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.qq)({type:g.c})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.E)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.qq)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"voxelFields",null),(0,i._)([(0,c.qq)({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}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.qq)({type:n.c,json:{read:!1}})],We.prototype,"popupTemplate",null),(0,i._)([(0,c.qq)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),We=(0,i._)([(0,h.c)("esri.layers.VoxelLayer")],We);const $e=We},28584:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>w});var i=r(41948),n=r(6220),o=r(47620),s=r(2600),l=r(40196),a=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),g=r(18996),f=r(71068),v=r(54872),b=r(9764),q=r(53039),S=r(46940);const w=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,c.mG)(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(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.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,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(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,S.CI)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,f.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,s.c)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.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.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.c("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.qq)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},600:(e,t,r)=>{r.d(t,{c:()=>g});var i,n=r(41948),o=r(14628),s=r(40504),l=r(1580),a=r(53368),u=(r(72052),r(9456),r(9968)),c=r(33600),p=r(12552),d=r(89812),h=r(36408);const y=new o.O({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.am{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,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.qq)()],m.prototype,"description",void 0),(0,n._)([(0,c.E)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.qq)({type:a.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.G)(h.M)],m.prototype,"type",void 0),(0,n._)([(0,l.qq)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.E)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.qq)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.c)("esri.layers.support.Field")],m);const g=m},89812:(e,t,r)=>{r.d(t,{h4:()=>x,i2:()=>_}),r(9456);var i,n=r(41948),o=r(62088),s=r(1580),l=(r(66360),r(9968)),a=r(12552),u=r(40504);r(72052);let c=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,a.c)("esri.layers.support.CodedValue")],c);const p=new(r(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.G)(p)],d.prototype,"type",void 0),d=(0,n._)([(0,a.c)("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,o.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,s.qq)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.G)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,n._)([(0,a.c)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(20744);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,n._)([(0,l.G)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,n._)([(0,a.c)("esri.layers.support.InheritedDomain")],v);const b=v;var q;let S=q=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new q({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.qq)({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]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.qq)({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]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.G)({range:"range"})],S.prototype,"type",void 0),S=q=(0,n._)([(0,a.c)("esri.layers.support.RangeDomain")],S);const w=S,_={key:"type",base:h,typeMap:{range:S,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},36408:(e,t,r)=>{r.d(t,{M:()=>i});const i=new(r(14628).O)({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"})},73960:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(28176);function n(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},65548:(e,t,r)=>{r.d(t,{Ap:()=>u});var i=r(82692),n=r(564),o=r(3739),s=(r(73312),r(67300),r(18480),r(72944)),l=(r(53568),r(15024),r(63116),r(13428)),a=r(76992);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(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.c({fieldName:t.name,isEditable:(0,n.Yn)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,n.G2)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.c,new o.c];return new i.c({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.iY)(e,t);function p(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.c({digitSeparator:!0,places:0});case"double":return new a.c({digitSeparator:!0,places:2});case"string":return(0,n.Gm)(e.name)?new a.c({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 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4520],{74784:(t,n,a)=>{a.d(n,{a:()=>p,c:()=>o,d:()=>h,e:()=>g,g:()=>u,h:()=>d,i:()=>l,j:()=>b,l:()=>x,n:()=>m,s:()=>e,t:()=>q});var r=a(47364);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function e(t,n,a,r,o){return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t}function s(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t[3]=n[3]*a[3],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t[3]=n[3]/a[3],t}function h(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t}function M(t,n){const a=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],e=n[3]-t[3];return Math.sqrt(a*a+r*r+o*o+e*e)}function f(t,n){const a=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],e=n[3]-t[3];return a*a+r*r+o*o+e*e}function l(t){const n=t[0],a=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+a*a+r*r+o*o)}function b(t){const n=t[0],a=t[1],r=t[2],o=t[3];return n*n+a*a+r*r+o*o}function m(t,n){const a=n[0],r=n[1],o=n[2],e=n[3];let u=a*a+r*r+o*o+e*e;return u>0&&(u=1/Math.sqrt(u),t[0]=a*u,t[1]=r*u,t[2]=o*u,t[3]=e*u),t}function d(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function x(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=n[3];return t[0]=o+r*(a[0]-o),t[1]=e+r*(a[1]-e),t[2]=u+r*(a[2]-u),t[3]=s+r*(a[3]-s),t}function q(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3];return t[0]=a[0]*r+a[4]*o+a[8]*e+a[12]*u,t[1]=a[1]*r+a[5]*o+a[9]*e+a[13]*u,t[2]=a[2]*r+a[6]*o+a[10]*e+a[14]*u,t[3]=a[3]*r+a[7]*o+a[11]*e+a[15]*u,t}function p(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function g(t,n){const a=t[0],o=t[1],e=t[2],u=t[3],s=n[0],c=n[1],i=n[2],h=n[3],M=(0,r.Au)();return Math.abs(a-s)<=M*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(o-c)<=M*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(e-i)<=M*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(u-h)<=M*Math.max(1,Math.abs(u),Math.abs(h))}const y=s,S=c,_=i,T=M,v=f,A=l,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:T,distance:M,div:_,divide:i,dot:d,equals:g,exactEquals:p,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:A,length:l,lerp:x,max:function(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t[3]=Math.max(n[3],a[3]),t},min:function(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t[3]=Math.min(n[3],a[3]),t},mul:S,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:m,random:function(t,n){const a=r.QR;let o,e,u,s,c,i;n=n||1;do{o=2*a()-1,e=2*a()-1,c=o*o+e*e}while(c>=1);do{u=2*a()-1,s=2*a()-1,i=u*u+s*s}while(i>=1);const h=Math.sqrt((1-c)/i);return t[0]=n*o,t[1]=n*e,t[2]=n*u*h,t[3]=n*s*h,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:h,scaleAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t},set:e,sqrDist:v,sqrLen:O,squaredDistance:f,squaredLength:b,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:y,subtract:s,transformMat4:q,transformQuat:function(t,n,a){const r=n[0],o=n[1],e=n[2],u=a[0],s=a[1],c=a[2],i=a[3],h=i*r+s*e-c*o,M=i*o+c*r-u*e,f=i*e+u*o-s*r,l=-u*r-s*o-c*e;return t[0]=h*i+l*-u+M*-c-f*-s,t[1]=M*i+l*-s+f*-u-h*-c,t[2]=f*i+l*-c+h*-s-M*-u,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},37008:(t,n,a)=>{function r(){return[0,0,0,0]}function o(t,n,a,r){return[t,n,a,r]}function e(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function s(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function i(){return o(0,0,0,1)}a.d(n,{Su:()=>r,WK:()=>o});const h=e(),M=u(),f=s(),l=c(),b=i();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:b,UNIT_X:M,UNIT_Y:f,UNIT_Z:l,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,createView:function(t,n){return new Float64Array(t,n,4)},fromArray:function(t,n=[0,0,0,0]){const a=Math.min(4,t.length);for(let r=0;r<a;++r)n[r]=t[r];return n},fromValues:o,ones:e,unitW:i,unitX:u,unitY:s,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},15008:(t,n,a)=>{a.d(n,{GS:()=>h,IT:()=>b,QT:()=>A,Qy:()=>q,S_:()=>c,WO:()=>e,WP:()=>S,ZX:()=>u,aU:()=>M,c9:()=>f,gp:()=>m,iW:()=>i,ir:()=>g,mu:()=>l,oL:()=>s,sF:()=>T,sx:()=>p,um:()=>y,yK:()=>v,yp:()=>O});var r=a(62484),o=a(47364);function e(t,n,a,r,o,e,u,s,c,i,h,M,f,l,b,m,d){return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t[4]=e,t[5]=u,t[6]=s,t[7]=c,t[8]=i,t[9]=h,t[10]=M,t[11]=f,t[12]=l,t[13]=b,t[14]=m,t[15]=d,t}function u(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,n){if(t===n){const a=n[1],r=n[2],o=n[3],e=n[6],u=n[7],s=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=a,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=e,t[11]=n[14],t[12]=o,t[13]=u,t[14]=s}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=n[4],s=n[5],c=n[6],i=n[7],h=n[8],M=n[9],f=n[10],l=n[11],b=n[12],m=n[13],d=n[14],x=n[15],q=a*s-r*u,p=a*c-o*u,g=a*i-e*u,y=r*c-o*s,S=r*i-e*s,_=o*i-e*c,T=h*m-M*b,v=h*d-f*b,A=h*x-l*b,O=M*d-f*m,R=M*x-l*m,I=f*x-l*d;let j=q*I-p*R+g*O+y*A-S*v+_*T;return j?(j=1/j,t[0]=(s*I-c*R+i*O)*j,t[1]=(o*R-r*I-e*O)*j,t[2]=(m*_-d*S+x*y)*j,t[3]=(f*S-M*_-l*y)*j,t[4]=(c*A-u*I-i*v)*j,t[5]=(a*I-o*A+e*v)*j,t[6]=(d*g-b*_-x*p)*j,t[7]=(h*_-f*g+l*p)*j,t[8]=(u*R-s*A+i*T)*j,t[9]=(r*A-a*R-e*T)*j,t[10]=(b*S-m*g+x*q)*j,t[11]=(M*g-h*S-l*q)*j,t[12]=(s*v-u*O-c*T)*j,t[13]=(a*O-r*v+o*T)*j,t[14]=(m*p-b*y-d*q)*j,t[15]=(h*y-M*p+f*q)*j,t):null}function i(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3],s=n[4],c=n[5],i=n[6],h=n[7],M=n[8],f=n[9],l=n[10],b=n[11],m=n[12],d=n[13],x=n[14],q=n[15];let p=a[0],g=a[1],y=a[2],S=a[3];return t[0]=p*r+g*s+y*M+S*m,t[1]=p*o+g*c+y*f+S*d,t[2]=p*e+g*i+y*l+S*x,t[3]=p*u+g*h+y*b+S*q,p=a[4],g=a[5],y=a[6],S=a[7],t[4]=p*r+g*s+y*M+S*m,t[5]=p*o+g*c+y*f+S*d,t[6]=p*e+g*i+y*l+S*x,t[7]=p*u+g*h+y*b+S*q,p=a[8],g=a[9],y=a[10],S=a[11],t[8]=p*r+g*s+y*M+S*m,t[9]=p*o+g*c+y*f+S*d,t[10]=p*e+g*i+y*l+S*x,t[11]=p*u+g*h+y*b+S*q,p=a[12],g=a[13],y=a[14],S=a[15],t[12]=p*r+g*s+y*M+S*m,t[13]=p*o+g*c+y*f+S*d,t[14]=p*e+g*i+y*l+S*x,t[15]=p*u+g*h+y*b+S*q,t}function h(t,n,a){const r=a[0],o=a[1],e=a[2];if(n===t)t[12]=n[0]*r+n[4]*o+n[8]*e+n[12],t[13]=n[1]*r+n[5]*o+n[9]*e+n[13],t[14]=n[2]*r+n[6]*o+n[10]*e+n[14],t[15]=n[3]*r+n[7]*o+n[11]*e+n[15];else{const a=n[0],u=n[1],s=n[2],c=n[3],i=n[4],h=n[5],M=n[6],f=n[7],l=n[8],b=n[9],m=n[10],d=n[11];t[0]=a,t[1]=u,t[2]=s,t[3]=c,t[4]=i,t[5]=h,t[6]=M,t[7]=f,t[8]=l,t[9]=b,t[10]=m,t[11]=d,t[12]=a*r+i*o+l*e+n[12],t[13]=u*r+h*o+b*e+n[13],t[14]=s*r+M*o+m*e+n[14],t[15]=c*r+f*o+d*e+n[15]}return t}function M(t,n,a){const r=a[0],o=a[1],e=a[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=n[7]*o,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function f(t,n,a,r){let e,u,s,c,i,h,M,f,l,b,m,d,x,q,p,g,y,S,_,T,v,A,O,R,I=r[0],j=r[1],w=r[2],P=Math.sqrt(I*I+j*j+w*w);return P<(0,o.Au)()?null:(P=1/P,I*=P,j*=P,w*=P,e=Math.sin(a),u=Math.cos(a),s=1-u,c=n[0],i=n[1],h=n[2],M=n[3],f=n[4],l=n[5],b=n[6],m=n[7],d=n[8],x=n[9],q=n[10],p=n[11],g=I*I*s+u,y=j*I*s+w*e,S=w*I*s-j*e,_=I*j*s-w*e,T=j*j*s+u,v=w*j*s+I*e,A=I*w*s+j*e,O=j*w*s-I*e,R=w*w*s+u,t[0]=c*g+f*y+d*S,t[1]=i*g+l*y+x*S,t[2]=h*g+b*y+q*S,t[3]=M*g+m*y+p*S,t[4]=c*_+f*T+d*v,t[5]=i*_+l*T+x*v,t[6]=h*_+b*T+q*v,t[7]=M*_+m*T+p*v,t[8]=c*A+f*O+d*R,t[9]=i*A+l*O+x*R,t[10]=h*A+b*O+q*R,t[11]=M*A+m*O+p*R,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function l(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function b(t,n,a){if(0===n)return u(t);let r,e,s,c=a[0],i=a[1],h=a[2],M=Math.sqrt(c*c+i*i+h*h);return M<(0,o.Au)()?null:(M=1/M,c*=M,i*=M,h*=M,r=Math.sin(n),e=Math.cos(n),s=1-e,t[0]=c*c*s+e,t[1]=i*c*s+h*r,t[2]=h*c*s-i*r,t[3]=0,t[4]=c*i*s-h*r,t[5]=i*i*s+e,t[6]=h*i*s+c*r,t[7]=0,t[8]=c*h*s+i*r,t[9]=i*h*s-c*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=a,t[7]=0,t[8]=0,t[9]=-a,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3],s=r+r,c=o+o,i=e+e,h=r*s,M=r*c,f=r*i,l=o*c,b=o*i,m=e*i,d=u*s,x=u*c,q=u*i;return t[0]=1-(l+m),t[1]=M+q,t[2]=f-x,t[3]=0,t[4]=M-q,t[5]=1-(h+m),t[6]=b+d,t[7]=0,t[8]=f+x,t[9]=b-d,t[10]=1-(h+l),t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}const x=(0,r.Su)();function q(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function p(t,n){const a=n[0],r=n[1],o=n[2],e=n[4],u=n[5],s=n[6],c=n[8],i=n[9],h=n[10];return t[0]=Math.sqrt(a*a+r*r+o*o),t[1]=Math.sqrt(e*e+u*u+s*s),t[2]=Math.sqrt(c*c+i*i+h*h),t}function g(t,n){const a=n[0]+n[5]+n[10];let r=0;return a>0?(r=2*Math.sqrt(a+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function y(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=n[3],c=o+o,i=e+e,h=u+u,M=o*c,f=o*i,l=o*h,b=e*i,m=e*h,d=u*h,x=s*c,q=s*i,p=s*h,g=r[0],y=r[1],S=r[2];return t[0]=(1-(b+d))*g,t[1]=(f+p)*g,t[2]=(l-q)*g,t[3]=0,t[4]=(f-p)*y,t[5]=(1-(M+d))*y,t[6]=(m+x)*y,t[7]=0,t[8]=(l+q)*S,t[9]=(m-x)*S,t[10]=(1-(M+b))*S,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function S(t,n,a,r,o){const e=n[0],u=n[1],s=n[2],c=n[3],i=e+e,h=u+u,M=s+s,f=e*i,l=e*h,b=e*M,m=u*h,d=u*M,x=s*M,q=c*i,p=c*h,g=c*M,y=r[0],S=r[1],_=r[2],T=o[0],v=o[1],A=o[2],O=(1-(m+x))*y,R=(l+g)*y,I=(b-p)*y,j=(l-g)*S,w=(1-(f+x))*S,P=(d+q)*S,D=(b+p)*_,N=(d-q)*_,Q=(1-(f+m))*_;return t[0]=O,t[1]=R,t[2]=I,t[3]=0,t[4]=j,t[5]=w,t[6]=P,t[7]=0,t[8]=D,t[9]=N,t[10]=Q,t[11]=0,t[12]=a[0]+T-(O*T+j*v+D*A),t[13]=a[1]+v-(R*T+w*v+N*A),t[14]=a[2]+A-(I*T+P*v+Q*A),t[15]=1,t}function _(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t[9]=n[9]-a[9],t[10]=n[10]-a[10],t[11]=n[11]-a[11],t[12]=n[12]-a[12],t[13]=n[13]-a[13],t[14]=n[14]-a[14],t[15]=n[15]-a[15],t}function T(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function v(t,n){if(t===n)return!0;const a=t[0],r=t[1],e=t[2],u=t[3],s=t[4],c=t[5],i=t[6],h=t[7],M=t[8],f=t[9],l=t[10],b=t[11],m=t[12],d=t[13],x=t[14],q=t[15],p=n[0],g=n[1],y=n[2],S=n[3],_=n[4],T=n[5],v=n[6],A=n[7],O=n[8],R=n[9],I=n[10],j=n[11],w=n[12],P=n[13],D=n[14],N=n[15],Q=(0,o.Au)();return Math.abs(a-p)<=Q*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(r-g)<=Q*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(e-y)<=Q*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(u-S)<=Q*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(s-_)<=Q*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-T)<=Q*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(i-v)<=Q*Math.max(1,Math.abs(i),Math.abs(v))&&Math.abs(h-A)<=Q*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(M-O)<=Q*Math.max(1,Math.abs(M),Math.abs(O))&&Math.abs(f-R)<=Q*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(l-I)<=Q*Math.max(1,Math.abs(l),Math.abs(I))&&Math.abs(b-j)<=Q*Math.max(1,Math.abs(b),Math.abs(j))&&Math.abs(m-w)<=Q*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(d-P)<=Q*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(x-D)<=Q*Math.max(1,Math.abs(x),Math.abs(D))&&Math.abs(q-N)<=Q*Math.max(1,Math.abs(q),Math.abs(N))}function A(t){const n=(0,o.Au)(),a=t[0],r=t[1],e=t[2],u=t[4],s=t[5],c=t[6],i=t[8],h=t[9],M=t[10];return Math.abs(1-(a*a+u*u+i*i))<=n&&Math.abs(1-(r*r+s*s+h*h))<=n&&Math.abs(1-(e*e+c*c+M*M))<=n}function O(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const R=i,I=_;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t[9]=n[9]+a[9],t[10]=n[10]+a[10],t[11]=n[11]+a[11],t[12]=n[12]+a[12],t[13]=n[13]+a[13],t[14]=n[14]+a[14],t[15]=n[15]+a[15],t},adjoint:function(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=n[4],s=n[5],c=n[6],i=n[7],h=n[8],M=n[9],f=n[10],l=n[11],b=n[12],m=n[13],d=n[14],x=n[15];return t[0]=s*(f*x-l*d)-M*(c*x-i*d)+m*(c*l-i*f),t[1]=-(r*(f*x-l*d)-M*(o*x-e*d)+m*(o*l-e*f)),t[2]=r*(c*x-i*d)-s*(o*x-e*d)+m*(o*i-e*c),t[3]=-(r*(c*l-i*f)-s*(o*l-e*f)+M*(o*i-e*c)),t[4]=-(u*(f*x-l*d)-h*(c*x-i*d)+b*(c*l-i*f)),t[5]=a*(f*x-l*d)-h*(o*x-e*d)+b*(o*l-e*f),t[6]=-(a*(c*x-i*d)-u*(o*x-e*d)+b*(o*i-e*c)),t[7]=a*(c*l-i*f)-u*(o*l-e*f)+h*(o*i-e*c),t[8]=u*(M*x-l*m)-h*(s*x-i*m)+b*(s*l-i*M),t[9]=-(a*(M*x-l*m)-h*(r*x-e*m)+b*(r*l-e*M)),t[10]=a*(s*x-i*m)-u*(r*x-e*m)+b*(r*i-e*s),t[11]=-(a*(s*l-i*M)-u*(r*l-e*M)+h*(r*i-e*s)),t[12]=-(u*(M*d-f*m)-h*(s*d-c*m)+b*(s*f-c*M)),t[13]=a*(M*d-f*m)-h*(r*d-o*m)+b*(r*f-o*M),t[14]=-(a*(s*d-c*m)-u*(r*d-o*m)+b*(r*c-o*s)),t[15]=a*(s*f-c*M)-u*(r*f-o*M)+h*(r*c-o*s),t},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},determinant:function(t){const n=t[0],a=t[1],r=t[2],o=t[3],e=t[4],u=t[5],s=t[6],c=t[7],i=t[8],h=t[9],M=t[10],f=t[11],l=t[12],b=t[13],m=t[14],d=t[15];return(n*u-a*e)*(M*d-f*m)-(n*s-r*e)*(h*d-f*b)+(n*c-o*e)*(h*m-M*b)+(a*s-r*u)*(i*d-f*l)-(a*c-o*u)*(i*m-M*l)+(r*c-o*s)*(i*b-h*l)},equals:v,exactEquals:T,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=a+a,s=r+r,c=o+o,i=a*u,h=r*u,M=r*s,f=o*u,l=o*s,b=o*c,m=e*u,d=e*s,x=e*c;return t[0]=1-M-b,t[1]=h+x,t[2]=f-d,t[3]=0,t[4]=h-x,t[5]=1-i-b,t[6]=l+m,t[7]=0,t[8]=f+d,t[9]=l-m,t[10]=1-i-M,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){const a=x,r=-n[0],o=-n[1],e=-n[2],u=n[3],s=n[4],c=n[5],i=n[6],h=n[7],M=r*r+o*o+e*e+u*u;return M>0?(a[0]=2*(s*u+h*r+c*e-i*o)/M,a[1]=2*(c*u+h*o+i*r-s*e)/M,a[2]=2*(i*u+h*e+s*o-c*r)/M):(a[0]=2*(s*u+h*r+c*e-i*o),a[1]=2*(c*u+h*o+i*r-s*e),a[2]=2*(i*u+h*e+s*o-c*r)),d(t,n,a),t},fromRotation:b,fromRotationTranslation:d,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:S,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:l,fromXRotation:m,fromYRotation:function(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-a,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=a,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=0,t[3]=0,t[4]=-a,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,a,r,o,e,u){const s=1/(a-n),c=1/(o-r),i=1/(e-u);return t[0]=2*e*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*c,t[6]=0,t[7]=0,t[8]=(a+n)*s,t[9]=(o+r)*c,t[10]=(u+e)*i,t[11]=-1,t[12]=0,t[13]=0,t[14]=u*e*2*i,t[15]=0,t},getRotation:g,getScaling:p,getTranslation:q,hasIdentityRotation:O,identity:u,invert:c,invertOrIdentity:function(t,n){return c(t,n)||u(t),t},isOrthoNormal:A,lookAt:function(t,n,a,r){const e=n[0],s=n[1],c=n[2];let i=e-a[0],h=s-a[1],M=c-a[2];const f=(0,o.Au)();if(Math.abs(i)<f&&Math.abs(h)<f&&Math.abs(M)<f)return void u(t);let l=1/Math.sqrt(i*i+h*h+M*M);i*=l,h*=l,M*=l;const b=r[0],m=r[1],d=r[2];let x=m*M-d*h,q=d*i-b*M,p=b*h-m*i;l=Math.sqrt(x*x+q*q+p*p),l?(l=1/l,x*=l,q*=l,p*=l):(x=0,q=0,p=0);let g=h*p-M*q,y=M*x-i*p,S=i*q-h*x;l=Math.sqrt(g*g+y*y+S*S),l?(l=1/l,g*=l,y*=l,S*=l):(g=0,y=0,S=0),t[0]=x,t[1]=g,t[2]=i,t[3]=0,t[4]=q,t[5]=y,t[6]=h,t[7]=0,t[8]=p,t[9]=S,t[10]=M,t[11]=0,t[12]=-(x*e+q*s+p*c),t[13]=-(g*e+y*s+S*c),t[14]=-(i*e+h*s+M*c),t[15]=1},mul:R,multiply:i,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12]*a,t[13]=n[13]*a,t[14]=n[14]*a,t[15]=n[15]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t[9]=n[9]+a[9]*r,t[10]=n[10]+a[10]*r,t[11]=n[11]+a[11]*r,t[12]=n[12]+a[12]*r,t[13]=n[13]+a[13]*r,t[14]=n[14]+a[14]*r,t[15]=n[15]+a[15]*r,t},ortho:function(t,n,a,r,o,e,u){const s=1/(n-a),c=1/(r-o),i=1/(e-u);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*i,t[11]=0,t[12]=(n+a)*s,t[13]=(o+r)*c,t[14]=(u+e)*i,t[15]=1,t},perspective:function(t,n,a,r,o){const e=1/Math.tan(n/2);let u;return t[0]=e/a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(u=1/(r-o),t[10]=(o+r)*u,t[14]=2*o*r*u):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,a,r){const o=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),u=Math.tan(n.leftDegrees*Math.PI/180),s=Math.tan(n.rightDegrees*Math.PI/180),c=2/(u+s),i=2/(o+e);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=-(u-s)*c*.5,t[9]=(o-e)*i*.5,t[10]=r/(a-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*a/(a-r),t[15]=0,t},rotate:f,rotateX:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[4],u=n[5],s=n[6],c=n[7],i=n[8],h=n[9],M=n[10],f=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=e*o+i*r,t[5]=u*o+h*r,t[6]=s*o+M*r,t[7]=c*o+f*r,t[8]=i*o-e*r,t[9]=h*o-u*r,t[10]=M*o-s*r,t[11]=f*o-c*r,t},rotateY:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[0],u=n[1],s=n[2],c=n[3],i=n[8],h=n[9],M=n[10],f=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=e*o-i*r,t[1]=u*o-h*r,t[2]=s*o-M*r,t[3]=c*o-f*r,t[8]=e*r+i*o,t[9]=u*r+h*o,t[10]=s*r+M*o,t[11]=c*r+f*o,t},rotateZ:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[0],u=n[1],s=n[2],c=n[3],i=n[4],h=n[5],M=n[6],f=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=e*o+i*r,t[1]=u*o+h*r,t[2]=s*o+M*r,t[3]=c*o+f*r,t[4]=i*o-e*r,t[5]=h*o-u*r,t[6]=M*o-s*r,t[7]=f*o-c*r,t},scale:M,set:e,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:_,targetTo:function(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=r[0],c=r[1],i=r[2];let h=o-a[0],M=e-a[1],f=u-a[2],l=h*h+M*M+f*f;l>0&&(l=1/Math.sqrt(l),h*=l,M*=l,f*=l);let b=c*f-i*M,m=i*h-s*f,d=s*M-c*h;return l=b*b+m*m+d*d,l>0&&(l=1/Math.sqrt(l),b*=l,m*=l,d*=l),t[0]=b,t[1]=m,t[2]=d,t[3]=0,t[4]=M*d-f*m,t[5]=f*b-h*d,t[6]=h*m-M*b,t[7]=0,t[8]=h,t[9]=M,t[10]=f,t[11]=0,t[12]=o,t[13]=e,t[14]=u,t[15]=1,t},translate:h,transpose:s},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4520],{74784:(t,n,a)=>{a.d(n,{a:()=>p,b:()=>h,c:()=>o,e:()=>g,f:()=>u,g:()=>d,i:()=>l,j:()=>b,l:()=>x,n:()=>m,s:()=>e,t:()=>q});var r=a(47364);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function e(t,n,a,r,o){return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t}function s(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t[3]=n[3]*a[3],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t[3]=n[3]/a[3],t}function h(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t}function M(t,n){const a=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],e=n[3]-t[3];return Math.sqrt(a*a+r*r+o*o+e*e)}function f(t,n){const a=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],e=n[3]-t[3];return a*a+r*r+o*o+e*e}function l(t){const n=t[0],a=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+a*a+r*r+o*o)}function b(t){const n=t[0],a=t[1],r=t[2],o=t[3];return n*n+a*a+r*r+o*o}function m(t,n){const a=n[0],r=n[1],o=n[2],e=n[3];let u=a*a+r*r+o*o+e*e;return u>0&&(u=1/Math.sqrt(u),t[0]=a*u,t[1]=r*u,t[2]=o*u,t[3]=e*u),t}function d(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function x(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=n[3];return t[0]=o+r*(a[0]-o),t[1]=e+r*(a[1]-e),t[2]=u+r*(a[2]-u),t[3]=s+r*(a[3]-s),t}function q(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3];return t[0]=a[0]*r+a[4]*o+a[8]*e+a[12]*u,t[1]=a[1]*r+a[5]*o+a[9]*e+a[13]*u,t[2]=a[2]*r+a[6]*o+a[10]*e+a[14]*u,t[3]=a[3]*r+a[7]*o+a[11]*e+a[15]*u,t}function p(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function g(t,n){const a=t[0],o=t[1],e=t[2],u=t[3],s=n[0],c=n[1],i=n[2],h=n[3],M=(0,r.Au)();return Math.abs(a-s)<=M*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(o-c)<=M*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(e-i)<=M*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(u-h)<=M*Math.max(1,Math.abs(u),Math.abs(h))}const y=s,S=c,_=i,T=M,v=f,A=l,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:T,distance:M,div:_,divide:i,dot:d,equals:g,exactEquals:p,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:A,length:l,lerp:x,max:function(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t[3]=Math.max(n[3],a[3]),t},min:function(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t[3]=Math.min(n[3],a[3]),t},mul:S,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:m,random:function(t,n){const a=r.QR;let o,e,u,s,c,i;n=n||1;do{o=2*a()-1,e=2*a()-1,c=o*o+e*e}while(c>=1);do{u=2*a()-1,s=2*a()-1,i=u*u+s*s}while(i>=1);const h=Math.sqrt((1-c)/i);return t[0]=n*o,t[1]=n*e,t[2]=n*u*h,t[3]=n*s*h,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:h,scaleAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t},set:e,sqrDist:v,sqrLen:O,squaredDistance:f,squaredLength:b,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:y,subtract:s,transformMat4:q,transformQuat:function(t,n,a){const r=n[0],o=n[1],e=n[2],u=a[0],s=a[1],c=a[2],i=a[3],h=i*r+s*e-c*o,M=i*o+c*r-u*e,f=i*e+u*o-s*r,l=-u*r-s*o-c*e;return t[0]=h*i+l*-u+M*-c-f*-s,t[1]=M*i+l*-s+f*-u-h*-c,t[2]=f*i+l*-c+h*-s-M*-u,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},37008:(t,n,a)=>{function r(){return[0,0,0,0]}function o(t,n,a,r){return[t,n,a,r]}function e(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function s(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function i(){return o(0,0,0,1)}a.d(n,{Su:()=>r,WK:()=>o});const h=e(),M=u(),f=s(),l=c(),b=i();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:b,UNIT_X:M,UNIT_Y:f,UNIT_Z:l,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,createView:function(t,n){return new Float64Array(t,n,4)},fromArray:function(t,n=[0,0,0,0]){const a=Math.min(4,t.length);for(let r=0;r<a;++r)n[r]=t[r];return n},fromValues:o,ones:e,unitW:i,unitX:u,unitY:s,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},15008:(t,n,a)=>{a.d(n,{GS:()=>h,IT:()=>b,QT:()=>A,Qy:()=>q,S_:()=>c,WO:()=>e,WP:()=>S,ZX:()=>u,aU:()=>M,c9:()=>f,gp:()=>m,iW:()=>i,ir:()=>g,mu:()=>l,oL:()=>s,sF:()=>T,sx:()=>p,um:()=>y,yK:()=>v,yp:()=>O});var r=a(62484),o=a(47364);function e(t,n,a,r,o,e,u,s,c,i,h,M,f,l,b,m,d){return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t[4]=e,t[5]=u,t[6]=s,t[7]=c,t[8]=i,t[9]=h,t[10]=M,t[11]=f,t[12]=l,t[13]=b,t[14]=m,t[15]=d,t}function u(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,n){if(t===n){const a=n[1],r=n[2],o=n[3],e=n[6],u=n[7],s=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=a,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=e,t[11]=n[14],t[12]=o,t[13]=u,t[14]=s}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=n[4],s=n[5],c=n[6],i=n[7],h=n[8],M=n[9],f=n[10],l=n[11],b=n[12],m=n[13],d=n[14],x=n[15],q=a*s-r*u,p=a*c-o*u,g=a*i-e*u,y=r*c-o*s,S=r*i-e*s,_=o*i-e*c,T=h*m-M*b,v=h*d-f*b,A=h*x-l*b,O=M*d-f*m,R=M*x-l*m,I=f*x-l*d;let j=q*I-p*R+g*O+y*A-S*v+_*T;return j?(j=1/j,t[0]=(s*I-c*R+i*O)*j,t[1]=(o*R-r*I-e*O)*j,t[2]=(m*_-d*S+x*y)*j,t[3]=(f*S-M*_-l*y)*j,t[4]=(c*A-u*I-i*v)*j,t[5]=(a*I-o*A+e*v)*j,t[6]=(d*g-b*_-x*p)*j,t[7]=(h*_-f*g+l*p)*j,t[8]=(u*R-s*A+i*T)*j,t[9]=(r*A-a*R-e*T)*j,t[10]=(b*S-m*g+x*q)*j,t[11]=(M*g-h*S-l*q)*j,t[12]=(s*v-u*O-c*T)*j,t[13]=(a*O-r*v+o*T)*j,t[14]=(m*p-b*y-d*q)*j,t[15]=(h*y-M*p+f*q)*j,t):null}function i(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3],s=n[4],c=n[5],i=n[6],h=n[7],M=n[8],f=n[9],l=n[10],b=n[11],m=n[12],d=n[13],x=n[14],q=n[15];let p=a[0],g=a[1],y=a[2],S=a[3];return t[0]=p*r+g*s+y*M+S*m,t[1]=p*o+g*c+y*f+S*d,t[2]=p*e+g*i+y*l+S*x,t[3]=p*u+g*h+y*b+S*q,p=a[4],g=a[5],y=a[6],S=a[7],t[4]=p*r+g*s+y*M+S*m,t[5]=p*o+g*c+y*f+S*d,t[6]=p*e+g*i+y*l+S*x,t[7]=p*u+g*h+y*b+S*q,p=a[8],g=a[9],y=a[10],S=a[11],t[8]=p*r+g*s+y*M+S*m,t[9]=p*o+g*c+y*f+S*d,t[10]=p*e+g*i+y*l+S*x,t[11]=p*u+g*h+y*b+S*q,p=a[12],g=a[13],y=a[14],S=a[15],t[12]=p*r+g*s+y*M+S*m,t[13]=p*o+g*c+y*f+S*d,t[14]=p*e+g*i+y*l+S*x,t[15]=p*u+g*h+y*b+S*q,t}function h(t,n,a){const r=a[0],o=a[1],e=a[2];if(n===t)t[12]=n[0]*r+n[4]*o+n[8]*e+n[12],t[13]=n[1]*r+n[5]*o+n[9]*e+n[13],t[14]=n[2]*r+n[6]*o+n[10]*e+n[14],t[15]=n[3]*r+n[7]*o+n[11]*e+n[15];else{const a=n[0],u=n[1],s=n[2],c=n[3],i=n[4],h=n[5],M=n[6],f=n[7],l=n[8],b=n[9],m=n[10],d=n[11];t[0]=a,t[1]=u,t[2]=s,t[3]=c,t[4]=i,t[5]=h,t[6]=M,t[7]=f,t[8]=l,t[9]=b,t[10]=m,t[11]=d,t[12]=a*r+i*o+l*e+n[12],t[13]=u*r+h*o+b*e+n[13],t[14]=s*r+M*o+m*e+n[14],t[15]=c*r+f*o+d*e+n[15]}return t}function M(t,n,a){const r=a[0],o=a[1],e=a[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=n[7]*o,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function f(t,n,a,r){let e,u,s,c,i,h,M,f,l,b,m,d,x,q,p,g,y,S,_,T,v,A,O,R,I=r[0],j=r[1],w=r[2],P=Math.sqrt(I*I+j*j+w*w);return P<(0,o.Au)()?null:(P=1/P,I*=P,j*=P,w*=P,e=Math.sin(a),u=Math.cos(a),s=1-u,c=n[0],i=n[1],h=n[2],M=n[3],f=n[4],l=n[5],b=n[6],m=n[7],d=n[8],x=n[9],q=n[10],p=n[11],g=I*I*s+u,y=j*I*s+w*e,S=w*I*s-j*e,_=I*j*s-w*e,T=j*j*s+u,v=w*j*s+I*e,A=I*w*s+j*e,O=j*w*s-I*e,R=w*w*s+u,t[0]=c*g+f*y+d*S,t[1]=i*g+l*y+x*S,t[2]=h*g+b*y+q*S,t[3]=M*g+m*y+p*S,t[4]=c*_+f*T+d*v,t[5]=i*_+l*T+x*v,t[6]=h*_+b*T+q*v,t[7]=M*_+m*T+p*v,t[8]=c*A+f*O+d*R,t[9]=i*A+l*O+x*R,t[10]=h*A+b*O+q*R,t[11]=M*A+m*O+p*R,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function l(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function b(t,n,a){if(0===n)return u(t);let r,e,s,c=a[0],i=a[1],h=a[2],M=Math.sqrt(c*c+i*i+h*h);return M<(0,o.Au)()?null:(M=1/M,c*=M,i*=M,h*=M,r=Math.sin(n),e=Math.cos(n),s=1-e,t[0]=c*c*s+e,t[1]=i*c*s+h*r,t[2]=h*c*s-i*r,t[3]=0,t[4]=c*i*s-h*r,t[5]=i*i*s+e,t[6]=h*i*s+c*r,t[7]=0,t[8]=c*h*s+i*r,t[9]=i*h*s-c*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=a,t[7]=0,t[8]=0,t[9]=-a,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,n,a){const r=n[0],o=n[1],e=n[2],u=n[3],s=r+r,c=o+o,i=e+e,h=r*s,M=r*c,f=r*i,l=o*c,b=o*i,m=e*i,d=u*s,x=u*c,q=u*i;return t[0]=1-(l+m),t[1]=M+q,t[2]=f-x,t[3]=0,t[4]=M-q,t[5]=1-(h+m),t[6]=b+d,t[7]=0,t[8]=f+x,t[9]=b-d,t[10]=1-(h+l),t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}const x=(0,r.Su)();function q(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function p(t,n){const a=n[0],r=n[1],o=n[2],e=n[4],u=n[5],s=n[6],c=n[8],i=n[9],h=n[10];return t[0]=Math.sqrt(a*a+r*r+o*o),t[1]=Math.sqrt(e*e+u*u+s*s),t[2]=Math.sqrt(c*c+i*i+h*h),t}function g(t,n){const a=n[0]+n[5]+n[10];let r=0;return a>0?(r=2*Math.sqrt(a+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function y(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=n[3],c=o+o,i=e+e,h=u+u,M=o*c,f=o*i,l=o*h,b=e*i,m=e*h,d=u*h,x=s*c,q=s*i,p=s*h,g=r[0],y=r[1],S=r[2];return t[0]=(1-(b+d))*g,t[1]=(f+p)*g,t[2]=(l-q)*g,t[3]=0,t[4]=(f-p)*y,t[5]=(1-(M+d))*y,t[6]=(m+x)*y,t[7]=0,t[8]=(l+q)*S,t[9]=(m-x)*S,t[10]=(1-(M+b))*S,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function S(t,n,a,r,o){const e=n[0],u=n[1],s=n[2],c=n[3],i=e+e,h=u+u,M=s+s,f=e*i,l=e*h,b=e*M,m=u*h,d=u*M,x=s*M,q=c*i,p=c*h,g=c*M,y=r[0],S=r[1],_=r[2],T=o[0],v=o[1],A=o[2],O=(1-(m+x))*y,R=(l+g)*y,I=(b-p)*y,j=(l-g)*S,w=(1-(f+x))*S,P=(d+q)*S,D=(b+p)*_,N=(d-q)*_,Q=(1-(f+m))*_;return t[0]=O,t[1]=R,t[2]=I,t[3]=0,t[4]=j,t[5]=w,t[6]=P,t[7]=0,t[8]=D,t[9]=N,t[10]=Q,t[11]=0,t[12]=a[0]+T-(O*T+j*v+D*A),t[13]=a[1]+v-(R*T+w*v+N*A),t[14]=a[2]+A-(I*T+P*v+Q*A),t[15]=1,t}function _(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t[9]=n[9]-a[9],t[10]=n[10]-a[10],t[11]=n[11]-a[11],t[12]=n[12]-a[12],t[13]=n[13]-a[13],t[14]=n[14]-a[14],t[15]=n[15]-a[15],t}function T(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function v(t,n){if(t===n)return!0;const a=t[0],r=t[1],e=t[2],u=t[3],s=t[4],c=t[5],i=t[6],h=t[7],M=t[8],f=t[9],l=t[10],b=t[11],m=t[12],d=t[13],x=t[14],q=t[15],p=n[0],g=n[1],y=n[2],S=n[3],_=n[4],T=n[5],v=n[6],A=n[7],O=n[8],R=n[9],I=n[10],j=n[11],w=n[12],P=n[13],D=n[14],N=n[15],Q=(0,o.Au)();return Math.abs(a-p)<=Q*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(r-g)<=Q*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(e-y)<=Q*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(u-S)<=Q*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(s-_)<=Q*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-T)<=Q*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(i-v)<=Q*Math.max(1,Math.abs(i),Math.abs(v))&&Math.abs(h-A)<=Q*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(M-O)<=Q*Math.max(1,Math.abs(M),Math.abs(O))&&Math.abs(f-R)<=Q*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(l-I)<=Q*Math.max(1,Math.abs(l),Math.abs(I))&&Math.abs(b-j)<=Q*Math.max(1,Math.abs(b),Math.abs(j))&&Math.abs(m-w)<=Q*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(d-P)<=Q*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(x-D)<=Q*Math.max(1,Math.abs(x),Math.abs(D))&&Math.abs(q-N)<=Q*Math.max(1,Math.abs(q),Math.abs(N))}function A(t){const n=(0,o.Au)(),a=t[0],r=t[1],e=t[2],u=t[4],s=t[5],c=t[6],i=t[8],h=t[9],M=t[10];return Math.abs(1-(a*a+u*u+i*i))<=n&&Math.abs(1-(r*r+s*s+h*h))<=n&&Math.abs(1-(e*e+c*c+M*M))<=n}function O(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const R=i,I=_;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t[9]=n[9]+a[9],t[10]=n[10]+a[10],t[11]=n[11]+a[11],t[12]=n[12]+a[12],t[13]=n[13]+a[13],t[14]=n[14]+a[14],t[15]=n[15]+a[15],t},adjoint:function(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=n[4],s=n[5],c=n[6],i=n[7],h=n[8],M=n[9],f=n[10],l=n[11],b=n[12],m=n[13],d=n[14],x=n[15];return t[0]=s*(f*x-l*d)-M*(c*x-i*d)+m*(c*l-i*f),t[1]=-(r*(f*x-l*d)-M*(o*x-e*d)+m*(o*l-e*f)),t[2]=r*(c*x-i*d)-s*(o*x-e*d)+m*(o*i-e*c),t[3]=-(r*(c*l-i*f)-s*(o*l-e*f)+M*(o*i-e*c)),t[4]=-(u*(f*x-l*d)-h*(c*x-i*d)+b*(c*l-i*f)),t[5]=a*(f*x-l*d)-h*(o*x-e*d)+b*(o*l-e*f),t[6]=-(a*(c*x-i*d)-u*(o*x-e*d)+b*(o*i-e*c)),t[7]=a*(c*l-i*f)-u*(o*l-e*f)+h*(o*i-e*c),t[8]=u*(M*x-l*m)-h*(s*x-i*m)+b*(s*l-i*M),t[9]=-(a*(M*x-l*m)-h*(r*x-e*m)+b*(r*l-e*M)),t[10]=a*(s*x-i*m)-u*(r*x-e*m)+b*(r*i-e*s),t[11]=-(a*(s*l-i*M)-u*(r*l-e*M)+h*(r*i-e*s)),t[12]=-(u*(M*d-f*m)-h*(s*d-c*m)+b*(s*f-c*M)),t[13]=a*(M*d-f*m)-h*(r*d-o*m)+b*(r*f-o*M),t[14]=-(a*(s*d-c*m)-u*(r*d-o*m)+b*(r*c-o*s)),t[15]=a*(s*f-c*M)-u*(r*f-o*M)+h*(r*c-o*s),t},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},determinant:function(t){const n=t[0],a=t[1],r=t[2],o=t[3],e=t[4],u=t[5],s=t[6],c=t[7],i=t[8],h=t[9],M=t[10],f=t[11],l=t[12],b=t[13],m=t[14],d=t[15];return(n*u-a*e)*(M*d-f*m)-(n*s-r*e)*(h*d-f*b)+(n*c-o*e)*(h*m-M*b)+(a*s-r*u)*(i*d-f*l)-(a*c-o*u)*(i*m-M*l)+(r*c-o*s)*(i*b-h*l)},equals:v,exactEquals:T,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,n){const a=n[0],r=n[1],o=n[2],e=n[3],u=a+a,s=r+r,c=o+o,i=a*u,h=r*u,M=r*s,f=o*u,l=o*s,b=o*c,m=e*u,d=e*s,x=e*c;return t[0]=1-M-b,t[1]=h+x,t[2]=f-d,t[3]=0,t[4]=h-x,t[5]=1-i-b,t[6]=l+m,t[7]=0,t[8]=f+d,t[9]=l-m,t[10]=1-i-M,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){const a=x,r=-n[0],o=-n[1],e=-n[2],u=n[3],s=n[4],c=n[5],i=n[6],h=n[7],M=r*r+o*o+e*e+u*u;return M>0?(a[0]=2*(s*u+h*r+c*e-i*o)/M,a[1]=2*(c*u+h*o+i*r-s*e)/M,a[2]=2*(i*u+h*e+s*o-c*r)/M):(a[0]=2*(s*u+h*r+c*e-i*o),a[1]=2*(c*u+h*o+i*r-s*e),a[2]=2*(i*u+h*e+s*o-c*r)),d(t,n,a),t},fromRotation:b,fromRotationTranslation:d,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:S,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:l,fromXRotation:m,fromYRotation:function(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-a,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=a,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=0,t[3]=0,t[4]=-a,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,a,r,o,e,u){const s=1/(a-n),c=1/(o-r),i=1/(e-u);return t[0]=2*e*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*c,t[6]=0,t[7]=0,t[8]=(a+n)*s,t[9]=(o+r)*c,t[10]=(u+e)*i,t[11]=-1,t[12]=0,t[13]=0,t[14]=u*e*2*i,t[15]=0,t},getRotation:g,getScaling:p,getTranslation:q,hasIdentityRotation:O,identity:u,invert:c,invertOrIdentity:function(t,n){return c(t,n)||u(t),t},isOrthoNormal:A,lookAt:function(t,n,a,r){const e=n[0],s=n[1],c=n[2];let i=e-a[0],h=s-a[1],M=c-a[2];const f=(0,o.Au)();if(Math.abs(i)<f&&Math.abs(h)<f&&Math.abs(M)<f)return void u(t);let l=1/Math.sqrt(i*i+h*h+M*M);i*=l,h*=l,M*=l;const b=r[0],m=r[1],d=r[2];let x=m*M-d*h,q=d*i-b*M,p=b*h-m*i;l=Math.sqrt(x*x+q*q+p*p),l?(l=1/l,x*=l,q*=l,p*=l):(x=0,q=0,p=0);let g=h*p-M*q,y=M*x-i*p,S=i*q-h*x;l=Math.sqrt(g*g+y*y+S*S),l?(l=1/l,g*=l,y*=l,S*=l):(g=0,y=0,S=0),t[0]=x,t[1]=g,t[2]=i,t[3]=0,t[4]=q,t[5]=y,t[6]=h,t[7]=0,t[8]=p,t[9]=S,t[10]=M,t[11]=0,t[12]=-(x*e+q*s+p*c),t[13]=-(g*e+y*s+S*c),t[14]=-(i*e+h*s+M*c),t[15]=1},mul:R,multiply:i,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12]*a,t[13]=n[13]*a,t[14]=n[14]*a,t[15]=n[15]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t[9]=n[9]+a[9]*r,t[10]=n[10]+a[10]*r,t[11]=n[11]+a[11]*r,t[12]=n[12]+a[12]*r,t[13]=n[13]+a[13]*r,t[14]=n[14]+a[14]*r,t[15]=n[15]+a[15]*r,t},ortho:function(t,n,a,r,o,e,u){const s=1/(n-a),c=1/(r-o),i=1/(e-u);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*i,t[11]=0,t[12]=(n+a)*s,t[13]=(o+r)*c,t[14]=(u+e)*i,t[15]=1,t},perspective:function(t,n,a,r,o){const e=1/Math.tan(n/2);let u;return t[0]=e/a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(u=1/(r-o),t[10]=(o+r)*u,t[14]=2*o*r*u):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,a,r){const o=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),u=Math.tan(n.leftDegrees*Math.PI/180),s=Math.tan(n.rightDegrees*Math.PI/180),c=2/(u+s),i=2/(o+e);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=-(u-s)*c*.5,t[9]=(o-e)*i*.5,t[10]=r/(a-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*a/(a-r),t[15]=0,t},rotate:f,rotateX:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[4],u=n[5],s=n[6],c=n[7],i=n[8],h=n[9],M=n[10],f=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=e*o+i*r,t[5]=u*o+h*r,t[6]=s*o+M*r,t[7]=c*o+f*r,t[8]=i*o-e*r,t[9]=h*o-u*r,t[10]=M*o-s*r,t[11]=f*o-c*r,t},rotateY:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[0],u=n[1],s=n[2],c=n[3],i=n[8],h=n[9],M=n[10],f=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=e*o-i*r,t[1]=u*o-h*r,t[2]=s*o-M*r,t[3]=c*o-f*r,t[8]=e*r+i*o,t[9]=u*r+h*o,t[10]=s*r+M*o,t[11]=c*r+f*o,t},rotateZ:function(t,n,a){const r=Math.sin(a),o=Math.cos(a),e=n[0],u=n[1],s=n[2],c=n[3],i=n[4],h=n[5],M=n[6],f=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=e*o+i*r,t[1]=u*o+h*r,t[2]=s*o+M*r,t[3]=c*o+f*r,t[4]=i*o-e*r,t[5]=h*o-u*r,t[6]=M*o-s*r,t[7]=f*o-c*r,t},scale:M,set:e,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:_,targetTo:function(t,n,a,r){const o=n[0],e=n[1],u=n[2],s=r[0],c=r[1],i=r[2];let h=o-a[0],M=e-a[1],f=u-a[2],l=h*h+M*M+f*f;l>0&&(l=1/Math.sqrt(l),h*=l,M*=l,f*=l);let b=c*f-i*M,m=i*h-s*f,d=s*M-c*h;return l=b*b+m*m+d*d,l>0&&(l=1/Math.sqrt(l),b*=l,m*=l,d*=l),t[0]=b,t[1]=m,t[2]=d,t[3]=0,t[4]=M*d-f*m,t[5]=f*b-h*d,t[6]=h*m-M*b,t[7]=0,t[8]=h,t[9]=M,t[10]=f,t[11]=0,t[12]=o,t[13]=e,t[14]=u,t[15]=1,t},translate:h,transpose:s},Symbol.toStringTag,{value:"Module"}))}}]);
|