"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[3862],{3862(e,t,a){a.d(t,{ThemesPluginInstance:()=>n});var s=a(3199);class n{#e;constructor(e){this.#e=e}init(){const e=this.#e;return e.themeMatchMedia=(0,s.lVH)("(prefers-color-scheme: dark)"),e.themeHandlers={themeChange:e=>{this.#t(e)},oldThemeChange:e=>{this.#t(e)}},e.manageMediaMatch=t=>{const a=e.themeHandlers;a&&e.themeMatchMedia&&(0,s.KpY)(e.themeMatchMedia,"change",a.themeChange,t)},e.loadTheme=async t=>{e.destroyed||(e.currentTheme=t,await e.refresh())},Promise.resolve()}manageListeners(e){const t=this.#e;t.manageMediaMatch?.(e)}async start(){return this.manageListeners(!0),Promise.resolve()}stop(){this.manageListeners(!1)}updateActualOptions(){const e=this.#e;return e.actualOptions.setTheme?.(e.currentTheme),!1}#t(e){const t=e,a=this.#e,s=a.options,n=s.defaultThemes,h=t.matches?n.dark:n.light,r=s.themes?.find(e=>e.name===h);r?.default.auto&&a.loadTheme?.(h)}}}}]);