import{S as t,i as e,a as o,b as n,s as r,q as i,n as s,g as a,t as c,o as m,e as l,w as p,c as g,d,u,v as f,f as h,x as b,y as w}from"./index-5b685137.js";import{w as x}from"./index-8744cf8a.js";import{loadLocaleContent as v,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k,translate as y}from"../../../../../../../../../js/libraries/mapTools.js";import{addCoopPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,o){const n=t.slice();return n[12]=e[o][0],n[3]=e[o][1],n}function O(t,e,o){const n=t.slice();return n[15]=e[o],n}function T(t){let e,o,r,i,s,c,m,x,v,j,k,y,z,O,T,C,E,R,S,_,q=t[1].cooperatives+"",A=t[1].p1+"",F=t[1].subheading1+"",G=t[1]["map-prompt"]+"",H=Object.entries(t[0]),J=[];for(let e=0;eo(2,r=t)));let s,a,l=x({});c(t,l,(t=>o(1,n=t)));let p=v(l,"cooperatives-component",i);v(l,"countries",i);function g(t,e,o){let n=t([22,0],2);k(s,a,n,e,o,z,"blue",{enableCountryGrouping:!0})}j("/assets/cooperatives.json",(t=>{o(3,s=JSON.parse(t)),o(0,a={});for(let t of s){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in a?a[e].push(t):o(0,a[e]=[t],a)}i.update((t=>t+1))})),m((()=>{}));return[a,n,r,s,i,l,p,g,function(t){return"en"==p?t:y(n,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:y(n,t))).join(", ")},t=>g(t,n,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("cooperatives-component",_);export{_ as default};