2026-10-12 06:59:38 +00:00
|
|
|
// Module ID: 8252
|
|
|
|
|
// Function ID: 8253
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: LimitedMap
|
|
|
|
|
// Dependencies: [2]
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-10-12 06:59:38 +00:00
|
|
|
// Module 8252 (LimitedMap)
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
class LimitedMap extends Map {
|
2026-10-03 08:58:59 +00:00
|
|
|
constructor(maxSize) {
|
|
|
|
|
const tmp = new LimitedMap(new.target);
|
|
|
|
|
tmp.maxSize = maxSize;
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
set(arg0, arg1) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const self = this;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (this.size >= this.maxSize) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const iter = self.keys();
|
2026-10-08 09:57:35 +00:00
|
|
|
const iter2 = iter.next();
|
|
|
|
|
if (!iter2.done) {
|
|
|
|
|
self.delete(iter2.value);
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
return super.set(arg0, arg1);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
let closure_0 = LimitedMap.prototype;
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("lib/LimitedMap.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
export default LimitedMap;
|