"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[2597],{2597(t,e,r){r.d(e,{loadFilterEffect:()=>l});var a=r(3199);class i{drawAfter(t){const{context:e}=t;e.restore()}drawBefore(t){const{context:e,particle:r}=t;e.save();const i="number"==typeof r.filterBlur?`${r.filterBlur}px`:r.filterBlur,l=r.filterBrightness,s=r.filterContrast,f=r.filterDropShadow,o=r.filterGrayscale,n="number"==typeof r.filterHueRotate?`${r.filterHueRotate}deg`:r.filterHueRotate,c=r.filterInvert,u=r.filterOpacity,p=r.filterSaturate,$=r.filterSepia,h=r.filterUrl,d=i?`blur(${i})`:"",g=(0,a.kZJ)(l)?"":`brightness(${l})`,k=(0,a.kZJ)(s)?"":`contrast(${s})`,w=f?`drop-shadow(${f})`:"",y=(0,a.kZJ)(o)?"":`grayscale(${o})`,b=(0,a.kZJ)(n)?"":`hue-rotate(${n})`,J=(0,a.kZJ)(c)?"":`invert(${c})`,Z=(0,a.kZJ)(u)?"":`opacity(${u})`,v=(0,a.kZJ)(p)?"":`saturate(${p})`,B=(0,a.kZJ)($)?"":`sepia(${$})`,S=h?`url(${h})`:"";e.filter=`${d} ${g} ${k} ${w} ${y} ${b} ${J} ${Z} ${v} ${B} ${S}`.trim()}particleInit(t,e){const r=e.effectData;r&&(e.filterBlur=r.blur,e.filterBrightness=r.brightness,e.filterContrast=r.contrast,e.filterDropShadow=r.dropShadow,e.filterGrayscale=r.grayscale,e.filterHueRotate=r.hueRotate,e.filterInvert=r.invert,e.filterOpacity=r.opacity,e.filterSaturate=r.saturate,e.filterSepia=r.sepia,e.filterUrl=r.url)}}async function l(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("filter",()=>Promise.resolve(new i))})}}}]);