UNPKG

igniteui-react-core

Version:
109 lines (108 loc) 3.56 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, fromEnum, markType } from "./type"; import { List$1 } from "./List$1"; import { VersionQueueAction } from "./VersionQueueAction"; import { VersionQueueActionTimeout } from "./VersionQueueActionTimeout"; /** * @hidden */ export let VersionQueueHelper = /*@__PURE__*/ (() => { class VersionQueueHelper extends Base { constructor() { super(...arguments); this.c = new List$1(VersionQueueAction.$, 0); this.g = {}; this.d = new List$1(VersionQueueActionTimeout.$, 0); this.a = null; this.e = 0; } h() { if (this.e >= 0x7FFFFFFF - 1) { this.e = 0; } else { this.e++; } let a = new List$1(VersionQueueAction.$, 0); for (let b = 0; b < this.c.count; b++) { if (this.b(this.c._inner[b].d)) { a.add(this.c._inner[b]); } } for (let c = 0; c < a.count; c++) { this.c.remove(a._inner[c]); } for (let d = 0; d < a.count; d++) { a._inner[d].b(); } let e = new List$1(VersionQueueActionTimeout.$, 0); for (let f = 0; f < this.d.count; f++) { if (this.b(this.d._inner[f].f)) { e.add(this.d._inner[f]); } } for (let g = 0; g < e.count; g++) { this.d.remove(e._inner[g]); } for (let h = 0; h < e.count; h++) { e._inner[h].b(false); } } f() { return this.e; } j(a, b) { if (this.b(b)) { a(); return; } this.c.add(new VersionQueueAction(a, b)); } l(a) { if (this.a == null && a != null) { for (let b of fromEnum(this.d)) { a.executeDelayed(() => this.i(b), b.e); } } this.a = a; } k(a, b, c) { if (c <= 0) { this.j(() => a(false), b); return; } if (this.b(b)) { a(false); return; } let d = new VersionQueueActionTimeout(a, b, c); this.d.add(d); if (this.a != null) { this.a.executeDelayed(() => this.i(d), c); } } i(a) { if (!this.d.contains(a)) { return; } this.d.remove(a); a.b(true); } b(a) { if (this.e > a) { return true; } if (this.e >= 0x7FFFFFFF - 1 && a < 0x7FFFFFFF - 1) { return true; } return false; } } VersionQueueHelper.$t = /*@__PURE__*/ markType(VersionQueueHelper, 'VersionQueueHelper'); return VersionQueueHelper; })();