"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[8932],{8932:(e,t,n)=>{n.r(t),n.d(t,{loadGenericPolygonShape:()=>i,loadPolygonShape:()=>d,loadTriangleShape:()=>l});var a=n(1197);class o{draw(e,t,n){const a=this.getCenter(t,n),o=this.getSidesData(t,n),r=o.count.numerator*o.count.denominator,s=o.count.numerator/o.count.denominator,i=180*(s-2)/s,l=Math.PI-Math.PI*i/180;if(e){e.beginPath(),e.translate(a.x,a.y),e.moveTo(0,0);for(let t=0;t<r;t++)e.lineTo(o.length,0),e.translate(o.length,0),e.rotate(l)}}getSidesCount(e){var t,n;const o=e.shapeData;return Math.round((0,a.Gu)(null!==(n=null!==(t=null==o?void 0:o.sides)&&void 0!==t?t:null==o?void 0:o.nb_sides)&&void 0!==n?n:5))}}class r extends o{getCenter(e,t){return{x:-t/(e.sides/3.5),y:-t/.76}}getSidesData(e,t){const n=e.sides;return{count:{denominator:1,numerator:n},length:2.66*t/(n/3)}}}class s extends o{getCenter(e,t){return{x:-t,y:t/1.66}}getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}}async function i(e){await e.addShape("polygon",new r)}async function l(e){await e.addShape("triangle",new s)}async function d(e){await i(e),await l(e)}}}]);