@arcgis/core 5.2.0-next.154 → 5.2.0-next.155

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 (91) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
  3. package/assets/esri/core/workers/chunks/2a226b69d38c72a47a08.js +1 -0
  4. package/assets/esri/core/workers/chunks/{53e2f2b922116a45fe8f.js → 49ff0985fb307ac193ab.js} +1 -1
  5. package/assets/esri/core/workers/chunks/5f4feca26102088ea565.js +1 -0
  6. package/assets/esri/core/workers/chunks/{407f1e8176f3b0af73b4.js → 66867e523cc82f8fe35b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/6c469b43089767176ced.js +1 -0
  8. package/assets/esri/core/workers/chunks/{693873b3eb99fba58fa9.js → 78c4e43cfa1eda06b4d9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/81cad8d2f62a5f671c55.js +1 -0
  10. package/assets/esri/core/workers/chunks/{588e677f33df86a595bf.js → 820c8aaf3632edb0150c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5924ec3167a2941ebb1f.js → 88c74f3316f1fc253207.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a4162a8660bf763d542d.js → 967b4992b400517ee712.js} +1 -1
  13. package/assets/esri/core/workers/chunks/96b6ea199ad949fef17c.js +1 -0
  14. package/assets/esri/core/workers/chunks/{adf25e5ed99615b83c68.js → a62c12925303ff802c3d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +1 -0
  16. package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +1 -0
  17. package/assets/esri/core/workers/chunks/c1254cd131a62750ff6f.js +1 -0
  18. package/assets/esri/core/workers/chunks/c19f238b55ff2893f7c2.js +1 -0
  19. package/assets/esri/core/workers/chunks/c72a904e01dc8c17d992.js +1 -0
  20. package/assets/esri/core/workers/chunks/de6081df29183bf80787.js +1 -0
  21. package/assets/esri/core/workers/chunks/e653c81ffb3d818645dd.js +1 -0
  22. package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +1 -0
  23. package/assets/esri/libs/pdfjs/wasm/openjpeg_nowasm_fallback.js +1 -0
  24. package/assets/esri/widgets/support/uriUtils/t9n/messages.fr.json +1 -1
  25. package/config.js +1 -1
  26. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  27. package/geometry/support/curves/mathUtils.js +1 -1
  28. package/interfaces.d.ts +18 -9
  29. package/kernel.js +1 -1
  30. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  31. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  32. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  33. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  34. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  35. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  36. package/layers/support/fieldUtils.js +1 -1
  37. package/layers/support/vectorTileLayerLoader.js +1 -1
  38. package/package.json +2 -2
  39. package/portal/schemas/definitions.js +1 -1
  40. package/symbols/cim/cimAnalyzer.js +1 -1
  41. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  42. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
  43. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  44. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
  45. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  46. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  47. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  48. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  49. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  50. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  51. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  52. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  53. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  54. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  55. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  56. package/views/draw/DrawTool.js +1 -1
  57. package/views/draw/support/PluginContext.js +1 -1
  58. package/views/draw/support/managers/TooltipManager.js +1 -1
  59. package/views/draw/support/types.d.ts +5 -2
  60. package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
  61. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  62. package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
  63. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  64. package/webdoc/applicationProperties/searchMode.js +2 -0
  65. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  66. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  67. package/widgets/BatchAttributeForm.js +1 -1
  68. package/widgets/Editor/EditorViewModel.d.ts +10 -1
  69. package/widgets/Editor.d.ts +10 -1
  70. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  71. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  72. package/widgets/Legend.d.ts +1 -0
  73. package/widgets/Search/LayerSearchSource.d.ts +23 -1
  74. package/widgets/Search/LayerSearchSource.js +1 -1
  75. package/widgets/Search/support/layerSearchUtils.js +1 -1
  76. package/widgets/Search/types.d.ts +7 -0
  77. package/widgets/support/forms/formUtils.js +1 -1
  78. package/widgets/support/forms/types.d.ts +1 -1
  79. package/assets/esri/core/workers/chunks/03afeefb9d16b6f1d844.js +0 -1
  80. package/assets/esri/core/workers/chunks/09b9a886363bc1197785.js +0 -1
  81. package/assets/esri/core/workers/chunks/4fc337240e7cddd0e988.js +0 -1
  82. package/assets/esri/core/workers/chunks/5732fdf6d8b87739aeea.js +0 -1
  83. package/assets/esri/core/workers/chunks/5fa1ec357c3ad1f91bc7.js +0 -1
  84. package/assets/esri/core/workers/chunks/7d1fd2df579a4b535e0e.js +0 -1
  85. package/assets/esri/core/workers/chunks/7e0cf70c0eb5a2ddfcec.js +0 -1
  86. package/assets/esri/core/workers/chunks/879b2de825c1dfc8849d.js +0 -1
  87. package/assets/esri/core/workers/chunks/917f53833b853898facc.js +0 -1
  88. package/assets/esri/core/workers/chunks/937824bc7948f7bc7845.js +0 -1
  89. package/assets/esri/core/workers/chunks/b132ffa7e8bb461b6786.js +0 -1
  90. package/assets/esri/core/workers/chunks/e01aeac34474540f61ee.js +0 -1
  91. package/assets/esri/core/workers/chunks/e15ba90af0faf873b42d.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2170],{69540(t,e,i){var n=i(32198),s=i(69622),r=(i(44208),i(4718)),h=(i(53966),i(97768)),o=i(88620),a=i(64108);const l=Symbol("ClonableMixin"),u=t=>{var e;let i=t,s=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=l}clone(t){let e=(0,o.oY)(this);(0,h.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,s={},a=new Map;for(let e in i){let h=i[e],o=n?.originOf(e),l=h.clonable;if(h.readOnly||!1===l||7!==o&&0!==o&&5!==o&&4!==o)continue;let u=this[e],f=null;if("function"==typeof l)f=l(u,t);else if("reference"===l)f=u;else if(f=(0,r.TU)(u,t),null!=u&&null==f)continue;0===o?a.set(e,f):s[e]=f}let l=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){let t=(0,o.oY)(l)?.store;if(t)for(let[e,i]of a)t.set(e,i,0)}return l}};return s=(0,n.Cg)([(0,a.$)("esri.core.Clonable")],s),s},f=u(s.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==s(t)}function s(t){return function(t){let e=r.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,s=i.month-1,h=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),l=+(i.seconds??"0");if(o>23||a>59||l>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,s,h,o,a,l,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,s,h,o,a,l,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!h.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>s});const r=/^(?:(?<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})))?$/,h=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>s,vt:()=>n});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(t,e,i,n,s,r,h,o,a,l,u,f,c,d,y,_){return[t,e,i,n,s,r,h,o,a,l,u,f,c,d,y,_]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,r])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>r,C:()=>h,Cc:()=>B,DI:()=>b,Io:()=>g,Ln:()=>p,Om:()=>I,Qr:()=>f,Re:()=>l,S8:()=>v,T9:()=>_,WQ:()=>a,Z0:()=>A,_S:()=>d,aI:()=>O,ei:()=>P,fw:()=>C,gL:()=>S,hG:()=>x,hZ:()=>o,hs:()=>m,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>X,t2:()=>Y,tn:()=>c,ze:()=>w});var n=i(51850),s=i(34304);function r(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function a(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function _(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function m(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function p(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function g(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+n*n+s*s)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return i*i+n*n+s*s}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],s=e[2],r=i*i+n*n+s*s;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2];return t[0]=s*a-r*o,t[1]=r*h-n*a,t[2]=n*o-s*h,t}function B(t,e,i,n){let s=e[0],r=e[1],h=e[2];return t[0]=s+n*(i[0]-s),t[1]=r+n*(i[1]-r),t[2]=h+n*(i[2]-h),t}function A(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=i[0]*n+i[4]*s+i[8]*r+i[12],t[1]=i[1]*n+i[5]*s+i[9]*r+i[13],t[2]=i[2]*n+i[6]*s+i[10]*r+i[14],t}function P(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=n*i[0]+s*i[3]+r*i[6],t[1]=n*i[1]+s*i[4]+r*i[7],t[2]=n*i[2]+s*i[5]+r*i[8],t}function S(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,n,s,r){let h=e[0],o=e[1],a=e[2],l=n*a-s*o,u=s*h-i*a,f=i*o-n*h,c=n*f-s*u,d=s*l-i*f,y=i*u-n*l,_=2*r;return t[0]=h+l*_+2*c,t[1]=o+u*_+2*d,t[2]=a+f*_+2*y,t}const R=(0,n.vt)(),F=(0,n.vt)();function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function O(t,e){if(t===e)return!0;let i=t[0],n=t[1],r=t[2],h=e[0],o=e[1],a=e[2],l=(0,s.FD)();return Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))}function X(t,e,i){let n=i[0]-e[0],s=i[1]-e[1],r=i[2]-e[2],h=n*n+s*s+r*r;return h>0?(h=1/Math.sqrt(h),t[0]=n*h,t[1]=s*h,t[2]=r*h,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=l,Z=u,E=f,L=g,G=x,k=r,q=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:a,angle:function(t,e){v(R,t),v(F,e);let i=I(R,F);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,n,s,r){let h=1-r,o=h*h,a=r*r,l=o*h,u=3*r*o,f=3*a*h,c=a*r;return t[0]=e[0]*l+i[0]*u+n[0]*f+s[0]*c,t[1]=e[1]*l+i[1]*u+n[1]*f+s[1]*c,t[2]=e[2]*l+i[2]*u+n[2]*f+s[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:h,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2],l=s*a-r*o,u=r*h-n*a,f=n*o-s*h,c=Math.sqrt(l*l+u*u+f*f);return t[0]=l/c,t[1]=u/c,t[2]=f/c,t},direction:X,dist:L,distance:g,div:E,divide:f,dot:I,equals:O,exactEquals:Y,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,s,r){let h=r*r,o=h*(2*r-3)+1,a=h*(r-2)+r,l=h*(r-1),u=h*(3-2*r);return t[0]=e[0]*o+i[0]*a+n[0]*l+s[0]*u,t[1]=e[1]*o+i[1]*a+n[1]*l+s[1]*u,t[2]=e[2]*o+i[2]*a+n[2]*l+s[2]*u,t},inverse:b,len:k,length:r,lerp:B,max:_,min:y,mul:Z,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=s.Ov,n=2*i()*Math.PI,r=2*i()-1,h=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*h,t[1]=Math.sin(n)*h,t[2]=r*e,t},rotateX:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0],r[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),r[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateY:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),r[1]=s[1],r[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateZ:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),r[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),r[2]=s[2],t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:p,scaleTo:function(t,e){return m(t,t,e/k(t))},set:o,sign:d,sqrDist:G,sqrLen:q,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:l,transformMat3:P,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,k,"jb",0,j,"lo",0,G,"uE",0,q])},75503(t,e,i){i.d(e,{wq:()=>o});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),h=i(11006);class o{constructor(t=9,e){this._compareMinX=c,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(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){a(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let s=0,r=i.children.length;s<r;s++){let r=i.children[s],h=i.leaf?n(r):r;x(t,h)&&(i.leaf?e(r):g(t,h)?a(r,e):w.push(r))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,s=e.children.length;n<s;n++){let s=e.children[n],r=e.leaf?i(s):s;if(x(t,r)){if(e.leaf||g(t,r))return!0;w.push(s)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),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){let 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 A([]),this}remove(t){if(!t)return this;let e,i=this._data,r=null,h=0,o=!1,a=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],h=I.pop()??0,o=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,s.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;o||i.leaf||!g(i,a)?r?(h++,i=r.children[h],o=!1):i=null:(v.push(i),I.push(h),h=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let s=i-e+1,r=this._maxEntries;if(s<=r){let n=new A(t.slice(e,i+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));let h=new P([]);h.height=n;let o=Math.ceil(s/r),a=o*Math.ceil(Math.sqrt(r));M(t,e,i,a,this._compareMinX);for(let s=e;s<=i;s+=a){let e=Math.min(s+a-1,i);M(t,s,e,o,this._compareMinY);for(let i=s;i<=e;i+=o){let s=Math.min(i+o-1,e);h.children.push(this._build(t,i,s,n-1))}}return l(h,this._toBBox),h}_insert(t,e,i){let n=this._toBBox,s=i?t:n(t);v.clear();let r=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,h=e.children.length;r<h;r++){let h=e.children[r],o=y(h),a=m(t,h)-o;a<s?(s=a,n=o<n?o:n,i=h):a===s&&o<n&&(n=o,i=h)}e=i||e.children[0]}return e}(s,this._data,e,v);for(r.children.push(t),f(r,s);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(s,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);let r=this._chooseSplitIndex(i,s,n);if(!r)return;let h=i.children.splice(r,i.children.length-r),o=i.leaf?new A(h):new P(h);o.height=i.height,l(i,this._toBBox),l(o,this._toBBox),e?t.data[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this._data=new P([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,s,r;n=s=1/0;for(let h=e;h<=i-e;h++){let e=u(t,0,h,this._toBBox),o=u(t,h,i,this._toBBox),a=p(e,o),l=y(e)+y(o);a<n?(n=a,r=h,s=l<s?l:s):a===n&&l<s&&(s=l,r=h)}return r}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,s=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let s=this._toBBox,r=u(t,0,e,s),h=u(t,i-e,i,s),o=_(r)+_(h);for(let n=e;n<i-e;n++){let e=t.children[n];f(r,t.leaf?s(e):e),o+=_(r)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(h,t.leaf?s(e):e),o+=_(h)}return o}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let s=t.data[e-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,s.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function l(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,s){s||=new A([]),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,h=e;h<i;h++)r=t.children[h],f(s,t.leaf?n(r):r);return s}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function _(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,s){let r=[e,i];for(;r.length;){let e=r.pop(),i=r.pop();if(e-i<=n)continue;let o=i+Math.ceil((e-i)/n/2)*n;(0,h.q)(t,o,i,e,s),r.push(i,o,o,e)}}const w=new r.A,b=new r.A,v=new r.A,I=new r.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends B{constructor(t){super(),this.children=t,this.leaf=!0}}class P extends B{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>o,Qh:()=>r,lM:()=>s});var n=i(34275);function s(t){if(!t)return 0;let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i],!1));return e}function r(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return a(t,8);let i=u;for(let n=0;n<e;n++)i+=h(t[n]);return i}(t);let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i]));return e}function h(t,e=!0){switch(typeof t){case"object":return e?r(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?a(e,16):0:0),0)}function a(t,e){return u+t.length*e}const l=32,u=16,f=145},48526(t,e,i){i.d(e,{A:()=>m});var n,s=i(32198),r=i(4576),h=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),_=i(43937);let m=n=class extends l.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:s}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new a.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,h.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:s}=this;return new n({points:(0,h.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:s})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,r.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,s.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,s.Cg)([(0,_.K)("points")],m.prototype,"writePoints",null),m=n=(0,s.Cg)([(0,o.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,s=i(32198),r=i(4718),h=i(91429),o=i(5443),a=i(91075),l=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:s}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,r.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new o.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,r.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,r.o8)(this.paths),t.curvePaths=(0,r.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,s=this.hasM;return n&&!s?new l.A(i[0],i[1],i[2],void 0,this.spatialReference):s&&!n?new l.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&s?new l.A(i[0],i[1],i[2],i[3],this.spatialReference):new l.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new l.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new l.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths"),this):this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,s.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,s.Cg)([(0,h.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,s.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,s.Cg)([(0,h.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,s.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,s.Cg)([(0,h.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,yH:()=>a});var n=i(34275),s=i(9093);function r(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function h(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function o(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function a(t,e){if(0===e.length)return h(t);if(0===t.length)return h(e);let i=r(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let n=0;n<e.length;++n)i[t.length+n]=e[n];return i}function l(t){return[...t]}function u(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>r,Ox:()=>h,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class s{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class r{constructor(t,e,i,n=8,s=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=s,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,r,h,o,a,l,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,r=d,h=this._intersect(r,i),this._start=this._dist+y*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(r.x,r.y,!0));else if(this._prevIsIn)r=this._prevPt,i=d,h=this._intersect(r,i),this._lineTo(h.x,h.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(o=(this._xmin-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<this._ymin?l=!1:f>this._ymax?l=!0:i.push(new s(o,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(o=(this._xmax-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<this._ymin?l=!1:f>this._ymax?l=!0:i.push(new s(o,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(o=(this._ymin-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(o=(this._ymax-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymax))),0===i.length)a?l?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):l?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&o.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,s,r;if(e.x>=this._xmin&&e.x<=this._xmax)s=e.y<=this._ymin?this._ymin:this._ymax,r=(s-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,r=(i-t.x)/(e.x-t.x),s=t.y+r*(e.y-t.y);else{s=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),h=(s-t.y)/(e.y-t.y);n<h?(r=n,s=t.y+n*(e.y-t.y)):(r=h,i=t.x+h*(e.x-t.x))}return this._r=r,new n(i,s)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let s,r;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(s=this._line[this._line.length-1],s.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){s=this._line[this._line.length-1];let i=s.x===t,h=s.y===e;if(i&&h)return;this._isH&&i||this._isV&&h?(s.x=t,s.y=e,r=this._line[this._line.length-2],r.x===t&&r.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(r=this._line[this._line.length-2],this._isH=r.x===t,this._isV=r.y===e)):(this._isH=r.x===t,this._isV=r.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=h)}else this._line.push(new n(t,e))}}class h{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class o{static simplify(t,e,i){if(!i)return;let n=-e,s=t+e,r=-e,h=t+e,a=[],l=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let o,u=e[0],f=e.length;for(let i=1;i<f;++i)o=e[i],u.x===o.x&&(u.x<=n&&(u.y>o.y?(a.push(t),a.push(i),a.push(0),a.push(-1)):(l.push(t),l.push(i),l.push(0),l.push(-1))),u.x>=s&&(u.y<o.y?(a.push(t),a.push(i),a.push(1),a.push(-1)):(l.push(t),l.push(i),l.push(1),l.push(-1)))),u.y===o.y&&(u.y<=r&&(u.x<o.x?(a.push(t),a.push(i),a.push(2),a.push(-1)):(l.push(t),l.push(i),l.push(2),l.push(-1))),u.y>=h&&(u.x>o.x?(a.push(t),a.push(i),a.push(3),a.push(-1)):(l.push(t),l.push(i),l.push(3),l.push(-1)))),u=o}if(0===a.length||0===l.length)return;o.fillParent(i,l,a),o.fillParent(i,a,l);let f=[];o.calcDeltas(f,l,a),o.calcDeltas(f,a,l),o.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,s=e.length;for(let r=0;r<s;r+=4){let s=e[r],h=e[r+1],o=e[r+2],l=t[s][h-1],u=t[s][h],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==o)continue;let n=i[e],s=i[e+1],r=t[n][s-1],h=t[n][s];switch(o){case 0:case 1:if(a(l.y,r.y,h.y)&&a(u.y,r.y,h.y)){let t=Math.abs(h.y-r.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(a(l.x,r.x,h.x)&&a(u.x,r.x,h.x)){let t=Math.abs(h.x-r.x);t<f&&(f=t,c=e)}}}e[r+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let s=0;s<n;s+=4){let n=o.calcDelta(s,e,i,[]);t.push(e[s]),t.push(e[s+1]),t.push(e[s+2]),t.push(n)}}static calcDelta(t,e,i,n){let s=e[t+3];if(-1===s)return 0;let r=n.length;return r>1&&n[r-2]===s?0:(n.push(s),o.calcDelta(s,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let s=0;s<i;s+=4){let i=e[t[s]],r=t[s+1],h=n-t[s+3];switch(t[s+2]){case 0:i[r-1].x-=h,i[r].x-=h,1===r&&(i[i.length-1].x-=h),r===i.length-1&&(i[0].x-=h);break;case 1:i[r-1].x+=h,i[r].x+=h,1===r&&(i[i.length-1].x+=h),r===i.length-1&&(i[0].x+=h);break;case 2:i[r-1].y-=h,i[r].y-=h,1===r&&(i[i.length-1].y-=h),r===i.length-1&&(i[0].y-=h);break;case 3:i[r-1].y+=h,i[r].y+=h,1===r&&(i[i.length-1].y+=h),r===i.length-1&&(i[0].y+=h)}}}}const a=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>h,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>B,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>p,VL:()=>y,aI:()=>S,fA:()=>o,gE:()=>l,gX:()=>g,hZ:()=>I,iT:()=>d,is:()=>P,pg:()=>M,uJ:()=>m,vI:()=>v,vY:()=>a,vt:()=>r,w1:()=>u,yr:()=>_}),i(35522);var n=i(5443),s=(i(19419),i(4197));function r(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function h(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function o(t,e,i,n,s,h,o=r()){return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=h,o}function a(t,e=r()){return function(t,e,i,n=r()){return I(n,C),function(t,e,i=0,n=e.length/3){let s=t[0],r=t[1],h=t[2],o=t[3],a=t[4],l=t[5];for(let t=0;t<n;t++)s=Math.min(s,e[i+3*t]),r=Math.min(r,e[i+3*t+1]),h=Math.min(h,e[i+3*t+2]),o=Math.max(o,e[i+3*t]),a=Math.max(a,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=r,t[2]=h,t[3]=o,t[4]=a,t[5]=l}(n,t,e,i),n}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,n,r,h,o,a]=t;return e[0]=i,e[1]=n,e[2]=r,e[3]=i,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=r,e[9]=i,e[10]=o,e[11]=a,e[12]=h,e[13]=n,e[14]=r,e[15]=h,e[16]=n,e[17]=a,e[18]=h,e[19]=o,e[20]=r,e[21]=h,e[22]=o,e[23]=a,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function _(t){return t[1]>=t[4]?0:t[4]-t[1]}function m(t){return t[2]>=t[5]?0:t[5]-t[2]}function p(t){let e=y(t),i=m(t),n=_(t);return e*e+i*i+n*n}function g(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+_(t)/2,e[2]=t[2]+m(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=_(t),e[2]=m(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(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}function T(t){return t?I(t,C):r(C)}function B(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=s,t[5]=1/0,t}function P(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!P(t)||!P(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];r(),i.d(e,["qv",0,C,"v_",0,R])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function r(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths||void 0!==t.curvePaths}function o(t){return void 0!==t.rings||void 0!==t.curveRings}function a(t){return"object"==typeof t&&"vertexAttributes"in t}function l(t){return t?r(t)?"esriGeometryPoint":h(t)?"esriGeometryPolyline":o(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":s(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>l,Bi:()=>o,Pv:()=>u,Rg:()=>h,U9:()=>s,W0:()=>f,ZC:()=>n,fT:()=>r,uW:()=>a})},6518(t,e,i){i.d(e,{F:()=>o});var n=i(44208),s=i(75503),r=i(19419);const h={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("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){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),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;let t=(0,r.Ie)();for(let 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){let 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,i){(function(t){h.minX=t[0],h.minY=t[1],h.maxX=t[2],h.maxY=t[3]})(e),t.search(h,i)}(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){let 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()))}}},83221(t,e,i){i.d(e,{A:()=>y});var n=i(4576),s=i(49186),r=i(65529),h=i(53966),o=i(70328),a=i(19419),l=i(90708),u=i(6518),f=i(51441),c=i(37730);const d=(0,o.vt)();class y{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,s]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:s,spatialReference:(0,f.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,o.Jt)(d,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);if(n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.jQ)(i??(0,a.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0}_upsert(t){let e=t?.objectId;if(null==e)return h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:r}=t;for(let t in r)i.attributes[t]=r[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,l.jQ)((0,a.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},37730(t,e,i){var n=i(43334);const s={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,s])},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>B,sO:()=>I,xD:()=>f});var n=i(67482),s=i(49186),r=i(21325),h=i(90708),o=i(43334),a=i(92722),l=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function _(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],s=t[(i+1)%t.length];e+=n[0]*s[1]-s[0]*n[1]}return e<=0}function m(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function p(t,e){let{coordinates:i,type:n}=t,s=e.hasZ??!1;switch(n){case"Point":return new a.A([],[...i],s,!1);case"LineString":return(0,h.Ap)({paths:[i],hasZ:!0},s,!1);case"MultiLineString":return(0,h.Ap)({paths:i,hasZ:!0},s,!1);case"MultiPoint":return(0,h.PR)({points:i,hasZ:!0},s,!1);case"Polygon":case"MultiPolygon":{let t=new a.A([],[],s,!1);for(let e of"Polygon"===n?[i]:i){g(t,e[0],s);for(let i=1;i<e.length;i++)x(t,e[i],s)}return t}}}function g(t,e,i){m(e),function(t){return!_(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){m(e),function(t){return _(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],s){t.coords.push(e,i),s&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,h=(0,r.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!h.test(n))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],s=new Set,r=new Set,h=!1,o=null,a=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:_}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(h||=y(d(t)),a||(a=null!=_,a&&(i=typeof _,c&&(o=Object.keys(c).filter(t=>c[t]===_)))),c&&o&&a&&null!=_&&(o.length>1?o=o.filter(t=>c[t]===_):1===o.length&&(o=c[o[0]]===_?o:[])),c))for(let t in c){if(s.has(t))continue;let e=v(c[t]);if("unknown"===e){r.add(t);continue}r.delete(t),s.add(t);let i=(0,l.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let _=(0,l.rS)(1===o?.length&&o[0]||null)??void 0;if(_)for(let t of n)if(t.name===_&&(0,l.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:h,objectIdFieldName:_,objectIdFieldType:i,unknownFields:Array.from(r)}}function B(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let s of t){let{geometry:t,properties:r,id:h}=s;if(t&&f(t.type)!==i)continue;let a,l=r||{};n&&(a=l[n],null!=h&&!a&&(l[n]=a=h)),yield new o.Om(t&&p(t,e),l,null,a)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>P});var n=i(56507),s=i(17676),r=i(19419),h=i(21325),o=i(6774),a=i(90708),l=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let s=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-s)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function _(t,e,i){let n=new y;return n.writeMessage(3,m,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function m(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,p,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function p(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,g,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function g(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let s=w(i[n]);if(null==s)continue;let r=t.keyIndices.get(n);r??(r=t.keys.length,t.keyIndices.set(n,r),t.keys.push(n));let h=`${typeof s}:${s}`,o=t.valueIndices.get(h);o??(o=t.values.length,t.valueIndices.set(h,o),t.values.push(s)),e.writeVarint(r),e.writeVarint(o)}}function x(t,e){let i=t.getType(),n=0,s=0;for(let r=0;r<t.getPathCount();r++){let h=t.getPathLength(r),o=1===i?h:1;e.writeVarint(b(1,o));let a=3===i?h-1:h;for(let h=0;h<a;h++){1===h&&1!==i&&e.writeVarint(b(2,a-1));let o=t.getX(r,h),l=t.getY(r,h);e.writeVarint(v(o-n)),e.writeVarint(v(l-s)),n=o,s=l}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=20037508.342787,B=2*T,A=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class P{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},r={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let h="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:r.signal})).data:t.data;(0,s.Te)(r),(0,c.sO)(h),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let o=0;for(let{geometryType:e,vectorTileGeometryType:i}of A){let n=(0,c.bd)(h,{geometryType:e,hasZ:!1}),s=S(h,e,t);if(0===n.length)continue;let r=new u.A({geometryType:e,hasM:!1,hasZ:!1}),a=[],l=0;for(let t of n){let i=C(t.geometry,e);i&&(t.objectId=o++,t.geometry=i,this._featureIds.set(t.objectId,s[l++]??null),a.push(t))}a.length>0&&(r.addMany(a),this._stores.push({geometryType:e,store:r,vectorTileGeometryType:i}))}return(0,s.Te)(r),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile({col:t,level:e,row:i},n={}){(0,s.Te)(n);let r=this._getTileFeatures(e,i,t),h=r.length>0?_(this._name,new F(r),I):new ArrayBuffer(0);return(0,s.Te)(n),{result:h,transferList:[h]}}_getTileFeatures(t,e,i){let n=B/2**t,s=i*n-20037508.342787,h=T-e*n,o=n/I,a=this._buffer*o,l=this._tolerance*o,u=[];for(let t of[-40075016.685574,0,B]){let e=(0,r.fA)(s-a-t,h-n-a,s+n+a-t,h+a),i={scale:[o,-o,1,1],translate:[s-t,h,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:s}of this._stores)n.forEachInBounds(e,e=>{let n=R(e,t,s,i,l,this._buffer);n&&u.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:s})})}return u}}function S(t,e,i){let n=[],s="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<s.length;t++){let r=s[t];if(!r.geometry||(0,c.xD)(r.geometry.type)!==e)continue;let h=i.promoteId?r.properties?.[i.promoteId]:!0===i.generateId?t:r.id;n.push("number"==typeof h||"string"==typeof h?h:null)}return n}function C(t,e){return t?(0,a.Ux)((0,f.Cv)((0,a.zv)(t,e,!1,!1),h.KK,h.ch))??null:null}function R(t,e,i,n,s,r){if(!t.geometry)return null;let h=s>0?(0,a.kz)(t.geometry,e,s,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new o.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let s of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<s;e++){let s=i+e*t.stride;n.lineTo(t.coords[s],t.coords[s+1])}3===e&&n.close(),i+=s*t.stride}}let s=n.result();if(!s)return null;let r=1===e?[s.length]:s.map(t=>t.length),h=[];for(let t of s)for(let e of t)h.push(e.x,e.y);return new l.A(r,h)}((0,a.Nl)(h,e,n,!1,!1,!0),i,r)}class F{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2170],{69540(t,e,i){var n=i(32198),s=i(69622),r=(i(44208),i(4718)),h=(i(53966),i(97768)),o=i(88620),a=i(64108);const l=Symbol("ClonableMixin"),u=t=>{var e;let i=t,s=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=l}clone(t){let e=(0,o.oY)(this);(0,h.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,s={},a=new Map;for(let e in i){let h=i[e],o=n?.originOf(e),l=h.clonable;if(h.readOnly||!1===l||7!==o&&0!==o&&5!==o&&4!==o)continue;let u=this[e],f=null;if("function"==typeof l)f=l(u,t);else if("reference"===l)f=u;else if(f=(0,r.TU)(u,t),null!=u&&null==f)continue;0===o?a.set(e,f):s[e]=f}let l=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){let t=(0,o.oY)(l)?.store;if(t)for(let[e,i]of a)t.set(e,i,0)}return l}};return s=(0,n.Cg)([(0,a.$)("esri.core.Clonable")],s),s},f=u(s.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==s(t)}function s(t){return function(t){let e=r.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,s=i.month-1,h=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),l=+(i.seconds??"0");if(o>23||a>59||l>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,s,h,o,a,l,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,s,h,o,a,l,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!h.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>s});const r=/^(?:(?<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})))?$/,h=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>s,vt:()=>n});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(t,e,i,n,s,r,h,o,a,l,u,f,c,y,d,_){return[t,e,i,n,s,r,h,o,a,l,u,f,c,y,d,_]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,r])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>r,C:()=>h,Cc:()=>B,DI:()=>b,Io:()=>g,Ln:()=>p,Om:()=>I,Qr:()=>f,Re:()=>l,S8:()=>v,T9:()=>_,WQ:()=>a,Z0:()=>A,_S:()=>y,aI:()=>O,ei:()=>P,fw:()=>C,gL:()=>S,hG:()=>x,hZ:()=>o,hs:()=>m,jk:()=>d,lw:()=>u,m3:()=>M,oW:()=>X,t2:()=>Y,tn:()=>c,ze:()=>w});var n=i(51850),s=i(34304);function r(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function a(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function y(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function _(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function m(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function p(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function g(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+n*n+s*s)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return i*i+n*n+s*s}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],s=e[2],r=i*i+n*n+s*s;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2];return t[0]=s*a-r*o,t[1]=r*h-n*a,t[2]=n*o-s*h,t}function B(t,e,i,n){let s=e[0],r=e[1],h=e[2];return t[0]=s+n*(i[0]-s),t[1]=r+n*(i[1]-r),t[2]=h+n*(i[2]-h),t}function A(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=i[0]*n+i[4]*s+i[8]*r+i[12],t[1]=i[1]*n+i[5]*s+i[9]*r+i[13],t[2]=i[2]*n+i[6]*s+i[10]*r+i[14],t}function P(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=n*i[0]+s*i[3]+r*i[6],t[1]=n*i[1]+s*i[4]+r*i[7],t[2]=n*i[2]+s*i[5]+r*i[8],t}function S(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,n,s,r){let h=e[0],o=e[1],a=e[2],l=n*a-s*o,u=s*h-i*a,f=i*o-n*h,c=n*f-s*u,y=s*l-i*f,d=i*u-n*l,_=2*r;return t[0]=h+l*_+2*c,t[1]=o+u*_+2*y,t[2]=a+f*_+2*d,t}const R=(0,n.vt)(),F=(0,n.vt)();function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function O(t,e){if(t===e)return!0;let i=t[0],n=t[1],r=t[2],h=e[0],o=e[1],a=e[2],l=(0,s.FD)();return Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))}function X(t,e,i){let n=i[0]-e[0],s=i[1]-e[1],r=i[2]-e[2],h=n*n+s*s+r*r;return h>0?(h=1/Math.sqrt(h),t[0]=n*h,t[1]=s*h,t[2]=r*h,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=l,Z=u,E=f,L=g,G=x,k=r,V=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:a,angle:function(t,e){v(R,t),v(F,e);let i=I(R,F);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,n,s,r){let h=1-r,o=h*h,a=r*r,l=o*h,u=3*r*o,f=3*a*h,c=a*r;return t[0]=e[0]*l+i[0]*u+n[0]*f+s[0]*c,t[1]=e[1]*l+i[1]*u+n[1]*f+s[1]*c,t[2]=e[2]*l+i[2]*u+n[2]*f+s[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:h,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2],l=s*a-r*o,u=r*h-n*a,f=n*o-s*h,c=Math.sqrt(l*l+u*u+f*f);return t[0]=l/c,t[1]=u/c,t[2]=f/c,t},direction:X,dist:L,distance:g,div:E,divide:f,dot:I,equals:O,exactEquals:Y,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,s,r){let h=r*r,o=h*(2*r-3)+1,a=h*(r-2)+r,l=h*(r-1),u=h*(3-2*r);return t[0]=e[0]*o+i[0]*a+n[0]*l+s[0]*u,t[1]=e[1]*o+i[1]*a+n[1]*l+s[1]*u,t[2]=e[2]*o+i[2]*a+n[2]*l+s[2]*u,t},inverse:b,len:k,length:r,lerp:B,max:_,min:d,mul:Z,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=s.Ov,n=2*i()*Math.PI,r=2*i()-1,h=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*h,t[1]=Math.sin(n)*h,t[2]=r*e,t},rotateX:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0],r[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),r[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateY:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),r[1]=s[1],r[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateZ:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),r[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),r[2]=s[2],t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:p,scaleTo:function(t,e){return m(t,t,e/k(t))},set:o,sign:y,sqrDist:G,sqrLen:V,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:l,transformMat3:P,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,k,"jb",0,j,"lo",0,G,"uE",0,V])},75503(t,e,i){i.d(e,{wq:()=>o});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),h=i(11006);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=y,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(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){a(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let s=0,r=i.children.length;s<r;s++){let r=i.children[s],h=i.leaf?n(r):r;x(t,h)&&(i.leaf?e(r):g(t,h)?a(r,e):w.push(r))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,s=e.children.length;n<s;n++){let s=e.children[n],r=e.leaf?i(s):s;if(x(t,r)){if(e.leaf||g(t,r))return!0;w.push(s)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),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){let 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 A([]),this}remove(t){if(!t)return this;let e,i=this._data,r=null,h=0,o=!1,a=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],h=I.pop()??0,o=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,s.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;o||i.leaf||!g(i,a)?r?(h++,i=r.children[h],o=!1):i=null:(v.push(i),I.push(h),h=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let s=i-e+1,r=this._maxEntries;if(s<=r){let n=new A(t.slice(e,i+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));let h=new P([]);h.height=n;let o=Math.ceil(s/r),a=o*Math.ceil(Math.sqrt(r));M(t,e,i,a,this._compareMinX);for(let s=e;s<=i;s+=a){let e=Math.min(s+a-1,i);M(t,s,e,o,this._compareMinY);for(let i=s;i<=e;i+=o){let s=Math.min(i+o-1,e);h.children.push(this._build(t,i,s,n-1))}}return l(h,this._toBBox),h}_insert(t,e,i){let n=this._toBBox,s=i?t:n(t);v.clear();let r=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,h=e.children.length;r<h;r++){let h=e.children[r],o=d(h),a=m(t,h)-o;a<s?(s=a,n=o<n?o:n,i=h):a===s&&o<n&&(n=o,i=h)}e=i||e.children[0]}return e}(s,this._data,e,v);for(r.children.push(t),f(r,s);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(s,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);let r=this._chooseSplitIndex(i,s,n);if(!r)return;let h=i.children.splice(r,i.children.length-r),o=i.leaf?new A(h):new P(h);o.height=i.height,l(i,this._toBBox),l(o,this._toBBox),e?t.data[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this._data=new P([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,s,r;n=s=1/0;for(let h=e;h<=i-e;h++){let e=u(t,0,h,this._toBBox),o=u(t,h,i,this._toBBox),a=p(e,o),l=d(e)+d(o);a<n?(n=a,r=h,s=l<s?l:s):a===n&&l<s&&(s=l,r=h)}return r}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,s=t.leaf?this._compareMinY:y;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let s=this._toBBox,r=u(t,0,e,s),h=u(t,i-e,i,s),o=_(r)+_(h);for(let n=e;n<i-e;n++){let e=t.children[n];f(r,t.leaf?s(e):e),o+=_(r)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(h,t.leaf?s(e):e),o+=_(h)}return o}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let s=t.data[e-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,s.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function l(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,s){s||=new A([]),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,h=e;h<i;h++)r=t.children[h],f(s,t.leaf?n(r):r);return s}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function y(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function _(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,s){let r=[e,i];for(;r.length;){let e=r.pop(),i=r.pop();if(e-i<=n)continue;let o=i+Math.ceil((e-i)/n/2)*n;(0,h.q)(t,o,i,e,s),r.push(i,o,o,e)}}const w=new r.A,b=new r.A,v=new r.A,I=new r.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends B{constructor(t){super(),this.children=t,this.leaf=!0}}class P extends B{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>o,Qh:()=>r,lM:()=>s});var n=i(34275);function s(t){if(!t)return 0;let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i],!1));return e}function r(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return a(t,8);let i=u;for(let n=0;n<e;n++)i+=h(t[n]);return i}(t);let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i]));return e}function h(t,e=!0){switch(typeof t){case"object":return e?r(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?a(e,16):0:0),0)}function a(t,e){return u+t.length*e}const l=32,u=16,f=145},48526(t,e,i){i.d(e,{A:()=>m});var n,s=i(32198),r=i(4576),h=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),f=i(16930),c=i(90634),y=i(47610),d=i(56993),_=i(43937);let m=n=class extends l.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:s}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new a.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,h.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:s}=this;return new n({points:(0,h.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:s})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,r.aI)(this.points,t.points,y.v6)}addPoint(t){return(0,d.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,d.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,s.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,s.Cg)([(0,_.K)("points")],m.prototype,"writePoints",null),m=n=(0,s.Cg)([(0,o.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>d});var n,s=i(32198),r=i(4718),h=i(91429),o=i(5443),a=i(91075),l=i(86738),u=i(16930),f=i(90634),c=i(56993),y=i(43937);let d=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:s}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,r.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new o.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,r.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,r.o8)(this.paths),t.curvePaths=(0,r.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,s=this.hasM;return n&&!s?new l.A(i[0],i[1],i[2],void 0,this.spatialReference):s&&!n?new l.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&s?new l.A(i[0],i[1],i[2],i[3],this.spatialReference):new l.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new l.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new l.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths"),this):this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,s.Cg)([(0,h.MZ)({readOnly:!0})],d.prototype,"cache",null),(0,s.Cg)([(0,h.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],d.prototype,"curvePaths",void 0),(0,s.Cg)([(0,y.K)("curvePaths")],d.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],d.prototype,"extent",null),(0,s.Cg)([(0,h.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],d.prototype,"paths",void 0),(0,s.Cg)([(0,y.K)("paths")],d.prototype,"writePaths",null),d=n=(0,s.Cg)([(0,h.$K)("esri.geometry.Polyline")],d),d.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,yH:()=>a});var n=i(34275),s=i(9093);function r(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function h(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function o(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function a(t,e){if(0===e.length)return h(t);if(0===t.length)return h(e);let i=r(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let n=0;n<e.length;++n)i[t.length+n]=e[n];return i}function l(t){return[...t]}function u(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>r,Ox:()=>h,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class s{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class r{constructor(t,e,i,n=8,s=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=s,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,r,h,o,a,l,u,f,c=this._isIn(t,e),y=new n(t,e),d=n.distance(this._prevPt,y);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,r=y,h=this._intersect(r,i),this._start=this._dist+d*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(r.x,r.y,!0));else if(this._prevIsIn)r=this._prevPt,i=y,h=this._intersect(r,i),this._lineTo(h.x,h.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=y;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(o=(this._xmin-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<this._ymin?l=!1:f>this._ymax?l=!0:i.push(new s(o,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(o=(this._xmax-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<this._ymin?l=!1:f>this._ymax?l=!0:i.push(new s(o,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(o=(this._ymin-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(o=(this._ymax-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymax))),0===i.length)a?l?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):l?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+d*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+d*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=d,this._prevIsIn=c,this._prevPt=y}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&o.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,s,r;if(e.x>=this._xmin&&e.x<=this._xmax)s=e.y<=this._ymin?this._ymin:this._ymax,r=(s-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,r=(i-t.x)/(e.x-t.x),s=t.y+r*(e.y-t.y);else{s=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),h=(s-t.y)/(e.y-t.y);n<h?(r=n,s=t.y+n*(e.y-t.y)):(r=h,i=t.x+h*(e.x-t.x))}return this._r=r,new n(i,s)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let s,r;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(s=this._line[this._line.length-1],s.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){s=this._line[this._line.length-1];let i=s.x===t,h=s.y===e;if(i&&h)return;this._isH&&i||this._isV&&h?(s.x=t,s.y=e,r=this._line[this._line.length-2],r.x===t&&r.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(r=this._line[this._line.length-2],this._isH=r.x===t,this._isV=r.y===e)):(this._isH=r.x===t,this._isV=r.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=h)}else this._line.push(new n(t,e))}}class h{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class o{static simplify(t,e,i){if(!i)return;let n=-e,s=t+e,r=-e,h=t+e,a=[],l=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let o,u=e[0],f=e.length;for(let i=1;i<f;++i)o=e[i],u.x===o.x&&(u.x<=n&&(u.y>o.y?(a.push(t),a.push(i),a.push(0),a.push(-1)):(l.push(t),l.push(i),l.push(0),l.push(-1))),u.x>=s&&(u.y<o.y?(a.push(t),a.push(i),a.push(1),a.push(-1)):(l.push(t),l.push(i),l.push(1),l.push(-1)))),u.y===o.y&&(u.y<=r&&(u.x<o.x?(a.push(t),a.push(i),a.push(2),a.push(-1)):(l.push(t),l.push(i),l.push(2),l.push(-1))),u.y>=h&&(u.x>o.x?(a.push(t),a.push(i),a.push(3),a.push(-1)):(l.push(t),l.push(i),l.push(3),l.push(-1)))),u=o}if(0===a.length||0===l.length)return;o.fillParent(i,l,a),o.fillParent(i,a,l);let f=[];o.calcDeltas(f,l,a),o.calcDeltas(f,a,l),o.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,s=e.length;for(let r=0;r<s;r+=4){let s=e[r],h=e[r+1],o=e[r+2],l=t[s][h-1],u=t[s][h],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==o)continue;let n=i[e],s=i[e+1],r=t[n][s-1],h=t[n][s];switch(o){case 0:case 1:if(a(l.y,r.y,h.y)&&a(u.y,r.y,h.y)){let t=Math.abs(h.y-r.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(a(l.x,r.x,h.x)&&a(u.x,r.x,h.x)){let t=Math.abs(h.x-r.x);t<f&&(f=t,c=e)}}}e[r+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let s=0;s<n;s+=4){let n=o.calcDelta(s,e,i,[]);t.push(e[s]),t.push(e[s+1]),t.push(e[s+2]),t.push(n)}}static calcDelta(t,e,i,n){let s=e[t+3];if(-1===s)return 0;let r=n.length;return r>1&&n[r-2]===s?0:(n.push(s),o.calcDelta(s,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let s=0;s<i;s+=4){let i=e[t[s]],r=t[s+1],h=n-t[s+3];switch(t[s+2]){case 0:i[r-1].x-=h,i[r].x-=h,1===r&&(i[i.length-1].x-=h),r===i.length-1&&(i[0].x-=h);break;case 1:i[r-1].x+=h,i[r].x+=h,1===r&&(i[i.length-1].x+=h),r===i.length-1&&(i[0].x+=h);break;case 2:i[r-1].y-=h,i[r].y-=h,1===r&&(i[i.length-1].y-=h),r===i.length-1&&(i[0].y-=h);break;case 3:i[r-1].y+=h,i[r].y+=h,1===r&&(i[i.length-1].y+=h),r===i.length-1&&(i[0].y+=h)}}}}const a=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>h,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>B,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>p,VL:()=>d,aI:()=>S,fA:()=>o,gE:()=>l,gX:()=>g,hZ:()=>I,iT:()=>y,is:()=>P,pg:()=>M,uJ:()=>m,vI:()=>v,vY:()=>a,vt:()=>r,w1:()=>u,yr:()=>_}),i(35522);var n=i(5443),s=(i(19419),i(4197));function r(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function h(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function o(t,e,i,n,s,h,o=r()){return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=h,o}function a(t,e=r()){return function(t,e,i,n=r()){return I(n,C),function(t,e,i=0,n=e.length/3){let s=t[0],r=t[1],h=t[2],o=t[3],a=t[4],l=t[5];for(let t=0;t<n;t++)s=Math.min(s,e[i+3*t]),r=Math.min(r,e[i+3*t+1]),h=Math.min(h,e[i+3*t+2]),o=Math.max(o,e[i+3*t]),a=Math.max(a,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=r,t[2]=h,t[3]=o,t[4]=a,t[5]=l}(n,t,e,i),n}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,n,r,h,o,a]=t;return e[0]=i,e[1]=n,e[2]=r,e[3]=i,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=r,e[9]=i,e[10]=o,e[11]=a,e[12]=h,e[13]=n,e[14]=r,e[15]=h,e[16]=n,e[17]=a,e[18]=h,e[19]=o,e[20]=r,e[21]=h,e[22]=o,e[23]=a,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function y(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function d(t){return t[0]>=t[3]?0:t[3]-t[0]}function _(t){return t[1]>=t[4]?0:t[4]-t[1]}function m(t){return t[2]>=t[5]?0:t[5]-t[2]}function p(t){let e=d(t),i=m(t),n=_(t);return e*e+i*i+n*n}function g(t,e=[0,0,0]){return e[0]=t[0]+d(t)/2,e[1]=t[1]+_(t)/2,e[2]=t[2]+m(t)/2,e}function x(t,e=[0,0,0]){return e[0]=d(t),e[1]=_(t),e[2]=m(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(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}function T(t){return t?I(t,C):r(C)}function B(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=s,t[5]=1/0,t}function P(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!P(t)||!P(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];r(),i.d(e,["qv",0,C,"v_",0,R])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function r(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths||void 0!==t.curvePaths}function o(t){return void 0!==t.rings||void 0!==t.curveRings}function a(t){return"object"==typeof t&&"vertexAttributes"in t}function l(t){return t?r(t)?"esriGeometryPoint":h(t)?"esriGeometryPolyline":o(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":s(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>l,Bi:()=>o,Pv:()=>u,Rg:()=>h,U9:()=>s,W0:()=>f,ZC:()=>n,fT:()=>r,uW:()=>a})},6518(t,e,i){i.d(e,{F:()=>o});var n=i(44208),s=i(75503),r=i(19419);const h={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("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){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),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;let t=(0,r.Ie)();for(let 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){let 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,i){(function(t){h.minX=t[0],h.minY=t[1],h.maxX=t[2],h.maxY=t[3]})(e),t.search(h,i)}(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){let 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()))}}},83221(t,e,i){i.d(e,{A:()=>d});var n=i(4576),s=i(49186),r=i(65529),h=i(53966),o=i(70328),a=i(19419),l=i(90708),u=i(6518),f=i(51441),c=i(37730);const y=(0,o.vt)();class d{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,s]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:s,spatialReference:(0,f.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,o.Jt)(y,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);if(n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.jQ)(i??(0,a.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0}_upsert(t){let e=t?.objectId;if(null==e)return h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:r}=t;for(let t in r)i.attributes[t]=r[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,l.jQ)((0,a.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},37730(t,e,i){var n=i(43334);const s={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,s])},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>B,sO:()=>I,xD:()=>f});var n=i(67482),s=i(49186),r=i(21325),h=i(90708),o=i(43334),a=i(92722),l=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*y(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function d(t){for(let e of t)if(e.length>2)return!0;return!1}function _(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],s=t[(i+1)%t.length];e+=n[0]*s[1]-s[0]*n[1]}return e<=0}function m(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function p(t,e){let{coordinates:i,type:n}=t,s=e.hasZ??!1;switch(n){case"Point":return new a.A([],[...i],s,!1);case"LineString":return(0,h.Ap)({paths:[i],hasZ:!0},s,!1);case"MultiLineString":return(0,h.Ap)({paths:i,hasZ:!0},s,!1);case"MultiPoint":return(0,h.PR)({points:i,hasZ:!0},s,!1);case"Polygon":case"MultiPolygon":{let t=new a.A([],[],s,!1);for(let e of"Polygon"===n?[i]:i){g(t,e[0],s);for(let i=1;i<e.length;i++)x(t,e[i],s)}return t}}}function g(t,e,i){m(e),function(t){return!_(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){m(e),function(t){return _(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],s){t.coords.push(e,i),s&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,h=(0,r.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!h.test(n))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],s=new Set,r=new Set,h=!1,o=null,a=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:_}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(h||=d(y(t)),a||(a=null!=_,a&&(i=typeof _,c&&(o=Object.keys(c).filter(t=>c[t]===_)))),c&&o&&a&&null!=_&&(o.length>1?o=o.filter(t=>c[t]===_):1===o.length&&(o=c[o[0]]===_?o:[])),c))for(let t in c){if(s.has(t))continue;let e=v(c[t]);if("unknown"===e){r.add(t);continue}r.delete(t),s.add(t);let i=(0,l.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let _=(0,l.rS)(1===o?.length&&o[0]||null)??void 0;if(_)for(let t of n)if(t.name===_&&(0,l.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:h,objectIdFieldName:_,objectIdFieldType:i,unknownFields:Array.from(r)}}function B(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let s of t){let{geometry:t,properties:r,id:h}=s;if(t&&f(t.type)!==i)continue;let a,l=r||{};n&&(a=l[n],null!=h&&!a&&(l[n]=a=h)),yield new o.Om(t&&p(t,e),l,null,a)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>B});var n=i(56507),s=i(17676),r=i(19419),h=i(21325),o=i(6774),a=i(90708),l=i(92722),u=i(83221),f=i(31464),c=i(85113);const y=new TextEncoder;class d{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let s=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-s)}writeStringField(t,e){let i=y.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function _(t,e,i){let n=new d;return n.writeMessage(3,m,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function m(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,p,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function p(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,g,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function g(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let s=w(i[n]);if(null==s)continue;let r=t.keyIndices.get(n);r??(r=t.keys.length,t.keyIndices.set(n,r),t.keys.push(n));let h=`${typeof s}:${s}`,o=t.valueIndices.get(h);o??(o=t.values.length,t.valueIndices.set(h,o),t.values.push(s)),e.writeVarint(r),e.writeVarint(o)}}function x(t,e){let i=t.getType(),n=0,s=0;for(let r=0;r<t.getPathCount();r++){let h=t.getPathLength(r),o=1===i?h:1;e.writeVarint(b(1,o));let a=3===i?h-1:h;for(let h=0;h<a;h++){1===h&&1!==i&&e.writeVarint(b(2,a-1));let o=t.getX(r,h),l=t.getY(r,h);e.writeVarint(v(o-n)),e.writeVarint(v(l-s)),n=o,s=l}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class B{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._webMercatorStores=null,this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();for(let{store:t}of this._webMercatorStores??[])t.clear();this._webMercatorStores=null,this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},r={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let h="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:r.signal})).data:t.data;(0,s.Te)(r),(0,c.sO)(h),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let o=0;for(let{geometryType:e,vectorTileGeometryType:i}of T){let n=(0,c.bd)(h,{geometryType:e,hasZ:!1}),s=A(h,e,t);if(0===n.length)continue;let r=new u.A({geometryType:e,hasM:!1,hasZ:!1}),a=[];for(let[t,e]of n.entries())e.geometry&&(e.objectId=o++,this._featureIds.set(e.objectId,s[t]??null),a.push(e));a.length>0&&(r.addMany(a),this._stores.push({geometryType:e,store:r,vectorTileGeometryType:i}))}return(0,s.Te)(r),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile(t,e={}){(0,s.Te)(e);let i=this._getTileFeatures(t),n=i.length>0?_(this._name,new S(i),I):new ArrayBuffer(0);return(0,s.Te)(e),{result:n,transferList:[n]}}_getStores(t){return(0,h.K8)(t)?(this._webMercatorStores||=this._stores.map(({geometryType:t,store:e,vectorTileGeometryType:i})=>{let n=new u.A({geometryType:t,hasM:!1,hasZ:!1});return e.forEach(e=>{let i=function(t,e){return t?(0,a.Ux)((0,f.Cv)((0,a.zv)(t,e,!1,!1),h.KK,h.ch))??null:null}(e.geometry,t);if(i){let t=e.weakClone();t.geometry=i,n.add(t)}}),{geometryType:t,store:n,vectorTileGeometryType:i}}),this._webMercatorStores):this._stores}_getTileFeatures({col:t,row:e,origin:i,tileSpan:n,spatialReference:s}){let o=i.x+t*n,a=i.y-e*n,{valid:l}=(0,h.Vp)(s),u=l[1]-l[0],f=this._getStores(s),c=n/I,y=this._buffer*c,d=this._tolerance*c,_=[];for(let t of[-u,0,u]){let e=(0,r.fA)(o-y-t,a-n-y,o+n+y-t,a+y),i={scale:[c,-c,1,1],translate:[o-t,a,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:s}of f)n.forEachInBounds(e,e=>{let n=P(e,t,s,i,d,this._buffer);n&&_.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:s})})}return _}}function A(t,e,i){let n=[],s="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<s.length;t++){let r=s[t];if(!r.geometry||(0,c.xD)(r.geometry.type)!==e)continue;let h=i.promoteId?r.properties?.[i.promoteId]:!0===i.generateId?t:r.id;n.push("number"==typeof h||"string"==typeof h?h:null)}return n}function P(t,e,i,n,s,r){if(!t.geometry)return null;let h=s>0?(0,a.kz)(t.geometry,e,s,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new o.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let s of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<s;e++){let s=i+e*t.stride;n.lineTo(t.coords[s],t.coords[s+1])}3===e&&n.close(),i+=s*t.stride}}let s=n.result();if(!s)return null;let r=1===e?[s.length]:s.map(t=>t.length),h=[];for(let t of s)for(let e of t)h.push(e.x,e.y);return new l.A(r,h)}((0,a.Nl)(h,e,n,!1,!1,!0),i,r)}class S{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{22429(e,a,r){r.d(a,{v:()=>n});var t=r(7861);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){let r=this._serviceMetadatas.get(e);if(r)return r;let n=await(0,t.L)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){let{id:a}=e;if(!a)return null;let{_itemDatas:r}=this;if(r.has(a))return r.get(a);let t=await e.fetchData();return r.set(a,t),t}async fetchCustomParameters(e,a){let r=await this.fetchItemData(e);return r&&"object"==typeof r&&(a?a(r):r.customParameters)||null}}},92009(e,a,r){r.d(a,{L:()=>u});var t=r(70333),n=r(56507),i=r(49186),l=r(17676),s=r(60694),y=r(20655),c=r(80812);async function u(e,a){let r=(0,s.qg)(e);if(!r)throw new i.A("invalid-url","Invalid scene service url");let u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){let a=(await o(e)).serviceItemId;if(!a)return null;let r=new c.default({id:a,apiKey:e.apiKey}),i=await async function(e){let a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;let r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{let a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(r.portal=new y.A({url:i}));try{return await r.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(u),null==u.sceneLayerItem)return L(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);let d=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{let r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;let t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.QP)(e),null}}(u);if(!d?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=d;let f=await L(d.url,u);return f.portalItem=d,f}async function o(e){if(e.rootDocument)return e.rootDocument;let a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{e.rootDocument=(await(0,n.A)(e.sceneServerUrl,a)).data}catch{e.rootDocument={}}return e.rootDocument}async function L(e,a){let r=(0,s.qg)(e);if(!r)throw new i.A("invalid-feature-service-url","Invalid feature service url");let t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};let y=o(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,L=e=>{let r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},d=L("anonymous").catch(()=>L("no-prompt")),[f,m]=await Promise.all([d,y]),p=m?.layers,S=f.data&&f.data.layers;if(!Array.isArray(S))throw Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,S.length);e++)if(p[e].id===l)return{serverUrl:t,layerId:S[e].id}}else if(null!=l&&l<S.length)return{serverUrl:t,layerId:S[l].id};throw Error("could not find matching associated sublayer")}},23154(e,a,r){r.d(a,{A6:()=>s,Aq:()=>m,Jo:()=>f,QM:()=>l});var t=r(77548),n=r(7861);const i=new Set(["Annotation Layer","Catalog Layer","Dimension Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){let{serviceJSON:r,layersJSON:t,...n}=await s(e,a);u(r);let i={serviceJSON:r,...n};return t&&(u(t),i.layersJSON=t),i}async function s(e,a){let{loadContext:r,...i}=a||{},l=r?await r.fetchServiceMetadata(e,i):await(0,n.L)(e,i),s=(0,t.G$)();d(l);let y={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return y;let c=`${(0,t.$x)()??e}/layers`,u=r?await r.fetchServiceMetadata(c,i):await(0,n.L)(c,i);return d(u),y.layersJSON={layers:u.layers,tables:u.tables},y}function y(e){return i.has(e.type)}function c(e){return"Table"===e.type}function u(e){e.layers=e.layers?.filter(y),e.tables=e.tables?.filter(c)}function o(e){e.type||="Feature Layer"}function L(e){e.type||="Table"}function d(e){e.layers?.forEach(o),e.tables?.forEach(L)}function f(e){if(!e)return"FeatureLayer";switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"DimensionFeatureLayer";case"Annotation Layer":return"AnnotationFeatureLayer"}return null}function m(e,a){if(!e)return a?"Table":"ArcGISFeatureLayer";switch(e){case"Annotation Layer":return"ArcGISAnnotationLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"ArcGISDimensionLayer";case"Feature Layer":return"ArcGISFeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Parcel Layer":return"ParcelLayer";case"Table":return"Table";case"Topology Layer":return"TopologyLayer";case"Trace Network Layer":return"TraceNetworkLayer";case"Utility Network Layer":return"UtilityNetworkLayer";default:return null}}},75356(e,a,r){r.d(a,{N:()=>p,populateOperationalLayers:()=>L});var t=r(7762),n=r(44208),i=r(22429),l=r(2976),s=r(6345),y=r(80812);function c(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var u=r(45613),o=r(8947);async function L(e,a,r){if(!a)return;let t=a.map(e=>async function(e,a){return async function(e,a,r){let t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await p(t,a,r):m(a)?function(e,a,r){a.itemId&&(e.portalItem=new y.default({id:a.itemId,portal:r?.portal}),e.when(()=>{let t=t=>{let n=t.layerId;S(t,e,a,n,r);let i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)}))}(t,a,r.context):f(a)&&await async function(e,a,r){let t=l.U.FeatureLayer,n=await t(),i=a.featureCollection,s=i?.showLegend,y=i?.layers?.map((t,i)=>{let l=new n;l.read(t,r);let y={...r,ignoreDefaults:!0};return S(l,e,a,i,y),null!=s&&l.read({showLegend:s},y),l});e.layers.addMany(y??[])}(t,a,r.context)),await(0,o.L)(t,r.context),t}(await d(e,a),e,a)}(e,r)),n=await Promise.allSettled(t);for(let a of n)"rejected"===a.status||a.value&&e.add(a.value)}async function d(e,a){let r=a.context,t=(e.layerType||e.type)??a.defaultLayerType;switch(t){case"Feature Collection":case"ArcGISFeatureLayer":if(function(e){return c(e,"notes")}(e)||function(e){return c(e,"markup")}(e))return(0,n.A)("sketch-layer-enabled")?l.U.SketchLayer():l.U.MapNotesLayer();if(function(e){return c(e,"route")}(e))return l.U.RouteLayer();if(m(e)){let a=r?.portal;if(e.itemId){let r=new y.default({id:e.itemId,portal:a});await r.load();let t=(await(0,u.n)(r,new i.v)).className||"UnknownLayer";return l.U[t]()}return l.U.UnknownLayer()}return f(e)?l.U.GroupLayer():l.U.FeatureLayer();case"WebTiledLayer":return e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?l.U.WMTSLayer():l.U.WebTileLayer();case"WFS":return"2.0.0"===e.wfsInfo?.version?l.U.WFSLayer():l.U.UnsupportedLayer();default:{let e=(0,s.VH)(r,t);return(0,l.U[e])()}}}function f(e){return"ArcGISFeatureLayer"===e.layerType&&!m(e)&&(e.featureCollection?.layers?.length??0)>1}function m(e){return"Feature Collection"===e.type}async function p(e,a,r){let n=new t.A,i=L(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(let e of n)e.destroy();throw a}}catch(e){throw e}}function S(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},2976(e,a,r){const t={AnnotationFeatureLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(2889),r.e(4674),r.e(7283),r.e(7537)]).then(()=>r(20737))).default,BingMapsLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(6684)]).then(()=>r(17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(7005),r.e(9480),r.e(6377),r.e(9389)]).then(()=>r(82411))).default,CSVLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(5057)]).then(()=>r(68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(9789),r.e(4674),r.e(893),r.e(7283),r.e(7013),r.e(1549),r.e(3312)]).then(()=>r(83508))).default,DimensionFeatureLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(2889),r.e(4674),r.e(7283),r.e(8361)]).then(()=>r(25077))).default,DimensionLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(3813)]).then(()=>r(71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(9953),r.e(8732),r.e(3483)]).then(()=>r(38732))).default,FeatureLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(5853)]).then(()=>r(18589))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(9177),r.e(6475)]).then(()=>r(36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(3055)]).then(()=>r(15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(9657)]).then(()=>r(63201))).default,GroupLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6569)]).then(()=>r(85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(893),r.e(7074),r.e(9800),r.e(7772),r.e(8768)]).then(()=>r(87772))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7074),r.e(2754),r.e(9800),r.e(9235),r.e(3500),r.e(1003),r.e(2806),r.e(7870)]).then(()=>r(90124))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(9953),r.e(9177),r.e(6451),r.e(9229)]).then(()=>r(61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(9953),r.e(7552),r.e(1843),r.e(7005),r.e(9480),r.e(9177),r.e(8197),r.e(6451),r.e(3527)]).then(()=>r(49013))).default,KMLLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(1722),r.e(1214),r.e(6854),r.e(8441)]).then(()=>r(162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(9696),r.e(359),r.e(5752),r.e(7173),r.e(3902),r.e(4934),r.e(8692)]).then(()=>r(28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(1588),r.e(9695)]).then(()=>r(49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(9696),r.e(359),r.e(5752),r.e(7173),r.e(3902),r.e(4934),r.e(3309)]).then(()=>r(93309))).default,MapImageLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(4674),r.e(893),r.e(6884),r.e(2241)]).then(()=>r(7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(7173),r.e(4403)]).then(()=>r(96299))).default,MediaLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(9894),r.e(2491)]).then(()=>r(90182))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(6377),r.e(9908),r.e(8118)]).then(()=>r(65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(7269),r.e(349)]).then(()=>r(40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(4051),r.e(931)]).then(()=>r(16852))).default,ParquetLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(3819),r.e(6185),r.e(2156)]).then(()=>r(99680))).default,PointCloudLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(2869),r.e(7984),r.e(7885)]).then(()=>r(77885))).default,RouteLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(1722),r.e(1214),r.e(6854),r.e(9385)]).then(()=>r(39622))).default,SceneLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(7005),r.e(9480),r.e(6377),r.e(4844)]).then(()=>r(2e4))).default,SketchLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(7173),r.e(4152)]).then(()=>r(15056))).default,StreamLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(9661)]).then(()=>r(79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(2889),r.e(9789),r.e(4674),r.e(7283),r.e(1951)]).then(()=>r(97483))).default,TileLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(4674),r.e(893),r.e(6884),r.e(6811)]).then(()=>r(71756))).default,UnknownLayer:async()=>(await Promise.all([r.e(9917),r.e(146)]).then(()=>r(146))).default,UnsupportedLayer:async()=>(await Promise.all([r.e(9917),r.e(5165)]).then(()=>r(45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(9953),r.e(5228),r.e(7499),r.e(700)]).then(()=>r(67190))).default,VideoLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(3910),r.e(5128),r.e(4674),r.e(9894),r.e(6875)]).then(()=>r(86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(1588),r.e(6650)]).then(()=>r(96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(2869),r.e(167)]).then(()=>r(90167))).default,WCSLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7074),r.e(2754),r.e(9800),r.e(9235),r.e(3500),r.e(2806),r.e(2061)]).then(()=>r(20521))).default,WFSLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5128),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(6854),r.e(2889),r.e(1017),r.e(8707)]).then(()=>r(21901))).default,WMSLayer:async()=>(await Promise.all([r.e(6361),r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(5128),r.e(1904)]).then(()=>r(51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(7269),r.e(309)]).then(()=>r(20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(9917),r.e(8278),r.e(7865),r.e(6554),r.e(7269)]).then(()=>r(47314))).default};r.d(a,["U",0,t])},6345(e,a,r){r.d(a,{Bu:()=>h,VH:()=>w});var t=r(44208);const n={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},i={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return(0,t.A)("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},l={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},s={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},y={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},c={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CSV:"CSVLayer",CatalogLayer:"CatalogLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",Object3DTilesLayer:"UnsupportedLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},o={ArcGISFeatureLayer:"FeatureLayer"},L={...i,LinkChartLayer:"LinkChartLayer"},d=n,f=l,m={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},p=l;function S(e){switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":return s;case"basemap-ground-layers":return y;case"ground":return c;case"tables":return o;default:return u}case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":return d;case"tables":return f;default:return L}default:switch(e.layerContainerType){case"basemap-base-layers":return n;case"tables":return l;case"ground":case"basemap-ground-layers":return;default:return i}}}function w(e,a){if(!a)return"UnknownLayer";if("DefaultTileLayer"===a){let a="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":a="TileLayer";break;case"ground":a="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":a="TileLayer"}return a}return S(e)?.[a]??"UnknownLayer"}function h(e,a,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType&&"ArcGISDimensionLayer"===a&&"dimension-feature"!==r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)switch(a){case"ArcGISDimensionLayer":if("dimension"!==r)return!1;break;case"ArcGISTiledElevationServiceLayer":return!1}break;case"portal-item":if("ArcGISDimensionLayer"===a&&"dimension-feature"!==r)return!1}let t=function(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return p;default:return m}return S(e)}(e)?.[a];return null!=t&&"UnknownLayer"!==t&&"UnsupportedLayer"!==t}},66964(e,a,r){r.d(a,{Ju:()=>S,K8:()=>A,XH:()=>w,Y5:()=>p,_r:()=>s,bO:()=>c,l:()=>g,nu:()=>T,pJ:()=>u,rc:()=>o});var t=r(60694),n=r(92009),i=r(23154),l=r(77548);function s(e,a){let{id:r,name:t}=e,n={id:r,name:t};return y(n,e,a),n}function y(e,a,r){let t=(0,i.Aq)(a.type,r);t&&(e.layerType=t)}async function c(e,a,r){let t,n;if(function(e){return!!e&&Array.isArray(e.layers)&&Array.isArray(e.tables)}(e)&&L(e))n=e;else{let i=await r.fetchServiceMetadata(a,{customParameters:u(e)?.customParameters});t=(0,l.G$)(),n=d(e,i),f(n,i)}return m(n),{data:n,preferredHost:t}}function u(e){if(!e)return null;let{layers:a,tables:r}=e;return a?.[0]??r?.[0]??null}function o(e,a){return null==a?null:[...e.layers??[],...e.tables??[]].find(e=>e.id===a)}function L(e){return[...e.layers??[],...e.tables??[]].every(e=>!!e.layerType)}function d(e,a){return{...e,layers:e?.layers??a.layers?.map(e=>s(e))??[],tables:e?.tables??a.tables?.map(e=>s(e,!0))??[]}}function f(e,a){let r=e.layers??[],t=e.tables??[],n=[...a.layers??[],...a.tables??[]];for(let e of[...r,...t]){let{id:a,layerType:r}=e;if(r)continue;let i=n.find(({id:e})=>e===a);i&&y(e,i,t.includes(e))}}function m(e){e.layers=e.layers?.filter(I),e.tables=e.tables?.filter(I)}async function p(e,a,r){if(e?.layers?.length||e?.tables?.length){if(!L(e)){let n=(0,t.qg)(a)?.url.path;if(!n)return;f(e,await r.fetchServiceMetadata(n,{customParameters:u(e)?.customParameters}))}m(e)}}function S(e,a){return[...e.layers??[],...e.tables??[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function w(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}const h=new Set(["ArcGISAnnotationLayer","ArcGISDimensionLayer","ArcGISFeatureLayer","CatalogLayer","OrientedImageryLayer","SubtypeGroupLayer","SubtypeGroupTable","Table"]);function I(e){return!!e.layerType&&h.has(e.layerType)}function g(e){switch(e){case"annotation-feature":return["ArcGISAnnotationLayer"];case"catalog":return["CatalogLayer"];case"dimension-feature":return["ArcGISDimensionLayer"];case"feature":return["ArcGISFeatureLayer","Table"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function A(e){switch(e){case"ArcGISAnnotationLayer":return"AnnotationFeatureLayer";case"ArcGISDimensionLayer":return"DimensionFeatureLayer";case"ArcGISFeatureLayer":case"Table":return"FeatureLayer";case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return null}async function T(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){let t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(e=>s(e))}let{serverUrl:t,portalItem:i}=await(0,n.L)(e.url,{sceneLayerItem:e,customParameters:u(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==t)return a.tables=[],a;if(!a.tables&&i){let e=await i.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(({id:e,name:a})=>({id:e,name:a}));else{let n=await r.fetchServiceMetadata(t,{customParameters:u(e)?.customParameters}).catch(()=>null);a.tables=n?.tables?.map(e=>s(e,!0))}}if(a.tables)for(let e of a.tables)e.url=`${t}/${e.id}`;return a}},10407(e,a,r){r.d(a,{It:()=>d,LG:()=>l,OM:()=>c,Sm:()=>u,Y:()=>s,bK:()=>y,sQ:()=>o});var t=r(99917),n=r(16930),i=r(28735);function l(e,a){if(!s(e,a)){let r=e.typeKeywords;r?r.push(a):e.typeKeywords=[a]}}function s(e,a){return!!e.typeKeywords?.includes(a)}function y(e){return s(e,L.HOSTED_SERVICE)}function c(e,a){let r=e.typeKeywords;if(r){let e=r.indexOf(a);e>-1&&r.splice(e,1)}}function u(e,a,r){r?l(e,a):c(e,a)}async function o(e){let a,r=e.clone().normalize();if(r.length>1)for(let e of r)a?e.width>a.width&&(a=e):a=e;else a=r[0];return async function(e){let a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);let r=n.A.WGS84;return await(0,t.initializeProjection)(a,r),(0,t.project)(e,r)}(a)}const L={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function d(e){let{portal:a,isOrgItem:r,itemControl:t}=e,n=a.user?.privileges,i=!n||n.includes("features:user:edit"),l=!!r&&!!n?.includes("features:user:fullEdit"),s="update"===t||"admin"===t;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}r.d(a,["mm",0,L])},45613(e,a,r){r.d(a,{fromItem:()=>d,n:()=>f});var t=r(49186),n=r(44208),i=r(92009),l=r(23154),s=r(22429),y=r(2976),c=r(77548),u=r(80812),o=r(66964),L=r(10407);async function d(e){let{portalItem:a}=e;a&&!(a instanceof u.default)&&(a=new u.default(a));let r=await async function(e){return await e.load(),async function(e){let a=e.className,r=y.U[a];return{constructor:await r(),properties:e.properties}}(await f(e,new s.v))}(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:e.typeKeywords.includes("GaussianSplat")?{className:"GaussianSplatLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();let a=(0,L.Y)(e,"Map Notes"),r=(0,L.Y)(e,"Markup");if(a||r)return{className:(0,n.A)("sketch-layer-enabled")?"SketchLayer":"MapNotesLayer"};if((0,L.Y)(e,"Route Layer"))return{className:"RouteLayer"};let t=await e.fetchData();return 1===(0,o.XH)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){let r=await m(e,a);if("object"==typeof r){let{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();let r=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};let t=(await a.fetchItemData(e))?.layerType;if("ArcGISTiledImageServiceLayer"===t)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===t)return{className:"ImageryLayer"};let n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=n.cacheType?.toLowerCase(),l=n.capabilities?.toLowerCase().includes("tilesonly"),s=n.tileInfo?.format?.toLowerCase()??"",y=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s);return"map"===i||y||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){let{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Parquet Feature Layer":return{className:"ParquetLayer"};case"Scene Service":return async function(e,a){let r=await m(e,a,async()=>{try{if(!e.url)return[];let{serverUrl:r}=await(0,i.L)(e.url,{sceneLayerItem:e});return(await a.fetchServiceMetadata(r))?.tables??[]}catch{return[]}});if("object"==typeof r){let t,n={};if(null==r.id?t=e.url:(n.layerId=r.id,t=`${e.url}/layers/${r.id}`),e.typeKeywords?.length)for(let a of Object.keys(c.XX))if(e.typeKeywords.includes(a))return{className:c.XX[a]};let i=await a.fetchServiceMetadata(t,{customParameters:await a.fetchCustomParameters(e,e=>(0,o.pJ)(e)?.customParameters)});return{className:c.XX[i?.layerType]||"SceneLayer",properties:n}}return!1===r&&"Voxel"===(await a.fetchServiceMetadata(e.url))?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await m(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new t.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,r){let{url:n,type:i}=e,s="Feature Service"===i;if(!n)return{};if(/\/\d+$/.test(n)){if(s){let r=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,o.pJ)(e)?.customParameters)});(0,c.Gh)(e,(0,c.G$)());let{id:i,type:s}=r,y=(0,l.Jo)(s);if(!y)throw new t.A("from-portal-item:unsupported",`'${n}' has unsupported type: '${s}'`);return{id:i,className:y,sourceJSON:r}}return{}}if("Video Service"===i)return!(((await a.fetchServiceMetadata(n)).layers?.length??0)>1)&&{};await e.load();let y=await a.fetchItemData(e);if(s){let{data:r,preferredHost:i}=await(0,o.bO)(y,n,a);if(0===(0,o.XH)(r))throw new t.A("from-portal-item:no-data",`The feature service '${n}' does not have any supported layers or tables`);(0,c.Gh)(e,i);let l=p(r);if("object"==typeof l){let e=(0,o.rc)(r,l.id);return{id:l.id,className:(0,o.K8)(e?.layerType)}}return l}if("Scene Service"===i&&(y=await(0,o.nu)(e,y,a)),(0,o.XH)(y)>0)return p(y);let u=await a.fetchServiceMetadata(n);return r&&(u.tables=await r()),p(u)}function p(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},8947(e,a,r){r.d(a,{L:()=>l});var t=r(60999),n=r(17676),i=r(67076);async function l(e,a,r){let l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){let s=await(0,t.Ke)(l.populateFromStyle());if((0,n.Te)(r),!1===s.ok){let r=s.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},7861(e,a,r){r.d(a,{L:()=>n});var t=r(56507);async function n(e,a){return(await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}}}]);