@arcgis/core 4.28.0-next.20230713 → 4.28.0-next.20230714

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.
Files changed (52) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{08ee2bd914867fd2cbd5.js → 490629c6f9fee501c9cd.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{044b15794b6403792f04.js → 4f079d0e69189c1d8bd9.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{3835a76c017431f19422.js → 51da3c5c50b153ce6bc7.js} +1 -1
  6. package/assets/esri/core/workers/chunks/b694126184f85a832b39.js +1 -0
  7. package/assets/esri/core/workers/chunks/b8a45b28a915a423d09d.js +1 -0
  8. package/assets/esri/core/workers/chunks/{55109f141c9f120833f6.js → c3d773c93efb41088c54.js} +1 -1
  9. package/assets/esri/core/workers/chunks/e433440fecd0114cb23d.js +1 -0
  10. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +3 -0
  11. package/assets/esri/themes/dark/main.css +1 -1
  12. package/assets/esri/themes/light/main.css +1 -1
  13. package/assets/esri/themes/light/view.css +1 -1
  14. package/chunks/RibbonLine.glsl.js +57 -72
  15. package/core/image/apng.js +1 -1
  16. package/core/image/gif.js +1 -1
  17. package/core/urlUtils.js +1 -1
  18. package/interfaces.d.ts +12 -0
  19. package/layers/support/ImageElement.js +1 -1
  20. package/layers/video/VideoController.js +1 -1
  21. package/package.json +1 -1
  22. package/support/BasemapStyle.js +5 -0
  23. package/support/basemapUtils.js +1 -1
  24. package/support/revision.js +1 -1
  25. package/views/2d/engine/webgl/Overlay.js +1 -1
  26. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  27. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  28. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  29. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  30. package/views/3d/interactive/editingTools/settings.js +1 -1
  31. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  32. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  33. package/views/3d/terrain/TerrainRenderer.js +1 -1
  34. package/views/3d/terrain/TerrainSurface.js +1 -1
  35. package/views/3d/terrain/Tile.js +1 -1
  36. package/views/3d/terrain/TileRenderer.js +1 -1
  37. package/views/3d/terrain/TileTexture.js +1 -1
  38. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +12 -13
  39. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  40. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  41. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  42. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  43. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  44. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  45. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  46. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  47. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  48. package/views/webgl/Texture.js +1 -1
  49. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  50. package/assets/esri/core/workers/chunks/308eeeaec591b4eea1de.js +0 -1
  51. package/assets/esri/core/workers/chunks/498dca81073e1fb477b9.js +0 -1
  52. package/assets/esri/core/workers/chunks/b2a0e3e1dfccda7ed12e.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>p});var i,s=n(43697),r=n(96674),o=n(35463),a=n(5600),l=(n(75215),n(67676),n(80442),n(71715)),u=n(52011),c=n(30556);let h=i=class extends r.wq{static get allTime(){return d}static get empty(){return m}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(i.allTime)}get isEmpty(){return this.equals(i.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 i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,i=null!=t.start?t.start.getTime():t.start,s=null!=t.end?t.end.getTime():t.end;return e===i&&n===s}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();let e=this.start;e&&(e=(0,o.JE)(e,t));let n=this.end;if(n){const e=(0,o.JE)(n,t);n=n.getTime()===e.getTime()?e:(0,o.Nm)(e,1,t)}return new i({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(s>=e&&s<=n?o=s:e>=s&&e<=r&&(o=e),n>=s&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new i;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return i.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:r}=this;return null!=s&&(n.start=(0,o.Nm)(s,t,e)),null!=r&&(n.end=(0,o.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 d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,s._)([(0,l.r)("end")],h.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],h.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,s._)([(0,l.r)("start")],h.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],h.prototype,"writeStart",null),h=i=(0,s._)([(0,u.j)("esri.TimeExtent")],h);const d=new h,m=new h({start:void 0,end:void 0}),p=h},5732:(t,e,n)=>{n.d(e,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{b:()=>l,c:()=>r,d:()=>c,e:()=>a,f:()=>s,i:()=>d,m:()=>u,t:()=>o});var i=n(46851);function s(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,i,s,r,o,a,l,u){return t[0]=e,t[1]=n,t[2]=i,t[3]=s,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=u,t}function o(t,e){if(t===e){const n=e[1],i=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=s}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],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=c*o-a*u,d=-c*r+a*l,m=u*r-o*l;let p=n*h+i*d+s*m;return p?(p=1/p,t[0]=h*p,t[1]=(-c*i+s*u)*p,t[2]=(a*i-s*o)*p,t[3]=d*p,t[4]=(c*n-s*l)*p,t[5]=(-a*n+s*r)*p,t[6]=m*p,t[7]=(-u*n+i*l)*p,t[8]=(o*n-i*r)*p,t):null}function l(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t[0]=o*c-a*u,t[1]=s*u-i*c,t[2]=i*a-s*o,t[3]=a*l-r*c,t[4]=n*c-s*l,t[5]=s*r-n*a,t[6]=r*u-o*l,t[7]=i*l-n*u,t[8]=n*o-i*r,t}function u(t,e,n){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=n[0],m=n[1],p=n[2],f=n[3],_=n[4],g=n[5],x=n[6],y=n[7],M=n[8];return t[0]=d*i+m*o+p*u,t[1]=d*s+m*a+p*c,t[2]=d*r+m*l+p*h,t[3]=f*i+_*o+g*u,t[4]=f*s+_*a+g*c,t[5]=f*r+_*l+g*h,t[6]=x*i+y*o+M*u,t[7]=x*s+y*a+M*c,t[8]=x*r+y*l+M*h,t}function c(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],m=e[11],p=e[12],f=e[13],_=e[14],g=e[15],x=n*a-i*o,y=n*l-s*o,M=n*u-r*o,v=i*l-s*a,b=i*u-r*a,w=s*u-r*l,P=c*f-h*p,R=c*_-d*p,C=c*g-m*p,I=h*_-d*f,B=h*g-m*f,T=d*g-m*_;let Z=x*T-y*B+M*I+v*C-b*R+w*P;return Z?(Z=1/Z,t[0]=(a*T-l*B+u*I)*Z,t[1]=(l*C-o*T-u*R)*Z,t[2]=(o*B-a*C+u*P)*Z,t[3]=(s*B-i*T-r*I)*Z,t[4]=(n*T-s*C+r*R)*Z,t[5]=(i*C-n*B-r*P)*Z,t[6]=(f*w-_*b+g*v)*Z,t[7]=(_*M-p*w-g*y)*Z,t[8]=(p*b-f*M+g*x)*Z,t):null}function h(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,i.g)(),n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(s*s+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+h*h))<=e}const m=u,p=h;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],i=t[2],s=t[3],r=t[4],o=t[5],a=t[6],l=t[7],u=t[8];return e*(u*r-o*l)+n*(-u*s+o*a)+i*(l*s-r*a)},equals:function(t,e){const n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=e[0],m=e[1],p=e[2],f=e[3],_=e[4],g=e[5],x=e[6],y=e[7],M=e[8],v=(0,i.g)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(s-m)<=v*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(r-p)<=v*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-f)<=v*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-_)<=v*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=v*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(u-x)<=v*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-y)<=v*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(h-M)<=v*Math.max(1,Math.abs(h),Math.abs(M))},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:s,fromQuat:function(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=n+n,a=i+i,l=s+s,u=n*o,c=i*o,h=i*a,d=s*o,m=s*a,p=s*l,f=r*o,_=r*a,g=r*l;return t[0]=1-h-p,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-u-p,t[7]=m-f,t[2]=d-_,t[5]=m+f,t[8]=1-u-h,t},fromRotation:function(t,e){const n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,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:m,multiply:u,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,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],i=e[1],s=e[2],r=e[4],o=e[5],a=e[6],l=e[8],u=e[9],c=e[10],h=c*o-a*u,d=-c*r+a*l,m=u*r-o*l,p=n*h+i*d+s*m;if(!p)return null;const f=1/p;return t[0]=h*f,t[1]=(-c*i+s*u)*f,t[2]=(a*i-s*o)*f,t[3]=d*f,t[4]=(c*n-s*l)*f,t[5]=(-a*n+s*r)*f,t[6]=m*f,t[7]=(-u*n+i*l)*f,t[8]=(o*n-i*r)*f,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 i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*i+d*o,t[1]=m*s+d*a,t[2]=m*r+d*l,t[3]=m*o-d*i,t[4]=m*a-d*s,t[5]=m*l-d*r,t[6]=u,t[7]=c,t[8]=h,t},scale:function(t,e,n){const i=n[0],s=n[1],r=n[2];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const i=n[0],s=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*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:h,translate:function(t,e,n){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=n[0],m=n[1];return t[0]=i,t[1]=s,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*i+m*o+u,t[7]=d*s+m*a+c,t[8]=d*r+m*l+h,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var i,s,r,o=n(5732),a={exports:{}};i=a,s=function(){function t(n,i,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,l=i-s+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(s,Math.floor(i-l*c/a+h)),Math.min(r,Math.floor(i+(a-l)*c/a+h)),o)}var d=n[i],m=s,p=r;for(e(n,s,i),o(n[r],d)>0&&e(n,s,r);m<p;){for(e(n,m,p),m++,p--;o(n[m],d)<0;)m++;for(;o(n[p],d)>0;)p--}0===o(n[s],d)?e(n,s,p):e(n,++p,r),p<=i&&(s=p+1),i<=p&&(r=p-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}return function(e,i,s,r,o){t(e,i,s||0,r||e.length-1,o||n)}},void 0!==(r=s())&&(i.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>p,s:()=>s,t:()=>m});var i=n(46851);function s(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],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function u(t,e){const n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,i){const s=e[0],r=e[1];return t[0]=s+i*(n[0]-s),t[1]=r+i*(n[1]-r),t}function m(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[2]*s+n[4],t[1]=n[1]*i+n[3]*s+n[5],t}function p(t,e,n,i){const s=e[0]-n[0],r=e[1]-n[1],o=Math.sin(i),a=Math.cos(i);return t[0]=s*a-r*o+n[0],t[1]=s*o+r*a+n[1],t}const f=c,_=r,g=o,x=a,y=l,M=u,v=h;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],i=t[1],s=e[0],r=e[1];let o=n*n+i*i;o>0&&(o=1/Math.sqrt(o));let a=s*s+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*s+i*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 i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},dist:y,distance:l,div:x,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],s=t[1],r=e[0],o=e[1],a=(0,i.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(s-o)<=a*Math.max(1,Math.abs(s),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:f,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],i=e[1];let s=n*n+i*i;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t},projectAndScale:function(t,e,n,i,s){let r=e[0]-n[0],o=e[1]-n[1];const a=(i[0]*r+i[1]*o)*(s-1);return r=i[0]*a,o=i[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,i.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,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:s,sqrDist:M,sqrLen:v,squaredDistance:u,squaredLength:h,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[2]*s,t[1]=n[1]*i+n[3]*s,t},transformMat2d:m,transformMat3:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[3]*s+n[6],t[1]=n[1]*i+n[4]*s+n[7],t},transformMat4:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[4]*s+n[12],t[1]=n[1]*i+n[5]*s+n[13],t}},Symbol.toStringTag,{value:"Module"}))},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>s});var i=n(46791);function s(t,e,n=i.Z){return e||(e=new n),e===t||(e.removeAll(),(s=t)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?e.addMany(t):t&&e.add(t)),e;var s}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>o});var i=n(67676),s=n(44553),r=n(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=h,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(),y.prune(),M.prune(),v.prune(),b.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const i=this._toBBox;if(g(t,n))for(y.clear();n;){for(let s=0,r=n.children.length;s<r;s++){const r=n.children[s],o=n.leaf?i(r):r;g(t,o)&&(n.leaf?e(r):_(t,o)?this._all(r,e):y.push(r))}n=y.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!g(t,e))return!1;for(y.clear();e;){for(let i=0,s=e.children.length;i<s;i++){const s=e.children[i],r=e.leaf?n(s):s;if(g(t,r)){if(e.leaf||_(t,r))return!0;y.push(s)}}e=y.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,s=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),b.clear();n||v.length>0;){if(n||(n=v.pop(),s=v.data[v.length-1],r=b.pop()??0,o=!0),n.leaf&&(e=(0,i.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),v.push(n),this._condense(v),this;o||n.leaf||!_(n,a)?s?(r++,n=s.children[r],o=!1):n=null:(v.push(n),b.push(r),r=0,s=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(M.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else M.pushArray(n.children);n=M.pop()??null}}_build(t,e,n,i){const s=n-e+1;let r=this._maxEntries;if(s<=r){const i=new R(t.slice(e,n+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(i-1)));const o=new C([]);o.height=i;const l=Math.ceil(s/r),u=l*Math.ceil(Math.sqrt(r));x(t,e,n,u,this._compareMinX);for(let s=e;s<=n;s+=u){const e=Math.min(s+u-1,n);x(t,s,e,l,this._compareMinY);for(let n=s;n<=e;n+=l){const s=Math.min(n+l-1,e);o.children.push(this._build(t,n,s,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,s=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=p(t,o)-a;l<s?(s=l,i=a<i?a:i,n=o):l===s&&a<i&&(i=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const i=this._toBBox,s=n?t:i(t);v.clear();const r=this._chooseSubtree(s,this._data,e,v);for(r.children.push(t),u(r,s);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(s,v,e)}_split(t,e){const n=t.data[e],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const r=this._chooseSplitIndex(n,s,i);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),l=n.leaf?new R(o):new C(o);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new C([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,s,r;i=s=1/0;for(let o=e;o<=n-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,n,this._toBBox),u=f(e,a),c=d(e)+d(a);u<i?(i=u,r=o,s=c<s?c:s):u===i&&c<s&&(s=c,r=o)}return r}_chooseSplitAxis(t,e,n){const i=t.leaf?this._compareMinX:c,s=t.leaf?this._compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,s)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);const s=this._toBBox,r=l(t,0,e,s),o=l(t,n-e,n,s);let a=m(r)+m(o);for(let i=e;i<n-e;i++){const e=t.children[i];u(r,t.leaf?s(e):e),a+=m(r)}for(let i=n-e-1;i>=e;i--){const e=t.children[i];u(o,t.leaf?s(e):e),a+=m(o)}return a}_adjustParentBBoxes(t,e,n){for(let i=n;i>=0;i--)u(e.data[i],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 s=t.data[e-1],r=s.children;r.splice((0,i.cq)(r,n,r.length,s.indexHint),1)}else this.clear();else a(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 a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,i,s){s||(s=new R([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],u(s,t.leaf?i(r):r);return s}function u(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 c(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(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 f(t,e){const n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-n)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,i,s){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=i)continue;const a=n+Math.ceil((e-n)/i/2)*i;(0,r.q)(t,a,n,e,s),o.push(n,a,a,e)}}const y=new s.Z,M=new s.Z,v=new s.Z,b=new s.Z({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class C extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>_,on:()=>h,tX:()=>g}),n(66643),n(46791);var i=n(91460),s=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function u(t,e,n={}){return c(t,e,n,p)}function c(t,e,n={},i){let s=null;const o=n.once?(t,n)=>{i(t)&&((0,r.hw)(s),e(t,n))}:(t,n)=>{i(t)&&e(t,n)};if(s=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return s}function h(t,e,n,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{h(),(0,i.vT)(t)&&(a=t,u=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,s.kB)((()=>{m.remove(),h()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,s.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??m)])}))}(t,p,e)}function m(t){return!0}function p(t){return!!t}n(87538);const f={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={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 i=new Date(t.getTime());if(e&&n){const t=s[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()}(i.getFullYear(),i.getMonth()+e);i.getDate()>t&&i.setDate(t)}i[o](i[r]()+e*a)}return i}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*i[e]/i[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>s,z:()=>r});const i="randomUUID"in crypto;function s(){if(i)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)}function r(){return`{${s()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>u});var i=n(58901),s=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=u(t);for(const t of n)for(const n of t)n[0]+=e;return t}function u(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>se});var i=n(43697),s=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),u=n(90578),c=(n(67676),n(80442),n(71715)),h=n(52011),d=n(30556),m=n(87085),p=n(71612),f=n(38009),_=n(72965),g=n(3172),x=n(79790),y=n(17452),M=n(41123),v=(n(75215),n(10699)),b=n(96674),w=n(83379),P=n(92036),R=n(21787),C=n(46521),I=n(4307),B=n(17896);const T=(0,n(65617).c)(),Z=(0,C.c)(),S=(0,C.c)(),Y=(0,C.c)();function j(t,e,n){return(0,B.s)(T,e[0],e[1],1),(0,B.t)(T,T,(0,R.t)(Z,n)),0===T[2]?(0,I.s)(t,T[0],T[1]):(0,I.s)(t,T[0]/T[2],T[1]/T[2])}function E(t,e,n){return X(S,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),X(Y,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,R.m)(t,(0,R.b)(S,S),Y),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 X(t,e,n,i,s,r,o,a,l){(0,R.c)(t,e,i,r,n,s,o,1,1,1),(0,B.s)(T,a,l,1),(0,R.b)(Z,t);const[u,c,h]=(0,B.t)(T,T,(0,R.t)(Z,Z));return(0,R.c)(Z,u,0,0,0,c,0,0,0,h),(0,R.m)(t,Z,t)}var O=n(62357),L=n(97323),D=n(94139),A=n(38913),F=n(44547),q=n(82971),z=n(2368);let H=class extends z.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:i}=(0,F.dz)(t,e);return i?null:i||n?n:(o.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};H=(0,i._)([(0,h.j)("esri.layers.support.GeoreferenceBase")],H);const N=H,V=(0,C.c)(),W=(0,L.a)();let U=class extends P.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,i._)([(0,l.Cb)()],U.prototype,"sourcePoint",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],U.prototype,"mapPoint",void 0),U=(0,i._)([(0,h.j)("esri.layers.support.ControlPoint")],U);let k=class extends((0,b.eC)(N)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=q.Z.fromJSON(e.spatialReference),i=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,I.s)(W,t.x,t.y),j(W,W,i),{sourcePoint:t,mapPoint:new D.Z({x:W[0],y:W[1],spatialReference:n})})))}writeControlPoints(t,e,n,i){if(null!=this.transform)null!=t&&J(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(V);if(null==t||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,i){const s=(0,L.f)(0,n),r=(0,L.f)(0,0),o=(0,L.f)(e,0),a=(0,L.f)(e,n);return j(s,s,t),j(r,r,t),j(o,o,t),j(a,a,t),new A.Z({rings:[[s,r,o,a,s]],spatialReference:i})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!J(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:i}=this,{rings:[[s,r,o,a]]}=t,l={sourcePoint:(0,O.vW)(0,i),mapPoint:new D.Z({x:s[0],y:s[1],spatialReference:e})},u={sourcePoint:(0,O.vW)(0,0),mapPoint:new D.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,O.vW)(n,0),mapPoint:new D.Z({x:o[0],y:o[1],spatialReference:e})},h={sourcePoint:(0,O.vW)(n,i),mapPoint:new D.Z({x:a[0],y:a[1],spatialReference:e})};J(l)&&J(u)&&J(c)&&J(h)&&(ot(V,l,u,c,h),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,I.s)(W,t.x,t.y),j(W,W,V),{sourcePoint:t,mapPoint:new D.Z({x:W[0],y:W[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,R.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!J(this.controlPoints[0]))return null;(0,I.s)(W,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return j(W,W,this.transform),new D.Z({x:W[0],y:W[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,F.dz)(t,e).geometry)?null:((0,I.s)(W,t.x,t.y),j(W,W,this.inverseTransform),(0,O.vW)(W[0],W[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:i}=this;if(!(null!=e&&n>0&&i>0))return null;const[s,r,o,a]=e;if(!J(s))return null;const l=s.mapPoint.spatialReference,u=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),h=this._projectControlPoint(a,l);if(!u.valid||!c.valid||!h.valid)return null;if(!J(u.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=J(c.controlPoint)&&J(h.controlPoint)?ot(t,s,u.controlPoint,c.controlPoint,h.controlPoint):J(c.controlPoint)?function(t,e,n,i){return rt(G,tt,e),rt(K,et,n),rt($,nt,i),(0,I.l)(Q,G,K,.5),(0,I.r)(Q,$,Q,Math.PI),(0,I.l)(it,tt,et,.5),(0,I.r)(it,nt,it,Math.PI),ct(t,G,K,$,Q,tt,et,nt,it)}(t,s,u.controlPoint,c.controlPoint):function(t,e,n){return rt(G,tt,e),rt(K,et,n),(0,I.r)($,K,G,st),(0,I.r)(Q,G,K,st),(0,I.r)(nt,et,tt,-st),(0,I.r)(it,tt,et,-st),ct(t,G,K,$,Q,tt,et,nt,it)}(t,s,u.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!J(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:i}=t,{geometry:s,pending:r}=(0,F.dz)(i,e);return r?{valid:!1,controlPoint:null}:r||s?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:s}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:i.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function J(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,i._)([(0,l.Cb)({type:[U],json:{write:{allowNull:!1,isRequired:!0}}})],k.prototype,"controlPoints",void 0),(0,i._)([(0,c.r)("controlPoints")],k.prototype,"readControlPoints",null),(0,i._)([(0,d.c)("controlPoints")],k.prototype,"writeControlPoints",null),(0,i._)([(0,l.Cb)()],k.prototype,"coords",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"height",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"inverseTransform",null),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"transform",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"width",void 0),k=(0,i._)([(0,h.j)("esri.layers.support.ControlPointsGeoreference")],k);const G=(0,L.a)(),K=(0,L.a)(),$=(0,L.a)(),Q=(0,L.a)(),tt=(0,L.a)(),et=(0,L.a)(),nt=(0,L.a)(),it=(0,L.a)(),st=Math.PI/2;function rt(t,e,n){(0,I.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,I.s)(e,n.mapPoint.x,n.mapPoint.y)}function ot(t,e,n,i,s){return rt(G,tt,e),rt(K,et,n),rt($,nt,i),rt(Q,it,s),ct(t,G,K,$,Q,tt,et,nt,it)}const at=new Array(8).fill(0),lt=new Array(8).fill(0);function ut(t,e,n,i,s){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=i[0],t[5]=i[1],t[6]=s[0],t[7]=s[1],t}function ct(t,e,n,i,s,r,o,a,l){return E(t,ut(at,e,n,i,s),ut(lt,r,o,a,l))}const ht=k;let dt=class extends N{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:i}=this;if(null==t||null==e||null==n||null==i)return null;const s=t.spatialReference;return e=this.projectOrWarn(e,s),n=this.projectOrWarn(n,s),i=this.projectOrWarn(i,s),null==e||null==n||null==i?null:new A.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[i.x,i.y],[n.x,n.y]]],spatialReference:s})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[i,s,r,o]]}=t;this.bottomLeft=new D.Z({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new D.Z({x:s[0],y:s[1],spatialReference:n}),this.topRight=new D.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new D.Z({x:o[0],y:o[1],spatialReference:n})}};(0,i._)([(0,l.Cb)()],dt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"bottomLeft",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"bottomRight",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"topLeft",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"topRight",void 0),dt=(0,i._)([(0,h.j)("esri.layers.support.CornersGeoreference")],dt);const mt=dt;var pt=n(22021),ft=n(46851),_t=n(6570);let gt=class extends N{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:s}=this.extent;let r;if(this.rotation){const{x:s,y:o}=this.extent.center,a=xt(s,o,this.rotation);r=[a(t,e),a(t,i),a(n,i),a(n,e)],r.push(r[0])}else r=[[t,e],[t,i],[n,i],[n,e],[t,e]];return new A.Z({rings:[r],spatialReference:s})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(null==(t=this.projectOrWarn(t,e))||null==t.extent)return;const{rings:[[n,i,s]],extent:{center:{x:r,y:o}}}=t,a=(0,pt.BV)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=xt(r,o,-a),[u,c]=l(n[0],n[1]),[h,d]=l(s[0],s[1]);this.extent=new _t.Z({xmin:u,ymin:c,xmax:h,ymax:d,spatialReference:e}),this.rotation=a}};function xt(t,e,n){const i=(0,ft.t)(n),s=Math.cos(i),r=Math.sin(i);return(n,i)=>[s*(n-t)+r*(i-e)+t,s*(i-e)-r*(n-t)+e]}(0,i._)([(0,l.Cb)()],gt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:_t.Z})],gt.prototype,"extent",void 0),(0,i._)([(0,l.Cb)({type:Number})],gt.prototype,"rotation",void 0),gt=(0,i._)([(0,h.j)("esri.layers.support.ExtentAndRotationGeoreference")],gt);const yt={key:"type",base:N,typeMap:{"control-points":ht,corners:mt,"extent-and-rotation":gt}};let Mt=class extends((0,v.iv)((0,b.eC)(w.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ht.fromJSON(t)}};(0,i._)([(0,l.Cb)({types:yt,json:{write:!0}})],Mt.prototype,"georeference",void 0),(0,i._)([(0,c.r)("georeference")],Mt.prototype,"readGeoreference",null),(0,i._)([(0,l.Cb)()],Mt.prototype,"opacity",void 0),Mt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementBase")],Mt);const vt=Mt;var bt=n(66094),wt=n(25929);let Pt=class extends vt{constructor(t){super(t),this.animatedProperties=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,x.n$)(t).then((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)}readImage(t,e,n){return(0,wt.f)(e.url,n)}writeImage(t,e,n,i){if(null==t)return;const s=i?.portalItem,r=i?.resources;if(!s||!r)return void("string"==typeof t&&(e[n]=(0,wt.t)(t,i)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,wt.i)(o))return void(e[n]=o);const t=(0,wt.t)(o,{...i,verifyItemRelativeUrls:i&&i.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},wt.M.NO);if(s&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:s.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const i=function(t,e){const n=(0,M.D)(),i=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(i)}(t,s);e[n]=i.itemRelativeUrl,r.toAdd.push({resource:i,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,i._)([(0,l.Cb)()],Pt.prototype,"animatedProperties",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Pt.prototype,"content",void 0),(0,i._)([(0,l.Cb)({json:{name:"url",type:String}})],Pt.prototype,"image",void 0),(0,i._)([(0,c.r)("image",["url"])],Pt.prototype,"readImage",null),(0,i._)([(0,d.c)("image")],Pt.prototype,"writeImage",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],Pt.prototype,"type",void 0),Pt=(0,i._)([(0,h.j)("esri.layers.support.ImageElement")],Pt);const Rt=Pt;async function Ct(t){if("string"==typeof t){if((0,y.jc)(t)){const{data:e}=await(0,g.default)(t,{responseType:"blob"});return e}return(0,y.HK)(t)?(0,y.fw)(t):Ct((await(0,g.default)(t,{responseType:"image"})).data)}return new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=n,t instanceof HTMLImageElement?s.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&s.putImageData(t,0,0),i}(t).toBlob(e)))}n(66577);var It=n(70921),Bt=n(32448),Tt=n(609),Zt=n(95330),St=n(17445),Yt=n(24470),jt=n(87416),Et=n(8744),Xt=n(37549),Ot=n(20322),Lt=n(86662),Dt=n(33955),At=n(73913);function Ft(t,e,n){if(Array.isArray(t)){const i=t[0];if(i>e){const n=(0,At.XZ)(i,e);t[0]=i+n*(-2*e)}else if(i<n){const e=(0,At.XZ)(i,n);t[0]=i+e*(-2*n)}}else{const i=t.x;if(i>e){const n=(0,At.XZ)(i,e);t.x+=n*(-2*e)}else if(i<n){const e=(0,At.XZ)(i,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const n=[],{ymin:i,ymax:s,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,u]=e.valid,{x:c,frameId:h}=zt(t.xmin,e),{x:d,frameId:m}=zt(t.xmax,e),p=c===d&&a>0;if(a>2*u){const t={xmin:r<o?c:d,ymin:i,xmax:u,ymax:s},e={xmin:l,ymin:i,xmax:r<o?d:c,ymax:s},a={xmin:0,ymin:i,xmax:u,ymax:s},p={xmin:l,ymin:i,xmax:0,ymax:s},f=[],_=[];Ht(t,a)&&f.push(h),Ht(t,p)&&_.push(h),Ht(e,a)&&f.push(m),Ht(e,p)&&_.push(m);for(let t=h+1;t<m;t++)f.push(t),_.push(t);n.push(new Wt(t,[h]),new Wt(e,[m]),new Wt(a,f),new Wt(p,_))}else c>d||p?n.push(new Wt({xmin:c,ymin:i,xmax:u,ymax:s},[h]),new Wt({xmin:l,ymin:i,xmax:d,ymax:s},[m])):n.push(new Wt({xmin:c,ymin:i,xmax:d,ymax:s},[h]));return n}function zt(t,e){const[n,i]=e.valid,s=2*i;let r,o=0;return t>i?(r=Math.ceil(Math.abs(t-i)/s),t-=r*s,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/s),t+=r*s,o=-r),{x:t,frameId:o}}function Ht(t,e){const{xmin:n,ymin:i,xmax:s,ymax:r}=e;return Nt(t,n,i)&&Nt(t,n,r)&&Nt(t,s,r)&&Nt(t,s,i)}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 i=!(0,Dt.l9)(t);if(i&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const s=i?t.rings:t.paths,r=i?4:2,o=s.length,a=-2*e;for(let t=0;t<o;t++){const e=s[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);s.push(t)}}return i?t.rings=s:t.paths=s,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,Yt.Ue)();class kt{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 i=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=i;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 i=t.length;i>1&&t[i-1][0]===e&&t[i-2][0]===e?t[i-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 Jt=class extends P.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,Yt.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,F.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return A.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,Et.C5)(n),s=(0,b.AK)(t)?t.toJSON():t;if(!i)return s;const r=(0,Et.sS)(n)?102100:4326,o=At.UZ[r].maxX,a=At.UZ[r].minX;if((0,Dt.wp)(s))return Ft(s,o,a);if((0,Dt.aW)(s))return s.points=s.points.map((t=>Ft(t,o,a))),s;if((0,Dt.YX)(s))return function(t,e){if(!e)return t;const n=qt(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]]))}}(s,i);if((0,Dt.oU)(s)||(0,Dt.l9)(s)){const t=(0,Ot.$P)(Ut,s),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},i=(0,At.XZ)(n.xmin,a)*(2*o),r=0===i?s:(0,At.Sy)(s,i);return n.xmin+=i,n.xmax+=i,n.xmax>o?Vt(r,o,e):n.xmin<a?Vt(r,a,e):r}return s}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Yt.oJ)(t):null}};(0,i._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementView")],Jt);let Gt=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).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,i._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,i._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,i._)([(0,h.j)("esri.layers.support.VideoElement")],Gt);const Kt=Gt,$t={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Rt,video:Kt}},Qt=s.Z.ofType($t);let te=class extends(w.Z.LoadableMixin((0,Tt.v)(Bt.Z.EventedAccessor))){constructor(t){super(t),this._index=new Xt.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.removeHandles(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 Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const i=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.addHandles(i,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Qt}async load(t){if((0,Zt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference&&null!=t.georeference.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:q.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,It.Z)(t,this._get("elements"),Qt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new _t.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).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,F.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Et.fS)(t.spatialReference,this.spatialReference)?t:(0,F.iV)(t,this.spatialReference);if(!n)return[];const i=n.normalize(),s=[];for(const t of i)this._index.forEachInBounds((0,Yt.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,jt.Nl)(t,e)&&s.push(n)}));return s.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),s}_updateIndexForElement(t,e){const n=t.normalizedBounds,i=this._index.has(t),s=null!=n;this._index.delete(t),s&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(i!==s?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,i._)([(0,l.Cb)()],te.prototype,"elements",null),(0,i._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,i._)([(0,h.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let ie=class extends((0,p.h)((0,_.M)((0,f.q)((0,a.R)(m.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ee}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=ne(e)?new ee({elements:new s.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const i=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(i),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),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).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ee({elements:new s.Z(t)}):t instanceof s.Z?new ee({elements:t}):t:null}readSource(t,e,n){const i="image"===e.mediaType?new Rt:"video"===e.mediaType?new Kt:null;return i?.read(e,n),i}writeSource(t,e,n,i){t&&ne(t)&&"image"===t.type?t.write(e,i):i?.messages&&i?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"effectiveSource",void 0),(0,i._)([(0,l.Cb)({type:String})],ie.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)({type:["MediaLayer"]})],ie.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],ie.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],ie.prototype,"source",null),(0,i._)([(0,u.p)("source")],ie.prototype,"castSource",null),(0,i._)([(0,c.r)("source",["url"])],ie.prototype,"readSource",null),(0,i._)([(0,d.c)("source")],ie.prototype,"writeSource",null),(0,i._)([(0,l.Cb)()],ie.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"type",void 0),ie=(0,i._)([(0,h.j)("esri.layers.MediaLayer")],ie);const se=ie},37549:(t,e,n)=>{n.d(e,{H:()=>a});var i=n(80442),s=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 s.Q(9,(0,i.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,i)=>{t[e++]=i})),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()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>s});var i=n(17452);function s(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,i.Ml)(t);return l[e]||o}(t.url)}(t)]||a}const r={},o="text/plain",a=r[o],l={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 l)r[l[t]]=t}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>p});var i,s=n(43697),r=n(96674),o=n(35463),a=n(5600),l=(n(75215),n(67676),n(80442),n(71715)),u=n(52011),c=n(30556);let h=i=class extends r.wq{static get allTime(){return d}static get empty(){return m}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(i.allTime)}get isEmpty(){return this.equals(i.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 i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,i=null!=t.start?t.start.getTime():t.start,s=null!=t.end?t.end.getTime():t.end;return e===i&&n===s}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();let e=this.start;e&&(e=(0,o.JE)(e,t));let n=this.end;if(n){const e=(0,o.JE)(n,t);n=n.getTime()===e.getTime()?e:(0,o.Nm)(e,1,t)}return new i({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(s>=e&&s<=n?o=s:e>=s&&e<=r&&(o=e),n>=s&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new i;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return i.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:r}=this;return null!=s&&(n.start=(0,o.Nm)(s,t,e)),null!=r&&(n.end=(0,o.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 d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,s._)([(0,l.r)("end")],h.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],h.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,s._)([(0,l.r)("start")],h.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],h.prototype,"writeStart",null),h=i=(0,s._)([(0,u.j)("esri.TimeExtent")],h);const d=new h,m=new h({start:void 0,end:void 0}),p=h},5732:(t,e,n)=>{n.d(e,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{b:()=>l,c:()=>r,d:()=>c,e:()=>a,f:()=>s,i:()=>d,m:()=>u,t:()=>o});var i=n(46851);function s(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,i,s,r,o,a,l,u){return t[0]=e,t[1]=n,t[2]=i,t[3]=s,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=u,t}function o(t,e){if(t===e){const n=e[1],i=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=s}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],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=c*o-a*u,d=-c*r+a*l,m=u*r-o*l;let p=n*h+i*d+s*m;return p?(p=1/p,t[0]=h*p,t[1]=(-c*i+s*u)*p,t[2]=(a*i-s*o)*p,t[3]=d*p,t[4]=(c*n-s*l)*p,t[5]=(-a*n+s*r)*p,t[6]=m*p,t[7]=(-u*n+i*l)*p,t[8]=(o*n-i*r)*p,t):null}function l(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t[0]=o*c-a*u,t[1]=s*u-i*c,t[2]=i*a-s*o,t[3]=a*l-r*c,t[4]=n*c-s*l,t[5]=s*r-n*a,t[6]=r*u-o*l,t[7]=i*l-n*u,t[8]=n*o-i*r,t}function u(t,e,n){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=n[0],m=n[1],p=n[2],f=n[3],_=n[4],g=n[5],x=n[6],y=n[7],M=n[8];return t[0]=d*i+m*o+p*u,t[1]=d*s+m*a+p*c,t[2]=d*r+m*l+p*h,t[3]=f*i+_*o+g*u,t[4]=f*s+_*a+g*c,t[5]=f*r+_*l+g*h,t[6]=x*i+y*o+M*u,t[7]=x*s+y*a+M*c,t[8]=x*r+y*l+M*h,t}function c(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],m=e[11],p=e[12],f=e[13],_=e[14],g=e[15],x=n*a-i*o,y=n*l-s*o,M=n*u-r*o,v=i*l-s*a,b=i*u-r*a,w=s*u-r*l,P=c*f-h*p,R=c*_-d*p,C=c*g-m*p,I=h*_-d*f,B=h*g-m*f,T=d*g-m*_;let Z=x*T-y*B+M*I+v*C-b*R+w*P;return Z?(Z=1/Z,t[0]=(a*T-l*B+u*I)*Z,t[1]=(l*C-o*T-u*R)*Z,t[2]=(o*B-a*C+u*P)*Z,t[3]=(s*B-i*T-r*I)*Z,t[4]=(n*T-s*C+r*R)*Z,t[5]=(i*C-n*B-r*P)*Z,t[6]=(f*w-_*b+g*v)*Z,t[7]=(_*M-p*w-g*y)*Z,t[8]=(p*b-f*M+g*x)*Z,t):null}function h(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,i.g)(),n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(s*s+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+h*h))<=e}const m=u,p=h;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],i=t[2],s=t[3],r=t[4],o=t[5],a=t[6],l=t[7],u=t[8];return e*(u*r-o*l)+n*(-u*s+o*a)+i*(l*s-r*a)},equals:function(t,e){const n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=e[0],m=e[1],p=e[2],f=e[3],_=e[4],g=e[5],x=e[6],y=e[7],M=e[8],v=(0,i.g)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(s-m)<=v*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(r-p)<=v*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-f)<=v*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-_)<=v*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=v*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(u-x)<=v*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-y)<=v*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(h-M)<=v*Math.max(1,Math.abs(h),Math.abs(M))},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:s,fromQuat:function(t,e){const n=e[0],i=e[1],s=e[2],r=e[3],o=n+n,a=i+i,l=s+s,u=n*o,c=i*o,h=i*a,d=s*o,m=s*a,p=s*l,f=r*o,_=r*a,g=r*l;return t[0]=1-h-p,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-u-p,t[7]=m-f,t[2]=d-_,t[5]=m+f,t[8]=1-u-h,t},fromRotation:function(t,e){const n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,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:m,multiply:u,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,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],i=e[1],s=e[2],r=e[4],o=e[5],a=e[6],l=e[8],u=e[9],c=e[10],h=c*o-a*u,d=-c*r+a*l,m=u*r-o*l,p=n*h+i*d+s*m;if(!p)return null;const f=1/p;return t[0]=h*f,t[1]=(-c*i+s*u)*f,t[2]=(a*i-s*o)*f,t[3]=d*f,t[4]=(c*n-s*l)*f,t[5]=(-a*n+s*r)*f,t[6]=m*f,t[7]=(-u*n+i*l)*f,t[8]=(o*n-i*r)*f,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 i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*i+d*o,t[1]=m*s+d*a,t[2]=m*r+d*l,t[3]=m*o-d*i,t[4]=m*a-d*s,t[5]=m*l-d*r,t[6]=u,t[7]=c,t[8]=h,t},scale:function(t,e,n){const i=n[0],s=n[1],r=n[2];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const i=n[0],s=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*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:h,translate:function(t,e,n){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=n[0],m=n[1];return t[0]=i,t[1]=s,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*i+m*o+u,t[7]=d*s+m*a+c,t[8]=d*r+m*l+h,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var i,s,r,o=n(5732),a={exports:{}};i=a,s=function(){function t(n,i,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,l=i-s+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(s,Math.floor(i-l*c/a+h)),Math.min(r,Math.floor(i+(a-l)*c/a+h)),o)}var d=n[i],m=s,p=r;for(e(n,s,i),o(n[r],d)>0&&e(n,s,r);m<p;){for(e(n,m,p),m++,p--;o(n[m],d)<0;)m++;for(;o(n[p],d)>0;)p--}0===o(n[s],d)?e(n,s,p):e(n,++p,r),p<=i&&(s=p+1),i<=p&&(r=p-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}return function(e,i,s,r,o){t(e,i,s||0,r||e.length-1,o||n)}},void 0!==(r=s())&&(i.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>p,s:()=>s,t:()=>m});var i=n(46851);function s(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],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function u(t,e){const n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,i){const s=e[0],r=e[1];return t[0]=s+i*(n[0]-s),t[1]=r+i*(n[1]-r),t}function m(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[2]*s+n[4],t[1]=n[1]*i+n[3]*s+n[5],t}function p(t,e,n,i){const s=e[0]-n[0],r=e[1]-n[1],o=Math.sin(i),a=Math.cos(i);return t[0]=s*a-r*o+n[0],t[1]=s*o+r*a+n[1],t}const f=c,_=r,g=o,x=a,y=l,M=u,v=h;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],i=t[1],s=e[0],r=e[1];let o=n*n+i*i;o>0&&(o=1/Math.sqrt(o));let a=s*s+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*s+i*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 i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},dist:y,distance:l,div:x,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],s=t[1],r=e[0],o=e[1],a=(0,i.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(s-o)<=a*Math.max(1,Math.abs(s),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:f,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],i=e[1];let s=n*n+i*i;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t},projectAndScale:function(t,e,n,i,s){let r=e[0]-n[0],o=e[1]-n[1];const a=(i[0]*r+i[1]*o)*(s-1);return r=i[0]*a,o=i[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,i.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,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:s,sqrDist:M,sqrLen:v,squaredDistance:u,squaredLength:h,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[2]*s,t[1]=n[1]*i+n[3]*s,t},transformMat2d:m,transformMat3:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[3]*s+n[6],t[1]=n[1]*i+n[4]*s+n[7],t},transformMat4:function(t,e,n){const i=e[0],s=e[1];return t[0]=n[0]*i+n[4]*s+n[12],t[1]=n[1]*i+n[5]*s+n[13],t}},Symbol.toStringTag,{value:"Module"}))},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>s});var i=n(46791);function s(t,e,n=i.Z){return e||(e=new n),e===t||(e.removeAll(),(s=t)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?e.addMany(t):t&&e.add(t)),e;var s}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>o});var i=n(67676),s=n(44553),r=n(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=h,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(),y.prune(),M.prune(),v.prune(),b.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const i=this._toBBox;if(g(t,n))for(y.clear();n;){for(let s=0,r=n.children.length;s<r;s++){const r=n.children[s],o=n.leaf?i(r):r;g(t,o)&&(n.leaf?e(r):_(t,o)?this._all(r,e):y.push(r))}n=y.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!g(t,e))return!1;for(y.clear();e;){for(let i=0,s=e.children.length;i<s;i++){const s=e.children[i],r=e.leaf?n(s):s;if(g(t,r)){if(e.leaf||_(t,r))return!0;y.push(s)}}e=y.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,s=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),b.clear();n||v.length>0;){if(n||(n=v.pop(),s=v.data[v.length-1],r=b.pop()??0,o=!0),n.leaf&&(e=(0,i.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),v.push(n),this._condense(v),this;o||n.leaf||!_(n,a)?s?(r++,n=s.children[r],o=!1):n=null:(v.push(n),b.push(r),r=0,s=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(M.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else M.pushArray(n.children);n=M.pop()??null}}_build(t,e,n,i){const s=n-e+1;let r=this._maxEntries;if(s<=r){const i=new R(t.slice(e,n+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(i-1)));const o=new C([]);o.height=i;const l=Math.ceil(s/r),u=l*Math.ceil(Math.sqrt(r));x(t,e,n,u,this._compareMinX);for(let s=e;s<=n;s+=u){const e=Math.min(s+u-1,n);x(t,s,e,l,this._compareMinY);for(let n=s;n<=e;n+=l){const s=Math.min(n+l-1,e);o.children.push(this._build(t,n,s,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,s=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=p(t,o)-a;l<s?(s=l,i=a<i?a:i,n=o):l===s&&a<i&&(i=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const i=this._toBBox,s=n?t:i(t);v.clear();const r=this._chooseSubtree(s,this._data,e,v);for(r.children.push(t),u(r,s);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(s,v,e)}_split(t,e){const n=t.data[e],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const r=this._chooseSplitIndex(n,s,i);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),l=n.leaf?new R(o):new C(o);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new C([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,s,r;i=s=1/0;for(let o=e;o<=n-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,n,this._toBBox),u=f(e,a),c=d(e)+d(a);u<i?(i=u,r=o,s=c<s?c:s):u===i&&c<s&&(s=c,r=o)}return r}_chooseSplitAxis(t,e,n){const i=t.leaf?this._compareMinX:c,s=t.leaf?this._compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,s)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);const s=this._toBBox,r=l(t,0,e,s),o=l(t,n-e,n,s);let a=m(r)+m(o);for(let i=e;i<n-e;i++){const e=t.children[i];u(r,t.leaf?s(e):e),a+=m(r)}for(let i=n-e-1;i>=e;i--){const e=t.children[i];u(o,t.leaf?s(e):e),a+=m(o)}return a}_adjustParentBBoxes(t,e,n){for(let i=n;i>=0;i--)u(e.data[i],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 s=t.data[e-1],r=s.children;r.splice((0,i.cq)(r,n,r.length,s.indexHint),1)}else this.clear();else a(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 a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,i,s){s||(s=new R([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],u(s,t.leaf?i(r):r);return s}function u(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 c(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(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 f(t,e){const n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-n)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,i,s){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=i)continue;const a=n+Math.ceil((e-n)/i/2)*i;(0,r.q)(t,a,n,e,s),o.push(n,a,a,e)}}const y=new s.Z,M=new s.Z,v=new s.Z,b=new s.Z({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class C extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>_,on:()=>h,tX:()=>g}),n(66643),n(46791);var i=n(91460),s=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function u(t,e,n={}){return c(t,e,n,p)}function c(t,e,n={},i){let s=null;const o=n.once?(t,n)=>{i(t)&&((0,r.hw)(s),e(t,n))}:(t,n)=>{i(t)&&e(t,n)};if(s=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return s}function h(t,e,n,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{h(),(0,i.vT)(t)&&(a=t,u=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,s.kB)((()=>{m.remove(),h()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,s.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??m)])}))}(t,p,e)}function m(t){return!0}function p(t){return!!t}n(87538);const f={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={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 i=new Date(t.getTime());if(e&&n){const t=s[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()}(i.getFullYear(),i.getMonth()+e);i.getDate()>t&&i.setDate(t)}i[o](i[r]()+e*a)}return i}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*i[e]/i[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>s,z:()=>r});const i="randomUUID"in crypto;function s(){if(i)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)}function r(){return`{${s()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>u});var i=n(58901),s=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=u(t);for(const t of n)for(const n of t)n[0]+=e;return t}function u(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>se});var i=n(43697),s=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),u=n(90578),c=(n(67676),n(80442),n(71715)),h=n(52011),d=n(30556),m=n(87085),p=n(71612),f=n(38009),_=n(72965),g=n(3172),x=n(79790),y=n(17452),M=n(41123),v=(n(75215),n(10699)),b=n(96674),w=n(83379),P=n(92036),R=n(21787),C=n(46521),I=n(4307),B=n(17896);const T=(0,n(65617).c)(),Z=(0,C.c)(),S=(0,C.c)(),Y=(0,C.c)();function j(t,e,n){return(0,B.s)(T,e[0],e[1],1),(0,B.t)(T,T,(0,R.t)(Z,n)),0===T[2]?(0,I.s)(t,T[0],T[1]):(0,I.s)(t,T[0]/T[2],T[1]/T[2])}function E(t,e,n){return O(S,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),O(Y,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,R.m)(t,(0,R.b)(S,S),Y),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 O(t,e,n,i,s,r,o,a,l){(0,R.c)(t,e,i,r,n,s,o,1,1,1),(0,B.s)(T,a,l,1),(0,R.b)(Z,t);const[u,c,h]=(0,B.t)(T,T,(0,R.t)(Z,Z));return(0,R.c)(Z,u,0,0,0,c,0,0,0,h),(0,R.m)(t,Z,t)}var X=n(62357),L=n(97323),D=n(94139),A=n(38913),F=n(44547),q=n(82971),z=n(2368);let H=class extends z.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:i}=(0,F.dz)(t,e);return i?null:i||n?n:(o.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};H=(0,i._)([(0,h.j)("esri.layers.support.GeoreferenceBase")],H);const N=H,V=(0,C.c)(),W=(0,L.a)();let U=class extends P.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,i._)([(0,l.Cb)()],U.prototype,"sourcePoint",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],U.prototype,"mapPoint",void 0),U=(0,i._)([(0,h.j)("esri.layers.support.ControlPoint")],U);let k=class extends((0,b.eC)(N)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=q.Z.fromJSON(e.spatialReference),i=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,I.s)(W,t.x,t.y),j(W,W,i),{sourcePoint:t,mapPoint:new D.Z({x:W[0],y:W[1],spatialReference:n})})))}writeControlPoints(t,e,n,i){if(null!=this.transform)null!=t&&J(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(V);if(null==t||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,i){const s=(0,L.f)(0,n),r=(0,L.f)(0,0),o=(0,L.f)(e,0),a=(0,L.f)(e,n);return j(s,s,t),j(r,r,t),j(o,o,t),j(a,a,t),new A.Z({rings:[[s,r,o,a,s]],spatialReference:i})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!J(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:i}=this,{rings:[[s,r,o,a]]}=t,l={sourcePoint:(0,X.vW)(0,i),mapPoint:new D.Z({x:s[0],y:s[1],spatialReference:e})},u={sourcePoint:(0,X.vW)(0,0),mapPoint:new D.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,X.vW)(n,0),mapPoint:new D.Z({x:o[0],y:o[1],spatialReference:e})},h={sourcePoint:(0,X.vW)(n,i),mapPoint:new D.Z({x:a[0],y:a[1],spatialReference:e})};J(l)&&J(u)&&J(c)&&J(h)&&(ot(V,l,u,c,h),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,I.s)(W,t.x,t.y),j(W,W,V),{sourcePoint:t,mapPoint:new D.Z({x:W[0],y:W[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,R.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!J(this.controlPoints[0]))return null;(0,I.s)(W,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return j(W,W,this.transform),new D.Z({x:W[0],y:W[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,F.dz)(t,e).geometry)?null:((0,I.s)(W,t.x,t.y),j(W,W,this.inverseTransform),(0,X.vW)(W[0],W[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:i}=this;if(!(null!=e&&n>0&&i>0))return null;const[s,r,o,a]=e;if(!J(s))return null;const l=s.mapPoint.spatialReference,u=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),h=this._projectControlPoint(a,l);if(!u.valid||!c.valid||!h.valid)return null;if(!J(u.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=J(c.controlPoint)&&J(h.controlPoint)?ot(t,s,u.controlPoint,c.controlPoint,h.controlPoint):J(c.controlPoint)?function(t,e,n,i){return rt(G,tt,e),rt(K,et,n),rt($,nt,i),(0,I.l)(Q,G,K,.5),(0,I.r)(Q,$,Q,Math.PI),(0,I.l)(it,tt,et,.5),(0,I.r)(it,nt,it,Math.PI),ct(t,G,K,$,Q,tt,et,nt,it)}(t,s,u.controlPoint,c.controlPoint):function(t,e,n){return rt(G,tt,e),rt(K,et,n),(0,I.r)($,K,G,st),(0,I.r)(Q,G,K,st),(0,I.r)(nt,et,tt,-st),(0,I.r)(it,tt,et,-st),ct(t,G,K,$,Q,tt,et,nt,it)}(t,s,u.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!J(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:i}=t,{geometry:s,pending:r}=(0,F.dz)(i,e);return r?{valid:!1,controlPoint:null}:r||s?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:s}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:i.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function J(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,i._)([(0,l.Cb)({type:[U],json:{write:{allowNull:!1,isRequired:!0}}})],k.prototype,"controlPoints",void 0),(0,i._)([(0,c.r)("controlPoints")],k.prototype,"readControlPoints",null),(0,i._)([(0,d.c)("controlPoints")],k.prototype,"writeControlPoints",null),(0,i._)([(0,l.Cb)()],k.prototype,"coords",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"height",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"inverseTransform",null),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"transform",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"width",void 0),k=(0,i._)([(0,h.j)("esri.layers.support.ControlPointsGeoreference")],k);const G=(0,L.a)(),K=(0,L.a)(),$=(0,L.a)(),Q=(0,L.a)(),tt=(0,L.a)(),et=(0,L.a)(),nt=(0,L.a)(),it=(0,L.a)(),st=Math.PI/2;function rt(t,e,n){(0,I.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,I.s)(e,n.mapPoint.x,n.mapPoint.y)}function ot(t,e,n,i,s){return rt(G,tt,e),rt(K,et,n),rt($,nt,i),rt(Q,it,s),ct(t,G,K,$,Q,tt,et,nt,it)}const at=new Array(8).fill(0),lt=new Array(8).fill(0);function ut(t,e,n,i,s){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=i[0],t[5]=i[1],t[6]=s[0],t[7]=s[1],t}function ct(t,e,n,i,s,r,o,a,l){return E(t,ut(at,e,n,i,s),ut(lt,r,o,a,l))}const ht=k;let dt=class extends N{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:i}=this;if(null==t||null==e||null==n||null==i)return null;const s=t.spatialReference;return e=this.projectOrWarn(e,s),n=this.projectOrWarn(n,s),i=this.projectOrWarn(i,s),null==e||null==n||null==i?null:new A.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[i.x,i.y],[n.x,n.y]]],spatialReference:s})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[i,s,r,o]]}=t;this.bottomLeft=new D.Z({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new D.Z({x:s[0],y:s[1],spatialReference:n}),this.topRight=new D.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new D.Z({x:o[0],y:o[1],spatialReference:n})}};(0,i._)([(0,l.Cb)()],dt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"bottomLeft",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"bottomRight",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"topLeft",void 0),(0,i._)([(0,l.Cb)({type:D.Z})],dt.prototype,"topRight",void 0),dt=(0,i._)([(0,h.j)("esri.layers.support.CornersGeoreference")],dt);const mt=dt;var pt=n(22021),ft=n(46851),_t=n(6570);let gt=class extends N{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:s}=this.extent;let r;if(this.rotation){const{x:s,y:o}=this.extent.center,a=xt(s,o,this.rotation);r=[a(t,e),a(t,i),a(n,i),a(n,e)],r.push(r[0])}else r=[[t,e],[t,i],[n,i],[n,e],[t,e]];return new A.Z({rings:[r],spatialReference:s})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(null==(t=this.projectOrWarn(t,e))||null==t.extent)return;const{rings:[[n,i,s]],extent:{center:{x:r,y:o}}}=t,a=(0,pt.BV)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=xt(r,o,-a),[u,c]=l(n[0],n[1]),[h,d]=l(s[0],s[1]);this.extent=new _t.Z({xmin:u,ymin:c,xmax:h,ymax:d,spatialReference:e}),this.rotation=a}};function xt(t,e,n){const i=(0,ft.t)(n),s=Math.cos(i),r=Math.sin(i);return(n,i)=>[s*(n-t)+r*(i-e)+t,s*(i-e)-r*(n-t)+e]}(0,i._)([(0,l.Cb)()],gt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:_t.Z})],gt.prototype,"extent",void 0),(0,i._)([(0,l.Cb)({type:Number})],gt.prototype,"rotation",void 0),gt=(0,i._)([(0,h.j)("esri.layers.support.ExtentAndRotationGeoreference")],gt);const yt={key:"type",base:N,typeMap:{"control-points":ht,corners:mt,"extent-and-rotation":gt}};let Mt=class extends((0,v.iv)((0,b.eC)(w.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ht.fromJSON(t)}};(0,i._)([(0,l.Cb)({types:yt,json:{write:!0}})],Mt.prototype,"georeference",void 0),(0,i._)([(0,c.r)("georeference")],Mt.prototype,"readGeoreference",null),(0,i._)([(0,l.Cb)()],Mt.prototype,"opacity",void 0),Mt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementBase")],Mt);const vt=Mt;var bt=n(66094),wt=n(25929);let Pt=class extends vt{constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,x.n$)(t).then((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)}readImage(t,e,n){return(0,wt.f)(e.url,n)}writeImage(t,e,n,i){if(null==t)return;const s=i?.portalItem,r=i?.resources;if(!s||!r)return void("string"==typeof t&&(e[n]=(0,wt.t)(t,i)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,wt.i)(o))return void(e[n]=o);const t=(0,wt.t)(o,{...i,verifyItemRelativeUrls:i&&i.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},wt.M.NO);if(s&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:s.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const i=function(t,e){const n=(0,M.D)(),i=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(i)}(t,s);e[n]=i.itemRelativeUrl,r.toAdd.push({resource:i,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,i._)([(0,l.Cb)()],Pt.prototype,"animationOptions",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Pt.prototype,"content",void 0),(0,i._)([(0,l.Cb)({json:{name:"url",type:String}})],Pt.prototype,"image",void 0),(0,i._)([(0,c.r)("image",["url"])],Pt.prototype,"readImage",null),(0,i._)([(0,d.c)("image")],Pt.prototype,"writeImage",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],Pt.prototype,"type",void 0),Pt=(0,i._)([(0,h.j)("esri.layers.support.ImageElement")],Pt);const Rt=Pt;async function Ct(t){if("string"==typeof t){if((0,y.jc)(t)){const{data:e}=await(0,g.default)(t,{responseType:"blob"});return e}return(0,y.HK)(t)?(0,y.fw)(t):Ct((await(0,g.default)(t,{responseType:"image"})).data)}return new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=n,t instanceof HTMLImageElement?s.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&s.putImageData(t,0,0),i}(t).toBlob(e)))}n(66577);var It=n(70921),Bt=n(32448),Tt=n(609),Zt=n(95330),St=n(17445),Yt=n(24470),jt=n(87416),Et=n(8744),Ot=n(37549),Xt=n(20322),Lt=n(86662),Dt=n(33955),At=n(73913);function Ft(t,e,n){if(Array.isArray(t)){const i=t[0];if(i>e){const n=(0,At.XZ)(i,e);t[0]=i+n*(-2*e)}else if(i<n){const e=(0,At.XZ)(i,n);t[0]=i+e*(-2*n)}}else{const i=t.x;if(i>e){const n=(0,At.XZ)(i,e);t.x+=n*(-2*e)}else if(i<n){const e=(0,At.XZ)(i,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const n=[],{ymin:i,ymax:s,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,u]=e.valid,{x:c,frameId:h}=zt(t.xmin,e),{x:d,frameId:m}=zt(t.xmax,e),p=c===d&&a>0;if(a>2*u){const t={xmin:r<o?c:d,ymin:i,xmax:u,ymax:s},e={xmin:l,ymin:i,xmax:r<o?d:c,ymax:s},a={xmin:0,ymin:i,xmax:u,ymax:s},p={xmin:l,ymin:i,xmax:0,ymax:s},f=[],_=[];Ht(t,a)&&f.push(h),Ht(t,p)&&_.push(h),Ht(e,a)&&f.push(m),Ht(e,p)&&_.push(m);for(let t=h+1;t<m;t++)f.push(t),_.push(t);n.push(new Wt(t,[h]),new Wt(e,[m]),new Wt(a,f),new Wt(p,_))}else c>d||p?n.push(new Wt({xmin:c,ymin:i,xmax:u,ymax:s},[h]),new Wt({xmin:l,ymin:i,xmax:d,ymax:s},[m])):n.push(new Wt({xmin:c,ymin:i,xmax:d,ymax:s},[h]));return n}function zt(t,e){const[n,i]=e.valid,s=2*i;let r,o=0;return t>i?(r=Math.ceil(Math.abs(t-i)/s),t-=r*s,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/s),t+=r*s,o=-r),{x:t,frameId:o}}function Ht(t,e){const{xmin:n,ymin:i,xmax:s,ymax:r}=e;return Nt(t,n,i)&&Nt(t,n,r)&&Nt(t,s,r)&&Nt(t,s,i)}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 i=!(0,Dt.l9)(t);if(i&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const s=i?t.rings:t.paths,r=i?4:2,o=s.length,a=-2*e;for(let t=0;t<o;t++){const e=s[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);s.push(t)}}return i?t.rings=s:t.paths=s,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,Yt.Ue)();class kt{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 i=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=i;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 i=t.length;i>1&&t[i-1][0]===e&&t[i-2][0]===e?t[i-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 Jt=class extends P.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,Yt.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,F.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return A.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,Et.C5)(n),s=(0,b.AK)(t)?t.toJSON():t;if(!i)return s;const r=(0,Et.sS)(n)?102100:4326,o=At.UZ[r].maxX,a=At.UZ[r].minX;if((0,Dt.wp)(s))return Ft(s,o,a);if((0,Dt.aW)(s))return s.points=s.points.map((t=>Ft(t,o,a))),s;if((0,Dt.YX)(s))return function(t,e){if(!e)return t;const n=qt(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]]))}}(s,i);if((0,Dt.oU)(s)||(0,Dt.l9)(s)){const t=(0,Xt.$P)(Ut,s),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},i=(0,At.XZ)(n.xmin,a)*(2*o),r=0===i?s:(0,At.Sy)(s,i);return n.xmin+=i,n.xmax+=i,n.xmax>o?Vt(r,o,e):n.xmin<a?Vt(r,a,e):r}return s}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Yt.oJ)(t):null}};(0,i._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementView")],Jt);let Gt=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).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,i._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,i._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,i._)([(0,h.j)("esri.layers.support.VideoElement")],Gt);const Kt=Gt,$t={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Rt,video:Kt}},Qt=s.Z.ofType($t);let te=class extends(w.Z.LoadableMixin((0,Tt.v)(Bt.Z.EventedAccessor))){constructor(t){super(t),this._index=new Ot.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.removeHandles(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 Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const i=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.addHandles(i,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Qt}async load(t){if((0,Zt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference&&null!=t.georeference.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:q.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,It.Z)(t,this._get("elements"),Qt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new _t.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).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,F.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Et.fS)(t.spatialReference,this.spatialReference)?t:(0,F.iV)(t,this.spatialReference);if(!n)return[];const i=n.normalize(),s=[];for(const t of i)this._index.forEachInBounds((0,Yt.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,jt.Nl)(t,e)&&s.push(n)}));return s.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),s}_updateIndexForElement(t,e){const n=t.normalizedBounds,i=this._index.has(t),s=null!=n;this._index.delete(t),s&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(i!==s?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,i._)([(0,l.Cb)()],te.prototype,"elements",null),(0,i._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,i._)([(0,h.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let ie=class extends((0,p.h)((0,_.M)((0,f.q)((0,a.R)(m.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ee}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=ne(e)?new ee({elements:new s.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const i=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(i),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),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).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ee({elements:new s.Z(t)}):t instanceof s.Z?new ee({elements:t}):t:null}readSource(t,e,n){const i="image"===e.mediaType?new Rt:"video"===e.mediaType?new Kt:null;return i?.read(e,n),i}writeSource(t,e,n,i){t&&ne(t)&&"image"===t.type?t.write(e,i):i?.messages&&i?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"effectiveSource",void 0),(0,i._)([(0,l.Cb)({type:String})],ie.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)({type:["MediaLayer"]})],ie.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],ie.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],ie.prototype,"source",null),(0,i._)([(0,u.p)("source")],ie.prototype,"castSource",null),(0,i._)([(0,c.r)("source",["url"])],ie.prototype,"readSource",null),(0,i._)([(0,d.c)("source")],ie.prototype,"writeSource",null),(0,i._)([(0,l.Cb)()],ie.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],ie.prototype,"type",void 0),ie=(0,i._)([(0,h.j)("esri.layers.MediaLayer")],ie);const se=ie},37549:(t,e,n)=>{n.d(e,{H:()=>a});var i=n(80442),s=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 s.Q(9,(0,i.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,i)=>{t[e++]=i})),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()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>s});var i=n(17452);function s(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,i.Ml)(t);return l[e]||o}(t.url)}(t)]||a}const r={},o="text/plain",a=r[o],l={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 l)r[l[t]]=t}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6399],{46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,r,n,i,a,o,s,u){return[e,t,r,n,i,a,o,s,u]}function a(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>a,c:()=>n,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:a,fromValues:i},Symbol.toStringTag,{value:"Module"}))},97323:(e,t,r)=>{function n(){return[0,0]}function i(e,t){return[e,t]}function a(e,t){return new Float64Array(e,t,2)}function o(){return i(1,1)}function s(){return i(1,0)}function u(){return i(0,1)}r.d(t,{a:()=>n,c:()=>a,f:()=>i});const c=o(),l=s(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:l,UNIT_Y:d,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:n,createView:a,fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:o,unitX:s,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},79790:(e,t,r)=>{r.d(t,{n$:()=>C,Jl:()=>I});var n,i=r(3172),a=r(20102),o=r(95330),s=r(17452),u=r(5732),c={exports:{}};n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isNotPNG=function(e){return e===a},t.isNotAPNG=function(e){return e===o},t.default=function(e){var t=new Uint8Array(e);if(Array.prototype.some.call(s,(function(e,r){return e!==t[r]})))return a;var r=!1;if(u(t,(function(e){return!(r="acTL"===e)})),!r)return o;var n=[],c=[],h=null,p=null,m=0,g=new i.APNG;if(u(t,(function(e,t,r,a){var o=new DataView(t.buffer);switch(e){case"IHDR":h=t.subarray(r+8,r+8+a),g.width=o.getUint32(r+8),g.height=o.getUint32(r+12);break;case"acTL":g.numPlays=o.getUint32(r+8+4);break;case"fcTL":p&&(g.frames.push(p),m++),(p=new i.Frame).width=o.getUint32(r+8+4),p.height=o.getUint32(r+8+8),p.left=o.getUint32(r+8+12),p.top=o.getUint32(r+8+16);var s=o.getUint16(r+8+20),u=o.getUint16(r+8+22);0===u&&(u=100),p.delay=1e3*s/u,p.delay<=10&&(p.delay=100),g.playTime+=p.delay,p.disposeOp=o.getUint8(r+8+24),p.blendOp=o.getUint8(r+8+25),p.dataParts=[],0===m&&2===p.disposeOp&&(p.disposeOp=1);break;case"fdAT":p&&p.dataParts.push(t.subarray(r+8+4,r+8+a));break;case"IDAT":p&&p.dataParts.push(t.subarray(r+8,r+8+a));break;case"IEND":c.push(l(t,r,12+a));break;default:n.push(l(t,r,12+a))}})),p&&g.frames.push(p),0==g.frames.length)return o;var y=new Blob(n),v=new Blob(c);return g.frames.forEach((function(e){var t=[];t.push(s),h.set(f(e.width),0),h.set(f(e.height),4),t.push(d("IHDR",h)),t.push(y),e.dataParts.forEach((function(e){return t.push(d("IDAT",e))})),t.push(v),e.imageData=new Blob(t,{type:"image/png"}),delete e.dataParts,t=null})),g};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1)),i=r(2),a=new Error("Not a PNG"),o=new Error("Not an animated PNG"),s=new Uint8Array([137,80,78,71,13,10,26,10]);function u(e,t){var r=new DataView(e.buffer),n=8,i=void 0,a=void 0,o=void 0;do{a=r.getUint32(n),o=t(i=c(e,n+4,4),e,n,a),n+=12+a}while(!1!==o&&"IEND"!=i&&n<e.length)}function c(e,t,r){var n=Array.prototype.slice.call(e.subarray(t,t+r));return String.fromCharCode.apply(String,n)}function l(e,t,r){var n=new Uint8Array(r);return n.set(e.subarray(t,t+r)),n}var d=function(e,t){var r=e.length+t.length,i=new Uint8Array(r+8),a=new DataView(i.buffer);a.setUint32(0,t.length),i.set(function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(e),4),i.set(t,8);var o=(0,n.default)(i,4,r);return a.setUint32(r+4,o),i},f=function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,i=t,a=t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t);i<a;i++)n=n>>>8^r[255&(n^e[i])];return-1^n};for(var r=new Uint32Array(256),n=0;n<256;n++){for(var i=n,a=0;a<8;a++)i=0!=(1&i)?3988292384^i>>>1:i>>>1;r[n]=i}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Frame=t.APNG=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(3));function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.APNG=function(){function e(){a(this,e),this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[]}return n(e,[{key:"createImages",value:function(){return Promise.all(this.frames.map((function(e){return e.createImage()})))}},{key:"getPlayer",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createImages().then((function(){return new i.default(t,e,r)}))}}]),e}(),t.Frame=function(){function e(){a(this,e),this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.imageData=null,this.imageElement=null}return n(e,[{key:"createImage",value:function(){var e=this;return this.imageElement?Promise.resolve():new Promise((function(t,r){var n=URL.createObjectURL(e.imageData);e.imageElement=document.createElement("img"),e.imageElement.onload=function(){URL.revokeObjectURL(n),t()},e.imageElement.onerror=function(){URL.revokeObjectURL(n),e.imageElement=null,r(new Error("Image creation error"))},e.imageElement.src=n}))}}]),e}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){function t(e,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.playbackRate=1,i._currentFrameNumber=0,i._ended=!1,i._paused=!0,i._numPlays=0,i._apng=e,i.context=r,i.stop(),n&&i.play(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"renderNextFrame",value:function(){this._currentFrameNumber=(this._currentFrameNumber+1)%this._apng.frames.length,this._currentFrameNumber===this._apng.frames.length-1&&(this._numPlays++,0!==this._apng.numPlays&&this._numPlays>=this._apng.numPlays&&(this._ended=!0,this._paused=!0)),this._prevFrame&&1==this._prevFrame.disposeOp?this.context.clearRect(this._prevFrame.left,this._prevFrame.top,this._prevFrame.width,this._prevFrame.height):this._prevFrame&&2==this._prevFrame.disposeOp&&this.context.putImageData(this._prevFrameData,this._prevFrame.left,this._prevFrame.top);var e=this.currentFrame;this._prevFrame=e,this._prevFrameData=null,2==e.disposeOp&&(this._prevFrameData=this.context.getImageData(e.left,e.top,e.width,e.height)),0==e.blendOp&&this.context.clearRect(e.left,e.top,e.width,e.height),this.context.drawImage(e.imageElement,e.left,e.top),this.emit("frame",this._currentFrameNumber),this._ended&&this.emit("end")}},{key:"play",value:function(){var e=this;this.emit("play"),this._ended&&this.stop(),this._paused=!1;var t=performance.now()+this.currentFrame.delay/this.playbackRate;requestAnimationFrame((function r(n){if(!e._ended&&!e._paused){if(n>=t){for(;n-t>=e._apng.playTime/e.playbackRate;)t+=e._apng.playTime/e.playbackRate,e._numPlays++;do{e.renderNextFrame(),t+=e.currentFrame.delay/e.playbackRate}while(!e._ended&&n>t)}requestAnimationFrame(r)}}))}},{key:"pause",value:function(){this._paused||(this.emit("pause"),this._paused=!0)}},{key:"stop",value:function(){this.emit("stop"),this._numPlays=0,this._ended=!1,this._paused=!0,this._currentFrameNumber=-1,this.context.clearRect(0,0,this._apng.width,this._apng.height),this.renderNextFrame()}},{key:"currentFrameNumber",get:function(){return this._currentFrameNumber}},{key:"currentFrame",get:function(){return this._apng.frames[this._currentFrameNumber]}},{key:"paused",get:function(){return this._paused}},{key:"ended",get:function(){return this._ended}}]),t}(function(e){return e&&e.__esModule?e:{default:e}}(r(4)).default);t.default=i},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(c=r.slice()).length,u=0;u<o;u++)c[u].apply(this,s);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}}])},c.exports=n();const l=(0,u.g)(c.exports);var d=r(76882);const f=[137,80,78,71,13,10,26,10];var h=r(17255),p={},m={},g={};Object.defineProperty(g,"__esModule",{value:!0}),g.loop=g.conditional=g.parse=void 0,g.parse=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(r))r.forEach((function(r){return e(t,r,n,i)}));else if("function"==typeof r)r(t,n,i,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},e(t,r[a],n,i[a])):i[a]=r[a](t,n,i,e)}return n},g.conditional=function(e,t){return function(r,n,i,a){t(r,n,i)&&a(r,e,n,i)}},g.loop=function(e,t){return function(r,n,i,a){for(var o=[],s=r.pos;t(r,n,i);){var u={};if(a(r,e,n,u),r.pos===s)break;s=r.pos,o.push(u)}return o}};var y={};Object.defineProperty(y,"__esModule",{value:!0}),y.readBits=y.readArray=y.readUnsigned=y.readString=y.peekBytes=y.readBytes=y.peekByte=y.readByte=y.buildStream=void 0,y.buildStream=function(e){return{data:e,pos:0}};y.readByte=function(){return function(e){return e.data[e.pos++]}},y.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(t){return t.data[t.pos+e]}};var v=function(e){return function(t){return t.data.subarray(t.pos,t.pos+=e)}};y.readBytes=v,y.peekBytes=function(e){return function(t){return t.data.subarray(t.pos,t.pos+e)}},y.readString=function(e){return function(t){return Array.from(v(e)(t)).map((function(e){return String.fromCharCode(e)})).join("")}},y.readUnsigned=function(e){return function(t){var r=v(2)(t);return e?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]}},y.readArray=function(e,t){return function(r,n,i){for(var a="function"==typeof t?t(r,n,i):t,o=v(e),s=new Array(a),u=0;u<a;u++)s[u]=o(r);return s}},y.readBits=function(e){return function(t){for(var r=function(e){return e.data[e.pos++]}(t),n=new Array(8),i=0;i<8;i++)n[7-i]=!!(r&1<<i);return Object.keys(e).reduce((function(t,r){var i=e[r];return i.length?t[r]=function(e,t,r){for(var n=0,i=0;i<r;i++)n+=e[t+i]&&Math.pow(2,r-i-1);return n}(n,i.index,i.length):t[r]=n[i.index],t}),{})}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g,r=y,n={blocks:function(e){for(var t=[],n=e.data.length,i=0,a=(0,r.readByte)()(e);0!==a&&a;a=(0,r.readByte)()(e)){if(e.pos+a>=n){var o=n-e.pos;t.push((0,r.readBytes)(o)(e)),i+=o;break}t.push((0,r.readBytes)(a)(e)),i+=a}for(var s=new Uint8Array(i),u=0,c=0;c<t.length;c++)s.set(t[c],u),u+=t[c].length;return s}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&249===t[1]})),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,(function(e,t,r){return Math.pow(2,r.descriptor.lct.size+1)}))},(function(e,t,r){return r.descriptor.lct.exists})),{data:[{minCodeSize:(0,r.readByte)()},n]}]},(function(e){return 44===(0,r.peekByte)()(e)})),o=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(e,t,n){return(0,r.readBytes)(n.text.blockSize)(e)}},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&1===t[1]})),s=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(e,t,n){return(0,r.readString)(n.blockSize)(e)}},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&255===t[1]})),u=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&254===t[1]})),c=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,(function(e,t){return Math.pow(2,t.lsd.gct.size+1)}))},(function(e,t){return t.lsd.gct.exists})),{frames:(0,t.loop)([i,s,u,a,o],(function(e){var t=(0,r.peekByte)()(e);return 33===t||44===t}))}];e.default=c}(m);var _={};Object.defineProperty(_,"__esModule",{value:!0}),_.deinterlace=void 0,_.deinterlace=function(e,t){for(var r=new Array(e.length),n=e.length/t,i=function(n,i){var a=e.slice(i*t,(i+1)*t);r.splice.apply(r,[n*t,t].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,u=0;u<4;u++)for(var c=a[u];c<n;c+=o[u])i(c,s),s++;return r};var w={};Object.defineProperty(w,"__esModule",{value:!0}),w.lzw=void 0,w.lzw=function(e,t,r){var n,i,a,o,s,u,c,l,d,f,h,p,m,g,y,v,_=4096,w=r,b=new Array(r),x=new Array(_),k=new Array(_),U=new Array(_+1);for(s=1+(i=1<<(f=e)),n=i+2,c=-1,a=(1<<(o=f+1))-1,l=0;l<i;l++)x[l]=0,k[l]=l;for(h=p=m=g=y=v=0,d=0;d<w;){if(0===g){if(p<o){h+=t[v]<<p,p+=8,v++;continue}if(l=h&a,h>>=o,p-=o,l>n||l==s)break;if(l==i){a=(1<<(o=f+1))-1,n=i+2,c=-1;continue}if(-1==c){U[g++]=k[l],c=l,m=l;continue}for(u=l,l==n&&(U[g++]=m,l=c);l>i;)U[g++]=k[l],l=x[l];m=255&k[l],U[g++]=m,n<_&&(x[n]=c,k[n]=m,0==(++n&a)&&n<_&&(o++,a+=n)),c=u}g--,b[y++]=U[g],d++}for(d=y;d<w;d++)b[d]=0;return b},Object.defineProperty(p,"__esModule",{value:!0});var b=p.decompressFrames=p.decompressFrame=O=p.parseGIF=void 0,x=function(e){return e&&e.__esModule?e:{default:e}}(m),k=g,U=y,A=_,B=w,O=p.parseGIF=function(e){var t=new Uint8Array(e);return(0,k.parse)((0,U.buildStream)(t),x.default)},F=function(e,t,r){if(e.image){var n=e.image,i=n.descriptor.width*n.descriptor.height,a=(0,B.lzw)(n.data.minCodeSize,n.data.blocks,i);n.descriptor.lct.interlaced&&(a=(0,A.deinterlace)(a,n.descriptor.width));var o={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=t,e.gce&&(o.delay=10*(e.gce.delay||10),o.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(o.transparentIndex=e.gce.transparentColorIndex)),r&&(o.patch=function(e){for(var t=e.pixels.length,r=new Uint8ClampedArray(4*t),n=0;n<t;n++){var i=4*n,a=e.pixels[n],o=e.colorTable[a]||[0,0,0];r[i]=o[0],r[i+1]=o[1],r[i+2]=o[2],r[i+3]=a!==e.transparentIndex?255:0}return r}(o)),o}console.warn("gif frame does not have associated image.")};p.decompressFrame=F,b=p.decompressFrames=function(e,t){return e.frames.filter((function(e){return e.image})).map((function(r){return F(r,e.gct,t)}))};const L=[71,73,70];var E=r(49917);let T=null,P=!0;function I(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(P)try{return new ImageData(e,t,r)}catch(e){P=!1}const i=function(e,t,r){return r||(T||(T=document.createElement("canvas"),T.width=1,T.height=1),r=T),r.getContext("2d").createImageData(e,t)}(t,r,n);return i.data.set(e,0),i}async function C(e,t){const{arrayBuffer:r,mediaType:n}=await async function(e,t){let r;const n=(0,s.sJ)(e);if(n?.isBase64)r={arrayBuffer:(0,E.R)(n.data),mediaType:n.mediaType};else try{const n=await(0,i.default)(e,{responseType:"array-buffer",...t});r={arrayBuffer:n.data,mediaType:n.getHeader("Content-Type")}}catch(t){if(!(0,o.D_)(t))throw new a.Z("invalid-image",`Could not fetch requested image at ${e}`)}return r}(e,t),u="image/png"===n;return"image/gif"===n&&function(e){if(!function(e){const t=new Uint8Array(e);return!L.some(((e,r)=>e!==t[r]))}(e))return!1;const t=new DataView(e),r=t.getUint8(10);let n=13+(128&r?3*2**(1+(7&r)):0),i=0,a=!1;for(;!a;){switch(t.getUint8(n++)){case 33:if(!o())return!1;break;case 44:s();break;case 59:a=!0;break;default:return!1}if(i>1)return!0}function o(){switch(t.getUint8(n++)){case 249:n++,n+=4,u();break;case 1:i++,n++,n+=12,u();break;case 254:u();break;case 255:n++,n+=8,n+=3,u();break;default:return!1}return!0}function s(){i++,n+=8;const e=t.getUint8(n++);n+=128&e?3*2**(1+(7&e)):0,n++,u()}function u(){let e;for(;e=t.getUint8(n++);)n+=e}return!1}(r)?async function(e,t){const r=O(e),n=b(r,!0),{width:i,height:a}=r.lsd,o=document.createElement("canvas");o.width=i,o.height=a;const s=o.getContext("2d",{willReadFrequently:!0}),u=[],c=[];for(const e of n){c.push((0,d.HA)(e.delay||100));const t=new ImageData(e.patch,e.dims.width,e.dims.height),r=(0,h.E0)(t),n=3===e.disposalType?s.getImageData(e.dims.left,e.dims.top,e.dims.width,e.dims.height):void 0;s.drawImage(r,e.dims.left,e.dims.top);const o=s.getImageData(0,0,i,a);u.push(o),1===e.disposalType||(2===e.disposalType?s.clearRect(e.dims.left,e.dims.top,e.dims.width,e.dims.height):3===e.disposalType&&s.putImageData(n,e.dims.left,e.dims.top))}return{frameDurations:c,getFrame:e=>u[e],width:i,height:a}}(r):u&&function(e){if(!function(e){const t=new Uint8Array(e);return!f.some(((e,r)=>e!==t[r]))}(e))return!1;const t=new DataView(e),r=new Uint8Array(e);let n,i=8;do{const e=t.getUint32(i);if(n=String.fromCharCode.apply(String,Array.prototype.slice.call(r.subarray(i+4,i+8))),"acTL"===n)return!0;i+=12+e}while("IEND"!==n&&i<r.length);return!1}(r)?async function(e,t){const r=l(e);if(r instanceof Error)throw r;await r.createImages(),(0,o.k_)(t);const{frames:n,width:i,height:a}=r,s=document.createElement("canvas");s.width=i,s.height=a;const u=s.getContext("2d",{willReadFrequently:!0}),c=[],f=[];for(const e of n){f.push((0,d.HA)(e.delay||100));const t=e.imageElement;0===e.blendOp?u.globalCompositeOperation="copy":u.globalCompositeOperation="source-over";const r=2===e.disposeOp?u.getImageData(e.left,e.top,e.width,e.height):void 0;u.drawImage(t,e.left,e.top);const n=u.getImageData(0,0,i,a);c.push(n),0===e.disposeOp||(1===e.disposeOp?u.clearRect(e.left,e.top,e.width,e.height):2===e.disposeOp&&u.putImageData(r,e.left,e.top))}return{frameDurations:f,getFrame:e=>c[e],width:i,height:a}}(r,t):async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.default)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new a.Z("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([r],{type:n}),t)}},17255:(e,t,r)=>{r.d(t,{$7:()=>c,$e:()=>a,E0:()=>s,N5:()=>u,lW:()=>o}),r(80442);var n=r(20102),i=r(17452);function a(e){const t=s(e);return null!=t?t.toDataURL():""}async function o(e){const t=s(e);if(null==t)throw new n.Z("imageToArrayBuffer","Unsupported image type");const r=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,i.HK)(t)){const e=(0,i.sJ)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),a=await new Promise((e=>t.toBlob(e,r)));if(!a)throw new n.Z("imageToArrayBuffer","Failed to encode image");return{data:await a.arrayBuffer(),type:r}}function s(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");return e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),t}function u(e){const t=[],r=new Uint8Array(e);for(let e=0;e<r.length;e++)t.push(String.fromCharCode(r[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}function c(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6399],{46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,r,n,i,a,o,s,u){return[e,t,r,n,i,a,o,s,u]}function a(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>a,c:()=>n,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:a,fromValues:i},Symbol.toStringTag,{value:"Module"}))},97323:(e,t,r)=>{function n(){return[0,0]}function i(e,t){return[e,t]}function a(e,t){return new Float64Array(e,t,2)}function o(){return i(1,1)}function s(){return i(1,0)}function u(){return i(0,1)}r.d(t,{a:()=>n,c:()=>a,f:()=>i});const c=o(),l=s(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:l,UNIT_Y:d,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:n,createView:a,fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:o,unitX:s,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},79790:(e,t,r)=>{r.d(t,{n$:()=>C,Jl:()=>I});var n,i=r(3172),a=r(20102),o=r(95330),s=r(17452),u=r(5732),c={exports:{}};n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isNotPNG=function(e){return e===a},t.isNotAPNG=function(e){return e===o},t.default=function(e){var t=new Uint8Array(e);if(Array.prototype.some.call(s,(function(e,r){return e!==t[r]})))return a;var r=!1;if(u(t,(function(e){return!(r="acTL"===e)})),!r)return o;var n=[],c=[],h=null,p=null,m=0,g=new i.APNG;if(u(t,(function(e,t,r,a){var o=new DataView(t.buffer);switch(e){case"IHDR":h=t.subarray(r+8,r+8+a),g.width=o.getUint32(r+8),g.height=o.getUint32(r+12);break;case"acTL":g.numPlays=o.getUint32(r+8+4);break;case"fcTL":p&&(g.frames.push(p),m++),(p=new i.Frame).width=o.getUint32(r+8+4),p.height=o.getUint32(r+8+8),p.left=o.getUint32(r+8+12),p.top=o.getUint32(r+8+16);var s=o.getUint16(r+8+20),u=o.getUint16(r+8+22);0===u&&(u=100),p.delay=1e3*s/u,p.delay<=10&&(p.delay=100),g.playTime+=p.delay,p.disposeOp=o.getUint8(r+8+24),p.blendOp=o.getUint8(r+8+25),p.dataParts=[],0===m&&2===p.disposeOp&&(p.disposeOp=1);break;case"fdAT":p&&p.dataParts.push(t.subarray(r+8+4,r+8+a));break;case"IDAT":p&&p.dataParts.push(t.subarray(r+8,r+8+a));break;case"IEND":c.push(l(t,r,12+a));break;default:n.push(l(t,r,12+a))}})),p&&g.frames.push(p),0==g.frames.length)return o;var y=new Blob(n),v=new Blob(c);return g.frames.forEach((function(e){var t=[];t.push(s),h.set(f(e.width),0),h.set(f(e.height),4),t.push(d("IHDR",h)),t.push(y),e.dataParts.forEach((function(e){return t.push(d("IDAT",e))})),t.push(v),e.imageData=new Blob(t,{type:"image/png"}),delete e.dataParts,t=null})),g};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1)),i=r(2),a=new Error("Not a PNG"),o=new Error("Not an animated PNG"),s=new Uint8Array([137,80,78,71,13,10,26,10]);function u(e,t){var r=new DataView(e.buffer),n=8,i=void 0,a=void 0,o=void 0;do{a=r.getUint32(n),o=t(i=c(e,n+4,4),e,n,a),n+=12+a}while(!1!==o&&"IEND"!=i&&n<e.length)}function c(e,t,r){var n=Array.prototype.slice.call(e.subarray(t,t+r));return String.fromCharCode.apply(String,n)}function l(e,t,r){var n=new Uint8Array(r);return n.set(e.subarray(t,t+r)),n}var d=function(e,t){var r=e.length+t.length,i=new Uint8Array(r+8),a=new DataView(i.buffer);a.setUint32(0,t.length),i.set(function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(e),4),i.set(t,8);var o=(0,n.default)(i,4,r);return a.setUint32(r+4,o),i},f=function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,i=t,a=t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t);i<a;i++)n=n>>>8^r[255&(n^e[i])];return-1^n};for(var r=new Uint32Array(256),n=0;n<256;n++){for(var i=n,a=0;a<8;a++)i=0!=(1&i)?3988292384^i>>>1:i>>>1;r[n]=i}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Frame=t.APNG=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(3));function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.APNG=function(){function e(){a(this,e),this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[]}return n(e,[{key:"createImages",value:function(){return Promise.all(this.frames.map((function(e){return e.createImage()})))}},{key:"getPlayer",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createImages().then((function(){return new i.default(t,e,r)}))}}]),e}(),t.Frame=function(){function e(){a(this,e),this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.imageData=null,this.imageElement=null}return n(e,[{key:"createImage",value:function(){var e=this;return this.imageElement?Promise.resolve():new Promise((function(t,r){var n=URL.createObjectURL(e.imageData);e.imageElement=document.createElement("img"),e.imageElement.onload=function(){URL.revokeObjectURL(n),t()},e.imageElement.onerror=function(){URL.revokeObjectURL(n),e.imageElement=null,r(new Error("Image creation error"))},e.imageElement.src=n}))}}]),e}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){function t(e,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.playbackRate=1,i._currentFrameNumber=0,i._ended=!1,i._paused=!0,i._numPlays=0,i._apng=e,i.context=r,i.stop(),n&&i.play(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"renderNextFrame",value:function(){this._currentFrameNumber=(this._currentFrameNumber+1)%this._apng.frames.length,this._currentFrameNumber===this._apng.frames.length-1&&(this._numPlays++,0!==this._apng.numPlays&&this._numPlays>=this._apng.numPlays&&(this._ended=!0,this._paused=!0)),this._prevFrame&&1==this._prevFrame.disposeOp?this.context.clearRect(this._prevFrame.left,this._prevFrame.top,this._prevFrame.width,this._prevFrame.height):this._prevFrame&&2==this._prevFrame.disposeOp&&this.context.putImageData(this._prevFrameData,this._prevFrame.left,this._prevFrame.top);var e=this.currentFrame;this._prevFrame=e,this._prevFrameData=null,2==e.disposeOp&&(this._prevFrameData=this.context.getImageData(e.left,e.top,e.width,e.height)),0==e.blendOp&&this.context.clearRect(e.left,e.top,e.width,e.height),this.context.drawImage(e.imageElement,e.left,e.top),this.emit("frame",this._currentFrameNumber),this._ended&&this.emit("end")}},{key:"play",value:function(){var e=this;this.emit("play"),this._ended&&this.stop(),this._paused=!1;var t=performance.now()+this.currentFrame.delay/this.playbackRate;requestAnimationFrame((function r(n){if(!e._ended&&!e._paused){if(n>=t){for(;n-t>=e._apng.playTime/e.playbackRate;)t+=e._apng.playTime/e.playbackRate,e._numPlays++;do{e.renderNextFrame(),t+=e.currentFrame.delay/e.playbackRate}while(!e._ended&&n>t)}requestAnimationFrame(r)}}))}},{key:"pause",value:function(){this._paused||(this.emit("pause"),this._paused=!0)}},{key:"stop",value:function(){this.emit("stop"),this._numPlays=0,this._ended=!1,this._paused=!0,this._currentFrameNumber=-1,this.context.clearRect(0,0,this._apng.width,this._apng.height),this.renderNextFrame()}},{key:"currentFrameNumber",get:function(){return this._currentFrameNumber}},{key:"currentFrame",get:function(){return this._apng.frames[this._currentFrameNumber]}},{key:"paused",get:function(){return this._paused}},{key:"ended",get:function(){return this._ended}}]),t}(function(e){return e&&e.__esModule?e:{default:e}}(r(4)).default);t.default=i},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(c=r.slice()).length,u=0;u<o;u++)c[u].apply(this,s);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}}])},c.exports=n();const l=(0,u.g)(c.exports);var d=r(76882);const f=[137,80,78,71,13,10,26,10];var h=r(17255),p={},m={},g={};Object.defineProperty(g,"__esModule",{value:!0}),g.loop=g.conditional=g.parse=void 0,g.parse=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(r))r.forEach((function(r){return e(t,r,n,i)}));else if("function"==typeof r)r(t,n,i,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},e(t,r[a],n,i[a])):i[a]=r[a](t,n,i,e)}return n},g.conditional=function(e,t){return function(r,n,i,a){t(r,n,i)&&a(r,e,n,i)}},g.loop=function(e,t){return function(r,n,i,a){for(var o=[],s=r.pos;t(r,n,i);){var u={};if(a(r,e,n,u),r.pos===s)break;s=r.pos,o.push(u)}return o}};var y={};Object.defineProperty(y,"__esModule",{value:!0}),y.readBits=y.readArray=y.readUnsigned=y.readString=y.peekBytes=y.readBytes=y.peekByte=y.readByte=y.buildStream=void 0,y.buildStream=function(e){return{data:e,pos:0}};y.readByte=function(){return function(e){return e.data[e.pos++]}},y.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(t){return t.data[t.pos+e]}};var v=function(e){return function(t){return t.data.subarray(t.pos,t.pos+=e)}};y.readBytes=v,y.peekBytes=function(e){return function(t){return t.data.subarray(t.pos,t.pos+e)}},y.readString=function(e){return function(t){return Array.from(v(e)(t)).map((function(e){return String.fromCharCode(e)})).join("")}},y.readUnsigned=function(e){return function(t){var r=v(2)(t);return e?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]}},y.readArray=function(e,t){return function(r,n,i){for(var a="function"==typeof t?t(r,n,i):t,o=v(e),s=new Array(a),u=0;u<a;u++)s[u]=o(r);return s}},y.readBits=function(e){return function(t){for(var r=function(e){return e.data[e.pos++]}(t),n=new Array(8),i=0;i<8;i++)n[7-i]=!!(r&1<<i);return Object.keys(e).reduce((function(t,r){var i=e[r];return i.length?t[r]=function(e,t,r){for(var n=0,i=0;i<r;i++)n+=e[t+i]&&Math.pow(2,r-i-1);return n}(n,i.index,i.length):t[r]=n[i.index],t}),{})}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g,r=y,n={blocks:function(e){for(var t=[],n=e.data.length,i=0,a=(0,r.readByte)()(e);0!==a&&a;a=(0,r.readByte)()(e)){if(e.pos+a>=n){var o=n-e.pos;t.push((0,r.readBytes)(o)(e)),i+=o;break}t.push((0,r.readBytes)(a)(e)),i+=a}for(var s=new Uint8Array(i),u=0,c=0;c<t.length;c++)s.set(t[c],u),u+=t[c].length;return s}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&249===t[1]})),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,(function(e,t,r){return Math.pow(2,r.descriptor.lct.size+1)}))},(function(e,t,r){return r.descriptor.lct.exists})),{data:[{minCodeSize:(0,r.readByte)()},n]}]},(function(e){return 44===(0,r.peekByte)()(e)})),o=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(e,t,n){return(0,r.readBytes)(n.text.blockSize)(e)}},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&1===t[1]})),s=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(e,t,n){return(0,r.readString)(n.blockSize)(e)}},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&255===t[1]})),u=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},(function(e){var t=(0,r.peekBytes)(2)(e);return 33===t[0]&&254===t[1]})),c=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,(function(e,t){return Math.pow(2,t.lsd.gct.size+1)}))},(function(e,t){return t.lsd.gct.exists})),{frames:(0,t.loop)([i,s,u,a,o],(function(e){var t=(0,r.peekByte)()(e);return 33===t||44===t}))}];e.default=c}(m);var _={};Object.defineProperty(_,"__esModule",{value:!0}),_.deinterlace=void 0,_.deinterlace=function(e,t){for(var r=new Array(e.length),n=e.length/t,i=function(n,i){var a=e.slice(i*t,(i+1)*t);r.splice.apply(r,[n*t,t].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,u=0;u<4;u++)for(var c=a[u];c<n;c+=o[u])i(c,s),s++;return r};var w={};Object.defineProperty(w,"__esModule",{value:!0}),w.lzw=void 0,w.lzw=function(e,t,r){var n,i,a,o,s,u,c,l,d,f,h,p,m,g,y,v,_=4096,w=r,b=new Array(r),x=new Array(_),k=new Array(_),U=new Array(_+1);for(s=1+(i=1<<(f=e)),n=i+2,c=-1,a=(1<<(o=f+1))-1,l=0;l<i;l++)x[l]=0,k[l]=l;for(h=p=m=g=y=v=0,d=0;d<w;){if(0===g){if(p<o){h+=t[v]<<p,p+=8,v++;continue}if(l=h&a,h>>=o,p-=o,l>n||l==s)break;if(l==i){a=(1<<(o=f+1))-1,n=i+2,c=-1;continue}if(-1==c){U[g++]=k[l],c=l,m=l;continue}for(u=l,l==n&&(U[g++]=m,l=c);l>i;)U[g++]=k[l],l=x[l];m=255&k[l],U[g++]=m,n<_&&(x[n]=c,k[n]=m,0==(++n&a)&&n<_&&(o++,a+=n)),c=u}g--,b[y++]=U[g],d++}for(d=y;d<w;d++)b[d]=0;return b},Object.defineProperty(p,"__esModule",{value:!0});var b=p.decompressFrames=p.decompressFrame=O=p.parseGIF=void 0,x=function(e){return e&&e.__esModule?e:{default:e}}(m),k=g,U=y,A=_,B=w,O=p.parseGIF=function(e){var t=new Uint8Array(e);return(0,k.parse)((0,U.buildStream)(t),x.default)},F=function(e,t,r){if(e.image){var n=e.image,i=n.descriptor.width*n.descriptor.height,a=(0,B.lzw)(n.data.minCodeSize,n.data.blocks,i);n.descriptor.lct.interlaced&&(a=(0,A.deinterlace)(a,n.descriptor.width));var o={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=t,e.gce&&(o.delay=10*(e.gce.delay||10),o.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(o.transparentIndex=e.gce.transparentColorIndex)),r&&(o.patch=function(e){for(var t=e.pixels.length,r=new Uint8ClampedArray(4*t),n=0;n<t;n++){var i=4*n,a=e.pixels[n],o=e.colorTable[a]||[0,0,0];r[i]=o[0],r[i+1]=o[1],r[i+2]=o[2],r[i+3]=a!==e.transparentIndex?255:0}return r}(o)),o}console.warn("gif frame does not have associated image.")};p.decompressFrame=F,b=p.decompressFrames=function(e,t){return e.frames.filter((function(e){return e.image})).map((function(r){return F(r,e.gct,t)}))};const L=[71,73,70];var E=r(49917);let T=null,P=!0;function I(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(P)try{return new ImageData(e,t,r)}catch(e){P=!1}const i=function(e,t,r){return r||(T||(T=document.createElement("canvas"),T.width=1,T.height=1),r=T),r.getContext("2d").createImageData(e,t)}(t,r,n);return i.data.set(e,0),i}async function C(e,t){const{arrayBuffer:r,mediaType:n}=await async function(e,t){let r;const n=(0,s.sJ)(e);if(n?.isBase64)r={arrayBuffer:(0,E.R)(n.data),mediaType:n.mediaType};else try{const n=await(0,i.default)(e,{responseType:"array-buffer",...t});r={arrayBuffer:n.data,mediaType:n.getHeader("Content-Type")}}catch(t){if(!(0,o.D_)(t))throw new a.Z("invalid-image",`Could not fetch requested image at ${e}`)}return r}(e,t),u="image/png"===n;return"image/gif"===n&&function(e){if(!function(e){const t=new Uint8Array(e);return!L.some(((e,r)=>e!==t[r]))}(e))return!1;const t=new DataView(e),r=t.getUint8(10);let n=13+(128&r?3*2**(1+(7&r)):0),i=0,a=!1;for(;!a;){switch(t.getUint8(n++)){case 33:if(!o())return!1;break;case 44:s();break;case 59:a=!0;break;default:return!1}if(i>1)return!0}function o(){switch(t.getUint8(n++)){case 249:n++,n+=4,u();break;case 1:i++,n++,n+=12,u();break;case 254:u();break;case 255:n++,n+=8,n+=3,u();break;default:return!1}return!0}function s(){i++,n+=8;const e=t.getUint8(n++);n+=128&e?3*2**(1+(7&e)):0,n++,u()}function u(){let e;for(;e=t.getUint8(n++);)n+=e}return!1}(r)?async function(e,t){const r=O(e),n=b(r,!0),{width:i,height:a}=r.lsd,o=document.createElement("canvas");o.width=i,o.height=a;const s=o.getContext("2d",{willReadFrequently:!0}),u=[],c=[];let l=0;for(const e of n){const t=(0,d.HA)(e.delay||100);c.push(t),l+=t;const r=new ImageData(e.patch,e.dims.width,e.dims.height),n=(0,h.E0)(r),o=3===e.disposalType?s.getImageData(e.dims.left,e.dims.top,e.dims.width,e.dims.height):void 0;s.drawImage(n,e.dims.left,e.dims.top);const f=s.getImageData(0,0,i,a);u.push(f),1===e.disposalType||(2===e.disposalType?s.clearRect(e.dims.left,e.dims.top,e.dims.width,e.dims.height):3===e.disposalType&&s.putImageData(o,e.dims.left,e.dims.top))}return{frameCount:n.length,duration:l,frameDurations:c,getFrame:e=>u[e],width:i,height:a}}(r):u&&function(e){if(!function(e){const t=new Uint8Array(e);return!f.some(((e,r)=>e!==t[r]))}(e))return!1;const t=new DataView(e),r=new Uint8Array(e);let n,i=8;do{const e=t.getUint32(i);if(n=String.fromCharCode.apply(String,Array.prototype.slice.call(r.subarray(i+4,i+8))),"acTL"===n)return!0;i+=12+e}while("IEND"!==n&&i<r.length);return!1}(r)?async function(e,t){const r=l(e);if(r instanceof Error)throw r;await r.createImages(),(0,o.k_)(t);const{frames:n,width:i,height:a}=r,s=document.createElement("canvas");s.width=i,s.height=a;const u=s.getContext("2d",{willReadFrequently:!0}),c=[],f=[];let h=0;for(const e of n){const t=(0,d.HA)(e.delay||100);f.push(t),h+=t;const r=e.imageElement;0===e.blendOp?u.globalCompositeOperation="copy":u.globalCompositeOperation="source-over";const n=2===e.disposeOp?u.getImageData(e.left,e.top,e.width,e.height):void 0;u.drawImage(r,e.left,e.top);const o=u.getImageData(0,0,i,a);c.push(o),0===e.disposeOp||(1===e.disposeOp?u.clearRect(e.left,e.top,e.width,e.height):2===e.disposeOp&&u.putImageData(n,e.left,e.top))}return{frameCount:n.length,duration:h,frameDurations:f,getFrame:e=>c[e],width:i,height:a}}(r,t):async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.default)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new a.Z("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([r],{type:n}),t)}},17255:(e,t,r)=>{r.d(t,{$7:()=>c,$e:()=>a,E0:()=>s,N5:()=>u,lW:()=>o}),r(80442);var n=r(20102),i=r(17452);function a(e){const t=s(e);return null!=t?t.toDataURL():""}async function o(e){const t=s(e);if(null==t)throw new n.Z("imageToArrayBuffer","Unsupported image type");const r=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,i.HK)(t)){const e=(0,i.sJ)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),a=await new Promise((e=>t.toBlob(e,r)));if(!a)throw new n.Z("imageToArrayBuffer","Failed to encode image");return{data:await a.arrayBuffer(),type:r}}function s(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");return e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),t}function u(e){const t=[],r=new Uint8Array(e);for(let e=0;e<r.length;e++)t.push(String.fromCharCode(r[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}function c(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>d,v:()=>p});var o,s,i=r(43697),l=r(92036),n=r(95330),a=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class u{constructor(){this._resolver=(0,n.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,n.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,n.hh)(),e=[...this._resolvingPromises,t.promise],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,n.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const p=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new u,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,a.j)("esri.core.Promise")],e),e};let d=class extends(p(l.Z)){};d=(0,i._)([(0,a.j)("esri.core.Promise")],d)},70171:(t,e,r)=>{r.d(e,{G3:()=>a,Kd:()=>n,Ze:()=>h,qe:()=>p});var o=r(50758);let s;const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function l(){return i??globalThis.navigator?.language??"en"}function n(){return void 0===s&&(s=l()),s}function a(t=n()){const e=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(t);return e?.[1].toLowerCase()}const u=[];function p(t){return u.push(t),(0,o.kB)((()=>u.splice(u.indexOf(t),1)))}const d=[];function h(t){return d.push(t),(0,o.kB)((()=>u.splice(d.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=l();s!==t&&(s=t,[...d].forEach((e=>{e.call(null,t)})),[...u].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(9206)]).then(r.bind(r,79206)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(4547),r.e(5235),r.e(4565),r.e(223),r.e(2763),r.e(4466)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=r(75215),a=(r(67676),r(80442),r(52011)),u=r(41253);let p=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.portal?.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,n.se)(u.Z,t);const o=this.portal;return parseFloat(o.currentVersion)>5?(r=r||new u.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new u.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new u.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new u.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,l.Cb)()],p.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"isInvitationOnly",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"owner",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"snippet",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortField",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortOrder",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"tags",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],p.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"url",null),p=(0,o._)([(0,a.j)("esri.portal.PortalGroup")],p);const d=p},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4695],{90344:(e,t,n)=>{n.d(t,{LJ:()=>E,Xr:()=>f,Ze:()=>T,cZ:()=>u,i$:()=>L,o8:()=>D,p6:()=>b});var r=n(35454),o=n(70171),a=n(17126);const i={year:void 0,month:void 0,day:void 0,weekday:void 0},s={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},u={timeZone:"Etc/UTC"},h={year:"numeric",month:"numeric",day:"numeric"},m={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},y={...g,second:"numeric"},p={"short-date":h,"short-date-short-time":{...h,...g},"short-date-short-time-24":{...h,...g,hour12:!1},"short-date-long-time":{...h,...y},"short-date-long-time-24":{...h,...y,hour12:!1},"short-date-le":h,"short-date-le-short-time":{...h,...g},"short-date-le-short-time-24":{...h,...g,hour12:!1},"short-date-le-long-time":{...h,...y},"short-date-le-long-time-24":{...h,...y,hour12:!1},"long-month-day-year":m,"long-month-day-year-short-time":{...m,...g},"long-month-day-year-short-time-24":{...m,...g,hour12:!1},"long-month-day-year-long-time":{...m,...y},"long-month-day-year-long-time-24":{...m,...y,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...g},"day-short-month-year-short-time-24":{...c,...g,hour12:!1},"day-short-month-year-long-time":{...c,...y},"day-short-month-year-long-time-24":{...c,...y,hour12:!1},"long-date":d,"long-date-short-time":{...d,...g},"long-date-short-time-24":{...d,...g,hour12:!1},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":y},f=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory"};let x=new WeakMap,v=p["short-date-short-time"];function T(e){return p[e]}function b(e,t){return function(e){const t=e||v;let n=x.get(t);if(!n){const e=(0,o.Kd)(),r=w[e]||e;n=new Intl.DateTimeFormat(r,t),x.set(t,n)}return n}(t).format(e)}function D(e,t=p["short-date"]){return b(new Date(e),{...t,...u,...s})}function E(e,t=p["short-time"]){return b(new Date(`1970-01-01T${e}Z`),{...t,...u,...i})}function L(e,t=p["short-date-short-time"]){const n=a.ou.fromISO(e,{setZone:!0}),r=(0,o.Kd)(),i=w[r]??r;return n.toLocaleString({...l,...t},{locale:i})}(0,o.Ze)((()=>{x=new WeakMap,v=p["short-date-short-time"]}))},70171:(e,t,n)=>{n.d(t,{G3:()=>l,Kd:()=>s,Ze:()=>c,qe:()=>h});var r=n(50758);let o;const a=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return a??globalThis.navigator?.language??"en"}function s(){return void 0===o&&(o=i()),o}function l(e=s()){const t=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(e);return t?.[1].toLowerCase()}const u=[];function h(e){return u.push(e),(0,r.kB)((()=>u.splice(u.indexOf(e),1)))}const m=[];function c(e){return m.push(e),(0,r.kB)((()=>u.splice(m.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=i();o!==e&&(o=e,[...m].forEach((t=>{t.call(null,e)})),[...u].forEach((t=>{t.call(null,e)})))}))},18848:(e,t,n)=>{n.d(t,{sh:()=>s,uf:()=>l});var r=n(70171);const o={ar:"ar-u-nu-latn"};let a=new WeakMap,i={};function s(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!a.has(t)){const n=(0,r.Kd)(),i=o[(0,r.Kd)()]||n;a.set(t,new Intl.NumberFormat(i,e))}return a.get(t)}(t).format(e)}(0,r.Ze)((()=>{a=new WeakMap,i={}}))},14695:(e,t,n)=>{n.d(t,{createLabelFunction:()=>d});var r=n(20102),o=n(92604),a=n(90344),i=n(18848),s=n(35671),l=n(8813),u=n(59266);const h=o.Z.getLogger("esri.layers.support.labelFormatUtils"),m={type:"simple",evaluate:()=>null},c={getAttribute:(e,t)=>e.field(t)};async function d(e,t,o){if(!e||!e.symbol||!t)return m;const d=e.where,g=(0,l.hV)(e),y=d?await Promise.resolve().then(n.bind(n,41534)):null;let p;if("arcade"===g.type){const e=await(0,u.WW)(g.expression,o,t);if(null==e)return m;p={type:"arcade",evaluate(t){try{const n=e.evaluate({$feature:"attributes"in t?e.repurposeFeature(t):t},e.services);if(null!=n)return n.toString()}catch(e){h.error(new r.Z("arcade-expression-error","Encountered an error when evaluating label expression for feature",{error:e,feature:t,expression:g}))}return null},needsHydrationToEvaluate:()=>null==(0,l.el)(g.expression)}}else p={type:"simple",evaluate:e=>g.expression.replaceAll(/{[^}]*}/g,(n=>{const r=n.slice(1,-1),o=t.get(r);if(!o)return n;let l=null;return"attributes"in e?e&&e.attributes&&(l=e.attributes[o.name]):l=e.field(o.name),null==l?"":function(e,t){if(null==e)return"";const n=t.domain;if(n)if("codedValue"===n.type||"coded-value"===n.type){const t=e;for(const e of n.codedValues)if(e.code===t)return e.name}else if("range"===n.type){const t=+e,r="range"in n?n.range[0]:n.minValue,o="range"in n?n.range[1]:n.maxValue;if(r<=t&&t<=o)return n.name}let r=e;return"date"===t.type||"esriFieldTypeDate"===t.type?r=(0,a.p6)(r,(0,a.Ze)("short-date")):(0,s.H7)(t)&&(r=(0,i.uf)(+r)),r||""}(l,o)}))};if(d){let e;try{e=y.WhereClause.create(d,t)}catch(e){return h.error(new r.Z("bad-where-clause","Encountered an error when evaluating where clause, ignoring",{where:d,error:e})),m}const n=p.evaluate;p.evaluate=t=>{const o="attributes"in t?void 0:c;try{if(e.testFeature(t,o))return n(t)}catch(e){h.error(new r.Z("bad-where-clause","Encountered an error when evaluating where clause for feature",{where:d,feature:t,error:e}))}return null}}return p}},8813:(e,t,n)=>{n.d(t,{UO:()=>p,YI:()=>y,dI:()=>f,el:()=>b,hV:()=>g,z7:()=>d});var r=n(19153);const o="__begin__",a="__end__",i=new RegExp(o,"ig"),s=new RegExp(a,"ig"),l=new RegExp("^"+o,"i"),u=new RegExp(a+"$","i"),h='"',m=h+" + ",c=" + "+h;function d(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function g(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function y(e){const t=g(e);if(!t)return null;switch(t.type){case"conventional":return f(t.expression);case"arcade":return t.expression}return null}function p(e){const t=g(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t&&t[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function f(e){let t;return e?(t=(0,r.gx)(e,(e=>o+'$feature["'+e+'"]'+a)),t=l.test(t)?t.replace(l,""):h+t,t=u.test(t)?t.replace(u,""):t+h,t=t.replaceAll(i,m).replaceAll(s,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=x.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}}}]);