// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built require({cache:{"esri/core/accessorSupport/originUtils":function(){define(["exports","../multiOriginJSONSupportUtils"],function(b,a){b.updateOrigins=function(g){g?.writtenProperties&&g.writtenProperties.forEach(({target:e,propName:n,newOrigin:q})=>{a.isMultiOriginJSONMixin(e)&&q&&e.originOf(n)!==q&&e.updateOrigin(n,q)})};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/multiOriginJSONSupportUtils":function(){define(["exports"],function(b){b.isMultiOriginJSONMixin=function(a){return a&& "getAtOrigin"in a&&"originOf"in a};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/portal/support/jsonContext":function(){define(["exports","../../core/urlUtils","../Portal"],function(b,a,g){function e(n,q){return{origin:q,url:a.urlToObject(n.itemUrl),portal:n.portal||g.getDefault(),portalItem:n}}b.createForItemRead=function(n,q){return{...e(n,q),readResourcePaths:[]}};b.createForItemWrite=function(n,q,h){const d=a.urlToObject(n.itemUrl);return{...e(n,q),messages:[],writtenProperties:[], blockedRelativeUrls:[],verifyItemRelativeUrls:d?{rootPath:d.path,writtenUrls:[]}:null,resources:h?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/support/MapFloorInfo":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../layers/support/FacilityLayerInfo ../layers/support/LevelLayerInfo ../layers/support/SiteLayerInfo".split(" "), function(b,a,g,e,n,q,h,d,k,m){a=class extends a.JSONSupport{constructor(p){super(p);this.siteLayer=this.facilityLayer=this.levelLayer=null}};b.__decorate([g.property({type:k,json:{write:!0}})],a.prototype,"levelLayer",void 0);b.__decorate([g.property({type:d,json:{write:!0}})],a.prototype,"facilityLayer",void 0);b.__decorate([g.property({type:m,json:{write:!0}})],a.prototype,"siteLayer",void 0);return a=b.__decorate([h.subclass("esri.support.MapFloorInfo")],a)})},"esri/layers/support/FacilityLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){a=class extends a.JSONSupport{constructor(d){super(d);this.sublayerId=this.siteIdField=this.nameField=this.layerId=this.facilityIdField=null}};b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"facilityIdField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"nameField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype, "siteIdField",void 0);b.__decorate([g.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);return a=b.__decorate([h.subclass("esri.layers.support.FacilityLayerInfo")],a)})},"esri/layers/support/LevelLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){a=class extends a.JSONSupport{constructor(d){super(d);this.verticalOrderField=this.sublayerId=this.shortNameField=this.longNameField=this.levelNumberField=this.levelIdField=this.layerId=this.facilityIdField=null}};b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"facilityIdField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"levelIdField", void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"levelNumberField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"longNameField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"shortNameField",void 0);b.__decorate([g.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);b.__decorate([g.property({type:String, json:{write:!0}})],a.prototype,"verticalOrderField",void 0);return a=b.__decorate([h.subclass("esri.layers.support.LevelLayerInfo")],a)})},"esri/layers/support/SiteLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h){a=class extends a.JSONSupport{constructor(d){super(d);this.sublayerId=this.siteIdField= this.nameField=this.layerId=null}};b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"nameField",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"siteIdField",void 0);b.__decorate([g.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);return a=b.__decorate([h.subclass("esri.layers.support.SiteLayerInfo")], a)})},"esri/support/tagSymbols":function(){define(["exports"],function(b){const a=Symbol("WebScene");b.WebSceneTag=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/support/webSceneUtils":function(){define(["exports","../core/Error"],function(b,a){b.createCopyError=function(){return new a("webscene:failed-to-copy-embedded-resources","Copying of embedded resources is currently not supported")};b.createSchemaValidationError=function(g){return new a("webscene:schema-validation", "Failed to save webscene due to schema validation errors. See 'details.errors' for more detailed information",{errors:g})};b.schemaValidationErrorName="webscene:schema-validation";Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/spatialReferenceSupport":function(){define(["exports","../../geometry/support/SupportedGCSWkids","../ViewingMode"],function(b,a,g){b.isSpatialReferenceSupported=function(e,n){return null==e?!1:null==n?!0:n===g.ViewingMode.Local?e.isGeographic? e.isWGS84||e.wkid===a.SupportedGCSWkids.CGCS2000:!0:e.isWebMercator||e.isWGS84||e.wkid===a.SupportedGCSWkids.CGCS2000||e.wkid===a.SupportedGCSWkids.GCSMARS2000||e.wkid===a.SupportedGCSWkids.GCSMARS2000_SPHERE||e.wkid===a.SupportedGCSWkids.GCSMOON2000};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/Widgets":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/subclass ./widgets/FloorFilter ./widgets/Range ./widgets/TimeSlider".split(" "), function(b,a,g,e,n,q,h,d,k,m){var p;a=p=class extends a.JSONSupport{constructor(v){super(v);this.floorFilter=this.timeSlider=this.range=null}clone(){return new p(g.clone({range:this.range,timeSlider:this.timeSlider,floorFilter:this.floorFilter}))}};b.__decorate([e.property({type:k,json:{write:!0}})],a.prototype,"range",void 0);b.__decorate([e.property({type:m,json:{write:!0}})],a.prototype,"timeSlider",void 0);b.__decorate([e.property({type:d,json:{write:!0}})],a.prototype,"floorFilter",void 0);return a= p=b.__decorate([h.subclass("esri.webdoc.Widgets")],a)})},"esri/webdoc/widgets/FloorFilter":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(k){super(k);this.pinnedLevels=this.minimized=this.longNames=this.enabled=!1;this.level=this.facility=this.site=null}clone(){return new d(g.clone({enabled:this.enabled, longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site,facility:this.facility,level:this.level}))}};b.__decorate([e.property({type:Boolean,json:{read:{source:"enabled"},write:{target:"enabled"}}})],a.prototype,"enabled",void 0);b.__decorate([e.property({type:Boolean,json:{read:{source:"longNames"},write:{target:"longNames"}}})],a.prototype,"longNames",void 0);b.__decorate([e.property({type:Boolean,json:{read:{source:"minimized"},write:{target:"minimized"}}})], a.prototype,"minimized",void 0);b.__decorate([e.property({type:Boolean,json:{read:{source:"pinnedLevels"},write:{target:"pinnedLevels"}}})],a.prototype,"pinnedLevels",void 0);b.__decorate([e.property({type:String,json:{read:{source:"site"},write:{target:"site"}}})],a.prototype,"site",void 0);b.__decorate([e.property({type:String,json:{read:{source:"facility"},write:{target:"facility"}}})],a.prototype,"facility",void 0);b.__decorate([e.property({type:String,json:{read:{source:"level"},write:{target:"level"}}})], a.prototype,"level",void 0);return a=d=b.__decorate([h.subclass("esri.webdoc.widgets.FloorFilter")],a)})},"esri/webdoc/widgets/Range":function(){define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h,d){var k;a=new a.JSONMap({slider:"slider",picker:"picker"});g=k=class extends g.JSONSupport{constructor(m){super(m); this.stopInterval=this.numStops=this.interactionMode=null}clone(){return new k({interactionMode:this.interactionMode,numStops:this.numStops,stopInterval:this.stopInterval})}};b.__decorate([e.property({type:a.apiValues,nonNullable:!0,json:{type:a.jsonValues,default:null,read:{reader:a.read},write:{isRequired:!0,writer:a.write}}})],g.prototype,"interactionMode",void 0);b.__decorate([e.property({type:n.Integer,json:{read:{source:"numberOfStops"},write:{target:"numberOfStops",overridePolicy(){const m= null!=this.stopInterval;return{enabled:!m,isRequired:!m}}}}})],g.prototype,"numStops",void 0);b.__decorate([e.property({type:Number,json:{write:{overridePolicy(){return{isRequired:null==this.numStops}}}}})],g.prototype,"stopInterval",void 0);return g=k=b.__decorate([d.subclass("esri.webdoc.widgets.Range")],g)})},"esri/webdoc/widgets/TimeSlider":function(){define("../../chunks/tslib.es6 ../../TimeExtent ../../TimeInterval ../../core/JSONSupport ../../core/lang ../../core/object ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../portal/timeUnitKebabDictionary".split(" "), function(b,a,g,e,n,q,h,d,k,m,p,v){var E;e=E=class extends e.JSONSupport{constructor(t){super(t);this.fullTimeExtent=this.currentTimeExtent=null;this.loop=!1;this.stops=this.stopInterval=this.stopDelay=this.numThumbs=this.numStops=null}readCurrentTimeExtent(t){if(t)return new a({start:null!=t[0]?new Date(t[0]):null,end:null!=t[1]?new Date(t[1]):null})}writeCurrentTimeExtent(t,D,F){t&&q.setDeepValue(F,[null!=t.start?t.start.getTime():null,null!=t.end?t.end.getTime():null],D)}readFullTimeExtent(t,D){if(t= D.properties)return new a({start:null!=t.startTime?new Date(t.startTime):null,end:null!=t.endTime?new Date(t.endTime):null})}writeFullTimeExtent(t,D){if(t){D=D.properties=D.properties||{};var F=t.end;t=t.start;F&&(D.endTime=null!=F?F.getTime():null);t&&(D.startTime=null!=t?t.getTime():null)}}readStopInterval(t,D,F){return t?g.fromJSON({value:t.interval,unit:t.units},F):null}writeStopInterval(t,D,F,H){t&&(t=t.toJSON(H),q.setDeepValue("properties.timeStopInterval",{interval:t.value,units:t.unit},D))}readStops(t){return t?.length? t.map(D=>new Date(D)):null}writeStops(t,D,F){t?.length&&q.setDeepValue(F,t.map(H=>H.getTime()),D)}clone(){return new E(n.clone({currentTimeExtent:this.currentTimeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:this.numStops,numThumbs:this.numThumbs,stopDelay:this.stopDelay,stopInterval:this.stopInterval,stops:this.stops}))}};b.__decorate([h.property({type:a,json:{type:[[d.Integer,d.Null]],read:{source:"properties.currentTimeExtent"},write:{target:"properties.currentTimeExtent"}}})], e.prototype,"currentTimeExtent",void 0);b.__decorate([k.reader("currentTimeExtent")],e.prototype,"readCurrentTimeExtent",null);b.__decorate([p.writer("currentTimeExtent")],e.prototype,"writeCurrentTimeExtent",null);b.__decorate([h.property({type:a,json:{read:{source:["properties.endTime","properties.startTime"]},write:{target:{"properties.endTime":{type:Number},"properties.startTime":{type:Number}}}}})],e.prototype,"fullTimeExtent",void 0);b.__decorate([k.reader("fullTimeExtent")],e.prototype,"readFullTimeExtent", null);b.__decorate([p.writer("fullTimeExtent")],e.prototype,"writeFullTimeExtent",null);b.__decorate([h.property({type:Boolean,nonNullable:!0,json:{default:!1,read:{source:"properties.loop"},write:{target:"properties.loop"}}})],e.prototype,"loop",void 0);b.__decorate([h.property({type:d.Integer,json:{read:{source:"properties.numberOfStops"},write:{target:"properties.numberOfStops",overridePolicy(){var t=!!this.stops?.length;t=!(this.stopInterval||t);return{enabled:t,isRequired:t}}}}})],e.prototype, "numStops",void 0);b.__decorate([h.property({type:[1,2],nonNullable:!0,json:{type:d.Integer,read:{source:"properties.thumbCount"},write:{target:"properties.thumbCount",isRequired:!0}}})],e.prototype,"numThumbs",void 0);b.__decorate([h.property({type:Number,nonNullable:!0,json:{read:{source:"properties.thumbMovingRate"},write:{target:"properties.thumbMovingRate",isRequired:!0}}})],e.prototype,"stopDelay",void 0);b.__decorate([h.property({type:g,json:{read:{source:"properties.timeStopInterval"},write:{target:{"properties.timeStopInterval.interval":{type:Number}, "properties.timeStopInterval.units":{type:v.timeUnitKebabDictionary.jsonValues.filter(t=>"esriTimeUnitsUnknown"!==t)}},overridePolicy(){const t=!!this.stops?.length;return{enabled:!t,isRequired:!(null!=this.numStops||t)}}}}})],e.prototype,"stopInterval",void 0);b.__decorate([k.reader("stopInterval")],e.prototype,"readStopInterval",null);b.__decorate([p.writer("stopInterval")],e.prototype,"writeStopInterval",null);b.__decorate([h.property({type:[Date],json:{type:[d.Integer],read:{source:"properties.stops"}, write:{target:"properties.stops",overridePolicy(){return{isRequired:null==this.numStops&&!this.stopInterval}}}}})],e.prototype,"stops",void 0);b.__decorate([k.reader("stops")],e.prototype,"readStops",null);b.__decorate([p.writer("stops")],e.prototype,"writeStops",null);return e=E=b.__decorate([m.subclass("esri.webdoc.widgets.TimeSlider")],e)})},"esri/webdoc/support/resourceUtils":function(){define("require exports ../../core/Error ../../core/promiseUtils ../../core/uuid ../../portal/support/resourceUtils".split(" "), function(b,a,g,e,n,q){async function h(k,m,p){if(m?.resources){var v=m.portalItem===k.portalItem?new Set(k.paths):new Set;k.paths.length=0;k.portalItem=m.portalItem;var E=new Set(m.resources.toKeep.map(y=>y.resource.path)),t=new Set,D=[];E.forEach(y=>{v.delete(y);k.paths.push(y)});var F=[],H=[],O=[];for(const y of m.resources.toUpdate)if(v.delete(y.resource.path),E.has(y.resource.path)||t.has(y.resource.path)){const {resource:P,content:U,finish:Z}=y,J=q.getSiblingOfSameTypeI(P,n.generateUUID());k.paths.push(J.path); F.push({resource:J,content:await q.contentToBlob(U),compress:y.compress});Z&&O.push(()=>Z(J))}else{k.paths.push(y.resource.path);H.push({resource:y.resource,content:await q.contentToBlob(y.content),compress:y.compress});const P=y.finish;P&&O.push(()=>P(y.resource));t.add(y.resource.path)}for(const y of m.resources.toAdd)if(k.paths.push(y.resource.path),v.has(y.resource.path))v.delete(y.resource.path);else{F.push({resource:y.resource,content:await q.contentToBlob(y.content),compress:y.compress});const P= y.finish;P&&O.push(()=>P(y.resource))}if(F.length||H.length)({addOrUpdateResources:E}=await new Promise((y,P)=>b(["../../portal/support/resourceUtils"],y,P))),await E(m.portalItem,F,"add",p),await E(m.portalItem,H,"update",p);O.forEach(y=>y());if(0===D.length)return v;m=await e.allSettledErrors(D);e.throwIfAborted(p);if(0({created:new Date(D),size:F,resource:h.resourceFromPath(H)}))}};b.getSiblingOfSameType=function(h,d){if(!h.hasPath())return null;const [k,,m]=q(h.path);return h.portalItem.resourceFromPath(e.join(k,d+m))};b.getSiblingOfSameTypeI=function(h,d){if(!h.hasPath())return null;const [k,,m]=q(h.path);return h.portalItem.resourceFromPath(e.join(k,d+m))};b.removeAllResources=async function(h,d){await h.load(d);const k=e.join(h.userItemUrl,"removeResources"); return h.portal.request(k,{method:"post",query:{deleteAll:!0},signal:d?.signal})};b.removeResource=async function(h,d,k){if(!d.hasPath())throw new g("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await h.load(k);const m=e.join(h.userItemUrl,"removeResources");await h.portal.request(m,{method:"post",query:{resource:d.path},signal:k?.signal});d.portalItem=null};b.splitPrefixFileNameAndExtension=q;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/support/saveAPIKeyUtils":function(){define(["exports", "../../config","../../core/Error","../../support/apiKeyUtils"],function(b,a,g,e){b.validateSaveAPIKey=function(n){if(a.apiKey&&e.supportsApiKey(n.portal.url))throw new g("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${n.portal.url} when using an api key`);};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/support/saveUtils":function(){define(["exports","../../core/Error"],function(b,a){const g=new Set(["layer:unsupported","property:unsupported", "symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);b.beforeSave=async function(e){const n=[];for(const q of e.allLayers)"beforeSave"in q&&"function"===typeof q.beforeSave&&(e=q.beforeSave())&&n.push(e);await Promise.allSettled(n)};b.evaluateWriteErrors=function(e,n,q){let h=(e.messages??[]).filter(({type:d})=>"error"===d).map(({name:d,message:k,details:m})=>new a(d,k,m));e.blockedRelativeUrls&&(h=h.concat(e.blockedRelativeUrls.map(d=>new a("url:unsupported",`Relative url '${d}' is not supported`)))); if(q){const {ignoreUnsupported:d,supplementalUnsupportedErrors:k=[],requiredPropertyChecksDisabled:m}=q;d&&(h=h.filter(({name:p})=>!(g.has(p)||k.includes(p))));m&&(h=h.filter(p=>"web-document-write:property-required"!==p.name))}if(0e?q=n/1.5:1.5g.width&&(q*=g.width/n,n=g.width);q>g.height&&(n*=g.height/q,q=g.height);return{width:Math.round(n),height:Math.round(q)}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/ApplicationProperties":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../webdoc/applicationProperties/Viewing".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.viewing=null}clone(){return new k({viewing:this.viewing?.clone()??null})}};b.__decorate([g.property({type:d,json:{write:!0}})],a.prototype,"viewing",void 0);return a=k=b.__decorate([h.subclass("esri.webscene.ApplicationProperties")],a)})},"esri/webdoc/applicationProperties/Viewing":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ./Search".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.search=null}clone(){return new k(g.clone({search:this.search}))}};b.__decorate([e.property({type:d,json:{write:!0}})],a.prototype,"search",void 0);return a=k=b.__decorate([h.subclass("esri.webdoc.applicationProperties.Viewing")],a)})},"esri/webdoc/applicationProperties/Search":function(){define("../../chunks/tslib.es6 ../../core/Collection ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../core/accessorSupport/extensions/serializableProperty/writePolicyUtils ./SearchLayer ./SearchTable".split(" "), function(b,a,g,e,n,q,h,d,k,m,p,v,E){var t;const D=a.ofType(v),F=a.ofType(E);a=t=class extends g.JSONSupport{constructor(H){super(H);this.enabled=this.addressSearchEnabled=!0;this.hintText=null;this.layers=new D;this.tables=new F}readAddressSearchEnabled(H){return!H}writeAddressSearchEnabled(H,O,y){O[y]=!H}clone(){return new t(e.clone({addressSearchEnabled:this.addressSearchEnabled,enabled:this.enabled,hintText:this.hintText,layers:this.layers,tables:this.tables}))}};b.__decorate([n.property({type:Boolean, nonNullable:!0,json:{read:{source:"disablePlaceFinder"},write:{target:"disablePlaceFinder",isRequired:!0},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"addressSearchEnabled",void 0);b.__decorate([d.reader("addressSearchEnabled")],a.prototype,"readAddressSearchEnabled",null);b.__decorate([m.writer("addressSearchEnabled")],a.prototype,"writeAddressSearchEnabled",null);b.__decorate([n.property({type:Boolean,nonNullable:!0,json:{write:!0,origins:{"web-map":{write:{isRequired:!0}},"web-scene":{default:!0, write:!0}}}})],a.prototype,"enabled",void 0);b.__decorate([n.property({type:String,json:{write:!0}})],a.prototype,"hintText",void 0);b.__decorate([n.property({type:D,json:{write:{overridePolicy:p.writeNonEmptyCollectionPolicy},origins:{"web-scene":{write:{isRequired:!0}}}}})],a.prototype,"layers",void 0);b.__decorate([n.property({type:F,json:{read:!0,write:{overridePolicy:p.writeNonEmptyCollectionPolicy}}})],a.prototype,"tables",void 0);return a=t=b.__decorate([k.subclass("esri.webdoc.applicationProperties.Search")], a)})},"esri/core/accessorSupport/extensions/serializableProperty/writePolicyUtils":function(){define(["exports"],function(b){b.writeNonEmptyCollectionPolicy=function(a){return{enabled:!!a?.length}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/applicationProperties/SearchLayer":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/accessorSupport/decorators/subclass ./SearchLayerField".split(" "), function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(k){super(k);this.subLayer=this.id=this.field=null}clone(){return new d(g.clone({field:this.field,id:this.id,subLayer:this.subLayer}))}};b.__decorate([e.property({type:h,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0);b.__decorate([e.property({type:String,json:{write:{isRequired:!0}}})],a.prototype,"id",void 0);b.__decorate([e.property({type:n.Integer,json:{write:!0}})],a.prototype,"subLayer",void 0);return a=d=b.__decorate([q.subclass("esri.webdoc.applicationProperties.SearchLayer")], a)})},"esri/webdoc/applicationProperties/SearchLayerField":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../layers/support/fieldType".split(" "),function(b,a,g,e,n,q,h,d,k){var m;a=m=class extends a.JSONSupport{constructor(p){super(p);this.exactMatch=!1;this.type=this.name=null}clone(){return new m({exactMatch:this.exactMatch, type:this.type,name:this.name})}};b.__decorate([g.property({type:Boolean,json:{write:!0}})],a.prototype,"exactMatch",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([h.enumeration(k.kebabDict)],a.prototype,"type",void 0);return a=m=b.__decorate([d.subclass("esri.webdoc.applicationProperties.SearchLayerField")],a)})},"esri/webdoc/applicationProperties/SearchTable":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ./SearchTableField".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.id=this.field=null}clone(){return new k(g.clone({field:this.field,id:this.id}))}};b.__decorate([e.property({type:d,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0);b.__decorate([e.property({type:String,json:{write:{isRequired:!0}}})],a.prototype,"id",void 0);return a=k=b.__decorate([h.subclass("esri.webdoc.applicationProperties.SearchTable")],a)})},"esri/webdoc/applicationProperties/SearchTableField":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../layers/support/fieldType".split(" "), function(b,a,g,e,n,q,h,d,k){var m;a=m=class extends a.JSONSupport{constructor(p){super(p);this.exactMatch=!1;this.type=this.name=null}clone(){return new m({exactMatch:this.exactMatch,type:this.type,name:this.name})}};b.__decorate([g.property({type:Boolean,json:{write:!0}})],a.prototype,"exactMatch",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([h.enumeration(k.kebabDict)],a.prototype,"type",void 0);return a=m=b.__decorate([d.subclass("esri.webdoc.applicationProperties.SearchTableField")], a)})},"esri/webscene/Environment":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/lang ../core/Logger ../core/accessorSupport/decorators/property ../core/has ../core/accessorSupport/decorators/subclass ../views/3d/environment/SunnyWeather ../views/3d/environment/weather ./lightingTypes ./SunLighting ./VirtualLighting ./background/utils".split(" "),function(b,a,g,e,n,q,h,d,k,m,p,v,E){var t;q=(D,F,H)=>({enabled:!H?.isPresentation});a=t=class extends a.JSONSupport{constructor(D){super(D); this.lighting=new p;this.background=null;this.starsEnabled=this.atmosphereEnabled=!0}set weather(D){k.validateWeatherType(D?.type,e.getLogger(this))&&this._set("weather",D)}clone(){return new t(this.cloneConstructProperties())}cloneConstructProperties(){return{lighting:this.lighting&&"virtual"===this.lighting.type?v.prototype.clone.call(this.lighting):p.prototype.clone.call(this.lighting),background:g.clone(this.background),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,weather:this.weather.clone()}}}; b.__decorate([n.property({types:m.lightingTypes,nonNullable:!0,json:{write:!0}})],a.prototype,"lighting",void 0);b.__decorate([n.property(E.backgroundProperty)],a.prototype,"background",void 0);b.__decorate([n.property({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:q}}})],a.prototype,"atmosphereEnabled",void 0);b.__decorate([n.property({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:q}}})],a.prototype,"starsEnabled",void 0);b.__decorate([n.property({types:k.weatherTypes,nonNullable:!0, json:{write:!0},value:new d})],a.prototype,"weather",null);return a=t=b.__decorate([h.subclass("esri.webscene.Environment")],a)})},"esri/views/3d/environment/SunnyWeather":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/enumeration ../../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h,d){var k; a=k=class extends a.JSONSupport{constructor(m){super(m);this.type="sunny";this.cloudCover=.5}clone(){return new k({cloudCover:this.cloudCover})}};b.__decorate([h.enumeration({sunny:"sunny"})],a.prototype,"type",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],a.prototype,"cloudCover",void 0);return a=k=b.__decorate([d.subclass("esri.views.3d.environment.SunnyWeather")],a)})},"esri/views/3d/environment/weather":function(){define("exports ./CloudyWeather ./FoggyWeather ./RainyWeather ./SnowyWeather ./SunnyWeather".split(" "), function(b,a,g,e,n,q){a={key:"type",base:q,typeMap:{sunny:q,cloudy:a,rainy:e,snowy:n,foggy:g}};const h=Object.keys(a.typeMap);b.cloudsHeight=1E5;b.validateWeatherType=function(d,k){return h.includes(d)?!0:(k.error(`"${d}" is not a valid weather type`),!1)};b.weatherHeightLimit=1E4;b.weatherTypes=a;b.weatherTypesArray=h;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/environment/CloudyWeather":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/enumeration ../../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.type="cloudy";this.cloudCover=.5}clone(){return new k({cloudCover:this.cloudCover})}};b.__decorate([h.enumeration({cloudy:"cloudy"})],a.prototype,"type",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],a.prototype,"cloudCover",void 0);return a=k=b.__decorate([d.subclass("esri.views.3d.environment.CloudyWeather")],a)})},"esri/views/3d/environment/FoggyWeather":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/enumeration ../../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.type="foggy";this.fogStrength=.5}clone(){return new k({fogStrength:this.fogStrength})}};b.__decorate([h.enumeration({foggy:"foggy"})],a.prototype,"type",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],a.prototype,"fogStrength",void 0);return a=k=b.__decorate([d.subclass("esri.views.3d.environment.FoggyWeather")],a)})},"esri/views/3d/environment/RainyWeather":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/enumeration ../../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.type="rainy";this.precipitation=this.cloudCover=.5}clone(){return new k({cloudCover:this.cloudCover,precipitation:this.precipitation})}};b.__decorate([h.enumeration({rainy:"rainy"})],a.prototype,"type",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],a.prototype,"cloudCover",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1}, json:{write:!0}})],a.prototype,"precipitation",void 0);return a=k=b.__decorate([d.subclass("esri.views.3d.environment.RainyWeather")],a)})},"esri/views/3d/environment/SnowyWeather":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/enumeration ../../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q, h,d){var k;a=k=class extends a.JSONSupport{constructor(m){super(m);this.type="snowy";this.precipitation=this.cloudCover=.5;this.snowCover="disabled"}clone(){return new k({cloudCover:this.cloudCover,precipitation:this.precipitation,snowCover:this.snowCover})}};b.__decorate([h.enumeration({snowy:"snowy"})],a.prototype,"type",void 0);b.__decorate([g.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],a.prototype,"cloudCover",void 0);b.__decorate([g.property({type:Number,nonNullable:!0, range:{min:0,max:1},json:{write:!0}})],a.prototype,"precipitation",void 0);b.__decorate([g.property({type:["enabled","disabled"],nonNullable:!0,json:{write:!0}})],a.prototype,"snowCover",void 0);return a=k=b.__decorate([d.subclass("esri.views.3d.environment.SnowyWeather")],a)})},"esri/webscene/lightingTypes":function(){define(["exports","./SunLighting","./VirtualLighting"],function(b,a,g){b.lightingTypes={key:"type",defaultKeyValue:"sun",base:null,typeMap:{sun:a,virtual:g}};Object.defineProperty(b, Symbol.toStringTag,{value:"Module"})})},"esri/webscene/SunLighting":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/reader ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer".split(" "),function(b,a,g,e,n,q,h,d,k){var m;a=m=class extends a.JSONSupport{constructor(p){super(p);this.type="sun";this.date=null;this.directShadowsEnabled= !1;this.displayUTCOffset=null}readDate(p,v){return null!=v.datetime&&new Date(v.datetime)||null}writeDate(p,v,E){v[E]=p.getTime()}readDirectShadowsEnabled(p,v){return!!v.directShadows}writedirectShadowsEnabled(p,v,E){p&&(v[E]=p)}writeDisplayUTCOffset(p,v){null!=p&&(v.displayUTCOffset=p)}clone(){return new m(this.cloneConstructProperties())}cloneConstructProperties(){const p={directShadowsEnabled:this.directShadowsEnabled,displayUTCOffset:null!=this.displayUTCOffset?this.displayUTCOffset:null};null!= this.date&&(p.date=new Date(this.date.getTime()));return p}};b.__decorate([g.property({readOnly:!0,type:["sun"],json:{write:!0}})],a.prototype,"type",void 0);b.__decorate([g.property({type:Date,json:{type:Number,write:{target:"datetime"}}})],a.prototype,"date",void 0);b.__decorate([h.reader("date",["datetime"])],a.prototype,"readDate",null);b.__decorate([k.writer("date")],a.prototype,"writeDate",null);b.__decorate([g.property({type:Boolean,json:{default:!1,write:{target:"directShadows"}}})],a.prototype, "directShadowsEnabled",void 0);b.__decorate([h.reader("directShadowsEnabled",["directShadows"])],a.prototype,"readDirectShadowsEnabled",null);b.__decorate([k.writer("directShadowsEnabled")],a.prototype,"writedirectShadowsEnabled",null);b.__decorate([g.property({type:Number,json:{write:!0}})],a.prototype,"displayUTCOffset",void 0);b.__decorate([k.writer("displayUTCOffset")],a.prototype,"writeDisplayUTCOffset",null);return a=m=b.__decorate([d.subclass("esri.webscene.SunLighting")],a)})},"esri/webscene/VirtualLighting":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(k){super(k);this.type="virtual";this.directShadowsEnabled=!1}clone(){return new d(this.cloneConstructProperties())}cloneConstructProperties(){return{directShadowsEnabled:this.directShadowsEnabled}}};b.__decorate([g.property({readOnly:!0,type:["virtual"],json:{write:!0}})],a.prototype,"type",void 0);b.__decorate([g.property({type:Boolean,json:{default:!1,name:"directShadows",write:!0}})],a.prototype,"directShadowsEnabled",void 0); return a=d=b.__decorate([h.subclass("esri.webscene.VirtualLighting")],a)})},"esri/webscene/background/utils":function(){define(["exports","./Background","./ColorBackground"],function(b,a,g){a={base:a,key:"type",typeMap:{color:g}};a={types:a,json:{read:function(e){return(n,q,h)=>{if(!n)return n;for(const d in e.typeMap)if(n.type===d)return q=new e.typeMap[d],q.read(n,h),q}}(a),write:{overridePolicy:(e,n,q)=>({enabled:!q?.isPresentation})}}};b.backgroundProperty=a;Object.defineProperty(b,Symbol.toStringTag, {value:"Module"})})},"esri/webscene/background/Background":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h){a=class extends a.JSONSupport{constructor(d){super(d)}clone(){throw Error("Subclasses of Background should implement their own clone method.");}};b.__decorate([g.property({readOnly:!0,json:{read:!1}})], a.prototype,"type",void 0);return a=b.__decorate([h.subclass("esri.webscene.background.Background")],a)})},"esri/webscene/background/ColorBackground":function(){define("../../chunks/tslib.es6 ../../Color ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../symbols/support/materialUtils ./Background".split(" "),function(b,a,g,e,n,q,h,d,k,m){var p;e= {...k.colorAndTransparencyProperty,nonNullable:!0};m=p=class extends m{constructor(v){super(v);this.type="color";this.color=new a([0,0,0,1])}clone(){return new p(this.cloneProperties())}cloneProperties(){return{color:this.color.clone()}}};b.__decorate([h.enumeration({color:"color"},{readOnly:!0})],m.prototype,"type",void 0);b.__decorate([g.property(e)],m.prototype,"color",void 0);return m=p=b.__decorate([d.subclass("esri.webscene.background.ColorBackground")],m)})},"esri/webscene/InitialViewProperties":function(){define("../chunks/tslib.es6 ../Viewpoint ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/SpatialReference ../webdoc/support/timeProperties ./Environment".split(" "), function(b,a,g,e,n,q,h,d,k,m,p){var v;g=v=class extends g.JSONSupport{constructor(E){super(E);this.environment=new p;this.timeExtent=this.viewpoint=this.spatialReference=null}set viewingMode(E){this._set("viewingMode",E)}clone(){return new v({environment:this.environment.clone(),spatialReference:this.spatialReference?.clone()??null,viewingMode:this.viewingMode,viewpoint:this.viewpoint?.clone()??null,timeExtent:this.timeExtent?.clone()??null})}};b.__decorate([e.property({type:p,json:{write:{isRequired:!0}}})], g.prototype,"environment",void 0);b.__decorate([e.property({type:k})],g.prototype,"spatialReference",void 0);b.__decorate([e.property({type:["local","global"]})],g.prototype,"viewingMode",null);b.__decorate([e.property({type:a,json:{write:{isRequired:!0}}})],g.prototype,"viewpoint",void 0);b.__decorate([e.property(m.timeExtent)],g.prototype,"timeExtent",void 0);return g=v=b.__decorate([d.subclass("esri.webscene.InitialViewProperties")],g)})},"esri/webdoc/support/timeProperties":function(){define(["exports", "../../TimeExtent","../../core/Error","../../core/accessorSupport/ensureType"],function(b,a,g,e){b.timeExtent={type:a,json:{read:{source:"timeExtent",reader:n=>n?Array.isArray(n)?a.fromArray(n):a.fromJSON(n):null},write:{writer:(n,q,h,d)=>{n&&(n.isEmpty?d?.messages&&d.messages.push(new g("invalid-timeExtent","TimeExtent cannot be empty")):q[h]=n.toArray())},target:{timeExtent:{type:[[e.Integer,e.Null]]}}}}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/Presentation":function(){define("../chunks/tslib.es6 ../core/Collection ../core/collectionUtils ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ./Slide".split(" "), function(b,a,g,e,n,q,h,d,k,m){const p=a.ofType(m);a=class extends e.JSONSupport{constructor(v){super(v);this.slides=new p}destroy(){this.slides.forEach(v=>v.destroy());this.slides.removeAll()}set slides(v){v&&=v.filter(E=>!!E.viewpoint);this._set("slides",g.referenceSetter(v,this._get("slides"),p))}clone(){return new this.constructor({slides:this.slides.clone()})}};b.__decorate([n.property({type:p,nonNullable:!0,json:{write:!0}}),q.cast(g.castForReferenceSetter)],a.prototype,"slides",null);return a= b.__decorate([k.subclass("esri.webscene.Presentation")],a)})},"esri/webscene/Slide":function(){define("require ../chunks/tslib.es6 ../Basemap ../Viewpoint ../core/asyncUtils ../core/Collection ../core/collectionUtils ../core/JSONSupport ../core/Logger ../core/mathUtils ../core/maybe ../core/promiseUtils ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ../core/accessorSupport/ensureType ../chunks/vec32 ../core/libs/gl-matrix-2/factories/vec3f64 ../layers/Layer ../support/basemapUtils ../views/support/Scheduler ../webdoc/support/SlideThumbnail ../webdoc/support/timeProperties ./SunLighting ./VirtualLighting ./support/Description ./support/SlideEnvironment ./support/SlideGround ./support/SlideVisibleLayer ./support/Title".split(" "), function(b,a,g,e,n,q,h,d,k,m,p,v,E,t,D,F,H,O,y,P,U,Z,J,aa,V,da,z,Y,K,S,r,A,x){function M(l){if("building-scene"===l.type||"map-image"===l.type)return l.allSublayers.toArray()}function W(l){if(l=M(l))return l.filter(w=>w.visible).map(w=>w.id)}function ka(l,w){l=w-l;43200l&&(l+=86400);return l}let oa=0;const na=q.ofType(A.SlideVisibleLayer);d=class extends d.JSONSupport{constructor(l){super(l);this.id=Date.now().toString(16)+"-slide-"+oa++;this.title=new x;this.description=new K; this.hidden=!1;this.thumbnail=new V.SlideThumbnail;this.ground=this.basemap=this.viewpoint=null;this.environment=new S.SlideEnvironment;this.timeExtent=null;this.visibleLayers=new na}destroy(){this.visibleLayers.removeAll();this.basemap=null;this.thumbnail=p.destroyMaybe(this.thumbnail);this.thumbnail=this.title=this.description=null}castTitle(l){return"string"===typeof l?new x({text:l}):y.ensureType(x,l)}castDescription(l){return"string"===typeof l?new K({text:l}):y.ensureType(K,l)}castThumbnail(l){return"string"=== typeof l?new V.SlideThumbnail({url:l}):y.ensureType(V.SlideThumbnail,l)}castBasemap(l){return J.ensureType(l)}set visibleLayers(l){this._set("visibleLayers",h.referenceSetter(l,this._get("visibleLayers"),na))}castVisibleLayers(l){return l&&"function"===typeof l.map?l.map(w=>{if("string"===typeof w)return{id:w};if(w instanceof Z){const C=W(w);return{id:w.id,sublayerIds:C}}if(w.id)return{id:w.id,sublayerIds:"sublayerIds"in w?w.sublayerIds:void 0};k.getLogger(this).warn('Invalid visible layer, expected { id }, Layer or "id"'); return w}):null}clone(){return new this.constructor({id:this.id,title:this.title.clone(),thumbnail:this.thumbnail.clone(),description:this.description&&this.description.clone()||null,viewpoint:this.viewpoint&&this.viewpoint.clone()||null,basemap:this.basemap?.clone()||null,ground:this.ground?.clone()||null,visibleLayers:this.visibleLayers.clone(),environment:this.environment&&this.environment.clone()||null,hidden:this.hidden,timeExtent:this.timeExtent?.clone()??null})}async _updateVisibleLayersFrom(l){const w= [];await Promise.allSettled(this._getLayers(l.map).map(C=>l.whenLayerView(C).then(L=>{if(L.visible){const N=W(C);w.push(new A.SlideVisibleLayer({id:L.layer.id,sublayerIds:N}))}})).toArray());this.visibleLayers.removeAll();this.visibleLayers.addMany(w)}updateFrom(l,w){const C={format:"png",quality:80,width:120,height:75,disableDecorations:!0,...w?.screenshot};return l.when(()=>{this.viewpoint=l.viewpoint.clone();this.environment.lighting="virtual"===l.environment.lighting.type?Y.prototype.clone.apply(l.environment.lighting): z.prototype.clone.apply(l.environment.lighting);this.environment.weather=l.environment.weather.clone();this.basemap=l.map.basemap&&l.map.basemap.clone()||null;this.ground=l.map.ground?r.fromGround(l.map.ground):null;this.timeExtent=l.timeExtent?.clone()??null;return this._updateVisibleLayersFrom(l)}).then(()=>l.takeScreenshot(C)).then(L=>{this.thumbnail=new V.SlideThumbnail({url:L.dataUrl});return this})}async applyTo(l,w){null!=this._applyToController&&this._applyToController.abort();let C=new AbortController; this._applyToController=C;const L=v.onAbortOrThrow(w,()=>C?.abort()),N=()=>{this._applyToController===C&&(this._applyToController=null);C=null;L?.remove()};try{await E.whenOnce(()=>l.ready,C.signal)}catch(ea){throw N(),ea;}if(C.signal.aborted)throw N(),v.createAbortError();const T=l.resourceController.scheduler.registerTask(aa.TaskPriority.SLIDE);let fa=!1;const R={animate:!0,...w,signal:this._applyToController.signal};w=await n.result(l.addUpdatingPromise((async()=>{await Promise.all([T.schedule(async()=> fa=await this._setViewpointOfInterest(l,R)),T.schedule(()=>this._applyBasemap(l,R),R.signal)]);await this._loadLayersWithSublayerVisibility(l);await Promise.all([T.schedule(()=>this._applyLayerVisibility(l),R.signal),T.schedule(()=>this._applyGround(l),R.signal),T.schedule(()=>this._applyViewpoint(l,R),R.signal),T.schedule(()=>l.timeExtent=this.timeExtent?.clone()??null,R.signal)]);await T.schedule(()=>l.environment.weather=this.environment.weather.clone())})()));fa&&(l.contentCamera=null);T.remove(); N();if(!1===w.ok)throw w.error;return this}async _applyBasemap(l,w){if(this.basemap){try{await this.basemap.load(w)}catch(C){if(v.isAbortError(C))throw C;}l.map.basemap=J.clonePreservingTiledLayers(this.basemap,l.map.basemap)}}_applyGround(l){this.ground&&(l.map.ground=this.ground.cloneAndApplyTo(l.map.ground))}_getLayers(l){const w=new q;this._collectLayers(l,w);this._collectLayers(l.ground,w);return w}_collectLayers(l,w){l.layers.forEach(C=>{C.persistenceEnabled&&(w.add(C),"layers"in C&&this._collectLayers(C, w))})}async _loadLayersWithSublayerVisibility(l){this.visibleLayers&&await Promise.allSettled(this._getLayers(l.map).items.map(w=>this.visibleLayers.find(C=>C.id===w.id)?.sublayerIds?w.load():null))}_applyLayerVisibility(l){this.visibleLayers&&this._getLayers(l.map).forEach(w=>{var C=this.visibleLayers.find(N=>N.id===w.id);w.visible=null!=C;const L=C?.sublayerIds;C=M(w);L&&C&&C.forEach(N=>N.visible=L.includes(N.id))})}async _setViewpointOfInterest(l,w){if(l.state.fixedContentCamera||!this.viewpoint|| w?.ignoreViewpoint||!w?.useDestinationCamera)return!1;({toCameraAsync:w}=await new Promise((C,L)=>b(["../views/3d/support/viewpointUtils"],C,L)));w=await w(l,this.viewpoint);l.contentCamera=w;return null!=w}async _applyViewpoint(l,w){this._applyCachedCameraTrackingEnabled(l);if(this.viewpoint&&!w.ignoreViewpoint){null!=this.viewpoint.camera&&(this.viewpoint.camera.fov=l.camera.fov);const C=this.environment.lighting;if(w.animate&&"sun"===C.type&&C.date)return this._animateToLighting(l,w);w.animate&& (l.environment.applyLighting(C.clone()),await l.goTo(this.viewpoint,w));l.viewpoint=this.viewpoint}l.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(l,w){let C=null;"virtual"!==l.environment.lighting.type&&"virtual"!==this.environment.lighting.type&&("global"===l.viewingMode&&(C=this._animateLightingWithCamera(l,l.environment.lighting,this.environment.lighting)),l.environment.cachedCameraTrackingEnabled=l.environment.lighting.cameraTrackingEnabled,l.environment.lighting.cameraTrackingEnabled= !1);l.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled;"virtual"===this.environment.lighting.type||"virtual"===l.environment.lighting.type?(l.environment.applyLighting(this.environment.lighting.clone()),"virtual"!==l.environment.lighting.type&&(l.environment.cachedCameraTrackingEnabled=l.environment.lighting.cameraTrackingEnabled,l.environment.lighting.cameraTrackingEnabled=!1)):null!=this.environment.lighting.displayUTCOffset&&(l.environment.lighting.displayUTCOffset= this.environment.lighting.displayUTCOffset);return l.goTo(this.viewpoint,w).then(()=>{this._applyCachedCameraTrackingEnabled(l);l.environment.applyLighting(this.environment.lighting.clone())}).catch(L=>{null==l.animation&&this._applyCachedCameraTrackingEnabled(l);throw L;}).finally(()=>{p.removeMaybe(C)})}_applyCachedCameraTrackingEnabled(l){null!=l.environment.cachedCameraTrackingEnabled&&(l.environment.lighting.cameraTrackingEnabled=l.environment.cachedCameraTrackingEnabled,l.environment.cachedCameraTrackingEnabled= null)}_getTime(l){const w=l.getTime();l=3600*l.getUTCHours()+60*l.getUTCMinutes()+l.getUTCSeconds();return[w,l]}_setTime(l,w,C){l.setTime(w);l.setUTCHours(C/3600);l.setUTCMinutes(C%3600/60);l.setUTCSeconds(C%3600%60);return l}_animateLightingWithCamera(l,w,C){const [L,N]=this._getTime(new Date(w.date.toString())),[T,fa]=this._getTime(C.date),R=ka(N,fa),ea=l.renderCoordsHelper,pa=U.create();ea.toRenderCoords(l.camera.position,pa);const qa=U.create(),la=U.create();null!=this.viewpoint.camera&&ea.toRenderCoords(this.viewpoint.camera.position, qa);const ma=new Date;return E.when(()=>l.camera,X=>{ea.toRenderCoords(X.position,la);var ha=P.squaredDistance(pa,la);const ia=P.squaredDistance(qa,la);X=0;0!==ha+ia&&(X=ha/(ha+ia));ha=L+(T-L)*X;X=m.moduloPositive(N+R*X,86400);w.date=this._setTime(ma,ha,X)})}static createFrom(l,w){return(new this).updateFrom(l,w)}};a.__decorate([t.property({type:String,json:{write:{isRequired:!0}}})],d.prototype,"id",void 0);a.__decorate([t.property({type:x,json:{default:()=>new x({text:""}),write:{isRequired:!0}}})], d.prototype,"title",void 0);a.__decorate([D.cast("title")],d.prototype,"castTitle",null);a.__decorate([t.property({type:K,json:{write:{overridePolicy(l){return{enabled:!(!l||!l.text)}}}}})],d.prototype,"description",void 0);a.__decorate([D.cast("description")],d.prototype,"castDescription",null);a.__decorate([t.property({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],d.prototype,"hidden",void 0);a.__decorate([t.property({type:V.SlideThumbnail,json:{default:()=>new V.SlideThumbnail({url:""}), write:{isRequired:!0}}})],d.prototype,"thumbnail",void 0);a.__decorate([D.cast("thumbnail")],d.prototype,"castThumbnail",null);a.__decorate([t.property({type:e,nonNullable:!0,json:{write:{isRequired:!0}}})],d.prototype,"viewpoint",void 0);a.__decorate([t.property({type:g,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],d.prototype,"basemap",void 0);a.__decorate([D.cast("basemap")],d.prototype,"castBasemap",null);a.__decorate([t.property({type:r,json:{write:!0}})],d.prototype,"ground",void 0); a.__decorate([t.property({type:na,json:{write:{isRequired:!0}}})],d.prototype,"visibleLayers",null);a.__decorate([D.cast("visibleLayers")],d.prototype,"castVisibleLayers",null);a.__decorate([t.property({type:S.SlideEnvironment,json:{write:!0}})],d.prototype,"environment",void 0);a.__decorate([t.property(da.timeExtent)],d.prototype,"timeExtent",void 0);return d=a.__decorate([O.subclass("esri.webscene.Slide")],d)})},"esri/views/support/Scheduler":function(){define("exports ../../core/Handles ../../core/has ../../core/Logger ../../core/maybe ../../core/PerformanceSampler ../../core/PooledArray ../../core/promiseUtils ../../core/reactiveUtils ../../core/signal ../../core/time ../../layers/support/PromiseQueue ./debugFlags ./RenderState ./Yield".split(" "), function(b,a,g,e,n,q,h,d,k,m,p,v,E,t,D){function F(z){return H.has(z)?H.get(z):"number"===typeof z?z:1}b.TaskPriority=void 0;(function(z){z.RESOURCE_CONTROLLER_IMMEDIATE="immediate";z.RESOURCE_CONTROLLER="schedule";z.SLIDE="slide";z.STREAM_DATA_LOADER="stream loader";z.ELEVATION_QUERY="elevation query";z.TERRAIN_SURFACE="terrain";z.SURFACE_GEOMETRY_UPDATES="surface geometry updates";z.LOD_RENDERER="LoD renderer";z.GRAPHICS_CORE="Graphics3D";z.I3S_CONTROLLER="I3S";z.POINT_CLOUD_LAYER="point cloud"; z.FEATURE_TILE_FETCHER="feature fetcher";z.OVERLAY="overlay";z.STAGE="stage";z.GRAPHICS_DECONFLICTOR="graphics deconflictor";z.FILTER_VISIBILITY="Graphics3D filter visibility";z.SCALE_VISIBILITY="Graphics3D scale visibility";z.FRUSTUM_VISIBILITY="Graphics3D frustum visibility";z.POINT_OF_INTEREST_FREQUENT="POI frequent";z.POINT_OF_INTEREST_INFREQUENT="POI infrequent";z.LABELER="labeler";z.FEATURE_QUERY_ENGINE="feature query";z.FEATURE_TILE_TREE="feature tile tree";z.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree"; z.ELEVATION_ALIGNMENT="elevation alignment";z.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene";z.TEXT_TEXTURE_ATLAS="text texture atlas";z.TEXTURE_UNLOAD="texture unload";z.LINE_OF_SIGHT_TOOL="line of sight tool";z.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool";z.ELEVATION_PROFILE="elevation profile";z.SNAPPING="snapping";z.SHADOW_ACCUMULATOR="shadow accumulator";z.CLOUDS_GENERATOR="clouds generator";z[z.NONE=0]="NONE";z[z.TEST_PRIO=1]="TEST_PRIO"})(b.TaskPriority||(b.TaskPriority= {}));const H=new Map([[b.TaskPriority.RESOURCE_CONTROLLER_IMMEDIATE,0],[b.TaskPriority.RESOURCE_CONTROLLER,4],[b.TaskPriority.SLIDE,0],[b.TaskPriority.STREAM_DATA_LOADER,0],[b.TaskPriority.ELEVATION_QUERY,0],[b.TaskPriority.TERRAIN_SURFACE,1],[b.TaskPriority.SURFACE_GEOMETRY_UPDATES,1],[b.TaskPriority.LOD_RENDERER,2],[b.TaskPriority.GRAPHICS_CORE,2],[b.TaskPriority.I3S_CONTROLLER,2],[b.TaskPriority.POINT_CLOUD_LAYER,2],[b.TaskPriority.FEATURE_TILE_FETCHER,2],[b.TaskPriority.OVERLAY,4],[b.TaskPriority.STAGE, 4],[b.TaskPriority.GRAPHICS_DECONFLICTOR,4],[b.TaskPriority.FILTER_VISIBILITY,4],[b.TaskPriority.SCALE_VISIBILITY,4],[b.TaskPriority.FRUSTUM_VISIBILITY,4],[b.TaskPriority.CLOUDS_GENERATOR,4],[b.TaskPriority.POINT_OF_INTEREST_FREQUENT,6],[b.TaskPriority.POINT_OF_INTEREST_INFREQUENT,30],[b.TaskPriority.LABELER,8],[b.TaskPriority.FEATURE_QUERY_ENGINE,8],[b.TaskPriority.FEATURE_TILE_TREE,16],[b.TaskPriority.FEATURE_TILE_TREE_ACTIVE,0],[b.TaskPriority.ELEVATION_ALIGNMENT,12],[b.TaskPriority.ELEVATION_ALIGNMENT_SCENE, 14],[b.TaskPriority.TEXT_TEXTURE_ATLAS,12],[b.TaskPriority.TEXTURE_UNLOAD,12],[b.TaskPriority.LINE_OF_SIGHT_TOOL,16],[b.TaskPriority.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[b.TaskPriority.SNAPPING,0],[b.TaskPriority.SHADOW_ACCUMULATOR,30]]),O=p.Milliseconds(6.5),y=p.Milliseconds(1),P=p.Milliseconds(30),U=p.Milliseconds(1E3/30),Z=p.Milliseconds(100);var J;(function(z){class Y{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(r=>r.needsUpdate)}constructor(){this._updating= m.signal(!0);this._microTaskQueued=!1;this._frameNumber=0;this.performanceInfo={total:new q("total"),tasks:new Map};this._frameTaskTimes=new Map;this._budget=new S;this._state=t.RenderState.INTERACTING;this._tasks=new h;this._runQueue=new h;this._load=0;this._idleStateCallbacks=new h;this._debug=this._forceTask=this._idleUpdatesStartFired=!1;this._debugHandle=k.watch(()=>E.SCHEDULER_LOG_SLOW_TASKS,r=>this._debug=r,k.initial);for(const r of Object.keys(b.TaskPriority))this.performanceInfo.tasks.set(b.TaskPriority[r], new q(b.TaskPriority[r]))}destroy(){this._tasks.toArray().forEach(r=>r.remove());this._tasks.clear();n.removeMaybe(this._debugHandle);this._microTaskQueued=!1;this._updatingChanged()}taskRunningChanged(r){this._updatingChanged();r&&0{this._microTaskQueued&&(this._microTaskQueued=!1,0this._removeIdleStateCallbacks(x),set idleBegin(W){M._idleUpdatesStartFired&&(x.idleEnd(),M._state===t.RenderState.IDLE&&W());x.idleBegin=W},set idleEnd(W){x.idleEnd=W}}}get load(){return this._load}set state(r){this._state!== r&&(this._state=r,this.state!==t.RenderState.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll(A=>A.idleEnd())))}get state(){return this._state}updateBudget(r){++this._frameNumber;let A=O,x=r.frameDuration,M=y;switch(this.state){case t.RenderState.IDLE:A=p.Milliseconds(0);x=p.Milliseconds(Math.max(Z,r.frameDuration));M=P;break;case t.RenderState.INTERACTING:x=p.Milliseconds(Math.max(U,r.frameDuration))}x=p.Milliseconds(x-r.elapsedFrameTime-A);if(this.state!== t.RenderState.IDLE&&xr.idleBegin()));this._runIdle();break;case t.RenderState.INTERACTING:this._runInteracting();break;default:this._runAnimating()}}stopFrame(){this._budget.reset(p.Milliseconds(0), this._state);this._budget.madeProgress()}_removeIdleStateCallbacks(r){this._idleUpdatesStartFired&&r.idleEnd();this._idleStateCallbacks.removeUnordered(r)}removeTask(r){this._tasks.removeUnordered(r);this._runQueue.removeUnordered(r);this._updatingChanged()}_updateTask(r){this._tasks.forAll(A=>{A.name===r&&A.setPriority(r)})}_getState(r){if(this._runQueue.some(x=>x.name===r))return b.TaskState.SCHEDULED;let A=b.TaskState.IDLE;this._tasks.forAll(x=>{x.name===r&&x.needsUpdate&&(1>=x.schedulePriority? A=b.TaskState.READY:A!==b.TaskState.READY&&(A=b.TaskState.WAITING))});return A}_getRuntime(r){let A=0;this._tasks.forAll(x=>{x.name===r&&(A+=x.runtime)});return A}_resetRuntimes(){this._tasks.forAll(r=>r.runtime=0)}_getRunning(){const r=new Map;this._tasks.forAll(x=>{x.needsUpdate&&r.set(x.name,(r.get(x.name)||0)+1)});if(0===r.size)return null;let A="";r.forEach((x,M)=>{A=1x.needsUpdate?++A:A,0);this._load=.9*this._load+r*(1-.9)}_schedule(){this._runQueue.filterInPlace(r=>{if(r.needsUpdate)return!0;r.schedulePriority=r.basePriority;return!1});for(this._tasks.forAll(r=>{0===r.basePriority&&r.needsUpdate&&!this._runQueue.includes(r)&&r.blockFrame!==this._frameNumber&&this._runQueue.unshift(r)});0===this._runQueue.length;){let r=!1;this._tasks.forAll(A=>{if(A.needsUpdate&&0!==A.schedulePriority&&0!==A.basePriority&&A.blockFrame!==this._frameNumber)switch(r= !0,A.schedulePriority){case 1:A.schedulePriority=0;this._runQueue.push(A);break;default:--A.schedulePriority}});if(!r)return this._updatingChanged(),!1}this._updatingChanged();return!0}_run(){const r=this._budget.now();this._startFrameTaskTimes();do for(;0=this._budget.remaining){this._updatingChanged();this._recordFrameTaskTimes(this._budget.now()-r);return}}while(this._schedule());this._updatingChanged();this._recordFrameTaskTimes(this._budget.now()-r)}_startFrameTaskTimes(){for(const r of Object.keys(b.TaskPriority))this._frameTaskTimes.set(b.TaskPriority[r], 0)}_recordFrameTaskTimes(r){this._frameTaskTimes.forEach((A,x)=>this.performanceInfo.tasks.get(x).record(A));this.performanceInfo.total.record(r)}get test(){}}z.Scheduler=Y;class K{get task(){return this._task.value}get updating(){return this._queue.running}constructor(r,A,x){this._scheduler=r;this.name=A;this.runtime=this.blockFrame=0;this._queue=new v.PromiseQueue;this._handles=new a;this.schedulePriority=this._basePriority=F(A);this._task=m.signal(null!=x?x:this._queue);this._handles.add(k.when(()=> this.task.running,M=>r.taskRunningChanged(M)))}remove(){this.processQueue(aa);this._scheduler.removeTask(this);this.schedule=da.schedule;this.reschedule=da.reschedule;this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(r){if(this.name!==r){this.name=r;r=F(r);if(0===this._basePriority||0!==this.schedulePriority)this.schedulePriority=r;this._basePriority=r}}get priority(){return this.name}set priority(r){this.setPriority(r)}get needsUpdate(){return this.updating||this.task.running}schedule(r, A,x){return this._queue.push(r,A,x)}reschedule(r,A,x){return this._queue.unshift(r,A,x)}processQueue(r){return this._queue.runTask(r)}}class S{constructor(){this._begin="undefined"!==typeof performance?performance.now():0;this._budget=0;this._state=t.RenderState.IDLE;this._progressed=this._done=!1;this._enabled=!0}run(r){if(this.done)return!1;!0===r()&&this.madeProgress();return!0}get done(){return this._done}get budget(){return this._budget}madeProgress(){this._progressed=!0;return this._done=this.elapsed>= this._budget&&this._enabled}get state(){return this._state}get enabled(){return this._enabled}set enabled(r){this._enabled=r}reset(r,A){this._begin=this.now();this._budget=r;this._state=A;this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._done=this._progressed=!1}get hasProgressed(){return this._progressed}}z.Budget=S})(J||={});b.TaskState=void 0;(function(z){z.SCHEDULED= "s";z.READY="r";z.WAITING="w";z.IDLE="i"})(b.TaskState||(b.TaskState={}));const aa=(()=>{const z=new J.Budget;z.enabled=!1;return z})();class V{remove(){}processQueue(){}schedule(z,Y,K){try{if(d.isAborted(Y)){const S=d.createAbortError();return K?Promise.resolve(K(S)):Promise.reject(S)}return d.when(z(aa))}catch(S){return Promise.reject(S)}}reschedule(z,Y,K){return this.schedule(z,Y,K)}}const da=new V;b.ImmediateTask=da;b.getTaskPriority=F;b.newScheduler=function(){return new J.Scheduler};b.noBudget= aa;b.taskPriorities=H;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/PromiseQueue":function(){define(["exports","../../core/promiseUtils","../../core/signal","../../views/support/Yield"],function(b,a,g,e){class n{constructor(){this._tasks=[];this._runningTasks=g.signal(0)}get length(){return this._tasks.length}get running(){return 0this._tasks.push(new q(m,p,h,d,k)))).finally(()=>--this._runningTasks.value)}unshift(h,d,k){++this._runningTasks.value;return(new Promise((m,p)=>this._tasks.unshift(new q(m,p,h,d,k)))).finally(()=>--this._runningTasks.value)}_process(h){if(0===this._tasks.length)return!1;const d=this._tasks.shift();try{const k=a.isAborted(d.signal);if(k&&!d.abortCallback)d.reject(a.createAbortError());else{const m=k?d.abortCallback?.(a.createAbortError()): d.callback(h);a.isPromiseLike(m)?m.then(d.resolve,d.reject):d.resolve(m)}}catch(k){d.reject(k)}return!0}cancelAll(){const h=a.createAbortError();for(const d of this._tasks)if(d.abortCallback){const k=d.abortCallback(h);d.resolve(k)}else d.reject(h);this._tasks.length=0}}class q{constructor(h,d,k,m,p){this.resolve=h;this.reject=d;this.callback=k;this.signal=m;this.abortCallback=p}}b.PromiseQueue=n;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/Yield":function(){define(["exports"], function(b){const a=Symbol("Yield");b.Yield=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/debugFlags":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h){a=class extends a{constructor(){super(...arguments);this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=this.SCHEDULER_LOG_SLOW_TASKS= !1}};b.__decorate([g.property()],a.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0);b.__decorate([g.property()],a.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0);a=b.__decorate([h.subclass("esri.views.support.debugFlags")],a);return new a})},"esri/views/support/RenderState":function(){define(["exports"],function(b){b.RenderState=void 0;var a=b.RenderState||(b.RenderState={});a[a.ANIMATING=0]="ANIMATING";a[a.INTERACTING=1]="INTERACTING";a[a.IDLE=2]="IDLE";Object.defineProperty(b, Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/support/SlideThumbnail":function(){define("exports ../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../widgets/Bookmarks/bookmarkUtils".split(" "),function(b,a,g,e,n,q,h,d,k){var m;b.SlideThumbnail=m=class extends g.JSONSupport{constructor(){super(...arguments);this.url=""}destroy(){this.url=""}get isSecureUrl(){return k.isSecureUrl(this.url)}get isDataURI(){return k.isDataURI(this.url)}clone(){return new m({url:this.url})}}; a.__decorate([e.property({type:String,json:{write:{isRequired:!0}}})],b.SlideThumbnail.prototype,"url",void 0);a.__decorate([e.property()],b.SlideThumbnail.prototype,"isSecureUrl",null);a.__decorate([e.property()],b.SlideThumbnail.prototype,"isDataURI",null);b.SlideThumbnail=m=a.__decorate([d.subclass("esri.webdoc.support.SlideThumbnail")],b.SlideThumbnail);Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Bookmarks/bookmarkUtils":function(){define(["exports"],function(b){b.ThumbnailInputPattern= "https://.*";b.isDataURI=function(a){return a?/data:([-\w]+\/[-+\w.]+)?(;?\w+=[-\w]+)*(;base64)?,.*/gu.test(a):!1};b.isSecureUrl=function(a){return a?/^https:\/\/.*/i.test(a):!1};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/support/Description":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(){super(...arguments);this.text=""}clone(){return new d({text:this.text})}};b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"text",void 0);return a=d=b.__decorate([h.subclass("esri.webscene.support.Description")],a)})},"esri/webscene/support/SlideEnvironment":function(){define("exports ../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ../../views/3d/environment/SunnyWeather ../../views/3d/environment/weather ../lightingTypes ../SunLighting".split(" "), function(b,a,g,e,n,q,h,d,k,m,p,v){var E;b.SlideEnvironment=E=class extends g.JSONSupport{constructor(){super(...arguments);this.lighting=new v;this.weather=new k}clone(){return new E({lighting:e.clone(this.lighting),weather:e.clone(this.weather)})}};a.__decorate([n.property({types:p.lightingTypes,json:{write:!0}})],b.SlideEnvironment.prototype,"lighting",void 0);a.__decorate([n.property({types:m.weatherTypes,json:{write:!0}})],b.SlideEnvironment.prototype,"weather",void 0);b.SlideEnvironment=E=a.__decorate([d.subclass("esri.webscene.Environment")], b.SlideEnvironment);Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/support/SlideGround":function(){define("../../chunks/tslib.es6 ../../Ground ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass ../../webdoc/support/opacityUtils".split(" "),function(b,a,g,e,n,q,h,d,k){var m;g=m=class extends g.JSONSupport{constructor(){super(...arguments); this.opacity=null}clone(){return new m({opacity:this.opacity})}cloneAndApplyTo(p){if(null==this.opacity)return p;p=p?.clone()??new a;p.opacity=this.opacity;return p}static fromGround(p){return new m({opacity:p.opacity})}};b.__decorate([e.property({type:Number,json:{type:n.Integer,read:{reader:k.transparencyToOpacity,source:"transparency"},write:{writer:(p,v)=>{v.transparency=k.opacityToTransparency(p)},target:"transparency"}}})],g.prototype,"opacity",void 0);return g=m=b.__decorate([d.subclass("esri.webscene.support.SlideGround")], g)})},"esri/webscene/support/SlideVisibleLayer":function(){define("exports ../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,g,e,n,q,h){var d;b.SlideVisibleLayer=d=class extends g.JSONSupport{constructor(k){super(k);this.id="";this.sublayerIds=null}clone(){return new d({id:this.id,sublayerIds:e.clone(this.sublayerIds)})}};a.__decorate([n.property({type:String, json:{write:!0}})],b.SlideVisibleLayer.prototype,"id",void 0);a.__decorate([n.property({type:[q.Integer],json:{read:{source:"subLayerIds"},write:{target:"subLayerIds"}}})],b.SlideVisibleLayer.prototype,"sublayerIds",void 0);b.SlideVisibleLayer=d=a.__decorate([h.subclass("esri.webscene.support.SlideVisibleLayer")],b.SlideVisibleLayer);Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/support/Title":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(){super(...arguments);this.text=""}clone(){return new d({text:this.text})}};b.__decorate([g.property({type:String,json:{write:{isRequired:!0}}})],a.prototype,"text",void 0);return a=d=b.__decorate([h.subclass("esri.webscene.support.Title")],a)})},"esri/webscene/TransportationNetwork":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass".split(" "), function(b,a,g,e,n,q,h){var d;a=d=class extends a.JSONSupport{constructor(k){super(k)}clone(){return new d({name:this.name,path:this.path,title:this.title})}};b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"path",void 0);b.__decorate([g.property({type:String,json:{write:!0}})],a.prototype,"title",void 0);return a=d=b.__decorate([h.subclass("esri.webscene.TransportationNetwork")],a)})},"esri/webscene/Version":function(){define(["exports", "../core/Version"],function(b,a){class g extends a.Version{constructor(e,n){super(e,n,"webscene")}get supportsGround(){return this.since(1,8)}get supportsVisibleElevationLayersInSlides(){return this.lessThan(1,8)}}b.Version=g;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webscene/support/schemaValidatorLoader":function(){define(["exports"],function(b){let a=null;b.getLoader=function(){return a};b.registerLoader=function(g){a=g};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})}, "*noref":1}}); define("require ./chunks/tslib.es6 ./kernel ./Map ./TimeExtent ./Viewpoint ./core/Collection ./core/Error ./core/lang ./core/Loadable ./core/loadAll ./core/Logger ./core/maybe ./core/MultiOriginJSONSupport ./core/Promise ./core/promiseUtils ./core/reactiveUtils ./core/urlUtils ./core/accessorSupport/decorators/property ./core/has ./core/accessorSupport/decorators/reader ./core/accessorSupport/decorators/subclass ./core/accessorSupport/decorators/writer ./core/accessorSupport/originUtils ./core/accessorSupport/read ./geometry/Extent ./geometry/HeightModelInfo ./geometry/projection ./geometry/SpatialReference ./geometry/support/heightModelInfoUtils ./geometry/support/jsonUtils ./geometry/support/spatialReferenceUtils ./portal/Portal ./portal/PortalItem ./portal/support/jsonContext ./portal/support/portalItemUtils ./support/basemapUtils ./support/MapFloorInfo ./support/tagSymbols ./support/webSceneUtils ./views/ViewingMode ./views/support/spatialReferenceSupport ./webdoc/interfaces ./webdoc/Widgets ./webdoc/support/resourceUtils ./webdoc/support/saveAPIKeyUtils ./webdoc/support/saveUtils ./webdoc/support/thumbnailUtils ./webscene/ApplicationProperties ./webscene/Environment ./webscene/InitialViewProperties ./webscene/Presentation ./webscene/TransportationNetwork ./webscene/Version ./webscene/support/schemaValidatorLoader".split(" "),function(b, a,g,e,n,q,h,d,k,m,p,v,E,t,D,F,H,O,y,P,U,Z,J,aa,V,da,z,Y,K,S,r,A,x,M,W,ka,oa,na,l,w,C,L,N,T,fa,R,ea,pa,qa,la,ma,X,ha,ia,sa){const ja=new ia.Version(1,34);e=class extends m.LoadableMixin(D.EsriPromiseMixin(t.MultiOriginJSONMixin(e))){constructor(c){super(c);this[ta]=!0;this._layersIdGCTimeoutId=void 0;this.clippingArea=this.applicationProperties=this._updateFromPromise=null;this.clippingEnabled=!1;this.floorInfo=null;this.heightModelInfo=void 0;this.transportationNetworks=this.sourceVersion=null;this.presentation= new X;this.initialViewProperties=new ma;this.widgets=this.resourceInfo=this.portalItem=null;this._debouncedSaveOperations=F.debounce(async(f,u,B)=>{switch(f){case N.SaveOperationType.SAVE:return this._saveImpl(u);case N.SaveOperationType.SAVE_AS:return this._saveAsImpl(B,u)}});this._resourceReferences={portalItem:null,paths:[]};this.authoringAppVersion=this.authoringApp=null;this._isAuthoringAppVersionSetByUser=this._isAuthoringAppSetByUser=!1}initialize(){this.when().catch(c=>{v.getLogger(this).error("#load()", "Failed to load web scene",c)});if(this.resourceInfo){let c;try{c=this._validateJSON(this.resourceInfo)}catch(f){this.addResolvingPromise(Promise.reject(f));return}this.read(c);this.addResolvingPromise(this._validateSpatialReference());this.addResolvingPromise(this._validateHeightModelInfo())}this.addHandles(H.on(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC();this.presentation&&this.presentation.destroy();this.portalItem=E.destroyMaybe(this.portalItem)}writeClippingArea(c, f){f.clippingArea||(f.clippingArea={});f.clippingArea.geometry=c.toJSON()}readClippingEnabled(c,f){return f.clippingArea?!!f.clippingArea.clip:!1}writeClippingEnabled(c,f){this.clippingArea&&(f.clippingArea||(f.clippingArea={}),f.clippingArea.clip=c)}writeLayers(c,f,u,B){f[u]=this._layersToJSON(c,"operational-layers",B)}readSourceVersion(c,f){const [u,B]=f.version.split(".");return new ia.Version(parseInt(u,10),parseInt(B,10))}writeSourceVersion(c,f,u){f[u]=`${ja.major}.${ja.minor}`}writeTables(c, f,u,B){c=this._layersToJSON(c,"tables",B);c.length&&(f[u]=c)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(c){c?this._override("thumbnailUrl",c):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(c){this._isAuthoringAppSetByUser=!0;this._set("authoringApp",c)}writeAuthoringApp(c,f){f.authoringApp=c&&this._isAuthoringAppSetByUser?c:"ArcGIS API for JavaScript"}set authoringAppVersion(c){this._isAuthoringAppVersionSetByUser=!0;this._set("authoringAppVersion", c)}writeAuthoringAppVersion(c,f){f.authoringAppVersion=c&&this._isAuthoringAppVersionSetByUser?c:g.version}writeGround(c,f,u,B){f[u]=c?c.write({},B):{transparency:0,layers:[]}}readInitialViewProperties(c,f){c={};f.initialState?.environment&&(c.environment=la.fromJSON(f.initialState.environment));c.spatialReference=f.spatialReference?K.fromJSON(f.spatialReference):K.WebMercator;c.viewingMode=f.viewingMode??"global";f.initialState?.viewpoint&&(c.viewpoint=q.fromJSON(f.initialState.viewpoint));f=f.initialState?.timeExtent; null!=f&&(c.timeExtent=n.fromArray(f));return new ma(c)}get spatialReference(){return this.initialViewProperties?.spatialReference??K.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(c){const f=this.ground;this.addResolvingPromise(this._loadFromSource().then(()=>{f&&f!==this.ground&&f.destroy()}));return Promise.resolve(this)}loadAll(){return p.loadAll(this,c=>{const f=this.presentation&&this.presentation.slides;c(this.ground,this.basemap,this.layers,f&& f.map(u=>u.basemap),this.tables)})}read(c,f){f={...f,origin:"web-scene"};const u=this._isAuthoringAppVersionSetByUser,B=this._isAuthoringAppSetByUser;V.readLoadable(this,c,G=>super.read(c,G),f);B||(this._isAuthoringAppSetByUser=!1);u||(this._isAuthoringAppVersionSetByUser=!1);if(c.baseMap&&Array.isArray(c.baseMap.elevationLayers)&&(this.sourceVersion?.supportsVisibleElevationLayersInSlides??!1)){f=c.baseMap.elevationLayers.map(Q=>({id:Q.id}));const G=this.presentation.slides,I=(Q,ba)=>Q.visibleLayers.some(ra=> ra.id===ba),ca=f.filter(Q=>!G.some(ba=>I(ba,Q.id)));G.forEach(Q=>{Q.visibleLayers.addMany(ca)})}}_writeBasemapElevationLayers(c){const f=c.ground?.layers;!c.baseMap&&f?.length&&(c.baseMap={title:"Basemap",baseMapLayers:[]});c.baseMap&&(c.baseMap.elevationLayers=k.clone(f))}_layersToJSON(c,f,u){const B={...u,layerContainerType:f};return c.map(G=>this._verifyWritableLayer(G,u)?G.write({},B):null).filter(G=>!!G).toArray()}_verifyWritableLayer(c,f){return c.persistenceEnabled?"write"in c?!0:(f?.messages&& f.messages.push(new d("layer:unsupported",`Layers (${c.title}, ${c.id}) of type '${c.declaredClass}' cannot be persisted in web scenes`,{layer:c})),!1):!1}write(c,f){if("loaded"!==this.loadStatus)throw f=new d("webscene:not-loaded","Web scene must be loaded before it can be serialized"),v.getLogger(this).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),f;this._runLayersIdGC();var u=!f?.messages;f={messages:[],...f,origin:"web-scene"};c=super.write(c, f);if(u&&(f=f.messages?.filter(B=>"web-document-write:property-required"===B.name)??[],f.length))throw u=new d("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:f}),v.getLogger(this).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",f),u;this._writeBasemapElevationLayers(c);return c}async save(c){return this._debouncedSaveOperations(N.SaveOperationType.SAVE, c)}async _saveImpl(c){if(!this.portalItem)throw new d("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");R.validateSaveAPIKey(this.portalItem);if("Web Scene"!==this.portalItem?.type)throw new d("webscene:portal-item-wrong-type",'Portal item needs to have type "Web Scene"');const f=this._updateFromPromise;await this._ensureLoadBeforeSave();const u=this._enableVerifyItemRelativeUrls(W.createForItemWrite(this.portalItem,"web-scene",!0)),B=this.write({},u);await Promise.all(u.resources.pendingOperations); await this._verifySave(B,u,c);this._updateTypeKeywords(this.portalItem);await fa.updateItemWithResources(this.portalItem,B,this._resourceReferences,u);aa.updateOrigins(u);f&&await f;await this._saveThumbnail();return this.portalItem}async saveAs(c,f){return this._debouncedSaveOperations(N.SaveOperationType.SAVE_AS,f,c)}async _saveAsImpl(c,f){c=M.from(c);if(!c)throw new d("webscene:portal-item-required","saveAs requires a portal item to save to");R.validateSaveAPIKey(c);c.id&&(c=c.clone(),c.id=null); const u=c.portal||x.getDefault();await this._ensureLoadBeforeSave();c.type="Web Scene";c.portal=u;const B=this._enableVerifyItemRelativeUrls(W.createForItemWrite(c,"web-scene",!0)),G=this.write({},B);await Promise.all(B.resources.pendingOperations);await this._verifySaveAs(G,B,f);const I=this.thumbnailUrl,ca=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(c);await u.signIn();if(!u.user)throw new d("webscene:user-not-signed-in","saveAs requires a user to be signed in to the portal");await u.user.addItem({item:c, folder:f?.folder,data:G});await fa.saveResources(this._resourceReferences,B);this.portalItem=c;t.MultiOriginJSONSupport.prototype.read.call(this,{version:G.version,authoringApp:G.authoringApp,authoringAppVersion:G.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:c.itemUrl?O.urlToObject(c.itemUrl):void 0});aa.updateOrigins(B);I&&(this.thumbnailUrl=ca?O.addQueryParameter(I,"w","8192"):I);B.portalItem=c;await this._saveThumbnail();return c}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&& (await this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl}),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}async _verifySave(c,f,u,B=!1){if(!A.isEarth(this.spatialReference))throw new d("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const {ignoreUnsupported:G,requiredPropertyChecksDisabled:I,strictSchemaValidationEnabled:ca}=u||{};ea.evaluateWriteErrors(f,{errorName:"webscene:save"}, {ignoreUnsupported:G,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:I});f=sa.getLoader();if(ca&&f&&(f=(await f()).validate(c),f.length))throw c=`webscene did not validate:\n${f.join("\n")}`,v.getLogger(this).error(`${B?"saveAs":"save"}(): ${c}`),B=f.map(Q=>new d("webscene:schema-validation",Q)),w.createSchemaValidationError(B);}_verifySaveAs(c,f,u){return this.canNotSaveAs(f)?Promise.reject(w.createCopyError()):this._verifySave(c,f,u,!0)}verifySaveAs(c){const f= this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),u=this.write({},f);return this._verifySaveAs(u,f,c)}canNotSaveAs(c){c||(c=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),this.write({},c));return 0<(c.verifyItemRelativeUrls?.writtenUrls?.length??0)}async updateFrom(c,f={}){this._updateFromPromise=c=this._updateFrom(c,f);await c;this._updateFromPromise===c&&(this._updateFromPromise=null)}async _updateFrom(c,f={}){await c.whenReady();!f.environmentExcluded&& c.environment&&(this.initialViewProperties.environment=la.prototype.clone.apply(c.environment));!f.viewpointExcluded&&c.viewpoint&&(this.initialViewProperties.viewpoint=c.viewpoint.clone());this.initialViewProperties.spatialReference=c.spatialReference.clone();this.initialViewProperties.viewingMode=c.viewingMode;this.initialViewProperties.timeExtent=c.timeExtent?.clone()??null;null!=c.clippingArea?c.clippingArea!==this.clippingArea&&(this.clippingArea=c.clippingArea.clone(),this.clippingEnabled=!0): this.clippingEnabled=!1;c.heightModelInfo&&(this.heightModelInfo=c.heightModelInfo.clone());if(c.map===this)for(const u of c.allLayerViews)"visible"in u&&"visible"in u.layer&&u._isOverridden("visible")&&(u.layer.visible=u.visible);if(!f.widgetsExcluded)for(const u of c.persistableViewModels)u.updateWebDocument(this);(!1===f.thumbnailExcluded||null==f.thumbnailExcluded&&!f.viewpointExcluded)&&await this._updateFromThumbnail(c,f.thumbnailSize??void 0)}async _updateFromThumbnail(c,f){f=pa.getOptimalThumbnailSize(c, f);this.thumbnailUrl=(await c.takeScreenshot({format:"jpg",width:f.width,height:f.height,disableDecorations:!0})).dataUrl}_loadFromSource(){return this.resourceInfo?this._loadFromJSON(this.resourceInfo,{origin:"web-scene"}):this.portalItem?.id?this._loadFromItem(this.portalItem):this._loadObjectsWithLayers()}_readAndLoadFromJSON(c,f){c=this._validateJSON(c);this.read(c,f);return this._loadFromJSON(c,f)}_extractOperationalLayers(c){const f=[];if(!this.sourceVersion?.supportsGround&&c.baseMap&&Array.isArray(c.baseMap.elevationLayers))for(const G of c.baseMap.elevationLayers)f.push(G); const u=[],B=G=>{G.layers&&(G.layers=G.layers.filter(B));return"ArcGISTiledElevationServiceLayer"===G.layerType?(this.sourceVersion?.supportsGround||u.push(G),!1):!0};return{operationalLayers:c.operationalLayers?c.operationalLayers.filter(B):[],operationalElevationLayers:u,basemapElevationLayers:f}}async _loadFromJSON(c,f){const u=new h;await this._validateSpatialReference();await this._validateHeightModelInfo();const {populateOperationalLayers:B}=await new Promise((ba,ra)=>b(["./layers/support/layersCreator"], ba,ra)),{operationalLayers:G,operationalElevationLayers:I,basemapElevationLayers:ca}=this._extractOperationalLayers(c),Q=[];f={context:{...f,layerContainerType:"operational-layers"}};this.portalItem&&(f.context.portal=this.portalItem.portal||x.getDefault());0"base-elevation"===ba.type||"elevation"===ba.type))}async _ensureLoadBeforeSave(){await this.load();await this._loadObjectsWithLayers();const c=[];var f=[...this.allLayers.items];for(const {basemap:u}of this.presentation.slides.items)u&& (f.push(...u.baseLayers.items),f.push(...u.referenceLayers.items));for(const u of f)"beforeSave"in u&&"function"===typeof u.beforeSave&&(f=u.beforeSave())&&c.push(f);await Promise.allSettled(c)}async _loadObjectsWithLayers(){const c=[];this.ground&&c.push(this.ground.load());this.basemap&&c.push(this.basemap.load());this.presentation.slides.forEach(f=>{f.basemap&&c.push(f.basemap.load())});await Promise.allSettled(c)}async _loadFromItem(c){await c.load().catch(B=>{throw new d("webscene:load-portal-item", "Failed to load portal item",{error:B});});if("Web Scene"!==c.type)throw new d("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:c.type});const f=await c.fetchData();this.resourceInfo=f;const u={origin:"web-scene",url:O.urlToObject(c.itemUrl),portal:c.portal||x.getDefault(),portalItem:c,readResourcePaths:[]};await this._readAndLoadFromJSON(f,u);this._resourceReferences={portalItem:c,paths:u.readResourcePaths??[]}}_validateSpatialReference(){const c=this.initialViewProperties, f=this._sceneSpatialReference;let u=void 0;if("local"!==c.viewingMode){if(!L.isSpatialReferenceSupported(f,C.ViewingMode.Global))return Promise.reject(new d("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:f,viewingMode:c.viewingMode}));u=I=>!I||Y.canProjectWithoutEngine(I,f)}else{if(!L.isSpatialReferenceSupported(f,C.ViewingMode.Local))return Promise.reject(new d("webscene:unsupported-spatial-reference", "Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:f,viewingMode:c.viewingMode}));u=I=>!I||I.equals(f)}const B=I=>I?.camera?.position.spatialReference??I?.targetGeometry?.spatialReference;var G=B(c.viewpoint);return G&&!u(G)?Promise.reject(new d("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})", {cameraSpatialReference:G,sceneSpatialReference:f,viewingMode:c.viewingMode})):(G=this.presentation.slides.find(I=>!u(B(I.viewpoint))))?(G=B(G.viewpoint),Promise.reject(new d("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:G,sceneSpatialReference:f,viewingMode:c.viewingMode}))):Promise.resolve()}_validateHeightModelInfo(){const c=S.validateWebSceneError(this.heightModelInfo, this._sceneSpatialReference);return c?Promise.reject(c):Promise.resolve()}_validateJSON(c){const f=ia.Version.parse(c.version||"","webscene");ja.validate(f);c.version=`${f.major}.${f.minor}`;1===f.major&&2>=f.minor&&(c.spatialReference=K.WebMercator.toJSON());return c}_updateTypeKeywords(c){ka.toggleTypeKeyword(c,ka.typeKeyword.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode);ka.toggleTypeKeyword(c,ka.typeKeyword.DEVELOPER_BASEMAP,oa.hasDeveloperBasemapLayer(this.basemap)||this.presentation.slides.some(({basemap:f})=> !!f&&oa.hasDeveloperBasemapLayer(f)));c.typeKeywords&&(c.typeKeywords=c.typeKeywords.filter((f,u,B)=>B.indexOf(f)===u))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||K.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?O.urlToObject(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(c){const f=this._verifyItemRelativeRootPath;f&&(c.verifyItemRelativeUrls={rootPath:f,writtenUrls:[]});return c}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&& (clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC();this._layersIdGCTimeoutId=setTimeout(()=>{this._layersIdGCTimeoutId=0;this._runLayersIdGC()},3E3)}_runLayersIdGC(){this._unscheduleLayersIdGC();var c=this.applicationProperties?.viewing?.search;const f=u=>this.allLayers.some(B=>B.id===u&&B.persistenceEnabled);c?.layers&&(c.layers=c.layers.filter(u=>f(u.id)));(c=this.presentation&&this.presentation.slides)&&c.forEach(u=>{u.visibleLayers&& (u.visibleLayers=u.visibleLayers.filter(B=>f(B.id)))})}static fromJSON(c){if(!c)throw new d("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:c})}};var ta=l.WebSceneTag;e.version=`${ja.major}.${ja.minor}`;a.__decorate([y.property({type:qa,json:{write:!0}})],e.prototype,"applicationProperties",void 0);a.__decorate([y.property({type:da,json:{read:{source:"clippingArea.geometry",reader:r.fromJSON},write:{target:"clippingArea.geometry"}}})],e.prototype, "clippingArea",void 0);a.__decorate([J.writer("clippingArea")],e.prototype,"writeClippingArea",null);a.__decorate([y.property({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],e.prototype,"clippingEnabled",void 0);a.__decorate([U.reader("clippingEnabled",["clippingArea"])],e.prototype,"readClippingEnabled",null);a.__decorate([J.writer("clippingEnabled")],e.prototype,"writeClippingEnabled",null);a.__decorate([y.property({type:na,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})], e.prototype,"floorInfo",void 0);a.__decorate([y.property({type:z,json:{write:!0}})],e.prototype,"heightModelInfo",void 0);a.__decorate([y.property({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],e.prototype,"layers",void 0);a.__decorate([J.writer("layers")],e.prototype,"writeLayers",null);a.__decorate([y.property({readOnly:!0,type:ia.Version,json:{type:(()=>{const c=[],f=ja.major;for(let u=8;u<=ja.minor;u++)c.push(`${f}.${u}`);return c})(),write:{ignoreOrigin:!0,target:"version",isRequired:!0, overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],e.prototype,"sourceVersion",void 0);a.__decorate([U.reader("sourceVersion",["version"])],e.prototype,"readSourceVersion",null);a.__decorate([J.writer("sourceVersion")],e.prototype,"writeSourceVersion",null);a.__decorate([y.property({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],e.prototype,"tables",void 0);a.__decorate([J.writer("tables")],e.prototype,"writeTables",null);a.__decorate([y.property()],e.prototype,"thumbnailUrl", null);a.__decorate([y.property({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],e.prototype,"authoringApp",null);a.__decorate([J.writer("authoringApp")],e.prototype,"writeAuthoringApp",null);a.__decorate([y.property({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],e.prototype,"authoringAppVersion",null);a.__decorate([J.writer("authoringAppVersion")],e.prototype,"writeAuthoringAppVersion",null);a.__decorate([y.property({json:{write:{isRequired:!0,allowNull:!0, ignoreOrigin:!0,enabled:!0}}})],e.prototype,"ground",void 0);a.__decorate([J.writer("ground")],e.prototype,"writeGround",null);a.__decorate([y.property({type:h.ofType(ha),json:{write:!0}})],e.prototype,"transportationNetworks",void 0);a.__decorate([y.property({type:X,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(c,f,u,B)=>{c.slides&&0new ma({viewingMode:"global",spatialReference:K.WebMercator})}})],e.prototype,"initialViewProperties",void 0);a.__decorate([U.reader("initialViewProperties",["initialState.timeExtent","initialState.environment","initialState.viewpoint","spatialReference","viewingMode"])],e.prototype,"readInitialViewProperties",null);a.__decorate([y.property({type:K,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],e.prototype,"spatialReference", null);a.__decorate([y.property({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],e.prototype,"viewingMode",null);a.__decorate([y.property({type:M})],e.prototype,"portalItem",void 0);a.__decorate([y.property()],e.prototype,"resourceInfo",void 0);a.__decorate([y.property({type:T,json:{write:!0}})],e.prototype,"widgets",void 0);return e=a.__decorate([Z.subclass("esri.WebScene")],e)});