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