@arcgis/core 4.28.2 → 4.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02e86a792dbe2fdec974.js +1 -0
  3. package/assets/esri/core/workers/chunks/{5386b166f2e5dc0d9143.js → 12797aa1d6a2b49abb3f.js} +1 -1
  4. package/assets/esri/core/workers/chunks/15852a47129b9e0d04c6.js +1 -0
  5. package/assets/esri/core/workers/chunks/1687431f7b233d950195.js +1 -0
  6. package/assets/esri/core/workers/chunks/{a1e16c33f1843dbdce26.js → 175bbe8a048f17dd482b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{d0119dff8771e749436a.js → 30d3b31df52d40e5b2e6.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{768271a12dc7e1781447.js → 32fbd4355a4a649623a7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3dbc399eedd347b0fbbb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{6bc1f6f8a2408fa4bb6a.js → 423672fe765083e1a0ec.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{18e0c5bfeb1aa7213dfa.js → 4363f2cc3909c9258064.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{d5fec54e98c8622349a4.js → 46ddc52fe9cdd573a614.js} +1 -1
  13. package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +1 -0
  14. package/assets/esri/core/workers/chunks/49d958631bcd93f6333a.js +1 -0
  15. package/assets/esri/core/workers/chunks/4ae8308e5b9c7772a11f.js +1 -0
  16. package/assets/esri/core/workers/chunks/{da124ccd18d2745195fe.js → 4bd342f13002888b6467.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7756ed853b4ba54cd081.js → 5247c00088303da7ef3b.js} +1 -1
  18. package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +1 -0
  19. package/assets/esri/core/workers/chunks/551bc697e3e17983c2bc.js +1 -0
  20. package/assets/esri/core/workers/chunks/{65d8135c89ffdd17a3c1.js → 59d3f4c0d1a43180aff3.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{2d92df1e3ba4f05e0510.js → 633b34a5817f1f719e22.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{c7bd63103f101c09b1ea.js → 6996537249869c41e736.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{41778f8c49febe1f9404.js → 6fa0cccd4f3e1fa71421.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{78e49a70193e5adea17c.js → 77f557359a5033d7e429.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{6334a8a7b671d4042108.js → 7beae29abdfae23b15cc.js} +1 -1
  26. package/assets/esri/core/workers/chunks/7cc56b132c46c5922dac.js +1 -0
  27. package/assets/esri/core/workers/chunks/80831e90fe1a52f8f982.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ea9ae9d2aef01af90896.js → 80d9bb9f247ecdfa266f.js} +1 -1
  29. package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +1 -0
  30. package/assets/esri/core/workers/chunks/{f73563b23fd8dc6cf2fe.js → 86df7357a2bac73c0ef4.js} +1 -1
  31. package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +1 -0
  32. package/assets/esri/core/workers/chunks/{08a98e85e86ce560d005.js → 8bd621693692050d76aa.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{630b31a205d9db7147d0.js → 8cdece03397d01767593.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{b9a726f3bbad6fd4d65a.js → 8e91be2e38010391e351.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{cbddfcf57f72428a6992.js → 90f96a2ddfb25d851d4d.js} +1 -1
  36. package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +1 -0
  37. package/assets/esri/core/workers/chunks/{2304b7456ced997904f6.js → 97fd7b82eec26449977e.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{b7c81a5bbcdd94b8a7f6.js → 9979ff59a144fe1df80b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{0422c5160491fbcf01dc.js → 9d97a20f69047d0c47cc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/9f0e8dd5c9bacfc0f03c.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a8e4726c1db23324eb54.js → 9fc1206ad378f0829e0a.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{09e8babe75407c2e64c4.js → a351ab5082772b267895.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{43575b9acf9819f195f9.js → a3bbf5da4f7830d2a2a1.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{b03eaba5fa75d6ef834a.js → a47f74fc959b11f029a5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{cb4b17f5cf96a9e36781.js → a8cf23c3a55c1834178c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{dd55151bfac60b0deaac.js → ac4636e82a103e2c27ca.js} +1 -1
  47. package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +1 -0
  48. package/assets/esri/core/workers/chunks/{4adf3a8c6b49c381a633.js → b0653f63745e756f55fe.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{e06cd10b6f8f363b5131.js → bdc751a752a7ff1387de.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{70aa04b09143b7dd2ecb.js → c2199fb8f7a54a0ef18a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +1 -0
  52. package/assets/esri/core/workers/chunks/{830d99e6c58a52a58973.js → c8cb5fe1d23145c4842b.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{1f87f22e00e3218661c6.js → ce53413dd3e2062e8378.js} +1 -1
  54. package/assets/esri/core/workers/chunks/de30ff1fcb6079178958.js +1 -0
  55. package/assets/esri/core/workers/chunks/e12090768e945091cc5d.js +1 -0
  56. package/assets/esri/core/workers/chunks/e3950975030412ff6e20.js +1 -0
  57. package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +1 -0
  58. package/assets/esri/core/workers/chunks/{710a6268de62003af825.js → e8d1f91dc97b42d0c4f6.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{6747503826bfc94bc6c0.js → eb5213ffb83d83a4dd05.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{020825b9c12f2b6386a7.js → f037e4f9877ea08ced9d.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{abcfe3bda6f40318b092.js → f7ccc6c681fc9218555c.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{eea0fb90cd5cc80de388.js → fa750885bb27bbb03e7d.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{e67c4b7ad06d8404895a.js → fab4ee57b7c5376c9ccd.js} +1 -1
  64. package/interfaces.d.ts +4 -4
  65. package/kernel.js +1 -1
  66. package/layers/StreamLayer.js +1 -1
  67. package/layers/support/RangeDomain.js +1 -1
  68. package/layers/support/domainUtils.js +1 -1
  69. package/layers/support/fieldUtils.js +1 -1
  70. package/layers/support/labelFormatUtils.js +1 -1
  71. package/package.json +1 -1
  72. package/support/revision.js +1 -1
  73. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  74. package/widgets/FeatureForm/FieldInput.js +1 -1
  75. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  76. package/widgets/FeatureForm.js +1 -1
  77. package/widgets/support/dataUtils.js +5 -0
  78. package/widgets/support/dateUtils.js +1 -1
  79. package/assets/esri/core/workers/chunks/02d235849ba93541d7ad.js +0 -1
  80. package/assets/esri/core/workers/chunks/0a3da4b73beeaacd4667.js +0 -1
  81. package/assets/esri/core/workers/chunks/10dc578a90e1194c8720.js +0 -1
  82. package/assets/esri/core/workers/chunks/1eb5468c7cf653338d53.js +0 -1
  83. package/assets/esri/core/workers/chunks/1f30ea1a598ddd2e5df3.js +0 -1
  84. package/assets/esri/core/workers/chunks/366cf9bba6989342e447.js +0 -1
  85. package/assets/esri/core/workers/chunks/43f7d9366d06d69e7c50.js +0 -1
  86. package/assets/esri/core/workers/chunks/4672504d6fe649da19f2.js +0 -1
  87. package/assets/esri/core/workers/chunks/56a61a8bff08ae273de4.js +0 -1
  88. package/assets/esri/core/workers/chunks/580e7d3cbf6797a50ded.js +0 -1
  89. package/assets/esri/core/workers/chunks/6046be598e8c673eeb1f.js +0 -1
  90. package/assets/esri/core/workers/chunks/69c1c850af7ee33258e0.js +0 -1
  91. package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +0 -1
  92. package/assets/esri/core/workers/chunks/a160576f21ada91995ac.js +0 -1
  93. package/assets/esri/core/workers/chunks/a50ec5b647a160199cb2.js +0 -1
  94. package/assets/esri/core/workers/chunks/b138196d304883efd5f6.js +0 -1
  95. package/assets/esri/core/workers/chunks/b3f5e97b47e896c6008a.js +0 -1
  96. package/assets/esri/core/workers/chunks/c447f4bf0e5f012f8f9b.js +0 -1
  97. package/assets/esri/core/workers/chunks/c87e9280681c20d042b5.js +0 -1
  98. package/assets/esri/core/workers/chunks/cc86c8c88124d916e1b3.js +0 -1
  99. package/assets/esri/core/workers/chunks/d878bb6409df183ea0ce.js +0 -1
  100. package/assets/esri/core/workers/chunks/ef757269fb3fe0e74ef8.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7157],{22862:(e,t,r)=>{r.d(t,{Hg:()=>h,V7:()=>c,uD:()=>y});var s=r(92036),i=r(46791),o=r(1153);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof s.Z}function l(e){return e instanceof i.Z?Object.keys(e.items):a(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof i.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const s=l(e),i=l(t);if(0===s.length&&0===i.length)return;if(!s.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!s.includes(e))),y=s.filter((e=>!i.includes(e))),c=s.filter((r=>i.includes(r)&&p(e,r)!==p(t,r))).concat(o,y).sort(),h=u(e);if(h&&n.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let f;const b=a(e)&&a(t);for(const s of c){const i=p(e,s),o=p(t,s);let n;if((b||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[s]&&"function"==typeof r[s])n=r[s]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;n={type:"complete",oldValue:i,newValue:o}}else n="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?d(i,o):{type:"complete",oldValue:i,newValue:o};null!=n&&(null!=f?f.diff[s]=n:f={type:"partial",diff:{[s]:n}})}}return f}function y(e,t){if(null==e)return!1;const r=t.split(".");let s=e;for(const e of r){if("complete"===s.type)return!0;if("partial"!==s.type)return!1;{const t=s.diff[e];if(!t)return!1;s=t}}return!0}function c(e,t){for(const r of t)if(y(e,r))return!0;return!1}function h(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)}},20697:(e,t,r)=>{r.r(t),r.d(t,{default:()=>we});var s=r(43697),i=r(2368),o=r(46791),n=r(20102),a=r(68668),l=r(16453),p=r(95330),u=r(17445),d=r(42033),y=r(17452),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),b=r(31263),g=r(87085),m=r(54295),v=r(17287),w=r(71612),C=r(17017),S=r(66361),_=r(25113),F=r(38009),A=r(16859),I=r(34760),T=r(72965),E=r(28294),O=r(66677),j=r(21506),x=r(45574),R=r(53518),P=r(69165),L=r(51773),D=r(16050),Q=(r(12501),r(28756),r(92271),r(72529),r(5499)),Z=r(84382),M=r(81571),V=(r(91423),r(92604)),G=r(10699),q=r(22974),k=r(83379),U=r(78286),H=r(30556),z=r(63213),N=r(90100),B=r(70082),$=r(54306),K=r(30707),W=r(14165),J=r(32163),Y=r(28412);const X=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],ee={key:"type",base:Q.Z,errorContext:"renderer",typeMap:{simple:Z.Z,"unique-value":M.Z,"class-breaks":D.Z}},te=(0,R.v)(),re=(0,z.d)({types:ee});let se=0;function ie(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function oe(e){switch(e){case"point":case"multipoint":return Y.xA.clone();case"polyline":return Y.CJ.clone();case"polygon":case"multipatch":return Y.z3.clone();default:return null}}function ne(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ae(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const s={},i=ne(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)s[t]=e[t]}return s[t.subtypeField]=e,new B.Z({name:"New Feature",drawingTool:r,prototype:{attributes:s}})}const le="esri.layers.support.SubtypeSublayer";let pe=class extends((0,l.R)((0,i.J)((0,G.IG)(k.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${se++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:s,parent:i}=this;let o;if(s){o=[];let e=0;s.forEach((({name:t,alias:r,editable:s,visible:n})=>{if(!n)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),s!==a.editable&&(l.editable=s,p=!0),o.push(l),p&&e++})),0===e&&o.length===s.length&&(o=null)}else o=(0,q.d9)(e);o?.length&&(0,U.RB)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,s=e?.fields;if(!e||!s?.length)return null;const{subtypes:i,subtypeField:o}=e,n=i?.find((e=>e.code===r)),a=n?.defaultValues,l=n?.domains,p=[];for(const e of s){const s=e.clone(),{name:i}=s,n=t?.find((e=>e.name===i));if(s.visible=!t||!!n,n){const{alias:e,editable:t}=n;e&&(s.alias=e),!1===t&&(s.editable=!1)}const u=a?.[i]??null;s.defaultValue=i===o?r:u;const d=l?.[i]??null;s.domain=i===o?null:d?"inherited"===d.type?s.domain:d.clone():null,p.push(s)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||V.Z.getLogger(le).error(de("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,P.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new Z.Z({symbol:oe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const s=t.drawingInfo?.renderer,i=re(s,t,r);let o;const{subtypeCode:n}=this;if(null!=n&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(n)));e&&(o=new Z.Z({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const s=t?.layerDefinition?.drawingInfo?.renderer;if(!s)return;const i=s.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:re(s,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[ae(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ne(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw de("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:s}=this;if(!s)throw de("updateAttachment");if(e.getAttribute(s.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return s.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw de("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw de("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:s,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:n}=r;t={displayField:e,editFieldsInfo:o,fields:s,objectIdField:n,title:i}}return(0,J.eZ)(t,e)}createQuery(){if(!this.parent)throw de("createQuery");const e=(0,x.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return X.some((e=>this.originIdOf(e)===b.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw de("queryAttachments");const s=e.clone();return s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw de("queryFeatures");const s=W.Z.from(e)??r.createQuery();return null!=e&&(s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(s,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"effectiveCapabilities",null),(0,s._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],pe.prototype,"charts",void 0),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],pe.prototype,"editingEnabled",void 0),(0,s._)([(0,c.Cb)({type:Boolean,readOnly:!0})],pe.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],pe.prototype,"fieldOverrides",void 0),(0,s._)([(0,H.c)("fieldOverrides")],pe.prototype,"writeFieldOverrides",null),(0,s._)([(0,c.Cb)({...te.fields,readOnly:!0,json:{read:!1}})],pe.prototype,"fields",null),(0,s._)([(0,c.Cb)(te.fieldsIndex)],pe.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"floorInfo",null),(0,s._)([(0,c.Cb)({type:N.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"formTemplate",void 0),(0,s._)([(0,c.Cb)({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"id",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"geometryType",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"type",void 0),(0,s._)([(0,c.Cb)(ie((0,q.d9)(j.iR)))],pe.prototype,"labelsVisible",void 0),(0,s._)([(0,c.Cb)({type:[$.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:K.r},write:{ignoreOrigin:!0}}})],pe.prototype,"labelingInfo",void 0),(0,s._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],pe.prototype,"layerType",void 0),(0,s._)([(0,c.Cb)(ie((0,q.d9)(j.rn)))],pe.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:["show","hide"]})],pe.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,q.d9)(j.rO);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"minScale",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,q.d9)(j.u1);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"maxScale",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"objectIdField",null),(0,s._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"opacity",void 0),(0,s._)([(0,c.Cb)({clonable:!1})],pe.prototype,"parent",void 0),(0,s._)([(0,c.Cb)(ie((0,q.d9)(j.C_)))],pe.prototype,"popupEnabled",void 0),(0,s._)([(0,c.Cb)({type:L.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.Cb)({types:ee,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],pe.prototype,"renderer",null),(0,s._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],pe.prototype,"readRendererFromService",null),(0,s._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],pe.prototype,"readRenderer",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"subtypeCode",void 0),(0,s._)([(0,c.Cb)({type:[B.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],pe.prototype,"templates",void 0),(0,s._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],pe.prototype,"readTemplatesFromService",null),(0,s._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["subtypes"])],pe.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"url",null),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"userHasUpdateItemPrivileges",null),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],pe.prototype,"visible",void 0),pe=(0,s._)([(0,f.j)(le)],pe);const ue=(e,t,r)=>{const s=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return s.test(o)?o.replace(s,i):(0,d._)(i,o)},de=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),ye=pe;var ce=r(76259),he=r(60199),fe=r(12259);const be="SubtypeGroupLayer";function ge(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const me=(0,R.v)();let ve=class extends((0,_.B)((0,S.o1)((0,w.h)((0,E.n)((0,T.M)((0,I.Q)((0,v.Y)((0,F.q)((0,A.I)((0,l.R)((0,C.N)((0,m.V)((0,i.J)(g.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.Z.ofType(ye)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,p.Ds)((async(e,t,s)=>{const{save:i,saveAs:o}=await Promise.all([r.e(6404),r.e(9238),r.e(3831)]).then(r.bind(r,32664));switch(e){case fe.x.SAVE:return i(this,t);case fe.x.SAVE_AS:return o(this,s,t)}})),this.addHandles((0,u.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),u.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(p.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,x.nU)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,x.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.a7)(this.url,t):t}async addAttachment(e,t){return(0,x.JD)(this,e,t,be)}async updateAttachment(e,t,r){return(0,x.Y5)(this,e,t,r,be)}async applyEdits(e,t){return(0,x.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,p.Hl)(Promise.all([r.e(4599),r.e(9735),r.e(6882)]).then(r.bind(r,49379)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,x.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,x.FV)(this,e,t,be)}async fetchRecomputedExtents(e){return(0,x.Ci)(this,e,be)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,x.SU)(this,e,t,be)}async queryFeatures(e,t){const r=await this.load(),s=W.Z.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,x.tD)(this,e,t,be)}async queryFeatureCount(e,t){return(0,x.VG)(this,e,t,be)}async queryExtent(e,t){return(0,x.KE)(this,e,t,be)}async queryRelatedFeatures(e,t){return(0,x.kp)(this,e,t,be)}async queryRelatedFeaturesCount(e,t){return(0,x.C9)(this,e,t,be)}async save(e){return this._debouncedSaveOperations(fe.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(fe.x.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:s,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==s)return i?.push(ge(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===s)return i?.push(ge(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,he.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,P.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,x.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"createQueryVersion",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"editingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({...me.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ve.prototype,"fields",void 0),(0,s._)([(0,c.Cb)(me.fieldsIndex)],ve.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)(j.id)],ve.prototype,"id",void 0),(0,s._)([(0,c.Cb)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ve.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],ve.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)(me.outFields)],ve.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({clonable:!1})],ve.prototype,"source",null),(0,s._)([(0,c.Cb)({type:o.Z.ofType(ye),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const s=e.map((({code:e})=>{const s=new ye({subtypeCode:e});return s.read(t,r),s}));return new(o.Z.ofType(ye))(s)}}}},name:"layers",write:{overridePolicy(e,t,r){const s=this.originOf("sublayers"),i=b.s3.PORTAL_ITEM;let o=!0;if((0,b.M9)(s)===i&&(0,b.M9)(r.origin)>i){const t=e.some((e=>e.hasUserOverrides()));o=this._sublayersCollectionChanged||t}return{enabled:o,ignoreOrigin:!0}}}}})],ve.prototype,"sublayers",void 0),(0,s._)([(0,c.Cb)({type:ce.Z})],ve.prototype,"timeInfo",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],ve.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["name"])],ve.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({json:{read:!1}})],ve.prototype,"type",void 0),ve=(0,s._)([(0,f.j)("esri.layers.SubtypeGroupLayer")],ve);const we=ve},54295:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var s=r(43697),i=r(92604),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,i.Z.getLogger(this)))}};return(0,s._)([(0,o.Cb)()],t.prototype,"title",null),(0,s._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var s=r(43697),i=r(92604),o=r(95330),n=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new u.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let b=0,g=0;function m(){const e=Date.now();let t=!1;for(const r of y){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const s=r.deref();s&&(t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==g){if(g=t,clearInterval(b),0===g)return void(b=0);b=setInterval(m,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),i=r(2368),o=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new o.X({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 u=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var s,i=r(43697),o=r(46791),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=s=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=s=(0,i._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},54275:(e,t,r)=>{r.d(t,{h:()=>d});var s=r(80442),i=r(66677);function o(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:f(e),operations:b(e.capabilities,e,t),query:g(e,t),queryRelated:m(e),queryTopFeatures:v(e),editing:w(e)}}function y(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function b(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,i.Qc)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),d=l&&s.includes("update");const y=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:y,supportsQuery:a,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,i.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(a,"allowOthersToQuery",!0),supportsHistoricMoment:o(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function m(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>n,lj:()=>u,qP:()=>a,wW:()=>p});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2763],{92835:(e,t,s)=>{s.d(t,{Z:()=>m});var r,i=s(43697),n=s(96674),o=s(35463),a=s(5600),l=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),d=s(30556),u=s(25031);let c=r=class extends n.wq{static get allTime(){return p}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&s===i}expandTo(e,t=u.By){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.JE)(s,e,t));let i=this.end;if(i){const s=(0,o.JE)(i,e,t);i=i.getTime()===s.getTime()?s:(0,o.Nm)(s,1,e,t)}return new r({start:s,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(i>=t&&i<=s?o=i:t>=i&&t<=n&&(o=t),s>=i&&s<=n?a=s:n>=t&&n<=s&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return r.empty}offset(e,t,s=u.By){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:n,end:a}=this;return null!=n&&(i.start=(0,o.Nm)(n,e,t,s)),null!=a&&(i.end=(0,o.Nm)(a,e,t,s)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,l.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,l.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,i._)([(0,h.j)("esri.TimeExtent")],c);const p=new c,g=new c({start:void 0,end:void 0}),m=c},10699:(e,t,s)=>{s.d(t,{IG:()=>o,iv:()=>a});var r=s(43697),i=s(52011);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,i.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,i.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,r._)([(0,i.j)("esri.core.Identifiable")],l)},13867:(e,t,s)=>{s.d(t,{z:()=>i});var r=s(69801);class i{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var r,i,n=s(44553);(i=r||(r={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,r=0){this._storage.put(this,e,t,s,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,s,i,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,r.ALL)),i>this._maxSize)return void this._notifyRemove(t,s,r.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,s,r.ALL);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:s,size:i,lifetime:a,lives:a}),this._size+=i,e.size+=i,this._checkSizeLimits()}updateSize(e,t,s,i){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===s){for(this._size-=n.size,e.size-=n.size;i>this._maxSize;){const e=this._notifyRemove(t,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,r)=>{const i=e.lifetime;s[i]=(s[i]||0)+e.size,this._users.forAll((s=>{const{id:i,name:n}=s;if(r.startsWith(i)){const s=t[n]||0;t[n]=s+e.size}}))}));const r={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[s]||0;t[s]=i,r[s]=Math.round(100*e.hitRate)+"%"}else r[s]="0%"}));const i=Object.keys(t);i.sort(((e,s)=>t[s]-t[e])),i.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+r[s]));for(let t=s.length-1;t>=0;--t){const r=s[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let r;return this._removeFuncs.some((i=>{if(e.startsWith(i[0])){const e=i[1](t,s);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,r.SOME);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},64830:(e,t,s)=>{s.d(t,{Z:()=>n});var r=s(58971),i=s(10661);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.s,this._items=new Set}get length(){return(0,r.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.it)(this._observable),yield*this._items}}},17445:(e,t,s)=>{s.d(t,{N1:()=>c,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>f,on:()=>u,tX:()=>_}),s(66643),s(46791);var r=s(91460),i=s(50758),n=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return d(e,t,s,p)}function h(e,t,s={}){return d(e,t,s,g)}function d(e,t,s={},r){let i=null;const o=s.once?(e,s)=>{r(e)&&((0,n.hw)(i),t(e,s))}:(e,s)=>{r(e)&&t(e,s)};if(i=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return i}function u(e,t,s,o={}){let a=null,h=null,d=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(d),s(e)}const p=l(e,((e,s)=>{u(),(0,r.vT)(e)&&(a=e,h=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,i.kB)((()=>{p.remove(),u()})),d}function c(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((r,n)=>{a=(0,i.AL)([(0,o.fu)(s,(()=>{l(),n((0,o.zE)())})),d(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,g,t)}function p(e){return!0}function g(e){return!!e}s(87538);const m={sync:!0},f={initial:!0},_={sync:!0,initial:!0}},80903:(e,t,s)=>{s.d(t,{Z:()=>h});var r=s(50758),i=s(92604),n=s(95330),o=s(64830),a=s(18948),l=s(728);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((s,r)=>{let i=!0;const o=e=>{(0,n.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,n.y8)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(s),this._clients[i])),(()=>(o(r),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(s))}}))}broadcast(e,t,s){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];r[i]=n.then((r=>r?.invoke(e,t,s)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,a.E)(this)}invoke(e,t,s){let r;Array.isArray(s)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:s}):r=s;const o=(0,n.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:o});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return o.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((s=>s.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let s=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(t[r]=i.openPort()),0==--s&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,t,s)=>{s.d(t,{E:()=>n,z:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,t){r.register(e,t,t)}function n(e){r.unregister(e)}},56569:(e,t,s)=>{s.d(t,{bA:()=>F});var r=s(20102),i=s(80442),n=s(95330),o=s(80903),a=s(18948),l=s(728),h=s(92604),d=s(70586),u=s(3172),c=s(17452);const p={async request(e,t){const s=e.options,r=s.responseType;s.signal=t?.signal,s.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,c.oh)(e.url)?.after?r:"array-buffer";const i=await(0,u.Z)(e.url,s),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var g=s(94362),m=s(99880),f=s(68773),_=(s(2587),s(40330));const y={};var v=s(41213);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...s)=>e[t](...s)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,s){this._dispatcher.addEventListener(e,t,s)}removeEventListener(e,t,s){this._dispatcher.removeEventListener(e,t,s)}_workerPostMessage(e){(0,v.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.QM)(e);if(t&&t.type===g.MessageType.OPEN){const{modulePath:e,jobId:s}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const i=l.default.connect(r);this._workerPostMessage({type:g.MessageType.OPENED,jobId:s,data:i})}}}var k=s(70171),E=s(17202);const S=h.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:P}=g.MessageType;let I,C;const M="Failed to create Worker. Fallback to execute module in main thread";async function z(e){return new Promise((t=>{function s(i){const n=(0,g.QM)(i);n&&n.type===P&&(e.removeEventListener("message",s),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",s),e.removeEventListener("error",r),S.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",s),e.addEventListener("error",r)}e.addEventListener("message",s),e.addEventListener("error",r)}))}let L=0;const{ABORT:A,INVOKE:R,OPEN:T,OPENED:O,RESPONSE:N}=g.MessageType;class j{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers"))return z(new w);if(!I&&!C)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.default.default){const t={...f.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.default));e.assetsPath=(0,c.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,k.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.hF)(e.workers.workerPath):e.workers.workerPath=(0,c.hF)((0,m.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.default.workers.loaderConfig,s=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=y.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,k.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:E.r,fullVersion:_.bR,revision:E.$};return JSON.stringify({esriConfig:e,loaderConfig:s,kernelInfo:r})}()}'`);I=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){C=e||{}}let e;if(I)try{e=new Worker(I,{name:"esri-worker-"+L++})}catch(t){S.warn(M,C),e=new w}else S.warn(M,C),e=new w;return z(e)}();return new j(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:s}=t,r=(0,g.jt)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.$F)(s,(()=>{this._outJobs.delete(r),this._post({type:A,jobId:r})}))};this._outJobs.set(r,o),this._post({type:T,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,g.QM)(e);if(t)switch(t.type){case O:this._onOpenedMessage(t);break;case N:this._onResponseMessage(t);break;case A:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,s=e.jobId,r=t.get(s);r&&(r.controller&&r.controller.abort(),t.delete(s))}_onInvokeMessage(e){const{methodName:t,jobId:s,data:r,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=p[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:N,jobId:s,error:(0,g.AB)(e)})}(0,n.y8)(h)?(a.set(s,{controller:o,promise:h}),h.then((e=>{a.has(s)&&(a.delete(s),this._post({type:N,jobId:s},e))}),(e=>{a.has(s)&&(a.delete(s),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:N,jobId:s,error:(0,g.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:N,jobId:s},h)}_onOpenedMessage(e){const{jobId:t,data:s}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,d.hw)(r.abortHandle),r.resolve(s))}_onResponseMessage(e){const{jobId:t,error:s,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),s?n.reject(r.Z.fromJSON(JSON.parse(s))):n.resolve(i))}_post(e,t,s){return(0,g.oi)(this.worker,e,t,s)}}const U=(0,i.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size")):0;let x=(0,i.Z)("esri-mobile")?Math.min(U,3):U;x||(x=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let D=0;const Z=[];async function H(e,t){const s=new o.Z,{registryTarget:r,...i}=t;return await s.open(e,i),r&&(0,a.z)(r,s),s}async function F(e,t={}){if("string"!=typeof e)throw new r.Z("workers:undefined-module","modulePath is missing");let s=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(s="local"),"local"===s){let s=await l.default.loadWorker(e);s||(s=await import(e)),(0,n.k_)(t.signal);const r=t.client||s;return H([l.default.connect(s)],{...t,client:r})}if(await async function(){if(J)return J;V=new AbortController;const e=[];for(let t=0;t<x;t++){const s=j.create(t).then((e=>(Z[t]=e,e)));e.push(s)}return J=Promise.all(e),J}(),(0,n.k_)(t.signal),"dedicated"===s){const s=D++%x;return H([await Z[s].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const s=Math.min(t.maxNumWorkers,x);if(s<x){const r=new Array(s);for(let i=0;i<s;++i){const s=D++%x;r[i]=Z[s].open(e,t)}return H(r,t)}}return H(Z.map((s=>s.open(e,t))),t)}let V,J=null},79235:(e,t,s)=>{s.d(t,{Z:()=>v});var r,i=s(43697),n=s(67676),o=s(35454),a=s(96674),l=s(67900),h=s(20941),d=s(5600),u=(s(75215),s(80442),s(71715)),c=s(52011),p=s(30556);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=g.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=r=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,s){return g.write(e,t,s)}readHeightModel(e,t,s){return g.read(e)||(s?.messages&&s.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:s})),null)}readHeightUnit(e,t,s){return f.read(e)||(s?.messages&&s.messages.push(y(e,{context:s})),null)}readHeightUnitService(e,t,s){return(0,l.$C)(e)||f.read(e)||(s?.messages&&s.messages.push(y(e,{context:s})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const s=(0,l.cM)(t);return new r({heightModel:e.heightModel,heightUnit:s,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,d.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,i._)([(0,p.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,i._)([(0,u.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,i._)([(0,d.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],_.prototype,"heightUnit",void 0),(0,i._)([(0,u.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,i._)([(0,u.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,i._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,i._)([(0,u.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=r=(0,i._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},65665:(e,t,s)=>{s.r(t),s.d(t,{default:()=>L});var r=s(43697),i=s(3172),n=s(20102),o=s(70586),a=s(16453),l=s(95330),h=s(17452),d=s(5600),u=(s(75215),s(67676)),c=(s(80442),s(71715)),p=s(52011),g=s(79235),m=s(87085),f=s(46486),_=s(17287),y=s(38009),v=s(16859),b=s(21506);class w{constructor(e,t,s,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=s,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let s=1/0,r=-1/0,i=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(s=n<s?n:s,r=n>r?n:r,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=s,this._maxValue=r>-3e38?r:0)}}var k=s(50758),E=s(92604),S=s(56569);class P{constructor(e,t,s,r,i={}){this._mainMethod=t,this._transferLists=s,this._listeners=[],this._promise=(0,S.bA)(e,{...i,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>E.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const s={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(s),this._connectListener(s),(0,k.kB)((()=>{s.removed=!0,(0,u.Od)(this._listeners,s),this._thread&&null!=s.threadHandle&&s.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,s){if(this._thread){const r=this._transferLists[e],i=r?r(t):[];return this._thread.invoke(e,t,{transferList:i,signal:s})}return this._promise?this._promise.then((()=>((0,l.k_)(s),this.invokeMethod(e,t,s)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class I extends P{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,s){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},s):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach(((e,t)=>{e===this&&C.delete(t)})),this.destroy())}}const C=new Map;let M=class extends((0,f.Z)((0,_.Y)((0,y.q)((0,v.I)((0,a.R)(m.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new I((t=>e.immediate.schedule(t))),C.set(e,t)):(t=new I,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const s=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return s?{operations:{supportsTileMap:s.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let s=t.currentVersion;return s||(s=9.3),s}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,s,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,s,r))).then((()=>(0,i.Z)(this.getTileUrl(e,t,s),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,s){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,h.B7)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${s}${i?"?"+i:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await s.e(5642).then(s.bind(s,55642));return(0,l.k_)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await s.e(5642).then(s.bind(s,55642));return(0,l.k_)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,s,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,s,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},s=await(0,i.Z)(this.parsedUrl.path,t);s.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=s.data,this.read(s.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,d.Cb)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r._)([(0,c.r)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r._)([(0,d.Cb)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,type:g.Z})],M.prototype,"heightModelInfo",void 0),(0,r._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r._)([(0,d.Cb)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r._)([(0,d.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)()],M.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r._)([(0,d.Cb)(b.HQ)],M.prototype,"url",void 0),(0,r._)([(0,d.Cb)()],M.prototype,"version",void 0),(0,r._)([(0,c.r)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r._)([(0,p.j)("esri.layers.ElevationLayer")],M);const z=Symbol("default-fetch-tile");M.prototype.fetchTile[z]=!0;const L=M},87085:(e,t,s)=>{s.d(t,{Z:()=>v});var r=s(43697),i=(s(66577),s(3172)),n=s(20102),o=s(32448),a=s(10699),l=s(83379),h=s(92604),d=s(95330),u=s(17452),c=s(5600),p=(s(75215),s(67676),s(80442),s(52011)),g=s(68773),m=s(6570),f=s(82971);let _=0,y=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,f.Z.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=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await s.e(3529).then(s.bind(s,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await s.e(8008).then(s.bind(s,28008));try{return await r(t)}catch(e){const s=t&&t.portalItem,r=s?.id||"unset",i=s&&s.portal&&s.portal.url||g.default.portalUrl;throw h.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||h.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.Cb)({type:String})],y.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.Cb)({type:m.Z})],y.prototype,"fullExtent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],y.prototype,"hasAttributionData",null),(0,r._)([(0,c.Cb)({type:String,clonable:!1})],y.prototype,"id",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],y.prototype,"legendEnabled",void 0),(0,r._)([(0,c.Cb)({type:["show","hide","hide-children"]})],y.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],y.prototype,"opacity",void 0),(0,r._)([(0,c.Cb)({clonable:!1})],y.prototype,"parent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],y.prototype,"parsedUrl",null),(0,r._)([(0,c.Cb)({type:Boolean,readOnly:!0})],y.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.Cb)({type:Boolean})],y.prototype,"popupEnabled",void 0),(0,r._)([(0,c.Cb)({type:Boolean})],y.prototype,"attributionVisible",void 0),(0,r._)([(0,c.Cb)({type:f.Z})],y.prototype,"spatialReference",void 0),(0,r._)([(0,c.Cb)({type:String})],y.prototype,"title",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],y.prototype,"type",void 0),(0,r._)([(0,c.Cb)()],y.prototype,"url",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],y.prototype,"visible",void 0),y=(0,r._)([(0,p.j)("esri.layers.Layer")],y);const v=y},16859:(e,t,s)=>{s.d(t,{I:()=>k});var r=s(43697),i=s(68773),n=s(40330),o=s(3172),a=s(66643),l=s(20102),h=s(92604),d=s(70586),u=s(95330),c=s(17452),p=s(5600),g=(s(75215),s(67676),s(80442),s(71715)),m=s(52011),f=s(30556),_=s(84230),y=s(48522),v=s(15235),b=s(86082),w=s(14661);const k=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,s){if(t.itemId)return new v.default({id:t.itemId,portal:s?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await s.e(8062).then(s.bind(s,18062));return(0,u.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:s,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,u.r9)(e)}}async _fetchUserPrivileges(e,t){let s=this.portalItem;if(!e||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===s.id;if(r&&s.portal.user)return(0,w.Ss)(s);let i,o;if(r)i=s.portal.url;else try{i=await(0,_.oP)(this.url,t)}catch(e){(0,u.r9)(e)}if(!i||!(0,c.Zo)(i,s.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await s.reload():(s=new v.default({id:e,portal:{url:i}}),await s.load(t)),s.portal.user)return(0,w.Ss)(s)}catch(e){(0,u.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const s=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=s,null==s?.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const s=n.id.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const r=`${s.owningSystemUrl}/sharing/rest`,i=y.Z.getDefault();if(i&&i.loaded&&(0,c.Fv)(i.restUrl)===(0,c.Fv)(r))return i.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,d=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return d.ok?b.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const s=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||y.Z.getDefault());return s&&r&&!(0,c.tm)(r.restUrl,s.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,g.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8775],{22303:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r,s=i(35270),n=i(22021),l=i(75215);function a(t){return(0,n.uZ)((0,l.vU)(t),0,255)}function p(t,e,i){return t=Number(t),isNaN(t)?i:t<e?e:t>i?i:t}function d(t,e){const i=t.toString(16).padStart(2,"0");return e?i.substring(0,1):i}class c{static blendColors(t,e,i,o=new c){return o.r=Math.round(t.r+(e.r-t.r)*i),o.g=Math.round(t.g+(e.g-t.g)*i),o.b=Math.round(t.b+(e.b-t.b)*i),o.a=t.a+(e.a-t.a)*i,o._sanitize()}static fromRgb(t,e){const i=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(i){const t=i[2].split(/\s*,\s*/),o=i[1];if("rgb"===o&&3===t.length||"rgba"===o&&4===t.length){const i=t[0];if("%"===i.charAt(i.length-1)){const i=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(i[3]=parseFloat(t[3])),c.fromArray(i,e)}return c.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===o&&3===t.length||"hsla"===o&&4===t.length)return c.fromArray((0,s.B7)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new c){if("#"!==t[0]||isNaN(Number(`0x${t.substring(1)}`)))return null;switch(t.length){case 4:case 5:{const i=parseInt(t.substring(1,2),16),o=parseInt(t.substring(2,3),16),r=parseInt(t.substring(3,4),16),s=5===t.length?15:parseInt(t.substring(4),16);return c.fromArray([i+16*i,o+16*o,r+16*r,(s+16*s)/255],e)}case 7:case 9:{const i=parseInt(t.substring(1,3),16),o=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16),s=7===t.length?255:parseInt(t.substring(7),16);return c.fromArray([i,o,r,s/255],e)}default:return null}}static fromArray(t,e=new c){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.St)(t)?(0,s.h$)(t):null;return i&&c.fromArray(i,e)||c.fromRgb(t,e)||c.fromHex(t,e)}static fromJSON(t){return null!=t?new c([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?c.fromString(t,this):Array.isArray(t)?c.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,o=3===i||4===i,r=4===i||8===i,s=`#${d(this.r,o)}${d(this.g,o)}${d(this.b,o)}${r?d(Math.round(255*this.a),o):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=c.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),o=a(this.b);return t===c.AlphaMode.ALWAYS||1!==this.a?[e,i,o,a(255*this.a)]:[e,i,o]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(p(this.r,0,255)),this.g=Math.round(p(this.g,0,255)),this.b=Math.round(p(this.b,0,255)),this.a=p(this.a,0,1),this}_set(t,e,i,o){this.r=t,this.g=e,this.b=i,this.a=o}}c.prototype.declaredClass="esri.Color",(r=(o=c||(c={})).AlphaMode||(o.AlphaMode={}))[r.ALWAYS=0]="ALWAYS",r[r.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const u=c},51773:(t,e,i)=>{i.d(e,{Z:()=>tt});var o=i(43697),r=i(2368),s=i(46791),n=i(96674),l=i(22974),a=i(92604),p=i(95330),d=i(5600),c=i(90578),u=i(71715),h=i(52011),y=i(30556),f=i(75215),b=i(35671),m=i(84649),v=i(63801),_=i(48074),w=i(38745),g=i(9190),C=i(10214),x=i(71423),I=i(44951);const j={base:null,key:"type",typeMap:{attachment:m.Z,media:C.Z,text:I.Z,expression:w.Z,field:g.Z,relationship:x.Z}};var F,Z=i(11223),N=i(422);i(67676),i(80442);let S=F=class extends n.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new F({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"returnTopmostRaster",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"showNoDataRecords",void 0),S=F=(0,o._)([(0,h.j)("esri.popup.LayerOptions")],S);const A=S;var O,R=i(44729);let T=O=class extends n.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new O({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,l.d9)(this.orderByFields):null})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],T.prototype,"showRelatedRecords",void 0),(0,o._)([(0,d.Cb)({type:[R.Z],json:{write:!0}})],T.prototype,"orderByFields",void 0),T=O=(0,o._)([(0,h.j)("esri.popup.RelatedRecordsInfo")],T);const E=T;var M,L=i(79742),B=i(92036),J=i(10699);let U=M=class extends((0,J.IG)(B.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new M({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,o._)([(0,d.Cb)()],U.prototype,"active",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"className",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"disabled",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"icon",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"id",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"indicator",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"title",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"type",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"visible",void 0),U=M=(0,o._)([(0,h.j)("esri.support.actions.ActionBase")],U);const q=U;var D;let $=D=class extends q{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new D({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,o._)([(0,d.Cb)()],$.prototype,"image",void 0),$=D=(0,o._)([(0,h.j)("esri.support.Action.ActionButton")],$);const z=$;var P;let k=P=class extends q{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new P({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,o._)([(0,d.Cb)()],k.prototype,"image",void 0),(0,o._)([(0,d.Cb)()],k.prototype,"value",void 0),k=P=(0,o._)([(0,h.j)("esri.support.Action.ActionToggle")],k);const G=k,V=a.Z.getLogger("esri.PopupTemplate"),W="relationships/",H="expression/",Y=s.Z.ofType({key:"type",defaultKeyValue:"button",base:q,typeMap:{button:z,toggle:G}}),K={base:v.Z,key:"type",typeMap:{media:C.Z,custom:_.Z,text:I.Z,attachments:m.Z,fields:g.Z,expression:w.Z,relationship:x.Z}},Q=new Set(["attachments","fields","media","text","expression","relationship"]);let X=class extends((0,r.J)(n.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,f.N7)(K,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:(V.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:i}=e;return Array.isArray(i)&&i.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,i):this._readPopupInfo(e)}writeContent(t,e,i,o){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>Q.has(t.type))).map((t=>t?.toJSON(o))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,i,o){const{content:r}=this,s=Array.isArray(r)?r:null;if(t){const i=s?s.filter((t=>"fields"===t.type)):[],r=i.length&&i.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(o);return r&&(e.visible=!1),e}))}if(s)for(const t of s)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,i,o){e[i]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(o)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,b.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const i=(0,l.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?i.forEach((t=>{const i=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));i?i.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=i}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const i=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],o=[...e.relatedRecordsInfo?.orderByFields||[],...i];e.relatedRecordsInfo={showRelatedRecords:!0,...o?.length&&{orderByFields:o}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const i=(0,l.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...i]:e.mediaInfos=i}_readPopupInfoElements(t,e,i){const o={description:!1,mediaInfos:!1};return i.map((i=>"media"===i.type?(i.mediaInfos||!e||o.mediaInfos||(i.mediaInfos=e,o.mediaInfos=!0),C.Z.fromJSON(i)):"text"===i.type?(i.text||!t||o.description||(i.text=t,o.description=!0),I.Z.fromJSON(i)):"attachments"===i.type?m.Z.fromJSON(i):"fields"===i.type?g.Z.fromJSON(i):"expression"===i.type?w.Z.fromJSON(i):"relationship"===i.type?x.Z.fromJSON(i):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:i}=t;if(!e?.startsWith(W))return null;const o=e.replace(W,"").split("/");if(2!==o.length)return null;const r=parseInt(o[0],10),s=o[1];return"number"==typeof r&&s?x.Z.fromJSON({relationshipId:r,orderByFields:[{field:s,order:i}]}):null}_toFieldOrderJSON(t,e){const{order:i,field:o}=t;return{field:`${W}${e}/${o}`,order:i}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:i,relatedRecordsInfo:o={showRelatedRecords:!1}}){const r=[];t?r.push(new I.Z({text:t})):r.push(new g.Z),Array.isArray(e)&&e.length&&r.push(C.Z.fromJSON({mediaInfos:e})),i&&r.push(m.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:s,orderByFields:n}=o;return s&&n?.length&&n.forEach((t=>{const e=this._toRelationshipContent(t);e&&r.push(e)})),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:i,value:o}=t,r=o||{},{fields:s,normalizeField:n,tooltipField:l,sourceURL:a,linkURL:p}=r,d=[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(a),...this._extractFieldNames(p),...s??[]];return n&&d.push(n),l&&d.push(l),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,i){i&&await Promise.all(i.map((i=>(0,b.io)(t,e,i.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith(W)&&!t.startsWith(H))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:i,type:o}=t,r="button"===o||"toggle"===o?t.image:"";return[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const i=/\{(\w+):.+\}/,o=e.filter((t=>!(0===t.indexOf(`{${W}`)||0===t.indexOf(`{${H}`)))).map((t=>t.replace(i,"{$1}")));return o?o.map((t=>t.slice(1,-1))):[]}};(0,o._)([(0,d.Cb)({type:Y})],X.prototype,"actions",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"content",void 0),(0,o._)([(0,c.p)("content")],X.prototype,"castContent",null),(0,o._)([(0,u.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],X.prototype,"readContent",null),(0,o._)([(0,y.c)("content",{popupElements:{type:s.Z.ofType(j)},showAttachments:{type:Boolean},mediaInfos:{type:s.Z.ofType(L.V)},description:{type:String},relatedRecordsInfo:{type:E}})],X.prototype,"writeContent",null),(0,o._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],X.prototype,"expressionInfos",void 0),(0,o._)([(0,d.Cb)({type:[N.Z]})],X.prototype,"fieldInfos",void 0),(0,o._)([(0,y.c)("fieldInfos")],X.prototype,"writeFieldInfos",null),(0,o._)([(0,d.Cb)({type:A})],X.prototype,"layerOptions",void 0),(0,o._)([(0,y.c)("layerOptions")],X.prototype,"writeLayerOptions",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],X.prototype,"lastEditInfoEnabled",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"outFields",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"overwriteActions",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"returnGeometry",void 0),(0,o._)([(0,d.Cb)({json:{type:String}})],X.prototype,"title",void 0),(0,o._)([(0,y.c)("title")],X.prototype,"writeTitle",null),X=(0,o._)([(0,h.j)("esri.PopupTemplate")],X);const tt=X},10699:(t,e,i)=>{i.d(e,{IG:()=>n,iv:()=>l});var o=i(43697),r=i(52011);let s=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,o._)([(0,r.j)("esri.core.Identifiable")],e),e},l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,o._)([(0,r.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(n(class{})){};a=(0,o._)([(0,r.j)("esri.core.Identifiable")],a)},87085:(t,e,i)=>{i.d(e,{Z:()=>_});var o=i(43697),r=(i(66577),i(3172)),s=i(20102),n=i(32448),l=i(10699),a=i(83379),p=i(92604),d=i(95330),c=i(17452),u=i(5600),h=(i(75215),i(67676),i(80442),i(52011)),y=i(68773),f=i(6570),b=i(82971);let m=0,v=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,b.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=b.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:o}=await i.e(8008).then(i.bind(i,28008));try{return await o(e)}catch(t){const i=e&&e.portalItem,o=i?.id||"unset",r=i&&i.portal&&i.portal.url||y.default.portalUrl;throw p.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+o+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,d.D_)(t)||p.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,r.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,o._)([(0,u.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,o._)([(0,u.Cb)({type:f.Z})],v.prototype,"fullExtent",void 0),(0,o._)([(0,u.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,o._)([(0,u.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,o._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,o._)([(0,u.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,o._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,o._)([(0,u.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,o._)([(0,u.Cb)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,o._)([(0,u.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,o._)([(0,u.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,o._)([(0,u.Cb)({type:b.Z})],v.prototype,"spatialReference",void 0),(0,o._)([(0,u.Cb)({type:String})],v.prototype,"title",void 0),(0,o._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,o._)([(0,u.Cb)()],v.prototype,"url",void 0),(0,o._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,o._)([(0,h.j)("esri.layers.Layer")],v);const _=v},11223:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new o({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,n.Cb)({type:["string","number"],json:{write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.ExpressionInfo")],a);const p=a},422:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(35454),n=i(96674),l=i(22974),a=i(5600),p=(i(75215),i(36030)),d=i(52011),c=i(29986);let u=o=class extends n.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new o({fieldName:this.fieldName,format:this.format?(0,l.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"fieldName",void 0),(0,r._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"format",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],u.prototype,"isEditable",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,r._)([(0,p.J)(new s.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],u.prototype,"stringFieldOption",void 0),(0,r._)([(0,a.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],u.prototype,"statisticType",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"tooltip",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"visible",void 0),u=o=(0,r._)([(0,d.j)("esri.popup.FieldInfo")],u);const h=u},84649:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new o({description:this.description,displayType:this.displayType,title:this.title})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:["auto","preview","list"],json:{write:!0}})],a.prototype,"displayType",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.AttachmentsContent")],a);const p=a},41463:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.type=null}};(0,o._)([(0,s.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.Content")],l);const a=l},48074:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(63801);let p=o=class extends a.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new o({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,s.d9)(this.outFields):null})}};(0,r._)([(0,n.Cb)()],p.prototype,"creator",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"destroyer",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"outFields",void 0),(0,r._)([(0,n.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=o=(0,r._)([(0,l.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(96674);let a=o=class extends l.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new o({title:this.title,expression:this.expression})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,s.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.ElementExpressionInfo")],a);const p=a;var d,c=i(63801);let u=d=class extends c.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,r._)([(0,s.Cb)({type:p,json:{write:!0}})],u.prototype,"expressionInfo",void 0),(0,r._)([(0,s.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=d=(0,r._)([(0,n.j)("esri.popup.content.ExpressionContent")],u);const h=u},9190:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(30556),p=i(422),d=i(63801);let c=o=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],c.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:[p.Z]})],c.prototype,"fieldInfos",void 0),(0,r._)([(0,a.c)("fieldInfos")],c.prototype,"writeFieldInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=o=(0,r._)([(0,l.j)("esri.popup.content.FieldsContent")],c);const u=c},13151:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(35320),a=i(96674);let p=o=class extends a.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new o({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var c;let u=c=class extends l.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new c({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:Number,json:{write:!0}})],u.prototype,"refreshInterval",void 0),(0,r._)([(0,s.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:d,json:{write:!0}})],u.prototype,"value",void 0),u=c=(0,r._)([(0,n.j)("esri.popup.content.ImageMediaInfo")],u);const h=u},55869:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,i)=>{i.d(e,{Z:()=>v});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(71715)),a=i(52011),p=i(30556),d=i(41463),c=i(87131),u=i(63801),h=i(13151),y=i(55869),f=i(13353),b=i(79742);let m=o=class extends u.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?h.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?c.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?f.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r._)([(0,n.Cb)()],m.prototype,"activeMediaInfoIndex",void 0),(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],m.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,r._)([(0,n.Cb)({types:[b.V]})],m.prototype,"mediaInfos",void 0),(0,r._)([(0,l.r)("mediaInfos")],m.prototype,"readMediaInfos",null),(0,r._)([(0,p.c)("mediaInfos")],m.prototype,"writeMediaInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],m.prototype,"type",void 0),m=o=(0,r._)([(0,a.j)("esri.popup.content.MediaContent")],m);const v=m},13353:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,i)=>{i.d(e,{Z:()=>c});var o=i(43697),r=i(2368),s=i(5600),n=i(75215),l=(i(67676),i(80442),i(52011)),a=i(63801),p=i(44729);let d=class extends((0,r.J)(a.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,o._)([(0,s.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,o._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,o._)([(0,l.j)("esri.popup.content.RelationshipContent")],d);const c=d},44951:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new o({text:this.text})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"text",void 0),(0,r._)([(0,s.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.TextContent")],a);const p=a},50379:(t,e,i)=>{i.d(e,{Z:()=>_});var o,r=i(43697),s=i(5600),n=i(75215),l=(i(67676),i(80442),i(52011)),a=i(35320),p=i(22303),d=i(96674),c=i(22974),u=i(92036);let h=o=class extends u.Z{constructor(t){super(t),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new o({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r._)([(0,s.Cb)()],h.prototype,"color",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"fieldName",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"tooltip",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"value",void 0),h=o=(0,r._)([(0,l.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],h);const y=h;var f;let b=f=class extends d.wq{constructor(t){super(t),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new f({colors:(0,c.d9)(this.colors),fields:(0,c.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,r._)([(0,s.Cb)({type:[p.Z],json:{type:[[n.z8]],write:!0}})],b.prototype,"colors",void 0),(0,r._)([(0,s.Cb)({type:[String],json:{write:!0}})],b.prototype,"fields",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],b.prototype,"normalizeField",void 0),(0,r._)([(0,s.Cb)({type:[y],json:{read:!1}})],b.prototype,"series",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],b.prototype,"tooltipField",void 0),b=f=(0,r._)([(0,l.j)("esri.popup.content.support.ChartMediaInfoValue")],b);const m=b;let v=class extends a.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,r._)([(0,s.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:m,json:{write:!0}})],v.prototype,"value",void 0),v=(0,r._)([(0,l.j)("esri.popup.content.mixins.ChartMediaInfo")],v);const _=v},35320:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"altText",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"caption",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.mixins.MediaInfo")],l);const a=l},87102:(t,e,i)=>{i.d(e,{l:()=>o});const o=(0,i(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,i)=>{i.d(e,{V:()=>a});var o=i(41463),r=i(87131),s=i(13151),n=i(55869),l=i(13353);const a={base:i(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":o.Z,"column-chart":r.Z,"line-chart":n.Z,"pie-chart":l.Z,image:s.Z}}},29986:(t,e,i)=>{i.d(e,{Z:()=>u});var o=i(43697),r=i(2368),s=i(96674),n=i(5600),l=i(75215),a=(i(67676),i(80442),i(36030)),p=i(52011),d=i(90344);let c=class extends((0,r.J)(s.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};(0,o._)([(0,a.J)(d.Xr)],c.prototype,"dateFormat",void 0),(0,o._)([(0,n.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),(0,o._)([(0,n.Cb)({type:l.z8,json:{write:!0}})],c.prototype,"places",void 0),c=(0,o._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],c);const u=c},44729:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new o({field:this.field,order:this.order})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"field",void 0),(0,r._)([(0,n.Cb)({type:["asc","desc"],json:{write:!0}})],a.prototype,"order",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],a);const p=a}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8775],{22303:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r,s=i(35270),n=i(22021),l=i(75215);function a(t){return(0,n.uZ)((0,l.vU)(t),0,255)}function p(t,e,i){return t=Number(t),isNaN(t)?i:t<e?e:t>i?i:t}function d(t,e){const i=t.toString(16).padStart(2,"0");return e?i.substring(0,1):i}class c{static blendColors(t,e,i,o=new c){return o.r=Math.round(t.r+(e.r-t.r)*i),o.g=Math.round(t.g+(e.g-t.g)*i),o.b=Math.round(t.b+(e.b-t.b)*i),o.a=t.a+(e.a-t.a)*i,o._sanitize()}static fromRgb(t,e){const i=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(i){const t=i[2].split(/\s*,\s*/),o=i[1];if("rgb"===o&&3===t.length||"rgba"===o&&4===t.length){const i=t[0];if("%"===i.charAt(i.length-1)){const i=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(i[3]=parseFloat(t[3])),c.fromArray(i,e)}return c.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===o&&3===t.length||"hsla"===o&&4===t.length)return c.fromArray((0,s.B7)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new c){if("#"!==t[0]||isNaN(Number(`0x${t.substring(1)}`)))return null;switch(t.length){case 4:case 5:{const i=parseInt(t.substring(1,2),16),o=parseInt(t.substring(2,3),16),r=parseInt(t.substring(3,4),16),s=5===t.length?15:parseInt(t.substring(4),16);return c.fromArray([i+16*i,o+16*o,r+16*r,(s+16*s)/255],e)}case 7:case 9:{const i=parseInt(t.substring(1,3),16),o=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16),s=7===t.length?255:parseInt(t.substring(7),16);return c.fromArray([i,o,r,s/255],e)}default:return null}}static fromArray(t,e=new c){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.St)(t)?(0,s.h$)(t):null;return i&&c.fromArray(i,e)||c.fromRgb(t,e)||c.fromHex(t,e)}static fromJSON(t){return null!=t?new c([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?c.fromString(t,this):Array.isArray(t)?c.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,o=3===i||4===i,r=4===i||8===i,s=`#${d(this.r,o)}${d(this.g,o)}${d(this.b,o)}${r?d(Math.round(255*this.a),o):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=c.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),o=a(this.b);return t===c.AlphaMode.ALWAYS||1!==this.a?[e,i,o,a(255*this.a)]:[e,i,o]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(p(this.r,0,255)),this.g=Math.round(p(this.g,0,255)),this.b=Math.round(p(this.b,0,255)),this.a=p(this.a,0,1),this}_set(t,e,i,o){this.r=t,this.g=e,this.b=i,this.a=o}}c.prototype.declaredClass="esri.Color",(r=(o=c||(c={})).AlphaMode||(o.AlphaMode={}))[r.ALWAYS=0]="ALWAYS",r[r.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const u=c},51773:(t,e,i)=>{i.d(e,{Z:()=>tt});var o=i(43697),r=i(2368),s=i(46791),n=i(96674),l=i(22974),a=i(92604),p=i(95330),d=i(5600),c=i(90578),u=i(71715),h=i(52011),y=i(30556),f=i(75215),b=i(69165),m=i(84649),v=i(63801),_=i(48074),w=i(38745),g=i(9190),C=i(10214),x=i(71423),I=i(44951);const j={base:null,key:"type",typeMap:{attachment:m.Z,media:C.Z,text:I.Z,expression:w.Z,field:g.Z,relationship:x.Z}};var F,Z=i(11223),N=i(422);i(67676),i(80442);let S=F=class extends n.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new F({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"returnTopmostRaster",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"showNoDataRecords",void 0),S=F=(0,o._)([(0,h.j)("esri.popup.LayerOptions")],S);const A=S;var O,R=i(44729);let T=O=class extends n.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new O({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,l.d9)(this.orderByFields):null})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],T.prototype,"showRelatedRecords",void 0),(0,o._)([(0,d.Cb)({type:[R.Z],json:{write:!0}})],T.prototype,"orderByFields",void 0),T=O=(0,o._)([(0,h.j)("esri.popup.RelatedRecordsInfo")],T);const E=T;var M,L=i(79742),B=i(92036),J=i(10699);let U=M=class extends((0,J.IG)(B.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new M({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,o._)([(0,d.Cb)()],U.prototype,"active",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"className",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"disabled",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"icon",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"id",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"indicator",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"title",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"type",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"visible",void 0),U=M=(0,o._)([(0,h.j)("esri.support.actions.ActionBase")],U);const q=U;var D;let $=D=class extends q{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new D({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,o._)([(0,d.Cb)()],$.prototype,"image",void 0),$=D=(0,o._)([(0,h.j)("esri.support.Action.ActionButton")],$);const z=$;var P;let k=P=class extends q{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new P({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,o._)([(0,d.Cb)()],k.prototype,"image",void 0),(0,o._)([(0,d.Cb)()],k.prototype,"value",void 0),k=P=(0,o._)([(0,h.j)("esri.support.Action.ActionToggle")],k);const G=k,V=a.Z.getLogger("esri.PopupTemplate"),W="relationships/",H="expression/",Y=s.Z.ofType({key:"type",defaultKeyValue:"button",base:q,typeMap:{button:z,toggle:G}}),K={base:v.Z,key:"type",typeMap:{media:C.Z,custom:_.Z,text:I.Z,attachments:m.Z,fields:g.Z,expression:w.Z,relationship:x.Z}},Q=new Set(["attachments","fields","media","text","expression","relationship"]);let X=class extends((0,r.J)(n.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,f.N7)(K,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:(V.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:i}=e;return Array.isArray(i)&&i.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,i):this._readPopupInfo(e)}writeContent(t,e,i,o){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>Q.has(t.type))).map((t=>t?.toJSON(o))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,i,o){const{content:r}=this,s=Array.isArray(r)?r:null;if(t){const i=s?s.filter((t=>"fields"===t.type)):[],r=i.length&&i.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(o);return r&&(e.visible=!1),e}))}if(s)for(const t of s)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,i,o){e[i]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(o)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,b.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const i=(0,l.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?i.forEach((t=>{const i=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));i?i.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=i}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const i=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],o=[...e.relatedRecordsInfo?.orderByFields||[],...i];e.relatedRecordsInfo={showRelatedRecords:!0,...o?.length&&{orderByFields:o}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const i=(0,l.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...i]:e.mediaInfos=i}_readPopupInfoElements(t,e,i){const o={description:!1,mediaInfos:!1};return i.map((i=>"media"===i.type?(i.mediaInfos||!e||o.mediaInfos||(i.mediaInfos=e,o.mediaInfos=!0),C.Z.fromJSON(i)):"text"===i.type?(i.text||!t||o.description||(i.text=t,o.description=!0),I.Z.fromJSON(i)):"attachments"===i.type?m.Z.fromJSON(i):"fields"===i.type?g.Z.fromJSON(i):"expression"===i.type?w.Z.fromJSON(i):"relationship"===i.type?x.Z.fromJSON(i):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:i}=t;if(!e?.startsWith(W))return null;const o=e.replace(W,"").split("/");if(2!==o.length)return null;const r=parseInt(o[0],10),s=o[1];return"number"==typeof r&&s?x.Z.fromJSON({relationshipId:r,orderByFields:[{field:s,order:i}]}):null}_toFieldOrderJSON(t,e){const{order:i,field:o}=t;return{field:`${W}${e}/${o}`,order:i}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:i,relatedRecordsInfo:o={showRelatedRecords:!1}}){const r=[];t?r.push(new I.Z({text:t})):r.push(new g.Z),Array.isArray(e)&&e.length&&r.push(C.Z.fromJSON({mediaInfos:e})),i&&r.push(m.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:s,orderByFields:n}=o;return s&&n?.length&&n.forEach((t=>{const e=this._toRelationshipContent(t);e&&r.push(e)})),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:i,value:o}=t,r=o||{},{fields:s,normalizeField:n,tooltipField:l,sourceURL:a,linkURL:p}=r,d=[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(a),...this._extractFieldNames(p),...s??[]];return n&&d.push(n),l&&d.push(l),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,i){i&&await Promise.all(i.map((i=>(0,b.io)(t,e,i.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith(W)&&!t.startsWith(H))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:i,type:o}=t,r="button"===o||"toggle"===o?t.image:"";return[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const i=/\{(\w+):.+\}/,o=e.filter((t=>!(0===t.indexOf(`{${W}`)||0===t.indexOf(`{${H}`)))).map((t=>t.replace(i,"{$1}")));return o?o.map((t=>t.slice(1,-1))):[]}};(0,o._)([(0,d.Cb)({type:Y})],X.prototype,"actions",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"content",void 0),(0,o._)([(0,c.p)("content")],X.prototype,"castContent",null),(0,o._)([(0,u.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],X.prototype,"readContent",null),(0,o._)([(0,y.c)("content",{popupElements:{type:s.Z.ofType(j)},showAttachments:{type:Boolean},mediaInfos:{type:s.Z.ofType(L.V)},description:{type:String},relatedRecordsInfo:{type:E}})],X.prototype,"writeContent",null),(0,o._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],X.prototype,"expressionInfos",void 0),(0,o._)([(0,d.Cb)({type:[N.Z]})],X.prototype,"fieldInfos",void 0),(0,o._)([(0,y.c)("fieldInfos")],X.prototype,"writeFieldInfos",null),(0,o._)([(0,d.Cb)({type:A})],X.prototype,"layerOptions",void 0),(0,o._)([(0,y.c)("layerOptions")],X.prototype,"writeLayerOptions",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],X.prototype,"lastEditInfoEnabled",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"outFields",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"overwriteActions",void 0),(0,o._)([(0,d.Cb)()],X.prototype,"returnGeometry",void 0),(0,o._)([(0,d.Cb)({json:{type:String}})],X.prototype,"title",void 0),(0,o._)([(0,y.c)("title")],X.prototype,"writeTitle",null),X=(0,o._)([(0,h.j)("esri.PopupTemplate")],X);const tt=X},10699:(t,e,i)=>{i.d(e,{IG:()=>n,iv:()=>l});var o=i(43697),r=i(52011);let s=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,o._)([(0,r.j)("esri.core.Identifiable")],e),e},l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,o._)([(0,r.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(n(class{})){};a=(0,o._)([(0,r.j)("esri.core.Identifiable")],a)},87085:(t,e,i)=>{i.d(e,{Z:()=>_});var o=i(43697),r=(i(66577),i(3172)),s=i(20102),n=i(32448),l=i(10699),a=i(83379),p=i(92604),d=i(95330),c=i(17452),u=i(5600),h=(i(75215),i(67676),i(80442),i(52011)),y=i(68773),f=i(6570),b=i(82971);let m=0,v=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,b.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=b.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:o}=await i.e(8008).then(i.bind(i,28008));try{return await o(e)}catch(t){const i=e&&e.portalItem,o=i?.id||"unset",r=i&&i.portal&&i.portal.url||y.default.portalUrl;throw p.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+o+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,d.D_)(t)||p.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,r.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,o._)([(0,u.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,o._)([(0,u.Cb)({type:f.Z})],v.prototype,"fullExtent",void 0),(0,o._)([(0,u.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,o._)([(0,u.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,o._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,o._)([(0,u.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,o._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,o._)([(0,u.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,o._)([(0,u.Cb)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,o._)([(0,u.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,o._)([(0,u.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,o._)([(0,u.Cb)({type:b.Z})],v.prototype,"spatialReference",void 0),(0,o._)([(0,u.Cb)({type:String})],v.prototype,"title",void 0),(0,o._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,o._)([(0,u.Cb)()],v.prototype,"url",void 0),(0,o._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,o._)([(0,h.j)("esri.layers.Layer")],v);const _=v},11223:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new o({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,n.Cb)({type:["string","number"],json:{write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.ExpressionInfo")],a);const p=a},422:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(35454),n=i(96674),l=i(22974),a=i(5600),p=(i(75215),i(36030)),d=i(52011),c=i(29986);let u=o=class extends n.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new o({fieldName:this.fieldName,format:this.format?(0,l.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"fieldName",void 0),(0,r._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"format",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],u.prototype,"isEditable",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,r._)([(0,p.J)(new s.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],u.prototype,"stringFieldOption",void 0),(0,r._)([(0,a.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],u.prototype,"statisticType",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"tooltip",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"visible",void 0),u=o=(0,r._)([(0,d.j)("esri.popup.FieldInfo")],u);const h=u},84649:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new o({description:this.description,displayType:this.displayType,title:this.title})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:["auto","preview","list"],json:{write:!0}})],a.prototype,"displayType",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.AttachmentsContent")],a);const p=a},41463:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.type=null}};(0,o._)([(0,s.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.Content")],l);const a=l},48074:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(63801);let p=o=class extends a.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new o({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,s.d9)(this.outFields):null})}};(0,r._)([(0,n.Cb)()],p.prototype,"creator",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"destroyer",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"outFields",void 0),(0,r._)([(0,n.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=o=(0,r._)([(0,l.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(96674);let a=o=class extends l.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new o({title:this.title,expression:this.expression})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,s.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.ElementExpressionInfo")],a);const p=a;var d,c=i(63801);let u=d=class extends c.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,r._)([(0,s.Cb)({type:p,json:{write:!0}})],u.prototype,"expressionInfo",void 0),(0,r._)([(0,s.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=d=(0,r._)([(0,n.j)("esri.popup.content.ExpressionContent")],u);const h=u},9190:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(30556),p=i(422),d=i(63801);let c=o=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],c.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:[p.Z]})],c.prototype,"fieldInfos",void 0),(0,r._)([(0,a.c)("fieldInfos")],c.prototype,"writeFieldInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=o=(0,r._)([(0,l.j)("esri.popup.content.FieldsContent")],c);const u=c},13151:(t,e,i)=>{i.d(e,{Z:()=>h});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(35320),a=i(96674);let p=o=class extends a.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new o({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var c;let u=c=class extends l.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new c({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:Number,json:{write:!0}})],u.prototype,"refreshInterval",void 0),(0,r._)([(0,s.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:d,json:{write:!0}})],u.prototype,"value",void 0),u=c=(0,r._)([(0,n.j)("esri.popup.content.ImageMediaInfo")],u);const h=u},55869:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,i)=>{i.d(e,{Z:()=>v});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(71715)),a=i(52011),p=i(30556),d=i(41463),c=i(87131),u=i(63801),h=i(13151),y=i(55869),f=i(13353),b=i(79742);let m=o=class extends u.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?h.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?c.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?f.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r._)([(0,n.Cb)()],m.prototype,"activeMediaInfoIndex",void 0),(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],m.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,r._)([(0,n.Cb)({types:[b.V]})],m.prototype,"mediaInfos",void 0),(0,r._)([(0,l.r)("mediaInfos")],m.prototype,"readMediaInfos",null),(0,r._)([(0,p.c)("mediaInfos")],m.prototype,"writeMediaInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],m.prototype,"type",void 0),m=o=(0,r._)([(0,a.j)("esri.popup.content.MediaContent")],m);const v=m},13353:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,i)=>{i.d(e,{Z:()=>c});var o=i(43697),r=i(2368),s=i(5600),n=i(75215),l=(i(67676),i(80442),i(52011)),a=i(63801),p=i(44729);let d=class extends((0,r.J)(a.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,o._)([(0,s.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,o._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,o._)([(0,l.j)("esri.popup.content.RelationshipContent")],d);const c=d},44951:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new o({text:this.text})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"text",void 0),(0,r._)([(0,s.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.TextContent")],a);const p=a},50379:(t,e,i)=>{i.d(e,{Z:()=>_});var o,r=i(43697),s=i(5600),n=i(75215),l=(i(67676),i(80442),i(52011)),a=i(35320),p=i(22303),d=i(96674),c=i(22974),u=i(92036);let h=o=class extends u.Z{constructor(t){super(t),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new o({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r._)([(0,s.Cb)()],h.prototype,"color",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"fieldName",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"tooltip",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"value",void 0),h=o=(0,r._)([(0,l.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],h);const y=h;var f;let b=f=class extends d.wq{constructor(t){super(t),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new f({colors:(0,c.d9)(this.colors),fields:(0,c.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,r._)([(0,s.Cb)({type:[p.Z],json:{type:[[n.z8]],write:!0}})],b.prototype,"colors",void 0),(0,r._)([(0,s.Cb)({type:[String],json:{write:!0}})],b.prototype,"fields",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],b.prototype,"normalizeField",void 0),(0,r._)([(0,s.Cb)({type:[y],json:{read:!1}})],b.prototype,"series",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],b.prototype,"tooltipField",void 0),b=f=(0,r._)([(0,l.j)("esri.popup.content.support.ChartMediaInfoValue")],b);const m=b;let v=class extends a.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,r._)([(0,s.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:m,json:{write:!0}})],v.prototype,"value",void 0),v=(0,r._)([(0,l.j)("esri.popup.content.mixins.ChartMediaInfo")],v);const _=v},35320:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"altText",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"caption",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.mixins.MediaInfo")],l);const a=l},87102:(t,e,i)=>{i.d(e,{l:()=>o});const o=(0,i(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,i)=>{i.d(e,{V:()=>a});var o=i(41463),r=i(87131),s=i(13151),n=i(55869),l=i(13353);const a={base:i(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":o.Z,"column-chart":r.Z,"line-chart":n.Z,"pie-chart":l.Z,image:s.Z}}},29986:(t,e,i)=>{i.d(e,{Z:()=>u});var o=i(43697),r=i(2368),s=i(96674),n=i(5600),l=i(75215),a=(i(67676),i(80442),i(36030)),p=i(52011),d=i(90344);let c=class extends((0,r.J)(s.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};(0,o._)([(0,a.J)(d.Xr)],c.prototype,"dateFormat",void 0),(0,o._)([(0,n.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),(0,o._)([(0,n.Cb)({type:l.z8,json:{write:!0}})],c.prototype,"places",void 0),c=(0,o._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],c);const u=c},44729:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new o({field:this.field,order:this.order})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"field",void 0),(0,r._)([(0,n.Cb)({type:["asc","desc"],json:{write:!0}})],a.prototype,"order",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],a);const p=a}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9379],{13598:(e,t,r)=>{function a(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>a,b:()=>s,c:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:a,createView:n,fromValues:function(e,t,r,a,s,n,i,o,u,l,d,p,c,h,y,f){return[e,t,r,a,s,n,i,o,u,l,d,p,c,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>s,d:()=>d,e:()=>u,n:()=>p,s:()=>l,t:()=>n});var a=r(72220);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return a.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[4],p=r[5],c=r[6],h=r[8],y=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let w=0,F=0;for(let r=0;r<i;r++){const r=t[w],a=t[w+1],i=t[w+2];e[F]=o*r+d*a+h*i+m,e[F+1]=u*r+p*a+y*i+g,e[F+2]=l*r+c*a+f*i+b,w+=n,F+=s}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void a.c.error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],p=r[4],c=r[5],h=r[6],y=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],a=t[m+1],i=t[m+2];e[g]=o*r+d*a+h*i,e[g+1]=u*r+p*a+y*i,e[g+2]=l*r+c*a+f*i,m+=n,g+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:d,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s},Symbol.toStringTag,{value:"Module"}))},85872:(e,t,r)=>{r.d(t,{Z:()=>c});var a=r(43697),s=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),l=r(65617),d=r(94139);let p=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,l.c)()}getOriginPoint(e){const[t,r,a]=this.origin;return new d.Z({x:t,y:r,z:a,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:r}){this.origin=(0,l.f)(e,t,r??0)}};(0,a._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,a._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,a._)([(0,u.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const c=p},72220:(e,t,r)=>{r.d(t,{c:()=>a});const a=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>w,zE:()=>b});var a=r(3172),s=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.Z)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>m(e,t)))}return m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.dm)(e,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>S,aw:()=>b,uploadAssets:()=>q});var a=r(38171),s=r(46791),n=r(20102),i=r(22974),o=r(92604),u=r(95330),l=r(17452),d=r(41123),p=r(16306),c=r(66361),h=r(35671),y=r(2981),f=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const p="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??p;if((0,c.lQ)(e)&&e.url)l=(0,c.jF)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.hh)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:p}=await async function(e,t,r,a){if(await e.load(),!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(E),a.updateFeatures=a.updateFeatures.map(E),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,m))),c.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,m))),c.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,m))),c.addAttachments.forEach((t=>R(t,e))),c.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.S0)("model/gltf-binary",r.supportedFormats)??(0,y.Ow)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])O(t)&&s.push(t);for(const t of e.updateFeatures??[])O(t)&&s.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),c=e=>e.filter((e=>!e.error)).map(i.d9),h={edits:p,addedFeatures:c(u.addFeatureResults),updatedFeatures:c(u.updateFeatureResults),deletedFeatures:c(u.deleteFeatureResults),addedAttachments:c(u.addAttachmentResults),updatedAttachments:c(u.updateAttachmentResults),deletedAttachments:c(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.d2)(r,a))throw new n.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new n.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.sJ)(a.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,p.aX)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new a.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function O(e){return"mesh"===e?.geometry?.type}function q(e,t,r,a){if(!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},49379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var a=r(43697),s=(r(66577),r(40330)),n=r(3172),i=r(92835),o=r(67676),u=r(20102),l=r(80442),d=r(35454),p=r(83379),c=r(92604),h=r(78286),y=r(95330),f=r(17452),m=r(41123),g=r(5600),b=(r(75215),r(52011)),w=r(6570),F=r(52138),S=r(13598),A=r(85872),v=r(20773);function R(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,a=r.clone(),s=(0,F.d)(I,[-a.x,-a.y,-a.z]),n=new A.Z({origin:[a.x,a.y,a.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,v.t)(new Float64Array(o.length),o,s),i.vertexAttributesChanged(),i}const I=(0,S.a)();var E=r(84470),O=r(38171),q=r(67900),Z=r(73615),_=r(33955),x=r(14720);async function T(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,Z.initializeProjection)(i,u);const l=(0,Z.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d=l.isGeoreferenced?1:(0,q.r6)(i)/(0,q.r6)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function M(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>$(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>$(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function $(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.IR)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function C(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function U(e,t){return new O.Z({attributes:e.attributes,geometry:(0,_.im)({...e.geometry,spatialReference:t})})}function N(e,t){return{adds:e?.adds?.map((e=>U(e,t)))||[],updates:e?.updates?.map((e=>({original:U(e[0],t),current:U(e[1],t)})))||[],deletes:e?.deletes?.map((e=>U(e,t)))||[],spatialReference:t}}var B=r(25278),k=r(49735),j=r(66677),D=r(45574),L=r(2981),P=r(4967),J=r(59431),Q=r(14165),G=r(18596),V=r(82971);const z=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),H=new Set(["Feature Layer","Oriented Imagery Layer","Table"]),W=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let X=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new k.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return C((await(0,n.Z)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,D.nU)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return C((await(0,n.Z)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=r.infoFor3D,i=null!=a,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>T(this.layer,e,a)))??[],p=(await Promise.all(d)).filter(o.pC),c=e.updateFeatures?.map((e=>T(this.layer,e,a)))??[],h=(await Promise.all(c)).filter(o.pC),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,x.Ey)(t))return t.map((e=>e.globalId));if((0,x.aw)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,u);(0,J.P)(p,h,r.spatialReference);const f=await M(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,G.Px)(this.layer.url,g,!0);const w=(0,G.JV)(this.layer.url,g||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p,updates:h,deletes:y,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=z.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=G.U8);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let A;try{A=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;F.authMode="immediate",A=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(A)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.Z)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(C)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.Z)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,p=u||l;return{id:o,fullExtent:p&&w.Z.fromJSON(p),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,j.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.Z)(e,{query:{f:"json"}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(2046).then(r.bind(r,2046));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.Z)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.e4)(Y)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.Z)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.Z)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!H.has(r))throw new u.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,B.bU)(e.geometryType).renderer;(0,h.RB)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.Z)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.r9)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)a.push(t);else{const r=R(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){c.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(E.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,m.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):c.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(C)??[],updateFeatureResults:e?.updateResults?.map(C)??[],deleteFeatureResults:e?.deleteResults?.map(C)??[],addAttachmentResults:r?.addResults?r.addResults.map(C):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(C):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(C):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new V.Z(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:N(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.Z("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,L.$6)(a);if(null==n)return e;const i=(0,f.v_)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=a,h=new Q.Z;h.where=`${p} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[c,p],h.returnGeometry=!1;const y=await(0,P.e)(i,h),{features:m}=y;return 0===m.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=m.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,g.Cb)()],X.prototype,"type",void 0),(0,a._)([(0,g.Cb)({constructOnly:!0})],X.prototype,"layer",void 0),(0,a._)([(0,g.Cb)({readOnly:!0})],X.prototype,"queryTask",null),X=(0,a._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],X);const Y=1e3,K=X},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var a=r(80442),s=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9379],{13598:(e,t,r)=>{function a(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>a,b:()=>s,c:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:a,createView:n,fromValues:function(e,t,r,a,s,n,i,o,u,l,d,p,c,h,y,f){return[e,t,r,a,s,n,i,o,u,l,d,p,c,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>s,d:()=>d,e:()=>u,n:()=>p,s:()=>l,t:()=>n});var a=r(72220);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return a.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[4],p=r[5],c=r[6],h=r[8],y=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let w=0,F=0;for(let r=0;r<i;r++){const r=t[w],a=t[w+1],i=t[w+2];e[F]=o*r+d*a+h*i+m,e[F+1]=u*r+p*a+y*i+g,e[F+2]=l*r+c*a+f*i+b,w+=n,F+=s}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void a.c.error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],p=r[4],c=r[5],h=r[6],y=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],a=t[m+1],i=t[m+2];e[g]=o*r+d*a+h*i,e[g+1]=u*r+p*a+y*i,e[g+2]=l*r+c*a+f*i,m+=n,g+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:d,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s},Symbol.toStringTag,{value:"Module"}))},85872:(e,t,r)=>{r.d(t,{Z:()=>c});var a=r(43697),s=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),l=r(65617),d=r(94139);let p=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,l.c)()}getOriginPoint(e){const[t,r,a]=this.origin;return new d.Z({x:t,y:r,z:a,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:r}){this.origin=(0,l.f)(e,t,r??0)}};(0,a._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,a._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,a._)([(0,u.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const c=p},72220:(e,t,r)=>{r.d(t,{c:()=>a});const a=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>w,zE:()=>b});var a=r(3172),s=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.Z)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>m(e,t)))}return m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.dm)(e,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>S,aw:()=>b,uploadAssets:()=>q});var a=r(38171),s=r(46791),n=r(20102),i=r(22974),o=r(92604),u=r(95330),l=r(17452),d=r(41123),p=r(16306),c=r(66361),h=r(69165),y=r(2981),f=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const p="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??p;if((0,c.lQ)(e)&&e.url)l=(0,c.jF)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.hh)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:p}=await async function(e,t,r,a){if(await e.load(),!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(E),a.updateFeatures=a.updateFeatures.map(E),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,m))),c.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,m))),c.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,m))),c.addAttachments.forEach((t=>R(t,e))),c.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.S0)("model/gltf-binary",r.supportedFormats)??(0,y.Ow)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])O(t)&&s.push(t);for(const t of e.updateFeatures??[])O(t)&&s.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),c=e=>e.filter((e=>!e.error)).map(i.d9),h={edits:p,addedFeatures:c(u.addFeatureResults),updatedFeatures:c(u.updateFeatureResults),deletedFeatures:c(u.deleteFeatureResults),addedAttachments:c(u.addAttachmentResults),updatedAttachments:c(u.updateAttachmentResults),deletedAttachments:c(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.d2)(r,a))throw new n.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new n.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.sJ)(a.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,p.aX)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new a.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function O(e){return"mesh"===e?.geometry?.type}function q(e,t,r,a){if(!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},49379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var a=r(43697),s=(r(66577),r(40330)),n=r(3172),i=r(92835),o=r(67676),u=r(20102),l=r(80442),d=r(35454),p=r(83379),c=r(92604),h=r(78286),y=r(95330),f=r(17452),m=r(41123),g=r(5600),b=(r(75215),r(52011)),w=r(6570),F=r(52138),S=r(13598),A=r(85872),v=r(20773);function R(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,a=r.clone(),s=(0,F.d)(I,[-a.x,-a.y,-a.z]),n=new A.Z({origin:[a.x,a.y,a.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,v.t)(new Float64Array(o.length),o,s),i.vertexAttributesChanged(),i}const I=(0,S.a)();var E=r(84470),O=r(38171),q=r(67900),Z=r(73615),_=r(33955),x=r(14720);async function T(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,Z.initializeProjection)(i,u);const l=(0,Z.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d=l.isGeoreferenced?1:(0,q.r6)(i)/(0,q.r6)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function M(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>$(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>$(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function $(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.IR)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function C(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function U(e,t){return new O.Z({attributes:e.attributes,geometry:(0,_.im)({...e.geometry,spatialReference:t})})}function N(e,t){return{adds:e?.adds?.map((e=>U(e,t)))||[],updates:e?.updates?.map((e=>({original:U(e[0],t),current:U(e[1],t)})))||[],deletes:e?.deletes?.map((e=>U(e,t)))||[],spatialReference:t}}var B=r(25278),k=r(49735),j=r(66677),D=r(45574),L=r(2981),P=r(4967),J=r(59431),Q=r(14165),G=r(18596),V=r(82971);const z=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),H=new Set(["Feature Layer","Oriented Imagery Layer","Table"]),W=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let X=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new k.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return C((await(0,n.Z)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,D.nU)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return C((await(0,n.Z)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=r.infoFor3D,i=null!=a,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>T(this.layer,e,a)))??[],p=(await Promise.all(d)).filter(o.pC),c=e.updateFeatures?.map((e=>T(this.layer,e,a)))??[],h=(await Promise.all(c)).filter(o.pC),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,x.Ey)(t))return t.map((e=>e.globalId));if((0,x.aw)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,u);(0,J.P)(p,h,r.spatialReference);const f=await M(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,G.Px)(this.layer.url,g,!0);const w=(0,G.JV)(this.layer.url,g||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p,updates:h,deletes:y,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=z.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=G.U8);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let A;try{A=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;F.authMode="immediate",A=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(A)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,D.nU)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.Z)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(C)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.Z)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,p=u||l;return{id:o,fullExtent:p&&w.Z.fromJSON(p),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,j.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.Z)(e,{query:{f:"json"}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(2046).then(r.bind(r,2046));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.Z)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.e4)(Y)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.Z)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.Z)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!H.has(r))throw new u.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,B.bU)(e.geometryType).renderer;(0,h.RB)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.Z)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.r9)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)a.push(t);else{const r=R(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){c.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(E.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,m.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):c.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(C)??[],updateFeatureResults:e?.updateResults?.map(C)??[],deleteFeatureResults:e?.deleteResults?.map(C)??[],addAttachmentResults:r?.addResults?r.addResults.map(C):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(C):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(C):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new V.Z(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:N(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.Z("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,L.$6)(a);if(null==n)return e;const i=(0,f.v_)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=a,h=new Q.Z;h.where=`${p} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[c,p],h.returnGeometry=!1;const y=await(0,P.e)(i,h),{features:m}=y;return 0===m.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=m.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,g.Cb)()],X.prototype,"type",void 0),(0,a._)([(0,g.Cb)({constructOnly:!0})],X.prototype,"layer",void 0),(0,a._)([(0,g.Cb)({readOnly:!0})],X.prototype,"queryTask",null),X=(0,a._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],X);const Y=1e3,K=X},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var a=r(80442),s=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);