@arcgis/core 4.26.0-next.20230202 → 4.26.0-next.20230205

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5764],{92835:(t,e,n)=>{n.d(e,{Z:()=>m});var s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return f}static get empty(){return p}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=(0,o.pC)(this.start)?this.start.getTime():this.start,n=(0,o.pC)(this.end)?this.end.getTime():this.end,s=(0,o.pC)(t.start)?t.start.getTime():t.start,i=(0,o.pC)(t.end)?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=(0,o.R2)(this.start,-1/0,(t=>t.getTime())),n=(0,o.R2)(this.end,1/0,(t=>t.getTime())),i=(0,o.R2)(t.start,-1/0,(t=>t.getTime())),r=(0,o.R2)(t.end,1/0,(t=>t.getTime()));let a,l;if(i>=e&&i<=n?a=i:e>=i&&e<=r&&(a=e),n>=i&&n<=r?l=n:r>=e&&r<=n&&(l=r),null!=a&&null!=l&&!isNaN(a)&&!isNaN(l)){const t=new s;return t.start=a===-1/0?null:new Date(a),t.end=l===1/0?null:new Date(l),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return(0,o.pC)(i)&&(n.start=(0,a.Nm)(i,t,e)),(0,o.pC)(r)&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return f.clone();const e=(0,o.pC)(this.start)&&(0,o.pC)(t.start)?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=(0,o.pC)(this.end)&&(0,o.pC)(t.end)?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),m=d},5732:(t,e,n)=>{n.d(e,{c:()=>s});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,f=h*r-o*l;let p=n*u+s*d+i*f;return p?(p=1/p,t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=f*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],f=n[1],p=n[2],m=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+f*o+p*h,t[1]=d*i+f*a+p*c,t[2]=d*r+f*l+p*u,t[3]=m*s+_*o+g*h,t[4]=m*i+_*a+g*c,t[5]=m*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,C=c*m-u*p,P=c*_-d*p,R=c*g-f*p,E=u*_-d*m,O=u*g-f*m,I=d*g-f*_;let S=y*I-x*O+v*E+b*R-M*P+w*C;return S?(S=1/S,t[0]=(a*I-l*O+h*E)*S,t[1]=(l*R-o*I-h*P)*S,t[2]=(o*O-a*R+h*C)*S,t[3]=(i*O-s*I-r*E)*S,t[4]=(n*I-i*R+r*P)*S,t[5]=(s*R-n*O-r*C)*S,t[6]=(m*w-_*M+g*b)*S,t[7]=(_*v-p*w-g*x)*S,t[8]=(p*M-m*v+g*y)*S,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const f=h,p=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],f=e[1],p=e[2],m=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=b*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(r-p)<=b*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-m)<=b*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,f=i*a,p=i*l,m=r*o,_=r*a,g=r*l;return t[0]=1-u-p,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-p,t[7]=f-m,t[2]=d-_,t[5]=f+m,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:f,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,f=h*r-o*l,p=n*u+s*d+i*f;if(!p)return null;const m=1/p;return t[0]=u*m,t[1]=(-c*s+i*h)*m,t[2]=(a*s-i*o)*m,t[3]=d*m,t[4]=(c*n-i*l)*m,t[5]=(-a*n+i*r)*m,t[6]=f*m,t[7]=(-h*n+s*l)*m,t[8]=(o*n-s*r)*m,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),f=Math.cos(n);return t[0]=f*s+d*o,t[1]=f*i+d*a,t[2]=f*r+d*l,t[3]=f*o-d*s,t[4]=f*a-d*i,t[5]=f*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:p,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],f=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+f*o+h,t[7]=d*i+f*a+c,t[8]=d*r+f*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o={},a={get exports(){return o},set exports(t){o=t}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],f=i,p=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);f<p;){for(e(n,f,p),f++,p--;o(n[f],d)<0;)f++;for(;o(n[p],d)>0;)p--}0===o(n[i],d)?e(n,i,p):e(n,++p,r),p<=s&&(i=p+1),s<=p&&(r=p-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=o},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>p,s:()=>i,t:()=>f});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function f(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function p(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const m=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:m,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:p,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:f,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{Z:()=>h,a:()=>s,c:()=>r,f:()=>i});const h=[0,0],c=o(),u=a(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:h,clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>c,j:()=>u});var s=n(43697),i=n(15923),r=(n(80442),n(22974)),o=(n(92604),n(70586)),a=n(31263),l=n(1153),h=n(52011);const c=t=>{let e=class extends t{clone(){const t=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),e=t.metadatas,n=t.store,s={},i=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const c=this[t];let u=null;u="function"==typeof h?h(c):"reference"===h?c:(0,r.Vo)(c),null!=c&&null==u||(l===a.s3.DEFAULTS?i.set(t,u):s[t]=u)}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,l.vw)(h)?.store;if(t)for(const[e,n]of i)t.set(e,n,a.s3.DEFAULTS)}return h}};return e=(0,s._)([(0,h.j)("esri.core.Clonable")],e),e};let u=class extends(c(i.Z)){};u=(0,s._)([(0,h.j)("esri.core.Clonable")],u)},46791:(t,e,n)=>{n.d(e,{Z:()=>S});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(5600),f=n(75215),p=n(52421),m=n(52011),_=n(58971),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof I?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const C=new Set,P=new Set,R=new Set,E=new Map;let O=0,I=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:O++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return(0,_.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,_.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,_.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,_.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._splice(0,this.length)||[];return this._emitAfterChanges(s.REMOVE),t}clone(){return(0,_.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,_.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,_.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,_.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,_.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,_.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,_.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,_.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,_.it)(this._observable),this._items[t]}getNextIndex(t){(0,_.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,_.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,_.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,_.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,_.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,_.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,_.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,_.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,_.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,_.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,_.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,_.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,_.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,_.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,_.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,_.it)(this._observable),this._items.some(t,e)}sort(t){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,_.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,_.it)(this._observable),this._items.slice()}toJSON(){return(0,_.it)(this._observable),this.toArray()}toLocaleString(){return(0,_.it)(this._observable),this._items.toLocaleString()}toString(){return(0,_.it)(this._observable),this._items.toString()}unshift(...t){return(0,_.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;C.clear(),P.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===P.size)for(const t of e)C.add(t);else for(const t of e)P.has(t)?(R.add(t),P.delete(t)):R.has(t)||C.add(t);if(n)if(0===R.size&&0===C.size)for(const t of n)P.add(t);else for(const t of n)C.has(t)?C.delete(t):(R.delete(t),P.add(t))}const n=r.Z.acquire();C.forEach((t=>{n.push(t)}));const s=r.Z.acquire();P.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}C.clear(),P.clear(),R.clear()}};I.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,f.se)(t):(0,f.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,m.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,d.Cb)()],I.prototype,"length",void 0),(0,i._)([(0,d.Cb)()],I.prototype,"items",null),I=c=(0,i._)([(0,m.j)("esri.core.Collection")],I);const S=I},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(15923),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new r.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},28659:(t,e,n)=>{n.d(e,{B:()=>m});var s=n(81153),i=n(17452),r=n(41123),o=n(7628),a=n(31263),l=n(5600);function h(t){return c[function(t){return t instanceof Blob?t.type:function(t){const e=(0,i.Ml)(t);return f[e]||u}(t.url)}(t)]||d}const c={},u="text/plain",d=c[u],f={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in f)c[f[t]]=t;var p=n(25929);function m(t){const e=t?.origins??[void 0];return(n,r)=>{const c=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,o.Oe)(e,n);return{type:String,read:(t,e,n)=>{const s=(0,p.r)(t,e,n);return r.type===String||r.json?.type===String?s:"function"==typeof r.type?new r.type({url:s}):void 0},write:{writer(e,o,l,c){if(!c||!c.resources)return"string"==typeof e?void(o[l]=(0,p.t)(e,c)):void(o[l]=e.write({},c));const u=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),d=(0,p.t)(u,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),f=r.type!==String&&(!(0,s.l)(this)||c&&c.origin&&this.originIdOf(n)>(0,a.M9)(c.origin)),m={object:this,propertyName:n,value:e,targetUrl:d,dest:o,targetPropertyName:l,context:c,params:t};c&&c.portalItem&&d&&!(0,i.YP)(d)?f?function(t){const{context:e,targetUrl:n,params:s,value:r,dest:o,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),c=y(r,n,e),u=h(c),d=(0,i.Ml)(l.path),f=s?.compress??!1;u===d?(e.resources&&g({...t,resource:l,content:c,compress:f,updates:e.resources.toUpdate}),o[a]=n):_(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:s}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[s]=e)}(m):c&&c.portalItem&&(null==d||null!=(0,p.i)(d)||(0,i.jc)(d)||f)?_(m):o[l]=d}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=p.a;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,l.CJ)(n,t,r);for(const t in c)e[t]=c[t]}}}function _(t){const{targetUrl:e,params:s,value:o,context:a,dest:l,targetPropertyName:c}=t;if(!a.portalItem)return;const u=(0,p.p)(e),d=u?.filename??(0,r.D)(),f=s?.prefix??u?.prefix,m=y(o,e,a),_=(0,i.v_)(f,d),x=`${_}.${h(m)}`,v=a.portalItem.resourceFromPath(x);(0,i.jc)(e)&&a.resources&&a.resources.pendingOperations.push(async function(t){const e=(await Promise.resolve().then(n.bind(n,3172))).default,{data:s}=await e(t,{responseType:"blob"});return s}(e).then((t=>{v.path=`${_}.${h(t)}`,l[c]=v.itemRelativeUrl})).catch((()=>{})));const b=s?.compress??!1;a.resources&&g({...t,resource:v,content:m,compress:b,updates:a.resources.toAdd}),l[c]=v.itemRelativeUrl}function g({object:t,propertyName:e,updates:n,resource:s,content:i,compress:r}){n.push({resource:s,content:i,compress:r,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function y(t,e,n){return"string"==typeof t?{url:e}:new Blob([JSON.stringify(t.toJSON(n))],{type:"application/json"})}},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=f(o),l=m(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=f(e)+f(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=p(r)+p(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=p(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=p(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},81153:(t,e,n)=>{function s(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{l:()=>s})},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,f)}function h(t,e,n={}){return c(t,e,n,p)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const f=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??f)])}))}(t,p,e)}function f(t){return!0}function p(t){return!!t}n(87538);const m={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(15923),r=n(61247),o=n(70586),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),{remove:()=>this._handles.remove(i)}}addPromise(t){if((0,o.Wi)(t))return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),{remove:()=>this._handles.remove(i)}}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},51201:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ee});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(70586),l=n(16453),h=n(5600),c=n(90578),u=(n(67676),n(71715)),d=n(52011),f=n(30556),p=n(87085),m=n(71612),_=n(38009),g=n(72965),y=n(3172),x=(n(75215),n(28659)),v=n(10699),b=n(96674),M=n(83379),w=n(15923),C=n(21787),P=n(46521),R=n(4307),E=n(17896);const O=(0,n(65617).c)(),I=(0,P.c)(),S=(0,P.c)(),B=(0,P.c)();function A(t,e,n){return(0,E.s)(O,e[0],e[1],1),(0,E.t)(O,O,(0,C.t)(I,n)),0===O[2]?(0,R.s)(t,O[0],O[1]):(0,R.s)(t,O[0]/O[2],O[1]/O[2])}function Z(t,e,n){return j(S,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),j(B,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,C.m)(t,(0,C.a)(S,S),B),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function j(t,e,n,s,i,r,o,a,l){(0,C.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(O,a,l,1),(0,C.a)(I,t);const[h,c,u]=(0,E.t)(O,O,(0,C.t)(I,I));return(0,C.s)(I,h,0,0,0,c,0,0,0,u),(0,C.m)(t,I,t)}var T=n(62357),D=n(97323),L=n(94139),Y=n(38913),W=n(44547),X=n(82971),N=n(2368);n(80442);let V=class extends N.j{projectOrWarn(t,e){if((0,a.Wi)(t))return t;const{geometry:n,pending:s}=(0,W.dz)(t,e);return s?null:s||n?n:(o.Z.getLogger(this.declaredClass).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};V=(0,s._)([(0,d.j)("esri.layers.support.GeoreferenceBase")],V);const q=V,z=(0,P.c)(),F=(0,D.a)();let U=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,h.Cb)()],U.prototype,"sourcePoint",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],U.prototype,"mapPoint",void 0),U=(0,s._)([(0,d.j)("esri.layers.support.ControlPoint")],U);let H=class extends((0,b.eC)(q)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=X.Z.fromJSON(e.spatialReference),s=(0,P.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if((0,a.Wi)(this.transform)){const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this.declaredClass).error(t.name,t.message)}else(0,a.pC)(t)&&k(t[0])&&(e.controlPoints=t.map((t=>{const e=(0,a.Wg)(t.sourcePoint);return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8))}get coords(){if((0,a.Wi)(this.controlPoints))return null;const t=this._updateTransform(z);if((0,a.Wi)(t)||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if((0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(t=this.projectOrWarn(t,e),(0,a.Wi)(t))return;const{width:n,height:s}=this,{rings:[[i,r,o,l]]}=t,h={sourcePoint:(0,T.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},c={sourcePoint:(0,T.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},u={sourcePoint:(0,T.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},d={sourcePoint:(0,T.vW)(n,s),mapPoint:new L.Z({x:l[0],y:l[1],spatialReference:e})};k(h)&&k(c)&&k(u)&&k(d)&&(rt(z,h,c,u,d),this.controlPoints=(0,a.Wg)(this.controlPoints).map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,z),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return(0,a.Wi)(this.transform)?null:(0,C.e)((0,P.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if((0,a.Wi)(t)||(0,a.Wi)(this.transform)||(0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if((0,a.Wi)(t)||(0,a.Wi)(this.inverseTransform)||(0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),t=(0,W.dz)(t,e).geometry,(0,a.Wi)(t)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,T.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if((0,a.Wi)(e)||!(n>0)||!(s>0))return null;const[i,r,o,l]=e;if(!k(i))return null;const h=i.mapPoint.spatialReference,c=this._projectControlPoint(r,h),u=this._projectControlPoint(o,h),d=this._projectControlPoint(l,h);if(!c.valid||!u.valid||!d.valid)return null;if(!k(c.controlPoint))return null;(0,a.Wi)(t)&&(t=(0,P.c)());let f=null;return f=k(u.controlPoint)&&k(d.controlPoint)?rt(t,i,c.controlPoint,u.controlPoint,d.controlPoint):k(u.controlPoint)?function(t,e,n,s){return it(J,K,e),it(G,tt,n),it($,et,s),(0,R.l)(Q,J,G,.5),(0,R.r)(Q,$,Q,Math.PI),(0,R.l)(nt,K,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,c.controlPoint,u.controlPoint):function(t,e,n){return it(J,K,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(Q,J,G,st),(0,R.r)(et,tt,K,-st),(0,R.r)(nt,K,tt,-st),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,c.controlPoint),f.every((t=>0===t))?null:f}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,W.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this.declaredClass).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return(0,a.pC)(t)&&(0,a.pC)(t.sourcePoint)&&(0,a.pC)(t.mapPoint)}(0,s._)([(0,h.Cb)({type:[U],json:{write:{allowNull:!1,isRequired:!0}}})],H.prototype,"controlPoints",void 0),(0,s._)([(0,u.r)("controlPoints")],H.prototype,"readControlPoints",null),(0,s._)([(0,f.c)("controlPoints")],H.prototype,"writeControlPoints",null),(0,s._)([(0,h.Cb)()],H.prototype,"coords",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],H.prototype,"height",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,s._)([(0,h.Cb)({readOnly:!0})],H.prototype,"transform",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],H.prototype,"width",void 0),H=(0,s._)([(0,d.j)("esri.layers.support.ControlPointsGeoreference")],H);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),Q=(0,D.a)(),K=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,K,e),it(G,tt,n),it($,et,s),it(Q,nt,i),ht(t,J,G,$,Q,K,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=H;let ut=class extends q{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if((0,a.Wi)(t)||(0,a.Wi)(e)||(0,a.Wi)(n)||(0,a.Wi)(s))return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),(0,a.Wi)(e)||(0,a.Wi)(n)||(0,a.Wi)(s)?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if((0,a.Wi)(e))return;const n=e.spatialReference;if(t=this.projectOrWarn(t,n),(0,a.Wi)(t))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,h.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,d.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var ft=n(22021),pt=n(46851),mt=n(6570);let _t=class extends q{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if((0,a.Wi)(this.extent))return null;const{xmin:t,ymin:e,xmax:n,ymax:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if((0,a.Wi)(t)||(0,a.Wi)(this.extent))return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),(0,a.Wi)(t)||(0,a.Wi)(t.extent))return;const{rings:[[n,s,i]],extent:{center:{x:r,y:o}}}=t,l=(0,ft.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),h=gt(r,o,-l),[c,u]=h(n[0],n[1]),[d,f]=h(i[0],i[1]);this.extent=new mt.Z({xmin:c,ymin:u,xmax:d,ymax:f,spatialReference:e}),this.rotation=l}};function gt(t,e,n){const s=(0,pt.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,h.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,h.Cb)({type:mt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,h.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,d.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:q,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(){super(...arguments),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,h.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,u.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,h.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,d.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;let bt=class extends vt{constructor(t){super(t),this.content=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,y.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}};(0,s._)([(0,h.Cb)({readOnly:!0})],bt.prototype,"content",void 0),(0,s._)([(0,h.Cb)({json:{name:"url",type:String}}),(0,x.B)({type:"resource",prefix:"media"})],bt.prototype,"image",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,json:{name:"mediaType"}})],bt.prototype,"type",void 0),bt=(0,s._)([(0,d.j)("esri.layers.support.ImageElement")],bt);const Mt=bt;n(66577);var wt=n(70921),Ct=n(32448),Pt=n(3920),Rt=n(609),Et=n(95330),Ot=n(17445),It=n(24470),St=n(87416),Bt=n(8744),At=n(37549),Zt=n(20322),jt=n(86662),Tt=n(33955),Dt=n(73913);function Lt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Dt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Dt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Dt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Dt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function Yt(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=Wt(t.xmin,e),{x:d,frameId:f}=Wt(t.xmax,e),p=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},p={xmin:l,ymin:s,xmax:0,ymax:i},m=[],_=[];Xt(t,a)&&m.push(u),Xt(t,p)&&_.push(u),Xt(e,a)&&m.push(f),Xt(e,p)&&_.push(f);for(let t=u+1;t<f;t++)m.push(t),_.push(t);n.push(new qt(t,[u]),new qt(e,[f]),new qt(a,m),new qt(p,_))}else c>d||p?n.push(new qt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new qt({xmin:l,ymin:s,xmax:d,ymax:i},[f])):n.push(new qt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}function Wt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function Xt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Nt(t,n,s)&&Nt(t,n,r)&&Nt(t,i,r)&&Nt(t,i,s)}function Nt(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Vt(t,e,n=!0){const s=!(0,Tt.l9)(t);if(s&&(0,jt.Zy)(t),n)return(new Ft).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class qt{constructor(t,e){this.extent=t,this.frameIds=e}}const zt=(0,It.Ue)();class Ft{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Ut=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return(0,a.Wi)(t)||(0,a.Wi)(t.extent)?null:(0,It.oJ)(t.extent)}get coords(){const t=(0,a.Wg)(this.element.georeference)?.coords;return(0,W.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if((0,a.Wi)(t))return null;const n=t.spatialReference,s=(0,Bt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Bt.sS)(n)?102100:4326,o=Dt.UZ[r].maxX,l=Dt.UZ[r].minX;if((0,Tt.wp)(i))return Lt(i,o,l);if((0,Tt.aW)(i))return i.points=i.points.map((t=>Lt(t,o,l))),i;if((0,Tt.YX)(i))return function(t,e){if(!e)return t;const n=Yt(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}(i,s);if((0,Tt.oU)(i)||(0,Tt.l9)(i)){const t=(0,Zt.$P)(zt,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Dt.XZ)(n.xmin,l)*(2*o),r=0===s?i:(0,Dt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Vt(r,o,e):n.xmin<l?Vt(r,l,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=(0,a.pC)(this.normalizedCoords)?this.normalizedCoords.extent:null;return(0,a.pC)(t)?(0,It.oJ)(t):null}};(0,s._)([(0,h.Cb)()],Ut.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)()],Ut.prototype,"element",void 0),(0,s._)([(0,h.Cb)()],Ut.prototype,"bounds",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"coords",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"normalizedCoords",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"normalizedBounds",null),Ut=(0,s._)([(0,d.j)("esri.layers.support.media.MediaElementView")],Ut);let Ht=class extends vt{constructor(t){super(t),this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):o.Z.getLogger(this.declaredClass).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{t.oncanplay=()=>{t.oncanplay=null,t.play().then(e,n)},"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src=t.src)}))}};(0,s._)([(0,h.Cb)({readOnly:!0})],Ht.prototype,"content",void 0),(0,s._)([(0,h.Cb)()],Ht.prototype,"video",null),Ht=(0,s._)([(0,d.j)("esri.layers.support.VideoElement")],Ht);const kt=Ht,Jt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Mt,video:kt}},Gt=i.Z.ofType(Jt);let $t=class extends(M.Z.LoadableMixin((0,Rt.v)((0,Pt.p)(Ct.Z.EventedAccessor)))){constructor(t){super(t),this._index=new At.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Ut({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,Ot.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Gt}async load(t){if((0,Et.k_)(t),!this.spatialReference){const t=this.elements.find((t=>(0,a.pC)(t.georeference)&&(0,a.pC)(t.georeference.coords)));this._set("spatialReference",t?(0,a.Wg)((0,a.Wg)(t.georeference).coords).spatialReference:X.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,wt.Z)(t,this._get("elements"),Gt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return(0,a.Wi)(t)?null:new mt.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):o.Z.getLogger(this.declaredClass).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,W.iQ)(t.spatialReference,this.spatialReference,null,e);const n=(0,Bt.fS)(t.spatialReference,this.spatialReference)?t:(0,W.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,It.oJ)(t),(({normalizedCoords:e,element:n})=>{(0,a.pC)(e)&&(0,St.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=(0,a.pC)(n);this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,h.Cb)()],$t.prototype,"elements",null),(0,s._)([(0,h.Cb)({readOnly:!0})],$t.prototype,"fullExtent",null),(0,s._)([(0,h.Cb)()],$t.prototype,"spatialReference",null),$t=(0,s._)([(0,d.j)("esri.layers.support.LocalMediaElementSource")],$t);const Qt=$t;function Kt(t){return"object"==typeof t&&null!=t&&"type"in t}let te=class extends((0,m.h)((0,g.M)((0,_.q)((0,l.R)(p.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new Qt}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=Kt(e)?new Qt({elements:new i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){(0,a.Wg)(this.effectiveSource)?.destroy(),(0,a.Wg)(this.source)?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):o.Z.getLogger(this.declaredClass).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)||t instanceof i.Z?new Qt({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Mt:"video"===e.mediaType?new kt:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&Kt(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"effectiveSource",void 0),(0,s._)([(0,h.Cb)({type:String})],te.prototype,"copyright",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,h.Cb)({type:["MediaLayer"]})],te.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.Cb)({type:["show","hide"]})],te.prototype,"listMode",void 0),(0,s._)([(0,h.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],te.prototype,"source",null),(0,s._)([(0,c.p)("source")],te.prototype,"castSource",null),(0,s._)([(0,u.r)("source",["url"])],te.prototype,"readSource",null),(0,s._)([(0,f.c)("source")],te.prototype,"writeSource",null),(0,s._)([(0,h.Cb)()],te.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"type",void 0),te=(0,s._)([(0,d.j)("esri.layers.MediaLayer")],te);const ee=te},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5764],{92835:(t,e,n)=>{n.d(e,{Z:()=>m});var s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return f}static get empty(){return p}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=(0,o.pC)(this.start)?this.start.getTime():this.start,n=(0,o.pC)(this.end)?this.end.getTime():this.end,s=(0,o.pC)(t.start)?t.start.getTime():t.start,i=(0,o.pC)(t.end)?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=(0,o.R2)(this.start,-1/0,(t=>t.getTime())),n=(0,o.R2)(this.end,1/0,(t=>t.getTime())),i=(0,o.R2)(t.start,-1/0,(t=>t.getTime())),r=(0,o.R2)(t.end,1/0,(t=>t.getTime()));let a,l;if(i>=e&&i<=n?a=i:e>=i&&e<=r&&(a=e),n>=i&&n<=r?l=n:r>=e&&r<=n&&(l=r),null!=a&&null!=l&&!isNaN(a)&&!isNaN(l)){const t=new s;return t.start=a===-1/0?null:new Date(a),t.end=l===1/0?null:new Date(l),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return(0,o.pC)(i)&&(n.start=(0,a.Nm)(i,t,e)),(0,o.pC)(r)&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return f.clone();const e=(0,o.pC)(this.start)&&(0,o.pC)(t.start)?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=(0,o.pC)(this.end)&&(0,o.pC)(t.end)?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),m=d},5732:(t,e,n)=>{n.d(e,{c:()=>s});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,f=h*r-o*l;let p=n*u+s*d+i*f;return p?(p=1/p,t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=f*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],f=n[1],p=n[2],m=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+f*o+p*h,t[1]=d*i+f*a+p*c,t[2]=d*r+f*l+p*u,t[3]=m*s+_*o+g*h,t[4]=m*i+_*a+g*c,t[5]=m*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,C=c*m-u*p,P=c*_-d*p,R=c*g-f*p,E=u*_-d*m,O=u*g-f*m,I=d*g-f*_;let S=y*I-x*O+v*E+b*R-M*P+w*C;return S?(S=1/S,t[0]=(a*I-l*O+h*E)*S,t[1]=(l*R-o*I-h*P)*S,t[2]=(o*O-a*R+h*C)*S,t[3]=(i*O-s*I-r*E)*S,t[4]=(n*I-i*R+r*P)*S,t[5]=(s*R-n*O-r*C)*S,t[6]=(m*w-_*M+g*b)*S,t[7]=(_*v-p*w-g*x)*S,t[8]=(p*M-m*v+g*y)*S,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const f=h,p=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],f=e[1],p=e[2],m=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=b*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(r-p)<=b*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-m)<=b*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,f=i*a,p=i*l,m=r*o,_=r*a,g=r*l;return t[0]=1-u-p,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-p,t[7]=f-m,t[2]=d-_,t[5]=f+m,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:f,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,f=h*r-o*l,p=n*u+s*d+i*f;if(!p)return null;const m=1/p;return t[0]=u*m,t[1]=(-c*s+i*h)*m,t[2]=(a*s-i*o)*m,t[3]=d*m,t[4]=(c*n-i*l)*m,t[5]=(-a*n+i*r)*m,t[6]=f*m,t[7]=(-h*n+s*l)*m,t[8]=(o*n-s*r)*m,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),f=Math.cos(n);return t[0]=f*s+d*o,t[1]=f*i+d*a,t[2]=f*r+d*l,t[3]=f*o-d*s,t[4]=f*a-d*i,t[5]=f*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:p,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],f=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+f*o+h,t[7]=d*i+f*a+c,t[8]=d*r+f*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o={},a={get exports(){return o},set exports(t){o=t}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],f=i,p=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);f<p;){for(e(n,f,p),f++,p--;o(n[f],d)<0;)f++;for(;o(n[p],d)>0;)p--}0===o(n[i],d)?e(n,i,p):e(n,++p,r),p<=s&&(i=p+1),s<=p&&(r=p-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=o},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>p,s:()=>i,t:()=>f});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function f(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function p(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const m=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:m,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:p,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:f,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{Z:()=>h,a:()=>s,c:()=>r,f:()=>i});const h=[0,0],c=o(),u=a(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:h,clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>c,j:()=>u});var s=n(43697),i=n(15923),r=(n(80442),n(22974)),o=(n(92604),n(70586)),a=n(31263),l=n(1153),h=n(52011);const c=t=>{let e=class extends t{clone(){const t=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),e=t.metadatas,n=t.store,s={},i=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const c=this[t];let u=null;u="function"==typeof h?h(c):"reference"===h?c:(0,r.Vo)(c),null!=c&&null==u||(l===a.s3.DEFAULTS?i.set(t,u):s[t]=u)}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,l.vw)(h)?.store;if(t)for(const[e,n]of i)t.set(e,n,a.s3.DEFAULTS)}return h}};return e=(0,s._)([(0,h.j)("esri.core.Clonable")],e),e};let u=class extends(c(i.Z)){};u=(0,s._)([(0,h.j)("esri.core.Clonable")],u)},46791:(t,e,n)=>{n.d(e,{Z:()=>S});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(5600),f=n(75215),p=n(52421),m=n(52011),_=n(58971),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof I?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const C=new Set,P=new Set,R=new Set,E=new Map;let O=0,I=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:O++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return(0,_.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,_.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,_.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,_.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._splice(0,this.length)||[];return this._emitAfterChanges(s.REMOVE),t}clone(){return(0,_.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,_.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,_.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,_.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,_.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,_.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,_.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,_.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,_.it)(this._observable),this._items[t]}getNextIndex(t){(0,_.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,_.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,_.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,_.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,_.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,_.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,_.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,_.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,_.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,_.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,_.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,_.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,_.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,_.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,_.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,_.it)(this._observable),this._items.some(t,e)}sort(t){if((0,_.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,_.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,_.it)(this._observable),this._items.slice()}toJSON(){return(0,_.it)(this._observable),this.toArray()}toLocaleString(){return(0,_.it)(this._observable),this._items.toLocaleString()}toString(){return(0,_.it)(this._observable),this._items.toString()}unshift(...t){return(0,_.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;C.clear(),P.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===P.size)for(const t of e)C.add(t);else for(const t of e)P.has(t)?(R.add(t),P.delete(t)):R.has(t)||C.add(t);if(n)if(0===R.size&&0===C.size)for(const t of n)P.add(t);else for(const t of n)C.has(t)?C.delete(t):(R.delete(t),P.add(t))}const n=r.Z.acquire();C.forEach((t=>{n.push(t)}));const s=r.Z.acquire();P.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}C.clear(),P.clear(),R.clear()}};I.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,f.se)(t):(0,f.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,m.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,d.Cb)()],I.prototype,"length",void 0),(0,i._)([(0,d.Cb)()],I.prototype,"items",null),I=c=(0,i._)([(0,m.j)("esri.core.Collection")],I);const S=I},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(15923),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new r.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},28659:(t,e,n)=>{n.d(e,{B:()=>m});var s=n(81153),i=n(17452),r=n(41123),o=n(7628),a=n(31263),l=n(5600);function h(t){return c[function(t){return t instanceof Blob?t.type:function(t){const e=(0,i.Ml)(t);return f[e]||u}(t.url)}(t)]||d}const c={},u="text/plain",d=c[u],f={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in f)c[f[t]]=t;var p=n(25929);function m(t){const e=t?.origins??[void 0];return(n,r)=>{const c=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,o.Oe)(e,n);return{type:String,read:(t,e,n)=>{const s=(0,p.r)(t,e,n);return r.type===String||r.json?.type===String?s:"function"==typeof r.type?new r.type({url:s}):void 0},write:{writer(e,o,l,c){if(!c||!c.resources)return"string"==typeof e?void(o[l]=(0,p.t)(e,c)):void(o[l]=e.write({},c));const u=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),d=(0,p.t)(u,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),f=r.type!==String&&(!(0,s.l)(this)||c&&c.origin&&this.originIdOf(n)>(0,a.M9)(c.origin)),m={object:this,propertyName:n,value:e,targetUrl:d,dest:o,targetPropertyName:l,context:c,params:t};c&&c.portalItem&&d&&!(0,i.YP)(d)?f?function(t){const{context:e,targetUrl:n,params:s,value:r,dest:o,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),c=y(r,n,e),u=h(c),d=(0,i.Ml)(l.path),f=s?.compress??!1;u===d?(e.resources&&g({...t,resource:l,content:c,compress:f,updates:e.resources.toUpdate}),o[a]=n):_(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:s}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[s]=e)}(m):c&&c.portalItem&&(null==d||null!=(0,p.i)(d)||(0,i.jc)(d)||f)?_(m):o[l]=d}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=p.a;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,l.CJ)(n,t,r);for(const t in c)e[t]=c[t]}}}function _(t){const{targetUrl:e,params:s,value:o,context:a,dest:l,targetPropertyName:c}=t;if(!a.portalItem)return;const u=(0,p.p)(e),d=u?.filename??(0,r.D)(),f=s?.prefix??u?.prefix,m=y(o,e,a),_=(0,i.v_)(f,d),x=`${_}.${h(m)}`,v=a.portalItem.resourceFromPath(x);(0,i.jc)(e)&&a.resources&&a.resources.pendingOperations.push(async function(t){const e=(await Promise.resolve().then(n.bind(n,3172))).default,{data:s}=await e(t,{responseType:"blob"});return s}(e).then((t=>{v.path=`${_}.${h(t)}`,l[c]=v.itemRelativeUrl})).catch((()=>{})));const b=s?.compress??!1;a.resources&&g({...t,resource:v,content:m,compress:b,updates:a.resources.toAdd}),l[c]=v.itemRelativeUrl}function g({object:t,propertyName:e,updates:n,resource:s,content:i,compress:r}){n.push({resource:s,content:i,compress:r,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function y(t,e,n){return"string"==typeof t?{url:e}:new Blob([JSON.stringify(t.toJSON(n))],{type:"application/json"})}},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=f(o),l=m(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=f(e)+f(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=p(r)+p(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=p(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=p(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},81153:(t,e,n)=>{function s(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{l:()=>s})},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,f)}function h(t,e,n={}){return c(t,e,n,p)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const f=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??f)])}))}(t,p,e)}function f(t){return!0}function p(t){return!!t}n(87538);const m={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(15923),r=n(61247),o=n(70586),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),{remove:()=>this._handles.remove(i)}}addPromise(t){if((0,o.Wi)(t))return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),{remove:()=>this._handles.remove(i)}}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},51201:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ee});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(70586),l=n(16453),h=n(5600),c=n(90578),u=(n(67676),n(71715)),d=n(52011),f=n(30556),p=n(87085),m=n(71612),_=n(38009),g=n(72965),y=n(3172),x=(n(75215),n(28659)),v=n(10699),b=n(96674),M=n(83379),w=n(15923),C=n(21787),P=n(46521),R=n(4307),E=n(17896);const O=(0,n(65617).c)(),I=(0,P.c)(),S=(0,P.c)(),B=(0,P.c)();function A(t,e,n){return(0,E.s)(O,e[0],e[1],1),(0,E.t)(O,O,(0,C.t)(I,n)),0===O[2]?(0,R.s)(t,O[0],O[1]):(0,R.s)(t,O[0]/O[2],O[1]/O[2])}function Z(t,e,n){return j(S,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),j(B,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,C.m)(t,(0,C.a)(S,S),B),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function j(t,e,n,s,i,r,o,a,l){(0,C.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(O,a,l,1),(0,C.a)(I,t);const[h,c,u]=(0,E.t)(O,O,(0,C.t)(I,I));return(0,C.s)(I,h,0,0,0,c,0,0,0,u),(0,C.m)(t,I,t)}var T=n(62357),D=n(97323),L=n(94139),Y=n(38913),W=n(44547),X=n(82971),N=n(2368);n(80442);let V=class extends N.j{projectOrWarn(t,e){if((0,a.Wi)(t))return t;const{geometry:n,pending:s}=(0,W.dz)(t,e);return s?null:s||n?n:(o.Z.getLogger(this.declaredClass).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};V=(0,s._)([(0,d.j)("esri.layers.support.GeoreferenceBase")],V);const q=V,z=(0,P.c)(),F=(0,D.a)();let U=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,h.Cb)()],U.prototype,"sourcePoint",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],U.prototype,"mapPoint",void 0),U=(0,s._)([(0,d.j)("esri.layers.support.ControlPoint")],U);let H=class extends((0,b.eC)(q)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=X.Z.fromJSON(e.spatialReference),s=(0,P.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if((0,a.Wi)(this.transform)){const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this.declaredClass).error(t.name,t.message)}else(0,a.pC)(t)&&k(t[0])&&(e.controlPoints=t.map((t=>{const e=(0,a.Wg)(t.sourcePoint);return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8))}get coords(){if((0,a.Wi)(this.controlPoints))return null;const t=this._updateTransform(z);if((0,a.Wi)(t)||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if((0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(t=this.projectOrWarn(t,e),(0,a.Wi)(t))return;const{width:n,height:s}=this,{rings:[[i,r,o,l]]}=t,h={sourcePoint:(0,T.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},c={sourcePoint:(0,T.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},u={sourcePoint:(0,T.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},d={sourcePoint:(0,T.vW)(n,s),mapPoint:new L.Z({x:l[0],y:l[1],spatialReference:e})};k(h)&&k(c)&&k(u)&&k(d)&&(rt(z,h,c,u,d),this.controlPoints=(0,a.Wg)(this.controlPoints).map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,z),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return(0,a.Wi)(this.transform)?null:(0,C.e)((0,P.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if((0,a.Wi)(t)||(0,a.Wi)(this.transform)||(0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if((0,a.Wi)(t)||(0,a.Wi)(this.inverseTransform)||(0,a.Wi)(this.controlPoints)||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),t=(0,W.dz)(t,e).geometry,(0,a.Wi)(t)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,T.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if((0,a.Wi)(e)||!(n>0)||!(s>0))return null;const[i,r,o,l]=e;if(!k(i))return null;const h=i.mapPoint.spatialReference,c=this._projectControlPoint(r,h),u=this._projectControlPoint(o,h),d=this._projectControlPoint(l,h);if(!c.valid||!u.valid||!d.valid)return null;if(!k(c.controlPoint))return null;(0,a.Wi)(t)&&(t=(0,P.c)());let f=null;return f=k(u.controlPoint)&&k(d.controlPoint)?rt(t,i,c.controlPoint,u.controlPoint,d.controlPoint):k(u.controlPoint)?function(t,e,n,s){return it(J,K,e),it(G,tt,n),it($,et,s),(0,R.l)(Q,J,G,.5),(0,R.r)(Q,$,Q,Math.PI),(0,R.l)(nt,K,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,c.controlPoint,u.controlPoint):function(t,e,n){return it(J,K,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(Q,J,G,st),(0,R.r)(et,tt,K,-st),(0,R.r)(nt,K,tt,-st),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,c.controlPoint),f.every((t=>0===t))?null:f}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,W.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this.declaredClass).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return(0,a.pC)(t)&&(0,a.pC)(t.sourcePoint)&&(0,a.pC)(t.mapPoint)}(0,s._)([(0,h.Cb)({type:[U],json:{write:{allowNull:!1,isRequired:!0}}})],H.prototype,"controlPoints",void 0),(0,s._)([(0,u.r)("controlPoints")],H.prototype,"readControlPoints",null),(0,s._)([(0,f.c)("controlPoints")],H.prototype,"writeControlPoints",null),(0,s._)([(0,h.Cb)()],H.prototype,"coords",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],H.prototype,"height",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,s._)([(0,h.Cb)({readOnly:!0})],H.prototype,"transform",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],H.prototype,"width",void 0),H=(0,s._)([(0,d.j)("esri.layers.support.ControlPointsGeoreference")],H);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),Q=(0,D.a)(),K=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,K,e),it(G,tt,n),it($,et,s),it(Q,nt,i),ht(t,J,G,$,Q,K,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=H;let ut=class extends q{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if((0,a.Wi)(t)||(0,a.Wi)(e)||(0,a.Wi)(n)||(0,a.Wi)(s))return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),(0,a.Wi)(e)||(0,a.Wi)(n)||(0,a.Wi)(s)?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if((0,a.Wi)(e))return;const n=e.spatialReference;if(t=this.projectOrWarn(t,n),(0,a.Wi)(t))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,h.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,h.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,d.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var ft=n(22021),pt=n(46851),mt=n(6570);let _t=class extends q{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if((0,a.Wi)(this.extent))return null;const{xmin:t,ymin:e,xmax:n,ymax:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if((0,a.Wi)(t)||(0,a.Wi)(this.extent))return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),(0,a.Wi)(t)||(0,a.Wi)(t.extent))return;const{rings:[[n,s,i]],extent:{center:{x:r,y:o}}}=t,l=(0,ft.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),h=gt(r,o,-l),[c,u]=h(n[0],n[1]),[d,f]=h(i[0],i[1]);this.extent=new mt.Z({xmin:c,ymin:u,xmax:d,ymax:f,spatialReference:e}),this.rotation=l}};function gt(t,e,n){const s=(0,pt.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,h.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,h.Cb)({type:mt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,h.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,d.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:q,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(){super(...arguments),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,h.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,u.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,h.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,d.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;let bt=class extends vt{constructor(t){super(t),this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,y.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}};(0,s._)([(0,h.Cb)({readOnly:!0})],bt.prototype,"content",void 0),(0,s._)([(0,h.Cb)({json:{name:"url",type:String}}),(0,x.B)({type:"resource",prefix:"media"})],bt.prototype,"image",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,json:{name:"mediaType"}})],bt.prototype,"type",void 0),bt=(0,s._)([(0,d.j)("esri.layers.support.ImageElement")],bt);const Mt=bt;n(66577);var wt=n(70921),Ct=n(32448),Pt=n(3920),Rt=n(609),Et=n(95330),Ot=n(17445),It=n(24470),St=n(87416),Bt=n(8744),At=n(37549),Zt=n(20322),jt=n(86662),Tt=n(33955),Dt=n(73913);function Lt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Dt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Dt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Dt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Dt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function Yt(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=Wt(t.xmin,e),{x:d,frameId:f}=Wt(t.xmax,e),p=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},p={xmin:l,ymin:s,xmax:0,ymax:i},m=[],_=[];Xt(t,a)&&m.push(u),Xt(t,p)&&_.push(u),Xt(e,a)&&m.push(f),Xt(e,p)&&_.push(f);for(let t=u+1;t<f;t++)m.push(t),_.push(t);n.push(new qt(t,[u]),new qt(e,[f]),new qt(a,m),new qt(p,_))}else c>d||p?n.push(new qt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new qt({xmin:l,ymin:s,xmax:d,ymax:i},[f])):n.push(new qt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}function Wt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function Xt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Nt(t,n,s)&&Nt(t,n,r)&&Nt(t,i,r)&&Nt(t,i,s)}function Nt(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Vt(t,e,n=!0){const s=!(0,Tt.l9)(t);if(s&&(0,jt.Zy)(t),n)return(new Ft).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class qt{constructor(t,e){this.extent=t,this.frameIds=e}}const zt=(0,It.Ue)();class Ft{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Ut=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return(0,a.Wi)(t)||(0,a.Wi)(t.extent)?null:(0,It.oJ)(t.extent)}get coords(){const t=(0,a.Wg)(this.element.georeference)?.coords;return(0,W.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if((0,a.Wi)(t))return null;const n=t.spatialReference,s=(0,Bt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Bt.sS)(n)?102100:4326,o=Dt.UZ[r].maxX,l=Dt.UZ[r].minX;if((0,Tt.wp)(i))return Lt(i,o,l);if((0,Tt.aW)(i))return i.points=i.points.map((t=>Lt(t,o,l))),i;if((0,Tt.YX)(i))return function(t,e){if(!e)return t;const n=Yt(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}(i,s);if((0,Tt.oU)(i)||(0,Tt.l9)(i)){const t=(0,Zt.$P)(zt,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Dt.XZ)(n.xmin,l)*(2*o),r=0===s?i:(0,Dt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Vt(r,o,e):n.xmin<l?Vt(r,l,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=(0,a.pC)(this.normalizedCoords)?this.normalizedCoords.extent:null;return(0,a.pC)(t)?(0,It.oJ)(t):null}};(0,s._)([(0,h.Cb)()],Ut.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)()],Ut.prototype,"element",void 0),(0,s._)([(0,h.Cb)()],Ut.prototype,"bounds",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"coords",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"normalizedCoords",null),(0,s._)([(0,h.Cb)()],Ut.prototype,"normalizedBounds",null),Ut=(0,s._)([(0,d.j)("esri.layers.support.media.MediaElementView")],Ut);let Ht=class extends vt{constructor(t){super(t),this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):o.Z.getLogger(this.declaredClass).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{t.oncanplay=()=>{t.oncanplay=null,t.play().then(e,n)},"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src=t.src)}))}};(0,s._)([(0,h.Cb)({readOnly:!0})],Ht.prototype,"content",void 0),(0,s._)([(0,h.Cb)()],Ht.prototype,"video",null),Ht=(0,s._)([(0,d.j)("esri.layers.support.VideoElement")],Ht);const kt=Ht,Jt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Mt,video:kt}},Gt=i.Z.ofType(Jt);let $t=class extends(M.Z.LoadableMixin((0,Rt.v)((0,Pt.p)(Ct.Z.EventedAccessor)))){constructor(t){super(t),this._index=new At.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Ut({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,Ot.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Gt}async load(t){if((0,Et.k_)(t),!this.spatialReference){const t=this.elements.find((t=>(0,a.pC)(t.georeference)&&(0,a.pC)(t.georeference.coords)));this._set("spatialReference",t?(0,a.Wg)((0,a.Wg)(t.georeference).coords).spatialReference:X.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,wt.Z)(t,this._get("elements"),Gt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return(0,a.Wi)(t)?null:new mt.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):o.Z.getLogger(this.declaredClass).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,W.iQ)(t.spatialReference,this.spatialReference,null,e);const n=(0,Bt.fS)(t.spatialReference,this.spatialReference)?t:(0,W.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,It.oJ)(t),(({normalizedCoords:e,element:n})=>{(0,a.pC)(e)&&(0,St.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=(0,a.pC)(n);this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,h.Cb)()],$t.prototype,"elements",null),(0,s._)([(0,h.Cb)({readOnly:!0})],$t.prototype,"fullExtent",null),(0,s._)([(0,h.Cb)()],$t.prototype,"spatialReference",null),$t=(0,s._)([(0,d.j)("esri.layers.support.LocalMediaElementSource")],$t);const Qt=$t;function Kt(t){return"object"==typeof t&&null!=t&&"type"in t}let te=class extends((0,m.h)((0,g.M)((0,_.q)((0,l.R)(p.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new Qt}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=Kt(e)?new Qt({elements:new i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){(0,a.Wg)(this.effectiveSource)?.destroy(),(0,a.Wg)(this.source)?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):o.Z.getLogger(this.declaredClass).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)||t instanceof i.Z?new Qt({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Mt:"video"===e.mediaType?new kt:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&Kt(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"effectiveSource",void 0),(0,s._)([(0,h.Cb)({type:String})],te.prototype,"copyright",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,h.Cb)({type:["MediaLayer"]})],te.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.Cb)({type:["show","hide"]})],te.prototype,"listMode",void 0),(0,s._)([(0,h.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],te.prototype,"source",null),(0,s._)([(0,c.p)("source")],te.prototype,"castSource",null),(0,s._)([(0,u.r)("source",["url"])],te.prototype,"readSource",null),(0,s._)([(0,f.c)("source")],te.prototype,"writeSource",null),(0,s._)([(0,h.Cb)()],te.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],te.prototype,"type",void 0),te=(0,s._)([(0,d.j)("esri.layers.MediaLayer")],te);const ee=te},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}}}]);