"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[680],{680:(t,e,l)=>{l.r(e),l.d(e,{loadMultilineTextShape:()=>n});var i=l(3290);class a{draw(t,e,l,a){var n,o,s;const r=e.shapeData;if(void 0===r)return;const p=r.value;if(void 0===p)return;const d=e;void 0===d.text&&(d.text=(0,i.wA)(p,e.randomIndexData));const h=d.text,c=null!==(n=r.style)&&void 0!==n?n:"",u=null!==(o=r.weight)&&void 0!==o?o:"400",x=2*Math.round(l),w=null!==(s=r.font)&&void 0!==s?s:"Verdana",f=e.fill;t.font=`${c} ${u} ${x}px "${w}"`;const v=null==h?void 0:h.split("\n");if(v){t.globalAlpha=a;for(let e=0;e<v.length;e++)this._drawLine(t,v[e],l,a,e,f);t.globalAlpha=1}}async init(t){const e=t.options,l="multiline-text";if((0,i.dB)(l,e.particles.shape.type)){const t=e.particles.shape.options[l],a=[];(0,i.KH)(t,(t=>{a.push((0,i.mx)(t.font,t.weight))})),await Promise.all(a)}}_drawLine(t,e,l,i,a,n){const o={x:-e.length*l/2,y:l/2};n?t.fillText(e,o.x,o.y+2*l*a):t.strokeText(e,o.x,o.y+2*l*a)}}function n(t){t.addShape("multiline-text",new a)}}}]);