text: self.webpackChunkRemoteClient([73,146],{400:function(t,e,r){"use strict";r.r(e);var a=r(13),i=(r(3),r(2),r(5),r(15)),s=r(18),o=r(16),n=(r(21),r(36),r(37),r(42)),l=r(87),c=r(84),p=r(96);let u=class extends(Object(p.a)(Object(c.a)(l.a))){constructor(t){super(t),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise((t,e)=>{Object(n.a)(()=>{const t=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let r="Unknown layer type";t&&(r+=" "+t),e(new o.a("layer:unknown-layer-type",r,{layerType:t}))})}))}read(t,e){super.read({resourceInfo:t},e)}write(){return null}};Object(a.a)([Object(i.b)({readOnly:!0})],u.prototype,"resourceInfo",void 0),Object(a.a)([Object(i.b)({type:["show","hide"]})],u.prototype,"listMode",void 0),Object(a.a)([Object(i.b)({json:{read:!1},readOnly:!0,value:"unknown"})],u.prototype,"type",void 0),u=Object(a.a)([Object(s.a)("esri.layers.UnknownLayer")],u);var b=u;e.default=b},84:function(t,e,r){"use strict";r.d(e,"a",(function(){return f})),r.d(e,"b",(function(){return m}));var a=r(13),i=r(7),s=r(18),o=r(27),n=r(25),l=r(81),c=r(0),p=r(114),u=r(6);class b{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.a),this._values=new Map}clone(t){const e=new b,r=this._originStores[0];r&&r.forEach((t,r)=>{e.set(r,Object(u.a)(t),0)});for(let r=2;r<o.a;r++){const a=this._originStores[r];a&&a.forEach((a,i)=>{t&&t.has(i)||e.set(i,Object(u.a)(a),r)})}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=6){let a=this._originStores[r];if(a||(a=new Map,this._originStores[r]=a),a.set(t,e),!this._values.has(t)||Object(c.b)(this._propertyOriginMap.get(t))<=r){const a=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),a!==e}return!1}delete(t,e=6){const r=this._originStores[e];if(!r)return;const a=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return a}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],a=r&&r.get(t),i=this._values.get(t);return this._values.set(t,a),this._propertyOriginMap.set(t,e),i!==a}originOf(t){return this._propertyOriginMap.get(t)||0}forEach(t){this._values.forEach(t)}}var h=b;const d=t=>{let e=class extends t{constructor(...t){super(...t);const e=Object(c.b)(Object(i.a)(this)),r=e.metadatas,a=e.store,s=new h;e.store=s,a.keys().forEach(t=>{s.set(t,a.get(t),0)}),Object.keys(r).forEach(t=>{e.internalGet(t)&&s.set(t,e.internalGet(t),0)})}read(t,e){Object(p.a)(this,t,e)}getAtOrigin(t,e){const r=O(this),a=Object(o.d)(e);if("string"==typeof t)return r.get(t,a);const i={};return t.forEach(t=>{i[t]=r.get(t,a)}),i}originOf(t){return Object(o.b)(this.originIdOf(t))}originIdOf(t){return O(this).originOf(t)}revert(t,e){const r=O(this),a=Object(o.d)(e),s=Object(i.a)(this);let n;n="string"==typeof t?"*"===t?r.keys(a):[t]:t,n.forEach(t=>{s.propertyInvalidated(t),r.revert(t,a),s.propertyCommitted(t)})}};return e=Object(a.a)([Object(s.a)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function O(t){return Object(i.a)(t).store}let y=class extends(d(n.a)){};y=Object(a.a)([Object(s.a)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);const j=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){return g(this).delete(t,Object(o.d)(e))}write(t={},e){return Object(l.b)(this,t=t||{},e),t}setAtOrigin(t,e,r){Object(i.a)(this).setAtOrigin(t,e,Object(o.d)(r))}removeOrigin(t){const e=g(this),r=Object(o.d)(t),a=e.keys(r);for(const t of a)e.originOf(t)===r&&e.set(t,e.get(t,r),6)}updateOrigin(t,e){const r=g(this),a=Object(o.d)(e),i=this.get(t);for(let e=a+1;e<o.a;++e)r.delete(t,e);r.set(t,i,a)}toJSON(t){return this.write({},t)}};return e=Object(a.a)([Object(s.a)("esri.core.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function g(t){return Object(i.a)(t).store}const f=t=>{let e=class extends(j(d(t))){constructor(...t){super(...t)}};return e=Object(a.a)([Object(s.a)("esri.core.MultiOriginJSONSupport")],e),e};let m=class extends(f(n.a)){};m=Object(a.a)([Object(s.a)("esri.core.MultiOriginJSONSupport")],m)},87:function(t,e,r){"use strict";var a=r(13),i=(r(3),r(19)),s=r(2),o=(r(5),r(15)),n=r(18),l=r(16),c=r(21),p=(r(36),r(37),r(4)),u=r(60),b=r(61),h=(r(63),r(111)),d=r(142),O=r(54),y=r(86);let j=0;const g=s.a.getLogger("esri.layers.Layer");let f=class extends(h.a.EventedMixin(Object(d.a)(y.a))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b.a(-180,-90,180,90,u.a.WGS84),this.id=Date.now().toString(16)+"-layer-"+j++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=u.a.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t,a=await r.e(150).then(r.bind(null,188));try{return await a.fromUrl(e)}catch(t){throw g.error("#fromArcGISServerUrl({ url: '"+e.url+"'})","Failed to create layer from arcgis server url",t),t}}static async fromPortalItem(t){const e="portalItem"in t?t:{portalItem:t},a=await r.e(78).then(r.bind(null,172));try{return await a.fromItem(e)}catch(t){const r=e&&e.portalItem,a=r&&r.id||"unset",s=r&&r.portal&&r.portal.url||i.a.portalUrl;throw g.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+a+"')",t),t}}initialize(){this.when().catch(t=>{var e,r;Object(p.l)(t)||s.a.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(e=this.title)?e:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:t})})}destroy(){if(this.parent){const t=this,e=this.parent;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"baseLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const t=this.url;return t?Object(c.I)(t):null}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await Object(O.default)(t,{query:{f:"json"},responseType:"json"})).data;throw new l.a("layer:no-attribution-data","Layer does not have attribution data")}};Object(a.a)([Object(o.b)({type:String})],f.prototype,"attributionDataUrl",void 0),Object(a.a)([Object(o.b)({type:b.a})],f.prototype,"fullExtent",void 0),Object(a.a)([Object(o.b)({readOnly:!0})],f.prototype,"hasAttributionData",null),Object(a.a)([Object(o.b)({type:String})],f.prototype,"id",void 0),Object(a.a)([Object(o.b)({type:Boolean,nonNullable:!0})],f.prototype,"legendEnabled",void 0),Object(a.a)([Object(o.b)({type:["show","hide","hide-children"]})],f.prototype,"listMode",void 0),Object(a.a)([Object(o.b)({type:Number,range:{min:0,max:1},nonNullable:!0})],f.prototype,"opacity",void 0),Object(a.a)([Object(o.b)()],f.prototype,"parent",void 0),Object(a.a)([Object(o.b)({readOnly:!0})],f.prototype,"parsedUrl",null),Object(a.a)([Object(o.b)({type:Boolean})],f.prototype,"popupEnabled",void 0),Object(a.a)([Object(o.b)({type:Boolean})],f.prototype,"attributionVisible",void 0),Object(a.a)([Object(o.b)({type:u.a})],f.prototype,"spatialReference",void 0),Object(a.a)([Object(o.b)({type:String})],f.prototype,"title",void 0),Object(a.a)([Object(o.b)({type:String,readOnly:!0,json:{read:!1}})],f.prototype,"type",void 0),Object(a.a)([Object(o.b)()],f.prototype,"url",void 0),Object(a.a)([Object(o.b)({type:Boolean,nonNullable:!0})],f.prototype,"visible",void 0),f=Object(a.a)([Object(n.a)("esri.layers.Layer")],f);var m=f;e.a=m},96:function(t,e,r){"use strict";r.d(e,"a",(function(){return O}));var a=r(13),i=(r(3),r(2)),s=(r(5),r(15)),o=r(57),n=r(18),l=r(56),c=r(16),p=r(21),u=(r(36),r(37),r(4)),b=r(79),h=r(108);const d=i.a.getLogger("esri.layers.mixins.PortalLayer"),O=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]}}destroy(){var t;null==(t=this.portalItem)||t.destroy(),this.portalItem=null}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new h.default({id:e.itemId,portal:r&&r.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const a=await r.e(66).then(r.bind(null,201));return Object(u.t)(e),await a.load({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData},e)}catch(t){throw Object(u.l)(t)||d.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${t}`),t}}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e&&e.portal,a=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.a.getDefault());return r&&a&&!Object(p.r)(a.restUrl,r.restUrl)?(e.messages&&e.messages.push(new c.a("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 the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return Object(a.a)([Object(s.b)({type:h.default})],e.prototype,"portalItem",null),Object(a.a)([Object(o.a)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),Object(a.a)([Object(l.a)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),Object(a.a)([Object(s.b)()],e.prototype,"resourceReferences",void 0),e=Object(a.a)([Object(n.a)("esri.layers.mixins.PortalLayer")],e),e}}});