"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[9174],{9174(s,r,a){a.d(r,{loadHsvColorPlugin:()=>i});var n=a(3199);function e(s){const r={b:0,g:0,r:0},a=s.h/60,e=s.s/n.a56,t=s.v/n.a56,o=t*e,i=o*(1-Math.abs(a%2-1));let h;if(a>=0&&a<=1?h={r:o,g:i,b:0}:a>1&&a<=2?h={r:i,g:o,b:0}:a>2&&a<=3?h={r:0,g:o,b:i}:a>3&&a<=4?h={r:0,g:i,b:o}:a>4&&a<=5?h={r:i,g:0,b:o}:a>5&&a<=6&&(h={r:o,g:0,b:i}),h){const s=t-o;r.r=Math.floor((h.r+s)*n.oiR),r.g=Math.floor((h.g+s)*n.oiR),r.b=Math.floor((h.b+s)*n.oiR)}return r}const t=/hsva?\(\s*(\d+)°\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class o{accepts(s){return s.startsWith("hsv")}handleColor(s){const r=s.value.hsv??s.value;if("h"in r&&"s"in r&&"v"in r)return e(r)}handleRangeColor(s){const r=s.value.hsv??s.value;if("h"in r&&"s"in r&&"v"in r)return e({h:(0,n.VGA)(r.h),s:(0,n.VGA)(r.s),v:(0,n.VGA)(r.v)})}parseString(s){if(!this.accepts(s))return;const r=t.exec(s);return r?{a:(a={a:r.length>4?(0,n.M3Y)(r[5]):1,h:parseInt(r[1]??"0",10),s:parseInt(r[2]??"0",10),v:parseInt(r[3]??"0",10)}).a,...e(a)}:void 0;var a}}async function i(s){s.checkVersion("4.1.3"),await s.pluginManager.register(s=>{s.pluginManager.addColorManager("hsv",new o)})}}}]);