@arcgis/core 4.25.0-next.20221108 → 4.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4726c869d80257488a38.js → 0690434cb3d7df4188aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf097a329b91fcd7a300.js → 0a9813558c89a8824080.js} +1 -1
- package/assets/esri/core/workers/chunks/{33ea3449d32ac21adc91.js → 0d10010d8db4ebd20356.js} +1 -1
- package/assets/esri/core/workers/chunks/0ea80e26c937441c2bc5.js +1 -0
- package/assets/esri/core/workers/chunks/52b6711572ac7e058ce6.js +1 -0
- package/assets/esri/core/workers/chunks/{e031a2fee155aa168858.js → 61959a85261218b22376.js} +1 -1
- package/assets/esri/core/workers/chunks/{363700f66277a9176991.js → 7c255fe7a231d93a2048.js} +1 -1
- package/assets/esri/core/workers/chunks/8750c7463968f0c183ba.js +1 -0
- package/assets/esri/core/workers/chunks/a16641c79f56012b0d66.js +1 -0
- package/assets/esri/core/workers/chunks/{211ad79ff0b187c52449.js → afd87bc92895517b0877.js} +1 -1
- package/assets/esri/core/workers/chunks/b04984f048b75b2b4dd2.js +1 -0
- package/assets/esri/core/workers/chunks/bc878858cf5fb3237206.js +1 -0
- package/assets/esri/core/workers/chunks/{5de864843c0d3f4d291d.js → d4bfb6a3b8965be6f0d6.js} +1 -1
- package/assets/esri/core/workers/chunks/{086dafcd10b310ba1a30.js → d9bba06ef5d22bd2d789.js} +1 -1
- package/assets/esri/core/workers/chunks/ee261fdc2a82d05e458e.js +1 -0
- package/assets/esri/core/workers/chunks/f29c6965e9e8f904be40.js +1 -0
- package/config.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +8 -2
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/package.json +1 -1
- package/portal/support/urlUtils.js +1 -1
- package/request.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/6dfb2ddfd72009564a34.js +0 -1
- package/assets/esri/core/workers/chunks/83879da1ff7938a76574.js +0 -1
- package/assets/esri/core/workers/chunks/878bc2b24cc45418e819.js +0 -1
- package/assets/esri/core/workers/chunks/b5e6a868256c5aae6d5e.js +0 -1
- package/assets/esri/core/workers/chunks/c2a8813b618f98d0016d.js +0 -1
- package/assets/esri/core/workers/chunks/c868ffdc6bb8a49d82d7.js +0 -1
- package/assets/esri/core/workers/chunks/d573ec98401fbae26383.js +0 -1
- package/assets/esri/core/workers/chunks/f23d8ec18740eb2e5e8f.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3388,3172,9880],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,s,i=r(35270),a=r(22021),o=r(70586),l=r(75215);function c(e){return(0,a.uZ)((0,l.vU)(e),0,255)}function h(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class u{constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}static blendColors(e,t,r,n=new u){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&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])),u.fromArray(r,t)}return u.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return u.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new u){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let s=Number("0x"+e.substr(1));return isNaN(s)?null:(["b","g","r"].forEach((e=>{const i=s&n;s>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new u){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,i.St)(e)?(0,i.h$)(e):null;return r&&u.fromArray(r,t)||u.fromRgb(e,t)||u.fromHex(e,t)}static fromJSON(e){return e&&new u([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return(0,o.pC)(e)?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return(0,o.pC)(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?u.fromString(e,this):Array.isArray(e)?u.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof u||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=u.AlphaMode.ALWAYS){const t=c(this.r),r=c(this.g),n=c(this.b);return e===u.AlphaMode.ALWAYS||1!==this.a?[t,r,n,c(255*this.a)]:[t,r,n]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return(0,o.pC)(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(h(this.r,0,255)),this.g=Math.round(h(this.g,0,255)),this.b=Math.round(h(this.b,0,255)),this.a=h(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}u.prototype.declaredClass="esri.Color",n=u||(u={}),(s=n.AlphaMode||(n.AlphaMode={}))[s.ALWAYS=0]="ALWAYS",s[s.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=u},99880:(e,t,r)=>{r.d(t,{V:()=>l});var n=r(68773),s=(r(3172),r(20102)),i=r(92604),a=r(17452);const o=i.Z.getLogger("esri.assets");function l(e){if(!n.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(n.Z.assetsPath,e)}},46851:(e,t,r)=>{r.d(t,{R:()=>i,a:()=>c,g:()=>s,t:()=>l});let n=1e-6;function s(){return n}const i=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function c(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,getEpsilon:s,setEpsilon:function(e){n=e},RANDOM:i,toRadian:l,toDegree:c,equals:function(e,t){return Math.abs(e-t)<=n*Math.max(1,Math.abs(e),Math.abs(t))}},Symbol.toStringTag,{value:"Module"}))},17896:(e,t,r)=>{r.d(t,{B:()=>h,C:()=>u,a:()=>l,b:()=>c,c:()=>a,d:()=>g,e:()=>x,f:()=>_,g:()=>f,h:()=>b,i:()=>p,k:()=>T,l:()=>i,m:()=>w,n:()=>m,p:()=>y,q:()=>M,r:()=>P,s:()=>o,t:()=>I,u:()=>D,z:()=>d});var n=r(65617),s=r(46851);function i(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function c(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function h(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function f(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function d(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function p(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(r*r+n*n+s*s)}function g(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return r*r+n*n+s*s}function y(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function m(e,t){const r=t[0],n=t[1],s=t[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2];return e[0]=s*l-i*o,e[1]=i*a-n*l,e[2]=n*o-s*a,e}function b(e,t,r,n){const s=t[0],i=t[1],a=t[2];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e}function w(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12],e[1]=r[1]*n+r[5]*s+r[9]*i+r[13],e[2]=r[2]*n+r[6]*s+r[10]*i+r[14],e}function I(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=n*r[0]+s*r[3]+i*r[6],e[1]=n*r[1]+s*r[4]+i*r[7],e[2]=n*r[2]+s*r[5]+i*r[8],e}function M(e,t,r){const n=r[0],s=r[1],i=r[2],a=r[3],o=t[0],l=t[1],c=t[2];let h=s*c-i*l,u=i*o-n*c,f=n*l-s*o,d=s*f-i*u,p=i*h-n*f,g=n*u-s*h;const y=2*a;return h*=y,u*=y,f*=y,d*=2,p*=2,g*=2,e[0]=o+h+d,e[1]=l+u+p,e[2]=c+f+g,e}const k=(0,n.c)(),v=(0,n.c)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t,r){const n=r[0]-t[0],s=r[1]-t[1],i=r[2]-t[2];let a=n*n+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=n*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=c,A=h,E=u,B=p,S=g,D=i,V=y;Object.freeze(Object.defineProperty({__proto__:null,length:i,copy:a,set:o,add:l,subtract:c,multiply:h,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},abs:function(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e},sign:function(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:d,distance:p,squaredDistance:g,squaredLength:y,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:m,dot:x,cross:_,lerp:b,hermite:function(e,t,r,n,s,i){const a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,c=a*(i-1),h=a*(3-2*i);return e[0]=t[0]*o+r[0]*l+n[0]*c+s[0]*h,e[1]=t[1]*o+r[1]*l+n[1]*c+s[1]*h,e[2]=t[2]*o+r[2]*l+n[2]*c+s[2]*h,e},bezier:function(e,t,r,n,s,i){const a=1-i,o=a*a,l=i*i,c=o*a,h=3*i*o,u=3*l*a,f=l*i;return e[0]=t[0]*c+r[0]*h+n[0]*u+s[0]*f,e[1]=t[1]*c+r[1]*h+n[1]*u+s[1]*f,e[2]=t[2]*c+r[2]*h+n[2]*u+s[2]*f,e},random:function(e,t){t=t||1;const r=s.R,n=2*r()*Math.PI,i=2*r()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(n)*a,e[1]=Math.sin(n)*a,e[2]=i*t,e},transformMat4:w,transformMat3:I,transformQuat:M,rotateX:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateY:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateZ:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},angle:function(e,t){a(k,e),a(v,t),m(k,k),m(v,v);const r=x(k,v);return r>1?0:r<-1?Math.PI:Math.acos(r)},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:T,equals:function(e,t){if(e===t)return!0;const r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],l=t[2],c=(0,s.g)();return Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=c*Math.max(1,Math.abs(i),Math.abs(l))},direction:P,sub:L,mul:A,div:E,dist:B,sqrDist:S,len:D,sqrLen:V},Symbol.toStringTag,{value:"Module"}))},65617:(e,t,r)=>{function n(){return[0,0,0]}function s(e){return[e[0],e[1],e[2]]}function i(e,t,r){return[e,t,r]}function a(e){const t=[0,0,0],r=Math.min(3,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t}function o(e,t){return new Float64Array(e,t,3)}function l(){return i(1,1,1)}function c(){return i(1,0,0)}function h(){return i(0,1,0)}function u(){return i(0,0,1)}r.d(t,{O:()=>d,Z:()=>f,a:()=>s,b:()=>o,c:()=>n,d:()=>a,f:()=>i});const f=[0,0,0],d=l(),p=c(),g=h(),y=u();Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:s,fromValues:i,fromArray:a,createView:o,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:h,unitZ:u,ZEROS:f,ONES:d,UNIT_X:p,UNIT_Y:g,UNIT_Z:y},Symbol.toStringTag,{value:"Module"}))},98766:(e,t,r)=>{r.d(t,{a:()=>a,b:()=>h,c:()=>s,d:()=>y,e:()=>d,f:()=>p,g:()=>x,h:()=>_,l:()=>m,n:()=>g,s:()=>i});var n=r(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function o(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function u(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+n*n+s*s+i*i)}function f(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+s*s+i*i}function d(e){const t=e[0],r=e[1],n=e[2],s=e[3];return Math.sqrt(t*t+r*r+n*n+s*s)}function p(e){const t=e[0],r=e[1],n=e[2],s=e[3];return t*t+r*r+n*n+s*s}function g(e,t){const r=t[0],n=t[1],s=t[2],i=t[3];let a=r*r+n*n+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=n*a,e[2]=s*a,e[3]=i*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function m(e,t,r,n){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e[3]=o+n*(r[3]-o),e}function x(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _(e,t){const r=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],c=t[2],h=t[3],u=(0,n.g)();return Math.abs(r-o)<=u*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-h)<=u*Math.max(1,Math.abs(a),Math.abs(h))}const b=o,w=l,I=c,M=u,k=f,v=d,T=p;Object.freeze(Object.defineProperty({__proto__:null,copy:s,set:i,add:a,subtract:o,multiply:l,divide:c,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:h,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},distance:u,squaredDistance:f,length:d,squaredLength:p,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:g,dot:y,lerp:m,random:function(e,t){const r=n.R;let s,i,a,o,l,c;t=t||1;do{s=2*r()-1,i=2*r()-1,l=s*s+i*i}while(l>=1);do{a=2*r()-1,o=2*r()-1,c=a*a+o*o}while(c>=1);const h=Math.sqrt((1-l)/c);return e[0]=t*s,e[1]=t*i,e[2]=t*a*h,e[3]=t*o*h,e},transformMat4:function(e,t,r){const n=t[0],s=t[1],i=t[2],a=t[3];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*a,e[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*a,e[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*a,e[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*a,e},transformQuat:function(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2],c=r[3],h=c*n+o*i-l*s,u=c*s+l*n-a*i,f=c*i+a*s-o*n,d=-a*n-o*s-l*i;return e[0]=h*c+d*-a+u*-l-f*-o,e[1]=u*c+d*-o+f*-a-h*-l,e[2]=f*c+d*-l+h*-o-u*-a,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:x,equals:_,sub:b,mul:w,div:I,dist:M,sqrDist:k,len:v,sqrLen:T},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>s,VL:()=>a,h$:()=>i,rW:()=>c});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function s(e){return n[e]||n[e.toLowerCase()]}function i(e){return n[e]??n[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const s=(e%360+360)%360/360,i=r<=.5?r*(t+1):r+t-r*t,a=2*r-i;return[Math.round(255*o(a,i,s+1/3)),Math.round(255*o(a,i,s)),Math.round(255*o(a,i,s-1/3)),n]}function c(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,s=t?1:17,i=t?9===e.length:5===e.length;let a=Number("0x"+e.substr(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return i&&(l=a&n,a>>=r,o[3]=s*l/255),l=a&n,a>>=r,o[2]=s*l,l=a&n,a>>=r,o[1]=s*l,l=a&n,a>>=r,o[0]=s*l,o}},3894:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(71143);function s(e){e.length=0}class i{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return a.acquire()}static release(e){return a.release(e)}static prune(){a.prune()}}const a=new i(100)},30175:(e,t,r)=>{function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},71143:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},75215:(e,t,r)=>{r.d(t,{AY:()=>B,Iu:()=>k,Ls:()=>w,N7:()=>L,TJ:()=>y,V5:()=>E,Zs:()=>l,di:()=>v,gB:()=>T,i$:()=>P,q9:()=>c,rY:()=>I,sY:()=>S,se:()=>b,vU:()=>h,z8:()=>A}),r(80442);var n=r(92604),s=r(30175);const i=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function a(e){return null==e?e:new Date(e)}function o(e){return null==e?e:!!e}function l(e){return null==e?e:e.toString()}function c(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function h(e){return null==e?e:Math.round(parseFloat(e))}function u(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function f(e,t){return null!=t&&e&&!(t instanceof e)}function d(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!u(t)&&(i.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+m(e)+"'"),!0)}function y(e,t){return null==t?t:d(e)?function(e,t){if(!t||!t.constructor||!d(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):f(e,t)?g(e,t)?t:new e(t):t}function m(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const x=new WeakMap;function _(e){switch(e){case Number:return c;case A:return h;case Boolean:return o;case String:return l;case Date:return a;default:return(0,s.s1)(x,e,(()=>y.bind(null,e)))}}function b(e,t){const r=_(e);return 1===arguments.length?r:r(t)}function w(e,t,r){return 1===arguments.length?w.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function I(e,t){return 1===arguments.length?w(b.bind(null,e)):w(b.bind(null,e),t)}function M(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>M(e,t-1,r))):e(r)}function k(e,t,r){if(2===arguments.length)return k.bind(null,e,t);if(!r)return r;let n=t,s=r=M(e,t,r);for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function v(e,t,r){return 2===arguments.length?k(b.bind(null,e),t):k(b.bind(null,e),t,r)}function T(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function P(e,t){if(2===arguments.length)return P(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let a=null,o=null;return(e,t)=>{if(null==e)return e;const l=typeof e,c="string"===l||"number"===l;return c&&(r.has(e)||s.some((e=>"string"===l&&e===String||"number"===l&&e===Number)))||"object"===l&&s.some((t=>!f(e,t)))?e:(c&&n.length?(a||(a=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${a}`)):"object"==typeof e&&s.length?(o||(o=s.map((e=>m(e))).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${o}`)):i.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function L(e,t){if(2===arguments.length)return L(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const i=e.typeMap[t];r[t]=b(i),n.push(m(i)),s.push(t)}const a=()=>`'${n.join("', '")}'`,o=()=>`'${s.join("', '")}'`,l="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!f(e.base,t))return t;if(null==t)return t;const n=l(t)||e.defaultKeyValue,s=r[n];if(!s)return i.error("Accessor#set",`Invalid property value, value needs to be one of ${a()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!f(e.typeMap[n],t))return t;if("string"==typeof e.key&&!u(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class A{}const E={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function B(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function S(e){switch(e.type){case"native":return b(e.value);case"array":return w(S(e.value));case"one-of":return function(e){let t=null;return(r,n)=>V(r,e)?r:(null==t&&(t=D(e)),i.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function D(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case A:return"integer";case Date:return"date";default:return m(e.value)}case"array":return`array of ${D(e.value)}`;case"one-of":{const t=e.values.map((e=>D(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function V(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case A:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!V(e,t.value)));case"one-of":return t.values.some((t=>V(e,t)))}}},22021:(e,t,r)=>{r.d(t,{BV:()=>h,Kt:()=>f,Sf:()=>i,Vl:()=>c,ZF:()=>u,jE:()=>x,oK:()=>y,oc:()=>_,t7:()=>l,uZ:()=>a,wt:()=>o});var n=r(17896);r(98766);const s=new Float32Array(1);function i(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,r){return Math.min(Math.max(e,t),r)}function o(e){return 0==(e&e-1)}function l(e,t,r){return e+(t-e)*r}function c(e){return e*Math.PI/180}function h(e){return 180*e/Math.PI}function u(e){return Math.acos(a(e,-1,1))}function f(e){return Math.asin(a(e,-1,1))}function d(e,t,r=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=r}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const g=BigInt("1000000");function y(e){return m(Math.max(-b,Math.min(e,b)))}function m(e){return s[0]=e,s[0]}function x(e,t){const r=(0,n.l)(e),s=f(e[2]/r),i=Math.atan2(e[1]/r,e[0]/r);return(0,n.s)(t,r,s,i),t}function _(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],n=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(d(t,1)&&d(r,1)&&d(n,1))}!function(e){const t=function(e){return p.setFloat64(0,e),p.getBigInt64(0)}(e=Math.abs(e)),r=function(e){return p.setBigInt64(0,e),p.getFloat64(0)}(t<=g?g:t-g);Math.abs(e-r)}(1);const b=m(34028234663852886e22)},45091:(e,t,r)=>{r.d(t,{Z:()=>h});var n,s,i=r(80442),a=r(71143);(s=n||(n={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),c=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class h{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,s)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const s=this.getMessage(),i=e(s,t,r,n);return s.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*s}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t=this._pos,r=0,n=0;const s=1&e[t];if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*s}return this._pos=t,s?-(r+1)/2:r/2}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const n=e.subarray(t,r);return l.decode(n)}let n="",s="";for(let i=t;i<r;++i){const t=e[i];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}h.pool=new a.Z(h,void 0,(e=>{e._data=null,e._dataView=null}))},19745:(e,t,r)=>{r.d(t,{P:()=>a,a:()=>i});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function i(e){const t=e?.match(n);if(!t)return null;const[,r,i,a]=t;if(!r)return null;let o=null,l=null,c=null;const{devext:h,qaext:u,www:f}=s;if(i)if(o=r,a)switch(a.toLowerCase()){case"devext":({customBaseUrl:l,portalHostname:c}=h);break;case"qa":({customBaseUrl:l,portalHostname:c}=u);break;default:return null}else({customBaseUrl:l,portalHostname:c}=f);else switch(r.toLowerCase()){case"devext":({customBaseUrl:l,portalHostname:c}=h);break;case"qaext":({customBaseUrl:l,portalHostname:c}=u);break;case"www":({customBaseUrl:l,portalHostname:c}=f);break;default:return null}return{customBaseUrl:l,isPortal:!1,portalHostname:c,urlKey:o}}function a(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var n=r(68773),s=r(40330),i=r(20102),a=r(80442),o=r(22974),l=r(70586),c=r(95330),h=r(17452),u=r(19745),f=r(71058),d=r(85958);async function p(e,t){const o=(0,h.HK)(e),u=(0,h.jc)(e);u||o||(e=(0,h.Fv)(e));const x={url:e,requestOptions:{...(0,l.Wg)(t)}};let _=(0,h.oh)(e);if(_){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=k("request:interceptor",e,t)}if((n instanceof Error||n instanceof i.Z)&&(r=k("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(_,x);if(null!=e)return{data:e,getHeader:w,requestOptions:x.requestOptions,url:x.url};_.after||_.error||(_=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw k("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x)}else if(o)throw k("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),x);if("head"===t.method){if(t.body)throw k("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||u)throw k("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?g||(g=await r.e(9884).then(r.bind(r,29884))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}(),g)return g.execute(e,t);const b=new AbortController;(0,c.fu)(t,(()=>b.abort()));const I={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:_,params:x,redoRequest:!1,useIdentity:y.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},M=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,a=r.body;let o=null,l=null;if(m&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:r.cacheBust&&!p._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:y.priority,redirect:"follow",signal:i},(o||l)&&(e.fetchOptions.body=o||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||o?.get("token")),!e.hasToken&&n.Z.apiKey&&(0,f.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!T(t)&&!(0,c.Hc)(i)){let n;"immediate"===r.authMode?(await v(),n=await s.id.getCredential(t,{signal:i}),e.credential=n):"no-prompt"===r.authMode?(await v(),n=await s.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=n):s.id&&(n=s.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await P(e)}while(!await A(e,t,r))}catch(r){const n=k("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,h.kl)(i)){const e=(0,h.P$)(i,!0);e&&y.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&s.id){const e=s.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,a.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):w,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(I);return _?.after?.(M),M}let g;const y=n.Z.request,m="FormData"in globalThis,x=[499,498,403,401],_=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],w=()=>null,I=Symbol();function M(e){const t=(0,h.P$)(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||(0,h.kl)(t)}function k(e,t,r,n){let s="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:w,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,i=t.message;i&&(s=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=I in t?t[I]:t}return(0,c.D_)(t)?(0,c.zE)():new i.Z(e,s,a)}async function v(){s.id||await Promise.all([r.e(6261),r.e(1400),r.e(1761)]).then(r.bind(r,55142))}function T(e){return b.some((t=>t.test(e)))}async function P(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},i=(0,h.jc)(t)||(0,h.HK)(t),o=r.responseType||"json",l=i?0:null!=r.timeout?r.timeout:y.timeout;let f=!1;if(!i){e.useSSL&&(t=(0,h.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,h.ZN)(t,"request.preventCache",Date.now()));let i={...r.query};e.credentialToken&&(i.token=e.credentialToken);let o=(0,h.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let c;f="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>y.maxUrlLength;const p=r.useProxy||!!(0,h.ed)(t);if(p){const e=(0,h.b7)(t);c=e.path,!f&&c.length+1+l>y.maxUrlLength&&(f=!0),e.query&&(i={...e.query,...i})}if("HEAD"===n.method&&(f||p)){if(f){if(l>y.maxUrlLength)throw k("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw k("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw k("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(f?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,h.fl)(t,i):(n.body=(0,h.B7)(i),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,h.fl)(t,i),p&&(e.useProxy=!0,t=`${c}?${t}`),i.token&&m&&n.body instanceof FormData&&!(0,u.P)(t)&&n.body.set("token",i.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,h.D6)(t,(0,h.TI)()))if((0,h.kl)(t))e.withCredentials=!0;else if(s.id){const r=s.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(f?(0,h.fl)(t,i):t))}let g,x,_=0,b=!1;l>0&&(_=setTimeout((()=>{b=!0,e.controller.abort()}),l));try{if("native-request-init"===r.responseType)x=n,x.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||f||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!i&&!e.useProxy&&y.proxyUrl&&!M(t)){if(g=await p._abortableFetch(t,n),e.useProxy||function(e){const t=(0,h.P$)(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}(t),"native"===r.responseType)x=g;else if("HEAD"!==n.method)if(g.ok){switch(o){case"array-buffer":x=await g.arrayBuffer();break;case"blob":case"image":x=await g.blob();break;default:x=await g.text()}if(_&&(clearTimeout(_),_=0),"json"===o||"xml"===o||"document"===o)if(x)switch(o){case"json":x=JSON.parse(x);break;case"xml":x=L(x,"application/xml");break;case"document":x=L(x,"text/html")}else x=null;if(x){if("array-buffer"===o||"blob"===o){const e=g.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&x["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(x).json();e.error&&(x=e)}catch{}}"image"===o&&x instanceof Blob&&(x=await E(URL.createObjectURL(x),e,!0))}}else x=await g.text()}else x=await E(t,e)}catch(n){if("AbortError"===n.name){if(b)throw new Error("Timeout exceeded");throw(0,c.zE)("Request canceled")}if(!(!g&&n instanceof TypeError&&y.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||M(t))throw n;e.redoRequest=!0,(0,h.tD)({proxyUrl:y.proxyUrl,urlPrefix:(0,h.P$)(t)??""})}finally{_&&clearTimeout(_)}return[g,x]}function L(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function A(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let i,a;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[I]=r,i;r&&(r.error?i=r.error:"error"===r.status&&Array.isArray(r.messages)&&(i={...r},i[I]=r,i.details=r.messages));let o,l=null;i&&(a=Number(i.code),l=i.hasOwnProperty("subcode")?Number(i.subcode):null,o=i.messageCode,o=o&&o.toUpperCase());const c=n.authMode;if(403===a&&(4===l||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&x.includes(a)&&!T(e.params.url)&&(403!==a||o&&!_.includes(o)&&(null==l||2===l&&e.credentialToken))){await v();try{const t=await s.id.getCredential(e.params.url,{error:k("request:server",i,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function E(e,t,r=!1){const n=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=y.priority,s.src=e,(0,d.fY)(s,e,r,n)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>h,fY:()=>l,jH:()=>u,jz:()=>f});var n=r(68773),s=r(80442),i=r(70586),a=r(95330),o=r(17452);function l(e,t,r=!1,n){return new Promise(((o,l)=>{if((0,a.Hc)(n))return void l(c());let h=()=>{d(),l(new Error(`Unable to load ${t}`))},u=()=>{const t=e;d(),o(t)},f=()=>{if(!e)return;const t=e;d(),t.src="",l(c())};const d=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",h),e.removeEventListener("load",u)),h=null,u=null,e=null,(0,i.pC)(n)&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(t)};(0,i.pC)(n)&&n.addEventListener("abort",f),(0,s.Z)("esri-image-decode")?e.decode().then(u,h):(e.addEventListener("error",h),e.addEventListener("load",u))}))}function c(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function h(e){n.Z.request.crossOriginNoCorsDomains||(n.Z.request.crossOriginNoCorsDomains={});const t=n.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,o.P$)(r)??""]=0:(t[(0,o.P$)("http://"+r)??""]=0,t[(0,o.P$)("https://"+r)??""]=0)}function u(e){const t=n.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,o.P$)(e);if(r)return r=r.toLowerCase(),!(0,o.D6)(r,(0,o.TI)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=n.Z.request.crossOriginNoCorsDomains,r=(0,o.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const s=(0,o.mN)(e);e=s.path,"json"===s.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},56456:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ee});var n=r(95330),s=r(4215),i=r(70586),a=r(31363);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function h(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=r(87893);const f=24;class d{constructor(e,t,r,n,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=r,this._letterSpacing=n,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,r){const n=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;const p=e.length;for(let t=0;t<p;t++){const s=e.charCodeAt(t),i=r&&o(s);let a;for(const e of this._glyphItems)if(a=e[s],a)break;u.push({codePoint:s,x:f,y:d,vertical:i,glyphMosaicItem:a}),a&&(f+=a.metrics.advance+n)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const y=e.includes(""),m=[];for(let e=0;e<p-1;e++){const t=u[e].codePoint,r=l(t);if(c(t)||r){let n=0;if(10===t)n-=1e4;else if(r&&y)n+=150;else{40!==t&&65288!==t||(n+=50);const r=u[e+1].codePoint;41!==r&&65289!==r||(n+=50)}m.push(this._buildBreak(e+1,u[e].x,g,m,n,!1))}}const x=this._optimalBreaks(this._buildBreak(p,f,g,m,0,!0));let _=0;const b=t?-s:s;let w=0;for(let e=0;e<x.length;e++){const t=x[e];let r=w;for(;r<t&&h(u[r].codePoint);)u[r].glyphMosaicItem=null,++r;let n=t-1;for(;n>r&&h(u[n].codePoint);)u[n].glyphMosaicItem=null,--n;if(r<=n){const e=u[r].x;for(let t=r;t<=n;t++)u[t].x-=e,u[t].y=d;let t=u[n].x;u[n].glyphMosaicItem&&(t+=u[n].glyphMosaicItem.metrics.advance),_=Math.max(t,_),i&&this._applyJustification(u,r,n)}w=t,d+=b}if(u.length>0){const e=x.length-1,r=(i-this._hAnchor)*_;let n=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(n+=e*s);for(const e of u)e.x+=r,e.y+=n}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let r=1/0,n=1/0,s=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,c=o+e,h=l+t;r=Math.min(r,o),s=Math.max(s,c),n=Math.min(n,l),i=Math.max(i,h)}return{x:r,y:n,width:s-r,height:i-n}}static getBox(e){if(!e.length)return null;let t=1/0,r=1/0,n=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,c=i.x,h=i.y-(e-Math.abs(o)),u=c+l+a,f=h+e;t=Math.min(t,c),n=Math.max(n,u),r=Math.min(r,h),s=Math.max(s,f)}return{x:t,y:r,width:n-t,height:s-r}}static addDecoration(e,t){const r=e.length;if(0===r)return;let n=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<r;i++){const r=e[i];if(r.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:a-n,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=r.y,n=r.x+r.glyphMosaicItem.metrics.left}}const i=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:i-n,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,r,n){const s=(e-t)*(e-t);return n?e<t?s/2:2*s:s+Math.abs(r)*r}_buildBreak(e,t,r,n,s,i){let a=null,o=this._breakScore(t,r,s,i);for(const e of n){const n=t-e.x,l=this._breakScore(n,r,s,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,r){const n=e[r],s=n.vertical?f:n.glyphMosaicItem?n.glyphMosaicItem.metrics.advance:0,i=(n.x+s)*this._justify;for(let n=t;n<=r;n++)e[n].x-=i}}var p=r(21315),g=r(35362);const y=.5;class m{constructor(e,t,r=0,n=-1,s=y){this.x=e,this.y=t,this.angle=r,this.segment=n,this.minzoom=s}}class x{constructor(e,t,r,n,s,i=y,o=a.B1){this.anchor=e,this.labelAngle=t,this.glyphAngle=r,this.page=n,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class _{constructor(e,t,r,n,s,i,a,o,l,c,h,u){this.tl=e,this.tr=t,this.bl=r,this.br=n,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=c,this.maxzoom=h,this.page=u}}class b{constructor(e){this.shapes=e}}class w{getIconPlacement(e,t,r){const n=new g.E(e.x,e.y),s=r.rotationAlignment===p.aF.MAP,i=r.keepUpright;let o=r.rotate*a.DT;s&&(o+=e.angle);const l=new b([]);return r.allowOverlap&&r.ignorePlacement||(l.iconColliders=[]),this._addIconPlacement(l,n,t,r,o),s&&i&&this._addIconPlacement(l,n,t,r,o+a.JJ),l}_addIconPlacement(e,t,r,n,s){const i=r.pixelRatio,o=r.width/i,l=r.height/i,c=n.offset;let h=c[0],u=c[1];switch(n.anchor){case p.nR.CENTER:h-=o/2,u-=l/2;break;case p.nR.LEFT:u-=l/2;break;case p.nR.RIGHT:h-=o,u-=l/2;break;case p.nR.TOP:h-=o/2;break;case p.nR.BOTTOM:h-=o/2,u-=l;break;case p.nR.TOP_LEFT:break;case p.nR.BOTTOM_LEFT:u-=l;break;case p.nR.TOP_RIGHT:h-=o;break;case p.nR.BOTTOM_RIGHT:h-=o,u-=l}const f=r.rect,d=2/i,m=h-d,x=u-d,b=m+f.width/i,w=x+f.height/i,I=new g.E(m,x),M=new g.E(b,w),k=new g.E(m,w),v=new g.E(b,x);if(0!==s){const e=Math.cos(s),t=Math.sin(s);I.rotate(e,t),M.rotate(e,t),k.rotate(e,t),v.rotate(e,t)}const T=new _(I,v,k,M,f,s,0,256,t,y,a.B1,0);if(e.shapes.push(T),!n.allowOverlap||!n.ignorePlacement){const r=n.size,i=n.padding,c={xTile:t.x,yTile:t.y,dxPixels:h*r-i,dyPixels:u*r-i,hard:!n.optional,partIndex:0,width:o*r+2*i,height:l*r+2*i,angle:s,minLod:y,maxLod:a.B1};e.iconColliders.push(c)}}getTextPlacement(e,t,r,n){const s=new g.E(e.x,e.y),i=n.rotate*a.DT,o=n.rotationAlignment===p.aF.MAP,l=n.keepUpright,c=n.padding;let h=y;const u=o?e.angle:0,m=e.segment>=0&&o,w=n.allowOverlap&&n.ignorePlacement?null:[],I=[],M=!m;let k=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=k,P=v;const L=(m||o)&&l,A=n.size/f;let E=!1;for(const e of t)if(e.vertical){E=!0;break}let B,S=0,D=0;if(!m&&E){const e=d.getTextBox(t,n.lineHeight*f);switch(n.anchor){case p.nR.LEFT:S=e.height/2,D=-e.width/2;break;case p.nR.RIGHT:S=-e.height/2,D=e.width/2;break;case p.nR.TOP:S=e.height/2,D=e.width/2;break;case p.nR.BOTTOM:S=-e.height/2,D=-e.width/2;break;case p.nR.TOP_LEFT:S=e.height;break;case p.nR.BOTTOM_LEFT:D=-e.width;break;case p.nR.TOP_RIGHT:D=e.width;break;case p.nR.BOTTOM_RIGHT:S=-e.height}}S+=n.offset[0]*f,D+=n.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,p=t.metrics,b=t.page;if(w&&M){if(void 0!==B&&B!==f.y){let t,r,s,o;E?(t=-P+S,r=k+D,s=P-T,o=v-k):(t=k+S,r=T+D,s=v-k,o=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*A-c,dyPixels:r*A-c,hard:!n.optional,partIndex:1,width:s*A+2*c,height:o*A+2*c,angle:i,minLod:y,maxLod:a.B1};w.push(l),k=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=k,P=v}B=f.y}const V=[];if(m){const n=.5*t.metrics.width,s=(f.x+p.left-4+n)*A*8;if(h=this._placeGlyph(e,h,s,r,e.segment,1,f.vertical,b,V),l&&(h=this._placeGlyph(e,h,s,r,e.segment,-1,f.vertical,b,V)),h>=2)break}else V.push(new x(s,u,u,b,!1)),o&&l&&V.push(new x(s,u+a.JJ,u+a.JJ,b,!1));const C=f.x+p.left,R=f.y-17-p.top,O=C+p.width,F=R+p.height;let q,U,N,z,Z,H,j,G;if(!m&&E)if(f.vertical){const e=(C+O)/2-p.height/2,t=(R+F)/2+p.width/2;q=new g.E(-t-4+S,e-4+D),U=new g.E(q.x+d.width,q.y+d.height),N=new g.E(q.x,U.y),z=new g.E(U.x,q.y)}else q=new g.E(4-R+S,C-4+D),U=new g.E(q.x-d.height,q.y+d.width),N=new g.E(U.x,q.y),z=new g.E(q.x,U.y);else q=new g.E(C-4+S,R-4+D),U=new g.E(q.x+d.width,q.y+d.height),N=new g.E(q.x,U.y),z=new g.E(U.x,q.y);for(const t of V){let r,s,a,o;if(t.alternateVerticalGlyph){if(!Z){const e=(R+F)/2+D;Z=new g.E((C+O)/2+S-p.height/2-4,e+p.width/2+4),H=new g.E(Z.x+d.height,Z.y-d.width),j=new g.E(H.x,Z.y),G=new g.E(Z.x,H.y)}r=Z,s=j,a=G,o=H}else r=q,s=N,a=z,o=U;const l=R,h=F,u=t.glyphAngle+i;if(0!==u){const e=Math.cos(u),t=Math.sin(u);r=r.clone(),s=s.clone(),a=a.clone(),o=o.clone(),r.rotate(e,t),o.rotate(e,t),s.rotate(e,t),a.rotate(e,t)}let y=0,x=256;if(m&&E?f.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),I.push(new _(r,a,s,o,d,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),w&&(!L||this._legible(t.labelAngle)))if(M)C<k&&(k=C),l<T&&(T=l),O>v&&(v=O),h>P&&(P=h);else if(t.minzoom<2){const r={xTile:e.x,yTile:e.y,dxPixels:(C+S)*A-c,dyPixels:(l+S)*A-c,hard:!n.optional,partIndex:1,width:(O-C)*A+2*c,height:(h-l)*A+2*c,angle:u,minLod:t.minzoom,maxLod:t.maxzoom};w.push(r)}}}if(h>=2)return null;if(w&&M){let t,r,s,o;E?(t=-P+S,r=k+D,s=P-T,o=v-k):(t=k+S,r=T+D,s=v-k,o=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*A-c,dyPixels:r*A-c,hard:!n.optional,partIndex:1,width:s*A+2*c,height:o*A+2*c,angle:i,minLod:y,maxLod:a.B1};w.push(l)}const V=new b(I);return w&&w.length>0&&(V.textColliders=w),V}_legible(e){const t=(0,a.Or)(e);return t<65||t>=193}_placeGlyph(e,t,r,n,s,i,o,l,c){let h=i;const u=h<0?(0,a.DQ)(e.angle+a.JJ,a._U):e.angle;let f=0;r<0&&(h*=-1,r*=-1,f=a.JJ),h>0&&++s;let d=new g.E(e.x,e.y),p=n[s],y=a.B1;if(n.length<=s)return y;for(;;){const e=p.x-d.x,i=p.y-d.y,g=Math.sqrt(e*e+i*i),m=Math.max(r/g,t),_=e/g,b=i/g,w=(0,a.DQ)(Math.atan2(b,_)+f,a._U);if(c.push(new x(d,u,w,l,!1,m,y)),o&&c.push(new x(d,u,w,l,!0,m,y)),m<=t)return m;d=p.clone();do{if(s+=h,n.length<=s||s<0)return m;p=n[s]}while(d.isEqual(p));let I=p.x-d.x,M=p.y-d.y;const k=Math.sqrt(I*I+M*M);I*=g/k,M*=g/k,d.x-=I,d.y-=M,y=m}}}var I,M,k=r(45091),v=r(65390);(M=I||(I={}))[M.moveTo=1]="moveTo",M[M.lineTo=2]="lineTo",M[M.close=7]="close";class T{constructor(e,t){this.values={},this._geometry=void 0,this._pbfGeometry=null;const r=t.keys,n=t.values,s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const e=s.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),i=e.getUInt32();t[r[s]]=n[i]}e.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let r,n;this._pbfGeometry=null,e?e.reset(this.type):r=[];let s,i=I.moveTo,a=0,o=0,l=0;for(;!t.empty();){if(0===a){const e=t.getUInt32();i=7&e,a=e>>3}switch(a--,i){case I.moveTo:o+=t.getSInt32(),l+=t.getSInt32(),e?e.moveTo(o,l):r&&(n&&r.push(n),n=[],n.push(new g.E(o,l)));break;case I.lineTo:o+=t.getSInt32(),l+=t.getSInt32(),e?e.lineTo(o,l):n&&n.push(new g.E(o,l));break;case I.close:e?e.close():n&&!n[0].equals(o,l)&&n.push(n[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?s=e.result():r&&(n&&r.push(n),s=r),t.release(),this._geometry=s,s}}var P=r(26084);class L extends P.Z{constructor(){super(12)}add(e,t,r){const n=this.array;n.push(e),n.push(t),n.push(r)}}class A{constructor(e){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(A._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class E extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,a,o,l,c,h,u){const f=this.array;let d=P.Z.i1616to32(e,t);f.push(d);const p=31;d=P.Z.i8888to32(Math.round(p*r),Math.round(p*n),Math.round(p*s),Math.round(p*i)),f.push(d),d=P.Z.i8888to32(Math.round(p*a),Math.round(p*o),Math.round(p*l),Math.round(p*c)),f.push(d),d=P.Z.i1616to32(h,0),f.push(d),u&&f.push(...u)}}class B extends P.Z{constructor(e){super(e)}add(e,t,r){const n=this.array;n.push(P.Z.i1616to32(e,t)),r&&n.push(...r)}}class S extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,a){const o=this.array,l=this.index;let c=P.Z.i1616to32(e,t);return o.push(c),c=P.Z.i8888to32(Math.round(15*r),Math.round(15*n),s,i),o.push(c),a&&o.push(...a),l}}class D extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,o,l,c,h,u,f){const d=this.array;let p=P.Z.i1616to32(e,t);d.push(p),p=P.Z.i1616to32(Math.round(8*r),Math.round(8*n)),d.push(p),p=P.Z.i8888to32(s/4,i/4,l,c),d.push(p),p=P.Z.i8888to32(0,(0,a.Or)(o),10*h,Math.min(10*u,255)),d.push(p),f&&d.push(...f)}}class V extends P.Z{constructor(e){super(e)}add(e,t,r,n,s){const i=this.array,a=P.Z.i1616to32(2*e+r,2*t+n);i.push(a),s&&i.push(...s)}}class C{constructor(e,t,r){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=r,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,r){}}class R extends C{constructor(e,t,r,n,i){super(e,t,r),this.type=s.al.CIRCLE,this._circleVertexBuffer=n,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,r=this._circleIndexBuffer;this._circleIndexStart=3*r.index,this._circleIndexCount=0;const n=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=n.circleMaterial.encodeAttributes(i,s,n);for(const e of a)if(e)for(const n of e){const e=t.index;t.add(n.x,n.y,0,0,o),t.add(n.x,n.y,0,1,o),t.add(n.x,n.y,1,0,o),t.add(n.x,n.y,1,1,o),r.add(e+0,e+1,e+2),r.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._circleIndexStart,t[n++]=this._circleIndexCount,t[n++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)r[n++]=this._circleVertexBuffer.array[e];t[n++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[n++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=r(3894),F=r(95401);class q extends C{constructor(e,t,r,n,i,a,o){super(e,t,r),this.type=s.al.FILL,this._patternMap=new Map,this._fillVertexBuffer=n,this._fillIndexBuffer=i,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,r){const n=this.layer,s=this.zoom,i=n.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,r=this.zoom,{fillMaterial:n,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let c=!o&&t.getPaintValue("fill-antialias",r);if(t.outlineUsesFillColor){if(c&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",r),n=t.getPaintValue("fill-opacity",r+1);e<1&&n<1&&(c=!1)}if(c&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",r),n=t.getPaintValue("fill-color",r+1);e[3]<1&&n[3]<1&&(c=!1)}}const h=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of h){const h=o.getValue(r,l),f=this._spriteInfo[h];if(!f||!f.rect)continue;const d=n.encodeAttributes(l,r,t,f),p=c&&a?s.encodeAttributes(l,r,t):[],g=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:p,page:f.page,geometry:g}),i.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:r,page:n,geometry:s}of i)this._processFeature(s,c,t.outlineUsesFillColor,e,r,u,n)}}else for(const o of h){const l=i?n.encodeAttributes(o,r,t):null,h=c&&a?s.encodeAttributes(o,r,t):null,f=o.getGeometry(e);this._processFeature(f,c,t.outlineUsesFillColor,l,h,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._fillIndexStart,t[n++]=this._fillIndexCount,t[n++]=this._outlineIndexStart,t[n++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[n++]=i,i>0)for(const[e,[r,i]]of s)t[n++]=e,t[n++]=r,t[n++]=i;t[n++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)r[n++]=this._fillVertexBuffer.array[e];t[n++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[n++]=this._fillIndexBuffer.array[e];t[n++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)r[n++]=this._outlineVertexBuffer.array[e];t[n++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[n++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r,n,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!r||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let c;for(let t=0;t<o;t++){const r=q._area(e[t]);r>32?(void 0!==c&&this._processFill(e,c,n,i,a),c=[t]):r<-32&&void 0!==c&&c.push(t)}void 0!==c&&this._processFill(e,c,n,i,a)}_processOutline(e,t){const r=this._outlineVertexBuffer,n=this._outlineIndexBuffer,s=n.index;let i,a,o;const l=new g.E(0,0),c=new g.E(0,0),h=new g.E(0,0);let u=-1,f=-1,d=-1,p=-1,y=-1,m=!1,x=e.length;if(x<2)return;const _=e[0];let b=e[x-1];for(;x&&b.isEqual(_);)--x,b=e[x-1];if(!(x-0<2)){for(let s=0;s<x;++s){0===s?(i=e[x-1],a=e[0],o=e[1],l.assignSub(a,i),l.normalize(),l.rightPerpendicular()):(i=a,a=o,o=s!==x-1?e[s+1]:e[0],l.assign(c));const g=this._isClipEdge(i,a);-1===p&&(m=g),c.assignSub(o,a),c.normalize(),c.rightPerpendicular();const _=l.x*c.y-l.y*c.x;h.assignAdd(l,c),h.normalize();const b=-h.x*-l.x+-h.y*-l.y;let w=Math.abs(0!==b?1/b:1);w>8&&(w=8),_>=0?(d=r.add(a.x,a.y,l.x,l.y,0,1,t),-1===p&&(p=d),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,w*-h.x,w*-h.y,0,-1,t),-1===y&&(y=f),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=f,f=d,d=r.add(a.x,a.y,h.x,h.y,0,1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,c.x,c.y,0,1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d)):(d=r.add(a.x,a.y,w*h.x,w*h.y,0,1,t),-1===p&&(p=d),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,-l.x,-l.y,0,-1,t),-1===y&&(y=f),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=f,f=d,d=r.add(a.x,a.y,-h.x,-h.y,0,-1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=r.add(a.x,a.y,-c.x,-c.y,0,-1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d))}u>=0&&f>=0&&p>=0&&!m&&n.add(u,f,p),u>=0&&p>=0&&y>=0&&!m&&n.add(u,y,p),this._outlineIndexCount+=3*(n.index-s)}}_processFill(e,t,r,n,s){let i;t.length>1&&(i=[]);let a=0;for(const r of t)0!==a&&i.push(a),a+=e[r].length;const o=2*a,l=O.Z.acquire();for(const r of t){const t=e[r],n=t.length;for(let e=0;e<n;++e)l.push(t[e].x,t[e].y)}const c=(0,F.e)(l,i,2);if(F.e.deviation(l,i,2,c)>0){const n=t.map((t=>e[t].length)),{buffer:i,vertexCount:a}=(0,v.b)(l,n);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],r);for(let t=0;t<a;t+=3){const r=e+t;this._fillIndexBuffer.add(r,r+1,r+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=c.length;if(e>0){const t=this._fillVertexBuffer.index;let n=0;for(;n<o;)this._fillVertexBuffer.add(l[n++],l[n++],r);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+c[i++],t+c[i++],t+c[i++]);if(void 0!==s){const t=this._patternMap,r=t.get(s);r?r[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.Z.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const r=e.length-1;for(let n=0;n<r;n++)t+=(e[n].x-e[n+1].x)*(e[n].y+e[n+1].y);return t+=(e[r].x-e[0].x)*(e[r].y+e[0].y),.5*t}}var U=r(67327);class N extends C{constructor(e,t,r,n,i){super(e,t,r),this.type=s.al.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=n,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new U.z(z(this.tessellationProperties),Z(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,r){const n=this.layer,s=this.zoom,i=n.getPaintProperty("line-pattern"),a=n.getPaintProperty("line-dasharray"),o=n.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,c=o?.isDataDriven,h=i?.isDataDriven,u=a?.isDataDriven;if(h||u)for(const e of this._features)t(h?i.getValue(s,e):this._getDashArrayKey(e,s,n,a,c,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(n.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,r=this.zoom,n=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),c=o?.isDataDriven,h=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",r),p=d||0,g=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,m=y?null:t.getLayoutValue("line-join",r);u=t.getLayoutProperty("line-miter-limit");const x=u?.isDataDriven?u:null,_=x?null:t.getLayoutValue("line-miter-limit",r);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,w=b?null:t.getLayoutValue("line-round-limit",r);u=t.getPaintProperty("line-width");const I=u?.isDataDriven?u:null,M=I?null:t.getPaintValue("line-width",r);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,v=k?null:t.getPaintValue("line-offset",r);if(c||h){const i=[];for(const s of n){const n=c?o.getValue(r,s):this._getDashArrayKey(s,r,t,l,g,f,p),h=this._spriteInfo[n];if(!h||!h.rect)continue;const u=a.encodeAttributes(s,r,t,h),T=s.getGeometry(e);i.push({ddAttributes:u,page:h.page,cap:f?f.getValue(r,s):d,join:y?y.getValue(r,s):m,miterLimit:x?x.getValue(r,s):_,roundLimit:b?b.getValue(r,s):w,halfWidth:.5*(I?I.getValue(r,s):M),offset:k?k.getValue(r,s):v,geometry:T})}i.sort(((e,t)=>e.page-t.page)),s.textured=!0;for(const{ddAttributes:e,page:t,cap:r,join:n,miterLimit:a,roundLimit:o,halfWidth:l,offset:c,geometry:h}of i)s.capType=r,s.joinType=n,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=c,this._processFeature(h,e,t)}else{if(o){const e=o.getValue(r),t=this._spriteInfo[e];if(!t||!t.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=m,s.miterLimit=_,s.roundLimit=w,s.halfWidth=.5*M,s.offset=v;for(const o of n){const n=i?a.encodeAttributes(o,r,t):null;f&&(s.capType=f.getValue(r,o)),y&&(s.joinType=y.getValue(r,o)),x&&(s.miterLimit=x.getValue(r,o)),b&&(s.roundLimit=b.getValue(r,o)),I&&(s.halfWidth=.5*I.getValue(r,o)),k&&(s.offset=k.getValue(r,o));const l=o.getGeometry(e);this._processFeature(l,n)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._lineIndexStart,t[n++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[n++]=i,i>0)for(const[e,[r,i]]of s)t[n++]=e,t[n++]=r,t[n++]=i;t[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)r[n++]=this.tessellationProperties._lineVertexBuffer.array[e];t[n++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[n++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r){if(!e)return;const n=e.length;for(let s=0;s<n;s++)this._processGeometry(e[s],t,r)}_processGeometry(e,t,r){if(e.length<2)return;let n,s,i=e[0],a=1;for(;a<e.length;)n=e[a].x-i.x,s=e[a].y-i.y,n*n+s*s<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const c=3*o.index-l;if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=c:e.set(r,[l+this._lineIndexCount,c])}this._lineIndexCount+=c}_getDashArrayKey(e,t,r,n,s,i,a){const o=s?i.getValue(t,e):a,l=n.getValue(t,e);return r.getDashKey(l,o)}}const z=e=>(t,r,n,s,i,a,o,l,c,h,u)=>(e._lineVertexBuffer.add(t,r,o,l,n,s,i,a,c,h,u,e._ddValues),e._lineVertexBuffer.index-1),Z=e=>(t,r,n)=>{e._lineIndexBuffer.add(t,r,n)};var H=r(79087),j=r(19153),G=r(7333);function $(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class W extends C{constructor(e,t,r,n,i,a,o,l){super(e,t,l.getSpriteItems()),this.type=s.al.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=r,this._iconIndexBuffer=n,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,r){const n=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=n.getLayoutProperty("icon-image"),a=n.getLayoutProperty("text-field");let o=n.getLayoutProperty("text-transform"),l=n.getLayoutProperty("text-font");const c=[];let h,u,f,d;i&&!i.isDataDriven&&(h=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=n.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=n.getLayoutValue("text-font",s),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let m,x;i&&(m=i.isDataDriven?i.getValue(s,g):this._replaceKeys(h,g.values),m&&t(m));let _=!1;if(a&&(x=a.isDataDriven?a.getValue(s,g):this._replaceKeys(u,g.values),x)){switch(x=x.replace(/\\n/g,"\n"),o&&(f=o.getValue(s,g)),f){case p._5.LOWERCASE:x=x.toLowerCase();break;case p._5.UPPERCASE:x=x.toUpperCase()}if(W._bidiEngine.hasBidiChar(x)){let e;e="rtl"===W._bidiEngine.checkContextual(x)?"IDNNN":"ICNNN",x=W._bidiEngine.bidiTransform(x,e,"VLYSN"),_=!0}const e=x.length;if(e>0){l&&(d=l.getValue(s,g));for(const t of d){let n=r[t];n||(n=r[t]=new Set);for(let t=0;t<e;t++){const e=x.charCodeAt(t);n.add(e)}}}}if(!m&&!x)continue;const b=n.getLayoutValue("symbol-sort-key",s,g),w={feature:g,sprite:m,label:x,rtl:_,geometry:y,hash:(x?(0,j.hP)(x):0)^(m?(0,j.hP)(m):0),priority:b,textFont:d};c.push(w)}this._symbolFeatures=c}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,r=this.zoom,n=t.getLayoutValue("symbol-placement",r),s=n!==p.R.POINT,i=8*t.getLayoutValue("symbol-spacing",r),o=t.getLayoutProperty("icon-image"),l=t.getLayoutProperty("text-field"),c=o?new G._L(t,r,s):null,h=l?new G.nj(t,r,s):null,u=this._workerTileHandler;let y;o&&(y=u.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const x=[];let _=1;h&&h.size&&(_=h.size/f);const b=h?h.maxAngle*a.DT:0,w=h?8*h.size:0;for(const e of this._symbolFeatures){let t,a;c&&y&&e.sprite&&(t=y[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(r,e.feature);let o=0;const l=e.label;if(l){h.update(r,e.feature);const t=s&&h.rotationAlignment===p.aF.MAP?h.keepUpright:h.writingMode&&h.writingMode.includes(p.r1.VERTICAL);let n=.5;switch(h.anchor){case p.nR.TOP_LEFT:case p.nR.LEFT:case p.nR.BOTTOM_LEFT:n=0;break;case p.nR.TOP_RIGHT:case p.nR.RIGHT:case p.nR.BOTTOM_RIGHT:n=1}let i=.5;switch(h.anchor){case p.nR.TOP_LEFT:case p.nR.TOP:case p.nR.TOP_RIGHT:i=0;break;case p.nR.BOTTOM_LEFT:case p.nR.BOTTOM:case p.nR.BOTTOM_RIGHT:i=1}let c=.5;switch(h.justify){case p.vL.AUTO:c=n;break;case p.vL.LEFT:c=0;break;case p.vL.RIGHT:c=1}const g=h.letterSpacing*f,y=s?0:h.maxWidth*f,m=h.lineHeight*f,x=e.textFont.map((e=>u.getGlyphItems(e)));if(a=new d(x,y,m,g,n,i,c).getShaping(l,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const r of a)e=Math.min(e,r.x),t=Math.max(t,r.x);o=(t-e+48)*_*8}}for(let r of e.geometry){const l=[];if(n===p.R.LINE){if(a&&a.length>0&&h&&h.size){const e=8*h.size*(2+Math.min(2,4*Math.abs(h.offset[1])));r=W._smoothVertices(r,e)}W._pushAnchors(l,r,i,o)}else n===p.R.LINE_CENTER?W._pushCenterAnchor(l,r):e.feature.type===g.V.Polygon?W._pushCentroid(l,r):l.push(new m(r[0].x,r[0].y));for(const n of l){if(n.x<0||n.x>4096||n.y<0||n.y>4096)continue;if(s&&o>0&&h.rotationAlignment===p.aF.MAP&&!W._honorsTextMaxAngle(r,n,o,b,w))continue;const i={shaping:a,line:r,iconMosaicItem:t,anchor:n,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};x.push(i),this._processFeature(i,c,h)}}}x.sort($),this._addPlacedGlyphs(),this._symbolInstances=x}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer),n=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[s++]=this.layerUIDs[e];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[e,[r,n]]of this.markerPageMap)t[s++]=e,t[s++]=r,t[s++]=n;t[s++]=this.glyphsPageMap.size;for(const[e,[r,n]]of this.glyphsPageMap)t[s++]=e,t[s++]=r,t[s++]=n;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=W.serializeSymbols(t,r,n,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)r[s++]=this._iconVertexBuffer.array[e];t[s++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[s++]=this._iconIndexBuffer.array[e];t[s++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)r[s++]=this._textVertexBuffer.array[e];t[s++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[s++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const r of e||[]){t+=4,t+=1;for(const e of r.textColliders)t+=10;for(const e of r.iconColliders)t+=10;t+=1,t+=2*r.textVertexRanges.length,t+=1,t+=2*r.iconVertexRanges.length}return t}static serializeSymbols(e,t,r,n,s){s=s||[],t[n++]=s.length;for(const e of s){t[n++]=e.anchor.x,t[n++]=e.anchor.y,t[n++]=e.symbolFeature.hash,t[n++]=e.symbolFeature.priority,t[n++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[n++]=s.xTile,t[n++]=s.yTile,t[n++]=s.dxPixels,t[n++]=s.dyPixels,t[n++]=s.hard?1:0,t[n++]=s.partIndex,r[n++]=s.minLod,r[n++]=s.maxLod,t[n++]=s.width,t[n++]=s.height;for(const s of e.iconColliders)t[n++]=s.xTile,t[n++]=s.yTile,t[n++]=s.dxPixels,t[n++]=s.dyPixels,t[n++]=s.hard?1:0,t[n++]=s.partIndex,r[n++]=s.minLod,r[n++]=s.maxLod,t[n++]=s.width,t[n++]=s.height;t[n++]=e.textVertexRanges.length;for(const[r,s]of e.textVertexRanges)t[n++]=r,t[n++]=s;t[n++]=e.iconVertexRanges.length;for(const[r,s]of e.iconVertexRanges)t[n++]=r,t[n++]=s}return n}_replaceKeys(e,t){return e.replace(/{([^{}]+)}/g,((e,r)=>r in t?t[r]:""))}_processFeature(e,t,r){const{line:n,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,c=this.layer,h=!!s;let u=!0;h&&(u=t.optional||!s);const f=i&&i.length>0;let d,g,y=!0;if(f&&(y=r.optional),h&&(d=this._placementEngine.getIconPlacement(o,s,t)),(d||u)&&(f&&(g=this._placementEngine.getTextPlacement(o,i,n,r)),g||y)){if(d&&g||(y||u?y||g?u||d||(g=null):d=null:(d=null,g=null)),g){const t=c.hasDataDrivenText?c.textMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._storePlacedGlyphs(e,g.shapes,l,r.rotationAlignment,t),g.textColliders){e.textColliders=g.textColliders;for(const e of g.textColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),n=Math.sin(t),s=e.dxPixels*r-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*r,a=(e.dxPixels+e.width)*r-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*n,c=e.dxPixels*n+(e.dyPixels+e.height)*r,h=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*r,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),g=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=g-p}}}}if(d){const r=c.hasDataDrivenIcon?c.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._addPlacedIcons(e,d.shapes,l,s.page,t.rotationAlignment===p.aF.VIEWPORT,r),d.iconColliders){e.iconColliders=d.iconColliders;for(const e of d.iconColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),n=Math.sin(t),s=e.dxPixels*r-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*r,a=(e.dxPixels+e.width)*r-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*n,c=e.dxPixels*n+(e.dyPixels+e.height)*r,h=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*r,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),g=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=g-p}}}}}}_addPlacedIcons(e,t,r,n,s,i){const o=Math.max(r-1,0),l=this._iconVertexBuffer,c=this._iconIndexBuffer,h=this._markerMap;for(const u of t){const t=s?0:Math.max(r+(0,a.k3)(u.minzoom),o),f=s?25:Math.min(r+(0,a.k3)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,p=u.tr,g=u.bl,y=u.br,m=u.mosaicRect,x=u.labelAngle,_=u.minAngle,b=u.maxAngle,w=u.anchor,I=l.index,M=m.x,k=m.y,v=M+m.width,T=k+m.height,P=l.index;l.add(w.x,w.y,d.x,d.y,M,k,x,_,b,t,f,i),l.add(w.x,w.y,p.x,p.y,v,k,x,_,b,t,f,i),l.add(w.x,w.y,g.x,g.y,M,T,x,_,b,t,f,i),l.add(w.x,w.y,y.x,y.y,v,T,x,_,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),c.add(I+0,I+1,I+2),c.add(I+1,I+2,I+3),h.has(n)?h.get(n)[1]+=6:h.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,r=this._glyphMap;for(const[n,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s+0,s+1,s+2),t.add(s+1,s+2,s+3),r.has(n)?r.get(n)[1]+=6:r.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,r,n,s){const i=Math.max(r-1,0),o=n===p.aF.VIEWPORT;let l,c,h,u,f,d,g,y,m,x,_;for(const n of t)l=o?0:Math.max(r+(0,a.k3)(n.minzoom),i),c=o?25:Math.min(r+(0,a.k3)(n.maxzoom),25),c<=l||(h=n.tl,u=n.tr,f=n.bl,d=n.br,g=n.labelAngle,y=n.minAngle,m=n.maxAngle,x=n.anchor,_=n.mosaicRect,this._glyphBufferDataStorage.has(n.page)||this._glyphBufferDataStorage.set(n.page,[]),this._glyphBufferDataStorage.get(n.page).push({glyphAnchor:[x.x,x.y],tl:[h.x,h.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:g,minAngle:y,maxAngle:m,minLod:l,maxLod:c,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,r,n){r+=n;let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=g.E.distance(t[e],t[e+1]);let o=n||r;if(o*=.5,s<=o)return;const l=o/s;let c=0,h=-(r=s/Math.max(Math.round(s/r),1))/2;const u=t.length-1;for(let n=0;n<u;n++){const s=t[n],i=t[n+1],o=i.x-s.x,u=i.y-s.y,f=Math.sqrt(o*o+u*u);let d;for(;h+r<c+f;){h+=r;const t=(h-c)/f,p=(0,a.sX)(s.x,i.x,t),g=(0,a.sX)(s.y,i.y,t);void 0===d&&(d=Math.atan2(u,o)),e.push(new m(p,g,d,n,l))}c+=f}}static _pushCenterAnchor(e,t){let r=0;const n=t.length-1;for(let e=0;e<n;e++)r+=g.E.distance(t[e],t[e+1]);const s=r/2;let i=0;const o=t.length-1;for(let r=0;r<o;r++){const n=t[r],o=t[r+1],l=o.x-n.x,c=o.y-n.y,h=Math.sqrt(l*l+c*c);if(s<i+h){const t=(s-i)/h,u=(0,a.sX)(n.x,o.x,t),f=(0,a.sX)(n.y,o.y,t),d=Math.atan2(c,l);return void e.push(new m(u,f,d,r,0))}i+=h}}static _deviation(e,t,r){const n=(t.x-e.x)*(r.x-t.x)+(t.y-e.y)*(r.y-t.y),s=(t.x-e.x)*(r.y-t.y)-(t.y-e.y)*(r.x-t.x);return Math.atan2(s,n)}static _honorsTextMaxAngle(e,t,r,n,s){let i=0;const a=r/2;let o=new g.E(t.x,t.y),l=t.segment+1;for(;i>-a;){if(--l,l<0)return!1;i-=g.E.distance(e[l],o),o=e[l]}i+=g.E.distance(e[l],e[l+1]);const c=[];let h=0;const u=e.length;for(;i<a;){const t=e[l];let r,a=l;do{if(++a,a===u)return!1;r=e[a]}while(r.isEqual(t));let o,f=a;do{if(++f,f===u)return!1;o=e[f]}while(o.isEqual(r));const d=this._deviation(t,r,o);for(c.push({deviation:d,distToAnchor:i}),h+=d;i-c[0].distToAnchor>s;)h-=c.shift().deviation;if(Math.abs(h)>n)return!1;i+=g.E.distance(r,o),l=a}return!0}static _smoothVertices(e,t){if(t<=0)return e;let r=e.length;if(r<3)return e;const n=[];let s=0,i=0;n.push(0);for(let t=1;t<r;t++){const r=g.E.distance(e[t],e[t-1]);r>0&&(s+=r,n.push(s),i++,i!==t&&(e[i]=e[t]))}if(r=i+1,r<3)return e;t=Math.min(t,.2*s);const a=e[0].x,o=e[0].y,l=e[r-1].x,c=e[r-1].y,h=g.E.sub(e[0],e[1]);h.normalize(),e[0].x+=t*h.x,e[0].y+=t*h.y,h.assignSub(e[r-1],e[r-2]),h.normalize(),e[r-1].x+=t*h.x,e[r-1].y+=t*h.y,n[0]-=t,n[r-1]+=t;const u=[];u.push(new g.E(a,o));const f=1e-6,d=.5*t;for(let s=1;s<r-1;s++){let i=0,a=0,o=0;for(let r=s-1;r>=0;r--){const l=d+n[r+1]-n[s];if(l<0)break;const c=n[r+1]-n[r],h=n[s]-n[r]<d?1:l/c;if(h<f)break;const u=h*h,p=h*l-.5*u*c,g=h*c/t,y=e[r+1],m=e[r].x-y.x,x=e[r].y-y.y;i+=g/p*(y.x*h*l+.5*u*(l*m-c*y.x)-u*h*c*m/3),a+=g/p*(y.y*h*l+.5*u*(l*x-c*y.y)-u*h*c*x/3),o+=g}for(let l=s+1;l<r;l++){const r=d-n[l-1]+n[s];if(r<0)break;const c=n[l]-n[l-1],h=n[l]-n[s]<d?1:r/c;if(h<f)break;const u=h*h,p=h*r-.5*u*c,g=h*c/t,y=e[l-1],m=e[l].x-y.x,x=e[l].y-y.y;i+=g/p*(y.x*h*r+.5*u*(r*m-c*y.x)-u*h*c*m/3),a+=g/p*(y.y*h*r+.5*u*(r*x-c*y.y)-u*h*c*x/3),o+=g}u.push(new g.E(i/o,a/o))}return u.push(new g.E(l,c)),e[0].x=a,e[0].y=o,e[r-1].x=l,e[r-1].y=c,u}static _pushCentroid(e,t){const r=4096,n=4096,s=t.length-1;let i=0,a=0,o=0,l=t[0].x,c=t[0].y;l>r&&(l=r),l<0&&(l=0),c>n&&(c=n),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,h=t[e].y,u=t[e+1].x,f=t[e+1].y;s>r&&(s=r),s<0&&(s=0),h>n&&(h=n),h<0&&(h=0),u>r&&(u=r),u<0&&(u=0),f>n&&(f=n),f<0&&(f=0);const d=(s-l)*(f-c)-(u-l)*(h-c);i+=d*(l+s+u),a+=d*(c+h+f),o+=d}i/=3*o,a/=3*o,isNaN(i)||isNaN(a)||e.push(new m(i,a))}}W._bidiEngine=new H.Z;var K,Y=r(31294);!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(K||(K={}));class J{constructor(e,t,r,n,s){if(this._pbfTiles={},this._tileClippers={},this._client=r,this._tile=t,s){this._styleLayerUIDs=new Set;for(const e of s)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository.layers;const[i,a,o]=t.tileKey.split("/").map(parseFloat);this._level=i;const l=8+Math.max(5*(this._level-14),0);for(const t of Object.keys(e)){const r=e[t];if(this._pbfTiles[t]=new k.Z(new Uint8Array(r.protobuff),new DataView(r.protobuff)),r.refKey){const[e]=r.refKey.split("/").map(parseFloat),n=i-e;if(n>0){const e=(1<<n)-1,r=a&e,s=o&e;this._tileClippers[t]=new Y.b(n,r,s,8,l)}}this._tileClippers[t]||(this._tileClippers[t]=new Y.I)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,v.j)(),r=this._initialize(e),{returnedBuckets:n}=r;this._processLayers(r),this._linkReferences(r),this._filterFeatures(r);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of n)e.getResources(e.tileClipper,a,o);if(this._tile.status===K.INVALID)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(r.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:r,zoom:n,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:c}=e;for(let e=r.length-1;e>=0;e--){const h=r[e];if(!this._canParseStyleLayer(h.uid)||h.minzoom&&n<Math.floor(h.minzoom)||h.maxzoom&&n>=h.maxzoom||h.type===p.fR.BACKGROUND)continue;if(!t[h.source]||!s[h.source])continue;const u=t[h.source],f=s[h.source],d=h.sourceLayer,g=u[d];if(g){let e=a[h.source];if(e||(e=a[h.source]=new Set),e.add(h.sourceLayer),h.refLayerId)c.set(h.uid,h.refLayerId);else{const e=this._createBucket(h);if(e){e.layerUIDs=[h.uid],e.layerExtent=g.extent,e.tileClipper=f;let t=i[h.source];t||(t=i[h.source]={});let r=t[d];r||(r=t[d]=[]),r.push(e),o.push(e),l[h.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:r}=e;r.forEach(((e,r)=>{t[e]&&t[e].layerUIDs.push(r)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:r,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],c=[];for(const e of Object.keys(i))i[e].forEach((t=>{l.push(t),c.push(e)}));for(let e=0;e<l.length;e++){const i=c[e],h=l[e];if(!r[i]||!s[i])continue;const u=r[i][h],f=s[i][h];if(!f||0===f.length)continue;if((0,n.Hc)(t))return;const d=u.getData();for(;d.nextTag(2);){const e=d.getMessage(),t=new T(e,u);e.release();const r=t.values;if(r){const e=r._minzoom;if(e&&e>=o)continue;const t=r._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,r){const n=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,r),n.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,r),n.push(a))}return n}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const r of Object.keys(e)){const n=e[r],s={};for(;n.next();)switch(n.tag()){case 3:{const e=n.getMessage(),t=new A(e);e.release(),s[t.name]=t;break}default:n.skip()}t[r]=s}return t}_createBucket(e){switch(e.type){case p.fR.BACKGROUND:return null;case p.fR.FILL:return this._createFillBucket(e);case p.fR.LINE:return this._createLineBucket(e);case p.fR.CIRCLE:return this._createCircleBucket(e);case p.fR.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new q(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new L,new S(e.outlineMaterial.getStride()),new L)}_createLineBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new E(e.lineMaterial.getStride()),new L)}_createCircleBucket(e){return new R(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.circleMaterial.getStride()),new L)}_createSymbolBucket(e){const t=this._tile;return new W(e,this._level,new D(e.iconMaterial.getStride()),new L,new D(e.textMaterial.getStride()),new L,t.placementEngine,t.getWorkerTileHandler())}}class X{constructor(e,t,r,n){this.status=K.INITIALIZED,this.placementEngine=new w,this.tileKey=e,this.refKeys=t,this._workerTileHandler=r,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=K.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const r=t&&t.signal;if((0,i.pC)(r)){const e=()=>{r.removeEventListener("abort",e),this.status=K.INVALID};r.addEventListener("abort",e)}let s;const a={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,n.D_)(e))throw e;return{result:a,transferList:[]}}this.status=K.READY;const o=a.bucketsWithData,l=[];for(const e of s)if(e.hasFeatures()){const t=e.serialize();o.push(t)}else l.push(e.layer.uid);const c=[...o];let h=null;return l.length>0&&(h=Uint32Array.from(l),c.push(h.buffer)),a.emptyBuckets=h,{result:a,transferList:c}}setObsolete(){this.status=K.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const r=e.sourceName2DataAndRefKey;return 0===Object.keys(r).length?[]:(this.status=K.MODIFIED,new J(r,this,t.client,this._styleRepository,e.styleLayerUIDs).parse(t))}}var Q=r(51785);class ee{constructor(){this._spriteInfo={},this._glyphInfo={}}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers}async createTileAndParse(e,t){const{key:r}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const r=e.sourceName2DataAndRefKey[t];s[t]=r.refKey}const i=new X(r,s,this,this._styleRepository);try{return await i.parse(e,t)}catch(e){if(i.setObsolete(),i.release(),!(0,n.D_)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const r of e){const e=r.type,n=r.data;switch(e){case s.Fr.PAINTER_CHANGED:t.setPaintProperties(n.layer,n.paint);break;case s.Fr.LAYOUT_CHANGED:t.setLayoutProperties(n.layer,n.layout);break;case s.Fr.LAYER_REMOVED:t.deleteStyleLayer(n.layer);break;case s.Fr.LAYER_CHANGED:t.setStyleLayer(n.layer,n.index);break;case s.Fr.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){this._styleRepository=new Q.Z(e),this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,r){const n=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&n.push(t);return 0===n.length?Promise.resolve():t.invoke("getSprites",n,{signal:r&&r.signal}).then((e=>{for(const t in e){const r=e[t];s[t]=r}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,r,n,s){const i=[];let a=this._glyphInfo[t];return a?r.forEach((e=>{a[e]||i.push(e)})):(a=this._glyphInfo[t]=[],r.forEach((e=>i.push(e)))),0===i.length?Promise.resolve():n.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[98,3172,9880],{99880:(e,t,r)=>{r.d(t,{V:()=>c});var n=r(68773),s=(r(3172),r(20102)),i=r(92604),a=r(17452);const o=i.Z.getLogger("esri.assets");function c(e){if(!n.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(n.Z.assetsPath,e)}},88764:(e,t,r)=>{r.d(t,{q:()=>o});var n,s,i,a={exports:{}};n=a,s=function(){function e(r,n,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,c=n-s+1,u=Math.log(o),l=.5*Math.exp(2*u/3),m=.5*Math.sqrt(u*l*(o-l)/o)*(c-o/2<0?-1:1);e(r,n,Math.max(s,Math.floor(n-c*l/o+m)),Math.min(i,Math.floor(n+(o-c)*l/o+m)),a)}var d=r[n],f=s,h=i;for(t(r,s,n),a(r[i],d)>0&&t(r,s,i);f<h;){for(t(r,f,h),f++,h--;a(r[f],d)<0;)f++;for(;a(r[h],d)>0;)h--}0===a(r[s],d)?t(r,s,h):t(r,++h,i),h<=n&&(s=h+1),n<=h&&(i=h-1)}}function t(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function r(e,t){return e<t?-1:e>t?1:0}return function(t,n,s,i,a){e(t,n,s||0,i||t.length-1,a||r)}},void 0!==(i=s())&&(n.exports=i);const o=a.exports},67900:(e,t,r)=>{r.d(t,{$C:()=>k,En:()=>U,Jo:()=>A,_R:()=>T,c9:()=>C,cM:()=>S,gV:()=>H,hd:()=>u,qE:()=>E,ty:()=>v}),r(80442);var n=r(35454),s=r(70586),i=r(24678),a=r(68441),o=r(8744),c=r(58116);const u=39.37,l=a.sv.radius*Math.PI/200,m=/UNIT\[([^\]]+)\]\]$/i,d=c.Z,f=/UNIT\[([^\]]+)\]/i,h=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),p=(0,n.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),w=e=>e*e,y=e=>e*e*e,g={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:w(.001)},"square-centimeters":{inBaseUnits:w(.01)},"square-decimeters":{inBaseUnits:w(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:w(1e3)},"square-inches":{inBaseUnits:w(.0254)},"square-feet":{inBaseUnits:w(.3048)},"square-yards":{inBaseUnits:w(.9144)},"square-miles":{inBaseUnits:w(1609.344)},"square-us-feet":{inBaseUnits:w(1200/3937)},acres:{inBaseUnits:.0015625*w(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*y(.001)},"cubic-centimeters":{inBaseUnits:1e3*y(.01)},"cubic-decimeters":{inBaseUnits:1e3*y(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*y(1e3)},"cubic-inches":{inBaseUnits:1e3*y(.0254)},"cubic-feet":{inBaseUnits:1e3*y(.3048)},"cubic-yards":{inBaseUnits:1e3*y(.9144)},"cubic-miles":{inBaseUnits:1e3*y(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},b=(()=>{const e={};for(const t in g)for(const r in g[t].units)e[r]=t;return e})();function q(e){const t=b[e];if(!t)throw new Error("unknown type");return t}function x(e,t=null){return t=t||q(e),g[t].baseUnit===e}function U(e,t,r){if(t===r)return e;const n=q(t);if(n!==q(r))throw new Error("incompatible units");const s=x(t,n)?e:function(e,t,r){return e*g[r].units[t].inBaseUnits}(e,t,n);return x(r,n)?s:function(e,t,r){return e/g[r].units[t].inBaseUnits}(s,r,n)}function v(e,t,r){return U(e,t,"meters")/(r*Math.PI/180)}function k(e){return p.fromJSON(e.toLowerCase())||null}function T(e){if((0,s.pC)(e)&&!(0,o.N$)(e))return 1;const t=C(e);return t>1e5?1:t}function S(e){return C(e)>=(0,i.Iu)(e).metersPerDegree?"meters":E(e)}function C(e,t=a.sv.metersPerDegree){return(0,s.Pt)(function(e,t=!1){const r=(0,s.pC)(e)?e.wkid:null,n=(0,s.pC)(e)?e.wkt:null;let i=null;if(r){if((0,o.o$)(r))return a.yr.metersPerDegree;if((0,o.ME)(r))return a.Z1.metersPerDegree;i=d.values[d[r]],!i&&t&&h.has(r)&&(i=l)}else n&&(P(n)?i=O(m.exec(n),i):B(n)&&(i=O(f.exec(n),i)));return i}(e,!0),t)}function O(e,t){return e&&e[1]?M(e[1]):t}function M(e){return parseFloat(e.split(",")[1])}function E(e){const t=(0,s.pC)(e)?e.wkid:null,r=(0,s.pC)(e)?e.wkt:null;let n=null;if(t)n=d.units[d[t]];else if(r){const e=P(r)?m:B(r)?f:null;if(e){const t=e.exec(r);t&&t[1]&&(n=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||!d.units.includes(r)){const t=M(e);r=null;const n=d.values;for(let e=0;e<n.length;++e)if(Math.abs(t-n[e])<1e-7){r=d.units[e];break}}return r}(t[1]))}}return(0,s.pC)(n)?k(n):null}function B(e){return/^GEOCCS/i.test(e)}function P(e){return/^PROJCS/i.test(e)}new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);const I={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},_={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},H=(0,n.w)()(I),A=(0,n.w)()(_);(0,n.w)()({...I,..._})},24678:(e,t,r)=>{r.d(t,{GG:()=>c,HQ:()=>u,Iu:()=>f,VY:()=>l,e8:()=>h,rS:()=>d,wY:()=>m});var n=r(70586),s=r(82971),i=r(68441),a=r(8744);function o(e){return new s.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const c=o(i.sv),u=o(i.yr),l=o(i.Z1),m=new s.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${i.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function d(e){return e&&((0,a.BZ)(e)||e===u)?u:e&&((0,a.V2)(e)||e===l)?l:c}function f(e){return(0,n.pC)(e)&&((0,a.BZ)(e)||e===u)?i.yr:(0,n.pC)(e)&&((0,a.V2)(e)||e===l)?i.Z1:i.sv}function h(e){return(0,a.o$)(e)?i.yr:(0,a.ME)(e)?i.Z1:i.sv}},24470:(e,t,r)=>{r.d(t,{Gv:()=>g,HH:()=>u,SO:()=>m,Ue:()=>i,al:()=>o,cS:()=>p,fS:()=>y,jE:()=>d,jn:()=>l,kK:()=>f,oJ:()=>c,r3:()=>h}),r(80442),r(22021);var n=r(70586),s=r(6570);function i(e=b){return[e[0],e[1],e[2],e[3]]}function a(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function o(e,t,r,n,s=i()){return s[0]=e,s[1]=t,s[2]=r,s[3]=n,s}function c(e,t=i()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function u(e,t){return new s.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function l(e,t,r){if((0,n.Wi)(t))a(r,e);else if("length"in t)w(t)?(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[0]),r[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(e[0],t.xmin),r[1]=Math.min(e[1],t.ymin),r[2]=Math.max(e[2],t.xmax),r[3]=Math.max(e[3],t.ymax);break;case"point":r[0]=Math.min(e[0],t.x),r[1]=Math.min(e[1],t.y),r[2]=Math.max(e[2],t.x),r[3]=Math.max(e[3],t.y)}}function m(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function d(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function f(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function h(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function p(e){return e?a(e,g):i(g)}function w(e){return null!=e&&4===e.length}function y(e,t){return w(e)&&w(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const g=[1/0,1/0,-1/0,-1/0],b=[0,0,0,0]},61787:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(80442),s=r(70586),i=r(24133),a=r(66459);class o{async createIndex(e,t){const r=new Array;if(!e.vertexAttributes||!e.vertexAttributes.position)return new i.Q;const n=this._createMeshData(e),a=(0,s.pC)(t)?await t.invoke("createIndexThread",n,{transferList:r}):this.createIndexThread(n).result;return this._createPooledRBush().fromJSON(a)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let n=0;for(let e=0;e<t.length;e+=9)r[n++]=c(t,e+0,e+3,e+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let n=0;for(const e of r)n+=e.length/3;const s=new Array(n);let i=0;for(const e of r)for(let r=0;r<e.length;r+=3)s[i++]=c(t,3*e[r+0],3*e[r+1],3*e[r+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const t=(e.transform?(0,a.I5)({position:e.vertexAttributes.position,normal:null,tangent:null},e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:t}:{position:t,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new i.Q(9,(0,n.Z)("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function c(e,t,r,n){return{minX:Math.min(e[t+0],e[r+0],e[n+0]),maxX:Math.max(e[t+0],e[r+0],e[n+0]),minY:Math.min(e[t+1],e[r+1],e[n+1]),maxY:Math.max(e[t+1],e[r+1],e[n+1]),p0:[e[t+0],e[t+1],e[t+2]],p1:[e[r+0],e[r+1],e[r+2]],p2:[e[n+0],e[n+1],e[n+2]]}}},69285:(e,t,r)=>{r.d(t,{k:()=>a});var n=r(70586),s=r(67900),i=r(8744);function a(e,t,r){if((0,n.Wi)(t)||(0,n.Wi)(r)||r.vcsWkid||(0,i.fS)(t,r))return null;const a=(0,s._R)(t)/(0,s._R)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},19745:(e,t,r)=>{r.d(t,{P:()=>a,a:()=>i});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function i(e){const t=e?.match(n);if(!t)return null;const[,r,i,a]=t;if(!r)return null;let o=null,c=null,u=null;const{devext:l,qaext:m,www:d}=s;if(i)if(o=r,a)switch(a.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:u}=l);break;case"qa":({customBaseUrl:c,portalHostname:u}=m);break;default:return null}else({customBaseUrl:c,portalHostname:u}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:u}=l);break;case"qaext":({customBaseUrl:c,portalHostname:u}=m);break;case"www":({customBaseUrl:c,portalHostname:u}=d);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:u,urlKey:o}}function a(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(68773),s=r(40330),i=r(20102),a=r(80442),o=r(22974),c=r(70586),u=r(95330),l=r(17452),m=r(19745),d=r(71058),f=r(85958);async function h(e,t){const o=(0,l.HK)(e),m=(0,l.jc)(e);m||o||(e=(0,l.Fv)(e));const g={url:e,requestOptions:{...(0,c.Wg)(t)}};let b=(0,l.oh)(e);if(b){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=k("request:interceptor",e,t)}if((n instanceof Error||n instanceof i.Z)&&(r=k("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(b,g);if(null!=e)return{data:e,getHeader:x,requestOptions:g.requestOptions,url:g.url};b.after||b.error||(b=null)}if(e=g.url,"image"===(t=g.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw k("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g)}else if(o)throw k("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),g);if("head"===t.method){if(t.body)throw k("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(o||m)throw k("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const q=new AbortController;(0,u.fu)(t,(()=>q.abort()));const U={controller:q,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:b,params:g,redoRequest:!1,useIdentity:w.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},v=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,a=r.body;let o=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:r.cacheBust&&!h._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:w.priority,redirect:"follow",signal:i},(o||c)&&(e.fetchOptions.body=o||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||o?.get("token")),!e.hasToken&&n.Z.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!S(t)&&!(0,u.Hc)(i)){let n;"immediate"===r.authMode?(await T(),n=await s.id.getCredential(t,{signal:i}),e.credential=n):"no-prompt"===r.authMode?(await T(),n=await s.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=n):s.id&&(n=s.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await C(e)}while(!await M(e,t,r))}catch(r){const n=k("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.kl)(i)){const e=(0,l.P$)(i,!0);e&&w.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,f.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&s.id){const e=s.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,a.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):x,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(U);return b?.after?.(v),v}let p;const w=n.Z.request,y="FormData"in globalThis,g=[499,498,403,401],b=["COM_0056","COM_0057","SB_0008"],q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],x=()=>null,U=Symbol();function v(e){const t=(0,l.P$)(e);return!t||t.endsWith(".arcgis.com")||h._corsServers.includes(t)||(0,l.kl)(t)}function k(e,t,r,n){let s="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:x,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,i=t.message;i&&(s=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=U in t?t[U]:t}return(0,u.D_)(t)?(0,u.zE)():new i.Z(e,s,a)}async function T(){s.id||await Promise.all([r.e(6261),r.e(1400),r.e(1761)]).then(r.bind(r,55142))}function S(e){return q.some((t=>t.test(e)))}async function C(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},i=(0,l.jc)(t)||(0,l.HK)(t),o=r.responseType||"json",c=i?0:null!=r.timeout?r.timeout:w.timeout;let d=!1;if(!i){e.useSSL&&(t=(0,l.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,l.ZN)(t,"request.preventCache",Date.now()));let i={...r.query};e.credentialToken&&(i.token=e.credentialToken);let o=(0,l.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const c=t.length+1+o.length;let u;d="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||c>w.maxUrlLength;const h=r.useProxy||!!(0,l.ed)(t);if(h){const e=(0,l.b7)(t);u=e.path,!d&&u.length+1+c>w.maxUrlLength&&(d=!0),e.query&&(i={...e.query,...i})}if("HEAD"===n.method&&(d||h)){if(d){if(c>w.maxUrlLength)throw k("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw k("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw k("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.fl)(t,i):(n.body=(0,l.B7)(i),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.fl)(t,i),h&&(e.useProxy=!0,t=`${u}?${t}`),i.token&&y&&n.body instanceof FormData&&!(0,m.P)(t)&&n.body.set("token",i.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.D6)(t,(0,l.TI)()))if((0,l.kl)(t))e.withCredentials=!0;else if(s.id){const r=s.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,f.jH)(t)&&await(0,f.jz)(d?(0,l.fl)(t,i):t))}let p,g,b=0,q=!1;c>0&&(b=setTimeout((()=>{q=!0,e.controller.abort()}),c));try{if("native-request-init"===r.responseType)g=n,g.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||d||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!i&&!e.useProxy&&w.proxyUrl&&!v(t)){if(p=await h._abortableFetch(t,n),e.useProxy||function(e){const t=(0,l.P$)(e);t&&!h._corsServers.includes(t)&&h._corsServers.push(t)}(t),"native"===r.responseType)g=p;else if("HEAD"!==n.method)if(p.ok){switch(o){case"array-buffer":g=await p.arrayBuffer();break;case"blob":case"image":g=await p.blob();break;default:g=await p.text()}if(b&&(clearTimeout(b),b=0),"json"===o||"xml"===o||"document"===o)if(g)switch(o){case"json":g=JSON.parse(g);break;case"xml":g=O(g,"application/xml");break;case"document":g=O(g,"text/html")}else g=null;if(g){if("array-buffer"===o||"blob"===o){const e=p.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===o&&g instanceof Blob&&(g=await E(URL.createObjectURL(g),e,!0))}}else g=await p.text()}else g=await E(t,e)}catch(n){if("AbortError"===n.name){if(q)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!p&&n instanceof TypeError&&w.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||v(t))throw n;e.redoRequest=!0,(0,l.tD)({proxyUrl:w.proxyUrl,urlPrefix:(0,l.P$)(t)??""})}finally{b&&clearTimeout(b)}return[p,g]}function O(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function M(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let i,a;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[U]=r,i;r&&(r.error?i=r.error:"error"===r.status&&Array.isArray(r.messages)&&(i={...r},i[U]=r,i.details=r.messages));let o,c=null;i&&(a=Number(i.code),c=i.hasOwnProperty("subcode")?Number(i.subcode):null,o=i.messageCode,o=o&&o.toUpperCase());const u=n.authMode;if(403===a&&(4===c||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&g.includes(a)&&!S(e.params.url)&&(403!==a||o&&!b.includes(o)&&(null==c||2===c&&e.credentialToken))){await T();try{const t=await s.id.getCredential(e.params.url,{error:k("request:server",i,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function E(e,t,r=!1){const n=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=w.priority,s.src=e,(0,f.fY)(s,e,r,n)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>l,fY:()=>c,jH:()=>m,jz:()=>d});var n=r(68773),s=r(80442),i=r(70586),a=r(95330),o=r(17452);function c(e,t,r=!1,n){return new Promise(((o,c)=>{if((0,a.Hc)(n))return void c(u());let l=()=>{f(),c(new Error(`Unable to load ${t}`))},m=()=>{const t=e;f(),o(t)},d=()=>{if(!e)return;const t=e;f(),t.src="",c(u())};const f=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",m)),l=null,m=null,e=null,(0,i.pC)(n)&&n.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};(0,i.pC)(n)&&n.addEventListener("abort",d),(0,s.Z)("esri-image-decode")?e.decode().then(m,l):(e.addEventListener("error",l),e.addEventListener("load",m))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function l(e){n.Z.request.crossOriginNoCorsDomains||(n.Z.request.crossOriginNoCorsDomains={});const t=n.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,o.P$)(r)??""]=0:(t[(0,o.P$)("http://"+r)??""]=0,t[(0,o.P$)("https://"+r)??""]=0)}function m(e){const t=n.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,o.P$)(e);if(r)return r=r.toLowerCase(),!(0,o.D6)(r,(0,o.TI)())&&t[r]<Date.now()-36e5}return!1}async function d(e){const t=n.Z.request.crossOriginNoCorsDomains,r=(0,o.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const s=(0,o.mN)(e);e=s.path,"json"===s.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9777,3172,9880],{99880:(e,t,s)=>{s.d(t,{V:()=>l});var i=s(68773),r=(s(3172),s(20102)),n=s(92604),a=s(17452);const o=n.Z.getLogger("esri.assets");function l(e){if(!i.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new r.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(i.Z.assetsPath,e)}},74669:(e,t,s)=>{s.d(t,{Z:()=>r});var i=s(69801);class r{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},24470:(e,t,s)=>{s.d(t,{Gv:()=>x,HH:()=>u,SO:()=>h,Ue:()=>n,al:()=>o,cS:()=>p,fS:()=>y,jE:()=>d,jn:()=>c,kK:()=>f,oJ:()=>l,r3:()=>m}),s(80442),s(22021);var i=s(70586),r=s(6570);function n(e=w){return[e[0],e[1],e[2],e[3]]}function a(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function o(e,t,s,i,r=n()){return r[0]=e,r[1]=t,r[2]=s,r[3]=i,r}function l(e,t=n()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function u(e,t){return new r.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function c(e,t,s){if((0,i.Wi)(t))a(s,e);else if("length"in t)g(t)?(s[0]=Math.min(e[0],t[0]),s[1]=Math.min(e[1],t[1]),s[2]=Math.max(e[2],t[2]),s[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(s[0]=Math.min(e[0],t[0]),s[1]=Math.min(e[1],t[1]),s[2]=Math.max(e[2],t[0]),s[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":s[0]=Math.min(e[0],t.xmin),s[1]=Math.min(e[1],t.ymin),s[2]=Math.max(e[2],t.xmax),s[3]=Math.max(e[3],t.ymax);break;case"point":s[0]=Math.min(e[0],t.x),s[1]=Math.min(e[1],t.y),s[2]=Math.max(e[2],t.x),s[3]=Math.max(e[3],t.y)}}function h(e){return function(e){return(0,i.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function d(e,t,s){return t>=e[0]&&s>=e[1]&&t<=e[2]&&s<=e[3]}function f(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function m(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function p(e){return e?a(e,x):n(x)}function g(e){return null!=e&&4===e.length}function y(e,t){return g(e)&&g(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const x=[1/0,1/0,-1/0,-1/0],w=[0,0,0,0]},69285:(e,t,s)=>{s.d(t,{k:()=>a});var i=s(70586),r=s(67900),n=s(8744);function a(e,t,s){if((0,i.Wi)(t)||(0,i.Wi)(s)||s.vcsWkid||(0,n.fS)(t,s))return null;const a=(0,r._R)(t)/(0,r._R)(s);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},26993:(e,t,s)=>{s.d(t,{y:()=>w,r:()=>m});var i=s(70586),r=s(35308),n=s(49600),a=s(82397),o=s(8744),l=s(62432),u=s(24452);class c{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,l.hr)(t),r=this.fieldsIndex.get(i),n=r?null:(0,l.Jc)(i,s),a=r?r.name:(0,l.nu)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=(0,l.Jc)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getDataValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2&&(r=`${(0,u.wk)(r)}${t.fieldDelimiter}${(0,u.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,u.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)),s&&Number.isFinite(r)){const n="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,u.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s,i){const r={attributes:this.featureAdapter.getAttributes(e),layer:{fields:this.fieldsIndex.fields}},n=i.createExecContext(r,s);return i.executeFunction(t,n)}getExpressionValues(e,t,s,i){const r={fields:this.fieldsIndex.fields};return e.map((e=>{const n={attributes:this.featureAdapter.getAttributes(e),layer:r},a=i.createExecContext(n,s);return i.executeFunction(t,a)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,i.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const r=`${(t||["*"]).join(",")}=${s.join(",")}`;let n=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++n),n>1?null:e}}var h=s(37427);function d(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function f(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var m,p,g=s(11490),y=s(35671),x=s(59266);class w{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new c(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;return e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry&&((0,o.JY)(this.query.outSR)&&!(0,o.fS)(this.query.geometry.spatialReference,this.query.outSR)?e.queryGeometry=(0,g.S2)({spatialReference:this.query.outSR,...(0,h.iV)(this.query.geometry,this.query.geometry.spatialReference,this.query.outSR)}):e.queryGeometry=(0,g.S2)({spatialReference:this.query.outSR,...this.query.geometry})),e}createSnappingResponse(e,t){const s=this.featureAdapter,r=b(this.hasZ,this.hasM),{point:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=null!=n.z,h=null!=n.m,p=this._getPointCreator(n,c,h,this.spatialReference,t),g=new S(null,0),y=new S(null,0),x={x:0,y:0,z:0};for(const t of this.items){const c=s.getGeometry(t);if((0,i.Wi)(c))continue;const{coords:h,lengths:w}=c;if(g.coords=h,y.coords=h,e.types&m.EDGE){let e=0;for(let i=0;i<w.length;i++){const u=w[i];for(let i=0;i<u;i++,e+=r){const c=g;if(c.coordsIndex=e,i!==u-1){const i=y;i.coordsIndex=e+r;const u=x;v(x,n,c,i);const h=(n.x-u.x)/a,d=(n.y-u.y)/o,m=h*h+d*d;m<=1&&l.candidates.push(f(s.getObjectId(t),p(u),Math.sqrt(m),p(c),p(i)))}}}}if(e.types&m.VERTEX){const e=u?h.length-r:h.length;for(let i=0;i<e;i+=r){const e=g;e.coordsIndex=i;const r=(n.x-e.x)/a,u=(n.y-e.y)/o,c=r*r+u*u;c<=1&&l.candidates.push(d(s.getObjectId(t),p(e),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s,r,n){const a=(0,i.pC)(n)&&!(0,o.fS)(r,n)?e=>(0,h.iV)(e,r,n):e=>e,{hasZ:l}=this,u=e.m;return t&&s?l?({x:e,y:t,z:s})=>a({x:e,y:t,z:s,m:u}):({x:e,y:t})=>a({x:e,y:t,z:0,m:u}):t?l?({x:e,y:t,z:s})=>a({x:e,y:t,z:s}):({x:e,y:t})=>a({x:e,y:t,z:0}):s?({x:e,y:t})=>a({x:e,y:t,m:u}):({x:e,y:t})=>a({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l}=e,c=this.fieldsIndex.isDateField(t),h=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l}),d=(0,u.S5)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),f=this.fieldsIndex.get(t),m={value:.5,fieldType:f?.type},p=(0,y.qN)(f)?(0,u.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,u.i5)({values:h,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:d,percentileParams:m});return(0,u.F_)(p,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n}=e,a=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n}),o=(0,u.eT)(a);return(0,u.Qm)(o,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numClasses:h,scale:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:d}),m=(0,u.G2)(f,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numClasses:h});return(0,u.DL)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numBins:h,scale:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:d});return(0,u.oF)(f,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,u.Lq)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:h,resultOffset:d,returnZ:f,returnM:m}=e,p=null!=h&&t.length>(d||0)+h,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:y,geometryType:s,hasM:i&&m,hasZ:r&&f,objectIdFieldName:n,spatialReference:(0,g.S2)(u||o),transform:c&&(0,a.vY)(c)||null}}_createFeatures(e,t){const s=new c(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:f,returnZ:m=!1,returnM:p=!1}=e,y=r&&m,x=i&&p;let w=[],v=0;const b=[...t];if(this._sortFeatures(b,n,((e,t,i)=>s.getFieldValue(e,t,i))),l||u){const e=(0,a.vY)(o);if(l&&!u)for(const t of b)w[v++]={attributes:s.getAttributes(t),geometry:(0,g.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,y,x)};else if(!l&&u)for(const t of b)w[v++]={attributes:s.getAttributes(t),centroid:(0,g.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of b)w[v++]={attributes:s.getAttributes(t),centroid:(0,g.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,g.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,y,x)}}else for(const e of b){const t=s.getAttributes(e);t&&(w[v++]={attributes:t})}const S=d||0;if(null!=f){const e=S+f;w=w.slice(S,Math.min(w.length,e))}return w}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,r=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>r)t=!0;else{const e=b(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const r=s.getGeometry(t);return e+((0,i.pC)(r)&&r.coords.length||0)}),0)/e>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new c(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:h,orderByFields:d}=e,f=u&&u.length,m=!!f,p=m&&u[0],g=m&&!this.fieldsIndex.get(p);for(const e of l){const{outStatisticFieldName:l,statisticType:c}=e,d=e,y="exceedslimit"!==c?e.onStatisticField:void 0,x="percentile_disc"===c||"percentile_cont"===c,w="EnvelopeAggregate"===c||"CentroidAggregate"===c||"ConvexHullAggregate"===c,v=m&&1===f&&(y===p||g)&&"count"===c;if(m){if(!n.has(y)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(y,this._calculateUniqueValues(e,!w&&o.returnDistinctValues))}const e=n.get(y);for(const t in e){const{count:s,data:r,items:n,itemPositions:c}=e[t],f=r.join(",");if(!h||o.validateItems(n,h)){const e=a.get(f)||{attributes:{}};if(w){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(d,n);e.aggregateGeometries[s]=t}else{let t=null;if(v)t=s;else{const e=this._getAttributeValues(o,y,i),s=c.map((t=>e[t]));t=x&&"statisticParameters"in d?this._getPercentileValue(d,s):this._getStatisticValue(d,s,null,o.returnDistinctValues)}e.attributes[l]=t}let t=0;u.forEach(((s,i)=>e.attributes[this.fieldsIndex.get(s)?s:"EXPR_"+ ++t]=r[i])),a.set(f,e)}}}else if(w){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(d,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,y,i);t.attributes[l]=x&&"statisticParameters"in d?this._getPercentileValue(d,e):this._getStatisticValue(d,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const y=m?Array.from(a.values()):[t];return this._sortFeatures(y,d,((e,t)=>e.attributes[t])),{fields:s,features:y}}async _getAggregateGeometry(e,t){const i=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:a,outStatisticFieldName:o}=e,{featureAdapter:l,spatialReference:u,geometryType:c,hasZ:h,hasM:d}=this,f=t.map((e=>(0,g.Op)(c,h,d,l.getGeometry(e)))),m=i.convexHull(u,f,!0)[0],p={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===a){const e=m?(0,n._w)(m):(0,n.aO)(i.union(u,f));p.aggregateGeometries={...e,spatialReference:u},p.outStatisticFieldName=o||"extent"}else if("CentroidAggregate"===a){const e=m?(0,r.tO)(m):(0,r.$G)((0,n.aO)(i.union(u,f)));p.aggregateGeometries={x:e[0],y:e[1],spatialReference:u},p.outStatisticFieldName=o||"centroid"}else"ConvexHullAggregate"===a&&(p.aggregateGeometries=m,p.outStatisticFieldName=o||"convexHull");return p}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,y.qN)(this.fieldsIndex.get(r))?(0,u.H0)({values:t,returnDistinct:i}):(0,u.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,u.XL)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeDataValues(e,t){return this.items.map((s=>e.getDataValue(s,{field:t.field,field2:t.field2,field3:t.field3,fieldDelimiter:t.fieldDelimiter,normalizationField:t.normalizationField,normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,x.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return e.getExpressionValues(this.items,r,n,i)}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e){const t=new c(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,field:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:o}=e,l=s?{viewingMode:"map",scale:o,spatialReference:this.query.outSR||this.spatialReference}:null;return s?this._getAttributeExpressionValues(t,s,l):this._getAttributeDataValues(t,{field:i,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:r,normalizationType:n,normalizationTotal:a})}}function v(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=r*r+n*n,o=(t.x-s.x)*r+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+r*l,e.y=s.y+n*l}function b(e,t){return e?t?4:3:t?3:2}(p=m||(m={}))[p.NONE=0]="NONE",p[p.EDGE=1]="EDGE",p[p.VERTEX=2]="VERTEX";class S{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}},62432:(e,t,s)=>{s.d(t,{nu:()=>p,hr:()=>m,Jc:()=>d,G3:()=>g,Of:()=>f,z4:()=>h,hO:()=>c});var i=s(20102),r=s(74669),n=s(41534);const a=new class{constructor(e,t){this._cache=new r.Z(e),this._invalidCache=new r.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=n.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),o="feature-store:unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function c(e,t){if(!t)return!0;const s=a.get(t,e);if(!s)throw new i.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(o,"where clause is not standard",{where:t});return f(e,s.fieldNames,"where clause contains missing fields"),!0}function h(e,t,s){if(!t)return!0;const r=a.get(t,e);if(!r)throw new i.Z(o,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(o,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(f(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(o,"expressions in having should also exist in outStatistics",{having:t});return!0}function d(e,t){return e?a.get(e,t):null}function f(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=m(s);try{const s=d(t,e);if(!s)throw new i.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(o,"expression is not standard",{clause:s});f(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(o,s,{missingFields:n})}function m(e){return e.split(l)[0]}function p(e){return e.split(l)[1]}function g(e,t){const s=t.get(e);return!!s&&!u.has(s.type)}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>y});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)?e.geometry.spatialReference:null)).filter(i.pC):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(s)||(0,a.fS)(t,s))return e;if((0,o.Q8)(t,s)){const t=(0,a.sS)(s)?f(e):m(e);return t.spatialReference=s,t}return(0,r.oj)(n.N,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,s){return g.push(e,t,s)}},11490:(e,t,s)=>{s.d(t,{EG:()=>v,Op:()=>b,S2:()=>F,Up:()=>S,j6:()=>T,vF:()=>p});var i=s(35454),r=s(70586),n=s(67900),a=s(44547),o=s(49600),l=s(33955),u=s(51806),c=s(8744),h=s(98732),d=s(5428),f=s(37427);const m=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),g=new d.Z,y=new d.Z,x=new d.Z,w={esriGeometryPoint:h.fQ,esriGeometryPolyline:h.J6,esriGeometryPolygon:h.eG,esriGeometryMultipoint:h.Iv};function v(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,h.Nh)(x,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,h.fQ)(r,a,o)}return(0,h.fQ)(t,a,o)}function b(e,t,s,i,n,a,o=t,l=s){const u=t&&o,c=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,h.zj)(y,d,t,s,e,n,o,l);return a&&(i=(0,h.Nh)(x,i,u,c,e,a)),w[e]?.(i,u,c)??null}if(a){const i=(0,h.Nh)(x,d,t,s,e,a,o,l);return w[e]?.(i,u,c)??null}return(0,h.hY)(g,d,t,s,o,l),w[e]?.(g,u,c)??null}async function S(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),T(e,t,s)}async function T(e,t,i){if(!e)return null;let{where:a}=e;if(e.where=a=a&&a.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{distance:t,units:i}=e,r=e.geometry;if(null==t||"vertexAttributes"in r)return r;const a=r.spatialReference,o=i?m.fromJSON(i):(0,n.qE)(a),l=a&&((0,c.sT)(a)||(0,c.sS)(a))?r:await(0,f._W)(a,c.Zn).then((()=>(0,f.iV)(r,c.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,o.aO)(h),h.spatialReference=t}if(h){await(0,f._W)(h.spatialReference,i),h=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(h,i);const t=(await(0,u.aX)((0,l.im)(h)))[0];if((0,r.Wi)(t))throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=s&&_(h,i)?{densificationStep:8*s}:void 0,a=t.toJSON(),o=await(0,f.iV)(a,a.spatialReference,i,n);if(!o)throw p;o.spatialReference=i,e.geometry=o}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.YX)(e)||(0,l.oU)(e)||(0,l.l9)(e))&&!(0,c.fS)(s,t)&&!(0,a.Up)(s,t)}function F(e){return e&&I in e?JSON.parse(JSON.stringify(e,M)):e}const I="_geVersion",M=(e,t)=>e!==I?t:void 0},3172:(e,t,s)=>{s.r(t),s.d(t,{default:()=>f});var i=s(68773),r=s(40330),n=s(20102),a=s(80442),o=s(22974),l=s(70586),u=s(95330),c=s(17452),h=s(71058),d=s(85958);async function f(e,t){const o=(0,c.HK)(e),y=(0,c.jc)(e);y||o||(e=(0,c.Fv)(e));const x={url:e,requestOptions:{...(0,l.Wg)(t)}};let w=(0,c.oh)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,i;try{i=await e.before(t)}catch(e){s=T("request:interceptor",e,t)}if((i instanceof Error||i instanceof n.Z)&&(s=T("request:interceptor",i,t)),s)throw e.error&&e.error(s),s;return i}}(w,x);if(null!=e)return{data:e,getHeader:v,requestOptions:x.requestOptions,url:x.url};w.after||w.error||(w=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw T("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x)}else if(o)throw T("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),x);if("head"===t.method){if(t.body)throw T("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||y)throw T("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?m||(m=await s.e(9884).then(s.bind(s,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),m)return m.execute(e,t);const b=new AbortController;(0,u.fu)(t,(()=>b.abort()));const S={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:w,params:x,redoRequest:!1,useIdentity:p.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},M=await async function(e){let t,s;await async function(e){const t=e.params.url,s=e.params.requestOptions,n=e.controller.signal,a=s.body;let o=null,l=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:s.cacheBust&&!f._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:s.headers||{},method:"head"===s.method?"HEAD":"GET",mode:"cors",priority:p.priority,redirect:"follow",signal:n},(o||l)&&(e.fetchOptions.body=o||l),"anonymous"===s.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||s.query?.token||o?.get("token")),!e.hasToken&&i.Z.apiKey&&(0,h.r)(t)&&(s.query||(s.query={}),s.query.token=i.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!F(t)&&!(0,u.Hc)(n)){let i;"immediate"===s.authMode?(await _(),i=await r.id.getCredential(t,{signal:n}),e.credential=i):"no-prompt"===s.authMode?(await _(),i=await r.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=i):r.id&&(i=r.id.findCredential(t)),i&&(e.credentialToken=i.token,e.useSSL=!!i.ssl)}}(e);try{do{[t,s]=await I(e)}while(!await C(e,t,s))}catch(s){const i=T("request:server",s,e.params,t);throw i.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(i),i}const n=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&p.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(s.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&r.id){const e=r.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=r.id.findCredential(t,a.userId);e&&-1===r.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:s,getHeader:t?e=>t?.headers.get(e):v,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(S);return w?.after?.(M),M}let m;const p=i.Z.request,g="FormData"in globalThis,y=[499,498,403,401],x=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],v=()=>null,b=Symbol();function S(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function T(e,t,s,i){let r="Error";const a={url:s.url,requestOptions:s.requestOptions,getHeader:v,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=s.url,t.details.requestOptions=s.requestOptions):t.details=a,t;if(t){const e=i&&(e=>i.headers.get(e)),s=i&&i.status,n=t.message;n&&(r=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=b in t?t[b]:t}return(0,u.D_)(t)?(0,u.zE)():new n.Z(e,r,a)}async function _(){r.id||await Promise.all([s.e(6261),s.e(1400),s.e(1761)]).then(s.bind(s,55142))}function F(e){return w.some((t=>t.test(e)))}async function I(e){let t=e.params.url;const s=e.params.requestOptions,i=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),o=s.responseType||"json",l=n?0:null!=s.timeout?s.timeout:p.timeout;let h=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),s.cacheBust&&"default"===i.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...s.query};e.credentialToken&&(n.token=e.credentialToken);let o=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let u;h="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||l>p.maxUrlLength;const f=s.useProxy||!!(0,c.ed)(t);if(f){const e=(0,c.b7)(t);u=e.path,!h&&u.length+1+l>p.maxUrlLength&&(h=!0),e.query&&(n={...e.query,...n})}if("HEAD"===i.method&&(h||f)){if(h){if(l>p.maxUrlLength)throw T("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw T("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw T("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(h?(i.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?t=(0,c.fl)(t,n):(i.body=(0,c.B7)(n),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),f&&(e.useProxy=!0,t=`${u}?${t}`),n.token&&g&&i.body instanceof FormData&&!/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(t)&&i.body.set("token",n.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(r.id){const s=r.id.findServerInfo(t);s&&s.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(h?(0,c.fl)(t,n):t))}let m,y,x=0,w=!1;l>0&&(x=setTimeout((()=>{w=!0,e.controller.abort()}),l));try{if("native-request-init"===s.responseType)y=i,y.url=t;else if("image"!==s.responseType||"default"!==i.cache||"GET"!==i.method||h||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(s.headers)||!n&&!e.useProxy&&p.proxyUrl&&!S(t)){if(m=await f._abortableFetch(t,i),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===s.responseType)y=m;else if("HEAD"!==i.method)if(m.ok){switch(o){case"array-buffer":y=await m.arrayBuffer();break;case"blob":case"image":y=await m.blob();break;default:y=await m.text()}if(x&&(clearTimeout(x),x=0),"json"===o||"xml"===o||"document"===o)if(y)switch(o){case"json":y=JSON.parse(y);break;case"xml":y=M(y,"application/xml");break;case"document":y=M(y,"text/html")}else y=null;if(y){if("array-buffer"===o||"blob"===o){const e=m.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===o&&y instanceof Blob&&(y=await q(URL.createObjectURL(y),e,!0))}}else y=await m.text()}else y=await q(t,e)}catch(i){if("AbortError"===i.name){if(w)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!m&&i instanceof TypeError&&p.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||S(t))throw i;e.redoRequest=!0,(0,c.tD)({proxyUrl:p.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{x&&clearTimeout(x)}return[m,y]}function M(e,t){let s;try{s=(new DOMParser).parseFromString(e,t)}catch{}if(!s||s.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return s}async function C(e,t,s){if(e.redoRequest)return e.redoRequest=!1,!1;const i=e.params.requestOptions;if(!t||"native"===i.responseType||"native-request-init"===i.responseType)return!0;let n,a;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[b]=s,n;s&&(s.error?n=s.error:"error"===s.status&&Array.isArray(s.messages)&&(n={...s},n[b]=s,n.details=s.messages));let o,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,o=n.messageCode,o=o&&o.toUpperCase());const u=i.authMode;if(403===a&&(4===l||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&y.includes(a)&&!F(e.params.url)&&(403!==a||o&&!x.includes(o)&&(null==l||2===l&&e.credentialToken))){await _();try{const t=await r.id.getCredential(e.params.url,{error:T("request:server",n,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function q(e,t,s=!1){const i=t.controller.signal,r=new Image;return t.withCredentials?r.crossOrigin="use-credentials":r.crossOrigin="anonymous",r.alt="",r.fetchPriority=p.priority,r.src=e,(0,d.fY)(r,e,s,i)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,s)=>{s.d(t,{r:()=>n});var i=s(17452);const r=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,i.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!r.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,s)=>{s.d(t,{Hu:()=>c,fY:()=>l,jH:()=>h,jz:()=>d});var i=s(68773),r=s(80442),n=s(70586),a=s(95330),o=s(17452);function l(e,t,s=!1,i){return new Promise(((o,l)=>{if((0,a.Hc)(i))return void l(u());let c=()=>{f(),l(new Error(`Unable to load ${t}`))},h=()=>{const t=e;f(),o(t)},d=()=>{if(!e)return;const t=e;f(),t.src="",l(u())};const f=()=>{(0,r.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",h)),c=null,h=null,e=null,(0,n.pC)(i)&&i.removeEventListener("abort",d),d=null,s&&URL.revokeObjectURL(t)};(0,n.pC)(i)&&i.addEventListener("abort",d),(0,r.Z)("esri-image-decode")?e.decode().then(h,c):(e.addEventListener("error",c),e.addEventListener("load",h))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){i.Z.request.crossOriginNoCorsDomains||(i.Z.request.crossOriginNoCorsDomains={});const t=i.Z.request.crossOriginNoCorsDomains;for(let s of e)s=s.toLowerCase(),/^https?:\/\//.test(s)?t[(0,o.P$)(s)??""]=0:(t[(0,o.P$)("http://"+s)??""]=0,t[(0,o.P$)("https://"+s)??""]=0)}function h(e){const t=i.Z.request.crossOriginNoCorsDomains;if(t){let s=(0,o.P$)(e);if(s)return s=s.toLowerCase(),!(0,o.D6)(s,(0,o.TI)())&&t[s]<Date.now()-36e5}return!1}async function d(e){const t=i.Z.request.crossOriginNoCorsDomains,s=(0,o.P$)(e);t&&s&&(t[s.toLowerCase()]=Date.now());const r=(0,o.mN)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9777,3172,9880],{99880:(e,t,s)=>{s.d(t,{V:()=>l});var i=s(68773),r=(s(3172),s(20102)),n=s(92604),a=s(17452);const o=n.Z.getLogger("esri.assets");function l(e){if(!i.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new r.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(i.Z.assetsPath,e)}},74669:(e,t,s)=>{s.d(t,{Z:()=>r});var i=s(69801);class r{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},24470:(e,t,s)=>{s.d(t,{Gv:()=>x,HH:()=>u,SO:()=>d,Ue:()=>n,al:()=>o,cS:()=>p,fS:()=>y,jE:()=>h,jn:()=>c,kK:()=>f,oJ:()=>l,r3:()=>m}),s(80442),s(22021);var i=s(70586),r=s(6570);function n(e=w){return[e[0],e[1],e[2],e[3]]}function a(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function o(e,t,s,i,r=n()){return r[0]=e,r[1]=t,r[2]=s,r[3]=i,r}function l(e,t=n()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function u(e,t){return new r.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function c(e,t,s){if((0,i.Wi)(t))a(s,e);else if("length"in t)g(t)?(s[0]=Math.min(e[0],t[0]),s[1]=Math.min(e[1],t[1]),s[2]=Math.max(e[2],t[2]),s[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(s[0]=Math.min(e[0],t[0]),s[1]=Math.min(e[1],t[1]),s[2]=Math.max(e[2],t[0]),s[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":s[0]=Math.min(e[0],t.xmin),s[1]=Math.min(e[1],t.ymin),s[2]=Math.max(e[2],t.xmax),s[3]=Math.max(e[3],t.ymax);break;case"point":s[0]=Math.min(e[0],t.x),s[1]=Math.min(e[1],t.y),s[2]=Math.max(e[2],t.x),s[3]=Math.max(e[3],t.y)}}function d(e){return function(e){return(0,i.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function h(e,t,s){return t>=e[0]&&s>=e[1]&&t<=e[2]&&s<=e[3]}function f(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function m(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function p(e){return e?a(e,x):n(x)}function g(e){return null!=e&&4===e.length}function y(e,t){return g(e)&&g(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const x=[1/0,1/0,-1/0,-1/0],w=[0,0,0,0]},69285:(e,t,s)=>{s.d(t,{k:()=>a});var i=s(70586),r=s(67900),n=s(8744);function a(e,t,s){if((0,i.Wi)(t)||(0,i.Wi)(s)||s.vcsWkid||(0,n.fS)(t,s))return null;const a=(0,r._R)(t)/(0,r._R)(s);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},26993:(e,t,s)=>{s.d(t,{y:()=>w,r:()=>m});var i=s(70586),r=s(35308),n=s(49600),a=s(82397),o=s(8744),l=s(62432),u=s(24452);class c{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,l.hr)(t),r=this.fieldsIndex.get(i),n=r?null:(0,l.Jc)(i,s),a=r?r.name:(0,l.nu)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=(0,l.Jc)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getDataValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2&&(r=`${(0,u.wk)(r)}${t.fieldDelimiter}${(0,u.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,u.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)),s&&Number.isFinite(r)){const n="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,u.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s,i){const r={attributes:this.featureAdapter.getAttributes(e),layer:{fields:this.fieldsIndex.fields}},n=i.createExecContext(r,s);return i.executeFunction(t,n)}getExpressionValues(e,t,s,i){const r={fields:this.fieldsIndex.fields};return e.map((e=>{const n={attributes:this.featureAdapter.getAttributes(e),layer:r},a=i.createExecContext(n,s);return i.executeFunction(t,a)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,i.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const r=`${(t||["*"]).join(",")}=${s.join(",")}`;let n=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++n),n>1?null:e}}var d=s(37427);function h(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function f(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var m,p,g=s(11490),y=s(35671),x=s(59266);class w{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new c(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;return e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry&&((0,o.JY)(this.query.outSR)&&!(0,o.fS)(this.query.geometry.spatialReference,this.query.outSR)?e.queryGeometry=(0,g.S2)({spatialReference:this.query.outSR,...(0,d.iV)(this.query.geometry,this.query.geometry.spatialReference,this.query.outSR)}):e.queryGeometry=(0,g.S2)({spatialReference:this.query.outSR,...this.query.geometry})),e}createSnappingResponse(e,t){const s=this.featureAdapter,r=b(this.hasZ,this.hasM),{point:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=null!=n.z,d=null!=n.m,p=this._getPointCreator(n,c,d,this.spatialReference,t),g=new S(null,0),y=new S(null,0),x={x:0,y:0,z:0};for(const t of this.items){const c=s.getGeometry(t);if((0,i.Wi)(c))continue;const{coords:d,lengths:w}=c;if(g.coords=d,y.coords=d,e.types&m.EDGE){let e=0;for(let i=0;i<w.length;i++){const u=w[i];for(let i=0;i<u;i++,e+=r){const c=g;if(c.coordsIndex=e,i!==u-1){const i=y;i.coordsIndex=e+r;const u=x;v(x,n,c,i);const d=(n.x-u.x)/a,h=(n.y-u.y)/o,m=d*d+h*h;m<=1&&l.candidates.push(f(s.getObjectId(t),p(u),Math.sqrt(m),p(c),p(i)))}}}}if(e.types&m.VERTEX){const e=u?d.length-r:d.length;for(let i=0;i<e;i+=r){const e=g;e.coordsIndex=i;const r=(n.x-e.x)/a,u=(n.y-e.y)/o,c=r*r+u*u;c<=1&&l.candidates.push(h(s.getObjectId(t),p(e),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s,r,n){const a=(0,i.pC)(n)&&!(0,o.fS)(r,n)?e=>(0,d.iV)(e,r,n):e=>e,{hasZ:l}=this,u=e.m;return t&&s?l?({x:e,y:t,z:s})=>a({x:e,y:t,z:s,m:u}):({x:e,y:t})=>a({x:e,y:t,z:0,m:u}):t?l?({x:e,y:t,z:s})=>a({x:e,y:t,z:s}):({x:e,y:t})=>a({x:e,y:t,z:0}):s?({x:e,y:t})=>a({x:e,y:t,m:u}):({x:e,y:t})=>a({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l}=e,c=this.fieldsIndex.isDateField(t),d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l}),h=(0,u.S5)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),f=this.fieldsIndex.get(t),m={value:.5,fieldType:f?.type},p=(0,y.qN)(f)?(0,u.H0)({values:d,supportsNullCount:h,percentileParams:m}):(0,u.i5)({values:d,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:h,percentileParams:m});return(0,u.F_)(p,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n}=e,a=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n}),o=(0,u.eT)(a);return(0,u.Qm)(o,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numClasses:d,scale:h}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h}),m=(0,u.G2)(f,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numClasses:d});return(0,u.DL)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numBins:d,scale:h}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h});return(0,u.oF)(f,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:c,numBins:d})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,u.Lq)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:h,returnZ:f,returnM:m}=e,p=null!=d&&t.length>(h||0)+d,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:y,geometryType:s,hasM:i&&m,hasZ:r&&f,objectIdFieldName:n,spatialReference:(0,g.S2)(u||o),transform:c&&(0,a.vY)(c)||null}}_createFeatures(e,t){const s=new c(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:d,resultOffset:h,resultRecordCount:f,returnZ:m=!1,returnM:p=!1}=e,y=r&&m,x=i&&p;let w=[],v=0;const b=[...t];if(this._sortFeatures(b,n,((e,t,i)=>s.getFieldValue(e,t,i))),l||u){const e=(0,a.vY)(o);if(l&&!u)for(const t of b)w[v++]={attributes:s.getAttributes(t),geometry:(0,g.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,y,x)};else if(!l&&u)for(const t of b)w[v++]={attributes:s.getAttributes(t),centroid:(0,g.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of b)w[v++]={attributes:s.getAttributes(t),centroid:(0,g.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,g.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,y,x)}}else for(const e of b){const t=s.getAttributes(e);t&&(w[v++]={attributes:t})}const S=h||0;if(null!=f){const e=S+f;w=w.slice(S,Math.min(w.length,e))}return w}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,r=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>r)t=!0;else{const e=b(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const r=s.getGeometry(t);return e+((0,i.pC)(r)&&r.coords.length||0)}),0)/e>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new c(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:h}=e,f=u&&u.length,m=!!f,p=m&&u[0],g=m&&!this.fieldsIndex.get(p);for(const e of l){const{outStatisticFieldName:l,statisticType:c}=e,h=e,y="exceedslimit"!==c?e.onStatisticField:void 0,x="percentile_disc"===c||"percentile_cont"===c,w="EnvelopeAggregate"===c||"CentroidAggregate"===c||"ConvexHullAggregate"===c,v=m&&1===f&&(y===p||g)&&"count"===c;if(m){if(!n.has(y)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(y,this._calculateUniqueValues(e,!w&&o.returnDistinctValues))}const e=n.get(y);for(const t in e){const{count:s,data:r,items:n,itemPositions:c}=e[t],f=r.join(",");if(!d||o.validateItems(n,d)){const e=a.get(f)||{attributes:{}};if(w){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(h,n);e.aggregateGeometries[s]=t}else{let t=null;if(v)t=s;else{const e=this._getAttributeValues(o,y,i),s=c.map((t=>e[t]));t=x&&"statisticParameters"in h?this._getPercentileValue(h,s):this._getStatisticValue(h,s,null,o.returnDistinctValues)}e.attributes[l]=t}let t=0;u.forEach(((s,i)=>e.attributes[this.fieldsIndex.get(s)?s:"EXPR_"+ ++t]=r[i])),a.set(f,e)}}}else if(w){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(h,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,y,i);t.attributes[l]=x&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const y=m?Array.from(a.values()):[t];return this._sortFeatures(y,h,((e,t)=>e.attributes[t])),{fields:s,features:y}}async _getAggregateGeometry(e,t){const i=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:a,outStatisticFieldName:o}=e,{featureAdapter:l,spatialReference:u,geometryType:c,hasZ:d,hasM:h}=this,f=t.map((e=>(0,g.Op)(c,d,h,l.getGeometry(e)))),m=i.convexHull(u,f,!0)[0],p={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===a){const e=m?(0,n._w)(m):(0,n.aO)(i.union(u,f));p.aggregateGeometries={...e,spatialReference:u},p.outStatisticFieldName=o||"extent"}else if("CentroidAggregate"===a){const e=m?(0,r.tO)(m):(0,r.$G)((0,n.aO)(i.union(u,f)));p.aggregateGeometries={x:e[0],y:e[1],spatialReference:u},p.outStatisticFieldName=o||"centroid"}else"ConvexHullAggregate"===a&&(p.aggregateGeometries=m,p.outStatisticFieldName=o||"convexHull");return p}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,y.qN)(this.fieldsIndex.get(r))?(0,u.H0)({values:t,returnDistinct:i}):(0,u.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,u.XL)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeDataValues(e,t){return this.items.map((s=>e.getDataValue(s,{field:t.field,field2:t.field2,field3:t.field3,fieldDelimiter:t.fieldDelimiter,normalizationField:t.normalizationField,normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,x.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return e.getExpressionValues(this.items,r,n,i)}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e){const t=new c(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,field:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:o}=e,l=s?{viewingMode:"map",scale:o,spatialReference:this.query.outSR||this.spatialReference}:null;return s?this._getAttributeExpressionValues(t,s,l):this._getAttributeDataValues(t,{field:i,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:r,normalizationType:n,normalizationTotal:a})}}function v(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=r*r+n*n,o=(t.x-s.x)*r+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+r*l,e.y=s.y+n*l}function b(e,t){return e?t?4:3:t?3:2}(p=m||(m={}))[p.NONE=0]="NONE",p[p.EDGE=1]="EDGE",p[p.VERTEX=2]="VERTEX";class S{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}},62432:(e,t,s)=>{s.d(t,{nu:()=>p,hr:()=>m,Jc:()=>h,G3:()=>g,Of:()=>f,z4:()=>d,hO:()=>c});var i=s(20102),r=s(74669),n=s(41534);const a=new class{constructor(e,t){this._cache=new r.Z(e),this._invalidCache=new r.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=n.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),o="feature-store:unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function c(e,t){if(!t)return!0;const s=a.get(t,e);if(!s)throw new i.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(o,"where clause is not standard",{where:t});return f(e,s.fieldNames,"where clause contains missing fields"),!0}function d(e,t,s){if(!t)return!0;const r=a.get(t,e);if(!r)throw new i.Z(o,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(o,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(f(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(o,"expressions in having should also exist in outStatistics",{having:t});return!0}function h(e,t){return e?a.get(e,t):null}function f(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=m(s);try{const s=h(t,e);if(!s)throw new i.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(o,"expression is not standard",{clause:s});f(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(o,s,{missingFields:n})}function m(e){return e.split(l)[0]}function p(e){return e.split(l)[1]}function g(e,t){const s=t.get(e);return!!s&&!u.has(s.type)}},37427:(e,t,s)=>{s.d(t,{_W:()=>h,iV:()=>p,oj:()=>y});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function h(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)?e.geometry.spatialReference:null)).filter(i.pC):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(s)||(0,a.fS)(t,s))return e;if((0,o.Q8)(t,s)){const t=(0,a.sS)(s)?f(e):m(e);return t.spatialReference=s,t}return(0,r.oj)(n.N,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,s){return g.push(e,t,s)}},11490:(e,t,s)=>{s.d(t,{EG:()=>v,Op:()=>b,S2:()=>F,Up:()=>S,j6:()=>T,vF:()=>p});var i=s(35454),r=s(70586),n=s(67900),a=s(44547),o=s(49600),l=s(33955),u=s(51806),c=s(8744),d=s(98732),h=s(5428),f=s(37427);const m=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),g=new h.Z,y=new h.Z,x=new h.Z,w={esriGeometryPoint:d.fQ,esriGeometryPolyline:d.J6,esriGeometryPolygon:d.eG,esriGeometryMultipoint:d.Iv};function v(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,d.Nh)(x,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,d.fQ)(r,a,o)}return(0,d.fQ)(t,a,o)}function b(e,t,s,i,n,a,o=t,l=s){const u=t&&o,c=s&&l,h=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(h))return null;if(n){let i=(0,d.zj)(y,h,t,s,e,n,o,l);return a&&(i=(0,d.Nh)(x,i,u,c,e,a)),w[e]?.(i,u,c)??null}if(a){const i=(0,d.Nh)(x,h,t,s,e,a,o,l);return w[e]?.(i,u,c)??null}return(0,d.hY)(g,h,t,s,o,l),w[e]?.(g,u,c)??null}async function S(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),T(e,t,s)}async function T(e,t,i){if(!e)return null;let{where:a}=e;if(e.where=a=a&&a.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let d=await async function(e){const{distance:t,units:i}=e,r=e.geometry;if(null==t||"vertexAttributes"in r)return r;const a=r.spatialReference,o=i?m.fromJSON(i):(0,n.qE)(a),l=a&&((0,c.sT)(a)||(0,c.sS)(a))?r:await(0,f._W)(a,c.Zn).then((()=>(0,f.iV)(r,c.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;d=(0,o.aO)(d),d.spatialReference=t}if(d){await(0,f._W)(d.spatialReference,i),d=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(d,i);const t=(await(0,u.aX)((0,l.im)(d)))[0];if((0,r.Wi)(t))throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=s&&_(d,i)?{densificationStep:8*s}:void 0,a=t.toJSON(),o=await(0,f.iV)(a,a.spatialReference,i,n);if(!o)throw p;o.spatialReference=i,e.geometry=o}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.YX)(e)||(0,l.oU)(e)||(0,l.l9)(e))&&!(0,c.fS)(s,t)&&!(0,a.Up)(s,t)}function F(e){return e&&I in e?JSON.parse(JSON.stringify(e,q)):e}const I="_geVersion",q=(e,t)=>e!==I?t:void 0},19745:(e,t,s)=>{s.d(t,{P:()=>a,a:()=>n});const i=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,r={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function n(e){const t=e?.match(i);if(!t)return null;const[,s,n,a]=t;if(!s)return null;let o=null,l=null,u=null;const{devext:c,qaext:d,www:h}=r;if(n)if(o=s,a)switch(a.toLowerCase()){case"devext":({customBaseUrl:l,portalHostname:u}=c);break;case"qa":({customBaseUrl:l,portalHostname:u}=d);break;default:return null}else({customBaseUrl:l,portalHostname:u}=h);else switch(s.toLowerCase()){case"devext":({customBaseUrl:l,portalHostname:u}=c);break;case"qaext":({customBaseUrl:l,portalHostname:u}=d);break;case"www":({customBaseUrl:l,portalHostname:u}=h);break;default:return null}return{customBaseUrl:l,isPortal:!1,portalHostname:u,urlKey:o}}function a(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},3172:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var i=s(68773),r=s(40330),n=s(20102),a=s(80442),o=s(22974),l=s(70586),u=s(95330),c=s(17452),d=s(19745),h=s(71058),f=s(85958);async function m(e,t){const o=(0,c.HK)(e),d=(0,c.jc)(e);d||o||(e=(0,c.Fv)(e));const x={url:e,requestOptions:{...(0,l.Wg)(t)}};let w=(0,c.oh)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,i;try{i=await e.before(t)}catch(e){s=_("request:interceptor",e,t)}if((i instanceof Error||i instanceof n.Z)&&(s=_("request:interceptor",i,t)),s)throw e.error&&e.error(s),s;return i}}(w,x);if(null!=e)return{data:e,getHeader:b,requestOptions:x.requestOptions,url:x.url};w.after||w.error||(w=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw _("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x)}else if(o)throw _("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),x);if("head"===t.method){if(t.body)throw _("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||d)throw _("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await s.e(9884).then(s.bind(s,29884))):m._abortableFetch||(m._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const v=new AbortController;(0,u.fu)(t,(()=>v.abort()));const S={controller:v,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:w,params:x,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(e){let t,s;await async function(e){const t=e.params.url,s=e.params.requestOptions,n=e.controller.signal,a=s.body;let o=null,l=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:s.cacheBust&&!m._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:s.headers||{},method:"head"===s.method?"HEAD":"GET",mode:"cors",priority:g.priority,redirect:"follow",signal:n},(o||l)&&(e.fetchOptions.body=o||l),"anonymous"===s.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||s.query?.token||o?.get("token")),!e.hasToken&&i.Z.apiKey&&(0,h.r)(t)&&(s.query||(s.query={}),s.query.token=i.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!I(t)&&!(0,u.Hc)(n)){let i;"immediate"===s.authMode?(await F(),i=await r.id.getCredential(t,{signal:n}),e.credential=i):"no-prompt"===s.authMode?(await F(),i=await r.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=i):r.id&&(i=r.id.findCredential(t)),i&&(e.credentialToken=i.token,e.useSSL=!!i.ssl)}}(e);try{do{[t,s]=await q(e)}while(!await C(e,t,s))}catch(s){const i=_("request:server",s,e.params,t);throw i.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(i),i}const n=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&g.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&(0,f.Hu)(s.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&r.id){const e=r.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=r.id.findCredential(t,a.userId);e&&-1===r.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:s,getHeader:t?e=>t?.headers.get(e):b,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(S);return w?.after?.(T),T}let p;const g=i.Z.request,y="FormData"in globalThis,x=[499,498,403,401],w=["COM_0056","COM_0057","SB_0008"],v=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,S=Symbol();function T(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||m._corsServers.includes(t)||(0,c.kl)(t)}function _(e,t,s,i){let r="Error";const a={url:s.url,requestOptions:s.requestOptions,getHeader:b,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=s.url,t.details.requestOptions=s.requestOptions):t.details=a,t;if(t){const e=i&&(e=>i.headers.get(e)),s=i&&i.status,n=t.message;n&&(r=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=S in t?t[S]:t}return(0,u.D_)(t)?(0,u.zE)():new n.Z(e,r,a)}async function F(){r.id||await Promise.all([s.e(6261),s.e(1400),s.e(1761)]).then(s.bind(s,55142))}function I(e){return v.some((t=>t.test(e)))}async function q(e){let t=e.params.url;const s=e.params.requestOptions,i=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),o=s.responseType||"json",l=n?0:null!=s.timeout?s.timeout:g.timeout;let h=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),s.cacheBust&&"default"===i.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...s.query};e.credentialToken&&(n.token=e.credentialToken);let o=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let u;h="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||l>g.maxUrlLength;const m=s.useProxy||!!(0,c.ed)(t);if(m){const e=(0,c.b7)(t);u=e.path,!h&&u.length+1+l>g.maxUrlLength&&(h=!0),e.query&&(n={...e.query,...n})}if("HEAD"===i.method&&(h||m)){if(h){if(l>g.maxUrlLength)throw _("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw _("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(m)throw _("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(h?(i.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?t=(0,c.fl)(t,n):(i.body=(0,c.B7)(n),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),m&&(e.useProxy=!0,t=`${u}?${t}`),n.token&&y&&i.body instanceof FormData&&!(0,d.P)(t)&&i.body.set("token",n.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(r.id){const s=r.id.findServerInfo(t);s&&s.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",(0,f.jH)(t)&&await(0,f.jz)(h?(0,c.fl)(t,n):t))}let p,x,w=0,v=!1;l>0&&(w=setTimeout((()=>{v=!0,e.controller.abort()}),l));try{if("native-request-init"===s.responseType)x=i,x.url=t;else if("image"!==s.responseType||"default"!==i.cache||"GET"!==i.method||h||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(s.headers)||!n&&!e.useProxy&&g.proxyUrl&&!T(t)){if(p=await m._abortableFetch(t,i),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!m._corsServers.includes(t)&&m._corsServers.push(t)}(t),"native"===s.responseType)x=p;else if("HEAD"!==i.method)if(p.ok){switch(o){case"array-buffer":x=await p.arrayBuffer();break;case"blob":case"image":x=await p.blob();break;default:x=await p.text()}if(w&&(clearTimeout(w),w=0),"json"===o||"xml"===o||"document"===o)if(x)switch(o){case"json":x=JSON.parse(x);break;case"xml":x=M(x,"application/xml");break;case"document":x=M(x,"text/html")}else x=null;if(x){if("array-buffer"===o||"blob"===o){const e=p.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&x["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(x).json();e.error&&(x=e)}catch{}}"image"===o&&x instanceof Blob&&(x=await E(URL.createObjectURL(x),e,!0))}}else x=await p.text()}else x=await E(t,e)}catch(i){if("AbortError"===i.name){if(v)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!p&&i instanceof TypeError&&g.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||T(t))throw i;e.redoRequest=!0,(0,c.tD)({proxyUrl:g.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{w&&clearTimeout(w)}return[p,x]}function M(e,t){let s;try{s=(new DOMParser).parseFromString(e,t)}catch{}if(!s||s.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return s}async function C(e,t,s){if(e.redoRequest)return e.redoRequest=!1,!1;const i=e.params.requestOptions;if(!t||"native"===i.responseType||"native-request-init"===i.responseType)return!0;let n,a;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[S]=s,n;s&&(s.error?n=s.error:"error"===s.status&&Array.isArray(s.messages)&&(n={...s},n[S]=s,n.details=s.messages));let o,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,o=n.messageCode,o=o&&o.toUpperCase());const u=i.authMode;if(403===a&&(4===l||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&x.includes(a)&&!I(e.params.url)&&(403!==a||o&&!w.includes(o)&&(null==l||2===l&&e.credentialToken))){await F();try{const t=await r.id.getCredential(e.params.url,{error:_("request:server",n,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function E(e,t,s=!1){const i=t.controller.signal,r=new Image;return t.withCredentials?r.crossOrigin="use-credentials":r.crossOrigin="anonymous",r.alt="",r.fetchPriority=g.priority,r.src=e,(0,f.fY)(r,e,s,i)}m._abortableFetch=null,m._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,s)=>{s.d(t,{r:()=>n});var i=s(17452);const r=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,i.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!r.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,s)=>{s.d(t,{Hu:()=>c,fY:()=>l,jH:()=>d,jz:()=>h});var i=s(68773),r=s(80442),n=s(70586),a=s(95330),o=s(17452);function l(e,t,s=!1,i){return new Promise(((o,l)=>{if((0,a.Hc)(i))return void l(u());let c=()=>{f(),l(new Error(`Unable to load ${t}`))},d=()=>{const t=e;f(),o(t)},h=()=>{if(!e)return;const t=e;f(),t.src="",l(u())};const f=()=>{(0,r.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",d)),c=null,d=null,e=null,(0,n.pC)(i)&&i.removeEventListener("abort",h),h=null,s&&URL.revokeObjectURL(t)};(0,n.pC)(i)&&i.addEventListener("abort",h),(0,r.Z)("esri-image-decode")?e.decode().then(d,c):(e.addEventListener("error",c),e.addEventListener("load",d))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){i.Z.request.crossOriginNoCorsDomains||(i.Z.request.crossOriginNoCorsDomains={});const t=i.Z.request.crossOriginNoCorsDomains;for(let s of e)s=s.toLowerCase(),/^https?:\/\//.test(s)?t[(0,o.P$)(s)??""]=0:(t[(0,o.P$)("http://"+s)??""]=0,t[(0,o.P$)("https://"+s)??""]=0)}function d(e){const t=i.Z.request.crossOriginNoCorsDomains;if(t){let s=(0,o.P$)(e);if(s)return s=s.toLowerCase(),!(0,o.D6)(s,(0,o.TI)())&&t[s]<Date.now()-36e5}return!1}async function h(e){const t=i.Z.request.crossOriginNoCorsDomains,s=(0,o.P$)(e);t&&s&&(t[s.toLowerCase()]=Date.now());const r=(0,o.mN)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|