"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[3710],{3710:(s,r,t)=>{t.r(r),t.d(r,{loadHsvColorPlugin:()=>n});var a=t(3290);function o(s){const r={b:0,g:0,r:0},t=s.h/60,a=s.s/100,o=s.v/100,e=o*a,n=e*(1-Math.abs(t%2-1));let v;if(t>=0&&t<=1?v={r:e,g:n,b:0}:t>1&&t<=2?v={r:n,g:e,b:0}:t>2&&t<=3?v={r:0,g:e,b:n}:t>3&&t<=4?v={r:0,g:n,b:e}:t>4&&t<=5?v={r:n,g:0,b:e}:t>5&&t<=6&&(v={r:e,g:0,b:n}),v){const s=o-e;r.r=Math.floor(255*(v.r+s)),r.g=Math.floor(255*(v.g+s)),r.b=Math.floor(255*(v.b+s))}return r}class e{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(s){var r;const t=null!==(r=s.value.hsv)&&void 0!==r?r:s.value;if(void 0!==t.h&&void 0!==t.v)return o(t)}handleRangeColor(s){var r;const t=null!==(r=s.value.hsv)&&void 0!==r?r:s.value;if(void 0!==t.h&&void 0!==t.v)return o({h:(0,a.Gu)(t.h),s:(0,a.Gu)(t.s),v:(0,a.Gu)(t.v)})}parseString(s){if(!s.startsWith("hsv"))return;const r=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(s);return r?(t={a:r.length>4?(0,a.BV)(r[5]):1,h:parseInt(r[1],10),s:parseInt(r[2],10),v:parseInt(r[3],10)},Object.assign({a:t.a},o(t))):void 0;var t}}function n(){(0,a.VI)(new e)}}}]);