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

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 (69) hide show
  1. package/arcade/containerUtils.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/arcade/functions/feature.js +1 -1
  4. package/arcade/functions/featuresetstring.js +1 -1
  5. package/arcade/functions/geomasync.js +1 -1
  6. package/arcade/functions/portal.js +1 -1
  7. package/arcade/functions/string.js +1 -1
  8. package/arcgisGlobal.d.ts +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/05b34302da58e8244da3.js +1 -0
  11. package/assets/esri/core/workers/chunks/47e250d471d0e55fa6be.js +1 -0
  12. package/assets/esri/core/workers/chunks/{a07cb6a2f5b66d4e9f15.js → 53e2f2b922116a45fe8f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{dc486a3595b6d57018bb.js → 5bfea0c55aca826de536.js} +1 -1
  14. package/assets/esri/core/workers/chunks/67ebc5a3d46b254b725c.js +1 -0
  15. package/assets/esri/core/workers/chunks/{6e62581d933e7298d1f6.js → 6f4e6022a52de0c54aab.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{8c4e0a7384e40979cb42.js → 7e0cf70c0eb5a2ddfcec.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{3cc43ae56779a9f97f77.js → 917f53833b853898facc.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{9232f57623e1fa3ccabc.js → be5f92e98d09d6e6e38e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{a7f3576208f295b670d6.js → c19cd5a03b6d480fe53b.js} +1 -1
  20. package/assets/esri/core/workers/chunks/d33360c4f85203edafff.js +1 -0
  21. package/assets/esri/core/workers/chunks/{dca35dbe427605ef6fcc.js → e01aeac34474540f61ee.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{b19b6102ed2d6f67b43b.js → e15ba90af0faf873b42d.js} +1 -1
  23. package/assets/esri/core/workers/chunks/eb815148ae65388dd733.js +1 -0
  24. package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +1 -0
  25. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  26. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  27. package/chunks/lyr3DMain.js +1 -1
  28. package/chunks/lyr3DWorker.js +2 -2
  29. package/chunks/portal.js +1 -1
  30. package/config.js +1 -1
  31. package/form/elements/inputs/DynamicChoiceInput.d.ts +4 -2
  32. package/geometry/support/meshUtils.d.ts +5 -6
  33. package/interfaces.d.ts +1 -1
  34. package/kernel.js +1 -1
  35. package/layers/FeatureLayer.d.ts +2 -2
  36. package/layers/GeospatialPDFLayer.d.ts +154 -4
  37. package/layers/Layer.d.ts +2 -0
  38. package/layers/SketchLayer.d.ts +4 -2
  39. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  40. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  41. package/layers/geospatialPDF/projectionToWKTUtils.js +2 -2
  42. package/layers/support/LabelClass.d.ts +3 -2
  43. package/layers/support/PortalItemData.d.ts +31 -8
  44. package/layers/support/{TimeSeriesCalculation.d.ts → TimeSeriesCalculationMethod.d.ts} +6 -6
  45. package/layers/support/{TimeSeriesCalculation.js → TimeSeriesCalculationMethod.js} +1 -1
  46. package/layers/support/TimeSeriesInfo.d.ts +5 -5
  47. package/layers/support/TimeSeriesInfo.js +1 -1
  48. package/layers/support/timeSeriesUtils.d.ts +6 -2
  49. package/layers/support/timeSeriesUtils.js +1 -1
  50. package/layers/support/types.d.ts +4 -1
  51. package/package.json +2 -2
  52. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  53. package/smartMapping/statistics/support/timeSeriesUtils.js +1 -1
  54. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  55. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  56. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +2 -2
  57. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  58. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  59. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  60. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  61. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  62. package/views/draw/plugins/MultipointPlugin.js +1 -1
  63. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  64. package/assets/esri/core/workers/chunks/21f45a47708e6e43147f.js +0 -1
  65. package/assets/esri/core/workers/chunks/2ecfaa715863216f0faf.js +0 -1
  66. package/assets/esri/core/workers/chunks/3e8eb158320f0e4ce1b6.js +0 -1
  67. package/assets/esri/core/workers/chunks/7320a4913b6cad7cc5d7.js +0 -1
  68. package/assets/esri/core/workers/chunks/9e142551163acf752618.js +0 -1
  69. package/assets/esri/core/workers/chunks/f095cf98940e3f95d51e.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9692],{87367(e,n,t){t.r(n),t.d(n,{registerFunctions:()=>R});var r=t(47609),a=t(67862),o=t(66395),i=t(85935),l=t(54639),s=t(78878),u=t(80672),c=t(38222),f=t(98919),d=t(71163),m=t(36983),y=t(70333),h=t(56507);async function w(e,n,t){if(!y.id?.findCredential(e.restUrl))return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;let r={responseType:"json",query:{f:"json"}};if(t&&(r.query.returnUserLicenseTypeExtensions=!0),""===n){let n=await(0,h.A)(e.restUrl+"/community/self",r);if(n.data){let e=n.data;if(e?.username)return e}return null}let a=await(0,h.A)(e.restUrl+"/community/users/"+n,r);if(a.data){let e=a.data;return e.error?null:e}return null}var g=t(54218);function p(e){if(null==e)return e;switch(typeof e){case"string":case"number":return e;default:throw new i.D$("InvalidParameter",null)}}function R(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]||(0,d.C)("disjoint",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("intersects",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("touches",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("crosses",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("within",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("contains",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("overlaps",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>((0,s.E)(r,2,2,t),r[0]===r[1]||((0,s.d)(r[0])&&(0,s.d)(r[1])?(0,d.C)("equals",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]):!!((0,s.f)(r[0])&&(0,s.f)(r[1])||(0,s.r)(r[0])&&(0,s.r)(r[1])||(0,s.q)(r[0])&&(0,s.q)(r[1]))&&r[0].equals(r[1]))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,3,3,t),(0,s.d)(r[0])&&(0,s.d)(r[1]))return(0,d.C)("relate",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference),(0,s.w)(r[2])]);if((0,s.d)(r[0])&&null===r[1]||(0,s.d)(r[1])&&null===r[0]||null===r[0]&&null===r[1])return!1;throw new i.D$("InvalidParameter",t)})},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]?null:(0,m.R)(await(0,d.C)("intersection",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(0===(r=(0,s.H)(r)).length)throw new i.D$("WrongNumberOfParameters",t);let a=[];if(1===r.length)if((0,g.cy)(r[0])){for(let e of(0,s.H)(r[0]))if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else{if(!(0,s.g)(r[0])){if((0,s.d)(r[0]))return r[0].clone();if(null===r[0])return null;throw new i.D$("InvalidParameter",t)}for(let e of(0,s.H)(r[0].toArray()))if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else for(let e of r)if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}if(0===a.length)return null;let o=a[0].spatialReference;return(0,m.R)(await(0,d.C)("union",[a.map(e=>e.asJsonGeometry()),(0,l.b)(o)]),o)})},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]?null:null===r[1]?r[0].clone():(0,m.R)(await(0,d.C)("difference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]&&null===r[1]?null:null===r[0]?r[1]?.clone()??null:null===r[1]?r[0]?.clone()??null:(0,m.R)(await(0,d.C)("symmetricDifference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),!(0,s.J)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return null===r[1]?null:(0,m.R)(await(0,d.C)("clip",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),!(0,s.K)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return[];if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);if(null===r[1])return[r[0].clone()];let a=r[0].spatialReference;return(await(0,d.C)("cut",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])).map(e=>(0,m.R)(e,a)).filter(e=>null!=e)})},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,s.E)(a,1,2,t),a=(0,s.H)(a),(0,s.k)(a[0])){let e=await a[0].sumArea(p(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,g.cy)(o)||(0,s.g)(o))&&(o=(0,c.zt)(a[0],n.spatialReference)),null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("area",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[1])])})},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,s.E)(a,1,3,t);let o=(a=(0,s.H)(a))[0];((0,g.cy)(o)||(0,s.g)(o))&&(o=(0,c.zt)(o,n.spatialReference));let u=p(a[1]),m=(0,f.qr)(a[2]);if((0,s.k)(o)){let e=await o.sumArea(u,m,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null==o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticArea",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),u,m])})},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,s.E)(a,1,2,t),a=(0,s.H)(a),(0,s.k)(a[0])){let e=await a[0].sumLength(p(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.X1)(a[0],n.spatialReference)),null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("length",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[1])])})},e.functions.length3d=function(n,r){return e.standardFunctionAsync(n,r,async(e,a,o)=>{if((0,s.E)(o,1,2,r),null===(o=(0,s.H)(o))[0])return 0;let u=o[0];if(((0,g.cy)(o[0])||(0,s.g)(o[0]))&&(u=(0,c.X1)(o[0],n.spatialReference)),null===u)return 0;if(!(0,s.d)(u))throw new i.D$("InvalidParameter",r);if(!0===u.hasZ){let{convertFromSpatialReferenceUnit:e,toLengthUnit:n}=await Promise.resolve().then(()=>t(40547)),r=(0,f.UI)(u);return e(u.spatialReference,n(o[1]),r)}return(0,d.C)("length",[u.asJsonGeometry(),(0,l.b)(u.spatialReference),p(o[1])])})},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,s.E)(a,1,3,t);let o=(a=(0,s.H)(a))[0];((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.X1)(a[0],n.spatialReference));let u=p(a[1]),m=(0,f.qr)(a[2]);if((0,s.k)(o)){let e=await o.sumLength(u,m,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticLength",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),u,m])})},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{a=(0,s.H)(a),(0,s.E)(a,2,3,t);let o=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.yg)(a[0],n.spatialReference)),!(0,s.d)(o))throw new i.D$("InvalidParameter",t);let u=a[1];if(((0,g.cy)(a[1])||(0,s.g)(a[1]))&&(u=(0,c.yg)(a[1],n.spatialReference)),!(0,s.d)(u))throw new i.D$("InvalidParameter",t);return(0,d.C)("distance",[o.asJsonGeometry(),u.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[2])])})},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(!(0,s.L)(a))throw new i.D$("InvalidParameter",t);let o=r[1];if(!(0,s.L)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticDistance",[a.asJsonGeometry(),o.asJsonGeometry(),(0,l.b)(a.spatialReference),p(r[2]),(0,f.qr)(r[3])])})},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,3,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a)||a<=0)throw new i.D$("InvalidParameter",t);switch(r[0].type){case"polygon":case"polyline":case"extent":return(0,m.R)(await(0,d.C)("densify",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[2])]),r[0].spatialReference);default:return r[0]}})},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(null==a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o)||o<=0)throw new i.D$("InvalidParameter",t);let u=p(r[2]),c=(0,f.qr)(r[3]);switch(a.type){case"polygon":case"polyline":case"extent":return(0,m.R)(await(0,d.C)("geodeticDensify",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,u,c]),a.spatialReference);default:return a}})},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,4,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);let o=(0,s.M)((0,s.N)(r[2],!0));return(0,m.R)(await(0,d.C)("generalize",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[3]),o]),r[0].spatialReference)})},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,3,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);return 0===a?r[0].clone():(0,m.R)(await(0,d.C)("buffer",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[2])]),r[0].spatialReference)})},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(null==a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);if(0===o)return a.clone();let u=p(r[2]),c=(0,f.qr)(r[3]);return(0,m.R)(await(0,d.C)("geodesicBuffer",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,u,c]),a.spatialReference)})},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,6,t);let a=r[0];if(null===a)return null;if(!(0,s.d)(a)||"polygon"!==a.type&&"polyline"!==a.type)throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);let u=r[2],c=(0,f.ug)(r[3]),y=(0,s.v)((0,s.N)(r[4],10));if(isNaN(y))throw new i.D$("InvalidParameter",t);let h=(0,s.v)((0,s.N)(r[5],0));if(isNaN(h))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("offset",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,p(u),c,y,h]),a.spatialReference)})},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,3,t);let a=r[0];if(null===a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(!Number.isFinite(o))throw new i.D$("InvalidParameter",t);let l=r[2];if(null!=l&&!(0,s.L)(l))throw new i.D$("InvalidParameter",t);let u=l?.asJsonLikeGeometry();return(0,m.R)(await(0,d.C)("rotate",[a.asJsonGeometry(),o,u?.x,u?.y]),a.spatialReference)})},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if(a=(0,s.H)(a),(0,s.E)(a,1,2,t),null===a[0])return null;let o=(0,f.Hz)(a[1]),l=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(l="geometric"===o?(0,c.yg)(a[0],n.spatialReference):(0,c.zt)(a[0],n.spatialReference),null===l))return null;if(!(0,s.d)(l))throw new i.D$("InvalidParameter",t);return"geometric"===o?(0,m.p)("point",await(0,d.C)("centroid",[l.asJsonGeometry()]),l.spatialReference):(0,m.p)("point",await(0,d.C)("labelPoint",[l.asJsonGeometry()]),l.spatialReference)})},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Cd)},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.kr)},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Bn)},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=r[0].spatialReference;return(await(0,d.C)("multiPartToSinglePart",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])).map(e=>(0,m.R)(e,a)).filter(e=>null!=e)})},e.functions.isselfintersecting=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,t)=>{(0,s.E)(t,1,1,n);let r=(t=(0,s.H)(t))[0];if(((0,g.cy)(t[0])||(0,s.g)(t[0]))&&(r=(0,c.X1)(t[0],e.spatialReference)),null==r)return!1;if((0,s.d)(r))return await(0,d.C)("isSelfIntersecting",[r.asJsonGeometry(),(0,l.b)(r.spatialReference)]);throw new i.D$("InvalidParameter",n)})},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return!0;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,d.C)("isSimple",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])})},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("simplify",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("convexHull",[r[0].asJsonGeometry()]),r[0].spatialReference)})},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,async(e,o,l)=>{(0,s.E)(l,0,2,t);let c=(0,s.N)(l[1],""),f=!0===c;if(c=!0===c||!1===c?"":(0,s.w)(c),0===l.length||l[0]instanceof r.A){let e=(0,u.RI)(n,l.length>0?l[0]:null),t=await w(e,c,f);return null==t?null:(0,a.Tg)(JSON.parse(JSON.stringify(t)))}let d=null;if((0,s.k)(l[0])&&(d=l[0]),d){if(f=!1,c)return null;await d.load();let e=await d.getOwningSystemUrl();if(!e){if(!c){let e=await d.getIdentityUser();return null==e?null:(0,a.Tg)({username:e})}return null}let t=(0,u.RI)(n,new r.A(e)),o=await w(t,c,f);return null==o?null:(0,a.Tg)(JSON.parse(JSON.stringify(o)))}throw new i.D$("InvalidParameter",t)})},e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,s.d)(r[0])||!(0,s.L)(r[1]))throw new i.D$("InvalidParameter",t);let a=await(0,d.C)("getNearestCoordinate",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,m.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,s.d)(r[0])||!(0,s.L)(r[1]))throw new i.D$("InvalidParameter",t);let a=await(0,d.C)("getNearestVertex",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,m.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})})}},71163(e,n,t){t.d(n,{C:()=>s});var r=t(29953);let a,o,i=!1;function l(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(e=>{o=e,i=!0,a=void 0})}async function s(e,n){return i?o.apply("invokeGeometryOp",[e,n]):(await l(),s(e,n))}},97770(e,n,t){t.d(n,{Ey:()=>F,F8:()=>$,J2:()=>b,Yq:()=>A,_m:()=>I,iS:()=>P,wj:()=>S});var r=t(66552),a=t(73444),o=t(98623),i=t(34747);const l={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},s={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},f={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},h={...y,second:"numeric"},w={hourCycle:"h23"},g={...y,...w},p={...h,...w},R={"short-date":c,"short-date-short-time":{...c,...y},"short-date-short-time-24":{...c,...g},"short-date-long-time":{...c,...h},"short-date-long-time-24":{...c,...p},"short-date-le":c,"short-date-le-short-time":{...c,...y},"short-date-le-short-time-24":{...c,...g},"short-date-le-long-time":{...c,...h},"short-date-le-long-time-24":{...c,...p},"long-month-day-year":f,"long-month-day-year-short-time":{...f,...y},"long-month-day-year-short-time-24":{...f,...g},"long-month-day-year-long-time":{...f,...h},"long-month-day-year-long-time-24":{...f,...p},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...y},"day-short-month-year-short-time-24":{...d,...g},"day-short-month-year-long-time":{...d,...h},"day-short-month-year-long-time-24":{...d,...p},"long-date":m,"long-date-short-time":{...m,...y},"long-date-short-time-24":{...m,...g},"long-date-long-time":{...m,...h},"long-date-long-time-24":{...m,...p},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":h},v=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),D={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function J(){let e=(0,a.lR)();return(e&&D[e])??(0,a.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(D.bs="sr-Latn-CS");let G=new WeakMap;const C=R["short-date-short-time"];function b(e){return R[e]}function I(e){let{dateStyle:n,timeStyle:t,hour12:r,year:a,month:o}=e,i={};return n?i.dateStyle=n:a&&(i.year=a,i.month=o||void 0),t&&!i.year&&(i.timeStyle=t,i.hour12="auto"===r?void 0:"always"===r),i}function A(e,n=C){return function(e){let n=G.get(e);if(!n){let t=J(),r=S(e.timeZone??"system"),a={...e,timeZone:r};n=new Intl.DateTimeFormat(t,a),G.set(e,n)}return n}(n).format(e)}function P(e,n=C){return A(new Date(e),{...n,...u,...s})}function $(e,n=C){return A(new Date(`1970-01-01T${e}Z`),{...n,...u,...l})}function F(e,n=C){let t=i.c9.fromISO(e,{setZone:!0});if(!t.isValid)return e;if(n.timeZone)return A(t.toJSDate(),n);let r=0===t.offset?"UTC":n.timeZone,a={...n,timeZone:r};return t.toLocaleString(a,{locale:J()})}function S(e){switch(e){case"system":return o.N;case o.L:return"UTC";default:return e}}(0,a.Ml)(()=>{G=new WeakMap}),t.d(n,["_v",0,v])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9692],{87367(e,n,t){t.r(n),t.d(n,{registerFunctions:()=>R});var r=t(47609),a=t(67862),o=t(66395),i=t(85935),l=t(54639),s=t(78878),u=t(80672),c=t(38222),f=t(98919),d=t(71163),m=t(36983),y=t(70333),h=t(56507);async function w(e,n,t){if(!y.id?.findCredential(e.restUrl))return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;let r={responseType:"json",query:{f:"json"}};if(t&&(r.query.returnUserLicenseTypeExtensions=!0),""===n){let n=await(0,h.A)(e.restUrl+"/community/self",r);if(n.data){let e=n.data;if(e?.username)return e}return null}let a=await(0,h.A)(e.restUrl+"/community/users/"+n,r);if(a.data){let e=a.data;return e.error?null:e}return null}var g=t(54218);function p(e){if(null==e)return e;switch(typeof e){case"string":case"number":return e;default:throw new i.D$("InvalidParameter",null)}}function R(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]||(0,d.C)("disjoint",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("intersects",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("touches",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("crosses",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("within",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("contains",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("overlaps",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>((0,s.E)(r,2,2,t),r[0]===r[1]||((0,s.d)(r[0])&&(0,s.d)(r[1])?(0,d.C)("equals",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]):!!((0,s.f)(r[0])&&(0,s.f)(r[1])||(0,s.r)(r[0])&&(0,s.r)(r[1])||(0,s.q)(r[0])&&(0,s.q)(r[1]))&&r[0].equals(r[1]))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,3,3,t),(0,s.d)(r[0])&&(0,s.d)(r[1]))return(0,d.C)("relate",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference),(0,s.w)(r[2])]);if((0,s.d)(r[0])&&null===r[1]||(0,s.d)(r[1])&&null===r[0]||null===r[0]&&null===r[1])return!1;throw new i.D$("InvalidParameter",t)})},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]?null:(0,m.R)(await(0,d.C)("intersection",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(0===(r=(0,s.H)(r)).length)throw new i.D$("WrongNumberOfParameters",t);let a=[];if(1===r.length)if((0,g.cy)(r[0])){for(let e of(0,s.H)(r[0]))if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else{if(!(0,s.g)(r[0])){if((0,s.d)(r[0]))return r[0].clone();if(null===r[0])return null;throw new i.D$("InvalidParameter",t)}for(let e of(0,s.H)(r[0].toArray()))if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else for(let e of r)if(null!==e){if(!(0,s.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}if(0===a.length)return null;let o=a[0].spatialReference;return(0,m.R)(await(0,d.C)("union",[a.map(e=>e.asJsonGeometry()),(0,l.b)(o)]),o)})},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]?null:null===r[1]?r[0].clone():(0,m.R)(await(0,d.C)("difference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,s.H)(r),(0,f.ZL)(r,t),null===r[0]&&null===r[1]?null:null===r[0]?r[1]?.clone()??null:null===r[1]?r[0]?.clone()??null:(0,m.R)(await(0,d.C)("symmetricDifference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),!(0,s.J)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return null===r[1]?null:(0,m.R)(await(0,d.C)("clip",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),!(0,s.K)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return[];if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);if(null===r[1])return[r[0].clone()];let a=r[0].spatialReference;return(await(0,d.C)("cut",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])).map(e=>(0,m.R)(e,a)).filter(e=>null!=e)})},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,s.E)(a,1,2,t),a=(0,s.H)(a),(0,s.k)(a[0])){let e=await a[0].sumArea(p(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,g.cy)(o)||(0,s.g)(o))&&(o=(0,c.zt)(a[0],n.spatialReference)),null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("area",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[1])])})},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,s.E)(a,1,3,t);let o=(a=(0,s.H)(a))[0];((0,g.cy)(o)||(0,s.g)(o))&&(o=(0,c.zt)(o,n.spatialReference));let u=p(a[1]),m=(0,f.qr)(a[2]);if((0,s.k)(o)){let e=await o.sumArea(u,m,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null==o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticArea",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),u,m])})},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,s.E)(a,1,2,t),a=(0,s.H)(a),(0,s.k)(a[0])){let e=await a[0].sumLength(p(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.X1)(a[0],n.spatialReference)),null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("length",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[1])])})},e.functions.length3d=function(n,r){return e.standardFunctionAsync(n,r,async(e,a,o)=>{if((0,s.E)(o,1,2,r),null===(o=(0,s.H)(o))[0])return 0;let u=o[0];if(((0,g.cy)(o[0])||(0,s.g)(o[0]))&&(u=(0,c.X1)(o[0],n.spatialReference)),null===u)return 0;if(!(0,s.d)(u))throw new i.D$("InvalidParameter",r);if(!0===u.hasZ){let{convertFromSpatialReferenceUnit:e,toLengthUnit:n}=await Promise.resolve().then(()=>t(40547)),r=(0,f.UI)(u);return e(u.spatialReference,n(o[1]),r)}return(0,d.C)("length",[u.asJsonGeometry(),(0,l.b)(u.spatialReference),p(o[1])])})},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,s.E)(a,1,3,t);let o=(a=(0,s.H)(a))[0];((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.X1)(a[0],n.spatialReference));let u=p(a[1]),m=(0,f.qr)(a[2]);if((0,s.k)(o)){let e=await o.sumLength(u,m,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null===o)return 0;if(!(0,s.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticLength",[o.asJsonGeometry(),(0,l.b)(o.spatialReference),u,m])})},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{a=(0,s.H)(a),(0,s.E)(a,2,3,t);let o=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(o=(0,c.yg)(a[0],n.spatialReference)),!(0,s.d)(o))throw new i.D$("InvalidParameter",t);let u=a[1];if(((0,g.cy)(a[1])||(0,s.g)(a[1]))&&(u=(0,c.yg)(a[1],n.spatialReference)),!(0,s.d)(u))throw new i.D$("InvalidParameter",t);return(0,d.C)("distance",[o.asJsonGeometry(),u.asJsonGeometry(),(0,l.b)(o.spatialReference),p(a[2])])})},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(!(0,s.L)(a))throw new i.D$("InvalidParameter",t);let o=r[1];if(!(0,s.L)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticDistance",[a.asJsonGeometry(),o.asJsonGeometry(),(0,l.b)(a.spatialReference),p(r[2]),(0,f.qr)(r[3])])})},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,3,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a)||a<=0)throw new i.D$("InvalidParameter",t);switch(r[0].type){case"polygon":case"polyline":case"extent":return(0,m.R)(await(0,d.C)("densify",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[2])]),r[0].spatialReference);default:return r[0]}})},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(null==a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o)||o<=0)throw new i.D$("InvalidParameter",t);let u=p(r[2]),c=(0,f.qr)(r[3]);switch(a.type){case"polygon":case"polyline":case"extent":return(0,m.R)(await(0,d.C)("geodeticDensify",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,u,c]),a.spatialReference);default:return a}})},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,4,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);let o=(0,s.M)((0,s.N)(r[2],!0));return(0,m.R)(await(0,d.C)("generalize",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[3]),o]),r[0].spatialReference)})},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,3,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=(0,s.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);return 0===a?r[0].clone():(0,m.R)(await(0,d.C)("buffer",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference),a,p(r[2])]),r[0].spatialReference)})},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,4,t);let a=r[0];if(null==a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);if(0===o)return a.clone();let u=p(r[2]),c=(0,f.qr)(r[3]);return(0,m.R)(await(0,d.C)("geodesicBuffer",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,u,c]),a.spatialReference)})},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,6,t);let a=r[0];if(null===a)return null;if(!(0,s.d)(a)||"polygon"!==a.type&&"polyline"!==a.type)throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);let u=r[2],c=(0,f.ug)(r[3]),y=(0,s.v)((0,s.N)(r[4],10));if(isNaN(y))throw new i.D$("InvalidParameter",t);let h=(0,s.v)((0,s.N)(r[5],0));if(isNaN(h))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("offset",[a.asJsonGeometry(),(0,l.b)(a.spatialReference),o,p(u),c,y,h]),a.spatialReference)})},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,s.H)(r),(0,s.E)(r,2,3,t);let a=r[0];if(null===a)return null;if(!(0,s.d)(a))throw new i.D$("InvalidParameter",t);let o=(0,s.v)(r[1]);if(!Number.isFinite(o))throw new i.D$("InvalidParameter",t);let l=r[2];if(null!=l&&!(0,s.L)(l))throw new i.D$("InvalidParameter",t);let u=l?.asJsonLikeGeometry();return(0,m.R)(await(0,d.C)("rotate",[a.asJsonGeometry(),o,u?.x,u?.y]),a.spatialReference)})},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if(a=(0,s.H)(a),(0,s.E)(a,1,2,t),null===a[0])return null;let o=(0,f.Hz)(a[1]),l=a[0];if(((0,g.cy)(a[0])||(0,s.g)(a[0]))&&(l="geometric"===o?(0,c.yg)(a[0],n.spatialReference):(0,c.zt)(a[0],n.spatialReference),null===l))return null;if(!(0,s.d)(l))throw new i.D$("InvalidParameter",t);return"geometric"===o?(0,m.p)("point",await(0,d.C)("centroid",[l.asJsonGeometry()]),l.spatialReference):(0,m.p)("point",await(0,d.C)("labelPoint",[l.asJsonGeometry()]),l.spatialReference)})},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Cd)},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.kr)},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Bn)},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);let a=r[0].spatialReference;return(await(0,d.C)("multiPartToSinglePart",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])).map(e=>(0,m.R)(e,a)).filter(e=>null!=e)})},e.functions.isselfintersecting=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,t)=>{(0,s.E)(t,1,1,n);let r=(t=(0,s.H)(t))[0];if(((0,g.cy)(t[0])||(0,s.g)(t[0]))&&(r=(0,c.X1)(t[0],e.spatialReference)),null==r)return!1;if((0,s.d)(r))return await(0,d.C)("isSelfIntersecting",[r.asJsonGeometry(),(0,l.b)(r.spatialReference)]);throw new i.D$("InvalidParameter",n)})},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return!0;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,d.C)("isSimple",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)])})},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("simplify",[r[0].asJsonGeometry(),(0,l.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,1,1,t),null===r[0])return null;if(!(0,s.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,m.R)(await(0,d.C)("convexHull",[r[0].asJsonGeometry()]),r[0].spatialReference)})},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,async(e,o,l)=>{(0,s.E)(l,0,2,t);let c=(0,s.N)(l[1],""),f=!0===c;if(c=!0===c||!1===c?"":(0,s.w)(c),0===l.length||l[0]instanceof r.A){let e=(0,u.RI)(n,l.length>0?l[0]:null),t=await w(e,c,f);return null==t?null:(0,a.Dy)(JSON.parse(JSON.stringify(t)),!0,!1)}let d=null;if((0,s.k)(l[0])&&(d=l[0]),d){if(f=!1,c)return null;await d.load();let e=await d.getOwningSystemUrl();if(!e){if(!c){let e=await d.getIdentityUser();return null==e?null:(0,a.Tg)({username:e})}return null}let t=(0,u.RI)(n,new r.A(e)),o=await w(t,c,f);return null==o?null:(0,a.Dy)(JSON.parse(JSON.stringify(o)),!0,!1)}throw new i.D$("InvalidParameter",t)})},e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,s.d)(r[0])||!(0,s.L)(r[1]))throw new i.D$("InvalidParameter",t);let a=await(0,d.C)("getNearestCoordinate",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,m.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,s.H)(r),(0,s.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,s.d)(r[0])||!(0,s.L)(r[1]))throw new i.D$("InvalidParameter",t);let a=await(0,d.C)("getNearestVertex",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,m.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})})}},71163(e,n,t){t.d(n,{C:()=>s});var r=t(29953);let a,o,i=!1;function l(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(e=>{o=e,i=!0,a=void 0})}async function s(e,n){return i?o.apply("invokeGeometryOp",[e,n]):(await l(),s(e,n))}},97770(e,n,t){t.d(n,{Ey:()=>F,F8:()=>$,J2:()=>b,Yq:()=>A,_m:()=>I,iS:()=>P,wj:()=>S});var r=t(66552),a=t(73444),o=t(98623),i=t(34747);const l={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},s={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},f={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},h={...y,second:"numeric"},w={hourCycle:"h23"},g={...y,...w},p={...h,...w},R={"short-date":c,"short-date-short-time":{...c,...y},"short-date-short-time-24":{...c,...g},"short-date-long-time":{...c,...h},"short-date-long-time-24":{...c,...p},"short-date-le":c,"short-date-le-short-time":{...c,...y},"short-date-le-short-time-24":{...c,...g},"short-date-le-long-time":{...c,...h},"short-date-le-long-time-24":{...c,...p},"long-month-day-year":f,"long-month-day-year-short-time":{...f,...y},"long-month-day-year-short-time-24":{...f,...g},"long-month-day-year-long-time":{...f,...h},"long-month-day-year-long-time-24":{...f,...p},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...y},"day-short-month-year-short-time-24":{...d,...g},"day-short-month-year-long-time":{...d,...h},"day-short-month-year-long-time-24":{...d,...p},"long-date":m,"long-date-short-time":{...m,...y},"long-date-short-time-24":{...m,...g},"long-date-long-time":{...m,...h},"long-date-long-time-24":{...m,...p},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":h},v=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),D={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function J(){let e=(0,a.lR)();return(e&&D[e])??(0,a.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(D.bs="sr-Latn-CS");let G=new WeakMap;const C=R["short-date-short-time"];function b(e){return R[e]}function I(e){let{dateStyle:n,timeStyle:t,hour12:r,year:a,month:o}=e,i={};return n?i.dateStyle=n:a&&(i.year=a,i.month=o||void 0),t&&!i.year&&(i.timeStyle=t,i.hour12="auto"===r?void 0:"always"===r),i}function A(e,n=C){return function(e){let n=G.get(e);if(!n){let t=J(),r=S(e.timeZone??"system"),a={...e,timeZone:r};n=new Intl.DateTimeFormat(t,a),G.set(e,n)}return n}(n).format(e)}function P(e,n=C){return A(new Date(e),{...n,...u,...s})}function $(e,n=C){return A(new Date(`1970-01-01T${e}Z`),{...n,...u,...l})}function F(e,n=C){let t=i.c9.fromISO(e,{setZone:!0});if(!t.isValid)return e;if(n.timeZone)return A(t.toJSDate(),n);let r=0===t.offset?"UTC":n.timeZone,a={...n,timeZone:r};return t.toLocaleString(a,{locale:J()})}function S(e){switch(e){case"system":return o.N;case o.L:return"UTC";default:return e}}(0,a.Ml)(()=>{G=new WeakMap}),t.d(n,["_v",0,v])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6185],{46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,n]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!n?.match||!a.test(n)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(n,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>y});var i=r(69622),o=r(7762),n=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function s(e){return e instanceof o.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=s(e),o=s(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let n=o.filter(e=>!i.includes(e)),y=i.filter(e=>!o.includes(e)),c=i.filter(r=>o.includes(r)&&p(e,r)!==p(t,r)).concat(n,y).sort(),h=u(e);if(h&&a.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let g,m=l(e)&&l(t);for(let i of c){let o,n=p(e,i),a=p(t,i);if((m||"function"!=typeof n&&"function"!=typeof a)&&n!==a&&(null!=n||null!=a)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,a);else if(n instanceof Date&&a instanceof Date){if(n.getTime()===a.getTime())continue;o={type:"complete",oldValue:n,newValue:a}}else o="object"==typeof n&&"object"==typeof a&&u(n)===u(a)?d(n,a):{type:"complete",oldValue:n,newValue:a};null!=o&&(null==g?g={type:"partial",diff:{[i]:o}}:g.diff[i]=o)}}return g}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},99680(e,t,r){r.r(t),r.d(t,{default:()=>ce});var i=r(32198),o=r(37838),n=r(69540),a=r(7762),l=r(51447),s=r(49186),p=r(44208),u=r(53966),d=r(25728),y=r(93637),c=r(17676),h=r(36708),g=r(84952),m=r(10107),f=r(36005),w=r(64108),v=r(43937),b=r(90360),x=r(5443),C=r(16930),S=r(41910),M=r(55156),P=r(60950),A=r(89808),E=r(99959);const Z=Symbol("isParquetGraphicOrigin");var T;class j extends E.A{get[(T=Z,P.ym)](){return this.layer}get[M.e](){return this.layer}get[A.Q](){return this.layer}get[S.e7](){return this.layer}constructor(e){super(),this[T]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var L=r(4146),_=r(65529),O=r(92474),F=r(83027),I=r(42760),q=r(22671);let z=class extends((0,_.Zt)(O.x_)){constructor(e){super(e),this.type="parquet"}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this._initialize(t)),this.addHandles([(0,h.wB)(()=>this.layer.data,async e=>{if(e)try{await this._proxy.updateFileProvider(await(0,I.Dt)(e))}catch{}}),(0,h.wB)(()=>this.layer.customParameters,e=>this._setCustomParameters(e))]),Promise.resolve(this)}async reload(e){let t=await this._createLoadParameters(e);return this._proxy.reload(t)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async getDiagnosticsSnapshot(){return await this.load(),this._proxy.getDiagnosticsSnapshot()}async getColumnIndex(e){return await this.load(),this._proxy.getColumnIndex(e)}async getOffsetIndex(e){return await this.load(),this._proxy.getOffsetIndex(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){let r=await this.queryFeaturesJSON(e,{signal:t?.signal});return q.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return u.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};let r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:x.A.fromJSON(r.extent)}}async _initialize(e){let t={onSourceChange:()=>this.emit("source-changed"),onRangeRead:e=>this.emit("range-read",e)};this._connection=await(0,F.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this,client:t}),(0,c.Te)(e),this._proxy=this._connection.createInvokeProxy();let r=await this._createLoadParameters(e),{layerDefinition:i,capabilities:o}=await this._proxy.load(r);(0,c.Te)(e),this.sourceJSON=i,this.capabilities=o}async _createLoadParameters(e){if(!this.layer.data)throw new s.A("parquet:missing-data","A data source must be specified",this.layer);let t=await(0,I.Dt)(this.layer.data,{signal:e});return(0,c.Te)(e),{provider:t,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,I.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters}}_setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{u.A.getLogger(this).warn("Failed to update customParameters")})}_queryStream(e,t){return this._proxy.queryStream(e,t)}_getStreamNextFeatures(e,t){return this._proxy.getStreamNextFeatures(e,t)}};(0,i.Cg)([(0,m.MZ)()],z.prototype,"type",void 0),(0,i.Cg)([(0,m.MZ)({constructOnly:!0})],z.prototype,"layer",void 0),(0,i.Cg)([(0,m.MZ)()],z.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)()],z.prototype,"capabilities",void 0),z=(0,i.Cg)([(0,w.$)("esri.layers.graphics.sources.ParquetSource")],z);var N=r(63074),R=r(69208),D=r(10497),J=r(87718),B=r(56658),V=r(34287),$=r(32756),G=r(8303),K=r(54310),k=r(25036),Q=r(10873),U=r(29005),H=r(20437),W=r(17036),X=r(30524),Y=r(9075),ee=r(34582),te=r(46499),re=r(39383),ie=r(56370),oe=r(15584),ne=r(41214),ae=r(97552),le=r(30291);r(98623);const se=(0,W.p)(),pe="__OBJECTID",ue={key:"type",base:null,typeMap:{files:ie.A,"portal-item":oe.A},errorContext:"parquet-data"},de=(0,b.C)({types:ue}),ye={types:{key:"type",base:null,typeMap:{wkb:ee.A,location:Y.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let ce=class extends((0,B.J)((0,J.F)((0,N.dM)((0,$.fY)((0,D.z)((0,k.j)((0,K.J)((0,V.q)((0,G.A)((0,d.M)((0,R.d)((0,n.OU)(L.A))))))))))))){constructor(e){super(e),this._emptyUrls=new a.A,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new j(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=pe,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,p.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles((0,h.on)(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){let t=this.loadFromPortal({supportedTypes:["Parquet Feature Layer"],supportsData:!0},e).catch(c.QP).then(()=>this._load(e));return this.addResolvingPromise(t),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return"UTC"}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){let o=e.filter(e=>e.name!==pe||"oid"!==e.type).map(e=>e.toJSON(i));(0,y.sM)(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,X.yp)(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{let t=this.data.urls?.at(0);e=t?(0,g.e7)(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}readData(e,t,r){if(!("itemId"in t)||!t.itemId)return de(e,t,r)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s.A("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));let o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){(0,l.Lx)(u.A.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new ie.A({urls:this._normalizeUrls(e)})}refresh(e){super.refresh(e)}createPopupTemplate(e){return(0,le.tn)(this,e)}createQuery(){let e=new ae.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){let t=new z({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=this,e.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if("portal-item"===this.data?.type){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return ae.A.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new a.A(e):e??new a.A}async _load(e){this.portalItem?.url&&(this.data=new oe.A({portalItem:this.portalItem.clone()})),"portal-item"===this.data?.type&&await this.data.portalItem.load();let t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,X.yp)(this.renderer,this.fieldsIndex),this.spatialReference??=C.A.WGS84}};(0,i.Cg)([(0,m.MZ)({readOnly:!0,json:{read:!1,write:!1}})],ce.prototype,"capabilities",null),(0,i.Cg)([(0,m.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],ce.prototype,"charts",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],ce.prototype,"copyright",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ce.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ce.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean})],ce.prototype,"returnM",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean})],ce.prototype,"returnZ",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"displayOptimization",void 0),(0,i.Cg)([(0,m.MZ)({type:[H.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ce.prototype,"fields",void 0),(0,i.Cg)([(0,v.K)("fields")],ce.prototype,"writeFields",null),(0,i.Cg)([(0,m.MZ)(se.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,m.MZ)(ye)],ce.prototype,"geometryEncoding",void 0),(0,i.Cg)([(0,m.MZ)({type:x.A,json:{name:"extent"}})],ce.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:I.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:I.ye.read},write:{writer:I.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:I.ye.read}}}}})],ce.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0,clonable:!1})],ce.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],ce.prototype,"hasM",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],ce.prototype,"hasZ",void 0),(0,i.Cg)([(0,m.MZ)(Q.kF)],ce.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,m.MZ)({type:[te.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:re.w},write:!0}})],ce.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,m.MZ)(Q.fV)],ce.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"file",void 0),(0,i.Cg)([(0,m.MZ)({type:String,readOnly:!0})],ce.prototype,"objectIdField",void 0),(0,i.Cg)([(0,m.MZ)({type:["ParquetLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,m.MZ)(se.outFields)],ce.prototype,"outFields",void 0),(0,i.Cg)([(0,m.MZ)(Q.M6)],ce.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],ce.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({types:ne.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],ce.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({type:z,readOnly:!0,cast:null,json:{read:!1}})],ce.prototype,"source",void 0),(0,i.Cg)([(0,m.MZ)({type:C.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],ce.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({type:[U.A]})],ce.prototype,"templates",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"title",null),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0})],ce.prototype,"type",void 0),(0,i.Cg)([(0,m.MZ)({types:ue,json:{name:"source",origins:{"web-map":{read:{source:"source"},write:{target:"source",ignoreOrigin:!0}}}}})],ce.prototype,"data",void 0),(0,i.Cg)([(0,f.w)("web-map","data")],ce.prototype,"readData",null),(0,i.Cg)([(0,v.K)("web-map","data")],ce.prototype,"writeData",null),(0,i.Cg)([(0,m.MZ)({type:a.A.ofType(String),json:{read:!1,write:!1}})],ce.prototype,"urls",null),ce=(0,i.Cg)([(0,w.$)("esri.layers.ParquetLayer")],ce)},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),n=r(91429),a=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new a.A;return o.read(i,r),[o]}const s={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(s)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,s])},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),n=r(66552),a=r(25482),l=r(91429);const s=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:s.read,write:s.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],p)},46499(e,t,r){r.d(t,{A:()=>M});var i,o,n=r(32198),a=(r(44208),r(66552)),l=r(25482),s=r(4718),p=r(90629),u=r(91429),d=r(90360),y=r(73913),c=r(32730),h=r(77548),g=r(59868),m=r(73838),f=r(33910),w=r(36005),v=r(43937);const b=new a.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function x(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function S(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let M=class extends l.o{static{i=c.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],n=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,c.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,c.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&C(i))e=new y.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,c.XJ)(this)}getLabelExpressionArcade(){return(0,c.BI)(this)}getLabelExpressionSingleField(){return(0,c.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,s.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,s.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:x}}}}})],M.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:x}}}}})],M.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&S(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],M.prototype,"labelExpression",void 0),(0,n.Cg)([(0,w.w)("labelExpression")],M.prototype,"readLabelExpression",null),(0,n.Cg)([(0,v.K)("labelExpression")],M.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||S(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],M.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,v.K)("labelExpressionInfo")],M.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],M.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],M.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],M.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],M.prototype,"maxScale",void 0),(0,n.Cg)([(0,v.K)("maxScale")],M.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],M.prototype,"minScale",void 0),(0,n.Cg)([(0,v.K)("minScale")],M.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:f.em,json:{types:f.em,origins:{"portal-item":{types:f.em,read:{reader:(0,d.C)({types:f.em})},default:null},"web-scene":{types:f.Rv,read:{reader:(0,d.C)({types:f.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],M.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"where",void 0),M=o=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],M)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(25482),a=r(91429),l=r(32730),s=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,s.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.LabelExpressionInfo")],u)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),n=r(66552),a=r(25482),l=r(91429);const s=new n.J({asc:"ascending",desc:"descending"});let p=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],p)},15584(e,t,r){r.d(t,{A:()=>c});var i=r(32198),o=r(69540),n=r(49186),a=r(25482),l=r(91429),s=r(64108),p=r(80812),u=r(26121),d=r(36005),y=r(43937);let c=class extends((0,a.T)(o.Pw)){constructor(e){super(e),this.type="portal-item"}readPortalItem(e,t,r){if(t.itemId)return new p.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t,r,i){(0,u.wN)(e,i)?i.messages?.push(new n.A("portal-item-data:cross-portal",`Data cannot be persisted because it refers to an item on a different portal ('${e?.portal?.url}') than the one being saved to ('${i?.portal?.url}').`,{layer:this,itemId:e?.id})):e?.id&&(t.itemId=e.id)}};(0,i.Cg)([(0,l.MZ)({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],c.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:p.default,json:{write:{isRequired:!0}}})],c.prototype,"portalItem",void 0),(0,i.Cg)([(0,d.w)("portalItem",["itemId"])],c.prototype,"readPortalItem",null),(0,i.Cg)([(0,y.K)("portalItem",{itemId:{type:String}})],c.prototype,"writePortalItem",null),c=(0,i.Cg)([(0,s.$)("esri.layers.support.PortalItemData")],c)},39383(e,t,r){r.d(t,{w:()=>s,z:()=>d});var i=r(49186),o=r(53966),n=r(46499);const a=()=>o.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function s(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let o of e){let e=o.labelPlacement,n=u[t];if(!o.symbol)return a().warn("No ILabelClass symbol specified."),[];if(!n)return a().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(o);else{let i=n[0];e&&a().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=o.clone();l.labelPlacement=i,r.push(l)}}return r}},73681(e,t,r){r.d(t,{n:()=>s});var i=r(49186),o=r(53966),n=r(46140),a=r(95466),l=r(55674);class s{static async from(e,t,r){let a=e.dictionary_version?n.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let y=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))y.delete(e);y.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:y});let c=await(0,l.xR)(e.expression,null,d);if(!c)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let h=!a||!a.greaterEqual(4,0);h&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});let g=new p(r,h);return new s(h,u,c,g)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class p extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>w});var i,o=r(32198),n=r(52106),a=r(66552),l=r(25482),s=r(4718),p=r(91429),u=r(16930),d=r(60408),y=r(65864),c=r(50498),h=r(20437),g=r(36005),m=r(43937);const f=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,a]}=r,l=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*a,l,s);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],a=r.fromJSON(n),l=n.geometry?.spatialReference;null!=a.geometry&&!l&&(a.geometry.spatialReference=i);let s=n.aggregateGeometries,p=a.aggregateGeometries;if(s&&null!=p)for(let e in p){let t=p[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(a)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let a=0,l=e.length;a<l;a++){let l=e[a];if(a>0){let e=t(l[0]),a=r(l[1]);(e!==i||a!==o)&&(n.push([e-i,a-o]),i=e,o=a)}else i=t(l[0]),o=r(l[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],a=this._quantizePoints(n,t,r);a&&o.push(a)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,a,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,a,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[n.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:c.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),o=r(66552),n=r(53966),a=r(91429),l=r(93223);const s=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===u||e===p)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(s,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,s])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6185],{46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,n]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!n?.match||!a.test(n)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(n,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>y});var i=r(69622),o=r(7762),n=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function s(e){return e instanceof o.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=s(e),o=s(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let n=o.filter(e=>!i.includes(e)),y=i.filter(e=>!o.includes(e)),c=i.filter(r=>o.includes(r)&&p(e,r)!==p(t,r)).concat(n,y).sort(),h=u(e);if(h&&a.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let g,m=l(e)&&l(t);for(let i of c){let o,n=p(e,i),a=p(t,i);if((m||"function"!=typeof n&&"function"!=typeof a)&&n!==a&&(null!=n||null!=a)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,a);else if(n instanceof Date&&a instanceof Date){if(n.getTime()===a.getTime())continue;o={type:"complete",oldValue:n,newValue:a}}else o="object"==typeof n&&"object"==typeof a&&u(n)===u(a)?d(n,a):{type:"complete",oldValue:n,newValue:a};null!=o&&(null==g?g={type:"partial",diff:{[i]:o}}:g.diff[i]=o)}}return g}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},99680(e,t,r){r.r(t),r.d(t,{default:()=>ce});var i=r(32198),o=r(37838),n=r(69540),a=r(7762),l=r(51447),s=r(49186),p=r(44208),u=r(53966),d=r(25728),y=r(93637),c=r(17676),h=r(36708),g=r(84952),m=r(10107),f=r(36005),w=r(64108),v=r(43937),b=r(90360),x=r(5443),C=r(16930),S=r(41910),M=r(55156),P=r(60950),A=r(89808),E=r(99959);const Z=Symbol("isParquetGraphicOrigin");var T;class j extends E.A{get[(T=Z,P.ym)](){return this.layer}get[M.e](){return this.layer}get[A.Q](){return this.layer}get[S.e7](){return this.layer}constructor(e){super(),this[T]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var L=r(4146),_=r(65529),O=r(92474),F=r(83027),I=r(42760),q=r(22671);let z=class extends((0,_.Zt)(O.x_)){constructor(e){super(e),this.type="parquet"}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this._initialize(t)),this.addHandles([(0,h.wB)(()=>this.layer.data,async e=>{if(e)try{await this._proxy.updateFileProvider(await(0,I.Dt)(e))}catch{}}),(0,h.wB)(()=>this.layer.customParameters,e=>this._setCustomParameters(e))]),Promise.resolve(this)}async reload(e){let t=await this._createLoadParameters(e);return this._proxy.reload(t)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async getDiagnosticsSnapshot(){return await this.load(),this._proxy.getDiagnosticsSnapshot()}async getColumnIndex(e){return await this.load(),this._proxy.getColumnIndex(e)}async getOffsetIndex(e){return await this.load(),this._proxy.getOffsetIndex(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){let r=await this.queryFeaturesJSON(e,{signal:t?.signal});return q.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return u.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};let r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:x.A.fromJSON(r.extent)}}async _initialize(e){let t={onSourceChange:()=>this.emit("source-changed"),onRangeRead:e=>this.emit("range-read",e)};this._connection=await(0,F.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this,client:t}),(0,c.Te)(e),this._proxy=this._connection.createInvokeProxy();let r=await this._createLoadParameters(e),{layerDefinition:i,capabilities:o}=await this._proxy.load(r);(0,c.Te)(e),this.sourceJSON=i,this.capabilities=o}async _createLoadParameters(e){if(!this.layer.data)throw new s.A("parquet:missing-data","A data source must be specified",this.layer);let t=await(0,I.Dt)(this.layer.data,{signal:e});return(0,c.Te)(e),{provider:t,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,I.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters}}_setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{u.A.getLogger(this).warn("Failed to update customParameters")})}_queryStream(e,t){return this._proxy.queryStream(e,t)}_getStreamNextFeatures(e,t){return this._proxy.getStreamNextFeatures(e,t)}};(0,i.Cg)([(0,m.MZ)()],z.prototype,"type",void 0),(0,i.Cg)([(0,m.MZ)({constructOnly:!0})],z.prototype,"layer",void 0),(0,i.Cg)([(0,m.MZ)()],z.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)()],z.prototype,"capabilities",void 0),z=(0,i.Cg)([(0,w.$)("esri.layers.graphics.sources.ParquetSource")],z);var N=r(63074),R=r(69208),D=r(75254),J=r(87718),B=r(56658),V=r(34287),$=r(32756),G=r(8303),K=r(54310),k=r(25036),Q=r(10873),U=r(29005),H=r(20437),W=r(17036),X=r(30524),Y=r(9075),ee=r(34582),te=r(46499),re=r(39383),ie=r(56370),oe=r(15584),ne=r(41214),ae=r(97552),le=r(30291);r(98623);const se=(0,W.p)(),pe="__OBJECTID",ue={key:"type",base:null,typeMap:{files:ie.A,"portal-item":oe.A},errorContext:"parquet-data"},de=(0,b.C)({types:ue}),ye={types:{key:"type",base:null,typeMap:{wkb:ee.A,location:Y.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let ce=class extends((0,B.J)((0,J.F)((0,N.dM)((0,$.fY)((0,D.z)((0,k.j)((0,K.J)((0,V.q)((0,G.A)((0,d.M)((0,R.d)((0,n.OU)(L.A))))))))))))){constructor(e){super(e),this._emptyUrls=new a.A,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new j(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=pe,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,p.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles((0,h.on)(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){let t=this.loadFromPortal({supportedTypes:["Parquet Feature Layer"],supportsData:!0},e).catch(c.QP).then(()=>this._load(e));return this.addResolvingPromise(t),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return"UTC"}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){let o=e.filter(e=>e.name!==pe||"oid"!==e.type).map(e=>e.toJSON(i));(0,y.sM)(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,X.yp)(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{let t=this.data.urls?.at(0);e=t?(0,g.e7)(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}readData(e,t,r){if(!("itemId"in t)||!t.itemId)return de(e,t,r)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s.A("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));let o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){(0,l.Lx)(u.A.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new ie.A({urls:this._normalizeUrls(e)})}refresh(e){super.refresh(e)}createPopupTemplate(e){return(0,le.tn)(this,e)}createQuery(){let e=new ae.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){let t=new z({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=this,e.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if("portal-item"===this.data?.type){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return ae.A.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new a.A(e):e??new a.A}async _load(e){this.portalItem?.url&&(this.data=new oe.A({portalItem:this.portalItem.clone()})),"portal-item"===this.data?.type&&await this.data.portalItem.load();let t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,X.yp)(this.renderer,this.fieldsIndex),this.spatialReference??=C.A.WGS84}};(0,i.Cg)([(0,m.MZ)({readOnly:!0,json:{read:!1,write:!1}})],ce.prototype,"capabilities",null),(0,i.Cg)([(0,m.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],ce.prototype,"charts",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],ce.prototype,"copyright",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ce.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ce.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean})],ce.prototype,"returnM",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean})],ce.prototype,"returnZ",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"displayOptimization",void 0),(0,i.Cg)([(0,m.MZ)({type:[H.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ce.prototype,"fields",void 0),(0,i.Cg)([(0,v.K)("fields")],ce.prototype,"writeFields",null),(0,i.Cg)([(0,m.MZ)(se.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,m.MZ)(ye)],ce.prototype,"geometryEncoding",void 0),(0,i.Cg)([(0,m.MZ)({type:x.A,json:{name:"extent"}})],ce.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:I.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:I.ye.read},write:{writer:I.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:I.ye.read}}}}})],ce.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0,clonable:!1})],ce.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],ce.prototype,"hasM",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],ce.prototype,"hasZ",void 0),(0,i.Cg)([(0,m.MZ)(Q.kF)],ce.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,m.MZ)({type:[te.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:re.w},write:!0}})],ce.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,m.MZ)(Q.fV)],ce.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"file",void 0),(0,i.Cg)([(0,m.MZ)({type:String,readOnly:!0})],ce.prototype,"objectIdField",void 0),(0,i.Cg)([(0,m.MZ)({type:["ParquetLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,m.MZ)(se.outFields)],ce.prototype,"outFields",void 0),(0,i.Cg)([(0,m.MZ)(Q.M6)],ce.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],ce.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({types:ne.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],ce.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({type:z,readOnly:!0,cast:null,json:{read:!1}})],ce.prototype,"source",void 0),(0,i.Cg)([(0,m.MZ)({type:C.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],ce.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({type:[U.A]})],ce.prototype,"templates",void 0),(0,i.Cg)([(0,m.MZ)()],ce.prototype,"title",null),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0})],ce.prototype,"type",void 0),(0,i.Cg)([(0,m.MZ)({types:ue,json:{name:"source",origins:{"web-map":{read:{source:"source"},write:{target:"source",ignoreOrigin:!0}}}}})],ce.prototype,"data",void 0),(0,i.Cg)([(0,f.w)("web-map","data")],ce.prototype,"readData",null),(0,i.Cg)([(0,v.K)("web-map","data")],ce.prototype,"writeData",null),(0,i.Cg)([(0,m.MZ)({type:a.A.ofType(String),json:{read:!1,write:!1}})],ce.prototype,"urls",null),ce=(0,i.Cg)([(0,w.$)("esri.layers.ParquetLayer")],ce)},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),n=r(91429),a=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new a.A;return o.read(i,r),[o]}const s={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(s)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,s])},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),n=r(66552),a=r(25482),l=r(91429);const s=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:s.read,write:s.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],p)},46499(e,t,r){r.d(t,{A:()=>M});var i,o,n=r(32198),a=(r(44208),r(66552)),l=r(25482),s=r(4718),p=r(90629),u=r(91429),d=r(90360),y=r(73913),c=r(32730),h=r(77548),g=r(59868),m=r(73838),f=r(33910),w=r(36005),v=r(43937);const b=new a.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function x(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function S(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let M=class extends l.o{static{i=c.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],n=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,c.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,c.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&C(i))e=new y.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,c.XJ)(this)}getLabelExpressionArcade(){return(0,c.BI)(this)}getLabelExpressionSingleField(){return(0,c.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,s.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,s.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:x}}}}})],M.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:x}}}}})],M.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&S(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],M.prototype,"labelExpression",void 0),(0,n.Cg)([(0,w.w)("labelExpression")],M.prototype,"readLabelExpression",null),(0,n.Cg)([(0,v.K)("labelExpression")],M.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||S(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],M.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,v.K)("labelExpressionInfo")],M.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],M.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],M.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],M.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],M.prototype,"maxScale",void 0),(0,n.Cg)([(0,v.K)("maxScale")],M.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],M.prototype,"minScale",void 0),(0,n.Cg)([(0,v.K)("minScale")],M.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:f.em,json:{types:f.em,origins:{"portal-item":{types:f.em,read:{reader:(0,d.C)({types:f.em})},default:null},"web-scene":{types:f.Rv,read:{reader:(0,d.C)({types:f.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],M.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"where",void 0),M=o=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],M)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(25482),a=r(91429),l=r(32730),s=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,s.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.LabelExpressionInfo")],u)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),n=r(66552),a=r(25482),l=r(91429);const s=new n.J({asc:"ascending",desc:"descending"});let p=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],p)},15584(e,t,r){r.d(t,{A:()=>c});var i=r(32198),o=r(69540),n=r(49186),a=r(25482),l=r(91429),s=r(64108),p=r(80812),u=r(26121),d=r(36005),y=r(43937);let c=class extends((0,a.T)(o.Pw)){constructor(e){super(e),this.type="portal-item"}readPortalItem(e,t,r){if(t.itemId)return new p.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t,r,i){(0,u.wN)(e,i)?i.messages?.push(new n.A("portal-item-data:cross-portal",`Data cannot be persisted because it refers to an item on a different portal ('${e?.portal?.url}') than the one being saved to ('${i?.portal?.url}').`,{layer:this,itemId:e?.id})):e?.id&&(t.itemId=e.id)}};(0,i.Cg)([(0,l.MZ)({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],c.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:p.default,json:{write:{isRequired:!0}}})],c.prototype,"portalItem",void 0),(0,i.Cg)([(0,d.w)("portalItem",["itemId"])],c.prototype,"readPortalItem",null),(0,i.Cg)([(0,y.K)("portalItem",{itemId:{type:String}})],c.prototype,"writePortalItem",null),c=(0,i.Cg)([(0,s.$)("esri.layers.support.PortalItemData")],c)},39383(e,t,r){r.d(t,{w:()=>s,z:()=>d});var i=r(49186),o=r(53966),n=r(46499);const a=()=>o.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function s(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let o of e){let e=o.labelPlacement,n=u[t];if(!o.symbol)return a().warn("No ILabelClass symbol specified."),[];if(!n)return a().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(o);else{let i=n[0];e&&a().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=o.clone();l.labelPlacement=i,r.push(l)}}return r}},73681(e,t,r){r.d(t,{n:()=>s});var i=r(49186),o=r(53966),n=r(46140),a=r(95466),l=r(55674);class s{static async from(e,t,r){let a=e.dictionary_version?n.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let y=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))y.delete(e);y.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:y});let c=await(0,l.xR)(e.expression,null,d);if(!c)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let h=!a||!a.greaterEqual(4,0);h&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});let g=new p(r,h);return new s(h,u,c,g)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class p extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>w});var i,o=r(32198),n=r(52106),a=r(66552),l=r(25482),s=r(4718),p=r(91429),u=r(16930),d=r(60408),y=r(65864),c=r(50498),h=r(20437),g=r(36005),m=r(43937);const f=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,a]}=r,l=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*a,l,s);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],a=r.fromJSON(n),l=n.geometry?.spatialReference;null!=a.geometry&&!l&&(a.geometry.spatialReference=i);let s=n.aggregateGeometries,p=a.aggregateGeometries;if(s&&null!=p)for(let e in p){let t=p[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(a)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let a=0,l=e.length;a<l;a++){let l=e[a];if(a>0){let e=t(l[0]),a=r(l[1]);(e!==i||a!==o)&&(n.push([e-i,a-o]),i=e,o=a)}else i=t(l[0]),o=r(l[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],a=this._quantizePoints(n,t,r);a&&o.push(a)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,a,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,a,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[n.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:c.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),o=r(66552),n=r(53966),a=r(91429),l=r(93223);const s=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===u||e===p)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(s,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,s])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,9304],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var a=r(56507);class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var l=r(78878),s=r(35704),n=r(70333),u=r(48938),o=r(61454),d=r(67862),y=r(87449),c=r(11221),h=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),v=r(7562);function T(e,t){e.clause??=function(e){if(0===e.length)throw new y.dr("NeverReach");let t=[];for(let r=0;r<e.length;r++){let a=e[r],i=[`"${a.name.replaceAll('"','""')}" ${a.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){let r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}let r=t.join(" OR ");return w.A.create(r)}(e.keyFields);for(let r=0;r<e.keyFields.length;r++){let a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class C extends c.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){let t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){let e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(let e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();let t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?c.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){let t=this._layer.capabilities.query,r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);let l=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l),n=!0!==this._removeGeometry,u=this._overrideFields??this._fieldsIncludingObjectId(["*"]),o=u.includes("*")?this._layer.fields.length:u.length,d=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),y=Math.max(Math.ceil(d*(o<=50?1:o<=100?.5:o<=200?.25:.125)),t.maxRecordCount??this._maxQueryRate()),h=this._maxQueryRate(),f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<h&&(h=f);let m=this._createQuery();if(m.where=(0,g.mA)(m.where,s),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);m.spatialRelationship=t.spatialRelationship,m.relationParameter=t.relationParameter,m.geometry=e.spatialFilter.geometry}return m.orderByFields=a,m.outFields=u,m.returnGeometry=n,m.outSpatialReference=this.spatialReference,m.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(m,y,h,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a,i){e.start=0;let l,s=a??1/0;do{(0,y.dZ)(i),e.num=Math.max(r,Math.min(s,t)),l=await this.executeQuery(e,"execute"),e.start+=e.num,s-=l.features.length,yield*(0,m.Ho)(l.features,this._maxQueryRate())}while(s>0&&!0===l.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);let i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,i),s=this._createQuery();if(s.where=(0,g.mA)(s.where,l),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);s.spatialRelationship=t.spatialRelationship,s.relationParameter=t.relationParameter,s.geometry=e.spatialFilter.geometry}s.orderByFields=r,s.outSpatialReference=this.spatialReference,s.num=t?e.limit:null;let n=await this.executeQuery(s,"executeForIds");if((0,y.dZ)(e.abortSignal),null==n||n.length<=0)return c.An;let u=this._maxQueryRate(),o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<u&&(u=o);let d=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,n,u,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r)e.objectIds=t.slice(i,i+r),(0,y.dZ)(a),yield(await this.executeQuery(e,"execute")).features}async queryStat(e){await this._ensureLoaded();let t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,l=(0,f.Dp)(e.stat);if("count"===l)return i?this._queryCount(e):{calculated:!1};let s=e.field;if(null==s)return{calculated:!1};if(!1===a||!1===(0,p.DA)(s)&&!1===r||!1===s.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,s,e.limit??1e3,e.abortSignal);if("distinct"===l)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(l,s,e.limit??1e3,e.abortSignal):{calculated:!1};let n=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};let u=this._createQuery();if(u.where=(0,g.mA)(u.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,n)),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);u.spatialRelationship=t.spatialRelationship,u.relationParameter=t.relationParameter,u.geometry=e.spatialFilter.geometry}let o=new v.A;o.statisticType=l,o.onStatisticField=(0,p.YY)(s,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",u.returnGeometry=!1;let d="ARCADE_STAT_RESULT";u.outStatistics=[o];let h=await this.executeQuery(u,"execute");if(!h.hasOwnProperty("features")||0===h.features.length)throw new y.dr("InvalidStatResponse");let m=!1,_=h.fields??[];for(let e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}let w=h.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){let t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};let r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1,r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(let r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return c.An;let t=await this.databaseType(),r=e.groupBy,a=e.orderBy,i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){let e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let l=null,s=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||(0,m.MJ)(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(l=a.toOrderByFields(),s=!0),l??=r.slice();let n=e.statistics.map(e=>new v.A({onStatisticField:null===e.workingexpr?"":(0,p.YY)(e.workingexpr,t),outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),u=this._maxQueryRate(),o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<u&&(u=o);let d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),y=this._createQuery();if(y.where=(0,g.mA)(y.where,d),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);y.spatialRelationship=t.spatialRelationship,y.relationParameter=t.relationParameter,y.geometry=e.spatialFilter.geometry}return y.orderByFields=l,y.outFields=["*"],y.outStatistics=n,y.groupByFieldsForStatistics=r,y.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryPaginated(y,u,u,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryKeysetPaginated(y,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){let a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new y.dr("NotImplemented");e.where=(0,g.mA)(a,(0,p.YY)(t.clause,await this.databaseType()))}let i=await this.executeQuery(e,"execute");if((0,y.dZ)(r),!i.hasOwnProperty("features"))throw new y.dr("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;T(t,i.features.at(-1))}}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){let r="execute"===t?async e=>{let t=await this._layer.source.queryFeaturesJSON(e);return(0,c.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer),a=null;if(this._recentlyUsedQueries){let t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];let t=e.slice();if(t.includes("*"))return t;let r=!1;for(let e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){let l=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:l,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,i){let l=this._layer;if(!function(e){let t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(l))return[];let s=new S.A({objectIds:[e],returnMetadata:i});(t&&t>0||r&&r>0)&&(s.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(s.attachmentTypes=a),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:l,query:s,method:"attachments"});let n=await l.queryAttachments(s);return n?.[e]?n[e].map(t=>{let r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`,a=null;return i&&t.exifInfo&&(a=(0,d.Dy)(t.exifInfo,!0,!1)),new o.A(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null)}):[]}async queryRelatedFeatures(e){let t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});let r=await(0,a.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){let e={},t=r.data;if(t?.relatedRecordGroups){let r=t.spatialReference,a=!0===t.exceededTransferLimit;for(let i of t.relatedRecordGroups)(0,c.Rn)(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new y.dr("InvalidRequest")}async getFeatureByObjectId(e,t){let r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});let a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?((0,c.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();let e=n.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();let e=n.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url,r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{let e=await(0,a.A)(t,{query:{f:"json"}}),r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){let e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null,r=this._layer.parsedUrl?.path??null;if(r){let i=await(0,a.A)(r,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,t=i?.data?.serviceItemId??null}let i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends c.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{let e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){let e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return c.An;let t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{let r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){let r=new AbortController,a=await this._layer.source._queryStream(e,{signal:r.signal}),i=this._iterateParquetStream(a,r,t);return R.register(i,r,r),i}async*_iterateParquetStream(e,t,r){try{for(;;){let a=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,y.dZ)(r)),null==a)break;(0,c.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();let t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);let r=e.field;if(null==r)throw new y.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};let a=this._createQuery();if(a.returnGeometry=!1,a.where=(0,g.mA)(a.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){let t=(0,c.rj)(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}let i=new v.A;i.statisticType=t,i.onStatisticField=(0,p.YY)(r,0);let l="ARCADE_STAT_RESULT";i.outStatisticFieldName=l,a.outStatistics=[i];let s=await this._layer.source.queryFeaturesJSON(a);if(s.features.length<=0)throw new y.dr("InvalidStatResponse");let n=s.features[0].attributes[l];return{calculated:!0,result:"esriFieldTypeDate"===s.fields?.find(e=>e.name===l)?.type&&null!=n?new Date(n):n}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};let t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){let r=(0,c.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){return await this._ensureLoaded(),!0===this._layer.capabilities?.query?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();let t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new v.A({onStatisticField:null===e.workingexpr?"":(0,p.YY)(e.workingexpr,0),outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){let r=await this._layer.source.queryFeaturesJSON(t);(0,y.dZ)(e.abortSignal);for(let e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,c.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new y.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){let e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var M=r(26591);class q extends c.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}let e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return c.An;let t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return c.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,a=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),a=!0);let i=new M.default;return i.objectIds=[this._findObjectId],i.outFields=null===this._overrideFields?this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]):this._overrideFields,i.relationshipId=this.relationship.id,i.where="1=1",i.returnGeometry=!0!==this._removeGeometry,i.outSpatialReference=this.spatialReference,i.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:a,features:async function*(){let r=await t.source.queryRelatedFeatures(i);(0,y.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,a=null,i=!1,l=this._layer.nativeCapabilities();null!=t.orderBy&&(l.capabilities?.queryRelated.supportsOrderBy?(a=t.orderBy.toOrderByFields(),i=!0):r=!1),await this.databaseType();let s=this._maxQueryRate(),n=l.capabilities?.query.maxRecordCount;null!=n&&n<s&&(s=n);let u=new M.default;return u.relationshipId=this.relationship.id,u.objectIds=[this._findObjectId],u.outFields=null===this._overrideFields?this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]):this._overrideFields,u.where="1=1",u.orderByFields=a,u.returnGeometry=!0!==this._removeGeometry,u.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,u,s,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,a,i){let l;t.num=null==a?r:Math.min(a,r),t.start=0;do{(0,y.dZ)(i),l=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield l.features,t.start+=l.features.length,t.num=null==a?r:Math.min(a-t.start,r)}while(!0===l.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new y.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];let t=e.slice();if(t.includes("*"))return t;let r=!1;for(let e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,a,i){return this._relatedLayer.queryAttachments(e,t,r,a,i)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),k=r(92474),j=r(4146),D=r(99680),N=r(15584),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){let r=O.A.applicationCache.getLayerInfo(e);if(r){let a=await r;return new F.default({url:e,outFields:t,sourceJSON:a})}let a=new F.default({url:e,outFields:t}),i=(async()=>(await a.load(),a.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,i);try{return await i,a}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await i,a}if(null!=r){let a=r.getCachedLayerMetadata(e);if(a){let r=await a;return new F.default({url:e,outFields:t,sourceJSON:r})}let i=new F.default({url:e,outFields:t}),l=(async()=>(await i.load(),i.sourceJSON))();r.setCachedLayerMetadata(e,l);try{return await l,i}catch(t){throw r.removeCachedLayerMetadata(e,l),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,a,i,l=null){return P(await U(e,["*"],i),t,r,a,i,l)}function P(e,t=null,r=null,a=!0,i=null,l=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,a,i,l);case"subtype-sublayer":{let n=P(e.parent,t,r,a,i,l);return new s.A({parentfeatureset:n,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:n.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:l});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{let s={layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:l};return!e.url&&e.source?new A.A(s):new C(s)}default:throw Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){let t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){let r=t.getCachedServiceMetadata(e);if(null!=r)return r}let r=(async()=>{let t=await(0,a.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){let e=t.data;return e.layers||=[],e.tables||=[],e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(a){throw t.removeCachedServiceMetadata(e,r),a}}return r}async function B(e,t,r){let i={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await Q(e,null);if(i.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(let e of l.layers)i.layerNameLkp[e.id]=e.name;if(l.tables)for(let e of l.tables)i.layerNameLkp[e.id]=e.name;let n=l.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=n;let u=await async function(e,t){let r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){let e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}let i=(async()=>{let r=await(0,a.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){let e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new y.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,i);try{return await i}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return i}(e,n);if(u){i.queryelem=u,i.queryelem?.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(let e of i.queryelem.dataElement.domainNetworks){for(let t of e.edgeSources??[]){let e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}for(let t of e.junctionSources??[]){let e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(let e of i.queryelem.dataElement.terminalConfigurations)for(let t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});let l=await async function(e){if(null!==O.A.applicationCache){let t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(async()=>{let t=await(0,a.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+n);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let a=null;if(r&&i.unVersion<8){let r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),a=await E(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await a.load(),i.unVersion>=4&&(a=new s.A({parentfeatureset:a,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:a.getFieldsIndex(),timeZone:a.dateFieldsTimeZoneDefaultUTC})}),await a.load())}return{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals,layerIdLookup:i.layerIdLookup,sourceIdLookup:i.sourceIdLookup}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,a=null,i=null,l=!0,s=null,n=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();let o=await E(u,a,i,l,s,n);return new q({layer:e,relatedLayer:o,relationship:t,objectId:r,spatialReference:a,outFields:i,includeGeometry:l,lrucache:s,interceptor:n})}class J extends i{constructor(e,t=null,r=null,a=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){let a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async listAll(){(0,k.Zm)(this._map)&&!this._map.loaded&&await this._map.load();let e=this._map.allLayers.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,k.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){let a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,k.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){let a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}}class Y extends i{constructor(e,t=null,r=null,a=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){let a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async _loadMetaData(){let e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){let e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=await this._loadMetaData(),l=null;for(let t of i.layers??[])t.name===e&&(l=t);if(!l)for(let t of i.tables??[])t.name===e&&(l=t);if(l){let e=await U(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);e=null==e?"":e.toString();for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=await this._loadMetaData(),l=null;for(let t of i.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(l=t);if(!l)for(let t of i.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(l=t);if(l){let e=await U(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,a=null){return new J(e,t,r,a)}function K(e,t,r=null,a=null){return new Y(e,t,r,a)}function $(e,t,r,a,i){if(null===e)return null;if((0,l.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof j.A&&(0,h.eB)(e)){switch(t){case"datasource":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a)}return null}if((0,l.a4)(e)){switch(t){case"datasource":return P(e.parent,i,e.parent.outFields,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,e.parent.outFields,!0,r,a)}return null}return null}async function z(e,t,r,a,i,l,s,n=null){if(O.A.applicationCache){let u=O.A.applicationCache.getLayerInfo(e+":"+l.url);if(u)return H(await u,t,r,a,i,s,n)}if(null!=s){let u=s.getCachedPortalItem(l.url,e);if(null!=u)return await H(await u,t,r,a,i,s,n)}let u=new x.default({id:e,portal:l}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+l.url,u):s?.setCachedPortalItem(l.url,e,u);try{return await H(await u,t,r,a,i,s,n)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+l.url),s?.removeCachedPortalItem(l.url,e,u),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,a,i,l,s){let n;if("Feature Service"===e.type||"Map Service"===e.type)n=await U((0,h.Qi)(e.url??"")+"/"+t,["*"],l);else{if(t)throw Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){let t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)n=await t;else{let t=W.has(e.type)?Promise.resolve(new D.default({data:new N.A({portalItem:e})})):j.A.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{n=await t}catch(r){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else n=W.has(e.type)?new D.default({data:new N.A({portalItem:e})}):await j.A.fromPortalItem(e)}return P(n,r,a,i,l,s)}},35704(e,t,r){r.d(t,{A:()=>u});var a=r(48938),i=r(87449),l=r(11221),s=(r(33325),r(80609)),n=r(89696);class u extends l.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof n.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:a._})).features}async query(e){let t=e.where,r=!0;null===this._whereClauseFunction?null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)):r=!1,await this._ensureLoaded();let a=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,i.dZ)(e.abortSignal),a.filterApplied&&null==this._whereClauseFunction?a:{...a,features:this._applyFilter(a.features,e.abortSignal)}}async*_applyFilter(e,t){for await(let r of e)if((0,i.dZ)(t),null!=this._whereClause){let e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){let e=[];for(let t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,e.where));let r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)),this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)),this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>h});var a=r(48938),i=r(87449),l=r(11221),s=(r(33325),r(80609)),n=r(4576),u=r(39516),o=r(91075),d=r(18589),y=r(33143),c=r(20437);class h extends l.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(let e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:a._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return l.An;let a=this._createQuery();return a.where=(0,u.mA)(a.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,s.YY)(e.where,0)),null!=e.spatialFilter&&(a.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),a.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),a.geometry=e.spatialFilter.geometry),a.outSpatialReference=this.spatialReference,a.orderByFields=t,a.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){let t=await this._queryLayerFeaturesJSON(a);(0,i.dZ)(e.abortSignal);for(let e of(0,n.Ho)(t.features,this._maxQueryRate()))(0,l.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new i.dr("NeverReach")}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField,a=e.layerDefinition.typeIdField??"",i=[];if(e.layerDefinition.types)for(let t of e.layerDefinition.types)i.push(y.A.fromJSON(t));let l=e.layerDefinition.geometryType;void 0===l&&(l=e.featureSet.geometryType||"");let s=e.featureSet.features;if(!r){let t=!1;for(let a of e.layerDefinition.fields)if("oid"===a.type||"esriFieldTypeOID"===a.type){r=a.name,t=!0;break}if(!1===t){let t="FID",a=!0,i=0;for(;a;){let r=!0;for(let a of e.layerDefinition.fields)if(a.name===t){r=!1;break}!0===r?a=!1:(i++,t="FID"+i.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});let l=[];for(let r=0;r<s.length;r++)l.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});s=l,r=t}}let n=[];for(let t of e.layerDefinition.fields)t instanceof c.A?n.push(t):n.push(c.A.fromJSON(t));let u=l;switch(u||="",u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u){let e=t.toJSON();for(let t of s)t.geometry&&!(t.geometry instanceof o.A)&&(t.geometry.type=u,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(let e of s)e.geometry&&=null;let p={outFields:["*"],source:s,fields:n,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:i,typeIdField:a,objectIdField:r,spatialReference:t},f="esriGeometryNull"===u||null===u;f||(p.geometryType=u);let m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new h({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){let t=this._createQuery();t.where=this.objectIdField+"="+e.toString();let r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,l.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){let e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>n,VW:()=>u,lL:()=>o,rb:()=>d,t:()=>y});var a=r(97770),i=(r(98623),r(34747));const l=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function n(e,t,r,l="system"){if("unknown"===r)return e;let s=new i.oh((0,a.wj)(l)),n=i.c9.fromJSDate(e,{zone:s}),u="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),n.plus({[u]:t}).toJSDate()}function u(e,t,r="milliseconds"){let a=e.getTime(),i=y(t,r,"milliseconds");return new Date(a+i)}function o(e,t,r="system"){let{unit:l}=t,s=Math.max(1,Math.trunc(t.value)),n=new i.oh((0,a.wj)(r)),u=i.c9.fromJSDate(e,{zone:n}),o=e=>e-e%s;switch(l){case"milliseconds":return u.startOf("second").plus({millisecond:o(u.millisecond)}).toJSDate();case"seconds":return u.startOf("minute").plus({second:o(u.second)}).toJSDate();case"minutes":return u.startOf("hour").plus({minute:o(u.minute)}).toJSDate();case"hours":return u.startOf("day").plus({hour:o(u.hour)}).toJSDate();case"days":return u.startOf("month").plus({day:o(u.day-1)}).toJSDate();case"weeks":{let e=u.startOf("year").startOf("week"),t=Math.floor(u.diff(e,"weeks").weeks);return e.plus({week:o(t)}).toJSDate()}case"months":return u.startOf("year").plus({month:o(u.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=u.startOf("year"),t=("decades"===l?10:"centuries"===l?100:1)*s,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){let t=l.exec(e);if(!t)return null;let{hh:r,mm:a,ss:i,ms:n}=t.groups;return Number(r)*s.hours+Number(a)*s.minutes+Number(i||0)*s.seconds+Number(n||0)}function y(e,t,r){return 0===e?0:e*s[t]/s[r]}},4146(e,t,r){r.d(t,{A:()=>g});var a=r(32198),i=r(56507),l=r(49186),s=r(65529),n=r(4902),u=r(92474),o=r(53966),d=r(17676),y=r(84952),c=r(91429),h=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,s.Zt)((0,n.s)(u.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){let t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(()=>r(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){let t="portalItem"in e?e:{portalItem:e},{fromItem:a}=await Promise.all([r.e(9917),r.e(812),r.e(5613)]).then(()=>r(45613));try{return await a(t)}catch(e){let r=t?.portalItem,a=r?.id||"unset",i=r?.portal?.url||f.A.portalUrl;throw o.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+a+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||o.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){let{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){let{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,y.An)(this.url)}createLayerView(e,t){return Promise.reject(new l.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){let e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new l.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,a.Cg)([(0,c.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,a.Cg)([(0,c.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,a.Cg)([(0,c.MZ)({type:h.A})],g.prototype,"fullExtent",void 0),(0,a.Cg)([(0,c.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,a.Cg)([(0,c.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,a.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,a.Cg)([(0,c.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,a.Cg)([(0,c.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,a.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,a.Cg)([(0,c.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,a.Cg)([(0,c.MZ)({type:String})],g.prototype,"title",void 0),(0,a.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,a.Cg)([(0,c.MZ)()],g.prototype,"url",void 0),(0,a.Cg)([(0,c.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,a.Cg)([(0,c.$K)("esri.layers.Layer")],g)},52136(e,t,r){var a=r(32198),i=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,a.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,a.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>u});var a=r(32198),i=r(69540),l=r(25482),s=r(91429),n=r(56400);let u=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,a.Cg)([(0,s.MZ)()],u.prototype,"creatorField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"creationDateField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"editorField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"editDateField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"realm",void 0),(0,a.Cg)([(0,s.MZ)((0,n.P6)("dateFieldsTimeReference",!0))],u.prototype,"timeZone",void 0),u=(0,a.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],u)},33143(e,t,r){r.d(t,{A:()=>y});var a=r(32198),i=r(69540),l=r(25482),s=r(91429),n=r(8631),u=r(29005),o=r(36005),d=r(43937);let y=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,n.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,a.Cg)([(0,o.w)("domains")],y.prototype,"readDomains",null),(0,a.Cg)([(0,d.K)("domains")],y.prototype,"writeDomains",null),(0,a.Cg)([(0,s.MZ)({type:[u.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,a.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],y)},37352(e,t,r){r.d(t,{A:()=>u});var a,i=r(32198),l=r(7762),s=r(25482),n=r(91429);let u=a=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.A}clone(){return new a({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=a=(0,i.Cg)([(0,n.$K)("esri.layers.support.LayerFloorInfo")],u)},45067(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),l=r(66552),s=r(25482),n=r(91429);const u=new l.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),o=new l.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,a.Cg)([(0,n.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,a.Cg)([(0,n.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"role",void 0),d=(0,a.Cg)([(0,n.$K)("esri.layers.support.Relationship")],d)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>l});var a=r(34727),i=r(39516);function l(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let l=function(e){if("manual"===o(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:a}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],y(a));return t}(e);if(l&&((0,a.gg)(t,l[0])||(0,a.ZH)(r,l[1])))return"";let s=Array.from(n(e,t,r)),u=function(e,t,r){if(0===e.length)return!0;let i=d(e.at(0)?.minScale),l=y(e.at(-1)?.maxScale);if((0,a.ZH)(i,t)||(0,a.gg)(l,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],i=e[t+1];if((0,a.ZH)(d(i.minScale),y(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return u&&"1=1"!==u?u:""}function*n(e,t,r){if("manual"===o(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let a of e.filters)u(a.minScale,a.maxScale,t,r)&&(yield a)}}function u(e,t,r,i){return e=d(e),r=d(r),t=y(t),!(!(0,a.Sp)(r,e)&&(i??r)>e||(0,a.Hx)(t,r)||void 0!==i&&(0,a.Sp)(i,e))}function o(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||1/0}function y(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>q,tk:()=>C,BR:()=>T,p2:()=>I,qd:()=>A,wI:()=>v,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>c,UC:()=>h,Qz:()=>p,OP:()=>M,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var a=r(70333),i=r(56507),l=r(7762),s=(r(84952),r(36563)),n=r(36708),u=r(4146);const o=new WeakMap;function d(e){return!e.destroyed&&(o.has(e)||e.addHandles([(0,n.wB)(()=>{let{parent:t}=e;return!!(t&&t instanceof u.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>o.set(e,t),n.pc),(0,s.hA)(()=>o.delete(e))]),o.get(e))}function y(e,t){return"object"==typeof e&&!!e&&"type"in e&&e.type===t}function c(e){return y(e,"knowledge-graph")&&"layers"in e}function h(e){return y(e,"knowledge-graph-sublayer")}function p(e){return y(e,"link-chart")&&"layers"in e}function f(e){return y(e,"subtype-group")&&"sublayers"in e}function m(e){let t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){let t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return"object"==typeof e&&!!e&&"featureReduction"in e}function b(e){return function(e){return y(e,"catalog-footprint")}(e)||function(e){return y(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return y(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){let t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;let r=t?.graphic,a="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){let e=r.origin;return e&&"featureReductionProvider"in e&&a?S(a)?a:null:void 0}return e}return t?.checkFeatureReduction&&a?S(a)?a:null:e}async function v(e,t){let r=a.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;let l=e.toLowerCase().indexOf("/rest/services");if(-1===l)return null;let s=`${e.slice(0,l)}/rest/info`,n=null==t?null:t.signal,{data:u}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:n});return u?.owningSystemUrl||null}function T(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){let t=new l.A;for(let r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function M(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function q(e,t){if(!t||!M(e))return;let r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const a=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,a])},10536(e,t,r){function a(e){let t={};for(let r in e){if("declaredClass"===r)continue;let i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=a(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>a})},17126(e,t,r){r.d(t,{dw:()=>s,qD:()=>n,qW:()=>u});var a=r(56507),i=r(21325),l=r(10536);function s(e,t){let r=e.toJSON();return r.objectIds&&=r.objectIds.join(","),r.orderByFields&&=r.orderByFields.join(","),r.outFields&&!t?.returnCountOnly?r.outFields=r.outFields.includes("*")?"*":r.outFields.join(","):delete r.outFields,r.outSR&&=(0,i.YX)(r.outSR),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function n(e,t,r){let a=await o(e,t,r),i=a.data,l=i.geometryType,s=i.spatialReference,n={};for(let e of i.relatedRecordGroups){let t={fields:void 0,geometryType:l,spatialReference:s,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(null!=e.objectId)n[e.objectId]=t;else for(let r of Object.keys(e))"relatedRecords"!==r&&(n[e[r]]=t)}return{...a,data:n}}async function u(e,t,r){let a=await o(e,t,r,{returnCountOnly:!0}),i=a.data,l={};for(let e of i.relatedRecordGroups)null!=e.objectId&&(l[e.objectId]=e.count);return{...a,data:l}}async function o(e,t,r={},i){let n=(0,l.z)({...e.query,f:"json",...i,...s(t,i)});return(0,a.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}},16215(e,t,r){r.d(t,{S:()=>i});const a=Symbol("BasemapInstance");function i(e){return"object"==typeof e&&!!e&&a in e}r.d(t,["Y",0,a])},79677(e,t,r){r.d(t,{A:()=>y});var a,i=r(32198),l=r(25482),s=r(88930),n=r(91429),u=(r(98623),r(10184)),o=r(36005),d=r(43937);let y=class extends l.o{static{a=this}static get allTime(){return c}static get empty(){return h}static fromArray(e){return new a({start:null==e[0]?e[0]:new Date(e[0]),end:null==e[1]?e[1]:new Date(e[1])})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null==t.end?null:new Date(t.end)}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(a.allTime)}get isEmpty(){return this.equals(a.empty)}readStart(e,t){return null==t.start?null:new Date(t.start)}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new a({end:this.end,start:this.start})}equals(e){if(!e)return!1;let t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,a=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===a&&r===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&=(0,s.lL)(r,new u.A({value:1,unit:e}),t);let i=this.end;if(i){let r=(0,s.lL)(i,new u.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new a({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return a.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();let t,r,i=this.start?.getTime()??-1/0,l=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;return s>=i&&s<=l?t=s:i>=s&&i<=n&&(t=i),l>=s&&l<=n?r=l:n>=i&&n<=l&&(r=n),null==t||null==r||isNaN(t)||isNaN(r)?a.empty:new a({start:t===-1/0?null:new Date(t),end:r===1/0?null:new Date(r)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();let i=new a,{start:l,end:n}=this;return null!=l&&(i.start=(0,s.S1)(l,e,t,r)),null!=n&&(i.end=(0,s.S1)(n,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();let t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new a({start:t,end:r})}};(0,i.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,i.Cg)([(0,o.w)("end")],y.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],y.prototype,"writeEnd",null),(0,i.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,i.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,i.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,i.Cg)([(0,o.w)("start")],y.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],y.prototype,"writeStart",null),y=a=(0,i.Cg)([(0,n.$K)("esri.time.TimeExtent")],y);const c=new y,h=new y({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),l=r(25482),s=r(88930),n=r(91429),u=r(73133),o=r(93223);let d=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,a.Cg)([(0,o.e)(u.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,a.Cg)([(0,n.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,a.Cg)([(0,n.$K)("esri.time.TimeInterval")],d)}}]);