"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[9671],{3151:(t,n,i)=>{i.d(n,{L:()=>e});class e{constructor(t){this.container=t,this.type="external"}}},9671:(t,n,i)=>{i.r(n),i.d(n,{Connect:()=>a,ConnectLinks:()=>s,loadExternalConnectInteraction:()=>u});var e=i(3151),o=i(4684);class s{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class a{constructor(){this.distance=80,this.links=new s,this.radius=60}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links??t.lineLinked??t.line_linked),void 0!==t.radius&&(this.radius=t.radius))}}var c=i(6720),r=i(3326);function d(t,n,i){t.canvas.draw((e=>{const o=function(t,n,i,e){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,n,i,e){const o=Math.floor(i.getRadius()/n.getRadius()),s=n.getFillColor(),a=i.getFillColor();if(!s||!a)return;const r=n.getPosition(),d=i.getPosition(),l=(0,c.oc)(s,a,n.getRadius(),i.getRadius()),u=t.createLinearGradient(r.x,r.y,d.x,d.y);return u.addColorStop(0,(0,c.vz)(s,e)),u.addColorStop(o>1?1:o,(0,c.iz)(l,e)),u.addColorStop(1,(0,c.vz)(a,e)),u}(n,i,e,o.links.opacity)}(t,e,n,i);if(!o)return;const s=n.getPosition(),a=i.getPosition();!function(t,n,i,e,o){(0,r.pS)(t,e,o),t.lineWidth=n,t.strokeStyle=i,t.stroke()}(e,n.retina.linksWidth??0,o,s,a)}))}class l extends e.L{constructor(t){super(t)}clear(){}init(){const t=this.container,n=t.actualOptions.interactivity.modes.connect;n&&(t.retina.connectModeDistance=n.distance*t.retina.pixelRatio,t.retina.connectModeRadius=n.radius*t.retina.pixelRatio)}async interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const n=t.interactivity.mouse.position;if(!t.retina.connectModeDistance||t.retina.connectModeDistance<0||!t.retina.connectModeRadius||t.retina.connectModeRadius<0||!n)return;const i=Math.abs(t.retina.connectModeRadius),e=t.particles.quadTree.queryCircle(n,i,(t=>this.isEnabled(t)));let o=0;for(const n of e){const i=n.getPosition();for(const s of e.slice(o+1)){const e=s.getPosition(),o=Math.abs(t.retina.connectModeDistance),a=Math.abs(i.x-e.x),c=Math.abs(i.y-e.y);a<o&&c<o&&d(t,n,s)}++o}}}isEnabled(t){const n=this.container,i=n.interactivity.mouse,e=(t?.interactivity??n.actualOptions.interactivity).events;return!(!e.onHover.enable||!i.position)&&(0,o.dB)("connect",e.onHover.mode)}loadModeOptions(t,...n){t.connect||(t.connect=new a);for(const i of n)t.connect.load(i?.connect)}reset(){}}async function u(t,n=!0){await t.addInteractor("externalConnect",(t=>new l(t)),n)}}}]);