/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/tslib.es6","../../../../core/Accessor","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass","../../../support/Scheduler"],(function(e,t,n,r,o,s,i,a,c,u){"use strict";e.I3SAsyncElevationUpdater=function(e){function n(n,r){var o;return(o=e.call(this,{})||this)._updateElevation=r,o.running=!1,o._nodeSet=new Set,o.own(n.registerTask(u.TaskPriority.ELEVATION_ALIGNMENT,t._assertThisInitialized(o))),o}t._inheritsLoose(n,e);var r=n.prototype;return r.normalizeCtorArgs=function(){return{}},r.schedule=function(e){this._nodeSet.add(e),this.running=!0},r.remove=function(e){this._nodeSet.delete(e),this._updateRunning()},r.runTask=function(e){const t=this._nodeSet;for(const n of t)if(t.delete(n),this._updateElevation(n),e.madeProgress(),e.done)break;this._updateRunning()},r._updateRunning=function(){this.running=this._nodeSet.size>0},n}(r),n.__decorate([o.property()],e.I3SAsyncElevationUpdater.prototype,"running",void 0),e.I3SAsyncElevationUpdater=n.__decorate([c.subclass("esri.views.3d.layers.i3s.I3SAsyncElevationUpdater.ts")],e.I3SAsyncElevationUpdater),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
