1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a11585-69a2-70e1-93ac-fc5ff7955af9")}catch(e){}}();import{C as c,a as L}from"./Collection-B7VkSdS8.js";import{u as y,l as o,c as g,O as A,E as f,g as E,B as R}from"./Object-CcUaLeJe.js";import{a as p}from"./asserts-C9w6segB.js";import{g as _}from"./extent-I-eR3KPh.js";import{B as x}from"./Base-DaFtvbZ8.js";import"./math-DAon4ME5.js";window.CESIUM_BASE_URL="/cesium/";const a={ADDLAYER:"addlayer",REMOVELAYER:"removelayer"};class h extends R{constructor(e,t){super(e),this.layer=t}}const d={LAYERS:"layers"};class u extends x{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let s=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(d.LAYERS,this.handleLayersChanged_),s?Array.isArray(s)?s=new c(s.slice(),{unique:!0}):p(typeof s.getArray=="function","Expected `layers` to be an array or a `Collection`"):s=new c(void 0,{unique:!0}),this.setLayers(s)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(y),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(o(e,L.ADD,this.handleLayersAdd_,this),o(e,L.REMOVE,this.handleLayersRemove_,this));for(const s in this.listenerKeys_)this.listenerKeys_[s].forEach(y);g(this.listenerKeys_);const t=e.getArray();for(let s=0,n=t.length;s<n;s++){const r=t[s];this.registerLayerListeners_(r),this.dispatchEvent(new h(a.ADDLAYER,r))}this.changed()}registerLayerListeners_(e){const t=[o(e,A.PROPERTYCHANGE,this.handleLayerChange_,this),o(e,f.CHANGE,this.handleLayerChange_,this)];e instanceof u&&t.push(o(e,a.ADDLAYER,this.handleLayerGroupAdd_,this),o(e,a.REMOVELAYER,this.handleLayerGroupRemove_,this)),this.listenerKeys_[E(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new h(a.ADDLAYER,e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new h(a.REMOVELAYER,e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new h(a.ADDLAYER,t)),this.changed()}handleLayersRemove_(e){const t=e.element,s=E(t);this.listenerKeys_[s].forEach(y),delete this.listenerKeys_[s],this.dispatchEvent(new h(a.REMOVELAYER,t)),this.changed()}getLayers(){return this.get(d.LAYERS)}setLayers(e){const t=this.getLayers();if(t){const s=t.getArray();for(let n=0,r=s.length;n<r;++n)this.dispatchEvent(new h(a.REMOVELAYER,s[n]))}this.set(d.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){const t=e!==void 0?e:[],s=t.length;this.getLayers().forEach(function(l){l.getLayerStatesArray(t)});const n=this.getLayerState();let r=n.zIndex;!e&&n.zIndex===void 0&&(r=0);for(let l=s,m=t.length;l<m;l++){const i=t[l];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),n.extent!==void 0&&(i.extent!==void 0?i.extent=_(i.extent,n.extent):i.extent=n.extent),i.zIndex===void 0&&(i.zIndex=r)}return t}getSourceState(){return"ready"}}export{h as GroupEvent,u as default}; 2//# sourceMappingURL=Group-B8W4HhL1.js.map 3 4//# chunkId=01a11585-69a2-70e1-93ac-fc5ff7955af9
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.