@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.3

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 (100) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
  4. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
  5. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
  6. package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
  7. package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
  8. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
  9. package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
  10. package/assets/esri/core/workers/chunks/{da57eba2fe25495ea217.js → 2faa8f08f2fdaac3f4af.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
  12. package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
  13. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
  14. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
  15. package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
  17. package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
  18. package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
  22. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
  23. package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
  24. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
  25. package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
  26. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
  27. package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
  28. package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
  30. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
  33. package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
  36. package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
  37. package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
  38. package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
  39. package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
  40. package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
  41. package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
  42. package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
  43. package/assets/esri/themes/dark/main.css +1 -1
  44. package/assets/esri/themes/light/main.css +1 -1
  45. package/assets/esri/themes/light/view.css +1 -1
  46. package/geometry/support/DoubleArray.js +1 -1
  47. package/interfaces.d.ts +84 -0
  48. package/kernel.js +1 -1
  49. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  50. package/layers/support/editableLayers.js +1 -1
  51. package/layers/support/layerUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/portal/PortalItem.js +1 -1
  54. package/request.js +1 -1
  55. package/support/requestUtils.js +1 -1
  56. package/support/revision.js +1 -1
  57. package/views/3d/layers/I3SMeshView3D.js +1 -1
  58. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  59. package/views/3d/layers/SceneLayerWorker.js +1 -1
  60. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  61. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  62. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  63. package/webmap/initialViewPropertiesUtils.js +1 -1
  64. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  65. package/widgets/Editor/CreateWorkflow.js +1 -1
  66. package/widgets/Editor/EditorViewModel.js +1 -1
  67. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  68. package/widgets/Editor/UpdateWorkflow.js +1 -1
  69. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  70. package/widgets/Editor/workflowUtils.js +1 -1
  71. package/widgets/Feature/support/featureUtils.js +1 -1
  72. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  73. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  74. package/widgets/FeatureForm/css.js +1 -1
  75. package/widgets/FeatureForm.js +1 -1
  76. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  77. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
  78. package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
  79. package/widgets/support/geolocationUtils.js +1 -1
  80. package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
  81. package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
  82. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
  83. package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
  84. package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
  85. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
  86. package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
  87. package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
  88. package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
  89. package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
  90. package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
  91. package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
  92. package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
  93. package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
  94. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
  95. package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
  96. package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
  97. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
  98. package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
  99. package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
  100. package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.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 s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return m}static get empty(){return f}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,s=null!=t.start?t.start.getTime():t.start,i=null!=t.end?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(i>=e&&i<=n?o=i:e>=i&&e<=r&&(o=e),n>=i&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new s;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return null!=i&&(n.start=(0,a.Nm)(i,t,e)),null!=r&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return m.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 s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const m=new d,f=new d({start:void 0,end:void 0}),p=d},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l;let f=n*u+s*d+i*m;return f?(f=1/f,t[0]=u*f,t[1]=(-c*s+i*h)*f,t[2]=(a*s-i*o)*f,t[3]=d*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*r)*f,t[6]=m*f,t[7]=(-h*n+s*l)*f,t[8]=(o*n-s*r)*f,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1],f=n[2],p=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+m*o+f*h,t[1]=d*i+m*a+f*c,t[2]=d*r+m*l+f*u,t[3]=p*s+_*o+g*h,t[4]=p*i+_*a+g*c,t[5]=p*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],m=e[11],f=e[12],p=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,P=c*p-u*f,C=c*_-d*f,R=c*g-m*f,E=u*_-d*p,I=u*g-m*p,O=d*g-m*_;let B=y*O-x*I+v*E+b*R-M*C+w*P;return B?(B=1/B,t[0]=(a*O-l*I+h*E)*B,t[1]=(l*R-o*O-h*C)*B,t[2]=(o*I-a*R+h*P)*B,t[3]=(i*I-s*O-r*E)*B,t[4]=(n*O-i*R+r*C)*B,t[5]=(s*R-n*I-r*P)*B,t[6]=(p*w-_*M+g*b)*B,t[7]=(_*v-f*w-g*x)*B,t[8]=(f*M-p*v+g*y)*B,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const m=h,f=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],m=e[1],f=e[2],p=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-m)<=b*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(r-f)<=b*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=b*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,m=i*a,f=i*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-f,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-f,t[7]=m-p,t[2]=d-_,t[5]=m+p,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:m,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l,f=n*u+s*d+i*m;if(!f)return null;const p=1/f;return t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=m*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*s+d*o,t[1]=m*i+d*a,t[2]=m*r+d*l,t[3]=m*o-d*s,t[4]=m*a-d*i,t[5]=m*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:f,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+m*o+h,t[7]=d*i+m*a+c,t[8]=d*r+m*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o=n(5732),a={exports:{}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],m=i,f=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);m<f;){for(e(n,m,f),m++,f--;o(n[m],d)<0;)m++;for(;o(n[f],d)>0;)f--}0===o(n[i],d)?e(n,i,f):e(n,++f,r),f<=s&&(i=f+1),s<=f&&(r=f-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>f,s:()=>i,t:()=>m});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function m(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function f(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const p=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:p,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:f,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:m,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{a:()=>s,c:()=>r,f:()=>i});const h=o(),c=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,n)=>{n.d(e,{Z:()=>B});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(75215),m=n(58971),f=n(5600),p=n(52421),_=n(52011),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof O?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const P=new Set,C=new Set,R=new Set,E=new Map;let I=0,O=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,m.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,m.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,m.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,m.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,m.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,m.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,m.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,m.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,m.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,m.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,m.it)(this._observable),this._items[t]}getNextIndex(t){(0,m.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,m.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,m.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,m.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,m.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,m.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,m.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,m.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,m.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,m.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,m.it)(this._observable),this._items.some(t,e)}sort(t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,m.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...t){return(0,m.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;P.clear(),C.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===C.size)for(const t of e)P.add(t);else for(const t of e)C.has(t)?(R.add(t),C.delete(t)):R.has(t)||P.add(t);if(n)if(0===R.size&&0===P.size)for(const t of n)C.add(t);else for(const t of n)P.has(t)?P.delete(t):(R.delete(t),C.add(t))}const n=r.Z.acquire();P.forEach((t=>{n.push(t)}));const s=r.Z.acquire();C.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}P.clear(),C.clear(),R.clear()}};O.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,_.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,f.Cb)()],O.prototype,"length",void 0),(0,i._)([(0,f.Cb)()],O.prototype,"items",null),O=c=(0,i._)([(0,_.j)("esri.core.Collection")],O);const B=O},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(92036),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=m(o),l=p(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=m(e)+m(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=f(r)+f(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=f(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(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 _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class P{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends P{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends C{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends C{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function h(t,e,n={}){return c(t,e,n,f)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{m.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??m)])}))}(t,f,e)}function m(t){return!0}function f(t){return!!t}n(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(92036),r=n(61247),o=n(50758),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),(0,o.kB)((()=>this._handles.remove(i)))}addPromise(t){if(null==t)return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),(0,o.kB)((()=>this._handles.remove(i)))}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i,z:()=>r});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${i()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ie});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),h=n(90578),c=(n(67676),n(80442),n(71715)),u=n(52011),d=n(30556),m=n(87085),f=n(71612),p=n(38009),_=n(72965),g=n(3172),y=n(81271),x=n(41123),v=(n(75215),n(10699)),b=n(96674),M=n(83379),w=n(92036),P=n(21787),C=n(46521),R=n(4307),E=n(17896);const I=(0,n(65617).c)(),O=(0,C.c)(),B=(0,C.c)(),S=(0,C.c)();function A(t,e,n){return(0,E.s)(I,e[0],e[1],1),(0,E.t)(I,I,(0,P.t)(O,n)),0===I[2]?(0,R.s)(t,I[0],I[1]):(0,R.s)(t,I[0]/I[2],I[1]/I[2])}function Z(t,e,n){return T(B,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),T(S,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,P.m)(t,(0,P.a)(B,B),S),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 T(t,e,n,s,i,r,o,a,l){(0,P.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(I,a,l,1),(0,P.a)(O,t);const[h,c,u]=(0,E.t)(I,I,(0,P.t)(O,O));return(0,P.s)(O,h,0,0,0,c,0,0,0,u),(0,P.m)(t,O,t)}var j=n(62357),D=n(97323),L=n(94139),Y=n(38913),X=n(44547),V=n(82971),N=n(2368);let q=class extends N.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:s}=(0,X.dz)(t,e);return s?null:s||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)}};q=(0,s._)([(0,u.j)("esri.layers.support.GeoreferenceBase")],q);const z=q,H=(0,C.c)(),F=(0,D.a)();let W=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,l.Cb)()],W.prototype,"sourcePoint",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],W.prototype,"mapPoint",void 0),W=(0,s._)([(0,u.j)("esri.layers.support.ControlPoint")],W);let U=class extends((0,b.eC)(z)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=V.Z.fromJSON(e.spatialReference),s=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if(null!=this.transform)null!=t&&k(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:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(H);if(null==t||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:s}=this,{rings:[[i,r,o,a]]}=t,l={sourcePoint:(0,j.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},h={sourcePoint:(0,j.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,j.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},u={sourcePoint:(0,j.vW)(n,s),mapPoint:new L.Z({x:a[0],y:a[1],spatialReference:e})};k(l)&&k(h)&&k(c)&&k(u)&&(rt(H,l,h,c,u),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,H),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,P.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,X.dz)(t,e).geometry)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,j.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if(!(null!=e&&n>0&&s>0))return null;const[i,r,o,a]=e;if(!k(i))return null;const l=i.mapPoint.spatialReference,h=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),u=this._projectControlPoint(a,l);if(!h.valid||!c.valid||!u.valid)return null;if(!k(h.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=k(c.controlPoint)&&k(u.controlPoint)?rt(t,i,h.controlPoint,c.controlPoint,u.controlPoint):k(c.controlPoint)?function(t,e,n,s){return it(J,K,e),it(G,tt,n),it($,et,s),(0,R.l)(Q,J,G,.5),(0,R.r)(Q,$,Q,Math.PI),(0,R.l)(nt,K,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,h.controlPoint,c.controlPoint):function(t,e,n){return it(J,K,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(Q,J,G,st),(0,R.r)(et,tt,K,-st),(0,R.r)(nt,K,tt,-st),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,h.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,X.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,s._)([(0,l.Cb)({type:[W],json:{write:{allowNull:!1,isRequired:!0}}})],U.prototype,"controlPoints",void 0),(0,s._)([(0,c.r)("controlPoints")],U.prototype,"readControlPoints",null),(0,s._)([(0,d.c)("controlPoints")],U.prototype,"writeControlPoints",null),(0,s._)([(0,l.Cb)()],U.prototype,"coords",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"height",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"inverseTransform",null),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"transform",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"width",void 0),U=(0,s._)([(0,u.j)("esri.layers.support.ControlPointsGeoreference")],U);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),Q=(0,D.a)(),K=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,K,e),it(G,tt,n),it($,et,s),it(Q,nt,i),ht(t,J,G,$,Q,K,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=U;let ut=class extends z{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if(null==t||null==e||null==n||null==s)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),null==e||null==n||null==s?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,l.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,u.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var mt=n(22021),ft=n(46851),pt=n(6570);let _t=class extends z{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:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if(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,s,i]],extent:{center:{x:r,y:o}}}=t,a=(0,mt.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),l=gt(r,o,-a),[h,c]=l(n[0],n[1]),[u,d]=l(i[0],i[1]);this.extent=new pt.Z({xmin:h,ymin:c,xmax:u,ymax:d,spatialReference:e}),this.rotation=a}};function gt(t,e,n){const s=(0,ft.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,l.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:pt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,l.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,u.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:z,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,l.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,c.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,l.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;var bt=n(66094),Mt=n(25929);let wt=class extends vt{constructor(t){super(t),this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,g.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}readImage(t,e,n){return(0,Mt.f)(e.url,n)}writeImage(t,e,n,s){if(null==t)return;const i=s?.portalItem,r=s?.resources;if(!i||!r)return void("string"==typeof t&&(e[n]=(0,Mt.t)(t,s)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,Mt.i)(o))return void(e[n]=o);const t=(0,Mt.t)(o,{...s,verifyItemRelativeUrls:s&&s.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Mt.M.NO);if(i&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const s=function(t,e){const n=(0,x.D)(),s=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(s)}(t,i);e[n]=s.itemRelativeUrl,r.toAdd.push({resource:s,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,s._)([(0,l.Cb)({readOnly:!0})],wt.prototype,"content",void 0),(0,s._)([(0,l.Cb)({json:{name:"url",type:String}})],wt.prototype,"image",void 0),(0,s._)([(0,c.r)("image",["url"])],wt.prototype,"readImage",null),(0,s._)([(0,d.c)("image")],wt.prototype,"writeImage",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],wt.prototype,"type",void 0),wt=(0,s._)([(0,u.j)("esri.layers.support.ImageElement")],wt);const Pt=wt;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,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=e,s.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),s}(t).toBlob(e)))}n(66577);var Rt=n(70921),Et=n(32448),It=n(3920),Ot=n(609),Bt=n(95330),St=n(17445),At=n(24470),Zt=n(87416),Tt=n(8744),jt=n(37549),Dt=n(20322),Lt=n(86662),Yt=n(33955),Xt=n(73913);function Vt(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=qt(t.xmin,e),{x:d,frameId:m}=qt(t.xmax,e),f=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},f={xmin:l,ymin:s,xmax:0,ymax:i},p=[],_=[];zt(t,a)&&p.push(u),zt(t,f)&&_.push(u),zt(e,a)&&p.push(m),zt(e,f)&&_.push(m);for(let t=u+1;t<m;t++)p.push(t),_.push(t);n.push(new Wt(t,[u]),new Wt(e,[m]),new Wt(a,p),new Wt(f,_))}else c>d||f?n.push(new Wt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new Wt({xmin:l,ymin:s,xmax:d,ymax:i},[m])):n.push(new Wt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}(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]]))}}function Nt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Xt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Xt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function zt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Ht(t,n,s)&&Ht(t,n,r)&&Ht(t,i,r)&&Ht(t,i,s)}function Ht(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Ft(t,e,n=!0){const s=!(0,Yt.l9)(t);if(s&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,At.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 s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Jt=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,At.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,X.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,s=(0,Tt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Tt.sS)(n)?102100:4326,o=Xt.UZ[r].maxX,a=Xt.UZ[r].minX;if((0,Yt.wp)(i))return Nt(i,o,a);if((0,Yt.aW)(i))return i.points=i.points.map((t=>Nt(t,o,a))),i;if((0,Yt.YX)(i))return Vt(i,s);if((0,Yt.oU)(i)||(0,Yt.l9)(i)){const t=(0,Dt.$P)(Ut,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Xt.XZ)(n.xmin,a)*(2*o),r=0===s?i:(0,Xt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Ft(r,o,e):n.xmin<a?Ft(r,a,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,At.oJ)(t):null}};(0,s._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,s._)([(0,u.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,s._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,s._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,s._)([(0,u.j)("esri.layers.support.VideoElement")],Gt);const $t=Gt,Qt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Pt,video:$t}},Kt=i.Z.ofType(Qt);let te=class extends(M.Z.LoadableMixin((0,Ot.v)((0,It.p)(Et.Z.EventedAccessor)))){constructor(t){super(t),this._index=new jt.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Kt}async load(t){if((0,Bt.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:V.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,Rt.Z)(t,this._get("elements"),Kt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new pt.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,X.iQ)(t.spatialReference,this.spatialReference,null,e);const n=(0,Tt.fS)(t.spatialReference,this.spatialReference)?t:(0,X.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,At.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Zt.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,l.Cb)()],te.prototype,"elements",null),(0,s._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,s._)([(0,u.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let se=class extends((0,f.h)((0,_.M)((0,p.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 i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){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 i.Z(t)}):t instanceof i.Z?new ee({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Pt:"video"===e.mediaType?new $t:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&ne(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"effectiveSource",void 0),(0,s._)([(0,l.Cb)({type:String})],se.prototype,"copyright",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)({type:["MediaLayer"]})],se.prototype,"operationalLayerType",void 0),(0,s._)([(0,l.Cb)({type:["show","hide"]})],se.prototype,"listMode",void 0),(0,s._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],se.prototype,"source",null),(0,s._)([(0,h.p)("source")],se.prototype,"castSource",null),(0,s._)([(0,c.r)("source",["url"])],se.prototype,"readSource",null),(0,s._)([(0,d.c)("source")],se.prototype,"writeSource",null),(0,s._)([(0,l.Cb)()],se.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"type",void 0),se=(0,s._)([(0,u.j)("esri.layers.MediaLayer")],se);const ie=se},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>i});var s=n(81271);function i(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,s.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 s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return m}static get empty(){return f}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,s=null!=t.start?t.start.getTime():t.start,i=null!=t.end?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(i>=e&&i<=n?o=i:e>=i&&e<=r&&(o=e),n>=i&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new s;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return null!=i&&(n.start=(0,a.Nm)(i,t,e)),null!=r&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return m.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 s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const m=new d,f=new d({start:void 0,end:void 0}),p=d},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l;let f=n*u+s*d+i*m;return f?(f=1/f,t[0]=u*f,t[1]=(-c*s+i*h)*f,t[2]=(a*s-i*o)*f,t[3]=d*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*r)*f,t[6]=m*f,t[7]=(-h*n+s*l)*f,t[8]=(o*n-s*r)*f,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1],f=n[2],p=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+m*o+f*h,t[1]=d*i+m*a+f*c,t[2]=d*r+m*l+f*u,t[3]=p*s+_*o+g*h,t[4]=p*i+_*a+g*c,t[5]=p*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],m=e[11],f=e[12],p=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,P=c*p-u*f,C=c*_-d*f,R=c*g-m*f,E=u*_-d*p,I=u*g-m*p,O=d*g-m*_;let B=y*O-x*I+v*E+b*R-M*C+w*P;return B?(B=1/B,t[0]=(a*O-l*I+h*E)*B,t[1]=(l*R-o*O-h*C)*B,t[2]=(o*I-a*R+h*P)*B,t[3]=(i*I-s*O-r*E)*B,t[4]=(n*O-i*R+r*C)*B,t[5]=(s*R-n*I-r*P)*B,t[6]=(p*w-_*M+g*b)*B,t[7]=(_*v-f*w-g*x)*B,t[8]=(f*M-p*v+g*y)*B,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const m=h,f=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],m=e[1],f=e[2],p=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-m)<=b*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(r-f)<=b*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=b*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,m=i*a,f=i*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-f,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-f,t[7]=m-p,t[2]=d-_,t[5]=m+p,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:m,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l,f=n*u+s*d+i*m;if(!f)return null;const p=1/f;return t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=m*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*s+d*o,t[1]=m*i+d*a,t[2]=m*r+d*l,t[3]=m*o-d*s,t[4]=m*a-d*i,t[5]=m*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:f,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+m*o+h,t[7]=d*i+m*a+c,t[8]=d*r+m*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o=n(5732),a={exports:{}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],m=i,f=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);m<f;){for(e(n,m,f),m++,f--;o(n[m],d)<0;)m++;for(;o(n[f],d)>0;)f--}0===o(n[i],d)?e(n,i,f):e(n,++f,r),f<=s&&(i=f+1),s<=f&&(r=f-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>f,s:()=>i,t:()=>m});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function m(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function f(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const p=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:p,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:f,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:m,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{a:()=>s,c:()=>r,f:()=>i});const h=o(),c=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,n)=>{n.d(e,{Z:()=>B});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(75215),m=n(58971),f=n(5600),p=n(52421),_=n(52011),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof O?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const P=new Set,C=new Set,R=new Set,E=new Map;let I=0,O=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,m.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,m.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,m.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,m.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,m.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,m.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,m.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,m.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,m.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,m.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,m.it)(this._observable),this._items[t]}getNextIndex(t){(0,m.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,m.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,m.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,m.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,m.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,m.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,m.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,m.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,m.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,m.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,m.it)(this._observable),this._items.some(t,e)}sort(t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,m.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...t){return(0,m.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;P.clear(),C.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===C.size)for(const t of e)P.add(t);else for(const t of e)C.has(t)?(R.add(t),C.delete(t)):R.has(t)||P.add(t);if(n)if(0===R.size&&0===P.size)for(const t of n)C.add(t);else for(const t of n)P.has(t)?P.delete(t):(R.delete(t),C.add(t))}const n=r.Z.acquire();P.forEach((t=>{n.push(t)}));const s=r.Z.acquire();C.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}P.clear(),C.clear(),R.clear()}};O.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,_.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,f.Cb)()],O.prototype,"length",void 0),(0,i._)([(0,f.Cb)()],O.prototype,"items",null),O=c=(0,i._)([(0,_.j)("esri.core.Collection")],O);const B=O},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(92036),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=m(o),l=p(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=m(e)+m(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=f(r)+f(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=f(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(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 _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class P{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends P{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends C{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends C{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function h(t,e,n={}){return c(t,e,n,f)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{m.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??m)])}))}(t,f,e)}function m(t){return!0}function f(t){return!!t}n(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(92036),r=n(61247),o=n(50758),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),(0,o.kB)((()=>this._handles.remove(i)))}addPromise(t){if(null==t)return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),(0,o.kB)((()=>this._handles.remove(i)))}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i,z:()=>r});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${i()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ie});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),h=n(90578),c=(n(67676),n(80442),n(71715)),u=n(52011),d=n(30556),m=n(87085),f=n(71612),p=n(38009),_=n(72965),g=n(3172),y=n(81271),x=n(41123),v=(n(75215),n(10699)),b=n(96674),M=n(83379),w=n(92036),P=n(21787),C=n(46521),R=n(4307),E=n(17896);const I=(0,n(65617).c)(),O=(0,C.c)(),B=(0,C.c)(),S=(0,C.c)();function A(t,e,n){return(0,E.s)(I,e[0],e[1],1),(0,E.t)(I,I,(0,P.t)(O,n)),0===I[2]?(0,R.s)(t,I[0],I[1]):(0,R.s)(t,I[0]/I[2],I[1]/I[2])}function Z(t,e,n){return T(B,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),T(S,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,P.m)(t,(0,P.a)(B,B),S),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 T(t,e,n,s,i,r,o,a,l){(0,P.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(I,a,l,1),(0,P.a)(O,t);const[h,c,u]=(0,E.t)(I,I,(0,P.t)(O,O));return(0,P.s)(O,h,0,0,0,c,0,0,0,u),(0,P.m)(t,O,t)}var j=n(62357),D=n(97323),L=n(94139),Y=n(38913),X=n(44547),V=n(82971),N=n(2368);let q=class extends N.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:s}=(0,X.dz)(t,e);return s?null:s||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)}};q=(0,s._)([(0,u.j)("esri.layers.support.GeoreferenceBase")],q);const z=q,H=(0,C.c)(),F=(0,D.a)();let W=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,l.Cb)()],W.prototype,"sourcePoint",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],W.prototype,"mapPoint",void 0),W=(0,s._)([(0,u.j)("esri.layers.support.ControlPoint")],W);let U=class extends((0,b.eC)(z)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=V.Z.fromJSON(e.spatialReference),s=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if(null!=this.transform)null!=t&&k(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:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(H);if(null==t||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:s}=this,{rings:[[i,r,o,a]]}=t,l={sourcePoint:(0,j.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},h={sourcePoint:(0,j.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,j.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},u={sourcePoint:(0,j.vW)(n,s),mapPoint:new L.Z({x:a[0],y:a[1],spatialReference:e})};k(l)&&k(h)&&k(c)&&k(u)&&(rt(H,l,h,c,u),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,H),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,P.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,X.dz)(t,e).geometry)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,j.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if(!(null!=e&&n>0&&s>0))return null;const[i,r,o,a]=e;if(!k(i))return null;const l=i.mapPoint.spatialReference,h=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),u=this._projectControlPoint(a,l);if(!h.valid||!c.valid||!u.valid)return null;if(!k(h.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=k(c.controlPoint)&&k(u.controlPoint)?rt(t,i,h.controlPoint,c.controlPoint,u.controlPoint):k(c.controlPoint)?function(t,e,n,s){return it(J,Q,e),it(G,tt,n),it($,et,s),(0,R.l)(K,J,G,.5),(0,R.r)(K,$,K,Math.PI),(0,R.l)(nt,Q,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,K,Q,tt,et,nt)}(t,i,h.controlPoint,c.controlPoint):function(t,e,n){return it(J,Q,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(K,J,G,st),(0,R.r)(et,tt,Q,-st),(0,R.r)(nt,Q,tt,-st),ht(t,J,G,$,K,Q,tt,et,nt)}(t,i,h.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,X.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,s._)([(0,l.Cb)({type:[W],json:{write:{allowNull:!1,isRequired:!0}}})],U.prototype,"controlPoints",void 0),(0,s._)([(0,c.r)("controlPoints")],U.prototype,"readControlPoints",null),(0,s._)([(0,d.c)("controlPoints")],U.prototype,"writeControlPoints",null),(0,s._)([(0,l.Cb)()],U.prototype,"coords",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"height",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"inverseTransform",null),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"transform",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"width",void 0),U=(0,s._)([(0,u.j)("esri.layers.support.ControlPointsGeoreference")],U);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),K=(0,D.a)(),Q=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,Q,e),it(G,tt,n),it($,et,s),it(K,nt,i),ht(t,J,G,$,K,Q,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=U;let ut=class extends z{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if(null==t||null==e||null==n||null==s)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),null==e||null==n||null==s?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,l.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,u.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var mt=n(22021),ft=n(46851),pt=n(6570);let _t=class extends z{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:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if(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,s,i]],extent:{center:{x:r,y:o}}}=t,a=(0,mt.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),l=gt(r,o,-a),[h,c]=l(n[0],n[1]),[u,d]=l(i[0],i[1]);this.extent=new pt.Z({xmin:h,ymin:c,xmax:u,ymax:d,spatialReference:e}),this.rotation=a}};function gt(t,e,n){const s=(0,ft.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,l.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:pt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,l.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,u.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:z,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,l.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,c.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,l.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;var bt=n(66094),Mt=n(25929);let wt=class extends vt{constructor(t){super(t),this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,g.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}readImage(t,e,n){return(0,Mt.f)(e.url,n)}writeImage(t,e,n,s){if(null==t)return;const i=s?.portalItem,r=s?.resources;if(!i||!r)return void("string"==typeof t&&(e[n]=(0,Mt.t)(t,s)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,Mt.i)(o))return void(e[n]=o);const t=(0,Mt.t)(o,{...s,verifyItemRelativeUrls:s&&s.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Mt.M.NO);if(i&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const s=function(t,e){const n=(0,x.D)(),s=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(s)}(t,i);e[n]=s.itemRelativeUrl,r.toAdd.push({resource:s,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,s._)([(0,l.Cb)({readOnly:!0})],wt.prototype,"content",void 0),(0,s._)([(0,l.Cb)({json:{name:"url",type:String}})],wt.prototype,"image",void 0),(0,s._)([(0,c.r)("image",["url"])],wt.prototype,"readImage",null),(0,s._)([(0,d.c)("image")],wt.prototype,"writeImage",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],wt.prototype,"type",void 0),wt=(0,s._)([(0,u.j)("esri.layers.support.ImageElement")],wt);const Pt=wt;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,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=e,s.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),s}(t).toBlob(e)))}n(66577);var Rt=n(70921),Et=n(32448),It=n(3920),Ot=n(609),Bt=n(95330),St=n(17445),At=n(24470),Zt=n(87416),Tt=n(8744),jt=n(37549),Dt=n(20322),Lt=n(86662),Yt=n(33955),Xt=n(73913);function Vt(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=qt(t.xmin,e),{x:d,frameId:m}=qt(t.xmax,e),f=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},f={xmin:l,ymin:s,xmax:0,ymax:i},p=[],_=[];zt(t,a)&&p.push(u),zt(t,f)&&_.push(u),zt(e,a)&&p.push(m),zt(e,f)&&_.push(m);for(let t=u+1;t<m;t++)p.push(t),_.push(t);n.push(new Wt(t,[u]),new Wt(e,[m]),new Wt(a,p),new Wt(f,_))}else c>d||f?n.push(new Wt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new Wt({xmin:l,ymin:s,xmax:d,ymax:i},[m])):n.push(new Wt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}(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]]))}}function Nt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Xt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Xt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function zt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Ht(t,n,s)&&Ht(t,n,r)&&Ht(t,i,r)&&Ht(t,i,s)}function Ht(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Ft(t,e,n=!0){const s=!(0,Yt.l9)(t);if(s&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,At.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 s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Jt=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,At.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,X.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,s=(0,Tt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Tt.sS)(n)?102100:4326,o=Xt.UZ[r].maxX,a=Xt.UZ[r].minX;if((0,Yt.wp)(i))return Nt(i,o,a);if((0,Yt.aW)(i))return i.points=i.points.map((t=>Nt(t,o,a))),i;if((0,Yt.YX)(i))return Vt(i,s);if((0,Yt.oU)(i)||(0,Yt.l9)(i)){const t=(0,Dt.$P)(Ut,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Xt.XZ)(n.xmin,a)*(2*o),r=0===s?i:(0,Xt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Ft(r,o,e):n.xmin<a?Ft(r,a,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,At.oJ)(t):null}};(0,s._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,s._)([(0,u.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,s._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,s._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,s._)([(0,u.j)("esri.layers.support.VideoElement")],Gt);const $t=Gt,Kt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Pt,video:$t}},Qt=i.Z.ofType(Kt);let te=class extends(M.Z.LoadableMixin((0,Ot.v)((0,It.p)(Et.Z.EventedAccessor)))){constructor(t){super(t),this._index=new jt.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Qt}async load(t){if((0,Bt.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:V.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,Rt.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 pt.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,X.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Tt.fS)(t.spatialReference,this.spatialReference)?t:(0,X.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,At.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Zt.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,l.Cb)()],te.prototype,"elements",null),(0,s._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,s._)([(0,u.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let se=class extends((0,f.h)((0,_.M)((0,p.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 i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){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 i.Z(t)}):t instanceof i.Z?new ee({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Pt:"video"===e.mediaType?new $t:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&ne(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"effectiveSource",void 0),(0,s._)([(0,l.Cb)({type:String})],se.prototype,"copyright",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)({type:["MediaLayer"]})],se.prototype,"operationalLayerType",void 0),(0,s._)([(0,l.Cb)({type:["show","hide"]})],se.prototype,"listMode",void 0),(0,s._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],se.prototype,"source",null),(0,s._)([(0,h.p)("source")],se.prototype,"castSource",null),(0,s._)([(0,c.r)("source",["url"])],se.prototype,"readSource",null),(0,s._)([(0,d.c)("source")],se.prototype,"writeSource",null),(0,s._)([(0,l.Cb)()],se.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"type",void 0),se=(0,s._)([(0,u.j)("esri.layers.MediaLayer")],se);const ie=se},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>i});var s=n(81271);function i(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,s.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([[3230],{66643:(e,t,n)=>{n.d(t,{Ed:()=>l,UI:()=>c,mt:()=>f,q6:()=>d,vr:()=>m});var r=n(43697),o=n(92036),i=n(70586),a=n(95330),s=n(5600),u=n(52011);function l(e,t,n){return(0,a.as)(e.map(((e,r)=>t.apply(n,[e,r]))))}async function c(e,t,n){return(await(0,a.as)(e.map(((e,r)=>t.apply(n,[e,r]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function y(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return y(e)}}async function f(e){try{return p(await e)}catch(e){return(0,a.r9)(e),y(e)}}function m(e,t){return new h(e,t)}let h=class extends o.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=y(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,s.Cb)()],h.prototype,"value",null),(0,r._)([(0,s.Cb)()],h.prototype,"error",null),(0,r._)([(0,s.Cb)()],h.prototype,"finished",null),(0,r._)([(0,s.Cb)()],h.prototype,"promise",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"_result",void 0),h=(0,r._)([(0,u.j)("esri.core.asyncUtils.ReactiveTask")],h)},43230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(66643),o=n(20102),i=n(92604),a=n(95330),s=n(8744),u=n(98732),l=n(57191),c=n(37427),p=n(66202),y=n(92722),d=n(23095),f=n(51432),m=n(99514);class h{constructor(){this._queryEngine=null,this._customParameters=null,this._snapshotFeatures=async e=>{const{objectIdField:t}=this._queryEngine,n=await(0,f.Bm)(this._getFeatureUrl??"",this._featureType.typeName,this._getFeatureOutputFormat,{customParameters:this._customParameters,dateFields:this._queryEngine.fieldsIndex.dateFields.map((e=>e.name)),signal:e});await(0,y.O3)(n),(0,a.k_)(e);const r=(0,y.lG)(n,{geometryType:this._queryEngine.geometryType,hasZ:!1,objectIdField:t});if(!(0,s.fS)(this._queryEngine.spatialReference,s.Zn))for(const e of r)null!=e.geometry&&(e.geometry=(0,u.GH)((0,c.iV)((0,u.di)(e.geometry,this._queryEngine.geometryType,!1,!1),s.Zn,this._queryEngine.spatialReference)));let o=1;for(const e of r){const n={};(0,d.O0)(this._fieldsIndex,n,e.attributes,!0),e.attributes=n,null==e.attributes[t]&&(e.objectId=e.attributes[t]=o++)}return r}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t){const{getFeatureUrl:n,getFeatureOutputFormat:r,spatialReference:o,fields:i,geometryType:s,featureType:u,objectIdField:c,customParameters:y}=e;this._featureType=u,this._customParameters=y,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._fieldsIndex=new m.Z(i),await this._checkProjection(o),(0,a.k_)(t),this._queryEngine=new p.q({fields:i,geometryType:s,hasM:!1,hasZ:!1,objectIdField:c,spatialReference:o,timeInfo:null,featureStore:new l.Z({geometryType:s,hasM:!1,hasZ:!1})});const d=await this._snapshotFeatures(t.signal);return this._queryEngine.featureStore.addMany(d),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new o.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.D_)(e)||i.Z.getLogger("esri.layers.WFSLayer").error(new o.Z("wfs-layer:getfeature-error","An error occurred during the GetFeature request",{error:e}))})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _checkProjection(e){try{await(0,c._W)(s.Zn,e)}catch{throw new o.Z("unsupported-projection","Projection not supported",{spatialReference:e})}}}},92722:(e,t,n)=>{n.d(t,{O3:()=>S,lG:()=>T,my:()=>F,q9:()=>u});var r=n(20102),o=n(70272),i=n(5428),a=n(35671);const s={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function u(e){return s[e]}function*l(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*c(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function p(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function d(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function f(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return g(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)g(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){m(e,r[0],n);for(let t=1;t<r.length;t++)h(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;m(e,r[0],n);for(let t=1;t<r.length;t++)h(e,r[t],n);return e}(e,t,n)}}function m(e,t,n){const r=d(t);!function(e){return!y(e)}(r)?g(e,r,n):w(e,r,n)}function h(e,t,n){const r=d(t);!function(e){return y(e)}(r)?g(e,r,n):w(e,r,n)}function g(e,t,n){for(const r of t)b(e,r,n);e.lengths.push(t.length)}function w(e,t,n){for(let r=t.length-1;r>=0;r--)b(e,t[r],n);e.lengths.push(t.length)}function b(e,t,n){const[r,o,i]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(i||0)}function _(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new r.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const n="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,o=new RegExp(".*(CRS84H?|4326)$","i");if(!n||!o.test(n))throw new r.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function F(e,t={}){const n=[],r=new Set,o=new Set;let i,s=!1,y=null,d=!1,{geometryType:f=null}=t,m=!1;for(const t of l(e)){const{geometry:e,properties:l,id:h}=t;if((!e||(f||(f=u(e.type)),u(e.type)===f))&&(s||(s=p(c(e))),d||(d=null!=h,d&&(i=typeof h,l&&(y=Object.keys(l).filter((e=>l[e]===h))))),l&&y&&d&&null!=h&&(y.length>1?y=y.filter((e=>l[e]===h)):1===y.length&&(y=l[y[0]]===h?y:[])),!m&&l)){let e=!0;for(const t in l){if(r.has(t))continue;const i=l[t];if(null==i){e=!1,o.add(t);continue}const s=_(i);if("unknown"===s){o.add(t);continue}o.delete(t),r.add(t);const u=(0,a.q6)(t);u&&n.push({name:u,alias:t,type:s})}m=e}}const h=(0,a.q6)(1===y?.length&&y[0]||null)??void 0;if(h)for(const e of n)if(e.name===h&&(0,a.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:s,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(o)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const a of e){const{geometry:e,properties:s,id:l}=a;if(e&&u(e.type)!==n)continue;const c=s||{};let p;r&&(p=c[r],null==l||p||(c[r]=p=l));const y=new o.u_(e?f(new i.Z,e,t):null,c,null,p??void 0);yield y}}(l(e),t))}},51432:(e,t,n)=>{n.d(t,{M8:()=>_,ft:()=>q,FU:()=>j,Bm:()=>D,be:()=>O,eB:()=>R}),n(66577);var r=n(3172),o=n(20102),i=n(66374),a=n(95330),s=n(81271),u=n(44547),l=n(8744),c=n(86973),p=n(92722);function y(e){return function(e){const t=d.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,i=+n.day,a=+(n.hours??"0"),s=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23)return null;if(s>59)return null;if(u>59)return null;const l=n.ms??"0",c=l?+l.padEnd(3,"0").substring(0,3):0;let p;if(n.isUTC)p=Date.UTC(r,o,i,a,s,u,c);else if(n.offsetSign){const e=+n.offsetHours,t=+n.offsetMinutes;p=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,i,a,s,u,c)}else p=new Date(r,o,i,a,s,u,c).getTime();return Number.isNaN(p)?null:p}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const d=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var f=n(88724),m=n(1231),h=n(82971),g=n(6570);const w="xlink:href",b="2.0.0",_="__esri_wfs_id__",S="wfs-layer:getWFSLayerTypeInfo-error",F="wfs-layer:empty-service",T="wfs-layer:feature-type-not-found",C="wfs-layer:geojson-not-supported",v="wfs-layer:kvp-encoding-not-supported",x="wfs-layer:malformed-json",E="wfs-layer:unknown-geometry-type",P="wfs-layer:unknown-field-type",k="wfs-layer:unsupported-spatial-reference",N="wfs-layer:unsupported-wfs-version";async function j(e,t){const n=function(e){const t=U(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==b)throw new o.Z(N,`Unsupported WFS version ${t}. Supported version: ${b}`)})(t),J(t);const n=t.firstElementChild,r=(0,i.Fs)(function(e){return(0,f.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},n=new Set([4326]),r=e=>{const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);Number.isNaN(t)||n.add(t)};return(0,f.h)(e,{Name:e=>{const{name:n,prefix:r}=L(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,n,r,o;for(const i of e.children)switch(i.localName){case"LowerCorner":[t,n]=i.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=i.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:l.Zn}}(e)},DefaultSRS:r,DefaultCRS:r,OtherSRS:r,OtherCRS:r}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:V(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:b,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,s.$U)(e)&&((0,s.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,s.hO)(t.operations.DescribeFeatureType.url)),(0,s.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,s.hO)(t.operations.GetFeature.url)))}(e,n),n}const Z=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function V(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,f.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&Z.has(t.toLowerCase())&&(n.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o.Z(v,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.Z(C,"WFS service doesn't support GeoJSON output format");return n}function q(e,t,n){return(0,i.sE)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function O(e,t,n,r={}){const{featureType:i,extent:s}=await async function(e,t,n,r={}){const{spatialReference:i=h.Z.WGS84}=r,a=e.readFeatureTypes(),s=t?q(a,t,n):a.next().value;if(null==s)throw t?new o.Z(T,`The type '${t}' could not be found in the service`):new o.Z(F,"The service is empty");let c=new g.Z({...s.extent,spatialReference:i});if(!(0,l.fS)(i,l.Zn))try{await(0,u.iQ)(l.Zn,i,void 0,r),c=(0,u.iV)(c,l.Zn)}catch{throw new o.Z(k,"Projection not supported")}return{extent:c,spatialReference:i,featureType:s}}(e,t,n,r),{fields:c,geometryType:p,swapXY:y,objectIdField:d,geometryField:f}=await async function(e,t,n={}){const[r,i]=await(0,a.as)([A(e.operations.DescribeFeatureType.url,t,n),G(e,t,n)]);if(r.error||i.error)throw new o.Z(S,`An error occurred while getting info about the feature type '${t}'`,{error:r.error||i.error});const{fields:s,errors:u}=r.value??{},l=r.value?.geometryType||i.value?.geometryType,c=i.value?.swapXY??!1;if(null==l)throw new o.Z(E,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:l,fields:s,errors:u});return{...R(s??[]),geometryType:l,swapXY:c}}(e,i.typeName,r);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:c,geometryField:f,geometryType:p,objectIdField:d,spatialReference:r.spatialReference??h.Z.WGS84,extent:s,swapXY:y,wfsCapabilities:e,customParameters:r.customParameters}}function R(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new m.Z({name:_,type:"oid",alias:_}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function G(e,t,n={}){let o,i=!1;const[a,s]=await Promise.all([D(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...n,count:1}),(0,r.default)(e.operations.GetFeature.url,{responseType:"text",query:M(t,void 0,{...n,count:1}),signal:n?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(o=c.M.fromJSON((0,p.q9)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(s.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(i=!0)}}return{geometryType:o,swapXY:i}}async function A(e,t,n){return function(e,t){const{name:n}=L(e),r=U(t);J(r);const a=(0,i.sE)((0,f.H)(r.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:L(e.getAttribute("type")).name})}),(({name:e})=>e===n));if(null!=a){const e=(0,i.sE)((0,f.H)(r.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===a.typeName));if(null!=e)return function(e){const t=[],n=[];let r;const i=(0,f.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const a of i){const i=a.getAttribute("name");if(!i)continue;let s,u;if(a.hasAttribute("type")?s=L(a.getAttribute("type")).name:(0,f.h)(a,{simpleType:{restriction:e=>(s=L(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!s)continue;const l="true"===a.getAttribute("nillable");let c=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new m.Z({name:i,alias:i,type:"integer",nullable:l}));break;case"float":case"double":case"decimal":n.push(new m.Z({name:i,alias:i,type:"double",nullable:l}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new m.Z({name:i,alias:i,type:"string",nullable:l,length:u??255}));break;case"datetime":case"date":n.push(new m.Z({name:i,alias:i,type:"date",nullable:l,length:u??36}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new o.Z(E,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.Z(P,`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new m.Z({name:i,alias:i,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&I.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(e)}throw new o.Z(T,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:b,TYPENAME:t,...n?.customParameters},signal:n?.signal})).data)}const I=new Set(["objectid","fid"]);async function D(e,t,n,i){let{data:a}=await(0,r.default)(e,{responseType:"text",query:M(t,n,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(i?.dateFields?.length){const e=new Set(i.dateFields);return JSON.parse(a,((t,n)=>e.has(t)?y(n):n))}return JSON.parse(a)}catch(e){throw new o.Z(x,"Error while parsing the response",{response:a,error:e})}}function M(e,t,n){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:b,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:n?.startIndex,COUNT:n?.count,...n?.customParameters}}function U(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function L(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function J(e){let t="",n="";if((0,f.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.Z(`wfs-layer:${t}`,n)}},88724:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{H:()=>o,h:()=>r})},1231:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(35454),a=n(96674),s=n(5600),u=n(75215),l=(n(67676),n(80442),n(36030)),c=n(71715),p=n(52011),y=n(72729),d=n(86719);const f=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.Cb)({types:y.V5,json:{read:{reader:y.im},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.Cb)({type:u.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,l.J)(d.v)],m.prototype,"type",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,o._)([(0,p.j)("esri.layers.support.Field")],m);const h=m},72729:(e,t,n)=>{n.d(t,{im:()=>C,V5:()=>T}),n(80442);var r,o=n(43697),i=n(22974),a=n(5600),s=(n(75215),n(36030)),u=n(52011),l=n(96674);n(67676);let c=r=class extends l.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,o._)([(0,u.j)("esri.layers.support.CodedValue")],c);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends l.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,o._)([(0,s.J)(p)],y.prototype,"type",void 0),y=(0,o._)([(0,u.j)("esri.layers.support.Domain")],y);const d=y;var f;let m=f=class extends d{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,a.Cb)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,o._)([(0,u.j)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;n(92604),n(20102);let w=g=class extends d{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,s.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,o._)([(0,u.j)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let S=_=class extends d{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,o._)([(0,s.J)({range:"range"})],S.prototype,"type",void 0),S=_=(0,o._)([(0,u.j)("esri.layers.support.RangeDomain")],S);const F=S,T={key:"type",base:d,typeMap:{range:S,"coded-value":h,inherited:b}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return F.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3230],{66643:(e,t,n)=>{n.d(t,{Ed:()=>l,UI:()=>c,mt:()=>f,q6:()=>d,vr:()=>m});var r=n(43697),o=n(92036),i=n(70586),a=n(95330),s=n(5600),u=n(52011);function l(e,t,n){return(0,a.as)(e.map(((e,r)=>t.apply(n,[e,r]))))}async function c(e,t,n){return(await(0,a.as)(e.map(((e,r)=>t.apply(n,[e,r]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function y(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return y(e)}}async function f(e){try{return p(await e)}catch(e){return(0,a.r9)(e),y(e)}}function m(e,t){return new h(e,t)}let h=class extends o.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=y(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,s.Cb)()],h.prototype,"value",null),(0,r._)([(0,s.Cb)()],h.prototype,"error",null),(0,r._)([(0,s.Cb)()],h.prototype,"finished",null),(0,r._)([(0,s.Cb)()],h.prototype,"promise",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"_result",void 0),h=(0,r._)([(0,u.j)("esri.core.asyncUtils.ReactiveTask")],h)},43230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(66643),o=n(20102),i=n(92604),a=n(95330),s=n(8744),u=n(98732),l=n(57191),c=n(37427),p=n(66202),y=n(92722),d=n(23095),f=n(51432),m=n(99514);class h{constructor(){this._queryEngine=null,this._customParameters=null,this._snapshotFeatures=async e=>{const{objectIdField:t}=this._queryEngine,n=await(0,f.Bm)(this._getFeatureUrl??"",this._featureType.typeName,this._getFeatureOutputFormat,{customParameters:this._customParameters,dateFields:this._queryEngine.fieldsIndex.dateFields.map((e=>e.name)),signal:e});await(0,y.O3)(n),(0,a.k_)(e);const r=(0,y.lG)(n,{geometryType:this._queryEngine.geometryType,hasZ:!1,objectIdField:t});if(!(0,s.fS)(this._queryEngine.spatialReference,s.Zn))for(const e of r)null!=e.geometry&&(e.geometry=(0,u.GH)((0,c.iV)((0,u.di)(e.geometry,this._queryEngine.geometryType,!1,!1),s.Zn,this._queryEngine.spatialReference)));let o=1;for(const e of r){const n={};(0,d.O0)(this._fieldsIndex,n,e.attributes,!0),e.attributes=n,null==e.attributes[t]&&(e.objectId=e.attributes[t]=o++)}return r}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t){const{getFeatureUrl:n,getFeatureOutputFormat:r,spatialReference:o,fields:i,geometryType:s,featureType:u,objectIdField:c,customParameters:y}=e;this._featureType=u,this._customParameters=y,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._fieldsIndex=new m.Z(i),await this._checkProjection(o),(0,a.k_)(t),this._queryEngine=new p.q({fields:i,geometryType:s,hasM:!1,hasZ:!1,objectIdField:c,spatialReference:o,timeInfo:null,featureStore:new l.Z({geometryType:s,hasM:!1,hasZ:!1})});const d=await this._snapshotFeatures(t.signal);return this._queryEngine.featureStore.addMany(d),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new o.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.D_)(e)||i.Z.getLogger("esri.layers.WFSLayer").error(new o.Z("wfs-layer:getfeature-error","An error occurred during the GetFeature request",{error:e}))})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _checkProjection(e){try{await(0,c._W)(s.Zn,e)}catch{throw new o.Z("unsupported-projection","Projection not supported",{spatialReference:e})}}}},92722:(e,t,n)=>{n.d(t,{O3:()=>S,lG:()=>T,my:()=>F,q9:()=>u});var r=n(20102),o=n(70272),i=n(5428),a=n(35671);const s={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function u(e){return s[e]}function*l(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*c(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function p(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function d(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function f(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return g(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)g(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){m(e,r[0],n);for(let t=1;t<r.length;t++)h(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;m(e,r[0],n);for(let t=1;t<r.length;t++)h(e,r[t],n);return e}(e,t,n)}}function m(e,t,n){const r=d(t);!function(e){return!y(e)}(r)?g(e,r,n):w(e,r,n)}function h(e,t,n){const r=d(t);!function(e){return y(e)}(r)?g(e,r,n):w(e,r,n)}function g(e,t,n){for(const r of t)b(e,r,n);e.lengths.push(t.length)}function w(e,t,n){for(let r=t.length-1;r>=0;r--)b(e,t[r],n);e.lengths.push(t.length)}function b(e,t,n){const[r,o,i]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(i||0)}function _(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new r.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const n="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,o=new RegExp(".*(CRS84H?|4326)$","i");if(!n||!o.test(n))throw new r.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function F(e,t={}){const n=[],r=new Set,o=new Set;let i,s=!1,y=null,d=!1,{geometryType:f=null}=t,m=!1;for(const t of l(e)){const{geometry:e,properties:l,id:h}=t;if((!e||(f||(f=u(e.type)),u(e.type)===f))&&(s||(s=p(c(e))),d||(d=null!=h,d&&(i=typeof h,l&&(y=Object.keys(l).filter((e=>l[e]===h))))),l&&y&&d&&null!=h&&(y.length>1?y=y.filter((e=>l[e]===h)):1===y.length&&(y=l[y[0]]===h?y:[])),!m&&l)){let e=!0;for(const t in l){if(r.has(t))continue;const i=l[t];if(null==i){e=!1,o.add(t);continue}const s=_(i);if("unknown"===s){o.add(t);continue}o.delete(t),r.add(t);const u=(0,a.q6)(t);u&&n.push({name:u,alias:t,type:s})}m=e}}const h=(0,a.q6)(1===y?.length&&y[0]||null)??void 0;if(h)for(const e of n)if(e.name===h&&(0,a.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:s,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(o)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const a of e){const{geometry:e,properties:s,id:l}=a;if(e&&u(e.type)!==n)continue;const c=s||{};let p;r&&(p=c[r],null==l||p||(c[r]=p=l));const y=new o.u_(e?f(new i.Z,e,t):null,c,null,p??void 0);yield y}}(l(e),t))}},51432:(e,t,n)=>{n.d(t,{M8:()=>_,ft:()=>q,FU:()=>j,Bm:()=>D,be:()=>O,eB:()=>R}),n(66577);var r=n(3172),o=n(20102),i=n(66374),a=n(95330),s=n(81271),u=n(44547),l=n(8744),c=n(86973),p=n(92722);function y(e){return function(e){const t=d.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,i=+n.day,a=+(n.hours??"0"),s=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23)return null;if(s>59)return null;if(u>59)return null;const l=n.ms??"0",c=l?+l.padEnd(3,"0").substring(0,3):0;let p;if(n.isUTC)p=Date.UTC(r,o,i,a,s,u,c);else if(n.offsetSign){const e=+n.offsetHours,t=+n.offsetMinutes;p=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,i,a,s,u,c)}else p=new Date(r,o,i,a,s,u,c).getTime();return Number.isNaN(p)?null:p}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const d=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var f=n(88724),m=n(1231),h=n(82971),g=n(6570);const w="xlink:href",b="2.0.0",_="__esri_wfs_id__",S="wfs-layer:getWFSLayerTypeInfo-error",F="wfs-layer:empty-service",T="wfs-layer:feature-type-not-found",C="wfs-layer:geojson-not-supported",v="wfs-layer:kvp-encoding-not-supported",x="wfs-layer:malformed-json",E="wfs-layer:unknown-geometry-type",P="wfs-layer:unknown-field-type",k="wfs-layer:unsupported-spatial-reference",N="wfs-layer:unsupported-wfs-version";async function j(e,t){const n=function(e){const t=U(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==b)throw new o.Z(N,`Unsupported WFS version ${t}. Supported version: ${b}`)})(t),J(t);const n=t.firstElementChild,r=(0,i.Fs)(function(e){return(0,f.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},n=new Set([4326]),r=e=>{const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);Number.isNaN(t)||n.add(t)};return(0,f.h)(e,{Name:e=>{const{name:n,prefix:r}=L(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,n,r,o;for(const i of e.children)switch(i.localName){case"LowerCorner":[t,n]=i.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=i.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:l.Zn}}(e)},DefaultSRS:r,DefaultCRS:r,OtherSRS:r,OtherCRS:r}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:V(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:b,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,s.$U)(e)&&((0,s.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,s.hO)(t.operations.DescribeFeatureType.url)),(0,s.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,s.hO)(t.operations.GetFeature.url)))}(e,n),n}const Z=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function V(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,f.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&Z.has(t.toLowerCase())&&(n.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o.Z(v,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.Z(C,"WFS service doesn't support GeoJSON output format");return n}function q(e,t,n){return(0,i.sE)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function O(e,t,n,r={}){const{featureType:i,extent:s}=await async function(e,t,n,r={}){const{spatialReference:i=h.Z.WGS84}=r,a=e.readFeatureTypes(),s=t?q(a,t,n):a.next().value;if(null==s)throw t?new o.Z(T,`The type '${t}' could not be found in the service`):new o.Z(F,"The service is empty");let c=new g.Z({...s.extent,spatialReference:i});if(!(0,l.fS)(i,l.Zn))try{await(0,u.initializeProjection)(l.Zn,i,void 0,r),c=(0,u.iV)(c,l.Zn)}catch{throw new o.Z(k,"Projection not supported")}return{extent:c,spatialReference:i,featureType:s}}(e,t,n,r),{fields:c,geometryType:p,swapXY:y,objectIdField:d,geometryField:f}=await async function(e,t,n={}){const[r,i]=await(0,a.as)([A(e.operations.DescribeFeatureType.url,t,n),G(e,t,n)]);if(r.error||i.error)throw new o.Z(S,`An error occurred while getting info about the feature type '${t}'`,{error:r.error||i.error});const{fields:s,errors:u}=r.value??{},l=r.value?.geometryType||i.value?.geometryType,c=i.value?.swapXY??!1;if(null==l)throw new o.Z(E,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:l,fields:s,errors:u});return{...R(s??[]),geometryType:l,swapXY:c}}(e,i.typeName,r);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:c,geometryField:f,geometryType:p,objectIdField:d,spatialReference:r.spatialReference??h.Z.WGS84,extent:s,swapXY:y,wfsCapabilities:e,customParameters:r.customParameters}}function R(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new m.Z({name:_,type:"oid",alias:_}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function G(e,t,n={}){let o,i=!1;const[a,s]=await Promise.all([D(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...n,count:1}),(0,r.default)(e.operations.GetFeature.url,{responseType:"text",query:M(t,void 0,{...n,count:1}),signal:n?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(o=c.M.fromJSON((0,p.q9)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(s.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(i=!0)}}return{geometryType:o,swapXY:i}}async function A(e,t,n){return function(e,t){const{name:n}=L(e),r=U(t);J(r);const a=(0,i.sE)((0,f.H)(r.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:L(e.getAttribute("type")).name})}),(({name:e})=>e===n));if(null!=a){const e=(0,i.sE)((0,f.H)(r.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===a.typeName));if(null!=e)return function(e){const t=[],n=[];let r;const i=(0,f.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const a of i){const i=a.getAttribute("name");if(!i)continue;let s,u;if(a.hasAttribute("type")?s=L(a.getAttribute("type")).name:(0,f.h)(a,{simpleType:{restriction:e=>(s=L(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!s)continue;const l="true"===a.getAttribute("nillable");let c=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new m.Z({name:i,alias:i,type:"integer",nullable:l}));break;case"float":case"double":case"decimal":n.push(new m.Z({name:i,alias:i,type:"double",nullable:l}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new m.Z({name:i,alias:i,type:"string",nullable:l,length:u??255}));break;case"datetime":case"date":n.push(new m.Z({name:i,alias:i,type:"date",nullable:l,length:u??36}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new o.Z(E,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.Z(P,`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new m.Z({name:i,alias:i,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&I.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(e)}throw new o.Z(T,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:b,TYPENAME:t,...n?.customParameters},signal:n?.signal})).data)}const I=new Set(["objectid","fid"]);async function D(e,t,n,i){let{data:a}=await(0,r.default)(e,{responseType:"text",query:M(t,n,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(i?.dateFields?.length){const e=new Set(i.dateFields);return JSON.parse(a,((t,n)=>e.has(t)?y(n):n))}return JSON.parse(a)}catch(e){throw new o.Z(x,"Error while parsing the response",{response:a,error:e})}}function M(e,t,n){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:b,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:n?.startIndex,COUNT:n?.count,...n?.customParameters}}function U(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function L(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function J(e){let t="",n="";if((0,f.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.Z(`wfs-layer:${t}`,n)}},88724:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{H:()=>o,h:()=>r})},1231:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(35454),a=n(96674),s=n(5600),u=n(75215),l=(n(67676),n(80442),n(36030)),c=n(71715),p=n(52011),y=n(72729),d=n(86719);const f=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.Cb)({types:y.V5,json:{read:{reader:y.im},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.Cb)({type:u.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,l.J)(d.v)],m.prototype,"type",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,o._)([(0,p.j)("esri.layers.support.Field")],m);const h=m},72729:(e,t,n)=>{n.d(t,{im:()=>C,V5:()=>T}),n(80442);var r,o=n(43697),i=n(22974),a=n(5600),s=(n(75215),n(36030)),u=n(52011),l=n(96674);n(67676);let c=r=class extends l.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,o._)([(0,u.j)("esri.layers.support.CodedValue")],c);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends l.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,o._)([(0,s.J)(p)],y.prototype,"type",void 0),y=(0,o._)([(0,u.j)("esri.layers.support.Domain")],y);const d=y;var f;let m=f=class extends d{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,a.Cb)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,o._)([(0,u.j)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;n(92604),n(20102);let w=g=class extends d{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,s.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,o._)([(0,u.j)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let S=_=class extends d{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,o._)([(0,s.J)({range:"range"})],S.prototype,"type",void 0),S=_=(0,o._)([(0,u.j)("esri.layers.support.RangeDomain")],S);const F=S,T={key:"type",base:d,typeMap:{range:S,"coded-value":h,inherited:b}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return F.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3172],{3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var s=r(68773),o=r(40330),n=r(20102),a=r(80442),i=r(22974),l=r(95330),c=r(81271),u=r(19745),d=r(71058),h=r(85958);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,c.u0)(t.query.toString().replaceAll("+"," ")));const i=(0,c.HK)(e),u=(0,c.jc)(e);u||i||(e=(0,c.Fv)(e));const w={url:e,requestOptions:{...t}};let g=(0,c.oh)(e);if(g){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=v("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.Z)&&(r=v("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(g,w);if(null!=e)return{data:e,getHeader:q,httpStatus:200,requestOptions:w.requestOptions,url:w.url};g.after||g.error||(g=null)}if(e=w.url,"image"===(t=w.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),w);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),w);if(i||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),w)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const b=new AbortController;(0,l.fu)(t,(()=>b.abort()));const T={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:g,params:w,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},k=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,a=r.body;let i=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in f._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(i||c)&&(e.fetchOptions.body=i||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!C(t)&&!(0,l.Hc)(n)){let s;"immediate"===r.authMode?(await O(),s=await o.id.getCredential(t,{signal:n}),e.credential=s):"no-prompt"===r.authMode?(await O(),s=await o.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=s):o.id&&(s=o.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await S(e)}while(!await L(e,t,r))}catch(r){const s=v("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):q,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return g?.after?.(k),k}let p;const m=s.default.request,y="FormData"in globalThis,w=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],q=()=>null,T=Symbol();function k(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function v(e,t,r,s){let o="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:q,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(e=>s.headers.get(e)),r=s?.status,n=t.message;n&&(o=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,l.D_)(t)?(0,l.zE)():new n.Z(e,o,a)}async function O(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function C(e){return b.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),i=r.responseType||"json",d=n?0:null!=r.timeout?r.timeout:m.timeout;let p=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===s.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...r.query};e.credentialToken&&(n.token=e.credentialToken);let i=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=t.length+1+i.length;let d;p="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const f=r.useProxy||!!(0,c.ed)(t);if(f){const e=(0,c.b7)(t);d=e.path,!p&&d.length+1+l>m.maxUrlLength&&(p=!0),e.query&&(n={...e.query,...n})}if("HEAD"===s.method&&(p||f)){if(p){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,n):(s.body=(0,c.B7)(n),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),f&&(e.useProxy=!0,t=`${d}?${t}`),n.token&&y&&s.body instanceof FormData&&!(0,u.P)(t)&&s.body.set("token",n.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(p?(0,c.fl)(t,n):t))}let w,g,b=0,q=!1;d>0&&(b=setTimeout((()=>{q=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)g=s,g.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!n&&!e.useProxy&&m.proxyUrl&&!k(t)){if(w=await f._abortableFetch(t,s),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)g=w;else if("HEAD"!==s.method)if(w.ok){switch(i){case"array-buffer":g=await w.arrayBuffer();break;case"blob":case"image":g=await w.blob();break;default:g=await w.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=E(g,"application/xml");break;case"document":g=E(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=w.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await x(URL.createObjectURL(g),e,!0))}}else{g=await w.text();try{g=JSON.parse(g)}catch{}}}else g=await x(t,e)}catch(s){if("AbortError"===s.name){if(q)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!w&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||k(t))throw s;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{b&&clearTimeout(b)}return[w,g]}function E(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let n,a;if(r&&(r.error?n=r.error:"error"===r.status&&Array.isArray(r.messages)&&(n={...r},n[T]=r,n.details=r.messages)),!n&&!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[T]=r,n;let i,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,i=n.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||n.message?.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&w.includes(a)&&!C(e.params.url)&&(403!==a||i&&!g.includes(i)&&(null==l||2===l&&e.credentialToken))){await O();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",n,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function x(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,h.fY)(o,e,r,s)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>n});var s=r(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,s.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>c,fY:()=>i,jH:()=>u,jz:()=>d});var s=r(68773),o=r(80442),n=r(95330),a=r(81271);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,n.Hc)(s))return void i(l());let c=()=>{h(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;h(),a(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",i(l())};const h=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,o.Z)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.P$)(r)??""]=0:(t[(0,a.P$)("http://"+r)??""]=0,t[(0,a.P$)("https://"+r)??""]=0)}function u(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.P$)(e);if(r)return r=r.toLowerCase(),!(0,a.D6)(r,(0,a.TI)())&&t[r]<Date.now()-36e5}return!1}async function d(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,a.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3172],{3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var s=r(68773),o=r(40330),n=r(20102),a=r(80442),i=r(22974),l=r(95330),c=r(81271),u=r(19745),d=r(71058),h=r(85958);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,c.u0)(t.query.toString().replaceAll("+"," ")));const i=(0,c.HK)(e),u=(0,c.jc)(e);u||i||(e=(0,c.Fv)(e));const w={url:e,requestOptions:{...t}};let g=(0,c.oh)(e);if(g){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=v("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.Z)&&(r=v("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(g,w);if(null!=e)return{data:e,getHeader:q,httpStatus:200,requestOptions:w.requestOptions,url:w.url};g.after||g.error||(g=null)}if(e=w.url,"image"===(t=w.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),w);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),w);if(i||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),w)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const b=new AbortController;(0,l.fu)(t,(()=>b.abort()));const T={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:g,params:w,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},k=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,a=r.body;let i=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in f._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(i||c)&&(e.fetchOptions.body=i||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!C(t)&&!(0,l.Hc)(n)){let s;"immediate"===r.authMode?(await O(),s=await o.id.getCredential(t,{signal:n}),e.credential=s):"no-prompt"===r.authMode?(await O(),s=await o.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=s):o.id&&(s=o.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await S(e)}while(!await L(e,t,r))}catch(r){const s=v("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):q,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return g?.after?.(k),k}let p;const m=s.default.request,y="FormData"in globalThis,w=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],q=()=>null,T=Symbol();function k(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function v(e,t,r,s){let o="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:q,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(e=>s.headers.get(e)),r=s?.status,n=t.message;n&&(o=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,l.D_)(t)?(0,l.zE)():new n.Z(e,o,a)}async function O(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function C(e){return b.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),i=r.responseType||"json",d=n?0:null!=r.timeout?r.timeout:m.timeout;let p=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===s.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...r.query};e.credentialToken&&(n.token=e.credentialToken);let i=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=t.length+1+i.length;let d;p="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const f=r.useProxy||!!(0,c.ed)(t);if(f){const e=(0,c.b7)(t);d=e.path,!p&&d.length+1+l>m.maxUrlLength&&(p=!0),e.query&&(n={...e.query,...n})}if("HEAD"===s.method&&(p||f)){if(p){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,n):(s.body=(0,c.B7)(n),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),f&&(e.useProxy=!0,t=`${d}?${t}`),n.token&&y&&s.body instanceof FormData&&!(0,u.P)(t)&&s.body.set("token",n.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(p?(0,c.fl)(t,n):t))}let w,g,b=0,q=!1;d>0&&(b=setTimeout((()=>{q=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)g=s,g.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!n&&!e.useProxy&&m.proxyUrl&&!k(t)){if(w=await f._abortableFetch(t,s),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)g=w;else if("HEAD"!==s.method)if(w.ok){switch(i){case"array-buffer":g=await w.arrayBuffer();break;case"blob":case"image":g=await w.blob();break;default:g=await w.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=E(g,"application/xml");break;case"document":g=E(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=w.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await x(URL.createObjectURL(g),e,!0))}}else{g=await w.text();try{g=JSON.parse(g)}catch{}}}else g=await x(t,e)}catch(s){if("AbortError"===s.name){if(q)throw(0,h.Tf)();throw(0,l.zE)("Request canceled")}if(!(!w&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||k(t))throw s;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{b&&clearTimeout(b)}return[w,g]}function E(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let n,a;if(r&&(r.error?n=r.error:"error"===r.status&&Array.isArray(r.messages)&&(n={...r},n[T]=r,n.details=r.messages)),!n&&!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[T]=r,n;let i,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,i=n.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||n.message?.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&w.includes(a)&&!C(e.params.url)&&(403!==a||i&&!g.includes(i)&&(null==l||2===l&&e.credentialToken))){await O();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",n,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function x(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,h.fY)(o,e,r,s)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>n});var s=r(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,s.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>d,Tf:()=>u,fY:()=>i,jH:()=>h,jz:()=>f});var s=r(68773),o=r(80442),n=r(95330),a=r(81271);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,n.Hc)(s))return void i(l());let c=()=>{h(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;h(),a(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",i(l())};const h=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,o.Z)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function u(){return new Error(c)}function d(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.P$)(r)??""]=0:(t[(0,a.P$)("http://"+r)??""]=0,t[(0,a.P$)("https://"+r)??""]=0)}function h(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.P$)(e);if(r)return r=r.toLowerCase(),!(0,a.D6)(r,(0,a.TI)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,a.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);