/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports"],(function(n){"use strict";let t=function(){function n(n){this._totalCount=n,this._indexRanges=[0,n]}var t=n.prototype;return t.allVisible=function(){return this.componentCount()===this._totalCount},t.allInvisible=function(){return 0===this._indexRanges.length},t.componentCount=function(){const n=this._indexRanges;let t=0;for(let e=0;e<n.length;e+=2)t+=n[e+1];return t},t.reset=function(n){"all"===n||n.length===this._totalCount?this._indexRanges=[0,this._totalCount]:this._indexRanges=e(n)},t.forEachComponent=function(n){const t=this._indexRanges;for(let e=0;e<t.length;e+=2){const o=t[e],i=o+t[e+1];for(let t=o;t<i;t++)if(!n(t))return!1}return!0},t.forEachComponentRange=function(n){const t=this._indexRanges;for(let e=0;e<t.length;e+=2){const o=t[e];if(!n(o,o+t[e+1]))return!1}return!0},t.computeOffsetRanges=function(n){const t=new Array(this._indexRanges.length),e=this._indexRanges;for(let o=0;o<e.length;o+=2){const i=e[o],s=i+e[o+1],r=n[i],u=n[s];t[o]=r,t[o+1]=u-r}return t},n}();function e(n){const t=new Array;if(0===n.length)return t;let e=n[0],o=1;for(let i=1;i<n.length;i++){const s=n[i];e+o===s?o+=1:(t.push(e),t.push(o),e=s,o=1)}return t.push(e),t.push(o),t}n.ComponentRangeRunLengthEncoded=t,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
