@arcgis/core 4.25.1 → 4.25.2
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{c90bca033e64cfad8b43.js → 04dbebaeb2d4d778f0e1.js} +1 -1
- package/assets/esri/core/workers/chunks/253d5c44f6cfd32b6548.js +1 -0
- package/assets/esri/core/workers/chunks/{5be314edd66cddf6c67c.js → 3a0268b5d0bb8ead8622.js} +1 -1
- package/assets/esri/core/workers/chunks/4ef7d9c19bc3a95748a4.js +1 -0
- package/assets/esri/core/workers/chunks/5e71fb59cff1ca8b6adb.js +1 -0
- package/assets/esri/core/workers/chunks/{ab05015ded44c1f8f0e2.js → 60ff321a20b3f8c0bb3c.js} +1 -1
- package/assets/esri/core/workers/chunks/7495f2a9713eb8e5ccc5.js +1 -0
- package/assets/esri/core/workers/chunks/85f56a2bc01b611533d9.js +1 -0
- package/assets/esri/core/workers/chunks/{6ec223bcd2c3bd40ffee.js → 92f4e92aa7398ca58265.js} +1 -1
- package/assets/esri/core/workers/chunks/a83274fd379b4fc73728.js +1 -0
- package/assets/esri/core/workers/chunks/{7f96fd3844cd6eda0ec3.js → b766aa60a1cc728042c9.js} +1 -1
- package/assets/esri/core/workers/chunks/fa962030bc7e24036aaf.js +1 -0
- package/assets/esri/core/workers/chunks/{63ce5262d97c2afb4464.js → ffdb5c1133a45787cd63.js} +1 -1
- package/config.js +1 -1
- package/layers/graphics/sources/csv/csv.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/support/FieldsIndex.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +1 -1
- package/rest/networks/validateNetworkTopology.js +1 -1
- package/support/revision.js +1 -1
- package/assets/esri/core/workers/chunks/17d6c243ca6269b0f7ef.js +0 -1
- package/assets/esri/core/workers/chunks/60ff0086832d6fc6d610.js +0 -1
- package/assets/esri/core/workers/chunks/6316bea2130bb9cb515d.js +0 -1
- package/assets/esri/core/workers/chunks/7125c94ba8ef5efd63b0.js +0 -1
- package/assets/esri/core/workers/chunks/95ee476d101968ff4925.js +0 -1
- package/assets/esri/core/workers/chunks/96933809f486480aae0d.js +0 -1
- package/assets/esri/core/workers/chunks/fa76467bfd7b1829b995.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5468,661,7873],{92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),n=r(96674),o=r(70586),l=r(35463),a=r(5600),d=(r(67676),r(75215),r(71715)),u=r(52011),p=r(30556);let c=i=class extends n.wq{constructor(e){super(e),this.end=null,this.start=null}static get allTime(){return h}static get empty(){return f}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=(0,o.pC)(this.start)?this.start.getTime():this.start,r=(0,o.pC)(this.end)?this.end.getTime():this.end,i=(0,o.pC)(e.start)?e.start.getTime():e.start,s=(0,o.pC)(e.end)?e.end.getTime():e.end;return t===i&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,l.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,l.JE)(t,e);return t.getTime()===r.getTime()?r:(0,l.Nm)(r,1,e)}));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,o.R2)(this.start,-1/0,(e=>e.getTime())),r=(0,o.R2)(this.end,1/0,(e=>e.getTime())),s=(0,o.R2)(e.start,-1/0,(e=>e.getTime())),n=(0,o.R2)(e.end,1/0,(e=>e.getTime()));let l,a;if(s>=t&&s<=r?l=s:t>=s&&t<=n&&(l=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:n}=this;return(0,o.pC)(s)&&(r.start=(0,l.Nm)(s,e,t)),(0,o.pC)(n)&&(r.end=(0,l.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=(0,o.pC)(this.start)&&(0,o.pC)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=(0,o.pC)(this.end)&&(0,o.pC)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,d.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,d.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=i=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const h=new c,f=new c({start:void 0,end:void 0}),y=c},2368:(e,t,r)=>{r.d(t,{J:()=>u,j:()=>p});var i=r(43697),s=r(15923),n=(r(80442),r(22974)),o=(r(92604),r(70586)),l=r(31263),a=r(1153),d=r(52011);const u=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,a.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,r=e.store,i={},s=new Map;for(const e in t){const o=t[e],a=r?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const u=this[e];let p=null;p="function"==typeof d?d(u):"reference"===d?u:(0,n.Vo)(u),null!=u&&null==p||(a===l.s3.DEFAULTS?s.set(e,p):i[e]=p)}const d=new(0,Object.getPrototypeOf(this).constructor)(i);if(s.size){const e=(0,a.vw)(d)?.store;if(e)for(const[t,r]of s)e.set(t,r,l.s3.DEFAULTS)}return d}};return t=(0,i._)([(0,d.j)("esri.core.Clonable")],t),t};let p=class extends(u(s.Z)){};p=(0,i._)([(0,d.j)("esri.core.Clonable")],p)},46791:(e,t,r)=>{r.d(t,{Z:()=>R});var i,s=r(43697),n=r(3894),o=r(32448),l=r(22974),a=r(70586),d=r(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,p=r(1654),c=r(5600),h=r(75215),f=r(52421),y=r(52011),m=r(58971),g=r(10661);const v=new d.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),_=()=>{};function b(e){return e?e instanceof F?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,r,i){const s=Math.min(e.length-r,t.length-i);let n=0;for(;n<s&&e[r+n]===t[i+n];)n++;return n}function S(e,t,r,i){t&&t.forEach(((t,s,n)=>{e.push(t),S(e,r.call(i,t,s,n),r,i)}))}const I=new Set,x=new Set,T=new Set,j=new Map;let E=0,F=u=class extends o.Z.EventedAccessor{constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:E++})}static isCollection(e){return null!=e&&e instanceof u}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if((0,m.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,m.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,b(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,m.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._splice(0,this.length)||[];return this._emitAfterChanges(i.REMOVE),e}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...e){(0,m.it)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const r=(0,a.j0)(this._splice(0,this.length)),s=r.length;for(let i=0;i<s;i++)e.call(t,r[i],i,r);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,m.it)(this._observable),this._items.every(e,t)}filter(e,t){let r;return(0,m.it)(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return(0,m.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,m.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,m.it)(this._observable);const r=[];return S(r,this,e,t),new u(r)}forEach(e,t){return(0,m.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,m.it)(this._observable),this._items[e]}getNextIndex(e){(0,m.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,m.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,m.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,m.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,m.it)(this._observable);const r=this._items.map(e,t);return new u({items:r})}reorder(e,t=this.length-1){(0,m.it)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,m.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,m.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,m.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,m.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,m.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,m.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,r=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=r.indexOf(i);if(n>-1){const i=1+C(t,r,e+1,n+1),o=this._splice(n,i);o&&o.length>0&&s.push.apply(s,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),s}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,m.it)(this._observable),this._items.some(e,t)}sort(e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...r){(0,m.it)(this._observable);const s=(t?i.REMOVE:0)|(r.length?i.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...e){return(0,m.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,s=this.itemType;let n,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,p.Os)((()=>this._dispatchChange()))),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=v.acquire();t.target=this,t.cancellable=!0;for(let r=0,s=o.length;r<s;r++)n=o[r],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(r,1),i.splice(e,0,n),e+=1,r-=1,s-=1);v.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=v.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let r=0;r<t;r++)e.reset(o[r]),this.emit("after-remove",e);v.release(e)}}if(r&&r.length){if(s){const e=[];for(const t of r){const r=s.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),o=e===this.length;if(t||n){const s=v.acquire();s.target=this,s.cancellable=!0;const l=v.acquire();l.target=this,l.cancellable=!1;for(const a of r)t?(s.reset(a),this.emit("before-add",s),s.defaultPrevented||(o?i.push(a):i.splice(e++,0,a),this._set("length",i.length),n&&(l.reset(a),this.emit("after-add",l)))):(o?i.push(a):i.splice(e++,0,a),this._set("length",i.length),l.reset(a),this.emit("after-add",l));v.release(l),v.release(s)}else{if(o)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}return(r&&r.length||o&&o.length)&&this._notifyChangeEvent(r,o),o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=v.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,v.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=v.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),v.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;I.clear(),x.clear(),T.clear();for(const{added:t,removed:r}of e){if(t)if(0===T.size&&0===x.size)for(const e of t)I.add(e);else for(const e of t)x.has(e)?(T.add(e),x.delete(e)):T.has(e)||I.add(e);if(r)if(0===T.size&&0===I.size)for(const e of r)x.add(e);else for(const e of r)I.has(e)?I.delete(e):(T.delete(e),x.add(e))}const r=n.Z.acquire();I.forEach((e=>{r.push(e)}));const i=n.Z.acquire();x.forEach((e=>{i.push(e)}));const s=this._items,o=t.items,l=n.Z.acquire();if(T.forEach((e=>{o.indexOf(e)!==s.indexOf(e)&&l.push(e)})),t.listeners&&(r.length||i.length||l.length)){const e={target:this,added:r,removed:i,moved:l},s=t.listeners.length;for(let r=0;r<s;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}n.Z.release(r),n.Z.release(i),n.Z.release(l)}I.clear(),x.clear(),T.clear()}};F.ofType=e=>{if(!e)return u;if(j.has(e))return j.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const i=e.typeMap[r].prototype.declaredClass;t?t+=` | ${i}`:t=i}let r=class extends u{};return(0,s._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,h.se)(e):(0,h.N7)(e)})],r.prototype,"itemType",void 0),r=(0,s._)([(0,y.j)(`esri.core.Collection<${t}>`)],r),j.set(e,r),r},(0,s._)([(0,c.Cb)()],F.prototype,"length",void 0),(0,s._)([(0,c.Cb)()],F.prototype,"items",null),F=u=(0,s._)([(0,y.j)("esri.core.Collection")],F);const R=F},52421:(e,t,r)=>{function i(e){return(t,r)=>{t[r]=e}}r.d(t,{c:()=>i})},65845:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},10661:(e,t,r)=>{r.d(t,{s:()=>s});var i=r(39020);class s{constructor(){this._observers=[]}observe(e){return this._observers.includes(e)||this._observers.push(e),new i.X(this._observers,e)}notify(){const e=this._observers.slice();for(let t=0;t<e.length;++t){const r=e[t];r.onInvalidated(),r.onCommitted()}}}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>l}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=s[r],{getter:n,setter:o,multiplier:l}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*l)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function l(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(67676),o=r(35454),l=r(96674),a=r(67900),d=r(20941),u=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556);const f=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=f.jsonValues.slice();(0,n.e$)(y,"orthometric");const m=(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 g=i=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new d.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.$C)(e)||m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({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 r=(0,a.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,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 i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],g);const _=g},10608:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ee});var i=r(43697),s=r(51773),n=r(3172),o=r(20102),l=r(22974),a=r(92604),d=r(70586),u=r(16453),p=r(78286),c=r(95330),h=r(17452),f=r(5600),y=r(75215),m=r(71715),g=r(52011),v=r(30556),_=r(87085),b=r(54295),w=r(17287),C=r(38009),S=r(16859),I=r(72965),x=r(32271),T=r(36030),j=r(96674);r(67676);let E=class extends j.wq{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i._)([(0,f.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],E.prototype,"field",void 0),(0,i._)([(0,f.Cb)({readOnly:!0,nonNullable:!0,json:{read:!1}})],E.prototype,"type",void 0),E=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudFilter")],E);const F=E;var R;let O=R=class extends F{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new R({field:this.field,requiredClearBits:(0,l.d9)(this.requiredClearBits),requiredSetBits:(0,l.d9)(this.requiredSetBits)})}};(0,i._)([(0,f.Cb)({type:[y.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],O.prototype,"requiredClearBits",void 0),(0,i._)([(0,f.Cb)({type:[y.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],O.prototype,"requiredSetBits",void 0),(0,i._)([(0,T.J)({pointCloudBitfieldFilter:"bitfield"})],O.prototype,"type",void 0),O=R=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],O);const A=O;var D;let M=D=class extends F{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new D({field:this.field,includedReturns:(0,l.d9)(this.includedReturns)})}};(0,i._)([(0,f.Cb)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],M.prototype,"includedReturns",void 0),(0,i._)([(0,T.J)({pointCloudReturnFilter:"return"})],M.prototype,"type",void 0),M=D=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],M);const V=M;var Z;let P=Z=class extends F{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new Z({field:this.field,mode:this.mode,values:(0,l.d9)(this.values)})}};(0,i._)([(0,f.Cb)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],P.prototype,"mode",void 0),(0,i._)([(0,T.J)({pointCloudValueFilter:"value"})],P.prototype,"type",void 0),(0,i._)([(0,f.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],P.prototype,"values",void 0),P=Z=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudValueFilter")],P);const N={key:"type",base:F,typeMap:{value:P,bitfield:A,return:V}};var q,U=r(21506),L=r(1231),k=r(53518),B=r(11223),K=r(23030),z=r(25848);let $=q=class extends z.Z{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new q({...this.cloneProperties(),field:(0,l.d9)(this.field)})}};(0,i._)([(0,T.J)({pointCloudRGBRenderer:"point-cloud-rgb"})],$.prototype,"type",void 0),(0,i._)([(0,f.Cb)({type:String,json:{write:!0}})],$.prototype,"field",void 0),$=q=(0,i._)([(0,g.j)("esri.renderers.PointCloudRGBRenderer")],$);const H=$;var J=r(14008),Y=r(46329);const G={key:"type",base:z.Z,typeMap:{"point-cloud-class-breaks":K.Z,"point-cloud-rgb":H,"point-cloud-stretch":J.Z,"point-cloud-unique-value":Y.Z},errorContext:"renderer"};var W=r(32163);const Q=(0,k.v)();let X=class extends((0,x.Vt)((0,w.Y)((0,C.q)((0,S.I)((0,I.M)((0,u.R)((0,b.V)(_.Z)))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t&&t.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map((e=>{const t=new L.Z;return"FieldTypeInteger"===e.type&&((e=(0,l.d9)(e)).type="esriFieldTypeInteger"),t.read(e,r),t})):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map((e=>new L.Z({name:e.name,type:"ELEVATION"===e.name?"double":"integer"}))):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,r,i){(0,p.RB)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=(0,d.pC)(e)?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.r9).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,W.eZ)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new B.Z({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new B.Z({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new o.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new o.Z("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.v_)(this.parsedUrl.path,`./statistics/${e.key}`);return(0,n.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new o.Z("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(x.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(x.xp.SAVE,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new o.Z("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some((t=>t.name===e))}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&a.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&a.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers do not support featureExpressionInfo"))}};(0,i._)([(0,f.Cb)({type:["PointCloudLayer"]})],X.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.Cb)(U.C_)],X.prototype,"popupEnabled",void 0),(0,i._)([(0,f.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),(0,i._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],X.prototype,"defaultPopupTemplate",null),(0,i._)([(0,f.Cb)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],X.prototype,"opacity",void 0),(0,i._)([(0,f.Cb)({type:["show","hide"]})],X.prototype,"listMode",void 0),(0,i._)([(0,f.Cb)({types:[N],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],X.prototype,"filters",void 0),(0,i._)([(0,f.Cb)({type:[L.Z]})],X.prototype,"fields",void 0),(0,i._)([(0,f.Cb)(Q.fieldsIndex)],X.prototype,"fieldsIndex",void 0),(0,i._)([(0,m.r)("service","fields",["fields","attributeStorageInfo"])],X.prototype,"readServiceFields",null),(0,i._)([(0,f.Cb)(Q.outFields)],X.prototype,"outFields",void 0),(0,i._)([(0,f.Cb)({readOnly:!0})],X.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,f.Cb)(U.PV)],X.prototype,"elevationInfo",null),(0,i._)([(0,f.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],X.prototype,"path",void 0),(0,i._)([(0,f.Cb)(U.rn)],X.prototype,"legendEnabled",void 0),(0,i._)([(0,f.Cb)({types:G,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:G},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],X.prototype,"renderer",void 0),(0,i._)([(0,v.c)("renderer")],X.prototype,"writeRenderer",null),(0,i._)([(0,f.Cb)({json:{read:!1},readOnly:!0})],X.prototype,"type",void 0),X=(0,i._)([(0,g.j)("esri.layers.PointCloudLayer")],X);const ee=X},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(67676),r(75215),r(52011));const o=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,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>d});var i=r(43697),s=r(92604),n=r(70586),o=r(5600),l=(r(67676),r(75215),r(52011)),a=r(66677);const d=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((0,n.pC)(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,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(40330),n=r(3172),o=r(66643),l=r(20102),a=r(92604),d=r(70586),u=r(95330),p=r(17452),c=r(5600),h=(r(67676),r(75215),r(71715)),f=r(52011),y=r(30556),m=r(65587),g=r(15235),v=r(86082);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem=(0,d.SC)(this.portalItem)}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await Promise.all([r.e(4547),r.e(9300),r.e(661)]).then(r.bind(r,18062));return(0,u.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.D_)(e)||a.Z.getLogger(this.declaredClass).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 _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,(0,d.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,l=m.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(i))return l.user;const a=`${i}/community/self`,u=(0,d.pC)(e)?e.signal:null,c=await(0,o.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||m.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.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,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},32271:(e,t,r)=>{r.d(t,{xp:()=>N,Vt:()=>O});var i=r(43697),s=r(3172),n=r(20102),o=(r(80442),r(92604)),l=r(70586),a=r(95330),d=r(17452),u=r(5600),p=(r(67676),r(75215),r(71715)),c=r(52011),h=r(30556),f=r(65845),y=r(6570),m=r(79235),g=r(82971),v=r(66677),_=r(21506),b=r(61064),w=r(65587),C=r(15235),S=r(66643),I=r(41123),x=r(97873);async function T(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),o=new Set,l=[];s.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),s.has(n.resource.path)||o.has(n.resource.path)){const{resource:t,content:i,finish:s,error:o}=n,a=(0,x.getSiblingOfSameTypeI)(t,(0,I.D)());e.paths.push(a.path),l.push(j({resource:a,content:i,compress:n.compress,finish:s,error:o},r))}else e.paths.push(n.resource.path),l.push(E(n,r)),o.add(n.resource.path);for(const i of t.resources.toAdd)l.push(j(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))})),0===l.length)return;const d=await(0,a.as)(l);(0,a.k_)(r);const u=d.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function j(e,t){const r={...(0,l.pC)(t)?t:{},compress:e.compress},i=await(0,S.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error&&e.error(i.error),i.error;e.finish&&e.finish(e.resource)}async function E(e,t){const r=await(0,S.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error(r.error),r.error;e.finish(e.resource)}const F="esri.layers.mixins.SceneService",R=o.Z.getLogger(F),O=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case N.SAVE:return this._save(t);case N.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,s=this._readSpatialReference(t);return null==s||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<A))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,v.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,v.Qc)(this.url);(0,l.pC)(e)&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,v.ld)(i)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:R});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,v.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,d.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,b.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,R,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<A||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<A)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,{origin:"service",url:this.parsedUrl}),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),this.validateLayer(t)}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===M.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=C.default.from(e);i||(R.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const s=i.portal||w.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=Z,i.portal=s;const o={origin:"portal-item",url:null,messages:[],portal:s,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},l={layers:[this.write({},o)]};return await Promise.all(o.resources?.pendingOperations??[]),await this._validateAgainstJSONSchema(l,o,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,M.newItem),await s._signIn(),await(s.user?.addItem({item:i,folder:r&&r.folder,data:l})),await T(this.resourceReferences,o,null),this.portalItem=i,(0,f.D)(o),o.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw R.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==Z)throw R.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+Z),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${Z}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,d.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||w.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources?.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,M.existingItem),await this.portalItem.update({data:i}),await T(this.resourceReferences,r,null),(0,f.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,i){let s=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];if(i&&i.validationOptions?.ignoreUnsupported&&(s=s.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),i.validationOptions?.enabled||D){const t=(await r.e(7572).then(r.bind(r,87572))).validate(e,i.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(R.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===i.validationOptions?.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(s);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(s.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}};return(0,i._)([(0,u.Cb)(_.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,p.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,p.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,p.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,p.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(_.HQ)],t.prototype,"url",null),(0,i._)([(0,h.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(F)],t),t},A=-1e38,D=!1;var M,V;(V=M||(M={}))[V.existingItem=0]="existingItem",V[V.newItem=1]="newItem";const Z="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var N;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(N||(N={}))},99514:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function n(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const o of e){const e=o&&o.name;if(e){const a=l(e);this._fieldsMap.set(e,o),this._fieldsMap.set(a,o),t.push(a),"date"===(r=o).type||"esriFieldTypeDate"===r.type?(this.dateFields.push(o),this._dateFieldsSet.add(o)):(0,i.H7)(o)&&(this._numericFieldsSet.add(o),this.numericFields.push(o)),s(o)||n(o)||(o.editable=null==o.editable||!!o.editable,o.nullable=null==o.nullable||!!o.nullable)}}var r;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||n(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(l(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function l(e){return e.toLowerCase().trim()}},61064:(e,t,r)=>{r.d(t,{T:()=>o});var i=r(3172),s=r(20102),n=r(70586);async function o(e,t,r,o,l,a){let d=null;if((0,n.pC)(r)){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(s,{query:{f:"json",token:o},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){(0,n.pC)(l)&&l.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),d=e}}if(!t)return null;const u=`${e}/nodes/`,p=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(p,{query:{f:"json",token:o},responseType:"json",signal:a})).data,urlPrefix:u}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:d,nodeError:e,url:p})}}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function l(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>h,fetchResources:()=>l,getSiblingOfSameType:()=>f,getSiblingOfSameTypeI:()=>y,removeAllResources:()=>u,removeResource:()=>d,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),s=r(20102),n=r(70586),o=r(17452);async function l(e,t={},r){await e.load(r);const i=(0,o.v_)(e.itemUrl,"resources"),{start:s=1,num:l=10,sortOrder:a="asc",sortField:d="created"}=t,u={query:{start:s,num:l,sortOrder:a,sortField:d,token:e.apiKey},signal:(0,n.U2)(r,"signal")},p=await e.portal._request(i,u);return{total:p.total,nextStart:p.nextStart,resources:p.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const l=e.portalItem;await l.load(i);const a=(0,o.v_)(l.userItemUrl,"add"===t?"addResources":"updateResources"),[d,u]=p(e.path),c=await h(r),f=new FormData;return d&&"."!==d&&f.append("resourcesPrefix",d),(0,n.pC)(i)&&i.compress&&f.append("compress","true"),f.append("fileName",u),f.append("file",c,u),f.append("f","json"),(0,n.pC)(i)&&i.access&&f.append("access",i.access),await l.portal._request(a,{method:"post",body:f,signal:(0,n.U2)(i,"signal")}),e}async function d(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal._request(i,{method:"post",query:{resource:t.path},signal:(0,n.U2)(r,"signal")}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal._request(r,{method:"post",query:{deleteAll:!0},signal:(0,n.U2)(t,"signal")})}function p(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return(0,n.Wi)(t)?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=p(t);return[i,s,r]}async function h(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function f(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}function y(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}},23030:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(22974),o=r(5600),l=r(75215),a=r(36030),d=r(52011),u=r(25848),p=r(66338),c=r(22303),h=r(96674);let f=i=class extends h.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new i({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,n.d9)(this.color)})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"description",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"label",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],f.prototype,"minValue",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],f.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{type:[l.z8],write:!0}})],f.prototype,"color",void 0),f=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],f);const y=f;var m;let g=m=class extends u.Z{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new m({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,n.d9)(this.colorClassBreakInfos),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,a.J)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],g.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:p.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),(0,s._)([(0,o.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[y],json:{write:!0}})],g.prototype,"colorClassBreakInfos",void 0),g=m=(0,s._)([(0,d.j)("esri.renderers.PointCloudClassBreaksRenderer")],g);const v=g},25848:(e,t,r)=>{r.d(t,{Z:()=>I});var i,s=r(43697),n=r(35454),o=r(96674),l=r(22974),a=r(5600),d=(r(75215),r(52011));r(67676);let u=i=class extends o.wq{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new i({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"minValue",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"maxValue",void 0),u=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorModulation")],u);const p=u,c=new n.X({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let h=class extends o.wq{};(0,s._)([(0,a.Cb)({type:c.apiValues,readOnly:!0,nonNullable:!0,json:{type:c.jsonValues,read:!1,write:c.write}})],h.prototype,"type",void 0),h=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],h);const f=h;var y,m=r(36030);let g=y=class extends f{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new y({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,s._)([(0,m.J)({pointCloudFixedSizeAlgorithm:"fixed-size"})],g.prototype,"type",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"useRealWorldSymbolSizes",void 0),g=y=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],g);const v=g;var _;let b=_=class extends f{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new _({scaleFactor:this.scaleFactor})}};(0,s._)([(0,m.J)({pointCloudSplatAlgorithm:"splat"})],b.prototype,"type",void 0),(0,s._)([(0,a.Cb)({type:Number,value:1,nonNullable:!0,json:{write:!0}})],b.prototype,"scaleFactor",void 0),b=_=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],b);const w={key:"type",base:f,typeMap:{"fixed-size":v,splat:b}},C=(0,n.w)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let S=class extends o.wq{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,l.d9)(this.pointSizeAlgorithm),colorModulation:(0,l.d9)(this.colorModulation),pointsPerInch:(0,l.d9)(this.pointsPerInch)}}};(0,s._)([(0,a.Cb)({type:C.apiValues,readOnly:!0,nonNullable:!0,json:{type:C.jsonValues,read:!1,write:C.write}})],S.prototype,"type",void 0),(0,s._)([(0,a.Cb)({types:w,json:{write:!0}})],S.prototype,"pointSizeAlgorithm",void 0),(0,s._)([(0,a.Cb)({type:p,json:{write:!0}})],S.prototype,"colorModulation",void 0),(0,s._)([(0,a.Cb)({json:{write:!0},nonNullable:!0,type:Number})],S.prototype,"pointsPerInch",void 0),S=(0,s._)([(0,d.j)("esri.renderers.PointCloudRenderer")],S),(S||(S={})).fieldTransformTypeKebabDict=new n.X({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"});const I=S},14008:(e,t,r)=>{r.d(t,{Z:()=>h});var i,s=r(43697),n=r(22974),o=r(5600),l=(r(75215),r(36030)),a=r(52011),d=r(25848),u=r(66338),p=r(21849);let c=i=class extends d.Z{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new i({...this.cloneProperties(),field:(0,n.d9)(this.field),fieldTransformType:(0,n.d9)(this.fieldTransformType),stops:(0,n.d9)(this.stops),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,l.J)({pointCloudStretchRenderer:"point-cloud-stretch"})],c.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],c.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:u.I,json:{write:!0}})],c.prototype,"legendOptions",void 0),(0,s._)([(0,o.Cb)({type:d.Z.fieldTransformTypeKebabDict.apiValues,json:{type:d.Z.fieldTransformTypeKebabDict.jsonValues,read:d.Z.fieldTransformTypeKebabDict.read,write:d.Z.fieldTransformTypeKebabDict.write}})],c.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[p.Z],json:{write:!0}})],c.prototype,"stops",void 0),c=i=(0,s._)([(0,a.j)("esri.renderers.PointCloudStretchRenderer")],c);const h=c},46329:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(22974),o=r(5600),l=r(75215),a=r(36030),d=r(52011),u=r(25848),p=r(66338),c=r(22303),h=r(96674);let f=i=class extends h.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new i({description:this.description,label:this.label,values:(0,n.d9)(this.values),color:(0,n.d9)(this.color)})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"description",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"label",void 0),(0,s._)([(0,o.Cb)({type:[String],json:{write:!0}})],f.prototype,"values",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{type:[l.z8],write:!0}})],f.prototype,"color",void 0),f=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],f);const y=f;var m;let g=m=class extends u.Z{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new m({...this.cloneProperties(),field:(0,n.d9)(this.field),fieldTransformType:(0,n.d9)(this.fieldTransformType),colorUniqueValueInfos:(0,n.d9)(this.colorUniqueValueInfos),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,a.J)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],g.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[y],json:{write:!0}})],g.prototype,"colorUniqueValueInfos",void 0),(0,s._)([(0,o.Cb)({type:p.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),g=m=(0,s._)([(0,d.j)("esri.renderers.PointCloudUniqueValueRenderer")],g);const v=g},66338:(e,t,r)=>{r.d(t,{I:()=>a});var i,s=r(43697),n=r(96674),o=r(5600),l=(r(67676),r(75215),r(52011));let a=i=class extends n.wq{constructor(){super(...arguments),this.title=null}clone(){return new i({title:this.title})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),a=i=(0,s._)([(0,l.j)("esri.renderers.support.LegendOptions")],a)},21849:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(22303),o=r(96674),l=r(5600),a=(r(67676),r(75215)),d=r(52011),u=r(30556);let p=i=class extends o.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=e??0}clone(){return new i({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,s._)([(0,l.Cb)({type:n.Z,json:{type:[a.z8],write:!0}})],p.prototype,"color",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"value",void 0),(0,s._)([(0,u.c)("value")],p.prototype,"writeValue",null),p=i=(0,s._)([(0,d.j)("esri.renderers.visualVariables.support.ColorStop")],p);const c=p},32163:(e,t,r)=>{r.d(t,{eZ:()=>p});var i=r(51773),s=r(35671),n=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(63061);const d=["oid","global-id"],u=["oid","global-id","guid"];function p({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:d},u){if(!r)return null;const p=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(f),e}(t??[],i?.ignoreFieldTypes||_).map((t=>new l.Z({fieldName:t.name,isEditable:m(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:a},u);if(!p.length)return null;const c=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:d,fields:r,displayField:e}),y=[new o.Z,new n.Z];return new i.Z({title:c,content:y,fieldInfos:p})}const c=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(y(e.name,t)||r&&e.name===r||d.includes(e.type)||c.some((t=>t.test(e.name))));function f(e,t){return"oid"===e.type?-1:"oid"===t.type?1:v(e)?-1:v(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function y(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:s,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function m(e,t){return e.editable&&!u.includes(e.type)&&!y(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,s.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function v(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const _=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5468,661,7873],{92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),n=r(96674),o=r(70586),l=r(35463),a=r(5600),d=(r(67676),r(75215),r(71715)),u=r(52011),p=r(30556);let c=i=class extends n.wq{constructor(e){super(e),this.end=null,this.start=null}static get allTime(){return h}static get empty(){return f}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=(0,o.pC)(this.start)?this.start.getTime():this.start,r=(0,o.pC)(this.end)?this.end.getTime():this.end,i=(0,o.pC)(e.start)?e.start.getTime():e.start,s=(0,o.pC)(e.end)?e.end.getTime():e.end;return t===i&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,l.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,l.JE)(t,e);return t.getTime()===r.getTime()?r:(0,l.Nm)(r,1,e)}));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,o.R2)(this.start,-1/0,(e=>e.getTime())),r=(0,o.R2)(this.end,1/0,(e=>e.getTime())),s=(0,o.R2)(e.start,-1/0,(e=>e.getTime())),n=(0,o.R2)(e.end,1/0,(e=>e.getTime()));let l,a;if(s>=t&&s<=r?l=s:t>=s&&t<=n&&(l=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:n}=this;return(0,o.pC)(s)&&(r.start=(0,l.Nm)(s,e,t)),(0,o.pC)(n)&&(r.end=(0,l.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=(0,o.pC)(this.start)&&(0,o.pC)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=(0,o.pC)(this.end)&&(0,o.pC)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,d.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,d.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=i=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const h=new c,f=new c({start:void 0,end:void 0}),y=c},2368:(e,t,r)=>{r.d(t,{J:()=>u,j:()=>p});var i=r(43697),s=r(15923),n=(r(80442),r(22974)),o=(r(92604),r(70586)),l=r(31263),a=r(1153),d=r(52011);const u=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,a.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,r=e.store,i={},s=new Map;for(const e in t){const o=t[e],a=r?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const u=this[e];let p=null;p="function"==typeof d?d(u):"reference"===d?u:(0,n.Vo)(u),null!=u&&null==p||(a===l.s3.DEFAULTS?s.set(e,p):i[e]=p)}const d=new(0,Object.getPrototypeOf(this).constructor)(i);if(s.size){const e=(0,a.vw)(d)?.store;if(e)for(const[t,r]of s)e.set(t,r,l.s3.DEFAULTS)}return d}};return t=(0,i._)([(0,d.j)("esri.core.Clonable")],t),t};let p=class extends(u(s.Z)){};p=(0,i._)([(0,d.j)("esri.core.Clonable")],p)},46791:(e,t,r)=>{r.d(t,{Z:()=>R});var i,s=r(43697),n=r(3894),o=r(32448),l=r(22974),a=r(70586),d=r(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,p=r(1654),c=r(5600),h=r(75215),f=r(52421),y=r(52011),m=r(58971),g=r(10661);const v=new d.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),_=()=>{};function b(e){return e?e instanceof F?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,r,i){const s=Math.min(e.length-r,t.length-i);let n=0;for(;n<s&&e[r+n]===t[i+n];)n++;return n}function S(e,t,r,i){t&&t.forEach(((t,s,n)=>{e.push(t),S(e,r.call(i,t,s,n),r,i)}))}const I=new Set,x=new Set,T=new Set,j=new Map;let E=0,F=u=class extends o.Z.EventedAccessor{constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:E++})}static isCollection(e){return null!=e&&e instanceof u}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if((0,m.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,m.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,b(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,m.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._splice(0,this.length)||[];return this._emitAfterChanges(i.REMOVE),e}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...e){(0,m.it)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const r=(0,a.j0)(this._splice(0,this.length)),s=r.length;for(let i=0;i<s;i++)e.call(t,r[i],i,r);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,m.it)(this._observable),this._items.every(e,t)}filter(e,t){let r;return(0,m.it)(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return(0,m.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,m.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,m.it)(this._observable);const r=[];return S(r,this,e,t),new u(r)}forEach(e,t){return(0,m.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,m.it)(this._observable),this._items[e]}getNextIndex(e){(0,m.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,m.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,m.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,m.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,m.it)(this._observable);const r=this._items.map(e,t);return new u({items:r})}reorder(e,t=this.length-1){(0,m.it)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,m.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,m.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,m.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,m.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,m.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,m.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,r=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=r.indexOf(i);if(n>-1){const i=1+C(t,r,e+1,n+1),o=this._splice(n,i);o&&o.length>0&&s.push.apply(s,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),s}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,m.it)(this._observable),this._items.some(e,t)}sort(e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...r){(0,m.it)(this._observable);const s=(t?i.REMOVE:0)|(r.length?i.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...e){return(0,m.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,s=this.itemType;let n,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,p.Os)((()=>this._dispatchChange()))),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=v.acquire();t.target=this,t.cancellable=!0;for(let r=0,s=o.length;r<s;r++)n=o[r],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(r,1),i.splice(e,0,n),e+=1,r-=1,s-=1);v.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=v.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let r=0;r<t;r++)e.reset(o[r]),this.emit("after-remove",e);v.release(e)}}if(r&&r.length){if(s){const e=[];for(const t of r){const r=s.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),o=e===this.length;if(t||n){const s=v.acquire();s.target=this,s.cancellable=!0;const l=v.acquire();l.target=this,l.cancellable=!1;for(const a of r)t?(s.reset(a),this.emit("before-add",s),s.defaultPrevented||(o?i.push(a):i.splice(e++,0,a),this._set("length",i.length),n&&(l.reset(a),this.emit("after-add",l)))):(o?i.push(a):i.splice(e++,0,a),this._set("length",i.length),l.reset(a),this.emit("after-add",l));v.release(l),v.release(s)}else{if(o)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}return(r&&r.length||o&&o.length)&&this._notifyChangeEvent(r,o),o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=v.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,v.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=v.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),v.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;I.clear(),x.clear(),T.clear();for(const{added:t,removed:r}of e){if(t)if(0===T.size&&0===x.size)for(const e of t)I.add(e);else for(const e of t)x.has(e)?(T.add(e),x.delete(e)):T.has(e)||I.add(e);if(r)if(0===T.size&&0===I.size)for(const e of r)x.add(e);else for(const e of r)I.has(e)?I.delete(e):(T.delete(e),x.add(e))}const r=n.Z.acquire();I.forEach((e=>{r.push(e)}));const i=n.Z.acquire();x.forEach((e=>{i.push(e)}));const s=this._items,o=t.items,l=n.Z.acquire();if(T.forEach((e=>{o.indexOf(e)!==s.indexOf(e)&&l.push(e)})),t.listeners&&(r.length||i.length||l.length)){const e={target:this,added:r,removed:i,moved:l},s=t.listeners.length;for(let r=0;r<s;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}n.Z.release(r),n.Z.release(i),n.Z.release(l)}I.clear(),x.clear(),T.clear()}};F.ofType=e=>{if(!e)return u;if(j.has(e))return j.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const i=e.typeMap[r].prototype.declaredClass;t?t+=` | ${i}`:t=i}let r=class extends u{};return(0,s._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,h.se)(e):(0,h.N7)(e)})],r.prototype,"itemType",void 0),r=(0,s._)([(0,y.j)(`esri.core.Collection<${t}>`)],r),j.set(e,r),r},(0,s._)([(0,c.Cb)()],F.prototype,"length",void 0),(0,s._)([(0,c.Cb)()],F.prototype,"items",null),F=u=(0,s._)([(0,y.j)("esri.core.Collection")],F);const R=F},52421:(e,t,r)=>{function i(e){return(t,r)=>{t[r]=e}}r.d(t,{c:()=>i})},65845:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},10661:(e,t,r)=>{r.d(t,{s:()=>s});var i=r(39020);class s{constructor(){this._observers=[]}observe(e){return this._observers.includes(e)||this._observers.push(e),new i.X(this._observers,e)}notify(){const e=this._observers.slice();for(let t=0;t<e.length;++t){const r=e[t];r.onInvalidated(),r.onCommitted()}}}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>l}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=s[r],{getter:n,setter:o,multiplier:l}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*l)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function l(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(67676),o=r(35454),l=r(96674),a=r(67900),d=r(20941),u=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556);const f=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=f.jsonValues.slice();(0,n.e$)(y,"orthometric");const m=(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 g=i=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new d.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.$C)(e)||m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({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 r=(0,a.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,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 i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],g);const _=g},10608:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ee});var i=r(43697),s=r(51773),n=r(3172),o=r(20102),l=r(22974),a=r(92604),d=r(70586),u=r(16453),p=r(78286),c=r(95330),h=r(17452),f=r(5600),y=r(75215),m=r(71715),g=r(52011),v=r(30556),_=r(87085),b=r(54295),w=r(17287),C=r(38009),S=r(16859),I=r(72965),x=r(32271),T=r(36030),j=r(96674);r(67676);let E=class extends j.wq{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i._)([(0,f.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],E.prototype,"field",void 0),(0,i._)([(0,f.Cb)({readOnly:!0,nonNullable:!0,json:{read:!1}})],E.prototype,"type",void 0),E=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudFilter")],E);const F=E;var R;let O=R=class extends F{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new R({field:this.field,requiredClearBits:(0,l.d9)(this.requiredClearBits),requiredSetBits:(0,l.d9)(this.requiredSetBits)})}};(0,i._)([(0,f.Cb)({type:[y.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],O.prototype,"requiredClearBits",void 0),(0,i._)([(0,f.Cb)({type:[y.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],O.prototype,"requiredSetBits",void 0),(0,i._)([(0,T.J)({pointCloudBitfieldFilter:"bitfield"})],O.prototype,"type",void 0),O=R=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],O);const A=O;var M;let D=M=class extends F{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new M({field:this.field,includedReturns:(0,l.d9)(this.includedReturns)})}};(0,i._)([(0,f.Cb)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"includedReturns",void 0),(0,i._)([(0,T.J)({pointCloudReturnFilter:"return"})],D.prototype,"type",void 0),D=M=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],D);const V=D;var Z;let P=Z=class extends F{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new Z({field:this.field,mode:this.mode,values:(0,l.d9)(this.values)})}};(0,i._)([(0,f.Cb)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],P.prototype,"mode",void 0),(0,i._)([(0,T.J)({pointCloudValueFilter:"value"})],P.prototype,"type",void 0),(0,i._)([(0,f.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],P.prototype,"values",void 0),P=Z=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudValueFilter")],P);const N={key:"type",base:F,typeMap:{value:P,bitfield:A,return:V}};var q,U=r(21506),L=r(1231),k=r(53518),B=r(11223),K=r(23030),z=r(25848);let $=q=class extends z.Z{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new q({...this.cloneProperties(),field:(0,l.d9)(this.field)})}};(0,i._)([(0,T.J)({pointCloudRGBRenderer:"point-cloud-rgb"})],$.prototype,"type",void 0),(0,i._)([(0,f.Cb)({type:String,json:{write:!0}})],$.prototype,"field",void 0),$=q=(0,i._)([(0,g.j)("esri.renderers.PointCloudRGBRenderer")],$);const H=$;var J=r(14008),Y=r(46329);const G={key:"type",base:z.Z,typeMap:{"point-cloud-class-breaks":K.Z,"point-cloud-rgb":H,"point-cloud-stretch":J.Z,"point-cloud-unique-value":Y.Z},errorContext:"renderer"};var W=r(32163);const Q=(0,k.v)();let X=class extends((0,x.Vt)((0,w.Y)((0,C.q)((0,S.I)((0,I.M)((0,u.R)((0,b.V)(_.Z)))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t&&t.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map((e=>{const t=new L.Z;return"FieldTypeInteger"===e.type&&((e=(0,l.d9)(e)).type="esriFieldTypeInteger"),t.read(e,r),t})):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map((e=>new L.Z({name:e.name,type:"ELEVATION"===e.name?"double":"integer"}))):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,r,i){(0,p.RB)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=(0,d.pC)(e)?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.r9).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,W.eZ)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new B.Z({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new B.Z({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new o.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new o.Z("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.v_)(this.parsedUrl.path,`./statistics/${e.key}`);return(0,n.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new o.Z("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(x.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(x.xp.SAVE,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new o.Z("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some((t=>t.name===e))}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&a.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&a.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers do not support featureExpressionInfo"))}};(0,i._)([(0,f.Cb)({type:["PointCloudLayer"]})],X.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.Cb)(U.C_)],X.prototype,"popupEnabled",void 0),(0,i._)([(0,f.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),(0,i._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],X.prototype,"defaultPopupTemplate",null),(0,i._)([(0,f.Cb)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],X.prototype,"opacity",void 0),(0,i._)([(0,f.Cb)({type:["show","hide"]})],X.prototype,"listMode",void 0),(0,i._)([(0,f.Cb)({types:[N],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],X.prototype,"filters",void 0),(0,i._)([(0,f.Cb)({type:[L.Z]})],X.prototype,"fields",void 0),(0,i._)([(0,f.Cb)(Q.fieldsIndex)],X.prototype,"fieldsIndex",void 0),(0,i._)([(0,m.r)("service","fields",["fields","attributeStorageInfo"])],X.prototype,"readServiceFields",null),(0,i._)([(0,f.Cb)(Q.outFields)],X.prototype,"outFields",void 0),(0,i._)([(0,f.Cb)({readOnly:!0})],X.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,f.Cb)(U.PV)],X.prototype,"elevationInfo",null),(0,i._)([(0,f.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],X.prototype,"path",void 0),(0,i._)([(0,f.Cb)(U.rn)],X.prototype,"legendEnabled",void 0),(0,i._)([(0,f.Cb)({types:G,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:G},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],X.prototype,"renderer",void 0),(0,i._)([(0,v.c)("renderer")],X.prototype,"writeRenderer",null),(0,i._)([(0,f.Cb)({json:{read:!1},readOnly:!0})],X.prototype,"type",void 0),X=(0,i._)([(0,g.j)("esri.layers.PointCloudLayer")],X);const ee=X},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(67676),r(75215),r(52011));const o=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,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>d});var i=r(43697),s=r(92604),n=r(70586),o=r(5600),l=(r(67676),r(75215),r(52011)),a=r(66677);const d=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((0,n.pC)(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,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(40330),n=r(3172),o=r(66643),l=r(20102),a=r(92604),d=r(70586),u=r(95330),p=r(17452),c=r(5600),h=(r(67676),r(75215),r(71715)),f=r(52011),y=r(30556),m=r(65587),g=r(15235),v=r(86082);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem=(0,d.SC)(this.portalItem)}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await Promise.all([r.e(4547),r.e(9300),r.e(661)]).then(r.bind(r,18062));return(0,u.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.D_)(e)||a.Z.getLogger(this.declaredClass).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 _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,(0,d.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,l=m.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(i))return l.user;const a=`${i}/community/self`,u=(0,d.pC)(e)?e.signal:null,c=await(0,o.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||m.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.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,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},32271:(e,t,r)=>{r.d(t,{xp:()=>N,Vt:()=>O});var i=r(43697),s=r(3172),n=r(20102),o=(r(80442),r(92604)),l=r(70586),a=r(95330),d=r(17452),u=r(5600),p=(r(67676),r(75215),r(71715)),c=r(52011),h=r(30556),f=r(65845),y=r(6570),m=r(79235),g=r(82971),v=r(66677),_=r(21506),b=r(61064),w=r(65587),C=r(15235),S=r(66643),I=r(41123),x=r(97873);async function T(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),o=new Set,l=[];s.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),s.has(n.resource.path)||o.has(n.resource.path)){const{resource:t,content:i,finish:s,error:o}=n,a=(0,x.getSiblingOfSameTypeI)(t,(0,I.D)());e.paths.push(a.path),l.push(j({resource:a,content:i,compress:n.compress,finish:s,error:o},r))}else e.paths.push(n.resource.path),l.push(E(n,r)),o.add(n.resource.path);for(const i of t.resources.toAdd)l.push(j(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))})),0===l.length)return;const d=await(0,a.as)(l);(0,a.k_)(r);const u=d.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function j(e,t){const r={...(0,l.pC)(t)?t:{},compress:e.compress},i=await(0,S.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error&&e.error(i.error),i.error;e.finish&&e.finish(e.resource)}async function E(e,t){const r=await(0,S.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error(r.error),r.error;e.finish(e.resource)}const F="esri.layers.mixins.SceneService",R=o.Z.getLogger(F),O=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case N.SAVE:return this._save(t);case N.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,s=this._readSpatialReference(t);return null==s||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<A))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,v.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,v.Qc)(this.url);(0,l.pC)(e)&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,v.ld)(i)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:R});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,v.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,d.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,b.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,R,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<A||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<A)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,{origin:"service",url:this.parsedUrl}),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),this.validateLayer(t)}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===D.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=C.default.from(e);i||(R.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const s=i.portal||w.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=Z,i.portal=s;const o={origin:"portal-item",url:null,messages:[],portal:s,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},l={layers:[this.write({},o)]};return await Promise.all(o.resources?.pendingOperations??[]),await this._validateAgainstJSONSchema(l,o,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,D.newItem),await s._signIn(),await(s.user?.addItem({item:i,folder:r&&r.folder,data:l})),await T(this.resourceReferences,o,null),this.portalItem=i,(0,f.D)(o),o.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw R.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==Z)throw R.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+Z),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${Z}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,d.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||w.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources?.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,D.existingItem),await this.portalItem.update({data:i}),await T(this.resourceReferences,r,null),(0,f.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,i){let s=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];if(i&&i.validationOptions?.ignoreUnsupported&&(s=s.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),i.validationOptions?.enabled||M){const t=(await r.e(7572).then(r.bind(r,87572))).validate(e,i.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(R.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===i.validationOptions?.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(s);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(s.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}};return(0,i._)([(0,u.Cb)(_.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,p.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,p.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,p.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,p.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(_.HQ)],t.prototype,"url",null),(0,i._)([(0,h.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(F)],t),t},A=-1e38,M=!1;var D,V;(V=D||(D={}))[V.existingItem=0]="existingItem",V[V.newItem=1]="newItem";const Z="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var N;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(N||(N={}))},99514:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function n(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const o of e){const e=o&&o.name;if(e){const d=l(e),u=a(e);this._fieldsMap.set(e,o),this._fieldsMap.set(d,o),this._normalizedFieldsMap.set(u,o),t.push(d),"date"===(r=o).type||"esriFieldTypeDate"===r.type?(this.dateFields.push(o),this._dateFieldsSet.add(o)):(0,i.H7)(o)&&(this._numericFieldsSet.add(o),this.numericFields.push(o)),s(o)||n(o)||(o.editable=null==o.editable||!!o.editable,o.nullable=null==o.nullable||!!o.nullable)}}var r;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||n(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(l(e))??this._normalizedFieldsMap.get(a(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function l(e){return e.trim().toLowerCase()}function a(e){return(0,i.q6)(e).toLowerCase()}},61064:(e,t,r)=>{r.d(t,{T:()=>o});var i=r(3172),s=r(20102),n=r(70586);async function o(e,t,r,o,l,a){let d=null;if((0,n.pC)(r)){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(s,{query:{f:"json",token:o},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){(0,n.pC)(l)&&l.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),d=e}}if(!t)return null;const u=`${e}/nodes/`,p=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(p,{query:{f:"json",token:o},responseType:"json",signal:a})).data,urlPrefix:u}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:d,nodeError:e,url:p})}}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function l(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>h,fetchResources:()=>l,getSiblingOfSameType:()=>f,getSiblingOfSameTypeI:()=>y,removeAllResources:()=>u,removeResource:()=>d,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),s=r(20102),n=r(70586),o=r(17452);async function l(e,t={},r){await e.load(r);const i=(0,o.v_)(e.itemUrl,"resources"),{start:s=1,num:l=10,sortOrder:a="asc",sortField:d="created"}=t,u={query:{start:s,num:l,sortOrder:a,sortField:d,token:e.apiKey},signal:(0,n.U2)(r,"signal")},p=await e.portal._request(i,u);return{total:p.total,nextStart:p.nextStart,resources:p.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const l=e.portalItem;await l.load(i);const a=(0,o.v_)(l.userItemUrl,"add"===t?"addResources":"updateResources"),[d,u]=p(e.path),c=await h(r),f=new FormData;return d&&"."!==d&&f.append("resourcesPrefix",d),(0,n.pC)(i)&&i.compress&&f.append("compress","true"),f.append("fileName",u),f.append("file",c,u),f.append("f","json"),(0,n.pC)(i)&&i.access&&f.append("access",i.access),await l.portal._request(a,{method:"post",body:f,signal:(0,n.U2)(i,"signal")}),e}async function d(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal._request(i,{method:"post",query:{resource:t.path},signal:(0,n.U2)(r,"signal")}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal._request(r,{method:"post",query:{deleteAll:!0},signal:(0,n.U2)(t,"signal")})}function p(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return(0,n.Wi)(t)?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=p(t);return[i,s,r]}async function h(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function f(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}function y(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}},23030:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(22974),o=r(5600),l=r(75215),a=r(36030),d=r(52011),u=r(25848),p=r(66338),c=r(22303),h=r(96674);let f=i=class extends h.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new i({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,n.d9)(this.color)})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"description",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"label",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],f.prototype,"minValue",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],f.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{type:[l.z8],write:!0}})],f.prototype,"color",void 0),f=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],f);const y=f;var m;let g=m=class extends u.Z{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new m({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,n.d9)(this.colorClassBreakInfos),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,a.J)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],g.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:p.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),(0,s._)([(0,o.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[y],json:{write:!0}})],g.prototype,"colorClassBreakInfos",void 0),g=m=(0,s._)([(0,d.j)("esri.renderers.PointCloudClassBreaksRenderer")],g);const v=g},25848:(e,t,r)=>{r.d(t,{Z:()=>I});var i,s=r(43697),n=r(35454),o=r(96674),l=r(22974),a=r(5600),d=(r(75215),r(52011));r(67676);let u=i=class extends o.wq{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new i({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"minValue",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"maxValue",void 0),u=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorModulation")],u);const p=u,c=new n.X({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let h=class extends o.wq{};(0,s._)([(0,a.Cb)({type:c.apiValues,readOnly:!0,nonNullable:!0,json:{type:c.jsonValues,read:!1,write:c.write}})],h.prototype,"type",void 0),h=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],h);const f=h;var y,m=r(36030);let g=y=class extends f{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new y({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,s._)([(0,m.J)({pointCloudFixedSizeAlgorithm:"fixed-size"})],g.prototype,"type",void 0),(0,s._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"useRealWorldSymbolSizes",void 0),g=y=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],g);const v=g;var _;let b=_=class extends f{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new _({scaleFactor:this.scaleFactor})}};(0,s._)([(0,m.J)({pointCloudSplatAlgorithm:"splat"})],b.prototype,"type",void 0),(0,s._)([(0,a.Cb)({type:Number,value:1,nonNullable:!0,json:{write:!0}})],b.prototype,"scaleFactor",void 0),b=_=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],b);const w={key:"type",base:f,typeMap:{"fixed-size":v,splat:b}},C=(0,n.w)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let S=class extends o.wq{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,l.d9)(this.pointSizeAlgorithm),colorModulation:(0,l.d9)(this.colorModulation),pointsPerInch:(0,l.d9)(this.pointsPerInch)}}};(0,s._)([(0,a.Cb)({type:C.apiValues,readOnly:!0,nonNullable:!0,json:{type:C.jsonValues,read:!1,write:C.write}})],S.prototype,"type",void 0),(0,s._)([(0,a.Cb)({types:w,json:{write:!0}})],S.prototype,"pointSizeAlgorithm",void 0),(0,s._)([(0,a.Cb)({type:p,json:{write:!0}})],S.prototype,"colorModulation",void 0),(0,s._)([(0,a.Cb)({json:{write:!0},nonNullable:!0,type:Number})],S.prototype,"pointsPerInch",void 0),S=(0,s._)([(0,d.j)("esri.renderers.PointCloudRenderer")],S),(S||(S={})).fieldTransformTypeKebabDict=new n.X({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"});const I=S},14008:(e,t,r)=>{r.d(t,{Z:()=>h});var i,s=r(43697),n=r(22974),o=r(5600),l=(r(75215),r(36030)),a=r(52011),d=r(25848),u=r(66338),p=r(21849);let c=i=class extends d.Z{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new i({...this.cloneProperties(),field:(0,n.d9)(this.field),fieldTransformType:(0,n.d9)(this.fieldTransformType),stops:(0,n.d9)(this.stops),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,l.J)({pointCloudStretchRenderer:"point-cloud-stretch"})],c.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],c.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:u.I,json:{write:!0}})],c.prototype,"legendOptions",void 0),(0,s._)([(0,o.Cb)({type:d.Z.fieldTransformTypeKebabDict.apiValues,json:{type:d.Z.fieldTransformTypeKebabDict.jsonValues,read:d.Z.fieldTransformTypeKebabDict.read,write:d.Z.fieldTransformTypeKebabDict.write}})],c.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[p.Z],json:{write:!0}})],c.prototype,"stops",void 0),c=i=(0,s._)([(0,a.j)("esri.renderers.PointCloudStretchRenderer")],c);const h=c},46329:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(22974),o=r(5600),l=r(75215),a=r(36030),d=r(52011),u=r(25848),p=r(66338),c=r(22303),h=r(96674);let f=i=class extends h.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new i({description:this.description,label:this.label,values:(0,n.d9)(this.values),color:(0,n.d9)(this.color)})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"description",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],f.prototype,"label",void 0),(0,s._)([(0,o.Cb)({type:[String],json:{write:!0}})],f.prototype,"values",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{type:[l.z8],write:!0}})],f.prototype,"color",void 0),f=i=(0,s._)([(0,d.j)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],f);const y=f;var m;let g=m=class extends u.Z{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new m({...this.cloneProperties(),field:(0,n.d9)(this.field),fieldTransformType:(0,n.d9)(this.fieldTransformType),colorUniqueValueInfos:(0,n.d9)(this.colorUniqueValueInfos),legendOptions:(0,n.d9)(this.legendOptions)})}};(0,s._)([(0,a.J)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],g.prototype,"type",void 0),(0,s._)([(0,o.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,s._)([(0,o.Cb)({type:[y],json:{write:!0}})],g.prototype,"colorUniqueValueInfos",void 0),(0,s._)([(0,o.Cb)({type:p.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),g=m=(0,s._)([(0,d.j)("esri.renderers.PointCloudUniqueValueRenderer")],g);const v=g},66338:(e,t,r)=>{r.d(t,{I:()=>a});var i,s=r(43697),n=r(96674),o=r(5600),l=(r(67676),r(75215),r(52011));let a=i=class extends n.wq{constructor(){super(...arguments),this.title=null}clone(){return new i({title:this.title})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),a=i=(0,s._)([(0,l.j)("esri.renderers.support.LegendOptions")],a)},21849:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(22303),o=r(96674),l=r(5600),a=(r(67676),r(75215)),d=r(52011),u=r(30556);let p=i=class extends o.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=e??0}clone(){return new i({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,s._)([(0,l.Cb)({type:n.Z,json:{type:[a.z8],write:!0}})],p.prototype,"color",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"value",void 0),(0,s._)([(0,u.c)("value")],p.prototype,"writeValue",null),p=i=(0,s._)([(0,d.j)("esri.renderers.visualVariables.support.ColorStop")],p);const c=p},32163:(e,t,r)=>{r.d(t,{eZ:()=>p});var i=r(51773),s=r(35671),n=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(63061);const d=["oid","global-id"],u=["oid","global-id","guid"];function p({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:d},u){if(!r)return null;const p=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(f),e}(t??[],i?.ignoreFieldTypes||_).map((t=>new l.Z({fieldName:t.name,isEditable:m(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:a},u);if(!p.length)return null;const c=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:d,fields:r,displayField:e}),y=[new o.Z,new n.Z];return new i.Z({title:c,content:y,fieldInfos:p})}const c=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(y(e.name,t)||r&&e.name===r||d.includes(e.type)||c.some((t=>t.test(e.name))));function f(e,t){return"oid"===e.type?-1:"oid"===t.type?1:v(e)?-1:v(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function y(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:s,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function m(e,t){return e.editable&&!u.includes(e.type)&&!y(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,s.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function v(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const _=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7845],{66643:(e,t,n)=>{n.d(t,{Ed:()=>u,UI:()=>p,mt:()=>h,q6:()=>y,vr:()=>f});var s=n(43697),r=n(15923),i=n(70586),o=n(95330),a=n(5600),l=(n(67676),n(75215),n(52011));function u(e,t,n){return(0,o.as)(e.map(((e,s)=>t.apply(n,[e,s]))))}async function p(e,t,n){return(await(0,o.as)(e.map(((e,s)=>t.apply(n,[e,s]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function y(e){if((0,i.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function h(e){try{return c(await e)}catch(e){return(0,o.r9)(e),d(e)}}function f(e,t){return new m(e,t)}let m=class extends r.Z{constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}get value(){return e=this._result,(0,i.pC)(e)&&!0===e.ok?e.value:null;var e}get error(){return e=this._result,(0,i.pC)(e)&&!1===e.ok?e.error:null;var e}get finished(){return(0,i.pC)(this._result)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],m.prototype,"value",null),(0,s._)([(0,a.Cb)()],m.prototype,"error",null),(0,s._)([(0,a.Cb)()],m.prototype,"finished",null),(0,s._)([(0,a.Cb)()],m.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],m)},97845:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var s=n(3172),r=n(66643),i=n(20102),o=n(92604),a=n(70586),l=n(95330),u=n(33955),p=n(8744),c=n(98732),d=n(57191),y=n(37427),h=n(50245),f=n(92722),m=n(25278),g=n(23095),_=n(99514),b=n(86719),S=n(35671);const w={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class F{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._fieldsIndex=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const n=[];await this._checkProjection(e.spatialReference);let s=null;e.url&&(s=await this._fetch(t?.signal));const r=(0,f.my)(s,{geometryType:e.geometryType}),o=e.fields||r.fields||[],a=null!=e.hasZ?e.hasZ:r.hasZ,l=r.geometryType;let u=e.objectIdField||r.objectIdFieldName||"__OBJECTID";const c=e.spatialReference||p.Zn;let y=e.timeInfo;o===r.fields&&r.unknownFields.length>0&&n.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:r.unknownFields}});let g=new _.Z(o).get(u);g?("esriFieldTypeString"!==g.type&&(g.type="esriFieldTypeOID"),g.editable=!1,g.nullable=!1,u=g.name):(g={alias:u,name:u,type:"string"===r.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(g));const F={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.Z("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!b.v.jsonValues.includes(e.type))throw new i.Z("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==g.name){const t=(0,S.os)(e);void 0!==t&&(F[e.name]=t)}}this._fieldsIndex=new _.Z(o);const I=this._fieldsIndex.requiredFields.indexOf(g);if(I>-1&&this._fieldsIndex.requiredFields.splice(I,1),y){if(y.startTimeField){const e=this._fieldsIndex.get(y.startTimeField);e?(y.startTimeField=e.name,e.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const e=this._fieldsIndex.get(y.endTimeField);e?(y.endTimeField=e.name,e.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const e=this._fieldsIndex.get(y.trackIdField);e?y.trackIdField=e.name:(y.trackIdField=null,n.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(n.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const E=l?(0,m.bU)(l):null,T={warnings:n,featureErrors:[],layerDefinition:{...w,drawingInfo:E,templates:(0,m.Hq)(F),extent:null,geometryType:l,objectIdField:u,fields:o,hasZ:!!a,timeInfo:y}};this._queryEngine=new h.q({fields:o,geometryType:l,hasM:!1,hasZ:a,objectIdField:u,spatialReference:c,timeInfo:y,featureStore:new d.Z({geometryType:l,hasM:!1,hasZ:a}),cacheSpatialQueries:!0}),this._createDefaultAttributes=(0,m.Dm)(F,u);const q=await this._createFeatures(s);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,q);const j=this._normalizeFeatures(q,T.warnings,T.featureErrors);if(this._queryEngine.featureStore.addMany(j),T.layerDefinition.extent=this._queryEngine.fullExtent,T.layerDefinition.timeInfo){const{start:e,end:t}=this._queryEngine.timeExtent;T.layerDefinition.timeInfo.timeExtent=[e,t]}return T}async applyEdits(e){const{spatialReference:t,geometryType:n}=this._queryEngine;return await Promise.all([(0,g.b)(t,n),(0,y._W)(e.adds,t),(0,y._W)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.D_)(e)||o.Z.getLogger("esri.layers.GeoJSONLayer").error(new i.Z("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete(),{extent:this._queryEngine.fullExtent,timeExtent:this._queryEngine.timeExtent}}async _createFeatures(e){const{geometryType:t,hasZ:n,objectIdField:s}=this._queryEngine,r=(0,f.lG)(e,{geometryType:t,hasZ:n,objectIdField:s});if(!(0,p.fS)(this._queryEngine.spatialReference,p.Zn))for(const e of r)(0,a.pC)(e.geometry)&&(e.geometry=(0,c.GH)((0,y.iV)((0,c.di)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),p.Zn,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions,r=(await(0,s.default)(t,{responseType:"json",query:{...n},signal:e})).data;return await(0,f.O3)(r),r}_normalizeFeatures(e,t,n){const{objectIdField:s}=this._queryEngine,r=[];for(const i of e){const e=this._createDefaultAttributes(),o=(0,g.O0)(this._fieldsIndex,e,i.attributes,!0,t);o?n?.push(o):(this._assignObjectId(e,i.attributes,!0),i.attributes=e,i.objectId=e[s],r.push(i))}return r}_applyEdits(e){const{adds:t,updates:n,deletes:s}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t&&t.length&&this._applyAddEdits(r,t),n&&n.length&&this._applyUpdateEdits(r,n),s&&s.length){for(const e of s)r.deleteResults.push((0,g.d1)(e));this._queryEngine.featureStore.removeManyById(s)}return{extent:this._queryEngine.fullExtent,timeExtent:this._queryEngine.timeExtent,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:n}=e,{geometryType:s,hasM:r,hasZ:i,objectIdField:o,spatialReference:l,featureStore:p}=this._queryEngine,d=[];for(const r of t){if(r.geometry&&s!==(0,u.Ji)(r.geometry)){n.push((0,g.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),i=(0,g.O0)(this._fieldsIndex,t,r.attributes);if(i)n.push(i);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[o];e.uidToObjectId[r.uid]=t}if((0,a.pC)(r.geometry)){const e=r.geometry.spatialReference??l;r.geometry=(0,y.iV)((0,g.og)(r.geometry,e),e,l)}d.push(r),n.push((0,g.d1)(r.attributes[o]))}}p.addMany((0,c.Yn)([],d,s,i,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:n,hasM:s,hasZ:r,objectIdField:i,spatialReference:o,featureStore:l}=this._queryEngine;for(const p of t){const{attributes:t,geometry:d}=p,h=t&&t[i];if(null==h){e.push((0,g.av)(`Identifier field ${i} missing`));continue}if(!l.has(h)){e.push((0,g.av)(`Feature with object id ${h} missing`));continue}const f=(0,c.EI)(l.getFeature(h),n,r,s);if((0,a.pC)(d)){if(n!==(0,u.Ji)(d)){e.push((0,g.av)("Incorrect geometry type."));continue}const t=d.spatialReference??o;f.geometry=(0,y.iV)((0,g.og)(d,t),t,o)}if(t){const n=(0,g.O0)(this._fieldsIndex,f.attributes,t);if(n){e.push(n);continue}}l.add((0,c.XA)(f,n,r,s,i)),e.push((0,g.d1)(h))}}_createObjectIdGenerator(e,t){const n=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===n.type)return()=>n.name+"-"+Date.now().toString(16);let s=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(s=Math.max(s,e.objectId));return s=Math.max(0,s)+1,()=>s++}_assignObjectId(e,t,n=!1){const s=this._queryEngine.objectIdField;e[s]=n&&s in t?t[s]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,y._W)(p.Zn,e)}catch{throw new i.Z("geojson-layer","Projection not supported")}}}},92722:(e,t,n)=>{n.d(t,{O3:()=>w,lG:()=>I,my:()=>F,q9:()=>l});var s=n(20102),r=n(70272),i=n(5428),o=n(35671);const a={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return a[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(!e)return null;switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let n=0;n<e.length;n++){const s=e[n],r=e[(n+1)%e.length];t+=s[0]*r[1]-r[0]*s[1]}return t<=0}function y(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function h(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return g(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const s of t.coordinates)g(e,s,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const s of t.coordinates){f(e,s[0],n);for(let t=1;t<s.length;t++)m(e,s[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const s=t.coordinates;f(e,s[0],n);for(let t=1;t<s.length;t++)m(e,s[t],n);return e}(e,t,n)}}function f(e,t,n){const s=y(t);!function(e){return!d(e)}(s)?g(e,s,n):_(e,s,n)}function m(e,t,n){const s=y(t);!function(e){return d(e)}(s)?g(e,s,n):_(e,s,n)}function g(e,t,n){for(const s of t)b(e,s,n);e.lengths.push(t.length)}function _(e,t,n){for(let s=t.length-1;s>=0;s--)b(e,t[s],n);e.lengths.push(t.length)}function b(e,t,n){const[s,r,i]=t;e.coords.push(s,r),n.hasZ&&e.coords.push(i||0)}function S(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function w(e){if(!e)throw new s.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new s.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const n="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,r=new RegExp(".*(CRS84H?|4326)$","i");if(!n||!r.test(n))throw new s.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function F(e,t={}){const n=[],s=new Set,r=new Set;let i,a=!1,d=null,y=!1,{geometryType:h=null}=t,f=!1;for(const t of u(e)){const{geometry:e,properties:u,id:m}=t;if((!e||(h||(h=l(e.type)),l(e.type)===h))&&(a||(a=c(p(e))),y||(y=null!=m,y&&(i=typeof m,d=Object.keys(u).filter((e=>u[e]===m)))),y&&null!=m&&(d.length>1?d=d.filter((e=>u[e]===m)):1===d.length&&(d=u[d[0]]===m?d:[])),!f&&u)){let e=!0;for(const t in u){if(s.has(t))continue;const i=u[t];if(null==i){e=!1,r.add(t);continue}const a=S(i);"unknown"!==a?(r.delete(t),s.add(t),n.push({name:(0,o.q6)(t),alias:t,type:a})):r.add(t)}f=e}}const m=(0,o.q6)(1===d?.length&&d[0]||null);if(m)for(const e of n)if(e.name===m&&(0,o.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:h,hasZ:a,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(r)}}function I(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:s}=t;for(const o of e){const{geometry:e,properties:a,id:u}=o;if(e&&l(e.type)!==n)continue;const p=a||{};let c=p[s]??null;s&&null!=u&&!p[s]&&(p[s]=c=u);const d=new r.u_(e?h(new i.Z,e,t):null,p,null,c);yield d}}(u(e),t))}},25278:(e,t,n)=>{n.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>a});var s=n(80442),r=n(22974),i=n(61159),o=n(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.d9)(e)}}]}function d(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},query:i.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}}}},58333:(e,t,n)=>{n.d(t,{ET:()=>i,I4:()=>r,eG:()=>l,lF:()=>o,lj:()=>p,qP:()=>a,wW:()=>u});const s=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={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},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7269,7035,7541],{41123:(e,t,a)=>{a.d(t,{D:()=>s});const r="randomUUID"in crypto;function s(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},51806:(e,t,a)=>{a.d(t,{aX:()=>R});var r=a(68773),s=a(20102),n=a(92604),i=a(70586),o=a(38913),l=a(58901),d=a(82971),u=a(33955);const p={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:d.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:d.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function f(e,t){const a=h(e);for(const e of a)for(const a of e)a[0]+=t;return e}function h(e){return(0,u.oU)(e)?e.rings:e.paths}var y=a(8744),m=a(40488),g=(a(66577),a(3172)),b=a(11282),w=a(17452);const F=n.Z.getLogger("esri.geometry.support.normalizeUtils");function I(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function v(e,t,a){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw F.error(e),new s.Z(e)}const a=h(e),r=[];for(const e of a){const a=[];r.push(a),a.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-s)*(i-s)+(o-n)*(o-n)),d=(o-n)/l,u=(i-s)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=u*r+s,o=d*r+n;a.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,r=u*e+s,i=d*e+n;a.push([r,i])}a.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.Sx)(t,!0)}return a&&(e=f(e,a)),e}function Z(e,t,a){if(Array.isArray(e)){const r=e[0];if(r>t){const a=c(r,t);e[0]=r+a*(-2*t)}else if(r<a){const t=c(r,a);e[0]=r+t*(-2*a)}}else{const r=e.x;if(r>t){const a=c(r,t);e=e.clone().offset(a*(-2*t),0)}else if(r<a){const t=c(r,a);e=e.clone().offset(t*(-2*a),0)}}return e}function S(e,t){let a=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],i=h(n);for(let e=0;e<i.length;e++){const t=i[e];t.some((a=>{if(a[0]<180)return!0;{let a=0;for(let e=0;e<t.length;e++){const r=t[e][0];a=r>a?r:a}a=Number(a.toFixed(9));const r=-360*c(a,180);for(let a=0;a<t.length;a++){const t=n.getPoint(e,a);n.setPoint(e,a,t.clone().offset(r,0))}return!0}}))}if(s===a){if(I(e))for(const t of h(n))e[s]=e[s].addRing(t);else if(A(e))for(const t of h(n))e[s]=e[s].addPath(t)}else a=s,e[s]=n}return e}async function R(e,t,a){if(!Array.isArray(e))return R([e],t);t&&"string"!=typeof t&&F.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let n,d,h,I,A,x,$,E,O=0;const U=[],L=[];for(const t of e)if((0,i.Wi)(t))L.push(t);else if(n||(n=t.spatialReference,d=(0,y.C5)(n),h=n.isWebMercator,x=h?102100:4326,I=p[x].maxX,A=p[x].minX,$=p[x].plus180Line,E=p[x].minus180Line),d)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(Z(t.clone(),I,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>Z(e,I,A))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);L.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,a=c(e.xmin,A)*(2*I);let r=0===a?t.clone():f(t.clone(),a);e.offset(a,0),e.intersects($)&&e.xmax!==I?(O=e.xmax>O?e.xmax:O,r=v(r,h),U.push(r),L.push("cut")):e.intersects(E)&&e.xmin!==A?(O=e.xmax*(2*I)>O?e.xmax*(2*I):O,r=v(r,h,360),U.push(r),L.push("cut")):L.push(r)}else L.push(t.clone());else L.push(t);let N=c(O,I),j=-90;const k=N,C=new l.Z;for(;N>0;){const e=360*N-180;C.addPath([[e,j],[e,-1*j]]),j*=-1,N--}if(U.length>0&&k>0){const t=S(U,await async function(e,t,a,r){const s=(0,b.en)(e),n=t[0].spatialReference,i={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(a)}},o=await(0,g.default)(s.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,u.im)(e);return t.spatialReference=n,t}))}}(s,U,C,a)),r=[],n=[];for(let a=0;a<L.length;a++){const s=L[a];if("cut"!==s)n.push(s);else{const s=t.shift(),o=e[a];(0,i.pC)(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),n.push("simplify")):n.push(h?(0,m.$)(s):s)}}if(!r.length)return n;const o=await async function(e,t,a){const r="string"==typeof e?(0,w.mN)(e):e,s=t[0].spatialReference,n=(0,u.Ji)(t[0]),i={...a,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,u.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,g.default)(r.path+"/simplify",i);var l;return function(e,t,a){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=a,t}))}(o.geometries,n,s)}(s,r,a),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(h?(0,m.$)(o.shift()):o.shift())}return l}const J=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)J.push(t);else{const e=U.shift();J.push(!0===h?(0,m.$)(e):e)}}return J}},87269:(e,t,a)=>{a.r(t),a.d(t,{applyEdits:()=>f});var r,s=a(38171),n=a(46791),i=a(20102),o=a(22974),l=a(70586),d=a(17452),u=a(41123),p=a(51806),c=a(66361);async function f(e,t,a,s={}){let d,u;const p={edits:a,result:new Promise(((e,t)=>{d=e,u=t}))};e.emit("apply-edits",p);try{const{results:u,edits:p}=await async function(e,t,a,s){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new i.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new i.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:o,options:d}=await async function(e,t,a){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),o=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=(0,l.pC)(e.infoFor3D);if(!t||!s&&!o)throw new i.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&a&&a.gdbVersion)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&a&&a.rollbackOnFailureEnabled)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&a&&a.globalIdUsed)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&o)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!a||!a.globalIdUsed)&&o)throw new i.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const u={...a};if(null!=u.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(u.rollbackOnFailureEnabled=!0),!1===u.rollbackOnFailureEnabled&&"original-and-current-features"===u.returnServiceEditsOption)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&u.returnServiceEditsInSourceSR)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(u.returnServiceEditsInSourceSR&&"original-and-current-features"!==u.returnServiceEditsOption)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&n.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&n.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&n.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(g),p.updateFeatures=p.updateFeatures.map(g),p.addAssets=[];const c=a&&a.globalIdUsed||d;return p.addFeatures.forEach((t=>function(e,t,a){h(e,t,a)}(t,e,c))),p.updateFeatures.forEach((t=>function(e,t,a){if(h(e,t,a),"geometry"in e&&(0,l.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new i.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,c))),p.deleteFeatures.forEach((t=>function(e,t,a){h(e,t,a)}(t,e,c))),p.addAttachments.forEach((t=>y(t,e))),p.updateAttachments.forEach((t=>y(t,e))),d&&await async function(e,t){if((0,l.Wi)(t.infoFor3D))return;const{infoFor3D:a}=t;let s=!1;for(const e of a.editFormats)if(e===r.GLTF_BINARY){s=!0;break}const n=[];for(const a of e.addFeatures)n.push(b(a,e,t,s));for(const a of e.updateFeatures)n.push(b(a,e,t,s));const i=await Promise.allSettled(n);for(const e of i)if("rejected"===e.status)throw e.reason}(p,e),{edits:await m(p),options:u}}(e,a,s);return o.addFeatures.length||o.updateFeatures.length||o.deleteFeatures.length||o.addAttachments.length||o.updateAttachments.length||o.deleteAttachments.length?{edits:o,results:await t.applyEdits(o,d)}:{edits:o,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,a,s),f=e=>e.filter((e=>!e.error)).map(o.d9),w={edits:p,addedFeatures:f(u.addFeatureResults),updatedFeatures:f(u.updateFeatureResults),deletedFeatures:f(u.deleteFeatureResults),addedAttachments:f(u.addAttachmentResults),updatedAttachments:f(u.updateAttachmentResults),deletedAttachments:f(u.deleteAttachmentResults)};return u.editedFeatureResults?.length&&(w.editedFeatures=u.editedFeatureResults),(w.addedFeatures.length||w.updatedFeatures.length||w.deletedFeatures.length||w.addedAttachments.length||w.updatedAttachments.length||w.deletedAttachments.length)&&(e.emit("edits",w),(0,c.lQ)(e)&&c.dU.emit("edits",{layer:e,event:w})),d(w),u}catch(e){throw u(e),e}}function h(e,t,a){if(a){if("attributes"in e&&!e.attributes[t.globalIdField])throw new i.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,l.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new i.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 i.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function y(e,t){const{feature:a,attachment:r}=e;if(!a||"attributes"in a&&!a.attributes[t.globalIdField])throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in a)&&!a.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new i.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities.editing.supportsUploadWithItemId&&r.uploadId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,d.sJ)(r.data);if(e&&!e.isBase64)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function m(e){const t=e.addFeatures,a=e.updateFeatures,r=t.concat(a).map((e=>e.geometry)),s=await(0,p.aX)(r),n=t.length,i=a.length;return s.slice(0,n).forEach(((t,a)=>e.addFeatures[a].geometry=t)),s.slice(n,n+i).forEach(((t,a)=>e.updateFeatures[a].geometry=t)),e}function g(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function b(e,t,a,s){if((0,l.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,o=a.globalIdField;if((0,l.pC)(a.parsedUrl)&&(0,l.pC)(n.external)&&Array.isArray(n.external.source)&&1===n.external.source.length&&"source"in n.external.source[0]&&"string"==typeof n.external.source[0].source&&n.external.source[0].source.startsWith(a.parsedUrl.path))return;if(!s)throw new i.Z(`${a.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const d=await n.toBinaryGLTF(),p=await d.buffer(),c=`{${(0,u.D)()}}`,f=`${c}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(o),assetMapGlobalId:c,assetName:f,flags:0,data:p.data,mimeType:p.type,assetType:r.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(r||(r={}))},66361:(e,t,a)=>{a.d(t,{dU:()=>o,lQ:()=>u,o1:()=>p});var r=a(43697),s=a(32448),n=a(22974),i=(a(92604),a(75215),a(20102),a(80442),a(52011));const o=new s.Z.EventEmitter,l="esri.layers.mixins.EditBusLayer",d=Symbol(l);function u(e){return null!=e&&"object"==typeof e&&d in e}const p=e=>{var t;let a=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([o.on("edits",(e=>{const t="layer"in e?e.layer:null,a="layer"in e?e.layer?.url:e.serviceUrl,r="layer"in e?e.layer?.layerId:e.layerId,s=e.event;if(t===this||a!==this.url)return;if(null!=r&&null!=this.layerId&&r===this.layerId)return void this.emit("edits",(0,n.d9)(s));const i=s.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:e,updates:t,deletes:a}=i.editedFeatures,r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),deletedFeatures:a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),updatedFeatures:t.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),editedFeatures:(0,n.d9)(s.editedFeatures)};this.emit("edits",r)}}))])}),(()=>{}))}};return t=d,a=(0,r._)([(0,i.j)(l)],a),a}},11282:(e,t,a)=>{a.d(t,{cv:()=>o,en:()=>i,lA:()=>n}),a(68773),a(40330);var r=a(22974),s=a(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):(0,r.d9)(e)}function o(e,t,a){const r={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){r[s]=[];for(let e=0;e<n.length;e++)r[s][e]=o(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(a&&a[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?n:JSON.stringify(n);else r[s]=n}return r}a(71058)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7269,7035,7541],{41123:(e,t,a)=>{a.d(t,{D:()=>s});const r="randomUUID"in crypto;function s(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},51806:(e,t,a)=>{a.d(t,{aX:()=>R});var r=a(68773),s=a(20102),n=a(92604),i=a(70586),o=a(38913),l=a(58901),d=a(82971),u=a(33955);const p={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:d.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:d.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function f(e,t){const a=h(e);for(const e of a)for(const a of e)a[0]+=t;return e}function h(e){return(0,u.oU)(e)?e.rings:e.paths}var y=a(8744),m=a(40488),g=(a(66577),a(3172)),b=a(11282),w=a(17452);const F=n.Z.getLogger("esri.geometry.support.normalizeUtils");function I(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function v(e,t,a){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw F.error(e),new s.Z(e)}const a=h(e),r=[];for(const e of a){const a=[];r.push(a),a.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-s)*(i-s)+(o-n)*(o-n)),d=(o-n)/l,u=(i-s)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=u*r+s,o=d*r+n;a.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,r=u*e+s,i=d*e+n;a.push([r,i])}a.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.Sx)(t,!0)}return a&&(e=f(e,a)),e}function Z(e,t,a){if(Array.isArray(e)){const r=e[0];if(r>t){const a=c(r,t);e[0]=r+a*(-2*t)}else if(r<a){const t=c(r,a);e[0]=r+t*(-2*a)}}else{const r=e.x;if(r>t){const a=c(r,t);e=e.clone().offset(a*(-2*t),0)}else if(r<a){const t=c(r,a);e=e.clone().offset(t*(-2*a),0)}}return e}function S(e,t){let a=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],i=h(n);for(let e=0;e<i.length;e++){const t=i[e];t.some((a=>{if(a[0]<180)return!0;{let a=0;for(let e=0;e<t.length;e++){const r=t[e][0];a=r>a?r:a}a=Number(a.toFixed(9));const r=-360*c(a,180);for(let a=0;a<t.length;a++){const t=n.getPoint(e,a);n.setPoint(e,a,t.clone().offset(r,0))}return!0}}))}if(s===a){if(I(e))for(const t of h(n))e[s]=e[s].addRing(t);else if(A(e))for(const t of h(n))e[s]=e[s].addPath(t)}else a=s,e[s]=n}return e}async function R(e,t,a){if(!Array.isArray(e))return R([e],t);t&&"string"!=typeof t&&F.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let n,d,h,I,A,x,$,E,O=0;const U=[],L=[];for(const t of e)if((0,i.Wi)(t))L.push(t);else if(n||(n=t.spatialReference,d=(0,y.C5)(n),h=n.isWebMercator,x=h?102100:4326,I=p[x].maxX,A=p[x].minX,$=p[x].plus180Line,E=p[x].minus180Line),d)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(Z(t.clone(),I,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>Z(e,I,A))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);L.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,a=c(e.xmin,A)*(2*I);let r=0===a?t.clone():f(t.clone(),a);e.offset(a,0),e.intersects($)&&e.xmax!==I?(O=e.xmax>O?e.xmax:O,r=v(r,h),U.push(r),L.push("cut")):e.intersects(E)&&e.xmin!==A?(O=e.xmax*(2*I)>O?e.xmax*(2*I):O,r=v(r,h,360),U.push(r),L.push("cut")):L.push(r)}else L.push(t.clone());else L.push(t);let N=c(O,I),j=-90;const k=N,C=new l.Z;for(;N>0;){const e=360*N-180;C.addPath([[e,j],[e,-1*j]]),j*=-1,N--}if(U.length>0&&k>0){const t=S(U,await async function(e,t,a,r){const s=(0,b.en)(e),n=t[0].spatialReference,i={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(a)}},o=await(0,g.default)(s.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,u.im)(e);return t.spatialReference=n,t}))}}(s,U,C,a)),r=[],n=[];for(let a=0;a<L.length;a++){const s=L[a];if("cut"!==s)n.push(s);else{const s=t.shift(),o=e[a];(0,i.pC)(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),n.push("simplify")):n.push(h?(0,m.$)(s):s)}}if(!r.length)return n;const o=await async function(e,t,a){const r="string"==typeof e?(0,w.mN)(e):e,s=t[0].spatialReference,n=(0,u.Ji)(t[0]),i={...a,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,u.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,g.default)(r.path+"/simplify",i);var l;return function(e,t,a){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=a,t}))}(o.geometries,n,s)}(s,r,a),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(h?(0,m.$)(o.shift()):o.shift())}return l}const J=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)J.push(t);else{const e=U.shift();J.push(!0===h?(0,m.$)(e):e)}}return J}},87269:(e,t,a)=>{a.r(t),a.d(t,{applyEdits:()=>f});var r,s=a(38171),n=a(46791),i=a(20102),o=a(22974),l=a(70586),d=a(17452),u=a(41123),p=a(51806),c=a(66361);async function f(e,t,a,s={}){let d,u;const p={edits:a,result:new Promise(((e,t)=>{d=e,u=t}))};e.emit("apply-edits",p);try{const{results:u,edits:p}=await async function(e,t,a,s){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new i.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new i.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:o,options:d}=await async function(e,t,a){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),o=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=(0,l.pC)(e.infoFor3D);if(!t||!s&&!o)throw new i.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&a&&a.gdbVersion)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&a&&a.rollbackOnFailureEnabled)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&a&&a.globalIdUsed)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&o)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!a||!a.globalIdUsed)&&o)throw new i.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const u={...a};if(null!=u.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(u.rollbackOnFailureEnabled=!0),!1===u.rollbackOnFailureEnabled&&"original-and-current-features"===u.returnServiceEditsOption)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&u.returnServiceEditsInSourceSR)throw new i.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(u.returnServiceEditsInSourceSR&&"original-and-current-features"!==u.returnServiceEditsOption)throw new i.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&n.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&n.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&n.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new i.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(g),p.updateFeatures=p.updateFeatures.map(g),p.addAssets=[];const c=a&&a.globalIdUsed||d;return p.addFeatures.forEach((t=>function(e,t,a){h(e,t,a)}(t,e,c))),p.updateFeatures.forEach((t=>function(e,t,a){if(h(e,t,a),"geometry"in e&&(0,l.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new i.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,c))),p.deleteFeatures.forEach((t=>function(e,t,a){h(e,t,a)}(t,e,c))),p.addAttachments.forEach((t=>y(t,e))),p.updateAttachments.forEach((t=>y(t,e))),d&&await async function(e,t){if((0,l.Wi)(t.infoFor3D))return;const{infoFor3D:a}=t;let s=!1;for(const e of a.editFormats)if(e===r.GLTF_BINARY){s=!0;break}const n=[];for(const a of e.addFeatures)n.push(b(a,e,t,s));for(const a of e.updateFeatures)n.push(b(a,e,t,s));const i=await Promise.allSettled(n);for(const e of i)if("rejected"===e.status)throw e.reason}(p,e),{edits:await m(p),options:u}}(e,a,s);return o.addFeatures.length||o.updateFeatures.length||o.deleteFeatures.length||o.addAttachments.length||o.updateAttachments.length||o.deleteAttachments.length?{edits:o,results:await t.applyEdits(o,d)}:{edits:o,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,a,s),f=e=>e.filter((e=>!e.error)).map(o.d9),w={edits:p,addedFeatures:f(u.addFeatureResults),updatedFeatures:f(u.updateFeatureResults),deletedFeatures:f(u.deleteFeatureResults),addedAttachments:f(u.addAttachmentResults),updatedAttachments:f(u.updateAttachmentResults),deletedAttachments:f(u.deleteAttachmentResults)};return u.editedFeatureResults?.length&&(w.editedFeatures=u.editedFeatureResults),(w.addedFeatures.length||w.updatedFeatures.length||w.deletedFeatures.length||w.addedAttachments.length||w.updatedAttachments.length||w.deletedAttachments.length)&&(e.emit("edits",w),(0,c.lQ)(e)&&c.dU.emit("edits",{layer:e,event:w})),d(w),u}catch(e){throw u(e),e}}function h(e,t,a){if(a){if("attributes"in e&&!e.attributes[t.globalIdField])throw new i.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,l.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new i.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 i.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function y(e,t){const{feature:a,attachment:r}=e;if(!a||"attributes"in a&&!a.attributes[t.globalIdField])throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in a)&&!a.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new i.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities.editing.supportsUploadWithItemId&&r.uploadId)throw new i.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,d.sJ)(r.data);if(e&&!e.isBase64)throw new i.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function m(e){const t=e.addFeatures,a=e.updateFeatures,r=t.concat(a).map((e=>e.geometry)),s=await(0,p.aX)(r),n=t.length,i=a.length;return s.slice(0,n).forEach(((t,a)=>e.addFeatures[a].geometry=t)),s.slice(n,n+i).forEach(((t,a)=>e.updateFeatures[a].geometry=t)),e}function g(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function b(e,t,a,s){if((0,l.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,o=a.globalIdField;if((0,l.pC)(a.parsedUrl)&&(0,l.pC)(n.external)&&Array.isArray(n.external.source)&&1===n.external.source.length&&"source"in n.external.source[0]&&"string"==typeof n.external.source[0].source&&n.external.source[0].source.startsWith(a.parsedUrl.path))return;if(!s)throw new i.Z(`${a.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const d=await n.toBinaryGLTF(),p=await d.buffer(),c=`{${(0,u.D)()}}`,f=`${c}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(o),assetMapGlobalId:c,assetName:f,flags:0,data:p.data,mimeType:p.type,assetType:r.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(r||(r={}))},66361:(e,t,a)=>{a.d(t,{dU:()=>o,lQ:()=>u,o1:()=>p});var r=a(43697),s=a(32448),n=a(22974),i=(a(92604),a(75215),a(20102),a(80442),a(52011));const o=new s.Z.EventEmitter,l="esri.layers.mixins.EditBusLayer",d=Symbol(l);function u(e){return null!=e&&"object"==typeof e&&d in e}const p=e=>{var t;let a=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([o.on("edits",(e=>{const t="layer"in e?e.layer:null,a="layer"in e?e.layer?.url:e.serviceUrl,r="layer"in e?e.layer?.layerId:e.layerId,s=e.event;if(t===this||a!==this.url)return;if(null!=r&&null!=this.layerId&&r===this.layerId)return void this.emit("edits",(0,n.d9)(s));const i=s.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:e,updates:t,deletes:a}=i.editedFeatures,r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:a?a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:t?t.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.d9)(s.editedFeatures)};this.emit("edits",r)}}))])}),(()=>{}))}};return t=d,a=(0,r._)([(0,i.j)(l)],a),a}},11282:(e,t,a)=>{a.d(t,{cv:()=>o,en:()=>i,lA:()=>n}),a(68773),a(40330);var r=a(22974),s=a(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):(0,r.d9)(e)}function o(e,t,a){const r={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){r[s]=[];for(let e=0;e<n.length;e++)r[s][e]=o(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(a&&a[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?n:JSON.stringify(n);else r[s]=n}return r}a(71058)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[759],{55343:(e,t,r)=>{r.d(t,{Z:()=>he});var o,i=r(43697),s=r(96674),n=r(22974),a=r(5600),p=r(90578),l=r(71715),d=r(52011),u=r(30556),c=(r(67676),r(75215));let y=o=class extends s.wq{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new o({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:["boolean","date","number","string"],json:{write:!0}})],y.prototype,"returnType",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"title",void 0),y=o=(0,i._)([(0,d.j)("esri.form.ExpressionInfo")],y);const h=y;let m=class extends s.wq{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,i._)([(0,a.Cb)()],m.prototype,"type",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"visibilityExpression",void 0),m=(0,i._)([(0,d.j)("esri.form.elements.Element")],m);const b=m;var f;let w=f=class extends s.wq{constructor(e){super(e),this.type=null}clone(){return new f({type:this.type})}};(0,i._)([(0,a.Cb)({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],w.prototype,"type",void 0),w=f=(0,i._)([(0,d.j)("esri.form.elements.inputs.AttachmentInput")],w);const v=w;var g;let C=g=class extends b{constructor(e){super(e),this.attachmentKeyword=null,this.editable=!0,this.input=null,this.type="attachment"}clone(){return new g({attachmentKeyword:this.attachmentKeyword,description:this.description,editable:this.editable,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],C.prototype,"attachmentKeyword",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],C.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:v,json:{read:{source:"inputType"},write:{target:"inputType"}}})],C.prototype,"input",void 0),(0,i._)([(0,a.Cb)({type:["attachment"],json:{read:!1,write:!0}})],C.prototype,"type",void 0),C=g=(0,i._)([(0,d.j)("esri.form.elements.AttachmentElement")],C);const _=C;let j=class extends s.wq{constructor(e){super(e),this.type=null}};(0,i._)([(0,a.Cb)()],j.prototype,"type",void 0),j=(0,i._)([(0,d.j)("esri.form.elements.inputs.Input")],j);const x=j;let S=class extends x{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"maxLength",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"minLength",void 0),S=(0,i._)([(0,d.j)("esri.form.elements.inputs.TextInput")],S);const I=S;var F;let E=F=class extends I{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new F({maxLength:this.maxLength,minLength:this.minLength})}};(0,i._)([(0,a.Cb)({type:["barcode-scanner"],json:{read:!1,write:!0}})],E.prototype,"type",void 0),E=F=(0,i._)([(0,d.j)("esri.form.elements.inputs.BarcodeScannerInput")],E);const M=E;var R;let O=R=class extends x{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new R({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],O.prototype,"noValueOptionLabel",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],O.prototype,"showNoValueOption",void 0),(0,i._)([(0,a.Cb)({type:["combo-box"],json:{read:!1,write:!0}})],O.prototype,"type",void 0),O=R=(0,i._)([(0,d.j)("esri.form.elements.inputs.ComboBoxInput")],O);const T=O;var A;function V(e){return null!=e?new Date(e):null}function Z(e){return e?e.getTime():null}let q=A=class extends x{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return V(t.max)}writeMax(e,t){t.max=Z(e)}readMin(e,t){return V(t.min)}writeMin(e,t){t.min=Z(e)}clone(){return new A({includeTime:this.includeTime,max:this.max,min:this.min,type:this.type})}};(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"includeTime",void 0),(0,i._)([(0,a.Cb)({type:Date,json:{type:Number,write:!0}})],q.prototype,"max",void 0),(0,i._)([(0,l.r)("max")],q.prototype,"readMax",null),(0,i._)([(0,u.c)("max")],q.prototype,"writeMax",null),(0,i._)([(0,a.Cb)({type:Date,json:{type:Number,write:!0}})],q.prototype,"min",void 0),(0,i._)([(0,l.r)("min")],q.prototype,"readMin",null),(0,i._)([(0,u.c)("min")],q.prototype,"writeMin",null),(0,i._)([(0,a.Cb)({type:["datetime-picker"],json:{read:!1,write:!0}})],q.prototype,"type",void 0),q=A=(0,i._)([(0,d.j)("esri.form.elements.inputs.DateTimePickerInput")],q);const Q=q;var k;let D=k=class extends x{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new k({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],D.prototype,"noValueOptionLabel",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"showNoValueOption",void 0),(0,i._)([(0,a.Cb)({type:["radio-buttons"],json:{read:!1,write:!0}})],D.prototype,"type",void 0),D=k=(0,i._)([(0,d.j)("esri.form.elements.inputs.RadioButtonsInput")],D);const L=D;var B;let P=B=class extends x{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new B({offValue:this.offValue,onValue:this.onValue})}};(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],P.prototype,"offValue",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],P.prototype,"onValue",void 0),(0,i._)([(0,a.Cb)({type:["switch"],json:{read:!1,write:!0}})],P.prototype,"type",void 0),P=B=(0,i._)([(0,d.j)("esri.form.elements.inputs.SwitchInput")],P);const N=P;var G;let U=G=class extends I{constructor(e){super(e),this.type="text-area"}clone(){return new G({maxLength:this.maxLength,minLength:this.minLength})}};(0,i._)([(0,a.Cb)({type:["text-area"],json:{read:!1,write:!0}})],U.prototype,"type",void 0),U=G=(0,i._)([(0,d.j)("esri.form.elements.inputs.TextAreaInput")],U);const H=U;var W;let z=W=class extends I{constructor(e){super(e),this.type="text-box"}clone(){return new W({maxLength:this.maxLength,minLength:this.minLength})}};(0,i._)([(0,a.Cb)({type:["text-box"],json:{read:!1,write:!0}})],z.prototype,"type",void 0),z=W=(0,i._)([(0,d.j)("esri.form.elements.inputs.TextBoxInput")],z);const J={base:x,key:"type",typeMap:{"barcode-scanner":M,"combo-box":T,"datetime-picker":Q,"radio-buttons":L,switch:N,"text-area":H,"text-box":z}};var K,$=r(72729);let X=K=class extends b{constructor(e){super(e),this.domain=null,this.editable=!0,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new K({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,i._)([(0,a.Cb)({types:$.V5,json:{read:{reader:$.im},write:!0}})],X.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],X.prototype,"editableExpression",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],X.prototype,"fieldName",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],X.prototype,"hint",void 0),(0,i._)([(0,a.Cb)({types:J,json:{read:{source:"inputType"},write:{target:"inputType"}}})],X.prototype,"input",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],X.prototype,"requiredExpression",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:!1,write:!0}})],X.prototype,"type",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],X.prototype,"valueExpression",void 0),X=K=(0,i._)([(0,d.j)("esri.form.elements.FieldElement")],X);const Y=X;var ee,te=r(44729);let re=ee=class extends b{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editable=!0,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new ee({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editable:this.editable,label:this.label,orderByFields:(0,n.d9)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],re.prototype,"displayCount",void 0),(0,i._)([(0,a.Cb)({type:["list"],json:{write:!0}})],re.prototype,"displayType",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],re.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:[te.Z],json:{write:!0}})],re.prototype,"orderByFields",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],re.prototype,"relationshipId",void 0),(0,i._)([(0,a.Cb)({type:["relationship"],json:{read:!1,write:!0}})],re.prototype,"type",void 0),re=ee=(0,i._)([(0,d.j)("esri.form.elements.RelationshipElement")],re);const oe=re;function ie(e){return{typesWithGroup:{base:b,key:"type",typeMap:{attachment:_,field:Y,group:e,relationship:oe}},typesWithoutGroup:{base:b,key:"type",typeMap:{attachment:_,field:Y,relationship:oe}}}}function se(e,t,r=!0){if(!e)return null;const o=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>o[e.type])).map((e=>o[e.type].fromJSON(e)))}function ne(e,t,r=!0){if(!e)return null;const o=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>o[e.type])).map((e=>e.toJSON()))}function ae(e,t,r=!0){return e?e.map((e=>(0,c.N7)(r?t.typesWithGroup:t.typesWithoutGroup,e))):null}var pe;let le=pe=class extends b{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return ae(e,de,!1)}readElements(e,t){return se(t.formElements,de,!1)}writeElements(e,t){t.formElements=ne(e,de,!1)}clone(){return new pe({description:this.description,elements:(0,n.d9)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],le.prototype,"elements",void 0),(0,i._)([(0,p.p)("elements")],le.prototype,"castElements",null),(0,i._)([(0,l.r)("elements",["formElements"])],le.prototype,"readElements",null),(0,i._)([(0,u.c)("elements")],le.prototype,"writeElements",null),(0,i._)([(0,a.Cb)({type:["collapsed","expanded"],json:{write:!0}})],le.prototype,"initialState",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:!1,write:!0}})],le.prototype,"type",void 0),le=pe=(0,i._)([(0,d.j)("esri.form.elements.GroupElement")],le);const de=ie(le);var ue;const ce=ie(le);let ye=ue=class extends s.wq{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return ae(e,ce)}readElements(e,t){return se(t.formElements,ce)}writeElements(e,t){t.formElements=ne(e,ce)}clone(){return new ue({description:this.description,expressionInfos:(0,n.d9)(this.expressionInfos),elements:(0,n.d9)(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],ye.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],ye.prototype,"elements",void 0),(0,i._)([(0,p.p)("elements")],ye.prototype,"castElements",null),(0,i._)([(0,l.r)("elements",["formElements"])],ye.prototype,"readElements",null),(0,i._)([(0,u.c)("elements")],ye.prototype,"writeElements",null),(0,i._)([(0,a.Cb)({type:[h],json:{write:!0}})],ye.prototype,"expressionInfos",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],ye.prototype,"preserveFieldValuesWhenHidden",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],ye.prototype,"title",void 0),ye=ue=(0,i._)([(0,d.j)("esri.form.FormTemplate")],ye);const he=ye},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var o,i=r(43697),s=r(67676),n=r(35454),a=r(96674),p=r(67900),l=r(20941),d=r(5600),u=(r(75215),r(71715)),c=r(52011),y=r(30556);const h=(0,n.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,s.e$)(m,"orthometric");const b=(0,n.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 f=o=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new l.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return b.read(e)||(r&&r.messages&&r.messages.push(w(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,p.$C)(e)||b.read(e)||(r&&r.messages&&r.messages.push(w(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new o({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 r=(0,p.cM)(t);return new o({heightModel:e.heightModel,heightUnit:r,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 o;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new l.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,d.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,i._)([(0,y.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,i._)([(0,u.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,i._)([(0,d.Cb)({type:b.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:b.jsonValues,write:b.write}}}})],f.prototype,"heightUnit",void 0),(0,i._)([(0,u.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,i._)([(0,u.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,i._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,i._)([(0,u.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=o=(0,i._)([(0,c.j)("esri.geometry.HeightModelInfo")],f);const v=f},66361:(e,t,r)=>{r.d(t,{dU:()=>a,lQ:()=>d,o1:()=>u});var o=r(43697),i=r(32448),s=r(22974),n=(r(92604),r(75215),r(20102),r(80442),r(52011));const a=new i.Z.EventEmitter,p="esri.layers.mixins.EditBusLayer",l=Symbol(p);function d(e){return null!=e&&"object"==typeof e&&l in e}const u=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([a.on("edits",(e=>{const t="layer"in e?e.layer:null,r="layer"in e?e.layer?.url:e.serviceUrl,o="layer"in e?e.layer?.layerId:e.layerId,i=e.event;if(t===this||r!==this.url)return;if(null!=o&&null!=this.layerId&&o===this.layerId)return void this.emit("edits",(0,s.d9)(i));const n=i.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(n){const{adds:e,updates:t,deletes:r}=n.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:t?t.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.d9)(i.editedFeatures)};this.emit("edits",o)}}))])}),(()=>{}))}};return t=l,r=(0,o._)([(0,n.j)(p)],r),r}},82980:(e,t,r)=>{r.d(t,{B:()=>M});var o=r(43697),i=r(46791),s=r(22974),n=r(92604),a=r(5600),p=(r(75215),r(71715)),l=r(52011),d=r(30556),u=r(6570),c=r(79235),y=r(82971),h=r(66677),m=r(21506),b=r(2368),f=r(96674);r(67676);let w=class extends((0,b.J)(f.wq)){constructor(e){super(e)}};(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"name",void 0),(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"isAscending",void 0),(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"indexType",void 0),(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"isUnique",void 0),(0,o._)([(0,a.Cb)({constructOnly:!0,json:{write:!0}})],w.prototype,"description",void 0),w=(0,o._)([(0,l.j)("esri.layers.support.FeatureIndex")],w);var v=r(50957),g=r(67900);let C=class extends((0,b.J)(f.wq)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],C.prototype,"shapeAreaField",void 0),(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],C.prototype,"shapeLengthField",void 0),(0,o._)([(0,a.Cb)({type:String,json:{read:e=>g.gV.read(e)||g.Jo.read(e)}})],C.prototype,"units",void 0),C=(0,o._)([(0,l.j)("esri.layers.support.GeometryFieldsInfo")],C);const _=C;var j=r(56765),x=r(35454);const S=new x.X({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),I=new x.X({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let F=class extends((0,b.J)(f.wq)){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,o._)([(0,a.Cb)({json:{read:S.read,write:S.write}})],F.prototype,"cardinality",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"composite",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"id",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"keyField",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"keyFieldInRelationshipTable",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"name",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"relatedTableId",void 0),(0,o._)([(0,a.Cb)({json:{read:!0,write:!0}})],F.prototype,"relationshipTableId",void 0),(0,o._)([(0,a.Cb)({json:{read:I.read,write:I.write}})],F.prototype,"role",void 0),F=(0,o._)([(0,l.j)("esri.layers.support.Relationship")],F);const E=F,M=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=null,this.copyright=null,this.datesInUnknownTimezone=!1,this.displayField=null,this.definitionExpression=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.isTable=!1,this.layerId=void 0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.spatialReference=y.Z.WGS84,this.subtypeField=null,this.trackIdField=null,this.indexes=new(i.Z.ofType(w)),this.userIsAdmin=!1,this.version=void 0}readCapabilitiesFromService(e,t){return(0,v.hu)(e,t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTableFromService(e,t){return"Table"===t.type}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){return(0,v.rk)(t)}readObjectIdFieldFromService(e,t){return(0,v.kZ)(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){const t=(0,h.XG)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:n.Z.getLogger(this.declaredClass)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,o){(0,h.wH)(this,e,null,t,o)}readVersion(e,t){return(0,v.JY)(t)}};return(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],t.prototype,"capabilities",void 0),(0,o._)([(0,p.r)("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),(0,o._)([(0,a.Cb)({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,o._)([(0,a.Cb)({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),(0,o._)([(0,a.Cb)({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),(0,o._)([(0,a.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"editFieldsInfo",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"editingInfo",void 0),(0,o._)([(0,p.r)("editingInfo")],t.prototype,"readEditingInfo",null),(0,o._)([(0,a.Cb)((()=>{const e=(0,s.d9)(m.PV),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],t.prototype,"elevationInfo",void 0),(0,o._)([(0,a.Cb)({type:j.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],t.prototype,"floorInfo",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),(0,o._)([(0,a.Cb)()],t.prototype,"gdbVersion",void 0),(0,o._)([(0,a.Cb)({readOnly:!0,type:_,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),(0,o._)([(0,a.Cb)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:v.Fr.read}}}})],t.prototype,"geometryType",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),(0,o._)([(0,a.Cb)({readOnly:!0,type:c.Z})],t.prototype,"heightModelInfo",void 0),(0,o._)([(0,a.Cb)({type:Date})],t.prototype,"historicMoment",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"isTable",void 0),(0,o._)([(0,p.r)("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),(0,o._)([(0,a.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),(0,o._)([(0,a.Cb)(m.rO)],t.prototype,"minScale",void 0),(0,o._)([(0,p.r)("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),(0,o._)([(0,a.Cb)(m.u1)],t.prototype,"maxScale",void 0),(0,o._)([(0,p.r)("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),(0,o._)([(0,a.Cb)({type:String})],t.prototype,"globalIdField",void 0),(0,o._)([(0,p.r)("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),(0,o._)([(0,a.Cb)({type:String})],t.prototype,"objectIdField",void 0),(0,o._)([(0,p.r)("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),(0,o._)([(0,a.Cb)({type:[E],readOnly:!0})],t.prototype,"relationships",void 0),(0,o._)([(0,a.Cb)()],t.prototype,"sourceJSON",void 0),(0,o._)([(0,a.Cb)({type:Boolean})],t.prototype,"returnM",void 0),(0,o._)([(0,a.Cb)({type:Boolean})],t.prototype,"returnZ",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),(0,o._)([(0,p.r)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),(0,o._)([(0,a.Cb)({type:y.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),(0,o._)([(0,a.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),(0,o._)([(0,a.Cb)({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),(0,o._)([(0,a.Cb)({type:i.Z.ofType(w),readOnly:!0})],t.prototype,"indexes",void 0),(0,o._)([(0,a.Cb)(m.HQ)],t.prototype,"url",null),(0,o._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"userIsAdmin",void 0),(0,o._)([(0,a.Cb)({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),(0,o._)([(0,p.r)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=(0,o._)([(0,l.j)("esri.layers.mixins.FeatureLayerBase")],t),t}},50957:(e,t,r)=>{r.d(t,{C9:()=>D,Ci:()=>A,FV:()=>T,Fr:()=>c,JD:()=>E,JY:()=>G,Jj:()=>O,KE:()=>Q,SU:()=>V,VG:()=>q,Y5:()=>R,gG:()=>L,hu:()=>w,kZ:()=>N,kp:()=>k,rP:()=>B,rk:()=>P,tD:()=>Z});var o=r(20102),i=r(80442),s=r(35454),n=r(70586),a=r(42033),p=r(66677),l=r(56545),d=r(14165),u=r(75935);const c=new s.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),y={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function h(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function m(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function b(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function f(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function w(e,t,r){return{analytics:v(t),attachment:g(t),data:C(t),metadata:_(t),operations:j(t.capabilities||e,t,r),query:x(t,r),queryRelated:S(t),queryTopFeatures:I(t),editing:F(t)}}function v(e){return{supportsCacheHint:f(e.advancedQueryCapabilities,"queryAnalytics")}}function g(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:f(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:h(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=y[e.name];t&&(r[t]=!!e.isEnabled)})),r}function C(e){return{isVersioned:h(e,"isDataVersioned",!1),supportsAttachment:h(e,"hasAttachments",!1),supportsM:h(e,"hasM",!1),supportsZ:h(e,"hasZ",!1)}}function _(e){return{supportsAdvancedFieldProperties:h(e,"supportsFieldDescriptionProperty",!1)}}function j(e,t,r){const o=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=r?(0,p.Qc)(r):null,s=o.includes((0,n.pC)(i)&&"MapServer"===i.serverType?"data":"query"),a=o.includes("editing")&&!t.datesInUnknownTimezone;let l=a&&o.includes("create"),d=a&&o.includes("delete"),u=a&&o.includes("update");const c=o.includes("changetracking"),y=t.advancedQueryCapabilities;return a&&!(l||d||u)&&(l=d=u=!0),{supportsCalculate:h(t,"supportsCalculate",!1),supportsTruncate:h(t,"supportsTruncate",!1),supportsValidateSql:h(t,"supportsValidateSql",!1),supportsAdd:l,supportsDelete:d,supportsEditing:a,supportsChangeTracking:c,supportsQuery:s,supportsQueryAnalytics:h(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:h(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:h(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:h(t,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:u,supportsExceedsLimitStatistics:h(t,"supportsExceedsLimitStatistics",!1)}}function x(e,t){const r=e.advancedQueryCapabilities,o=e.ownershipBasedAccessControlForFeatures,s=e.archivingInfo,n=G(e),a=t?.includes("MapServer"),l=!(0,i.Z)("mapserver-pbf-enabled")&&a&&(n??0)<10.81,d=(0,p.M8)(t),u=(e.supportedQueryFormats||"").split(",").reduce(((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e}),new Set);return{supportsStatistics:h(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:h(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:h(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:b(r),supportsCentroid:h(r,"supportsReturningGeometryCentroid",!1),supportsDistance:h(r,"supportsQueryWithDistance",!1),supportsDistinct:h(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:h(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:h(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:h(r,"supportsHavingClause",!1),supportsOrderBy:h(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:h(r,"supportsPagination",!1),supportsQuantization:h(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:h(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:h(e,"supportsReturningQueryGeometry",!1),supportsResultType:h(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:h(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:h(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:h(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:h(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:h(o,"allowOthersToQuery",!0),supportsHistoricMoment:h(s,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!l&&u.has("pbf"),supportsDisjointSpatialRelationship:h(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:h(r,"supportsQueryWithCacheHint",!1)||f(r,"query"),supportsDefaultSpatialReference:h(r,"supportsDefaultSR",!1),supportsCompactGeometry:d,supportsFullTextSearch:h(r,"supportsFullTextSearch",!1),maxRecordCountFactor:m(e,"maxRecordCountFactor",void 0),maxRecordCount:m(e,"maxRecordCount",void 0),standardMaxRecordCount:m(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:m(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,r=h(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:h(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:f(t,"queryRelated")}}function I(e){return{supportsCacheHint:f(e.advancedQueryCapabilities,"queryTopFilter")}}function F(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:h(e,"allowGeometryUpdates",!0),supportsGlobalId:h(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:h(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:h(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:h(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:h(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:h(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:h(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:h(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:h(t,"allowOthersToUpdate",!0)}}async function E(e,t,r,i){const{source:s}=await e.load();if(await M(e,t,i),!s.addAttachment)throw new o.Z(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function M(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.get("capabilities.data.supportsAttachment")?t?i?s&&i[s]?Promise.resolve():Promise.reject(new o.Z(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.Z(r,"this layer doesn't support attachments"))}async function R(e,t,r,i,s){const{source:n}=await e.load();if(await M(e,t,s),!n.updateAttachment)throw new o.Z(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function O(e,t,o){const i=await r.e(7035).then(r.bind(r,87269)),s=await e.load();return i.applyEdits(s,s.source,t,o)}async function T(e,t,r,i){const{source:s}=await e.load();if(await M(e,t,i),!s.deleteAttachments)throw new o.Z(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function A(e,t,r){const{source:i}=await e.load({signal:t?.signal});if(!i.fetchRecomputedExtents)throw new o.Z(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function V(e,t,r,i){t=l.Z.from(t);const{source:s,capabilities:n}=await e.load();if(!n?.data?.supportsAttachment)throw new o.Z(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:p,globalIds:d,num:u,size:c,start:y,where:h}=t;if(!n?.operations?.supportsQueryAttachments){const e=p&&p.length>1,r=a&&a.length,s=d&&d.length,n=c&&c.length;if(e||r||s||n||u||y||h)throw new o.Z(i,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",t)}if(!p?.length&&!h)throw new o.Z(i,"'objectIds' or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.Z(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function Z(e,t,r,i){const{source:s}=await e.load();if(!s.queryObjectIds)throw new o.Z(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(d.Z.from(t)??e.createQuery(),r)}async function q(e,t,r,i){const{source:s}=await e.load();if(!s.queryFeatureCount)throw new o.Z(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(d.Z.from(t)??e.createQuery(),r)}async function Q(e,t,r,i){const{source:s}=await e.load();if(!s.queryExtent)throw new o.Z(i,"Layer source does not support queryExtent capability");return s.queryExtent(d.Z.from(t)??e.createQuery(),r)}async function k(e,t,r,i){const{source:s}=await e.load();if(!s.queryRelatedFeatures)throw new o.Z(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(u.Z.from(t),r)}async function D(e,t,r,i){const{source:s}=await e.load();if(!s.queryRelatedFeaturesCount)throw new o.Z(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(u.Z.from(t),r)}async function L(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:o}=await t.refresh();if((0,n.pC)(o)&&(e.sourceJSON={...e.sourceJSON,...o},e.read(o,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,a.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function B(e){const t=new d.Z,r=e.get("capabilities.data"),o=e.get("capabilities.query");t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,o&&(t.compactGeometryEnabled=o.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=o.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:i,timeExtent:s}=e;return t.timeExtent=null!=i&&null!=s?s.offset(-i.value,i.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function P(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function N(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function G(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}},60199:(e,t,r)=>{r.d(t,{D:()=>s});var o=r(66677);const i=[];function s(e,t){if((0,o.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of i){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}i.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102955;t++)e.add(t);return e}]),i.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),i.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),i.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),i.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);for(let t=103696;t<=103698;t++)e.add(t);return e}]),i.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),i.push([10.61,()=>new Set([102497])]),i.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),i.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),i.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},56545:(e,t,r)=>{r.d(t,{Z:()=>c});var o,i=r(43697),s=r(96674),n=r(22974),a=r(5600),p=r(75215),l=r(52011),d=r(30556);let u=o=class extends s.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new o((0,n.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],u.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],u.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],u.prototype,"keywords",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"globalIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],u.prototype,"num",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],u.prototype,"returnMetadata",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"size",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],u.prototype,"start",void 0),(0,i._)([(0,d.c)("start"),(0,d.c)("num")],u.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],u.prototype,"where",void 0),u=o=(0,i._)([(0,l.j)("esri.rest.support.AttachmentQuery")],u),u.from=(0,p.se)(u);const c=u},75935:(e,t,r)=>{r.d(t,{Z:()=>h});var o,i=r(43697),s=(r(66577),r(96674)),n=r(22974),a=r(5600),p=r(75215),l=r(52011),d=r(30556),u=r(10158),c=r(82971);let y=o=class extends s.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new o((0,n.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:u.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,i._)([(0,a.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,i._)([(0,d.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,i._)([(0,d.c)("start"),(0,d.c)("num")],y.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=o=(0,i._)([(0,l.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,p.se)(y);const h=y}}]);
|