import{Sast,iase,aasn,baso,sasi,qasr,nasa,gass,tasl,oasm,jasc,easu,casp,d,uasf,vasg,fash,lasb,rasw}from"./index-6e99513e.js";import{wasy}from"./index-3db98739.js";import{getDataasv,loadLocaleContentasx,sendDataask}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntriesasj,translateasS}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";import"../../../../../../../../../js/components/select-component.js";functionz(t){lete,n,i,r,a,l,m,c,y,v,x,k,j,L,S,z,C,T,N,O,H,M,A,$,q,E,J,U,D,I,R,G,K,P,Q,V,Y,_,B,F,W,X,Z;return{c(){e=u("div"),n=u("div"),i=u("h1"),i.textContent="Add a Commune",r=p(),a=u("img"),m=p(),c=u("p"),c.textContent="If there are no communes near you who you can join and you want to start your own then do the following:",y=p(),v=u("ol"),v.innerHTML="<li>Click on the map to show us where you are located;</li> \n <li>Add a way to contact you or leave blank for a pin to point to our discord;</li> \n <li>Press "Submit" to add yourself to our map;</li> \n <li>Verify yourself by having a chat with us at our Discord server to show on the map;</li>",x=p(),k=u("div"),j=u("label"),j.textContent="Location:",L=p(),S=u("div"),z=u("input"),C=p(),T=u("div"),N=p(),O=u("div"),H=u("label"),H.textContent="Contact:",M=p(),A=u("div"),$=u("input"),q=p(),E=u("div"),J=p(),U=u("div"),D=u("label"),D.textContent="Status:",I=p(),R=u("div"),G=u("select-component"),K=p(),P=u("div"),Q=p(),V=u("button"),V.textContent="Submit",Y=p(),_=u("p"),B=p(),F=u("map-component"),d(a,"id","communes-img"),f(a.src,l="/img/common/communes.svg")||d(a,"src","/img/common/communes.svg"),d(a,"alt","communes"),d(c,"class","description"),d(j,"for","address-input"),d(z,"id","address-input"),d(z,"type","text"),z.readOnly=!0,d(T,"class","ghost-input"),d(S,"class","input-wrapper"),d(k,"id","address-input-wrapper"),d(k,"class","input-label-wrapper"),d(H,"for","contact-input"),d($,"id","contact-input"),d($,"type","text"),d(E,"class","ghost-input"),d(A,"class","input-wrapper"),d(O,"class","input-label-wrapper"),d(D,"for","contact-input"),g(G,"id","status-input"),g(G,"options",["forming","growing","not growing"]),d(P,"class","ghost-input"),d(R,"class","input-wrapper"),d(U,"id","status-input-wrapper"),d(U,"class","input-label-wrapper"),d(V,"id","submit-button"),d(_,"id","confirmation-msg"),g(F,"id","map"),g(F,"callback",W=t[17]),d(n,"id","text-container"),d(e,"id","container")},m(s,l){o(s,e,l),h(e,n),h(n,i),h(n,r),h(n,a),h(n,m),h(n,c),h(n,y),h(n,v),h(n,x),h(n,k),h(k,j),h(k,L),h(k,S),h(S,z),t[11](z),h(S,C),h(S,T),h(n,N),h(n,O),h(O,H),h(O,M),h(O,A),h(A,$),t[13]($),h(A,q),h(A,E),h(n,J),h(n,U),h(U,D),h(U,I),h(U,R),h(R,G),t[15](G),h(R,K),h(R,P),h(n,Q),h(n,V),h(n,Y),h(n,_),t[16](_),h(n,B),h(n,F),X||(Z=[b(z,"input",t[12]),b($,"input",t[14]),b(V,"click",t[10])],X=!0)},p(t,e){32&e&&W!==(W=t[17])&&g(F,"callback",W)},d(n){n&&s(e),t[11](null),t[13](null),t[15](null),t[16](null),X=!1,w(Z)}}}functionC(t){lete,n=3==t[4]&&z(t);return{c(){n&&n.c(),e=r()},m(t,i){n&&n.m(t,i),o(t,e,i)},p(t,o){3==t[4]?n?n.p(t,o):(n=z(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&s(e)}}}functionT(t){lete,n=t[4],l=C(t);return{c(){l.c(),e=r(),this.c=a},m(t,n){l.m(t,n),o(t,e,n)},p(t,[o]){16&o&&i(n,n=t[4])?(l.d(1),l=C(t),l.c(),l.m(e.parentNode,e)):l.p(t,o)},i:a,o:a,d(t){t&&s(e),l.d(t)}}}functionN(t){t.nextElementSibling.innerHTML=t.value}functionO(t,e,n){leto,i,r=y(0);l(t,r,(t=>n(4,o=t)));leta,s,u=y({});l(t,u,(t=>n(5,i=t)));letp,d,f,g,h;v("/assets/communes.json",(t=>{a=JSON.parse(t),s={};for(lettofa){lete=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),eins?s[e].push(t):s[e]=[t]}r.update((t=>t+1))}));letb=0,w=0,z=function(t,e){letn=newL.Icon({iconUrl:"/img/common/markers/marker-black.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[