"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[353],{353(r,s,t){t.d(s,{AbsorbersInstancesManager:()=>n});var e=t(3199);class n{#r;#s;constructor(r){this.#s=r,this.#r=new Map}async addAbsorber(r,s,e){const{AbsorberInstance:n}=await t.e(5448).then(t.bind(t,5448)),a=new n(this.#s,r,s,e);return this.getArray(r).push(a),a}clear(r){this.initContainer(r),this.#r.set(r,[])}getArray(r){this.initContainer(r);let s=this.#r.get(r);return s||(s=[],this.#r.set(r,s)),s}initContainer(r){this.#r.has(r)||(this.#r.set(r,[]),r.getAbsorber??=s=>{const t=this.getArray(r);return void 0===s||(0,e.EtT)(s)?t[s??0]:t.find(r=>r.name===s)},r.addAbsorber??=(s,t)=>this.addAbsorber(r,s,t))}removeAbsorber(r,s){const t=this.getArray(r).indexOf(s);t>=0&&this.getArray(r).splice(t,1)}}}}]);