text: self.webpackChunkRemoteClient([72],{105:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return i}));var a=n(2);function r(e,t,n){return Object(a.i)(e.map((e,a)=>t.apply(n,[e,a])))}function l(e,t,n){return Object(a.i)(e.map((e,a)=>t.apply(n,[e,a]))).then(e=>e.map(e=>e.value))}function i(e){return e.then(e=>({ok:!0,value:e})).catch(e=>({ok:!1,error:e}))}},208:function(e,t,n){"use strict";n.r(t),n.d(t,"load",(function(){return c}));var a=n(14),r=n(2),l=n(55),i=n(75),u=n(282),o=n(475),s=n(284);async function c(e,t){const n=e.instance.portalItem;return n&&n.id?(await n.load(t),function(e){const t=e.instance.portalItem;if(-1===e.supportedTypes.indexOf(t.type))throw new a.a("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:t.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,t){const n=e.instance,i=n.portalItem,{url:c,title:y}=i,m=Object(o.a)(i);if("group"===n.type)return n.read({title:y},m),function(e,t){let n;const i=e.portalItem.type;switch(i){case"Feature Service":n=s.a.FeatureLayer;break;case"Stream Service":n=s.a.StreamLayer;break;case"Scene Service":n=s.a.SceneLayer;break;case"Feature Collection":n=s.a.FeatureLayer;break;default:throw new a.a("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'GroupLayer'`)}let u;return n().then(e=>(u=e,f(t))).then(t=>p(t)>0?d(e,u,t):function(e,t){if(!e.portalItem.url)return Object(r.s)();return Object(l.default)(e.portalItem.url,{responseType:"json",query:{f:"json"}}).then(n=>{var a,r;const l=n.data;function i(e){return{id:e.id,name:e.name}}l&&d(e,t,{layers:null==(a=l.layers)?void 0:a.map(i),tables:null==(r=l.tables)?void 0:r.map(i)})})}(e,u))}(n,e);c&&n.read({url:c},m);const h=await f(e,t);return h&&n.read(h,m),n.resourceReferences={portalItem:i,paths:m.readResourcePaths},n.read({title:y},m),Object(u.a)(n,m)}(e,t)):Object(r.s)()}function d(e,t,n){let a=n.layers||[];const r=n.tables||[];"Feature Collection"===e.portalItem.type&&(a.forEach(e=>{var t;"Table"===(null==e||null==(t=e.layerDefinition)?void 0:t.type)&&r.push(e)}),a=a.filter(e=>{var t;return"Table"!==(null==e||null==(t=e.layerDefinition)?void 0:t.type)})),a.reverse().forEach(a=>{const r=y(e,t,n,a);e.add(r)}),r.reverse().forEach(a=>{const r=y(e,t,n,a);e.tables.add(r)})}function y(e,t,n,a){const r=new t({portalItem:e.portalItem.clone(),layerId:a.id,sublayerTitleMode:"service-name"});if("Feature Collection"===e.portalItem.type){const t={origin:"portal-item",portal:e.portalItem.portal||i.a.getDefault()};r.read(a,t);const l=n.showLegend;null!=l&&r.read({showLegend:l},t)}return r}function f(e,t){if(!1===e.supportsData)return Object(r.s)();const n=e.instance;return n.portalItem.fetchData("json",t).catch(()=>null).then(e=>{const t=e;let a;if(function(e){return"stream"!==e.type&&"layerId"in e}(n)){let r=!0;return e&&p(t)>0&&(null==n.layerId&&(n.layerId=function(e){const t=e.layers;if(t&&t.length)return t[0].id;const n=e.tables;return n&&n.length?n[0].id:null}(t)),a=function(e,t){const n=e.layers;if(n)for(let e=0;e<n.length;e++)if(n[e].id===t)return n[e];const a=e.tables;if(a)for(let e=0;e<a.length;e++)if(a[e].id===t)return a[e];return null}(t,n.layerId),a&&(1===p(t)&&(r=!1),null!=e.showLegend&&(a.showLegend=e.showLegend))),r&&"service-name"!==n.sublayerTitleMode&&(n.sublayerTitleMode="item-title-and-service-name"),a}return e})}function p(e){var t,n,a,r;return(null!=(t=null==e||null==(n=e.layers)?void 0:n.length)?t:0)+(null!=(a=null==e||null==(r=e.tables)?void 0:r.length)?a:0)}},282:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(38),r=n(2),l=n(105);async function i(e,t,n){const i=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(i&&"unique-value"===i.type&&i.styleOrigin){const u=await Object(l.c)(i.populateFromStyle());if(Object(r.u)(n),!1===u.ok){const n=u.error;t&&t.messages&&t.messages.push(new a.a("renderer:style-reference","Failed to create unique value renderer from style reference: "+n.message,{error:n,context:t})),e.clear("renderer",t.origin)}}}},284:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const a={BingMapsLayer:async()=>(await n.e(52).then(n.bind(null,433))).default,BuildingSceneLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(42)]).then(n.bind(null,419))).default,CSVLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(58)]).then(n.bind(null,434))).default,ElevationLayer:async()=>(await n.e(15).then(n.bind(null,429))).default,FeatureLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(62)]).then(n.bind(null,153))).default,GroupLayer:async()=>(await n.e(46).then(n.bind(null,330))).default,GeoRSSLayer:async()=>(await n.e(56).then(n.bind(null,403))).default,ImageryLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(10),n.e(16),n.e(51)]).then(n.bind(null,420))).default,ImageryTileLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(10),n.e(16),n.e(67)]).then(n.bind(null,418))).default,IntegratedMeshLayer:async()=>(await n.e(43).then(n.bind(null,427))).default,KMLLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(49)]).then(n.bind(null,431))).default,MapImageLayer:async()=>(await Promise.all([n.e(13),n.e(1),n.e(2),n.e(3),n.e(33)]).then(n.bind(null,369))).default,MapNotesLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(57)]).then(n.bind(null,407))).default,OpenStreetMapLayer:async()=>(await Promise.all([n.e(11),n.e(199)]).then(n.bind(null,408))).default,PointCloudLayer:async()=>(await n.e(37).then(n.bind(null,422))).default,RouteLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(59)]).then(n.bind(null,409))).default,SceneLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(4),n.e(47)]).then(n.bind(null,435))).default,StreamLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(44)]).then(n.bind(null,436))).default,TileLayer:async()=>(await Promise.all([n.e(1),n.e(2),n.e(3),n.e(38)]).then(n.bind(null,410))).default,UnknownLayer:async()=>(await n.e(75).then(n.bind(null,411))).default,UnsupportedLayer:async()=>(await n.e(76).then(n.bind(null,412))).default,VectorTileLayer:async()=>(await Promise.all([n.e(21),n.e(39)]).then(n.bind(null,421))).default,WebTileLayer:async()=>(await n.e(11).then(n.bind(null,331))).default,WMSLayer:async()=>(await n.e(40).then(n.bind(null,428))).default,WMTSLayer:async()=>(await Promise.all([n.e(11),n.e(200)]).then(n.bind(null,424))).default}},475:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(24),r=n(75);function l(e){return{origin:"portal-item",url:Object(a.I)(e.itemUrl),portal:e.portal||r.a.getDefault(),portalItem:e,readResourcePaths:[]}}}});