diff --git a/Server/app/svelte/public/locales/en/landing-component.json b/Server/app/svelte/public/locales/en/landing-component.json index b59598f..0e807c8 100644 --- a/Server/app/svelte/public/locales/en/landing-component.json +++ b/Server/app/svelte/public/locales/en/landing-component.json @@ -1,7 +1,7 @@ { "top": "Our organization is a decentralized federation build upon the principle of free association. It consists of many groups of people united around a cause of bringing down exploitative politico-economic systems. We aim to replace them with libertarian socialist systems based on decentralization, direct democracy and worker-ownership of the means of production with the goal of creating an equitable, democratic and sustainable world by stopping exploitation of humans and nature.", "groupsTitle": "GROUPS", - "groupsText": "We organize groups for the purposes of education, advocacy, and mutual aid. Our objective is to demonstrate how the current politico-economic systems detrimentally impact our well-being, present alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.", + "groupsText": "We organize groups for the purposes of education, advocacy, anti-fascist action and mutual aid. Our objective is to demonstrate how the current politico-economic systems detrimentally impact our well-being, present alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.", "communesTitle": "COMMUNES", "communesText": "We establish communes based on libertarian socialist principles, where commune members have ownership over land, houses, and the means of production as well as make decisions using direct democracy. We are gradually expanding our socialist world, one commune at a time.", "cooperativesTitle": "COOPERATIVES", diff --git a/Server/app/svelte/src/groups-component.svelte b/Server/app/svelte/src/groups-component.svelte index 541f1d1..7c90569 100644 --- a/Server/app/svelte/src/groups-component.svelte +++ b/Server/app/svelte/src/groups-component.svelte @@ -81,7 +81,13 @@

{$content.location}: {getAddress(entry)}

{$content.members}: {entry.members}

-

{$content.contact}: {entry.contact}

+ {#if entry.contact.includes("@")} +

{$content.contact}: {entry.contact}

+ {:else if entry.contact.includes("http")} +

{$content.contact}: {entry.contact}

+ {:else} +

{$content.contact}: {entry.contact}

+ {/if}
{/each} diff --git a/Server/public/js/components/auth-component.js b/Server/public/js/components/auth-component.js index 1dac988..423ced7 100644 --- a/Server/public/js/components/auth-component.js +++ b/Server/public/js/components/auth-component.js @@ -1 +1 @@ -import{S as t,i as o,a as e,b as s,s as n,e as i,c as r,n as a,d as c,f as u,l as m,g as l,r as g,h as p,j as d}from"./index-6a7bc1e2.js";import{sendText as f}from"../../../../../../../../../js/libraries/serverTools.js";import*as h from"../../../../../../../../../js/libraries/authTools.js";import"../../../../../../../../../js/components/login-component.js";import"../../../../../../../../../js/components/signup-component.js";function j(t){let o,e,n,p,d,f,h,j,w;return{c(){o=i("div"),e=i("div"),n=i("login-component"),p=r(),d=i("signup-component"),f=r(),h=i("div"),h.innerHTML="OR",this.c=a,c(e,"id","auth-grid-group"),c(h,"id","auth-or"),c(h,"class","pane"),c(o,"id","auth-group")},m(i,r){s(i,o,r),u(o,e),u(e,n),t[3](n),u(e,p),u(e,d),t[5](d),u(o,f),u(o,h),j||(w=[m(n,"click",t[4]),m(n,"keydown",y),m(d,"click",t[6]),m(d,"keydown",b)],j=!0)},p:a,i:a,o:a,d(e){e&&l(o),t[3](null),t[5](null),j=!1,g(w)}}}const y=()=>"",b=()=>"";function w(t,o,e){let s,n;h.redirectLogged();let i={googleInit:!1};function r(t){t==s?(e(0,s.focused=!0,s),e(1,n.focused=!1,n)):(e(0,s.focused=!1,s),e(1,n.focused=!0,n))}function a(t){console.log(t),f("/signup-google",t.credential,(t=>h.processLoginResponse(t,i.msgs,i.remember.checked)))}p("auth",i),function t(){"undefined"!=typeof google?(google.accounts.id.initialize({client_id:"93612176787-sr8qjqem4e3kok4msrnj8s1illt85a9g.apps.googleusercontent.com",callback:a,auto_select:!0,context:"signin"}),i.googleInit=!0):setTimeout(t,100)}();return[s,n,r,function(t){d[t?"unshift":"push"]((()=>{s=t,e(0,s)}))},()=>r(s),function(t){d[t?"unshift":"push"]((()=>{n=t,e(1,n)}))},()=>r(n)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},w,j,n,{},null),t&&t.target&&s(t.target,this,t.anchor)}}customElements.define("auth-component",k);export{k as default}; +import{S as t,i as o,a as e,b as s,s as n,h as i,j as r,n as a,k as u,l as c,m,d as l,r as g,q as p,f as d}from"./index-0d9f0c09.js";import{sendText as f}from"../../../../../../../../../js/libraries/serverTools.js";import*as h from"../../../../../../../../../js/libraries/authTools.js";import"../../../../../../../../../js/components/login-component.js";import"../../../../../../../../../js/components/signup-component.js";function j(t){let o,e,n,p,d,f,h,j,b;return{c(){o=i("div"),e=i("div"),n=i("login-component"),p=r(),d=i("signup-component"),f=r(),h=i("div"),h.innerHTML="OR",this.c=a,u(e,"id","auth-grid-group"),u(h,"id","auth-or"),u(h,"class","pane"),u(o,"id","auth-group")},m(i,r){s(i,o,r),c(o,e),c(e,n),t[3](n),c(e,p),c(e,d),t[5](d),c(o,f),c(o,h),j||(b=[m(n,"click",t[4]),m(n,"keydown",y),m(d,"click",t[6]),m(d,"keydown",w)],j=!0)},p:a,i:a,o:a,d(e){e&&l(o),t[3](null),t[5](null),j=!1,g(b)}}}const y=()=>"",w=()=>"";function b(t,o,e){let s,n;h.redirectLogged();let i={googleInit:!1};function r(t){t==s?(e(0,s.focused=!0,s),e(1,n.focused=!1,n)):(e(0,s.focused=!1,s),e(1,n.focused=!0,n))}function a(t){console.log(t),f("/signup-google",t.credential,(t=>h.processLoginResponse(t,i.msgs,i.remember.checked)))}p("auth",i),function t(){"undefined"!=typeof google?(google.accounts.id.initialize({client_id:"93612176787-sr8qjqem4e3kok4msrnj8s1illt85a9g.apps.googleusercontent.com",callback:a,auto_select:!0,context:"signin"}),i.googleInit=!0):setTimeout(t,100)}();return[s,n,r,function(t){d[t?"unshift":"push"]((()=>{s=t,e(0,s)}))},()=>r(s),function(t){d[t?"unshift":"push"]((()=>{n=t,e(1,n)}))},()=>r(n)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},b,j,n,{},null),t&&t.target&&s(t.target,this,t.anchor)}}customElements.define("auth-component",k);export{k as default}; diff --git a/Server/public/js/components/communes-add-component.js b/Server/public/js/components/communes-add-component.js index b3493c0..48281f5 100644 --- a/Server/public/js/components/communes-add-component.js +++ b/Server/public/js/components/communes-add-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as o,s as i,q as a,n as r,g as s,u as l,o as m,j as c,e as u,c as p,d,v as f,w as g,f as h,l as b,r as w}from"./index-6a7bc1e2.js";import{w as y}from"./index-4da4d0ce.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";import"../../../../../../../../../js/components/select-component.js";function z(t){let e,n,i,a,r,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",a=p(),r=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="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",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(r,"id","communes-img"),f(r.src,l="/img/common/communes.svg")||d(r,"src","/img/common/communes.svg"),d(r,"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,a),h(n,r),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)}}}function C(t){let e,n=3==t[4]&&z(t);return{c(){n&&n.c(),e=a()},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)}}}function T(t){let e,n=t[4],l=C(t);return{c(){l.c(),e=a(),this.c=r},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:r,o:r,d(t){t&&s(e),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,e,n){let o,i,a=y(0);l(t,a,(t=>n(4,o=t)));let r,s,u=y({});l(t,u,(t=>n(5,i=t)));let p,d,f,g,h;v("/assets/communes.json",(t=>{r=JSON.parse(t),s={};for(let t of r){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):s[e]=[t]}a.update((t=>t+1))}));let b=0,w=0,z=function(t,e){let n=new L.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:[41,41]});return L.marker([t,e],{icon:n})}(0,0);z.setOpacity(0);let C=x(u,"communes-component",a);function T(t,e,n){let o,i=""+e.Group+"
    ";for(let a of["location","members","contact"]){let r=e[a]+": ";if("contact"==a)i+=r+""+t.contact+"";else if("location"==a){let a,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?s.map((t=>t)).join(", "):s.map((t=>S(e,t))).join(", "),i+=r+a+"
    ",o=[t.latitude,t.longitude]}else i+=r+t[a]+"
    "}return{text:i,coordinates:o}}function O(t,e,o){let i=t([22,0],2);j(r,s,i,e,o,T,"green"),z.addTo(i),i.on("click",(function(t){let e=t.latlng.lat,o=t.latlng.lng;b=e,w=o,function(t,e,n){let o=L.latLng(e,n);t.setLatLng(o)}(z,e,o),z.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${o}&format=jsonv2`,(t=>{let e=(t=JSON.parse(t)).address,o=e.city||e.town||e.village||e.hamlet,i=e.state,a=e.country;null!=i?a+=", "+i:i="",null!=o?a+=", "+o:o="",n(1,d.value=a,d),N(d)})),function(t,e){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${e}&format=jsonv2&accept-language=en`,(t=>{let e=(t=JSON.parse(t)).address,n=e.city||e.town||e.village||e.hamlet,o=e.state,i=e.country;null!=o||(o=""),null!=n||(n=""),h=[i,o,n]}))}(e,o)}))}function H(t){!1!==t?(n(0,p.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",p),n(0,p.style.color="green",p)):(n(0,p.innerHTML="Something went wrong.",p),n(0,p.style.color="red",p))}x(u,"countries",a),m((()=>{}));return[p,d,f,g,o,i,a,u,C,O,function(){if(null!=h){let t={country:h[0],state:h[1],town:h[2],latitude:b,longitude:w,contact:f.value,status:g.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+C+"/communes-add-post/",t,H)}},function(t){c[t?"unshift":"push"]((()=>{d=t,n(1,d)}))},()=>N(d),function(t){c[t?"unshift":"push"]((()=>{f=t,n(2,f)}))},()=>N(f),function(t){c[t?"unshift":"push"]((()=>{g=t,n(3,g)}))},function(t){c[t?"unshift":"push"]((()=>{p=t,n(0,p)}))},t=>O(t,i,C)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,T,i,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("communes-add-component",H);export{H as default}; +import{S as t,i as n,a as e,b as o,s as i,e as r,n as a,d as s,c as l,o as m,f as c,h as u,j as p,k as d,w as f,x as g,l as h,m as b,r as w}from"./index-0d9f0c09.js";import{w as y}from"./index-1c123138.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";import"../../../../../../../../../js/components/select-component.js";function z(t){let n,e,i,r,a,l,m,c,y,v,x,k,j,L,S,z,C,T,N,O,H,M,A,$,E,J,U,q,D,I,R,G,K,P,Q,V,Y,_,B,F,W,X,Z;return{c(){n=u("div"),e=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="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",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"),E=p(),J=u("div"),U=p(),q=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(J,"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(q,"id","status-input-wrapper"),d(q,"class","input-label-wrapper"),d(V,"id","submit-button"),d(_,"id","confirmation-msg"),g(F,"id","map"),g(F,"callback",W=t[17]),d(e,"id","text-container"),d(n,"id","container")},m(s,l){o(s,n,l),h(n,e),h(e,i),h(e,r),h(e,a),h(e,m),h(e,c),h(e,y),h(e,v),h(e,x),h(e,k),h(k,j),h(k,L),h(k,S),h(S,z),t[11](z),h(S,C),h(S,T),h(e,N),h(e,O),h(O,H),h(O,M),h(O,A),h(A,$),t[13]($),h(A,E),h(A,J),h(e,U),h(e,q),h(q,D),h(q,I),h(q,R),h(R,G),t[15](G),h(R,K),h(R,P),h(e,Q),h(e,V),h(e,Y),h(e,_),t[16](_),h(e,B),h(e,F),X||(Z=[b(z,"input",t[12]),b($,"input",t[14]),b(V,"click",t[10])],X=!0)},p(t,n){32&n&&W!==(W=t[17])&&g(F,"callback",W)},d(e){e&&s(n),t[11](null),t[13](null),t[15](null),t[16](null),X=!1,w(Z)}}}function C(t){let n,e=3==t[4]&&z(t);return{c(){e&&e.c(),n=r()},m(t,i){e&&e.m(t,i),o(t,n,i)},p(t,o){3==t[4]?e?e.p(t,o):(e=z(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(t){e&&e.d(t),t&&s(n)}}}function T(t){let n,e=t[4],l=C(t);return{c(){l.c(),n=r(),this.c=a},m(t,e){l.m(t,e),o(t,n,e)},p(t,[o]){16&o&&i(e,e=t[4])?(l.d(1),l=C(t),l.c(),l.m(n.parentNode,n)):l.p(t,o)},i:a,o:a,d(t){t&&s(n),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,n,e){let o,i,r=y(0);l(t,r,(t=>e(4,o=t)));let a,s,u=y({});l(t,u,(t=>e(5,i=t)));let p,d,f,g,h;v("/assets/communes.json",(t=>{a=JSON.parse(t),s={};for(let t of a){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in s?s[n].push(t):s[n]=[t]}r.update((t=>t+1))}));let b=0,w=0,z=function(t,n){let e=new L.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:[41,41]});return L.marker([t,n],{icon:e})}(0,0);z.setOpacity(0);let C=x(u,"communes-component",r);function T(t,n,e){let o,i=""+n.Group+"
    ";for(let r of["location","members","contact"]){let a=n[r]+": ";if("contact"==r)i+=a+""+t.contact+"";else if("location"==r){let r,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));r="en"==e?s.map((t=>t)).join(", "):s.map((t=>S(n,t))).join(", "),i+=a+r+"
    ",o=[t.latitude,t.longitude]}else i+=a+t[r]+"
    "}return{text:i,coordinates:o}}function O(t,n,o){let i=t([22,0],2);j(a,s,i,n,o,T,"green"),z.addTo(i),i.on("click",(function(t){let n=t.latlng.lat,o=t.latlng.lng;b=n,w=o,function(t,n,e){let o=L.latLng(n,e);t.setLatLng(o)}(z,n,o),z.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${n}&lon=${o}&format=jsonv2`,(t=>{let n=(t=JSON.parse(t)).address,o=n.city||n.town||n.village||n.hamlet,i=n.state,r=n.country;null!=i?r+=", "+i:i="",null!=o?r+=", "+o:o="",e(1,d.value=r,d),N(d)})),function(t,n){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${n}&format=jsonv2&accept-language=en`,(t=>{let n=(t=JSON.parse(t)).address,e=n.city||n.town||n.village||n.hamlet,o=n.state,i=n.country;null!=o||(o=""),null!=e||(e=""),h=[i,o,e]}))}(n,o)}))}function H(t){!1!==t?(e(0,p.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",p),e(0,p.style.color="green",p)):(e(0,p.innerHTML="Something went wrong.",p),e(0,p.style.color="red",p))}x(u,"countries",r),m((()=>{}));return[p,d,f,g,o,i,r,u,C,O,function(){if(null!=h){let t={country:h[0],state:h[1],town:h[2],latitude:b,longitude:w,contact:f.value,status:g.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+C+"/communes-add-post/",t,H)}},function(t){c[t?"unshift":"push"]((()=>{d=t,e(1,d)}))},()=>N(d),function(t){c[t?"unshift":"push"]((()=>{f=t,e(2,f)}))},()=>N(f),function(t){c[t?"unshift":"push"]((()=>{g=t,e(3,g)}))},function(t){c[t?"unshift":"push"]((()=>{p=t,e(0,p)}))},t=>O(t,i,C)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},O,T,i,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("communes-add-component",H);export{H as default}; diff --git a/Server/public/js/components/communes-component.js b/Server/public/js/components/communes-component.js index 6a55930..ab6abf9 100644 --- a/Server/public/js/components/communes-component.js +++ b/Server/public/js/components/communes-component.js @@ -1 +1 @@ -import{S as t,i as n,a as o,b as e,s as r,q as m,n as s,g as a,u as c,o as i,e as l,t as p,c as u,d,v as g,w as f,f as h,x as b,y as j}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.js";import{loadLocaleContent as y,getData as v}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addCommunePinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,n,o){const e=t.slice();return e[12]=n[o][0],e[3]=n[o][1],e}function O(t,n,o){const e=t.slice();return e[15]=n[o],e}function T(t){let n,o,r,m,s,c,i,x,y,v,w,k,z,O,T,C,E,R,S,q,A=t[1].communes+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let n=0;no(2,r=t)));let s,a,l=x({});c(t,l,(t=>o(1,e=t)));let p=y(l,"communes-component",m);y(l,"countries",m);function u(t,n,o){let e=t([22,0],2);w(s,a,e,n,o,z,"red",{enableCountryGrouping:!0})}v("/assets/communes.json",(t=>{o(3,s=JSON.parse(t)),o(0,a={});for(let t of s){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in a?a[n].push(t):o(0,a[n]=[t],a)}m.update((t=>t+1))})),i((()=>{}));return[a,e,r,s,m,l,p,u,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>u(t,e,p)]}class q extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("communes-component",q);export{q as default}; +import{S as t,i as n,a as o,b as e,s as r,e as m,n as s,d as a,c,o as i,h as l,t as p,j as u,k as d,w as g,x as f,l as h,y as b,p as j}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addCommunePinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,n,o){const e=t.slice();return e[12]=n[o][0],e[3]=n[o][1],e}function O(t,n,o){const e=t.slice();return e[15]=n[o],e}function T(t){let n,o,r,m,s,c,i,x,y,w,v,k,z,O,T,C,E,R,S,A,F=t[1].communes+"",G=t[1].p1+"",H=t[1].subheading1+"",J=t[1]["map-prompt"]+"",K=Object.entries(t[0]),L=[];for(let n=0;no(2,r=t)));let s,a,l=x({});c(t,l,(t=>o(1,e=t)));let p=y(l,"communes-component",m);y(l,"countries",m);function u(t,n,o){let e=t([22,0],2);v(s,a,e,n,o,z,"red",{enableCountryGrouping:!0})}w("/assets/communes.json",(t=>{o(3,s=JSON.parse(t)),o(0,a={});for(let t of s){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in a?a[n].push(t):o(0,a[n]=[t],a)}m.update((t=>t+1))})),i((()=>{}));return[a,e,r,s,m,l,p,u,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>u(t,e,p)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("communes-component",A);export{A as default}; diff --git a/Server/public/js/components/compass-component.js b/Server/public/js/components/compass-component.js index be9b4ba..f68a463 100644 --- a/Server/public/js/components/compass-component.js +++ b/Server/public/js/components/compass-component.js @@ -1 +1 @@ -import{S as t,i as n,a as e,b as i,s as o,q as r,n as s,g as a,u as l,o as m,e as c,t as u,c as p,d,v as g,f as h,x as f,l as b,y as v,r as x}from"./index-6a7bc1e2.js";import{w as q}from"./index-4da4d0ce.js";import{loadLocaleContent as _}from"../../../../../../../../../js/libraries/serverTools.js";import{shuffleArray as z}from"../../../../../../../../../js/libraries/miscTools.js";function y(t,n,e){const i=t.slice();return i[19]=n[e],i[21]=e,i}function w(t){let n,e,r,s,l,m,b,v,x=t[5].heading+"",q=t[0],_=S(t);return{c(){n=c("div"),e=c("div"),r=c("h1"),s=u(x),l=p(),m=c("img"),v=p(),_.c(),d(m,"id","compass-img"),g(m.src,b="/img/common/compass.svg")||d(m,"src","/img/common/compass.svg"),d(m,"alt","compass"),d(e,"id","text-container"),d(n,"id","container")},m(t,o){i(t,n,o),h(n,e),h(e,r),h(r,s),h(e,l),h(e,m),h(e,v),_.m(e,null)},p(t,n){32&n&&x!==(x=t[5].heading+"")&&f(s,x),1&n&&o(q,q=t[0])?(_.d(1),_=S(t),_.c(),_.m(e,null)):_.p(t,n)},d(t){t&&a(n),_.d(t)}}}function k(t){let n,e,o,r,s,l,m,g,v,x,q,_,z,y,w,k,j,C,S,B,M,N,T,D;return{c(){n=c("p"),n.textContent="You are compatible with ...",e=p(),o=c("ul"),r=c("li"),s=u("capitalism by "),l=c("span"),m=u(t[2]),g=u("%"),v=p(),x=c("li"),q=u("vanguardism by "),_=c("span"),z=u(t[3]),y=u("%"),w=p(),k=c("li"),j=u("libertarian socialism by "),C=c("span"),S=u(t[4]),B=u("%"),M=p(),N=c("button"),N.textContent="back",d(o,"class","results-list"),d(N,"class","quiz-buttons")},m(a,c){i(a,n,c),i(a,e,c),i(a,o,c),h(o,r),h(r,s),h(r,l),h(l,m),h(r,g),h(o,v),h(o,x),h(x,q),h(x,_),h(_,z),h(x,y),h(o,w),h(o,k),h(k,j),h(k,C),h(C,S),h(k,B),i(a,M,c),i(a,N,c),T||(D=b(N,"click",t[16]),T=!0)},p(t,n){4&n&&f(m,t[2]),8&n&&f(z,t[3]),16&n&&f(S,t[4])},d(t){t&&a(n),t&&a(e),t&&a(o),t&&a(M),t&&a(N),T=!1,D()}}}function j(t){let n,e,o,r,s,l,m,g,q,_=t[5].qs[t[0]].q+"",z=t[5].qs[t[0]].as,w=[];for(let n=0;ne(6,o=t)));let s=q({});l(t,s,(t=>e(5,i=t))),_(s,"countries",r),_(s,"compass-component",r,(function(t){for(let n of t.qs)z(n.as)}));let a=0,c=[],u="",p="",d="";function g(t){null!=c[t]&&at.includes("C"))).filter(Boolean).length/c.length).toString()),e(3,p=Math.round(100*c.map((t=>t.includes("V"))).filter(Boolean).length/c.length).toString()),e(4,d=Math.round(100*c.map((t=>t.includes("LS"))).filter(Boolean).length/c.length).toString())),e(0,a+=1))}function h(t){0!=a&&e(0,a-=1)}m((()=>{}));return[a,c,u,p,d,i,o,r,s,g,h,function(){c[a]=this.__value,e(1,c)},[[]],t=>e(1,c[a]=t[1],c),()=>h(),()=>g(a),()=>h()]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},N,M,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("compass-component",T);export{T as default}; +import{S as t,i as n,a as e,b as i,s as o,e as r,n as s,d as a,c as l,o as m,h as c,t as u,j as p,k as d,w as g,l as h,y as f,m as b,p as v,r as x}from"./index-0d9f0c09.js";import{w as q}from"./index-1c123138.js";import{loadLocaleContent as _}from"../../../../../../../../../js/libraries/serverTools.js";import{shuffleArray as z}from"../../../../../../../../../js/libraries/miscTools.js";function w(t,n,e){const i=t.slice();return i[19]=n[e],i[21]=e,i}function y(t){let n,e,r,s,l,m,b,v,x=t[5].heading+"",q=t[0],_=S(t);return{c(){n=c("div"),e=c("div"),r=c("h1"),s=u(x),l=p(),m=c("img"),v=p(),_.c(),d(m,"id","compass-img"),g(m.src,b="/img/common/compass.svg")||d(m,"src","/img/common/compass.svg"),d(m,"alt","compass"),d(e,"id","text-container"),d(n,"id","container")},m(t,o){i(t,n,o),h(n,e),h(e,r),h(r,s),h(e,l),h(e,m),h(e,v),_.m(e,null)},p(t,n){32&n&&x!==(x=t[5].heading+"")&&f(s,x),1&n&&o(q,q=t[0])?(_.d(1),_=S(t),_.c(),_.m(e,null)):_.p(t,n)},d(t){t&&a(n),_.d(t)}}}function k(t){let n,e,o,r,s,l,m,g,v,x,q,_,z,w,y,k,j,C,S,B,M,N,T,D;return{c(){n=c("p"),n.textContent="You are compatible with ...",e=p(),o=c("ul"),r=c("li"),s=u("capitalism by "),l=c("span"),m=u(t[2]),g=u("%"),v=p(),x=c("li"),q=u("vanguardism by "),_=c("span"),z=u(t[3]),w=u("%"),y=p(),k=c("li"),j=u("libertarian socialism by "),C=c("span"),S=u(t[4]),B=u("%"),M=p(),N=c("button"),N.textContent="back",d(o,"class","results-list"),d(N,"class","quiz-buttons")},m(a,c){i(a,n,c),i(a,e,c),i(a,o,c),h(o,r),h(r,s),h(r,l),h(l,m),h(r,g),h(o,v),h(o,x),h(x,q),h(x,_),h(_,z),h(x,w),h(o,y),h(o,k),h(k,j),h(k,C),h(C,S),h(k,B),i(a,M,c),i(a,N,c),T||(D=b(N,"click",t[16]),T=!0)},p(t,n){4&n&&f(m,t[2]),8&n&&f(z,t[3]),16&n&&f(S,t[4])},d(t){t&&a(n),t&&a(e),t&&a(o),t&&a(M),t&&a(N),T=!1,D()}}}function j(t){let n,e,o,r,s,l,m,g,q,_=t[5].qs[t[0]].q+"",z=t[5].qs[t[0]].as,y=[];for(let n=0;ne(6,o=t)));let s=q({});l(t,s,(t=>e(5,i=t))),_(s,"countries",r),_(s,"compass-component",r,(function(t){for(let n of t.qs)z(n.as)}));let a=0,c=[],u="",p="",d="";function g(t){null!=c[t]&&at.includes("C"))).filter(Boolean).length/c.length).toString()),e(3,p=Math.round(100*c.map((t=>t.includes("V"))).filter(Boolean).length/c.length).toString()),e(4,d=Math.round(100*c.map((t=>t.includes("LS"))).filter(Boolean).length/c.length).toString())),e(0,a+=1))}function h(t){0!=a&&e(0,a-=1)}m((()=>{}));return[a,c,u,p,d,i,o,r,s,g,h,function(){c[a]=this.__value,e(1,c)},[[]],t=>e(1,c[a]=t[1],c),()=>h(),()=>g(a),()=>h()]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},N,M,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("compass-component",T);export{T as default}; diff --git a/Server/public/js/components/confirmation-component.js b/Server/public/js/components/confirmation-component.js index 16634da..419eb02 100644 --- a/Server/public/js/components/confirmation-component.js +++ b/Server/public/js/components/confirmation-component.js @@ -1 +1 @@ -import{S as t,i as n,a as i,b as a,s,e as o,c as e,n as r,d as u,f as l,l as m,g as p,r as f,o as h,j as c}from"./index-6a7bc1e2.js";import*as d from"../../../../../../../../../js/libraries/authTools.js";function g(t){let n,i,s,h,c,d,g,x,b,C,y,v,I,w,j,k,E,T,z,M,O,R,D;return{c(){n=o("div"),i=o("h2"),i.textContent="CONFIRMATION CODE",s=e(),h=o("div"),c=o("input"),d=o("span"),d.textContent="-",g=e(),x=o("input"),b=o("span"),b.textContent="-",C=e(),y=o("input"),v=o("span"),v.textContent="-",I=e(),w=o("input"),j=o("span"),j.textContent="-",k=e(),E=o("input"),T=e(),z=o("span"),M=e(),O=o("button"),O.textContent="Confirm",this.c=r,u(i,"class","auth-title title-highlight"),u(c,"class","authConfirmationInput"),u(c,"type","text"),u(c,"maxlength","1"),u(d,"class","dash"),u(x,"class","authConfirmationInput"),u(x,"type","text"),u(x,"maxlength","1"),u(b,"class","dash"),u(y,"class","authConfirmationInput"),u(y,"type","text"),u(y,"maxlength","1"),u(v,"class","dash"),u(w,"class","authConfirmationInput"),u(w,"type","text"),u(w,"maxlength","1"),u(j,"class","dash"),u(E,"class","authConfirmationInput"),u(E,"type","text"),u(E,"maxlength","1"),u(h,"id","confirmationInputs"),u(z,"id","confirmation-msg"),u(O,"class","auth-button"),u(n,"class","pane auth-pane")},m(o,e){a(o,n,e),l(n,i),l(n,s),l(n,h),l(h,c),t[6](c),l(h,d),l(h,g),l(h,x),t[8](x),l(h,b),l(h,C),l(h,y),t[10](y),l(h,v),l(h,I),l(h,w),t[12](w),l(h,j),l(h,k),l(h,E),t[14](E),l(n,T),l(n,z),t[16](z),l(n,M),l(n,O),t[17](O),R||(D=[m(c,"input",t[7]),m(x,"input",t[9]),m(y,"input",t[11]),m(w,"input",t[13]),m(E,"input",t[15]),m(O,"click",t[18])],R=!0)},p:r,i:r,o:r,d(i){i&&p(n),t[6](null),t[8](null),t[10](null),t[12](null),t[14](null),t[16](null),t[17](null),R=!1,f(D)}}}function x(t,n,i){let a,s,o=[];function e(t,n){n.data in["0","1","2","3","4","5","6","7","8","9"]?t<4?o[t+1].focus():d.confirmEmail(a,r(),u):i(0,o[t].value="",o)}function r(){let t="";for(let n of o)t+=n.value;return parseInt(t)}function u(t){"true"==t?d.toDashboard():i(1,a.innerHTML="Wrong code",a)}h((()=>{}));return[o,a,s,e,r,u,function(t){c[t?"unshift":"push"]((()=>{o[0]=t,i(0,o)}))},t=>e(0,t),function(t){c[t?"unshift":"push"]((()=>{o[1]=t,i(0,o)}))},t=>e(1,t),function(t){c[t?"unshift":"push"]((()=>{o[2]=t,i(0,o)}))},t=>e(2,t),function(t){c[t?"unshift":"push"]((()=>{o[3]=t,i(0,o)}))},t=>e(3,t),function(t){c[t?"unshift":"push"]((()=>{o[4]=t,i(0,o)}))},t=>e(4,t),function(t){c[t?"unshift":"push"]((()=>{a=t,i(1,a)}))},function(t){c[t?"unshift":"push"]((()=>{s=t,i(2,s)}))},()=>d.confirmEmail(a,r(),u)]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},x,g,s,{},null),t&&t.target&&a(t.target,this,t.anchor)}}customElements.define("confirmation-component",b);export{b as default}; +import{S as t,i as n,a as i,b as a,s,h as o,j as e,n as r,k as u,l,m,d as p,r as f,o as h,f as c}from"./index-0d9f0c09.js";import*as d from"../../../../../../../../../js/libraries/authTools.js";function g(t){let n,i,s,h,c,d,g,x,b,C,y,v,I,w,k,j,E,T,z,M,O,R,D;return{c(){n=o("div"),i=o("h2"),i.textContent="CONFIRMATION CODE",s=e(),h=o("div"),c=o("input"),d=o("span"),d.textContent="-",g=e(),x=o("input"),b=o("span"),b.textContent="-",C=e(),y=o("input"),v=o("span"),v.textContent="-",I=e(),w=o("input"),k=o("span"),k.textContent="-",j=e(),E=o("input"),T=e(),z=o("span"),M=e(),O=o("button"),O.textContent="Confirm",this.c=r,u(i,"class","auth-title title-highlight"),u(c,"class","authConfirmationInput"),u(c,"type","text"),u(c,"maxlength","1"),u(d,"class","dash"),u(x,"class","authConfirmationInput"),u(x,"type","text"),u(x,"maxlength","1"),u(b,"class","dash"),u(y,"class","authConfirmationInput"),u(y,"type","text"),u(y,"maxlength","1"),u(v,"class","dash"),u(w,"class","authConfirmationInput"),u(w,"type","text"),u(w,"maxlength","1"),u(k,"class","dash"),u(E,"class","authConfirmationInput"),u(E,"type","text"),u(E,"maxlength","1"),u(h,"id","confirmationInputs"),u(z,"id","confirmation-msg"),u(O,"class","auth-button"),u(n,"class","pane auth-pane")},m(o,e){a(o,n,e),l(n,i),l(n,s),l(n,h),l(h,c),t[6](c),l(h,d),l(h,g),l(h,x),t[8](x),l(h,b),l(h,C),l(h,y),t[10](y),l(h,v),l(h,I),l(h,w),t[12](w),l(h,k),l(h,j),l(h,E),t[14](E),l(n,T),l(n,z),t[16](z),l(n,M),l(n,O),t[17](O),R||(D=[m(c,"input",t[7]),m(x,"input",t[9]),m(y,"input",t[11]),m(w,"input",t[13]),m(E,"input",t[15]),m(O,"click",t[18])],R=!0)},p:r,i:r,o:r,d(i){i&&p(n),t[6](null),t[8](null),t[10](null),t[12](null),t[14](null),t[16](null),t[17](null),R=!1,f(D)}}}function x(t,n,i){let a,s,o=[];function e(t,n){n.data in["0","1","2","3","4","5","6","7","8","9"]?t<4?o[t+1].focus():d.confirmEmail(a,r(),u):i(0,o[t].value="",o)}function r(){let t="";for(let n of o)t+=n.value;return parseInt(t)}function u(t){"true"==t?d.toDashboard():i(1,a.innerHTML="Wrong code",a)}h((()=>{}));return[o,a,s,e,r,u,function(t){c[t?"unshift":"push"]((()=>{o[0]=t,i(0,o)}))},t=>e(0,t),function(t){c[t?"unshift":"push"]((()=>{o[1]=t,i(0,o)}))},t=>e(1,t),function(t){c[t?"unshift":"push"]((()=>{o[2]=t,i(0,o)}))},t=>e(2,t),function(t){c[t?"unshift":"push"]((()=>{o[3]=t,i(0,o)}))},t=>e(3,t),function(t){c[t?"unshift":"push"]((()=>{o[4]=t,i(0,o)}))},t=>e(4,t),function(t){c[t?"unshift":"push"]((()=>{a=t,i(1,a)}))},function(t){c[t?"unshift":"push"]((()=>{s=t,i(2,s)}))},()=>d.confirmEmail(a,r(),u)]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},x,g,s,{},null),t&&t.target&&a(t.target,this,t.anchor)}}customElements.define("confirmation-component",b);export{b as default}; diff --git a/Server/public/js/components/cookies-dialog.js b/Server/public/js/components/cookies-dialog.js index 0e7b513..34ce750 100644 --- a/Server/public/js/components/cookies-dialog.js +++ b/Server/public/js/components/cookies-dialog.js @@ -1 +1 @@ -import{S as e,i as s,a as t,b as o,s as i,e as a,n as r,d as n,g as c,o as d}from"./index-6a7bc1e2.js";function p(e){let s;return{c(){s=a("div"),s.innerHTML="

    We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.

    ",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default}; +import{S as e,i as s,a as t,b as o,s as i,h as a,n as r,k as n,d as c,o as d}from"./index-0d9f0c09.js";function p(e){let s;return{c(){s=a("div"),s.innerHTML="

    We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.

    ",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default}; diff --git a/Server/public/js/components/cooperatives-add-component.js b/Server/public/js/components/cooperatives-add-component.js index 0845ad3..530cc95 100644 --- a/Server/public/js/components/cooperatives-add-component.js +++ b/Server/public/js/components/cooperatives-add-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as o,s as i,q as r,n as a,g as s,u as l,o as c,j as m,e as p,c as u,d,v as g,w as f,f as h,l as b,r as w}from"./index-6a7bc1e2.js";import{w as y}from"./index-4da4d0ce.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let e,n,i,r,a,l,c,m,y,v,x,k,j,L,S,z,T,C,N,O,H,M,A,$,q,E,J,U,D,G,I,R,K,P,Q;return{c(){e=p("div"),n=p("div"),i=p("h1"),i.textContent="Add a Group",r=u(),a=p("img"),c=u(),m=p("p"),m.textContent="If there are no groups in your town with whom you can organize then do the following:",y=u(),v=p("ol"),v.innerHTML="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",x=u(),k=p("div"),j=p("label"),j.textContent="Location:",L=u(),S=p("div"),z=p("input"),T=u(),C=p("div"),N=u(),O=p("div"),H=p("label"),H.textContent="Contact:",M=u(),A=p("div"),$=p("input"),q=u(),E=p("div"),J=u(),U=p("button"),U.textContent="Submit",D=u(),G=p("p"),I=u(),R=p("map-component"),d(a,"id","groups-img"),g(a.src,l="/img/common/groups.svg")||d(a,"src","/img/common/groups.svg"),d(a,"alt","groups"),d(m,"class","description"),d(j,"for","address-input"),d(z,"id","address-input"),d(z,"type","text"),z.readOnly=!0,d(C,"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(U,"id","submit-button"),d(G,"id","confirmation-msg"),f(R,"id","map"),f(R,"callback",K=t[15]),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,c),h(n,m),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[10](z),h(S,T),h(S,C),h(n,N),h(n,O),h(O,H),h(O,M),h(O,A),h(A,$),t[12]($),h(A,q),h(A,E),h(n,J),h(n,U),h(n,D),h(n,G),t[14](G),h(n,I),h(n,R),P||(Q=[b(z,"input",t[11]),b($,"input",t[13]),b(U,"click",t[9])],P=!0)},p(t,e){16&e&&K!==(K=t[15])&&f(R,"callback",K)},d(n){n&&s(e),t[10](null),t[12](null),t[14](null),P=!1,w(Q)}}}function T(t){let e,n=3==t[3]&&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[3]?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)}}}function C(t){let e,n=t[3],l=T(t);return{c(){l.c(),e=r(),this.c=a},m(t,n){l.m(t,n),o(t,e,n)},p(t,[o]){8&o&&i(n,n=t[3])?(l.d(1),l=T(t),l.c(),l.m(e.parentNode,e)):l.p(t,o)},i:a,o:a,d(t){t&&s(e),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,e,n){let o,i,r=y(0);l(t,r,(t=>n(3,o=t)));let a,s,p=y({});l(t,p,(t=>n(4,i=t)));let u,d,g,f;v("/assets/groups.json",(t=>{a=JSON.parse(t),s={};for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):s[e]=[t]}r.update((t=>t+1))}));let h=0,b=0,w=function(t,e){let n=new L.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:[41,41]});return L.marker([t,e],{icon:n})}(0,0);w.setOpacity(0);let z=x(p,"groups-component",r);function T(t,e,n){let o,i=""+e.Group+"
    ";for(let r of["location","members","contact"]){let a=e[r]+": ";if("contact"==r)i+=a+""+t.contact+"";else if("location"==r){let r,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));r="en"==n?s.map((t=>t)).join(", "):s.map((t=>S(e,t))).join(", "),i+=a+r+"
    ",o=[t.latitude,t.longitude]}else i+=a+t[r]+"
    "}return{text:i,coordinates:o}}function C(t,e,o){let i=t([22,0],2);j(a,s,i,e,o,T,"green"),w.addTo(i),i.on("click",(function(t){let e=t.latlng.lat,o=t.latlng.lng;h=e,b=o,function(t,e,n){let o=L.latLng(e,n);t.setLatLng(o)}(w,e,o),w.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${o}&format=jsonv2`,(t=>{let e=(t=JSON.parse(t)).address,o=e.city||e.town||e.village||e.hamlet,i=e.state,r=e.country;null!=i?r+=", "+i:i="",null!=o?r+=", "+o:o="",n(1,d.value=r,d),N(d)})),function(t,e){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${e}&format=jsonv2&accept-language=en`,(t=>{let e=(t=JSON.parse(t)).address,n=e.city||e.town||e.village||e.hamlet,o=e.state,i=e.country;null!=o||(o=""),null!=n||(n=""),f=[i,o,n]}))}(e,o)}))}function O(t){!1!==t?(n(0,u.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",u),n(0,u.style.color="green",u)):(n(0,u.innerHTML="Something went wrong.",u),n(0,u.style.color="red",u))}x(p,"countries",r),c((()=>{}));return[u,d,g,o,i,r,p,z,C,function(){if(null!=f){let t={country:f[0],state:f[1],town:f[2],latitude:h,longitude:b,contact:g.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+z+"/groups-add-post/",t,O)}},function(t){m[t?"unshift":"push"]((()=>{d=t,n(1,d)}))},()=>N(d),function(t){m[t?"unshift":"push"]((()=>{g=t,n(2,g)}))},()=>N(g),function(t){m[t?"unshift":"push"]((()=>{u=t,n(0,u)}))},t=>C(t,i,z)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,C,i,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("cooperatives-add-component",H);export{H as default}; +import{S as t,i as e,a as n,b as o,s as i,e as r,n as a,d as s,c as l,o as c,f as m,h as p,j as u,k as d,w as g,x as f,l as h,m as b,r as w}from"./index-0d9f0c09.js";import{w as y}from"./index-1c123138.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let e,n,i,r,a,l,c,m,y,v,x,k,j,L,S,z,T,C,N,O,H,M,A,$,E,J,U,q,D,G,I,R,K,P,Q;return{c(){e=p("div"),n=p("div"),i=p("h1"),i.textContent="Add a Group",r=u(),a=p("img"),c=u(),m=p("p"),m.textContent="If there are no groups in your town with whom you can organize then do the following:",y=u(),v=p("ol"),v.innerHTML="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",x=u(),k=p("div"),j=p("label"),j.textContent="Location:",L=u(),S=p("div"),z=p("input"),T=u(),C=p("div"),N=u(),O=p("div"),H=p("label"),H.textContent="Contact:",M=u(),A=p("div"),$=p("input"),E=u(),J=p("div"),U=u(),q=p("button"),q.textContent="Submit",D=u(),G=p("p"),I=u(),R=p("map-component"),d(a,"id","groups-img"),g(a.src,l="/img/common/groups.svg")||d(a,"src","/img/common/groups.svg"),d(a,"alt","groups"),d(m,"class","description"),d(j,"for","address-input"),d(z,"id","address-input"),d(z,"type","text"),z.readOnly=!0,d(C,"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(J,"class","ghost-input"),d(A,"class","input-wrapper"),d(O,"class","input-label-wrapper"),d(q,"id","submit-button"),d(G,"id","confirmation-msg"),f(R,"id","map"),f(R,"callback",K=t[15]),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,c),h(n,m),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[10](z),h(S,T),h(S,C),h(n,N),h(n,O),h(O,H),h(O,M),h(O,A),h(A,$),t[12]($),h(A,E),h(A,J),h(n,U),h(n,q),h(n,D),h(n,G),t[14](G),h(n,I),h(n,R),P||(Q=[b(z,"input",t[11]),b($,"input",t[13]),b(q,"click",t[9])],P=!0)},p(t,e){16&e&&K!==(K=t[15])&&f(R,"callback",K)},d(n){n&&s(e),t[10](null),t[12](null),t[14](null),P=!1,w(Q)}}}function T(t){let e,n=3==t[3]&&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[3]?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)}}}function C(t){let e,n=t[3],l=T(t);return{c(){l.c(),e=r(),this.c=a},m(t,n){l.m(t,n),o(t,e,n)},p(t,[o]){8&o&&i(n,n=t[3])?(l.d(1),l=T(t),l.c(),l.m(e.parentNode,e)):l.p(t,o)},i:a,o:a,d(t){t&&s(e),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,e,n){let o,i,r=y(0);l(t,r,(t=>n(3,o=t)));let a,s,p=y({});l(t,p,(t=>n(4,i=t)));let u,d,g,f;v("/assets/groups.json",(t=>{a=JSON.parse(t),s={};for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):s[e]=[t]}r.update((t=>t+1))}));let h=0,b=0,w=function(t,e){let n=new L.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:[41,41]});return L.marker([t,e],{icon:n})}(0,0);w.setOpacity(0);let z=x(p,"groups-component",r);function T(t,e,n){let o,i=""+e.Group+"
    ";for(let r of["location","members","contact"]){let a=e[r]+": ";if("contact"==r)i+=a+""+t.contact+"";else if("location"==r){let r,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));r="en"==n?s.map((t=>t)).join(", "):s.map((t=>S(e,t))).join(", "),i+=a+r+"
    ",o=[t.latitude,t.longitude]}else i+=a+t[r]+"
    "}return{text:i,coordinates:o}}function C(t,e,o){let i=t([22,0],2);j(a,s,i,e,o,T,"green"),w.addTo(i),i.on("click",(function(t){let e=t.latlng.lat,o=t.latlng.lng;h=e,b=o,function(t,e,n){let o=L.latLng(e,n);t.setLatLng(o)}(w,e,o),w.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${o}&format=jsonv2`,(t=>{let e=(t=JSON.parse(t)).address,o=e.city||e.town||e.village||e.hamlet,i=e.state,r=e.country;null!=i?r+=", "+i:i="",null!=o?r+=", "+o:o="",n(1,d.value=r,d),N(d)})),function(t,e){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${e}&format=jsonv2&accept-language=en`,(t=>{let e=(t=JSON.parse(t)).address,n=e.city||e.town||e.village||e.hamlet,o=e.state,i=e.country;null!=o||(o=""),null!=n||(n=""),f=[i,o,n]}))}(e,o)}))}function O(t){!1!==t?(n(0,u.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",u),n(0,u.style.color="green",u)):(n(0,u.innerHTML="Something went wrong.",u),n(0,u.style.color="red",u))}x(p,"countries",r),c((()=>{}));return[u,d,g,o,i,r,p,z,C,function(){if(null!=f){let t={country:f[0],state:f[1],town:f[2],latitude:h,longitude:b,contact:g.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+z+"/groups-add-post/",t,O)}},function(t){m[t?"unshift":"push"]((()=>{d=t,n(1,d)}))},()=>N(d),function(t){m[t?"unshift":"push"]((()=>{g=t,n(2,g)}))},()=>N(g),function(t){m[t?"unshift":"push"]((()=>{u=t,n(0,u)}))},t=>C(t,i,z)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,C,i,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("cooperatives-add-component",H);export{H as default}; diff --git a/Server/public/js/components/cooperatives-component.js b/Server/public/js/components/cooperatives-component.js index 2f772c6..90d017b 100644 --- a/Server/public/js/components/cooperatives-component.js +++ b/Server/public/js/components/cooperatives-component.js @@ -1 +1 @@ -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,u as c,o as m,e as l,t as p,c as g,d,v as u,w as f,f as h,x as b,y as w}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.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}; +import{S as t,i as e,a as o,b as n,s as r,e as i,n as s,d as a,c,o as m,h as l,t as p,j as g,k as d,w as u,x as f,l as h,y as b,p as w}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.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,_,A=t[1].cooperatives+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];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}; diff --git a/Server/public/js/components/footer-component.js b/Server/public/js/components/footer-component.js index 6455ff5..1e8d400 100644 --- a/Server/public/js/components/footer-component.js +++ b/Server/public/js/components/footer-component.js @@ -1 +1 @@ -import{S as t,i as e,a as r,b as o,s as a,q as i,n,g as s,u as m,e as c,t as d,c as f,d as l,z as g,f as p,l as h,x as u}from"./index-6a7bc1e2.js";import{w as v}from"./index-4da4d0ce.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";function b(t){let e,r,a,i,n,m,v,w,b,y,k,x,L,z,j,U,_,T,C,H,M,R,B=t[1].contactUs+"",N=t[1].inviteLink+"",A=t[1].inviteLink+"";return{c(){e=c("footer"),r=c("div"),a=c("div"),i=c("div"),n=c("h2"),m=d(B),v=f(),w=c("p"),b=d("Discord: "),y=c("a"),k=d(N),x=f(),L=c("p"),z=d("WhatsApp: "),j=c("a"),U=d(A),_=f(),T=c("button"),T.innerHTML='',C=f(),H=c("p"),H.innerHTML='Licensed under a Creative Commons CC BY 4.0 license',l(y,"href","https://discord.gg/Qk8KUk787z"),l(y,"target","_blank"),l(y,"rel","noreferrer"),g(y,"margin-left","1.8rem"),l(j,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),l(j,"target","_blank"),l(j,"rel","noreferrer"),g(j,"margin-left","0.5rem"),l(i,"id","contact-us-container"),l(a,"id","footer-grid-content-container"),l(a,"class","logged"),l(T,"id","footer-up"),l(T,"aria-label","go up"),l(H,"id","footer-copyright"),l(r,"id","footer-content-container")},m(s,c){o(s,e,c),p(e,r),p(r,a),p(a,i),p(i,n),p(n,m),p(i,v),p(i,w),p(w,b),p(w,y),p(y,k),p(i,x),p(i,L),p(L,z),p(L,j),p(j,U),p(r,_),p(r,T),p(r,C),p(r,H),M||(R=h(T,"click",t[4]),M=!0)},p(t,e){2&e&&B!==(B=t[1].contactUs+"")&&u(m,B),2&e&&N!==(N=t[1].inviteLink+"")&&u(k,N),2&e&&A!==(A=t[1].inviteLink+"")&&u(U,A)},d(t){t&&s(e),M=!1,R()}}}function y(t){let e,r=2==t[0]&&b(t);return{c(){r&&r.c(),e=i()},m(t,a){r&&r.m(t,a),o(t,e,a)},p(t,o){2==t[0]?r?r.p(t,o):(r=b(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(t){r&&r.d(t),t&&s(e)}}}function k(t){let e,r=t[0],m=y(t);return{c(){m.c(),e=i(),this.c=n},m(t,r){m.m(t,r),o(t,e,r)},p(t,[o]){1&o&&a(r,r=t[0])?(m.d(1),m=y(t),m.c(),m.m(e.parentNode,e)):m.p(t,o)},i:n,o:n,d(t){t&&s(e),m.d(t)}}}function x(t,e,r){let o,a,i=v(0);m(t,i,(t=>r(0,o=t)));let n=v({});m(t,n,(t=>r(1,a=t))),w(n,"countries",i),w(n,"footer-component",i);return[o,a,i,n,()=>{location.href="#"}]}class L extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},x,k,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("footer-component",L);export{L as default}; +import{S as t,i as e,a as r,b as o,s as a,e as i,n,d as s,c as m,h as c,t as d,j as f,k as l,z as g,l as h,m as p,y as u}from"./index-0d9f0c09.js";import{w as v}from"./index-1c123138.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";function b(t){let e,r,a,i,n,m,v,w,b,y,k,x,L,j,z,U,_,T,C,H,M,R,B=t[1].contactUs+"",N=t[1].inviteLink+"",A=t[1].inviteLink+"";return{c(){e=c("footer"),r=c("div"),a=c("div"),i=c("div"),n=c("h2"),m=d(B),v=f(),w=c("p"),b=d("Discord: "),y=c("a"),k=d(N),x=f(),L=c("p"),j=d("WhatsApp: "),z=c("a"),U=d(A),_=f(),T=c("button"),T.innerHTML='',C=f(),H=c("p"),H.innerHTML='Licensed under a Creative Commons CC BY 4.0 license',l(y,"href","https://discord.gg/Qk8KUk787z"),l(y,"target","_blank"),l(y,"rel","noreferrer"),g(y,"margin-left","1.8rem"),l(z,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),l(z,"target","_blank"),l(z,"rel","noreferrer"),g(z,"margin-left","0.5rem"),l(i,"id","contact-us-container"),l(a,"id","footer-grid-content-container"),l(a,"class","logged"),l(T,"id","footer-up"),l(T,"aria-label","go up"),l(H,"id","footer-copyright"),l(r,"id","footer-content-container")},m(s,c){o(s,e,c),h(e,r),h(r,a),h(a,i),h(i,n),h(n,m),h(i,v),h(i,w),h(w,b),h(w,y),h(y,k),h(i,x),h(i,L),h(L,j),h(L,z),h(z,U),h(r,_),h(r,T),h(r,C),h(r,H),M||(R=p(T,"click",t[4]),M=!0)},p(t,e){2&e&&B!==(B=t[1].contactUs+"")&&u(m,B),2&e&&N!==(N=t[1].inviteLink+"")&&u(k,N),2&e&&A!==(A=t[1].inviteLink+"")&&u(U,A)},d(t){t&&s(e),M=!1,R()}}}function y(t){let e,r=2==t[0]&&b(t);return{c(){r&&r.c(),e=i()},m(t,a){r&&r.m(t,a),o(t,e,a)},p(t,o){2==t[0]?r?r.p(t,o):(r=b(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(t){r&&r.d(t),t&&s(e)}}}function k(t){let e,r=t[0],m=y(t);return{c(){m.c(),e=i(),this.c=n},m(t,r){m.m(t,r),o(t,e,r)},p(t,[o]){1&o&&a(r,r=t[0])?(m.d(1),m=y(t),m.c(),m.m(e.parentNode,e)):m.p(t,o)},i:n,o:n,d(t){t&&s(e),m.d(t)}}}function x(t,e,r){let o,a,i=v(0);m(t,i,(t=>r(0,o=t)));let n=v({});m(t,n,(t=>r(1,a=t))),w(n,"countries",i),w(n,"footer-component",i);return[o,a,i,n,()=>{location.href="#"}]}class L extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},x,k,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("footer-component",L);export{L as default}; diff --git a/Server/public/js/components/groups-add-component.js b/Server/public/js/components/groups-add-component.js index 21202d4..6942ff3 100644 --- a/Server/public/js/components/groups-add-component.js +++ b/Server/public/js/components/groups-add-component.js @@ -1 +1 @@ -import{S as t,i as n,a as e,b as i,k as o,s as r,q as l,n as a,g as s,u,m as c,o as p,j as m,e as d,c as f,d as b,f as g,l as h,r as w,w as v,t as y}from"./index-6a7bc1e2.js";import{w as k}from"./index-4da4d0ce.js";import{getData as x,loadLocaleContent as j,sendData as C}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as $,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import{validatePosNumber as T}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let n,e,o,l,a,u,c,p,m,v,y,k,x,j,L,C,$,S,T,z,A=t[7];function G(t,n){return t[14]?t[14]&&!t[8]?M:N:O}let E=G(t),U=E(t),I=H(t),R=!(t[14]&&t[8])&&J(t);return{c(){n=d("div"),e=d("button"),o=f(),l=d("div"),U.c(),a=f(),u=d("div"),c=d("label"),c.textContent="Location:",p=f(),m=d("div"),v=d("input"),y=f(),k=d("div"),x=f(),I.c(),j=f(),L=d("button"),L.textContent="Submit",C=f(),$=d("p"),S=f(),R&&R.c(),b(e,"class","close-button"),b(c,"for","address-input"),b(v,"id","address-input"),b(v,"type","text"),v.readOnly=!0,b(k,"class","ghost-input"),b(m,"class","input-wrapper"),b(u,"id","address-input-wrapper"),b(u,"class","input-label-wrapper"),b(L,"id","submit-button"),b($,"id","confirmation-msg"),b(l,"id","text-container"),b(n,"id","container")},m(r,s){i(r,n,s),g(n,e),g(n,o),g(n,l),U.m(l,null),g(l,a),g(l,u),g(u,c),g(u,p),g(u,m),g(m,v),t[33](v),g(m,y),g(m,k),g(l,x),I.m(l,null),g(l,j),g(l,L),g(l,C),g(l,$),t[39]($),g(l,S),R&&R.m(l,null),T||(z=[h(e,"click",t[13]),h(v,"input",t[34]),h(L,"click",t[17])],T=!0)},p(t,n){E===(E=G(t))&&U?U.p(t,n):(U.d(1),U=E(t),U&&(U.c(),U.m(l,a))),128&n[0]&&r(A,A=t[7])?(I.d(1),I=H(t),I.c(),I.m(l,j)):I.p(t,n),t[14]&&t[8]?R&&(R.d(1),R=null):R?R.p(t,n):(R=J(t),R.c(),R.m(l,null))},d(e){e&&s(n),U.d(),t[33](null),I.d(e),t[39](null),R&&R.d(),T=!1,w(z)}}}function N(t){let n,e,o,r;return{c(){n=d("div"),e=d("button"),e.textContent="Leave",b(n,"id","button-line")},m(l,a){i(l,n,a),g(n,e),t[30](e),t[32](n),o||(r=h(e,"click",t[31]),o=!0)},p:a,d(e){e&&s(n),t[30](null),t[32](null),o=!1,r()}}}function M(t){let n,e,o,r,l,a,u,c;return{c(){n=d("div"),e=d("button"),o=y("Move"),l=f(),a=d("button"),a.textContent="Leave",b(e,"style",r="display: "+(t[8]?"none":"initial")),b(n,"id","button-line")},m(r,s){i(r,n,s),g(n,e),g(e,o),t[25](e),g(n,l),g(n,a),t[27](a),t[29](n),u||(c=[h(e,"click",t[26]),h(a,"click",t[28])],u=!0)},p(t,n){256&n[0]&&r!==(r="display: "+(t[8]?"none":"initial"))&&b(e,"style",r)},d(e){e&&s(n),t[25](null),t[27](null),t[29](null),u=!1,w(c)}}}function O(t){let n,e,o,r,l,u;return{c(){n=d("div"),e=d("button"),e.textContent="Create",o=f(),r=d("button"),r.textContent="Join",b(n,"id","button-line")},m(a,s){i(a,n,s),g(n,e),t[20](e),g(n,o),g(n,r),t[22](r),t[24](n),l||(u=[h(e,"click",t[21]),h(r,"click",t[23])],l=!0)},p:a,d(e){e&&s(n),t[20](null),t[22](null),t[24](null),l=!1,w(u)}}}function A(t){let n,e,o,r,l,u,c;return{c(){n=d("div"),e=d("label"),e.textContent="Members:",o=f(),r=d("div"),l=d("input"),b(e,"for","members-input"),b(l,"id","members-input"),b(l,"type","number"),l.value=1,b(r,"class","input-wrapper"),b(n,"id","members-input-wrapper"),b(n,"class","input-label-wrapper")},m(a,s){i(a,n,s),g(n,e),g(n,o),g(n,r),g(r,l),t[35](l),u||(c=h(l,"input",t[36]),u=!0)},p:a,d(e){e&&s(n),t[35](null),u=!1,c()}}}function G(t){let n,e,o,r,l,u,c,p,m;return{c(){n=d("div"),e=d("label"),e.textContent="Contact:",o=f(),r=d("div"),l=d("input"),u=f(),c=d("div"),b(e,"for","contact-input"),b(l,"id","contact-input"),b(l,"type","text"),b(c,"class","ghost-input"),b(r,"class","input-wrapper"),b(n,"class","input-label-wrapper")},m(a,s){i(a,n,s),g(n,e),g(n,o),g(n,r),g(r,l),t[37](l),g(r,u),g(r,c),p||(m=h(l,"input",t[38]),p=!0)},p:a,d(e){e&&s(n),t[37](null),p=!1,m()}}}function H(t){let n,e,o=0==t[7]&&A(t),r=(0==t[7]||1==t[7])&&G(t);return{c(){o&&o.c(),n=f(),r&&r.c(),e=l()},m(t,l){o&&o.m(t,l),i(t,n,l),r&&r.m(t,l),i(t,e,l)},p(t,i){0==t[7]?o?o.p(t,i):(o=A(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),0==t[7]||1==t[7]?r?r.p(t,i):(r=G(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(t){o&&o.d(t),t&&s(n),r&&r.d(t),t&&s(e)}}}function J(t){let n,e;return{c(){n=d("map-component"),v(n,"id","map"),v(n,"callback",e=t[40])},m(t,e){i(t,n,e)},p(t,i){1024&i[0]&&e!==(e=t[40])&&v(n,"callback",e)},d(t){t&&s(n)}}}function E(t){let n,e=3==t[9]&&z(t);return{c(){e&&e.c(),n=l()},m(t,o){e&&e.m(t,o),i(t,n,o)},p(t,i){3==t[9]?e?e.p(t,i):(e=z(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(t){e&&e.d(t),t&&s(n)}}}function U(t){let n,e=t[9],o=E(t);return{c(){o.c(),n=l(),this.c=a},m(t,e){o.m(t,e),i(t,n,e)},p(t,i){512&i[0]&&r(e,e=t[9])?(o.d(1),o=E(t),o.c(),o.m(n.parentNode,n)):o.p(t,i)},i:a,o:a,d(t){t&&s(n),o.d(t)}}}function I(t,n,e){let i=L.latLng(n,e);t.setLatLng(i)}function R(t){t.nextElementSibling.innerHTML=t.value}function _(t,n,e){let i,o,{map:r=null}=n,l=k(0);u(t,l,(t=>e(9,i=t)));let a,s,d,f,b,g=k({});u(t,g,(t=>e(10,o=t)));let h,w,v,y;x("/assets/groups.json",(t=>{a=JSON.parse(t),s={};for(let t of a){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in s?s[n].push(t):s[n]=[t]}l.update((t=>t+1))}));let z=["","",""],N={},M=function(t,n){let e=new L.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:[41,41]});return L.marker([t,n],{icon:e})}(0,0);M.setOpacity(0);let O,A=[],G=c("profile-component"),H=G.closeGroupsAdd,J=G.maps,E=G.onLoadedGroups,U=G.userGroups,_=G.user,q=0!=U.length,D=q?2:0;q&&(O=null!=U[0].status,O&&(D=3));let K=j(g,"groups-component",l);function Q(t,n){x(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${n}&format=jsonv2`,(t=>{let n=(t=JSON.parse(t)).address,i=n.city||n.town||n.village||n.hamlet,o=n.state,r=n.country;null!=o?r+=", "+o:o="",null!=i?r+=", "+i:i="",e(3,w.value=r,w),R(w)}))}function Y(t,n){x(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${n}&format=jsonv2&accept-language=en`,(t=>{let n=(t=JSON.parse(t)).address;if(null!=n){let t=n.city||n.town||n.village||n.hamlet,e=n.state,i=n.country;null!=e||(e=""),null!=t||(t=""),z=[i,e,t]}}))}function B(t,n,e){let i,o=""+n.Group+"
    ";for(let r of["location","members","contact"]){let l=n[r]+": ";if("contact"==r)o+=l+""+t.contact+"";else if("location"==r){let r,a=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));r="en"==e?a.map((t=>t)).join(", "):a.map((t=>S(n,t))).join(", "),o+=l+r+"
    ",i=[t.latitude,t.longitude]}else o+=l+t[r]+"
    "}return{text:o,coordinates:i}}function F(t,n,i){e(19,r=t([22,0],2)),J.groupsAdd=r,$(a,s,r,n,i,B,"green",{enableCountryGrouping:!1,pinCallback:V}),M.addTo(r),r.on("click",(function(t){if(0==D){let n=t.latlng.lat,e=t.latlng.lng;N.latitude=n,N.longitude=e,N.id=null,I(M,n,e),M.setOpacity(1),Q(n,e),Y(n,e)}}))}function P(t){!1!==t?(0!=D||_.verified?e(2,h.innerHTML="Success!",h):e(2,h.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",h),e(2,h.style.color="green",h),0!=D&&1!=D||(U[0]={}),U[0].country=""==z[0]?null:z[0],U[0].state=""==z[1]?null:z[1],U[0].town=""==z[2]?null:z[2],U[0].members=N.members,E()):(e(2,h.innerHTML="Something went wrong.",h),e(2,h.style.color="red",h))}function V(t,n){if(1==D){let e=n.latlng.lat,i=n.latlng.lng;N.latitude=e,N.longitude=i,N.id=t.id,N.members=t.members,I(M,e,i),M.setOpacity(1),Q(e,i),Y(e,i)}}function W(t){for(let t of A)null!=t&&(t.style.background="rgba(197, 43, 40, 0.319)",t.style.color="black");e(6,A[t].style.background="rgb(197, 43, 40)",A),e(6,A[t].style.color="white",A),e(7,D=t)}function X(){if(3==i)W(D),2!=D&&3!=D||e(3,w.value=function(t){if(null!=t)return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==K?t:S(o,t))).join(", ");return"Create or join group"}(U[0]),w);else{setTimeout((()=>X()),100)}}j(g,"countries",l),p((()=>{X()}));return t.$$set=t=>{"map"in t&&e(19,r=t.map)},[f,b,h,w,v,y,A,D,O,i,o,l,g,H,q,K,F,function(){if(""!=z[0]||3==D){let t,n;0==D?(t=y.value,n=v.value):1==D?n=v.value:2==D||3==D?(t="",n=""):3==D&&(t="",n="",z=[null,null,null],N.latitude=null,N.longitude=null),d={country:z[0],state:z[1],town:z[2],latitude:N.latitude,longitude:N.longitude,contact:""==n?null:n,members:""==t?null:parseInt(t),group_id:N.id,mode:D},""==d.state&&(d.state=null),""==d.town&&(d.town=null),C("/"+K+"/groups-add-post/",d,P)}},W,r,function(t){m[t?"unshift":"push"]((()=>{A[0]=t,e(6,A)}))},()=>W(0),function(t){m[t?"unshift":"push"]((()=>{A[1]=t,e(6,A)}))},()=>W(1),function(t){m[t?"unshift":"push"]((()=>{b=t,e(1,b)}))},function(t){m[t?"unshift":"push"]((()=>{A[2]=t,e(6,A)}))},()=>W(2),function(t){m[t?"unshift":"push"]((()=>{A[3]=t,e(6,A)}))},()=>W(3),function(t){m[t?"unshift":"push"]((()=>{f=t,e(0,f)}))},function(t){m[t?"unshift":"push"]((()=>{A[3]=t,e(6,A)}))},()=>W(3),function(t){m[t?"unshift":"push"]((()=>{f=t,e(0,f)}))},function(t){m[t?"unshift":"push"]((()=>{w=t,e(3,w)}))},()=>R(w),function(t){m[t?"unshift":"push"]((()=>{y=t,e(5,y)}))},t=>T(t,y,1e4),function(t){m[t?"unshift":"push"]((()=>{v=t,e(4,v)}))},()=>R(v),function(t){m[t?"unshift":"push"]((()=>{h=t,e(2,h)}))},t=>F(t,o,K)]}class q extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},_,U,r,{map:19},null,[-1,-1]),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["map"]}get map(){return this.$$.ctx[19]}set map(t){this.$$set({map:t}),o()}}customElements.define("groups-add-component",q);export{q as default}; +import{S as t,i as n,a as e,b as i,u as o,s as r,e as l,n as a,d as s,c as u,g as c,o as p,f as m,h as d,j as f,k as b,l as g,m as h,r as w,x as v,t as y}from"./index-0d9f0c09.js";import{w as k}from"./index-1c123138.js";import{getData as x,loadLocaleContent as j,sendData as C}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as $,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import{validatePosNumber as T}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let n,e,o,l,a,u,c,p,m,v,y,k,x,j,L,C,$,S,T,z,A=t[7];function G(t,n){return t[14]?t[14]&&!t[8]?M:N:O}let E=G(t),U=E(t),I=H(t),R=!(t[14]&&t[8])&&J(t);return{c(){n=d("div"),e=d("button"),o=f(),l=d("div"),U.c(),a=f(),u=d("div"),c=d("label"),c.textContent="Location:",p=f(),m=d("div"),v=d("input"),y=f(),k=d("div"),x=f(),I.c(),j=f(),L=d("button"),L.textContent="Submit",C=f(),$=d("p"),S=f(),R&&R.c(),b(e,"class","close-button"),b(c,"for","address-input"),b(v,"id","address-input"),b(v,"type","text"),v.readOnly=!0,b(k,"class","ghost-input"),b(m,"class","input-wrapper"),b(u,"id","address-input-wrapper"),b(u,"class","input-label-wrapper"),b(L,"id","submit-button"),b($,"id","confirmation-msg"),b(l,"id","text-container"),b(n,"id","container")},m(r,s){i(r,n,s),g(n,e),g(n,o),g(n,l),U.m(l,null),g(l,a),g(l,u),g(u,c),g(u,p),g(u,m),g(m,v),t[33](v),g(m,y),g(m,k),g(l,x),I.m(l,null),g(l,j),g(l,L),g(l,C),g(l,$),t[39]($),g(l,S),R&&R.m(l,null),T||(z=[h(e,"click",t[13]),h(v,"input",t[34]),h(L,"click",t[17])],T=!0)},p(t,n){E===(E=G(t))&&U?U.p(t,n):(U.d(1),U=E(t),U&&(U.c(),U.m(l,a))),128&n[0]&&r(A,A=t[7])?(I.d(1),I=H(t),I.c(),I.m(l,j)):I.p(t,n),t[14]&&t[8]?R&&(R.d(1),R=null):R?R.p(t,n):(R=J(t),R.c(),R.m(l,null))},d(e){e&&s(n),U.d(),t[33](null),I.d(e),t[39](null),R&&R.d(),T=!1,w(z)}}}function N(t){let n,e,o,r;return{c(){n=d("div"),e=d("button"),e.textContent="Leave",b(n,"id","button-line")},m(l,a){i(l,n,a),g(n,e),t[30](e),t[32](n),o||(r=h(e,"click",t[31]),o=!0)},p:a,d(e){e&&s(n),t[30](null),t[32](null),o=!1,r()}}}function M(t){let n,e,o,r,l,a,u,c;return{c(){n=d("div"),e=d("button"),o=y("Move"),l=f(),a=d("button"),a.textContent="Leave",b(e,"style",r="display: "+(t[8]?"none":"initial")),b(n,"id","button-line")},m(r,s){i(r,n,s),g(n,e),g(e,o),t[25](e),g(n,l),g(n,a),t[27](a),t[29](n),u||(c=[h(e,"click",t[26]),h(a,"click",t[28])],u=!0)},p(t,n){256&n[0]&&r!==(r="display: "+(t[8]?"none":"initial"))&&b(e,"style",r)},d(e){e&&s(n),t[25](null),t[27](null),t[29](null),u=!1,w(c)}}}function O(t){let n,e,o,r,l,u;return{c(){n=d("div"),e=d("button"),e.textContent="Create",o=f(),r=d("button"),r.textContent="Join",b(n,"id","button-line")},m(a,s){i(a,n,s),g(n,e),t[20](e),g(n,o),g(n,r),t[22](r),t[24](n),l||(u=[h(e,"click",t[21]),h(r,"click",t[23])],l=!0)},p:a,d(e){e&&s(n),t[20](null),t[22](null),t[24](null),l=!1,w(u)}}}function A(t){let n,e,o,r,l,u,c;return{c(){n=d("div"),e=d("label"),e.textContent="Members:",o=f(),r=d("div"),l=d("input"),b(e,"for","members-input"),b(l,"id","members-input"),b(l,"type","number"),l.value=1,b(r,"class","input-wrapper"),b(n,"id","members-input-wrapper"),b(n,"class","input-label-wrapper")},m(a,s){i(a,n,s),g(n,e),g(n,o),g(n,r),g(r,l),t[35](l),u||(c=h(l,"input",t[36]),u=!0)},p:a,d(e){e&&s(n),t[35](null),u=!1,c()}}}function G(t){let n,e,o,r,l,u,c,p,m;return{c(){n=d("div"),e=d("label"),e.textContent="Contact:",o=f(),r=d("div"),l=d("input"),u=f(),c=d("div"),b(e,"for","contact-input"),b(l,"id","contact-input"),b(l,"type","text"),b(c,"class","ghost-input"),b(r,"class","input-wrapper"),b(n,"class","input-label-wrapper")},m(a,s){i(a,n,s),g(n,e),g(n,o),g(n,r),g(r,l),t[37](l),g(r,u),g(r,c),p||(m=h(l,"input",t[38]),p=!0)},p:a,d(e){e&&s(n),t[37](null),p=!1,m()}}}function H(t){let n,e,o=0==t[7]&&A(t),r=(0==t[7]||1==t[7])&&G(t);return{c(){o&&o.c(),n=f(),r&&r.c(),e=l()},m(t,l){o&&o.m(t,l),i(t,n,l),r&&r.m(t,l),i(t,e,l)},p(t,i){0==t[7]?o?o.p(t,i):(o=A(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),0==t[7]||1==t[7]?r?r.p(t,i):(r=G(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(t){o&&o.d(t),t&&s(n),r&&r.d(t),t&&s(e)}}}function J(t){let n,e;return{c(){n=d("map-component"),v(n,"id","map"),v(n,"callback",e=t[40])},m(t,e){i(t,n,e)},p(t,i){1024&i[0]&&e!==(e=t[40])&&v(n,"callback",e)},d(t){t&&s(n)}}}function E(t){let n,e=3==t[9]&&z(t);return{c(){e&&e.c(),n=l()},m(t,o){e&&e.m(t,o),i(t,n,o)},p(t,i){3==t[9]?e?e.p(t,i):(e=z(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(t){e&&e.d(t),t&&s(n)}}}function U(t){let n,e=t[9],o=E(t);return{c(){o.c(),n=l(),this.c=a},m(t,e){o.m(t,e),i(t,n,e)},p(t,i){512&i[0]&&r(e,e=t[9])?(o.d(1),o=E(t),o.c(),o.m(n.parentNode,n)):o.p(t,i)},i:a,o:a,d(t){t&&s(n),o.d(t)}}}function I(t,n,e){let i=L.latLng(n,e);t.setLatLng(i)}function R(t){t.nextElementSibling.innerHTML=t.value}function _(t,n,e){let i,o,{map:r=null}=n,l=k(0);u(t,l,(t=>e(9,i=t)));let a,s,d,f,b,g=k({});u(t,g,(t=>e(10,o=t)));let h,w,v,y;x("/assets/groups.json",(t=>{a=JSON.parse(t),s={};for(let t of a){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in s?s[n].push(t):s[n]=[t]}l.update((t=>t+1))}));let z=["","",""],N={},M=function(t,n){let e=new L.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:[41,41]});return L.marker([t,n],{icon:e})}(0,0);M.setOpacity(0);let O,A=[],G=c("profile-component"),H=G.closeGroupsAdd,J=G.maps,E=G.onLoadedGroups,U=G.userGroups,_=G.user,D=0!=U.length,K=D?2:0;D&&(O=null!=U[0].status,O&&(K=3));let Q=j(g,"groups-component",l);function Y(t,n){x(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${n}&format=jsonv2`,(t=>{let n=(t=JSON.parse(t)).address,i=n.city||n.town||n.village||n.hamlet,o=n.state,r=n.country;null!=o?r+=", "+o:o="",null!=i?r+=", "+i:i="",e(3,w.value=r,w),R(w)}))}function q(t,n){x(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${n}&format=jsonv2&accept-language=en`,(t=>{let n=(t=JSON.parse(t)).address;if(null!=n){let t=n.city||n.town||n.village||n.hamlet,e=n.state,i=n.country;null!=e||(e=""),null!=t||(t=""),z=[i,e,t]}}))}function B(t,n,e){let i,o=""+n.Group+"
    ";for(let r of["location","members","contact"]){let l=n[r]+": ";if("contact"==r)o+=l+""+t.contact+"";else if("location"==r){let r,a=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));r="en"==e?a.map((t=>t)).join(", "):a.map((t=>S(n,t))).join(", "),o+=l+r+"
    ",i=[t.latitude,t.longitude]}else o+=l+t[r]+"
    "}return{text:o,coordinates:i}}function F(t,n,i){e(19,r=t([22,0],2)),J.groupsAdd=r,$(a,s,r,n,i,B,"green",{enableCountryGrouping:!1,pinCallback:V}),M.addTo(r),r.on("click",(function(t){if(0==K){let n=t.latlng.lat,e=t.latlng.lng;N.latitude=n,N.longitude=e,N.id=null,I(M,n,e),M.setOpacity(1),Y(n,e),q(n,e)}}))}function P(t){!1!==t?(0!=K||_.verified?e(2,h.innerHTML="Success!",h):e(2,h.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",h),e(2,h.style.color="green",h),0!=K&&1!=K||(U[0]={}),U[0].country=""==z[0]?null:z[0],U[0].state=""==z[1]?null:z[1],U[0].town=""==z[2]?null:z[2],U[0].members=N.members,E()):(e(2,h.innerHTML="Something went wrong.",h),e(2,h.style.color="red",h))}function V(t,n){if(1==K){let e=n.latlng.lat,i=n.latlng.lng;N.latitude=e,N.longitude=i,N.id=t.id,N.members=t.members,I(M,e,i),M.setOpacity(1),Y(e,i),q(e,i)}}function W(t){for(let t of A)null!=t&&(t.style.background="rgba(197, 43, 40, 0.319)",t.style.color="black");e(6,A[t].style.background="rgb(197, 43, 40)",A),e(6,A[t].style.color="white",A),e(7,K=t)}function X(){if(3==i)W(K),2!=K&&3!=K||e(3,w.value=function(t){if(null!=t)return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==Q?t:S(o,t))).join(", ");return"Create or join group"}(U[0]),w);else{setTimeout((()=>X()),100)}}j(g,"countries",l),p((()=>{X()}));return t.$$set=t=>{"map"in t&&e(19,r=t.map)},[f,b,h,w,v,y,A,K,O,i,o,l,g,H,D,Q,F,function(){if(""!=z[0]||3==K){let t,n;0==K?(t=y.value,n=v.value):1==K?n=v.value:2==K||3==K?(t="",n=""):3==K&&(t="",n="",z=[null,null,null],N.latitude=null,N.longitude=null),d={country:z[0],state:z[1],town:z[2],latitude:N.latitude,longitude:N.longitude,contact:""==n?null:n,members:""==t?null:parseInt(t),group_id:N.id,mode:K},""==d.state&&(d.state=null),""==d.town&&(d.town=null),C("/"+Q+"/groups-add-post/",d,P)}},W,r,function(t){m[t?"unshift":"push"]((()=>{A[0]=t,e(6,A)}))},()=>W(0),function(t){m[t?"unshift":"push"]((()=>{A[1]=t,e(6,A)}))},()=>W(1),function(t){m[t?"unshift":"push"]((()=>{b=t,e(1,b)}))},function(t){m[t?"unshift":"push"]((()=>{A[2]=t,e(6,A)}))},()=>W(2),function(t){m[t?"unshift":"push"]((()=>{A[3]=t,e(6,A)}))},()=>W(3),function(t){m[t?"unshift":"push"]((()=>{f=t,e(0,f)}))},function(t){m[t?"unshift":"push"]((()=>{A[3]=t,e(6,A)}))},()=>W(3),function(t){m[t?"unshift":"push"]((()=>{f=t,e(0,f)}))},function(t){m[t?"unshift":"push"]((()=>{w=t,e(3,w)}))},()=>R(w),function(t){m[t?"unshift":"push"]((()=>{y=t,e(5,y)}))},t=>T(t,y,1e4),function(t){m[t?"unshift":"push"]((()=>{v=t,e(4,v)}))},()=>R(v),function(t){m[t?"unshift":"push"]((()=>{h=t,e(2,h)}))},t=>F(t,o,Q)]}class D extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},_,U,r,{map:19},null,[-1,-1]),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["map"]}get map(){return this.$$.ctx[19]}set map(t){this.$$set({map:t}),o()}}customElements.define("groups-add-component",D);export{D as default}; diff --git a/Server/public/js/components/groups-component.js b/Server/public/js/components/groups-component.js index fcea5b6..565da9f 100644 --- a/Server/public/js/components/groups-component.js +++ b/Server/public/js/components/groups-component.js @@ -1 +1 @@ -import{S as t,i as o,a as n,b as e,s as r,q as s,n as a,g as i,u as m,o as c,e as l,t as p,c as u,d as g,v as d,w as f,f as h,x as b,y as j}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.js";import{loadLocaleContent as y,getData as v}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,o,n){const e=t.slice();return e[12]=o[n][0],e[3]=o[n][1],e}function O(t,o,n){const e=t.slice();return e[15]=o[n],e}function T(t){let o,n,r,s,a,m,c,x,y,v,w,k,z,O,T,C,E,R,S,q,A=t[1].groups+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let o=0;on(2,r=t)));let a,i,l=x({});m(t,l,(t=>n(1,e=t)));let p=y(l,"groups-component",s);y(l,"countries",s);function u(t,o,n){let e=t([22,0],2);w(a,i,e,o,n,z,"green",{enableCountryGrouping:!0})}v("/assets/groups.json",(t=>{n(3,a=JSON.parse(t)),n(0,i={});for(let t of a){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in i?i[o].push(t):n(0,i[o]=[t],i)}s.update((t=>t+1))})),c((()=>{}));return[i,e,r,a,s,l,p,u,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>u(t,e,p)]}class q extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",q);export{q as default}; +import{S as t,i as n,a as o,b as e,s as r,e as c,n as a,d as i,c as s,o as m,h as l,t as p,j as u,k as g,w as d,x as f,l as h,y as b,p as j}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k,translate as v}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,n,o){const e=t.slice();return e[12]=n[o][0],e[3]=n[o][1],e}function O(t,n,o){const e=t.slice();return e[15]=n[o],e}function T(t){let n,o,r,c,a,s,m,x,y,w,k,v,z,O,T,C,D,E,R,_,A=t[1].groups+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let n=0;no(2,r=t)));let a,i,l=x({});s(t,l,(t=>o(1,e=t)));let p=y(l,"groups-component",c);y(l,"countries",c);function u(t,n,o){let e=t([22,0],2);k(a,i,e,n,o,z,"green",{enableCountryGrouping:!0})}w("/assets/groups.json",(t=>{o(3,a=JSON.parse(t)),o(0,i={});for(let t of a){let n=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),n in i?i[n].push(t):o(0,i[n]=[t],i)}c.update((t=>t+1))})),m((()=>{}));return[i,e,r,a,c,l,p,u,function(t){return"en"==p?t:v(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:v(e,t))).join(", ")},t=>u(t,e,p)]}class G extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},F,A,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",G);export{G as default}; diff --git a/Server/public/js/components/index-0d9f0c09.js b/Server/public/js/components/index-0d9f0c09.js new file mode 100644 index 0000000..d5d0995 --- /dev/null +++ b/Server/public/js/components/index-0d9f0c09.js @@ -0,0 +1 @@ +function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let i,c;function u(t,n){return i||(i=document.createElement("a")),i.href=n,t===i.href}function a(n,e,o){n.$$.on_destroy.push(function(n,...e){if(null==n)return t;const o=n.subscribe(...e);return o.unsubscribe?()=>o.unsubscribe():o}(e,o))}function f(t,n){t.appendChild(n)}function l(t,n,e){t.insertBefore(n,e||null)}function h(t){t.parentNode.removeChild(t)}function d(t,n){for(let e=0;et.removeEventListener(n,e,o)}function y(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function _(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:y(t,n,e)}function x(t){return""===t?null:+t}function v(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function E(t,n){t.value=null==n?"":n}function w(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}class k{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,e=null){var o;this.e||(this.is_svg?this.e=(o=n.nodeName,document.createElementNS("http://www.w3.org/2000/svg",o)):this.e=$(n.nodeName),this.t=n,this.c(t)),this.i(e)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{const o=e.length?e[0]:n;return m.ctx&&f(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),g&&J(r,t)),n})):[],m.update(),g=!0,o(m.before_update),m.fragment=!!a&&a(m.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);m.fragment&&m.fragment.l(t),t.forEach(h)}else m.fragment&&m.fragment.c();i.intro&&((b=r.$$.fragment)&&b.i&&(I.delete(b),b.i(y))),function(t,e,r,i){const{fragment:c,after_update:u}=t.$$;c&&c.m(e,r),i||z((()=>{const e=t.$$.on_mount.map(n).filter(s);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(z)}(r,i.target,i.anchor,i.customElement),D()}var b,y;N(p)}let Q;"function"==typeof HTMLElement&&(Q=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(n,e){if(!s(e))return t;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});export{x as A,E as B,k as H,Q as S,C as a,l as b,a as c,h as d,g as e,H as f,T as g,$ as h,K as i,m as j,y as k,f as l,b as m,t as n,L as o,d as p,S as q,o as r,r as s,p as t,D as u,s as v,u as w,_ as x,v as y,w as z}; diff --git a/Server/public/js/components/index-1c123138.js b/Server/public/js/components/index-1c123138.js new file mode 100644 index 0000000..7bb8b0f --- /dev/null +++ b/Server/public/js/components/index-1c123138.js @@ -0,0 +1 @@ +import{n,s as t}from"./index-0d9f0c09.js";const e=[];function s(s,o=n){let c;const f=new Set;function i(n){if(t(s,n)&&(s=n,c)){const n=!e.length;for(const n of f)n[1](),e.push(n,s);if(n){for(let n=0;n{f.delete(r),0===f.size&&(c(),c=null)}}}}export{s as w}; diff --git a/Server/public/js/components/join-us-component.js b/Server/public/js/components/join-us-component.js index 4b45653..941162b 100644 --- a/Server/public/js/components/join-us-component.js +++ b/Server/public/js/components/join-us-component.js @@ -1 +1 @@ -import{S as o,i as t,a as i,b as e,s as r,q as n,n as s,g as a,u as m,o as l,e as c,t as p,c as u,v as g,d,w as h,f,x as b}from"./index-6a7bc1e2.js";import{w as v}from"./index-4da4d0ce.js";import{loadLocaleContent as k,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addCommunePinContent as x,addCoopPinContent as P,addPartyPinContent as T}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function A(o){let t,i,r,n,s,m,l,v,k,j,w,y,x,P,T,A,N,S,z,C,D,O,U,H,L,F,G,K,M,B,E,J,Q,R,W,Y,_,q,I,V,X,Z,$,oo,to,io,eo,ro,no,so,ao,mo,lo,co,po,uo,go,ho,fo,bo,vo,ko,jo,wo,yo,xo,Po,To,Ao,No,So,zo,Co,Do,Oo,Uo,Ho,Lo,Fo,Go,Ko,Mo,Bo,Eo=o[1].heading+"",Jo=o[1].condition1+"",Qo=o[1].condition2+"",Ro=o[1].condition3+"",Wo=o[1].conditionsOutcome+"",Yo=o[1].subheading1+"",_o=o[1].valueProposition1+"",qo=o[1].valueProposition2+"",Io=o[1].valueProposition3+"",Vo=o[1].valueProposition4+"",Xo=o[1].valueProposition5+"",Zo=o[1].subheading2+"",$o=o[1].findOur+"",ot=o[1].group+"",tt=o[1].commune+"",it=o[1].cooperative+"",et=o[1].or+"",rt=o[1].party+"",nt=o[1].nearYou+"",st=o[1].noneNear+"",at=o[1].WhatsAppGroup+"",mt=o[1].or+"",lt=o[1].DiscordServer+"",ct=o[1].helpStart+"";return{c(){t=c("div"),i=c("div"),r=c("h1"),n=p(Eo),s=u(),m=c("img"),v=u(),k=c("ol"),j=c("li"),w=p(Jo),y=u(),x=c("li"),P=p(Qo),T=u(),A=c("li"),N=p(Ro),S=u(),z=c("p"),C=u(),D=c("h2"),O=p(Yo),U=u(),H=c("ol"),L=c("li"),F=p(_o),G=u(),K=c("li"),M=p(qo),B=u(),E=c("li"),J=p(Io),Q=u(),R=c("li"),W=p(Vo),Y=u(),_=c("p"),q=p(Xo),I=u(),V=c("h2"),X=p(Zo),Z=u(),$=c("div"),oo=c("p"),to=p($o),io=u(),eo=c("ol"),ro=c("li"),no=c("a"),so=p(ot),ao=p(","),mo=u(),lo=c("li"),co=c("a"),po=p(tt),uo=u(),go=c("li"),ho=c("a"),fo=p(it),bo=u(),vo=p(et),ko=u(),jo=c("li"),wo=c("a"),yo=p(rt),xo=u(),Po=c("p"),To=p(nt),Ao=u(),No=c("p"),So=p(st),zo=u(),Co=c("a"),Do=p(at),Oo=u(),Uo=p(mt),Ho=u(),Lo=c("a"),Fo=p(lt),Go=p(ct),Ko=u(),Mo=c("map-component"),g(m.src,l="/img/common/join-group.svg")||d(m,"src","/img/common/join-group.svg"),d(m,"id","join-group"),d(m,"alt","join group"),d(k,"id","condition-list"),d(H,"id","value-proposition-list"),d(no,"href","/"+o[4]+"/groups"),d(co,"href","/"+o[4]+"/communes"),d(ho,"href","/"+o[4]+"/cooperatives"),d(wo,"href","/"+o[4]+"/parties"),d(eo,"id","entities-list"),d($,"id","call-to-action-list"),d(Co,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),d(Co,"target","_blank"),d(Co,"rel","noreferrer"),d(Lo,"href","https://discord.gg/Qk8KUk787z"),d(Lo,"target","_blank"),d(Lo,"rel","noreferrer"),h(Mo,"id","map"),h(Mo,"callback",Bo=o[6]),h(Mo,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),d(i,"id","text-container"),d(t,"id","container")},m(o,a){e(o,t,a),f(t,i),f(i,r),f(r,n),f(i,s),f(i,m),f(i,v),f(i,k),f(k,j),f(j,w),f(k,y),f(k,x),f(x,P),f(k,T),f(k,A),f(A,N),f(k,S),f(k,z),z.innerHTML=Wo,f(i,C),f(i,D),f(D,O),f(i,U),f(i,H),f(H,L),f(L,F),f(H,G),f(H,K),f(K,M),f(H,B),f(H,E),f(E,J),f(H,Q),f(H,R),f(R,W),f(H,Y),f(H,_),f(_,q),f(i,I),f(i,V),f(V,X),f(i,Z),f(i,$),f($,oo),f(oo,to),f($,io),f($,eo),f(eo,ro),f(ro,no),f(no,so),f(ro,ao),f(eo,mo),f(eo,lo),f(lo,co),f(co,po),f(eo,uo),f(eo,go),f(go,ho),f(ho,fo),f(go,bo),f(go,vo),f(eo,ko),f(eo,jo),f(jo,wo),f(wo,yo),f($,xo),f($,Po),f(Po,To),f(i,Ao),f(i,No),f(No,So),f(No,zo),f(No,Co),f(Co,Do),f(No,Oo),f(No,Uo),f(No,Ho),f(No,Lo),f(Lo,Fo),f(No,Go),f(i,Ko),f(i,Mo)},p(o,t){2&t&&Eo!==(Eo=o[1].heading+"")&&b(n,Eo),2&t&&Jo!==(Jo=o[1].condition1+"")&&b(w,Jo),2&t&&Qo!==(Qo=o[1].condition2+"")&&b(P,Qo),2&t&&Ro!==(Ro=o[1].condition3+"")&&b(N,Ro),2&t&&Wo!==(Wo=o[1].conditionsOutcome+"")&&(z.innerHTML=Wo),2&t&&Yo!==(Yo=o[1].subheading1+"")&&b(O,Yo),2&t&&_o!==(_o=o[1].valueProposition1+"")&&b(F,_o),2&t&&qo!==(qo=o[1].valueProposition2+"")&&b(M,qo),2&t&&Io!==(Io=o[1].valueProposition3+"")&&b(J,Io),2&t&&Vo!==(Vo=o[1].valueProposition4+"")&&b(W,Vo),2&t&&Xo!==(Xo=o[1].valueProposition5+"")&&b(q,Xo),2&t&&Zo!==(Zo=o[1].subheading2+"")&&b(X,Zo),2&t&&$o!==($o=o[1].findOur+"")&&b(to,$o),2&t&&ot!==(ot=o[1].group+"")&&b(so,ot),2&t&&tt!==(tt=o[1].commune+"")&&b(po,tt),2&t&&it!==(it=o[1].cooperative+"")&&b(fo,it),2&t&&et!==(et=o[1].or+"")&&b(vo,et),2&t&&rt!==(rt=o[1].party+"")&&b(yo,rt),2&t&&nt!==(nt=o[1].nearYou+"")&&b(To,nt),2&t&&st!==(st=o[1].noneNear+"")&&b(So,st),2&t&&at!==(at=o[1].WhatsAppGroup+"")&&b(Do,at),2&t&&mt!==(mt=o[1].or+"")&&b(Uo,mt),2&t&<!==(lt=o[1].DiscordServer+"")&&b(Fo,lt),2&t&&ct!==(ct=o[1].helpStart+"")&&b(Go,ct),2&t&&Bo!==(Bo=o[6])&&h(Mo,"callback",Bo)},d(o){o&&a(t)}}}function N(o){let t,i=10==o[0]&&A(o);return{c(){i&&i.c(),t=n()},m(o,r){i&&i.m(o,r),e(o,t,r)},p(o,e){10==o[0]?i?i.p(o,e):(i=A(o),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(o){i&&i.d(o),o&&a(t)}}}function S(o){let t,i=o[0],m=N(o);return{c(){m.c(),t=n(),this.c=s},m(o,i){m.m(o,i),e(o,t,i)},p(o,[e]){1&e&&r(i,i=o[0])?(m.d(1),m=N(o),m.c(),m.m(t.parentNode,t)):m.p(o,e)},i:s,o:s,d(o){o&&a(t),m.d(o)}}}function z(o,t,i){let e,r,n=v(0);m(o,n,(o=>i(0,e=o)));let s=v({});m(o,s,(o=>i(1,r=o)));let a={},c={};k(s,"groups-component",n),k(s,"communes-component",n),k(s,"cooperatives-component",n),k(s,"parties-component",n),k(s,"countries",n);let p=k(s,"join-us-component",n),u=(o,t)=>{a[t]=JSON.parse(o),c[t]={};for(let o of a[t]){let i=o.country;null==o.contact&&(o.contact="https://discord.gg/Qk8KUk787z"),i in c[t]?c[t][i].push(o):c[t][i]=[o]}n.update((o=>o+1))};function g(o,t,i){let e=o([22,0],2),r={enableCountryGrouping:!0},n=w(a.groups,c.groups,e,t,i,y,"green",r),s=w(a.communes,c.communes,e,t,i,x,"red",r),m=w(a.cooperatives,c.cooperatives,e,t,i,P,"blue",r),l=w(a.parties,c.parties,e,t,i,T,"gold",r),p={};p[t.groups]=n,p[t.communes]=s,p[t.cooperatives]=m,p[t.parties]=l,L.control.layers(null,p).addTo(e)}j("/assets/groups.json",(o=>u(o,"groups"))),j("/assets/communes.json",(o=>u(o,"communes"))),j("/assets/cooperatives.json",(o=>u(o,"cooperatives"))),j("/assets/parties.json",(o=>u(o,"parties"))),l((()=>{}));return[e,r,n,s,p,g,o=>g(o,r,p)]}class C extends o{constructor(o){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},z,S,r,{},null),o&&o.target&&e(o.target,this,o.anchor)}}customElements.define("join-us-component",C);export{C as default}; +import{S as o,i as t,a as i,b as e,s as r,e as n,n as s,d as a,c as m,o as l,h as c,t as p,j as u,w as g,k as d,x as h,l as f,y as b}from"./index-0d9f0c09.js";import{w as v}from"./index-1c123138.js";import{loadLocaleContent as k,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addCommunePinContent as x,addCoopPinContent as P,addPartyPinContent as T}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function A(o){let t,i,r,n,s,m,l,v,k,j,w,y,x,P,T,A,N,S,z,C,D,O,U,H,L,F,G,K,M,B,E,J,Q,R,W,Y,_,q,I,V,X,Z,$,oo,to,io,eo,ro,no,so,ao,mo,lo,co,po,uo,go,ho,fo,bo,vo,ko,jo,wo,yo,xo,Po,To,Ao,No,So,zo,Co,Do,Oo,Uo,Ho,Lo,Fo,Go,Ko,Mo,Bo,Eo=o[1].heading+"",Jo=o[1].condition1+"",Qo=o[1].condition2+"",Ro=o[1].condition3+"",Wo=o[1].conditionsOutcome+"",Yo=o[1].subheading1+"",_o=o[1].valueProposition1+"",qo=o[1].valueProposition2+"",Io=o[1].valueProposition3+"",Vo=o[1].valueProposition4+"",Xo=o[1].valueProposition5+"",Zo=o[1].subheading2+"",$o=o[1].findOur+"",ot=o[1].group+"",tt=o[1].commune+"",it=o[1].cooperative+"",et=o[1].or+"",rt=o[1].party+"",nt=o[1].nearYou+"",st=o[1].noneNear+"",at=o[1].WhatsAppGroup+"",mt=o[1].or+"",lt=o[1].DiscordServer+"",ct=o[1].helpStart+"";return{c(){t=c("div"),i=c("div"),r=c("h1"),n=p(Eo),s=u(),m=c("img"),v=u(),k=c("ol"),j=c("li"),w=p(Jo),y=u(),x=c("li"),P=p(Qo),T=u(),A=c("li"),N=p(Ro),S=u(),z=c("p"),C=u(),D=c("h2"),O=p(Yo),U=u(),H=c("ol"),L=c("li"),F=p(_o),G=u(),K=c("li"),M=p(qo),B=u(),E=c("li"),J=p(Io),Q=u(),R=c("li"),W=p(Vo),Y=u(),_=c("p"),q=p(Xo),I=u(),V=c("h2"),X=p(Zo),Z=u(),$=c("div"),oo=c("p"),to=p($o),io=u(),eo=c("ol"),ro=c("li"),no=c("a"),so=p(ot),ao=p(","),mo=u(),lo=c("li"),co=c("a"),po=p(tt),uo=u(),go=c("li"),ho=c("a"),fo=p(it),bo=u(),vo=p(et),ko=u(),jo=c("li"),wo=c("a"),yo=p(rt),xo=u(),Po=c("p"),To=p(nt),Ao=u(),No=c("p"),So=p(st),zo=u(),Co=c("a"),Do=p(at),Oo=u(),Uo=p(mt),Ho=u(),Lo=c("a"),Fo=p(lt),Go=p(ct),Ko=u(),Mo=c("map-component"),g(m.src,l="/img/common/join-group.svg")||d(m,"src","/img/common/join-group.svg"),d(m,"id","join-group"),d(m,"alt","join group"),d(k,"id","condition-list"),d(H,"id","value-proposition-list"),d(no,"href","/"+o[4]+"/groups"),d(co,"href","/"+o[4]+"/communes"),d(ho,"href","/"+o[4]+"/cooperatives"),d(wo,"href","/"+o[4]+"/parties"),d(eo,"id","entities-list"),d($,"id","call-to-action-list"),d(Co,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),d(Co,"target","_blank"),d(Co,"rel","noreferrer"),d(Lo,"href","https://discord.gg/Qk8KUk787z"),d(Lo,"target","_blank"),d(Lo,"rel","noreferrer"),h(Mo,"id","map"),h(Mo,"callback",Bo=o[6]),h(Mo,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),d(i,"id","text-container"),d(t,"id","container")},m(o,a){e(o,t,a),f(t,i),f(i,r),f(r,n),f(i,s),f(i,m),f(i,v),f(i,k),f(k,j),f(j,w),f(k,y),f(k,x),f(x,P),f(k,T),f(k,A),f(A,N),f(k,S),f(k,z),z.innerHTML=Wo,f(i,C),f(i,D),f(D,O),f(i,U),f(i,H),f(H,L),f(L,F),f(H,G),f(H,K),f(K,M),f(H,B),f(H,E),f(E,J),f(H,Q),f(H,R),f(R,W),f(H,Y),f(H,_),f(_,q),f(i,I),f(i,V),f(V,X),f(i,Z),f(i,$),f($,oo),f(oo,to),f($,io),f($,eo),f(eo,ro),f(ro,no),f(no,so),f(ro,ao),f(eo,mo),f(eo,lo),f(lo,co),f(co,po),f(eo,uo),f(eo,go),f(go,ho),f(ho,fo),f(go,bo),f(go,vo),f(eo,ko),f(eo,jo),f(jo,wo),f(wo,yo),f($,xo),f($,Po),f(Po,To),f(i,Ao),f(i,No),f(No,So),f(No,zo),f(No,Co),f(Co,Do),f(No,Oo),f(No,Uo),f(No,Ho),f(No,Lo),f(Lo,Fo),f(No,Go),f(i,Ko),f(i,Mo)},p(o,t){2&t&&Eo!==(Eo=o[1].heading+"")&&b(n,Eo),2&t&&Jo!==(Jo=o[1].condition1+"")&&b(w,Jo),2&t&&Qo!==(Qo=o[1].condition2+"")&&b(P,Qo),2&t&&Ro!==(Ro=o[1].condition3+"")&&b(N,Ro),2&t&&Wo!==(Wo=o[1].conditionsOutcome+"")&&(z.innerHTML=Wo),2&t&&Yo!==(Yo=o[1].subheading1+"")&&b(O,Yo),2&t&&_o!==(_o=o[1].valueProposition1+"")&&b(F,_o),2&t&&qo!==(qo=o[1].valueProposition2+"")&&b(M,qo),2&t&&Io!==(Io=o[1].valueProposition3+"")&&b(J,Io),2&t&&Vo!==(Vo=o[1].valueProposition4+"")&&b(W,Vo),2&t&&Xo!==(Xo=o[1].valueProposition5+"")&&b(q,Xo),2&t&&Zo!==(Zo=o[1].subheading2+"")&&b(X,Zo),2&t&&$o!==($o=o[1].findOur+"")&&b(to,$o),2&t&&ot!==(ot=o[1].group+"")&&b(so,ot),2&t&&tt!==(tt=o[1].commune+"")&&b(po,tt),2&t&&it!==(it=o[1].cooperative+"")&&b(fo,it),2&t&&et!==(et=o[1].or+"")&&b(vo,et),2&t&&rt!==(rt=o[1].party+"")&&b(yo,rt),2&t&&nt!==(nt=o[1].nearYou+"")&&b(To,nt),2&t&&st!==(st=o[1].noneNear+"")&&b(So,st),2&t&&at!==(at=o[1].WhatsAppGroup+"")&&b(Do,at),2&t&&mt!==(mt=o[1].or+"")&&b(Uo,mt),2&t&<!==(lt=o[1].DiscordServer+"")&&b(Fo,lt),2&t&&ct!==(ct=o[1].helpStart+"")&&b(Go,ct),2&t&&Bo!==(Bo=o[6])&&h(Mo,"callback",Bo)},d(o){o&&a(t)}}}function N(o){let t,i=10==o[0]&&A(o);return{c(){i&&i.c(),t=n()},m(o,r){i&&i.m(o,r),e(o,t,r)},p(o,e){10==o[0]?i?i.p(o,e):(i=A(o),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(o){i&&i.d(o),o&&a(t)}}}function S(o){let t,i=o[0],m=N(o);return{c(){m.c(),t=n(),this.c=s},m(o,i){m.m(o,i),e(o,t,i)},p(o,[e]){1&e&&r(i,i=o[0])?(m.d(1),m=N(o),m.c(),m.m(t.parentNode,t)):m.p(o,e)},i:s,o:s,d(o){o&&a(t),m.d(o)}}}function z(o,t,i){let e,r,n=v(0);m(o,n,(o=>i(0,e=o)));let s=v({});m(o,s,(o=>i(1,r=o)));let a={},c={};k(s,"groups-component",n),k(s,"communes-component",n),k(s,"cooperatives-component",n),k(s,"parties-component",n),k(s,"countries",n);let p=k(s,"join-us-component",n),u=(o,t)=>{a[t]=JSON.parse(o),c[t]={};for(let o of a[t]){let i=o.country;null==o.contact&&(o.contact="https://discord.gg/Qk8KUk787z"),i in c[t]?c[t][i].push(o):c[t][i]=[o]}n.update((o=>o+1))};function g(o,t,i){let e=o([22,0],2),r={enableCountryGrouping:!0},n=w(a.groups,c.groups,e,t,i,y,"green",r),s=w(a.communes,c.communes,e,t,i,x,"red",r),m=w(a.cooperatives,c.cooperatives,e,t,i,P,"blue",r),l=w(a.parties,c.parties,e,t,i,T,"gold",r),p={};p[t.groups]=n,p[t.communes]=s,p[t.cooperatives]=m,p[t.parties]=l,L.control.layers(null,p).addTo(e)}j("/assets/groups.json",(o=>u(o,"groups"))),j("/assets/communes.json",(o=>u(o,"communes"))),j("/assets/cooperatives.json",(o=>u(o,"cooperatives"))),j("/assets/parties.json",(o=>u(o,"parties"))),l((()=>{}));return[e,r,n,s,p,g,o=>g(o,r,p)]}class C extends o{constructor(o){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},z,S,r,{},null),o&&o.target&&e(o.target,this,o.anchor)}}customElements.define("join-us-component",C);export{C as default}; diff --git a/Server/public/js/components/landing-component.js b/Server/public/js/components/landing-component.js index e3a2315..191562d 100644 --- a/Server/public/js/components/landing-component.js +++ b/Server/public/js/components/landing-component.js @@ -1 +1 @@ -import{S as t,i as e,a as o,b as i,s as r,q as s,n,g as a,u as m,o as c,j as p,e as g,c as d,t as l,d as u,v as h,z as f,w as v,f as x,x as w}from"./index-6a7bc1e2.js";import{w as b}from"./index-4da4d0ce.js";import{getData as T,loadLocaleContent as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addCommunePinContent as U,addCoopPinContent as z,addPartyPinContent as N}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function C(t){let e,o,r,s,n,m,c,p,b,T,j,k,y,U,z,N,C,F,L,A,E,H,K,M,Q,R,S,W,q,B,D,G,J,O,_,I,P,V,X,Y,Z,$,tt,et,ot,it,rt,st,nt,at,mt,ct,pt,gt,dt,lt,ut,ht,ft,vt,xt,wt,bt,Tt,jt,kt,yt,Ut=t[3].top+"",zt=t[3].groupsTitle+"",Nt=t[3].groupsText+"",Ct=t[3].partiesTitle+"",Ft=t[3].partiesText+"",Lt=t[3].cooperativesTitle+"",At=t[3].cooperativesText+"",Et=t[3].communesTitle+"",Ht=t[3].communesText+"",Kt=t[3].findUs+"",Mt=t[3].whatNow+"",Qt=t[3].joinUs+"",Rt=t[3].talkWithUs+"";return{c(){e=g("div"),o=g("picture"),o.innerHTML=' \n \n crowd',r=d(),s=g("div"),n=g("p"),m=l(Ut),c=d(),p=g("div"),b=g("div"),T=g("a"),j=g("h2"),k=l(zt),y=d(),U=g("img"),N=d(),C=g("p"),F=l(Nt),L=d(),A=g("div"),E=g("a"),H=g("h2"),K=l(Ct),M=d(),Q=g("img"),S=d(),W=g("p"),q=l(Ft),B=d(),D=g("div"),G=g("a"),J=g("h2"),O=l(Lt),_=d(),I=g("img"),V=d(),X=g("p"),Y=l(At),Z=d(),$=g("div"),tt=g("a"),et=g("h2"),ot=l(Et),it=d(),rt=g("img"),nt=d(),at=g("p"),mt=l(Ht),ct=d(),pt=g("h1"),gt=l(Kt),dt=d(),lt=g("map-component"),ht=d(),ft=g("h1"),vt=l(Mt),xt=d(),wt=g("div"),bt=g("a"),Tt=l(Qt),jt=d(),kt=g("a"),yt=l(Rt),u(T,"href","/"+t[6]+"/groups"),u(U,"id","groups-img"),h(U.src,z="/img/common/groups.svg")||u(U,"src","/img/common/groups.svg"),u(U,"alt","groups"),u(E,"href","/"+t[6]+"/parties"),u(Q,"id","parties-img"),h(Q.src,R="/img/common/parties.svg")||u(Q,"src","/img/common/parties.svg"),u(Q,"alt","coops"),u(G,"href","/"+t[6]+"/coops"),u(I,"id","coops-img"),h(I.src,P="/img/common/coops.svg")||u(I,"src","/img/common/coops.svg"),u(I,"alt","coops"),u(tt,"href","/"+t[6]+"/communes"),u(rt,"id","communes-img"),h(rt.src,st="/img/common/communes.svg")||u(rt,"src","/img/common/communes.svg"),u(rt,"alt","communes"),u(p,"id","container-grid"),f(p,"--grid-width",t[1]),u(pt,"id","find-us"),v(lt,"id","map"),v(lt,"callback",ut=t[9]),v(lt,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),u(bt,"class","link-button"),u(bt,"href","/"+t[6]+"/join-us"),u(kt,"class","link-button"),u(kt,"href","https://discord.gg/Qk8KUk787z"),u(kt,"target","_blank"),u(kt,"rel","noreferrer"),u(wt,"id","action-container"),u(s,"id","text-container"),u(e,"id","container")},m(a,g){i(a,e,g),x(e,o),x(e,r),x(e,s),x(s,n),x(n,m),x(s,c),x(s,p),x(p,b),x(b,T),x(T,j),x(j,k),x(b,y),x(b,U),x(b,N),x(b,C),x(C,F),x(p,L),x(p,A),x(A,E),x(E,H),x(H,K),x(A,M),x(A,Q),x(A,S),x(A,W),x(W,q),x(p,B),x(p,D),x(D,G),x(G,J),x(J,O),x(D,_),x(D,I),x(D,V),x(D,X),x(X,Y),x(p,Z),x(p,$),x($,tt),x(tt,et),x(et,ot),x($,it),x($,rt),x($,nt),x($,at),x(at,mt),t[8](p),x(s,ct),x(s,pt),x(pt,gt),x(s,dt),x(s,lt),x(s,ht),x(s,ft),x(ft,vt),x(s,xt),x(s,wt),x(wt,bt),x(bt,Tt),x(wt,jt),x(wt,kt),x(kt,yt)},p(t,e){8&e&&Ut!==(Ut=t[3].top+"")&&w(m,Ut),8&e&&zt!==(zt=t[3].groupsTitle+"")&&w(k,zt),8&e&&Nt!==(Nt=t[3].groupsText+"")&&w(F,Nt),8&e&&Ct!==(Ct=t[3].partiesTitle+"")&&w(K,Ct),8&e&&Ft!==(Ft=t[3].partiesText+"")&&w(q,Ft),8&e&&Lt!==(Lt=t[3].cooperativesTitle+"")&&w(O,Lt),8&e&&At!==(At=t[3].cooperativesText+"")&&w(Y,At),8&e&&Et!==(Et=t[3].communesTitle+"")&&w(ot,Et),8&e&&Ht!==(Ht=t[3].communesText+"")&&w(mt,Ht),2&e&&f(p,"--grid-width",t[1]),8&e&&Kt!==(Kt=t[3].findUs+"")&&w(gt,Kt),8&e&&ut!==(ut=t[9])&&v(lt,"callback",ut),8&e&&Mt!==(Mt=t[3].whatNow+"")&&w(vt,Mt),8&e&&Qt!==(Qt=t[3].joinUs+"")&&w(Tt,Qt),8&e&&Rt!==(Rt=t[3].talkWithUs+"")&&w(yt,Rt)},d(o){o&&a(e),t[8](null)}}}function F(t){let e,o=10==t[2]&&C(t);return{c(){o&&o.c(),e=s()},m(t,r){o&&o.m(t,r),i(t,e,r)},p(t,i){10==t[2]?o?o.p(t,i):(o=C(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&a(e)}}}function A(t){let e,o=t[2],m=F(t);return{c(){m.c(),e=s(),this.c=n},m(t,o){m.m(t,o),i(t,e,o)},p(t,[i]){4&i&&r(o,o=t[2])?(m.d(1),m=F(t),m.c(),m.m(e.parentNode,e)):m.p(t,i)},i:n,o:n,d(t){t&&a(e),m.d(t)}}}function E(t,e,o){let i,r,s,n,a=b(0);m(t,a,(t=>o(2,i=t)));let g=b({});m(t,g,(t=>o(3,r=t)));let d={},l={};function u(t){o(1,n="1fr 1fr")}let h=(t,e)=>{d[e]=JSON.parse(t),l[e]={};for(let t of d[e]){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in l[e]?l[e][o].push(t):l[e][o]=[t]}a.update((t=>t+1))};T("/assets/groups.json",(t=>h(t,"groups"))),T("/assets/communes.json",(t=>h(t,"communes"))),T("/assets/cooperatives.json",(t=>h(t,"cooperatives"))),T("/assets/parties.json",(t=>h(t,"parties"))),j(g,"groups-component",a),j(g,"communes-component",a),j(g,"cooperatives-component",a),j(g,"parties-component",a),j(g,"countries",a);let f=j(g,"landing-component",a,u);function v(t,e,o){let i=t([22,0],2),r={enableCountryGrouping:!0},s=k(d.groups,l.groups,i,e,o,y,"green",r),n=k(d.communes,l.communes,i,e,o,U,"red",r),a=k(d.cooperatives,l.cooperatives,i,e,o,z,"blue",r),m=k(d.parties,l.parties,i,e,o,N,"gold",r),c={};c[e.groups]=s,c[e.communes]=n,c[e.cooperatives]=a,c[e.parties]=m,L.control.layers(null,c).addTo(i)}u(),c((()=>{}));return[s,n,i,r,a,g,f,v,function(t){p[t?"unshift":"push"]((()=>{s=t,o(0,s)}))},t=>v(t,r,f)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},E,A,r,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("landing-component",H);export{H as default}; +import{S as t,i as e,a as o,b as i,s as r,e as s,n,d as a,c as m,o as c,f as p,h as g,j as d,t as l,k as u,w as h,z as f,x as v,l as x,y as w}from"./index-0d9f0c09.js";import{w as b}from"./index-1c123138.js";import{getData as T,loadLocaleContent as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addCommunePinContent as U,addCoopPinContent as z,addPartyPinContent as N}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function C(t){let e,o,r,s,n,m,c,p,b,T,j,k,y,U,z,N,C,F,L,A,E,H,K,M,Q,R,S,W,B,D,G,J,O,_,q,I,P,V,X,Y,Z,$,tt,et,ot,it,rt,st,nt,at,mt,ct,pt,gt,dt,lt,ut,ht,ft,vt,xt,wt,bt,Tt,jt,kt,yt,Ut=t[3].top+"",zt=t[3].groupsTitle+"",Nt=t[3].groupsText+"",Ct=t[3].partiesTitle+"",Ft=t[3].partiesText+"",Lt=t[3].cooperativesTitle+"",At=t[3].cooperativesText+"",Et=t[3].communesTitle+"",Ht=t[3].communesText+"",Kt=t[3].findUs+"",Mt=t[3].whatNow+"",Qt=t[3].joinUs+"",Rt=t[3].talkWithUs+"";return{c(){e=g("div"),o=g("picture"),o.innerHTML=' \n \n crowd',r=d(),s=g("div"),n=g("p"),m=l(Ut),c=d(),p=g("div"),b=g("div"),T=g("a"),j=g("h2"),k=l(zt),y=d(),U=g("img"),N=d(),C=g("p"),F=l(Nt),L=d(),A=g("div"),E=g("a"),H=g("h2"),K=l(Ct),M=d(),Q=g("img"),S=d(),W=g("p"),B=l(Ft),D=d(),G=g("div"),J=g("a"),O=g("h2"),_=l(Lt),q=d(),I=g("img"),V=d(),X=g("p"),Y=l(At),Z=d(),$=g("div"),tt=g("a"),et=g("h2"),ot=l(Et),it=d(),rt=g("img"),nt=d(),at=g("p"),mt=l(Ht),ct=d(),pt=g("h1"),gt=l(Kt),dt=d(),lt=g("map-component"),ht=d(),ft=g("h1"),vt=l(Mt),xt=d(),wt=g("div"),bt=g("a"),Tt=l(Qt),jt=d(),kt=g("a"),yt=l(Rt),u(T,"href","/"+t[6]+"/groups"),u(U,"id","groups-img"),h(U.src,z="/img/common/groups.svg")||u(U,"src","/img/common/groups.svg"),u(U,"alt","groups"),u(E,"href","/"+t[6]+"/parties"),u(Q,"id","parties-img"),h(Q.src,R="/img/common/parties.svg")||u(Q,"src","/img/common/parties.svg"),u(Q,"alt","coops"),u(J,"href","/"+t[6]+"/coops"),u(I,"id","coops-img"),h(I.src,P="/img/common/coops.svg")||u(I,"src","/img/common/coops.svg"),u(I,"alt","coops"),u(tt,"href","/"+t[6]+"/communes"),u(rt,"id","communes-img"),h(rt.src,st="/img/common/communes.svg")||u(rt,"src","/img/common/communes.svg"),u(rt,"alt","communes"),u(p,"id","container-grid"),f(p,"--grid-width",t[1]),u(pt,"id","find-us"),v(lt,"id","map"),v(lt,"callback",ut=t[9]),v(lt,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),u(bt,"class","link-button"),u(bt,"href","/"+t[6]+"/join-us"),u(kt,"class","link-button"),u(kt,"href","https://discord.gg/Qk8KUk787z"),u(kt,"target","_blank"),u(kt,"rel","noreferrer"),u(wt,"id","action-container"),u(s,"id","text-container"),u(e,"id","container")},m(a,g){i(a,e,g),x(e,o),x(e,r),x(e,s),x(s,n),x(n,m),x(s,c),x(s,p),x(p,b),x(b,T),x(T,j),x(j,k),x(b,y),x(b,U),x(b,N),x(b,C),x(C,F),x(p,L),x(p,A),x(A,E),x(E,H),x(H,K),x(A,M),x(A,Q),x(A,S),x(A,W),x(W,B),x(p,D),x(p,G),x(G,J),x(J,O),x(O,_),x(G,q),x(G,I),x(G,V),x(G,X),x(X,Y),x(p,Z),x(p,$),x($,tt),x(tt,et),x(et,ot),x($,it),x($,rt),x($,nt),x($,at),x(at,mt),t[8](p),x(s,ct),x(s,pt),x(pt,gt),x(s,dt),x(s,lt),x(s,ht),x(s,ft),x(ft,vt),x(s,xt),x(s,wt),x(wt,bt),x(bt,Tt),x(wt,jt),x(wt,kt),x(kt,yt)},p(t,e){8&e&&Ut!==(Ut=t[3].top+"")&&w(m,Ut),8&e&&zt!==(zt=t[3].groupsTitle+"")&&w(k,zt),8&e&&Nt!==(Nt=t[3].groupsText+"")&&w(F,Nt),8&e&&Ct!==(Ct=t[3].partiesTitle+"")&&w(K,Ct),8&e&&Ft!==(Ft=t[3].partiesText+"")&&w(B,Ft),8&e&&Lt!==(Lt=t[3].cooperativesTitle+"")&&w(_,Lt),8&e&&At!==(At=t[3].cooperativesText+"")&&w(Y,At),8&e&&Et!==(Et=t[3].communesTitle+"")&&w(ot,Et),8&e&&Ht!==(Ht=t[3].communesText+"")&&w(mt,Ht),2&e&&f(p,"--grid-width",t[1]),8&e&&Kt!==(Kt=t[3].findUs+"")&&w(gt,Kt),8&e&&ut!==(ut=t[9])&&v(lt,"callback",ut),8&e&&Mt!==(Mt=t[3].whatNow+"")&&w(vt,Mt),8&e&&Qt!==(Qt=t[3].joinUs+"")&&w(Tt,Qt),8&e&&Rt!==(Rt=t[3].talkWithUs+"")&&w(yt,Rt)},d(o){o&&a(e),t[8](null)}}}function F(t){let e,o=10==t[2]&&C(t);return{c(){o&&o.c(),e=s()},m(t,r){o&&o.m(t,r),i(t,e,r)},p(t,i){10==t[2]?o?o.p(t,i):(o=C(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&a(e)}}}function A(t){let e,o=t[2],m=F(t);return{c(){m.c(),e=s(),this.c=n},m(t,o){m.m(t,o),i(t,e,o)},p(t,[i]){4&i&&r(o,o=t[2])?(m.d(1),m=F(t),m.c(),m.m(e.parentNode,e)):m.p(t,i)},i:n,o:n,d(t){t&&a(e),m.d(t)}}}function E(t,e,o){let i,r,s,n,a=b(0);m(t,a,(t=>o(2,i=t)));let g=b({});m(t,g,(t=>o(3,r=t)));let d={},l={};function u(t){o(1,n="1fr 1fr")}let h=(t,e)=>{d[e]=JSON.parse(t),l[e]={};for(let t of d[e]){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in l[e]?l[e][o].push(t):l[e][o]=[t]}a.update((t=>t+1))};T("/assets/groups.json",(t=>h(t,"groups"))),T("/assets/communes.json",(t=>h(t,"communes"))),T("/assets/cooperatives.json",(t=>h(t,"cooperatives"))),T("/assets/parties.json",(t=>h(t,"parties"))),j(g,"groups-component",a),j(g,"communes-component",a),j(g,"cooperatives-component",a),j(g,"parties-component",a),j(g,"countries",a);let f=j(g,"landing-component",a,u);function v(t,e,o){let i=t([22,0],2),r={enableCountryGrouping:!0},s=k(d.groups,l.groups,i,e,o,y,"green",r),n=k(d.communes,l.communes,i,e,o,U,"red",r),a=k(d.cooperatives,l.cooperatives,i,e,o,z,"blue",r),m=k(d.parties,l.parties,i,e,o,N,"gold",r),c={};c[e.groups]=s,c[e.communes]=n,c[e.cooperatives]=a,c[e.parties]=m,L.control.layers(null,c).addTo(i)}u(),c((()=>{}));return[s,n,i,r,a,g,f,v,function(t){p[t?"unshift":"push"]((()=>{s=t,o(0,s)}))},t=>v(t,r,f)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},E,A,r,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("landing-component",H);export{H as default}; diff --git a/Server/public/js/components/legend-component.js b/Server/public/js/components/legend-component.js index 9b01201..ffc0567 100644 --- a/Server/public/js/components/legend-component.js +++ b/Server/public/js/components/legend-component.js @@ -1 +1 @@ -import{S as t,i as e,a as s,b as o,k as n,s as r,e as i,n as a,d as l,g as c,y as p,o as u,c as h,t as d,z as m,f,l as g,x as y,j as $}from"./index-6a7bc1e2.js";import{pullLegendData as b}from"../../../../../../../../../js/predict/charts.js";function x(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function w(t){let e,s,n,r,a,p,u,$,b=t[10].name+"",x=t[12];const w=()=>t[6](e,x),k=()=>t[6](null,x);function j(){return t[7](t[12])}return{c(){e=i("button"),s=i("div"),n=h(),r=i("span"),a=d(b),p=h(),l(s,"class","marker"),m(s,"background-color",t[10].color)},m(t,i){o(t,e,i),f(e,s),f(e,n),f(e,r),f(r,a),f(e,p),w(),u||($=g(e,"click",j),u=!0)},p(e,o){t=e,1&o&&m(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&y(a,b),x!==t[12]&&(k(),x=t[12],w())},d(t){t&&c(e),k(),u=!1,$()}}}function k(t){let e,s=t[0],n=[];for(let e=0;et._id)),c=a[t];for(let t=0;t{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class v extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},j,k,r,{option:4,chart:5,data:3},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),n()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),n()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),n()}}customElements.define("legend-component",v);export{v as default}; +import{S as t,i as e,a as s,b as o,u as n,s as r,h as i,n as a,k as l,d as c,p,o as u,j as h,t as d,z as m,l as f,m as g,y,f as $}from"./index-0d9f0c09.js";import{pullLegendData as b}from"../../../../../../../../../js/predict/charts.js";function w(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function x(t){let e,s,n,r,a,p,u,$,b=t[10].name+"",w=t[12];const x=()=>t[6](e,w),k=()=>t[6](null,w);function j(){return t[7](t[12])}return{c(){e=i("button"),s=i("div"),n=h(),r=i("span"),a=d(b),p=h(),l(s,"class","marker"),m(s,"background-color",t[10].color)},m(t,i){o(t,e,i),f(e,s),f(e,n),f(e,r),f(r,a),f(e,p),x(),u||($=g(e,"click",j),u=!0)},p(e,o){t=e,1&o&&m(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&y(a,b),w!==t[12]&&(k(),w=t[12],x())},d(t){t&&c(e),k(),u=!1,$()}}}function k(t){let e,s=t[0],n=[];for(let e=0;et._id)),c=a[t];for(let t=0;t{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class v extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},j,k,r,{option:4,chart:5,data:3},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),n()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),n()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),n()}}customElements.define("legend-component",v);export{v as default}; diff --git a/Server/public/js/components/loadscreen-component.js b/Server/public/js/components/loadscreen-component.js index 7e4908d..d4fd6de 100644 --- a/Server/public/js/components/loadscreen-component.js +++ b/Server/public/js/components/loadscreen-component.js @@ -1 +1 @@ -import{S as t,i as s,a as e,b as n,s as a,e as o,n as i,d as r,z as d,g as u,o as c,j as l}from"./index-6a7bc1e2.js";function h(t){let s;return{c(){s=o("div"),this.c=i,r(s,"id","loadscreen"),d(s,"width","100%"),d(s,"height","100%"),d(s,"background","white"),d(s,"position","absolute"),d(s,"z-index","100000")},m(e,a){n(e,s,a),t[1](s)},p:i,i:i,o:i,d(e){e&&u(s),t[1](null)}}}function p(t,s,e){let n;return c((()=>{window.addEventListener("load",(function(){e(0,n.parentNode.host.style.display="none",n)}))})),[n,function(t){l[t?"unshift":"push"]((()=>{n=t,e(0,n)}))}]}class f extends t{constructor(t){super(),s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},p,h,a,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("loadscreen-component",f);export{f as default}; +import{S as t,i as s,a as e,b as n,s as o,h as a,n as i,k as d,z as r,d as u,o as c,f as l}from"./index-0d9f0c09.js";function h(t){let s;return{c(){s=a("div"),this.c=i,d(s,"id","loadscreen"),r(s,"width","100%"),r(s,"height","100%"),r(s,"background","white"),r(s,"position","absolute"),r(s,"z-index","100000")},m(e,o){n(e,s,o),t[1](s)},p:i,i:i,o:i,d(e){e&&u(s),t[1](null)}}}function p(t,s,e){let n;return c((()=>{window.addEventListener("load",(function(){e(0,n.parentNode.host.style.display="none",n)}))})),[n,function(t){l[t?"unshift":"push"]((()=>{n=t,e(0,n)}))}]}class f extends t{constructor(t){super(),s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},p,h,o,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("loadscreen-component",f);export{f as default}; diff --git a/Server/public/js/components/login-component.js b/Server/public/js/components/login-component.js index a00d4da..7f5196b 100644 --- a/Server/public/js/components/login-component.js +++ b/Server/public/js/components/login-component.js @@ -1 +1 @@ -import{S as t,i as e,a as s,b as o,k as n,s as a,e as i,c as u,t as l,n as r,d as c,f as d,l as m,g as p,r as h,m as f,o as g,j as b}from"./index-6a7bc1e2.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function y(t){let e,s,n,a,f,g,b,w,y,I,k,v,E,$,j,C,L,T,P,B,G,H,M,N,R,z;return{c(){e=i("div"),s=i("h2"),s.textContent="LOG IN",n=u(),a=i("label"),a.textContent="Email ",f=i("span"),g=u(),b=i("input"),w=u(),y=i("div"),I=i("label"),I.textContent="Password ",k=i("span"),v=u(),E=i("input"),$=u(),j=i("button"),j.innerHTML='',C=u(),L=i("div"),T=i("input"),P=i("label"),P.textContent="remember me",B=u(),G=i("button"),G.textContent="Log in",H=u(),M=i("a"),N=l("Forgot password?"),this.c=r,c(s,"class","auth-title"),c(a,"class","auth-label"),c(a,"for","emailInput"),c(f,"id","email-msg"),c(b,"id","emailInput"),c(b,"class","authEmailInput"),c(b,"type","email"),c(I,"class","auth-label"),c(I,"for","passwordInput"),c(k,"id","password-msg"),c(E,"id","passwordInput"),c(E,"class","authPasswordInput"),c(E,"type","password"),c(j,"class","eye-icon"),c(y,"class","password-field"),c(T,"type","checkbox"),c(T,"id","remember-me-checkbox"),c(P,"id","remember-me-label"),c(P,"for","passwordInput"),c(L,"id","remember-me"),c(G,"class","auth-button"),c(M,"id","forgot-password"),c(M,"href","/"+x+"/reset-password"),c(e,"id","login-group"),c(e,"class","pane auth-pane")},m(i,u){o(i,e,u),d(e,s),d(e,n),d(e,a),d(e,f),t[9](f),d(e,g),d(e,b),t[10](b),d(e,w),d(e,y),d(y,I),d(y,k),t[11](k),d(y,v),d(y,E),t[12](E),d(y,$),d(y,j),t[13](j),d(e,C),d(e,L),d(L,T),t[15](T),d(L,P),d(e,B),d(e,G),d(e,H),d(e,M),d(M,N),R||(z=[m(j,"click",t[14]),m(G,"click",t[16])],R=!0)},p:r,i:r,o:r,d(s){s&&p(e),t[9](null),t[10](null),t[11](null),t[12](null),t[13](null),t[15](null),R=!1,h(z)}}}let x="en";function I(t,e,s){let o,n,a,i,u,l,r,c,d,{focused:m=!1}=e,p=f("auth");function h(){if(p.googleInit){google.accounts.id.renderButton(d,{theme:"outline",size:"large"});let t=d.getElementsByTagName("iframe")[0];t.style.height="5rem",t.style.width="5rem"}else setTimeout(h,100)}g((()=>{s(7,c.checked=!0,c),s(2,a={email:o,password:n,remember:c}),s(6,r={email:u,password:l}),p.msgs=r,p.remember=c,p.loginGoogle=d,document.addEventListener("keypress",(function(t){"Enter"==t.code&&m&&w.login(r,a)})),h()}));return t.$$set=t=>{"focused"in t&&s(8,m=t.focused)},[o,n,a,i,u,l,r,c,m,function(t){b[t?"unshift":"push"]((()=>{u=t,s(4,u)}))},function(t){b[t?"unshift":"push"]((()=>{o=t,s(0,o)}))},function(t){b[t?"unshift":"push"]((()=>{l=t,s(5,l)}))},function(t){b[t?"unshift":"push"]((()=>{n=t,s(1,n)}))},function(t){b[t?"unshift":"push"]((()=>{i=t,s(3,i)}))},()=>w.changePasswordVisibility(i),function(t){b[t?"unshift":"push"]((()=>{c=t,s(7,c)}))},()=>w.login(r,a)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},I,y,a,{focused:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[8]}set focused(t){this.$$set({focused:t}),n()}}customElements.define("login-component",k);export{k as default}; +import{S as t,i as s,a as e,b as o,u as n,s as a,h as i,j as u,t as l,n as r,k as c,l as d,m,d as p,r as h,g as f,o as g,f as b}from"./index-0d9f0c09.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function y(t){let s,e,n,a,f,g,b,w,y,I,k,v,E,$,j,C,L,T,P,B,G,H,M,N,R,z;return{c(){s=i("div"),e=i("h2"),e.textContent="LOG IN",n=u(),a=i("label"),a.textContent="Email ",f=i("span"),g=u(),b=i("input"),w=u(),y=i("div"),I=i("label"),I.textContent="Password ",k=i("span"),v=u(),E=i("input"),$=u(),j=i("button"),j.innerHTML='',C=u(),L=i("div"),T=i("input"),P=i("label"),P.textContent="remember me",B=u(),G=i("button"),G.textContent="Log in",H=u(),M=i("a"),N=l("Forgot password?"),this.c=r,c(e,"class","auth-title"),c(a,"class","auth-label"),c(a,"for","emailInput"),c(f,"id","email-msg"),c(b,"id","emailInput"),c(b,"class","authEmailInput"),c(b,"type","email"),c(I,"class","auth-label"),c(I,"for","passwordInput"),c(k,"id","password-msg"),c(E,"id","passwordInput"),c(E,"class","authPasswordInput"),c(E,"type","password"),c(j,"class","eye-icon"),c(y,"class","password-field"),c(T,"type","checkbox"),c(T,"id","remember-me-checkbox"),c(P,"id","remember-me-label"),c(P,"for","passwordInput"),c(L,"id","remember-me"),c(G,"class","auth-button"),c(M,"id","forgot-password"),c(M,"href","/"+x+"/reset-password"),c(s,"id","login-group"),c(s,"class","pane auth-pane")},m(i,u){o(i,s,u),d(s,e),d(s,n),d(s,a),d(s,f),t[9](f),d(s,g),d(s,b),t[10](b),d(s,w),d(s,y),d(y,I),d(y,k),t[11](k),d(y,v),d(y,E),t[12](E),d(y,$),d(y,j),t[13](j),d(s,C),d(s,L),d(L,T),t[15](T),d(L,P),d(s,B),d(s,G),d(s,H),d(s,M),d(M,N),R||(z=[m(j,"click",t[14]),m(G,"click",t[16])],R=!0)},p:r,i:r,o:r,d(e){e&&p(s),t[9](null),t[10](null),t[11](null),t[12](null),t[13](null),t[15](null),R=!1,h(z)}}}let x="en";function I(t,s,e){let o,n,a,i,u,l,r,c,d,{focused:m=!1}=s,p=f("auth");function h(){if(p.googleInit){google.accounts.id.renderButton(d,{theme:"outline",size:"large"});let t=d.getElementsByTagName("iframe")[0];t.style.height="5rem",t.style.width="5rem"}else setTimeout(h,100)}g((()=>{e(7,c.checked=!0,c),e(2,a={email:o,password:n,remember:c}),e(6,r={email:u,password:l}),p.msgs=r,p.remember=c,p.loginGoogle=d,document.addEventListener("keypress",(function(t){"Enter"==t.code&&m&&w.login(r,a)})),h()}));return t.$$set=t=>{"focused"in t&&e(8,m=t.focused)},[o,n,a,i,u,l,r,c,m,function(t){b[t?"unshift":"push"]((()=>{u=t,e(4,u)}))},function(t){b[t?"unshift":"push"]((()=>{o=t,e(0,o)}))},function(t){b[t?"unshift":"push"]((()=>{l=t,e(5,l)}))},function(t){b[t?"unshift":"push"]((()=>{n=t,e(1,n)}))},function(t){b[t?"unshift":"push"]((()=>{i=t,e(3,i)}))},()=>w.changePasswordVisibility(i),function(t){b[t?"unshift":"push"]((()=>{c=t,e(7,c)}))},()=>w.login(r,a)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},I,y,a,{focused:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[8]}set focused(t){this.$$set({focused:t}),n()}}customElements.define("login-component",k);export{k as default}; diff --git a/Server/public/js/components/manifesto-component.js b/Server/public/js/components/manifesto-component.js index cbf6fdc..fb7d531 100644 --- a/Server/public/js/components/manifesto-component.js +++ b/Server/public/js/components/manifesto-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as i,s as l,q as o,n as r,g as s,u as c,o as a,j as d,e as m,d as u,f,t as h,c as p,v as g,z as w,l as b,x,y,p as v,H as k}from"./index-6a7bc1e2.js";import{w as H}from"./index-4da4d0ce.js";import{loadLocaleContent as j,getData as I}from"../../../../../../../../../js/libraries/serverTools.js";import{px2rem as L}from"../../../../../../../../../js/libraries/miscTools.js";function T(t,e,n){const i=t.slice();return i[33]=e[n],i[34]=e,i[35]=n,i}function Y(t,e,n){const i=t.slice();return i[36]=e[n],i}function C(t,e,n){const i=t.slice();return i[36]=e[n],i}function M(t,e,n){const i=t.slice();return i[41]=e[n],i[42]=e,i[43]=n,i}function z(t,e,n){const i=t.slice();return i[44]=e[n],i[45]=e,i[46]=n,i}function A(t){let e,n,o=t[0],r=K(t);return{c(){e=m("div"),n=m("div"),r.c(),u(n,"id","text-container"),u(e,"id","container")},m(l,o){i(l,e,o),f(e,n),r.m(n,null),t[28](e)},p(t,e){1&e[0]&&l(o,o=t[0])?(r.d(1),r=K(t),r.c(),r.m(n,null)):r.p(t,e)},d(n){n&&s(e),r.d(n),t[28](null)}}}function V(t){let e,n,l,o,r,c,a=t[41].name+"",d=t[41];const g=()=>t[21](n,d),w=()=>t[21](null,d);function x(){return t[22](t[41])}return{c(){e=m("div"),n=m("button"),l=h(a),o=p(),u(n,"class","level0 heading-button"),u(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),f(e,n),f(n,l),g(),f(e,o),r||(c=b(n,"click",x),r=!0)},p(e,n){d!==(t=e)[41]&&(w(),d=t[41],g())},d(t){t&&s(e),w(),r=!1,c()}}}function O(t){let e,n=t[41],l=[];for(let e=0;et[19](n,d),w=()=>t[19](null,d);function x(){return t[20](t[44])}return{c(){e=m("div"),n=m("button"),l=h(a),o=p(),u(n,"class","level1 heading-button"),u(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),f(e,n),f(n,l),g(),f(e,o),r||(c=b(n,"click",x),r=!0)},p(e,n){d!==(t=e)[44]&&(w(),d=t[44],g())},d(t){t&&s(e),w(),r=!1,c()}}}function S(t){let e;let n=function(t,e){return Array.isArray(t[41])?O:V}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function E(t){let e;let n=function(t,e){return t[33],"ul"==Object.keys(t[33])[0]?D:(t[33],"ol"==Object.keys(t[33])[0]?W:(t[33],"h3"==t[33].type?q:(t[33],"h2"==t[33].type?_:"#"==t[33][0]?B:N)))}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function N(t){let e,n,l,o=t[33]+"";return{c(){e=m("p"),n=new k(!1),l=p(),n.a=l,u(e,"class","margin-end")},m(t,r){i(t,e,r),n.m(o,e),f(e,l)},p:r,d(t){t&&s(e)}}}function B(t){let e,n=t[33].slice(2,t[33].length)+"";return{c(){e=m("h1")},m(t,l){i(t,e,l),e.innerHTML=n},p:r,d(t){t&&s(e)}}}function _(t){let e,n,l,o,r,c=t[33].line+"",a=t[33];const d=()=>t[26](n,a),h=()=>t[26](null,a);return{c(){e=m("button"),n=m("h2"),l=p(),u(n,"id",t[33].id),w(e,"display","block"),w(e,"width","100%")},m(s,a){i(s,e,a),f(e,n),n.innerHTML=c,d(),f(e,l),o||(r=b(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){a!==(t=e)[33]&&(h(),a=t[33],d())},d(t){t&&s(e),h(),o=!1,r()}}}function q(t){let e,n,l,o,r,c=t[33].line+"",a=t[33];const d=()=>t[25](n,a),h=()=>t[25](null,a);return{c(){e=m("button"),n=m("h3"),l=p(),u(n,"id",t[33].id),w(e,"display","block"),w(e,"width","100%")},m(s,a){i(s,e,a),f(e,n),n.innerHTML=c,d(),f(e,l),o||(r=b(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){a!==(t=e)[33]&&(h(),a=t[33],d())},d(t){t&&s(e),h(),o=!1,r()}}}function W(t){let e,n,l=t[33].ol,o=[];for(let e=0;en(9,i=t)));let k=H({});c(t,k,(t=>n(10,l=t))),j(k,"countries",v);let T=j(k,"manifesto-component",v);const Y=["ul","ol"];function C(t){w[t].scrollIntoView({block:"start"},!0)}I("/locales/"+T+"/manifesto.txt",(function(t){let e,i=t.split(/\r?\n/),l=0;for(let t=0;tn.includes("<"+t+">"))).findIndex((t=>t));if(-1!=o){let e=Y[o],l={};l[e]=[];let r="";for(;;){if(t+=1,n=i[t],n.includes(r)){p.push(l);break}l[e].push(n)}}else if("###"==n.slice(0,3)){let t=n.slice(4,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");e.push({id:i,name:t,index:l}),l+=1,p.push({type:"h3",id:i,line:t,index:l})}else if("##"==n.slice(0,2)){let t=n.slice(3,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");b.push({id:t.toLowerCase().trim().replaceAll(" ","-"),name:t,index:l}),l+=1,e=[],b.push(e),p.push({type:"h2",id:i,line:t,index:l})}else p.push(n)}n(0,o+=1)})),addEventListener("scroll",(t=>{if(window.innerWidth>1080){let t=L(window.scrollY),e=L(f.getBoundingClientRect().bottom+window.scrollY),i=L(u.getBoundingClientRect().bottom+window.scrollY);if(t>x&&t<5||t=e-1.5)y-=i-(e-1.5);else if(y>-5&&(y=-5),t<5&&0!=t){let t=L(u.offsetHeight-window.innerHeight);y=-Math.min(L(window.scrollY),5+t+2.5)}else if(twindow.innerHeight){let e=L(u.offsetHeight)-L(window.innerHeight);y>-(e+8)?y+=x-t:y=-(e+8)}n(6,u.style.marginTop=y+"rem",u),x=L(window.scrollY)}else n(6,u.style.marginTop="0rem",u)})),a((()=>{let t=localStorage.getItem("manifesto-hide-content");null!=t&&null!=t&&"true"==t&&U(s,m)}));return[o,r,s,m,g,w,u,f,h,i,l,p,b,v,k,C,function(t){d[t?"unshift":"push"]((()=>{s=t,n(2,s)}))},function(t){d[t?"unshift":"push"]((()=>{r=t,n(1,r)}))},()=>U(s,m),function(t,e){d[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>C(t.id),function(t,e){d[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>C(t.id),function(t){d[t?"unshift":"push"]((()=>{m=t,n(3,m)}))},function(t){d[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t,e){d[t?"unshift":"push"]((()=>{w[e.id]=t,n(5,w)}))},function(t,e){d[t?"unshift":"push"]((()=>{w[e.id]=t,n(5,w)}))},function(t){d[t?"unshift":"push"]((()=>{h=t,n(8,h)}))},function(t){d[t?"unshift":"push"]((()=>{f=t,n(7,f)}))}]}class Z extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},X,Q,l,{},null,[-1,-1]),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("manifesto-component",Z);export{Z as default}; +import{S as t,i as e,a as n,b as i,s as l,e as o,n as r,d as s,c,o as a,f as d,h as m,k as u,l as f,t as h,j as p,w as g,z as w,m as b,y as x,p as y,v,H as k}from"./index-0d9f0c09.js";import{w as H}from"./index-1c123138.js";import{loadLocaleContent as j,getData as I}from"../../../../../../../../../js/libraries/serverTools.js";import{px2rem as L}from"../../../../../../../../../js/libraries/miscTools.js";function T(t,e,n){const i=t.slice();return i[33]=e[n],i[34]=e,i[35]=n,i}function Y(t,e,n){const i=t.slice();return i[36]=e[n],i}function C(t,e,n){const i=t.slice();return i[36]=e[n],i}function M(t,e,n){const i=t.slice();return i[41]=e[n],i[42]=e,i[43]=n,i}function z(t,e,n){const i=t.slice();return i[44]=e[n],i[45]=e,i[46]=n,i}function A(t){let e,n,o=t[0],r=K(t);return{c(){e=m("div"),n=m("div"),r.c(),u(n,"id","text-container"),u(e,"id","container")},m(l,o){i(l,e,o),f(e,n),r.m(n,null),t[28](e)},p(t,e){1&e[0]&&l(o,o=t[0])?(r.d(1),r=K(t),r.c(),r.m(n,null)):r.p(t,e)},d(n){n&&s(e),r.d(n),t[28](null)}}}function V(t){let e,n,l,o,r,c,a=t[41].name+"",d=t[41];const g=()=>t[21](n,d),w=()=>t[21](null,d);function x(){return t[22](t[41])}return{c(){e=m("div"),n=m("button"),l=h(a),o=p(),u(n,"class","level0 heading-button"),u(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),f(e,n),f(n,l),g(),f(e,o),r||(c=b(n,"click",x),r=!0)},p(e,n){d!==(t=e)[41]&&(w(),d=t[41],g())},d(t){t&&s(e),w(),r=!1,c()}}}function O(t){let e,n=t[41],l=[];for(let e=0;et[19](n,d),w=()=>t[19](null,d);function x(){return t[20](t[44])}return{c(){e=m("div"),n=m("button"),l=h(a),o=p(),u(n,"class","level1 heading-button"),u(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),f(e,n),f(n,l),g(),f(e,o),r||(c=b(n,"click",x),r=!0)},p(e,n){d!==(t=e)[44]&&(w(),d=t[44],g())},d(t){t&&s(e),w(),r=!1,c()}}}function S(t){let e;let n=function(t,e){return Array.isArray(t[41])?O:V}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function E(t){let e;let n=function(t,e){return t[33],"ul"==Object.keys(t[33])[0]?D:(t[33],"ol"==Object.keys(t[33])[0]?q:(t[33],"h3"==t[33].type?W:(t[33],"h2"==t[33].type?_:"#"==t[33][0]?B:N)))}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function N(t){let e,n,l,o=t[33]+"";return{c(){e=m("p"),n=new k(!1),l=p(),n.a=l,u(e,"class","margin-end")},m(t,r){i(t,e,r),n.m(o,e),f(e,l)},p:r,d(t){t&&s(e)}}}function B(t){let e,n=t[33].slice(2,t[33].length)+"";return{c(){e=m("h1")},m(t,l){i(t,e,l),e.innerHTML=n},p:r,d(t){t&&s(e)}}}function _(t){let e,n,l,o,r,c=t[33].line+"",a=t[33];const d=()=>t[26](n,a),h=()=>t[26](null,a);return{c(){e=m("button"),n=m("h2"),l=p(),u(n,"id",t[33].id),w(e,"display","block"),w(e,"width","100%")},m(s,a){i(s,e,a),f(e,n),n.innerHTML=c,d(),f(e,l),o||(r=b(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){a!==(t=e)[33]&&(h(),a=t[33],d())},d(t){t&&s(e),h(),o=!1,r()}}}function W(t){let e,n,l,o,r,c=t[33].line+"",a=t[33];const d=()=>t[25](n,a),h=()=>t[25](null,a);return{c(){e=m("button"),n=m("h3"),l=p(),u(n,"id",t[33].id),w(e,"display","block"),w(e,"width","100%")},m(s,a){i(s,e,a),f(e,n),n.innerHTML=c,d(),f(e,l),o||(r=b(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){a!==(t=e)[33]&&(h(),a=t[33],d())},d(t){t&&s(e),h(),o=!1,r()}}}function q(t){let e,n,l=t[33].ol,o=[];for(let e=0;en(9,i=t)));let k=H({});c(t,k,(t=>n(10,l=t))),j(k,"countries",v);let T=j(k,"manifesto-component",v);const Y=["ul","ol"];function C(t){w[t].scrollIntoView({block:"start"},!0)}I("/locales/"+T+"/manifesto.txt",(function(t){let e,i=t.split(/\r?\n/),l=0;for(let t=0;tn.includes("<"+t+">"))).findIndex((t=>t));if(-1!=o){let e=Y[o],l={};l[e]=[];let r="";for(;;){if(t+=1,n=i[t],n.includes(r)){p.push(l);break}l[e].push(n)}}else if("###"==n.slice(0,3)){let t=n.slice(4,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");e.push({id:i,name:t,index:l}),l+=1,p.push({type:"h3",id:i,line:t,index:l})}else if("##"==n.slice(0,2)){let t=n.slice(3,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");b.push({id:t.toLowerCase().trim().replaceAll(" ","-"),name:t,index:l}),l+=1,e=[],b.push(e),p.push({type:"h2",id:i,line:t,index:l})}else p.push(n)}n(0,o+=1)})),addEventListener("scroll",(t=>{if(window.innerWidth>1080){let t=L(window.scrollY),e=L(f.getBoundingClientRect().bottom+window.scrollY),i=L(u.getBoundingClientRect().bottom+window.scrollY);if(t>x&&t<5||t=e-1.5)y-=i-(e-1.5);else if(y>-5&&(y=-5),t<5&&0!=t){let t=L(u.offsetHeight-window.innerHeight);y=-Math.min(L(window.scrollY),5+t+2.5)}else if(twindow.innerHeight){let e=L(u.offsetHeight)-L(window.innerHeight);y>-(e+8)?y+=x-t:y=-(e+8)}n(6,u.style.marginTop=y+"rem",u),x=L(window.scrollY)}else n(6,u.style.marginTop="0rem",u)})),a((()=>{let t=localStorage.getItem("manifesto-hide-content");null!=t&&null!=t&&"true"==t&&U(s,m)}));return[o,r,s,m,g,w,u,f,h,i,l,p,b,v,k,C,function(t){d[t?"unshift":"push"]((()=>{s=t,n(2,s)}))},function(t){d[t?"unshift":"push"]((()=>{r=t,n(1,r)}))},()=>U(s,m),function(t,e){d[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>C(t.id),function(t,e){d[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>C(t.id),function(t){d[t?"unshift":"push"]((()=>{m=t,n(3,m)}))},function(t){d[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t,e){d[t?"unshift":"push"]((()=>{w[e.id]=t,n(5,w)}))},function(t,e){d[t?"unshift":"push"]((()=>{w[e.id]=t,n(5,w)}))},function(t){d[t?"unshift":"push"]((()=>{h=t,n(8,h)}))},function(t){d[t?"unshift":"push"]((()=>{f=t,n(7,f)}))}]}class Z extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},X,Q,l,{},null,[-1,-1]),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("manifesto-component",Z);export{Z as default}; diff --git a/Server/public/js/components/map-component.js b/Server/public/js/components/map-component.js index 387926c..35f216e 100644 --- a/Server/public/js/components/map-component.js +++ b/Server/public/js/components/map-component.js @@ -1 +1 @@ -import{S as t,i as e,a,b as s,k as o,s as r,e as l,n as i,d as n,g as c,o as m,j as p}from"./index-6a7bc1e2.js";function h(t){let e;return{c(){e=l("div"),this.c=i,n(e,"id","map")},m(a,o){s(a,e,o),t[4](e)},p:i,i:i,o:i,d(a){a&&c(e),t[4](null)}}}function u(t,e,a){let s,{callback:o=null}=e,{colors:r=null}=e,{map:l=null}=e;function i(t,e){return a(1,l=L.map(s,{center:t,zoom:e})),L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',minNativeZoom:2,minZoom:2,maxNativeZoom:14,maxZoom:14}).addTo(l),l}return m((()=>{if(o(i),null!=r){let t=s.getElementsByClassName("leaflet-control-layers-overlays")[0].children;for(let e=0;e{"callback"in t&&a(2,o=t.callback),"colors"in t&&a(3,r=t.colors),"map"in t&&a(1,l=t.map)},[s,l,o,r,function(t){p[t?"unshift":"push"]((()=>{s=t,a(0,s)}))}]}class g extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},u,h,r,{callback:2,colors:3,map:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","colors","map"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),o()}get colors(){return this.$$.ctx[3]}set colors(t){this.$$set({colors:t}),o()}get map(){return this.$$.ctx[1]}set map(t){this.$$set({map:t}),o()}}customElements.define("map-component",g);export{g as default}; +import{S as t,i as e,a,b as s,u as o,s as r,h as l,n as i,k as n,d as c,o as m,f as p}from"./index-0d9f0c09.js";function h(t){let e;return{c(){e=l("div"),this.c=i,n(e,"id","map")},m(a,o){s(a,e,o),t[4](e)},p:i,i:i,o:i,d(a){a&&c(e),t[4](null)}}}function u(t,e,a){let s,{callback:o=null}=e,{colors:r=null}=e,{map:l=null}=e;function i(t,e){return a(1,l=L.map(s,{center:t,zoom:e})),L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',minNativeZoom:2,minZoom:2,maxNativeZoom:14,maxZoom:14}).addTo(l),l}return m((()=>{if(o(i),null!=r){let t=s.getElementsByClassName("leaflet-control-layers-overlays")[0].children;for(let e=0;e{"callback"in t&&a(2,o=t.callback),"colors"in t&&a(3,r=t.colors),"map"in t&&a(1,l=t.map)},[s,l,o,r,function(t){p[t?"unshift":"push"]((()=>{s=t,a(0,s)}))}]}class d extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},u,h,r,{callback:2,colors:3,map:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","colors","map"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),o()}get colors(){return this.$$.ctx[3]}set colors(t){this.$$set({colors:t}),o()}get map(){return this.$$.ctx[1]}set map(t){this.$$set({map:t}),o()}}customElements.define("map-component",d);export{d as default}; diff --git a/Server/public/js/components/navbar-logged.js b/Server/public/js/components/navbar-logged.js index 8a83512..8ac4457 100644 --- a/Server/public/js/components/navbar-logged.js +++ b/Server/public/js/components/navbar-logged.js @@ -1 +1 @@ -import{S as e,i as t,a as n,b as i,s,q as o,n as l,g as r,u as a,o as c,e as u,c as d,t as p,d as h,v as m,f,l as g,x as b,y,r as w,j as v}from"./index-6a7bc1e2.js";import{w as j}from"./index-4da4d0ce.js";import{loadLocaleContent as k,locales as H}from"../../../../../../../../../js/libraries/serverTools.js";function T(e,t,n){const i=e.slice();return i[23]=t[n][0],i[24]=t[n][1],i}function x(e){let t,n,s,o,l,a,c,v,j,k,x,W,M,O,E,N,S,R,U,q,z,I,A,B,C,D,F,G,J,K,P,Q,V,X,Y,Z,$,_,ee,te,ne,ie,se,oe,le,re,ae,ce,ue,de,pe,he=e[5].orgName+"",me=e[5].joinUs+"",fe=e[5].manifesto+"",ge=e[5].initiatives+"",be=e[5].groups+"",ye=e[5].communes+"",we=e[5].cooperatives+"",ve=e[5].parties+"",je=e[5].partners+"",ke=e[5].profile+"",He=Object.entries(H),Te=[];for(let t=0;t',l=d(),a=u("a"),c=u("img"),j=d(),k=u("span"),x=d(),W=u("nav"),M=u("ul"),O=u("li"),E=u("a"),N=p(me),S=d(),R=u("li"),U=u("a"),q=p(fe),z=d(),I=u("li"),A=u("button"),B=p(ge),C=d(),D=u("div"),F=u("a"),G=p(be),J=d(),K=u("a"),P=p(ye),Q=d(),V=u("a"),X=p(we),Y=d(),Z=u("a"),$=p(ve),_=d(),ee=u("a"),te=p(je),ne=d(),ie=u("li"),se=u("a"),oe=p(ke),le=d(),re=u("li"),ae=u("button"),ae.innerHTML=' \n \n globe',ce=d(),ue=u("div");for(let e=0;e{e.style.display="none"}),100)}function O(e,t,n){let i,s,o,l,r,u,d=j(0),p=j({});a(e,p,(e=>n(5,i=e)));let h=k(p,"navbar-component",d);function m(e){let t=e.style.display;n(3,r.style.display="none",r),n(2,l.style.display="none",l),e.style.display="block"==t?"none":"block"}function f(e){localStorage.setItem("locale",e);let t=location.href.split("/"),n=Object.keys(H);t=t.filter((e=>!n.includes(e)));let i=t.slice(0,t.length-1).join("/")+"/"+e+"/"+t[t.length-1];location.href=i}c((()=>{!function(){if("ru"==h){let e=()=>{null==u?setTimeout(e,100):(window.innerWidth<1700&&window.innerWidth>1400||window.innerWidth<400)&&"100%"!=u.style.lineHeight?(n(4,u.style.lineHeight="120%",u),n(4,u.style.top="1rem",u),n(4,u.style.width="16rem",u)):(window.innerWidth>1700||window.innerWidth>400&&window.innerWidth<1400)&&"400%"!=u.style.lineHeight&&(n(4,u.style.lineHeight="400%",u),n(4,u.style.top="0rem",u),n(4,u.style.width="auto",u))};e(),addEventListener("resize",e)}}()}));return[s,o,l,r,u,i,d,p,h,function(){s.checked?n(1,o.style.background="white",o):setTimeout((()=>{n(1,o.style.position="relative",o),n(1,o.style.background="",o),n(1,o.style.boxShadow="",o)}),510)},m,f,function(e){v[e?"unshift":"push"]((()=>{s=e,n(0,s)}))},function(e){v[e?"unshift":"push"]((()=>{u=e,n(4,u)}))},()=>m(r),()=>M(r),function(e){v[e?"unshift":"push"]((()=>{r=e,n(3,r)}))},()=>m(l),()=>M(l),e=>f(e),function(e){v[e?"unshift":"push"]((()=>{l=e,n(2,l)}))},function(e){v[e?"unshift":"push"]((()=>{o=e,n(1,o)}))}]}class E extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,W,s,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("navbar-logged",E);export{E as default}; +import{S as e,i as t,a as n,b as i,s,e as o,n as l,d as r,c as a,o as c,h as u,j as d,t as p,k as h,w as m,l as f,m as g,y as b,p as y,r as w,f as v}from"./index-0d9f0c09.js";import{w as j}from"./index-1c123138.js";import{loadLocaleContent as k,locales as H}from"../../../../../../../../../js/libraries/serverTools.js";function T(e,t,n){const i=e.slice();return i[23]=t[n][0],i[24]=t[n][1],i}function x(e){let t,n,s,o,l,a,c,v,j,k,x,W,M,O,E,N,S,R,U,z,I,q,A,B,C,D,F,G,J,K,P,Q,V,X,Y,Z,$,_,ee,te,ne,ie,se,oe,le,re,ae,ce,ue,de,pe,he=e[5].orgName+"",me=e[5].joinUs+"",fe=e[5].manifesto+"",ge=e[5].initiatives+"",be=e[5].groups+"",ye=e[5].communes+"",we=e[5].cooperatives+"",ve=e[5].parties+"",je=e[5].partners+"",ke=e[5].profile+"",He=Object.entries(H),Te=[];for(let t=0;t',l=d(),a=u("a"),c=u("img"),j=d(),k=u("span"),x=d(),W=u("nav"),M=u("ul"),O=u("li"),E=u("a"),N=p(me),S=d(),R=u("li"),U=u("a"),z=p(fe),I=d(),q=u("li"),A=u("button"),B=p(ge),C=d(),D=u("div"),F=u("a"),G=p(be),J=d(),K=u("a"),P=p(ye),Q=d(),V=u("a"),X=p(we),Y=d(),Z=u("a"),$=p(ve),_=d(),ee=u("a"),te=p(je),ne=d(),ie=u("li"),se=u("a"),oe=p(ke),le=d(),re=u("li"),ae=u("button"),ae.innerHTML=' \n \n globe',ce=d(),ue=u("div");for(let e=0;e{e.style.display="none"}),100)}function O(e,t,n){let i,s,o,l,r,u,d=j(0),p=j({});a(e,p,(e=>n(5,i=e)));let h=k(p,"navbar-component",d);function m(e){let t=e.style.display;n(3,r.style.display="none",r),n(2,l.style.display="none",l),e.style.display="block"==t?"none":"block"}function f(e){localStorage.setItem("locale",e);let t=location.href.split("/"),n=Object.keys(H);t=t.filter((e=>!n.includes(e)));let i=t.slice(0,t.length-1).join("/")+"/"+e+"/"+t[t.length-1];location.href=i}c((()=>{!function(){if("ru"==h){let e=()=>{null==u?setTimeout(e,100):(window.innerWidth<1700&&window.innerWidth>1400||window.innerWidth<400)&&"100%"!=u.style.lineHeight?(n(4,u.style.lineHeight="120%",u),n(4,u.style.top="1rem",u),n(4,u.style.width="16rem",u)):(window.innerWidth>1700||window.innerWidth>400&&window.innerWidth<1400)&&"400%"!=u.style.lineHeight&&(n(4,u.style.lineHeight="400%",u),n(4,u.style.top="0rem",u),n(4,u.style.width="auto",u))};e(),addEventListener("resize",e)}}()}));return[s,o,l,r,u,i,d,p,h,function(){s.checked?n(1,o.style.background="white",o):setTimeout((()=>{n(1,o.style.position="relative",o),n(1,o.style.background="",o),n(1,o.style.boxShadow="",o)}),510)},m,f,function(e){v[e?"unshift":"push"]((()=>{s=e,n(0,s)}))},function(e){v[e?"unshift":"push"]((()=>{u=e,n(4,u)}))},()=>m(r),()=>M(r),function(e){v[e?"unshift":"push"]((()=>{r=e,n(3,r)}))},()=>m(l),()=>M(l),e=>f(e),function(e){v[e?"unshift":"push"]((()=>{l=e,n(2,l)}))},function(e){v[e?"unshift":"push"]((()=>{o=e,n(1,o)}))}]}class E extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,W,s,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("navbar-logged",E);export{E as default}; diff --git a/Server/public/js/components/navbar-not-logged.js b/Server/public/js/components/navbar-not-logged.js index 53a8497..1fef068 100644 --- a/Server/public/js/components/navbar-not-logged.js +++ b/Server/public/js/components/navbar-not-logged.js @@ -1 +1 @@ -import{S as e,i as t,a as n,b as i,s,q as o,n as l,g as r,u as a,o as c,e as u,c as d,t as h,d as m,v as p,f,l as g,x as b,y,r as w,j as v}from"./index-6a7bc1e2.js";import{w as j}from"./index-4da4d0ce.js";import{loadLocaleContent as k,locales as H}from"../../../../../../../../../js/libraries/serverTools.js";function T(e,t,n){const i=e.slice();return i[23]=t[n][0],i[24]=t[n][1],i}function x(e){let t,n,s,o,l,a,c,v,j,k,x,W,M,O,E,N,S,R,U,q,z,I,A,B,C,D,F,G,J,K,P,Q,V,X,Y,Z,$,_,ee,te,ne,ie,se,oe,le,re,ae,ce,ue,de,he,me=e[5].orgName+"",pe=e[5].joinUs+"",fe=e[5].manifesto+"",ge=e[5].initiatives+"",be=e[5].groups+"",ye=e[5].communes+"",we=e[5].cooperatives+"",ve=e[5].parties+"",je=e[5].partners+"",ke=e[5].login+"",He=Object.entries(H),Te=[];for(let t=0;t',l=d(),a=u("a"),c=u("img"),j=d(),k=u("span"),x=d(),W=u("nav"),M=u("ul"),O=u("li"),E=u("a"),N=h(pe),S=d(),R=u("li"),U=u("a"),q=h(fe),z=d(),I=u("li"),A=u("button"),B=h(ge),C=d(),D=u("div"),F=u("a"),G=h(be),J=d(),K=u("a"),P=h(ye),Q=d(),V=u("a"),X=h(we),Y=d(),Z=u("a"),$=h(ve),_=d(),ee=u("a"),te=h(je),ne=d(),ie=u("li"),se=u("a"),oe=h(ke),le=d(),re=u("li"),ae=u("button"),ae.innerHTML=' \n \n globe',ce=d(),ue=u("div");for(let e=0;e{e.style.display="none"}),100)}function O(e,t,n){let i,s,o,l,r,u,d=j(0),h=j({});a(e,h,(e=>n(5,i=e)));let m=k(h,"navbar-component",d);function p(e){let t=e.style.display;n(3,r.style.display="none",r),n(2,l.style.display="none",l),e.style.display="block"==t?"none":"block"}function f(e){localStorage.setItem("locale",e);let t=location.href.split("/"),n=Object.keys(H);t=t.filter((e=>!n.includes(e)));let i=t.slice(0,t.length-1).join("/")+"/"+e+"/"+t[t.length-1];location.href=i}c((()=>{!function(){if("ru"==m){let e=()=>{null==u?setTimeout(e,100):(window.innerWidth<1700&&window.innerWidth>1400||window.innerWidth<400)&&"100%"!=u.style.lineHeight?(n(4,u.style.lineHeight="120%",u),n(4,u.style.top="1rem",u),n(4,u.style.width="16rem",u)):(window.innerWidth>1700||window.innerWidth>400&&window.innerWidth<1400)&&"400%"!=u.style.lineHeight&&(n(4,u.style.lineHeight="400%",u),n(4,u.style.top="0rem",u),n(4,u.style.width="auto",u))};e(),addEventListener("resize",e)}}()}));return[s,o,l,r,u,i,d,h,m,function(){s.checked?n(1,o.style.background="white",o):setTimeout((()=>{n(1,o.style.position="relative",o),n(1,o.style.background="",o),n(1,o.style.boxShadow="",o)}),510)},p,f,function(e){v[e?"unshift":"push"]((()=>{s=e,n(0,s)}))},function(e){v[e?"unshift":"push"]((()=>{u=e,n(4,u)}))},()=>p(r),()=>M(r),function(e){v[e?"unshift":"push"]((()=>{r=e,n(3,r)}))},()=>p(l),()=>M(l),e=>f(e),function(e){v[e?"unshift":"push"]((()=>{l=e,n(2,l)}))},function(e){v[e?"unshift":"push"]((()=>{o=e,n(1,o)}))}]}class E extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,W,s,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("navbar-not-logged",E);export{E as default}; +import{S as e,i as t,a as n,b as i,s,e as o,n as l,d as r,c as a,o as c,h as u,j as d,t as h,k as m,w as p,l as f,m as g,y as b,p as y,r as w,f as v}from"./index-0d9f0c09.js";import{w as j}from"./index-1c123138.js";import{loadLocaleContent as k,locales as H}from"../../../../../../../../../js/libraries/serverTools.js";function T(e,t,n){const i=e.slice();return i[23]=t[n][0],i[24]=t[n][1],i}function x(e){let t,n,s,o,l,a,c,v,j,k,x,W,M,O,E,N,S,R,U,z,I,q,A,B,C,D,F,G,J,K,P,Q,V,X,Y,Z,$,_,ee,te,ne,ie,se,oe,le,re,ae,ce,ue,de,he,me=e[5].orgName+"",pe=e[5].joinUs+"",fe=e[5].manifesto+"",ge=e[5].initiatives+"",be=e[5].groups+"",ye=e[5].communes+"",we=e[5].cooperatives+"",ve=e[5].parties+"",je=e[5].partners+"",ke=e[5].login+"",He=Object.entries(H),Te=[];for(let t=0;t',l=d(),a=u("a"),c=u("img"),j=d(),k=u("span"),x=d(),W=u("nav"),M=u("ul"),O=u("li"),E=u("a"),N=h(pe),S=d(),R=u("li"),U=u("a"),z=h(fe),I=d(),q=u("li"),A=u("button"),B=h(ge),C=d(),D=u("div"),F=u("a"),G=h(be),J=d(),K=u("a"),P=h(ye),Q=d(),V=u("a"),X=h(we),Y=d(),Z=u("a"),$=h(ve),_=d(),ee=u("a"),te=h(je),ne=d(),ie=u("li"),se=u("a"),oe=h(ke),le=d(),re=u("li"),ae=u("button"),ae.innerHTML=' \n \n globe',ce=d(),ue=u("div");for(let e=0;e{e.style.display="none"}),100)}function O(e,t,n){let i,s,o,l,r,u,d=j(0),h=j({});a(e,h,(e=>n(5,i=e)));let m=k(h,"navbar-component",d);function p(e){let t=e.style.display;n(3,r.style.display="none",r),n(2,l.style.display="none",l),e.style.display="block"==t?"none":"block"}function f(e){localStorage.setItem("locale",e);let t=location.href.split("/"),n=Object.keys(H);t=t.filter((e=>!n.includes(e)));let i=t.slice(0,t.length-1).join("/")+"/"+e+"/"+t[t.length-1];location.href=i}c((()=>{!function(){if("ru"==m){let e=()=>{null==u?setTimeout(e,100):(window.innerWidth<1700&&window.innerWidth>1400||window.innerWidth<400)&&"100%"!=u.style.lineHeight?(n(4,u.style.lineHeight="120%",u),n(4,u.style.top="1rem",u),n(4,u.style.width="16rem",u)):(window.innerWidth>1700||window.innerWidth>400&&window.innerWidth<1400)&&"400%"!=u.style.lineHeight&&(n(4,u.style.lineHeight="400%",u),n(4,u.style.top="0rem",u),n(4,u.style.width="auto",u))};e(),addEventListener("resize",e)}}()}));return[s,o,l,r,u,i,d,h,m,function(){s.checked?n(1,o.style.background="white",o):setTimeout((()=>{n(1,o.style.position="relative",o),n(1,o.style.background="",o),n(1,o.style.boxShadow="",o)}),510)},p,f,function(e){v[e?"unshift":"push"]((()=>{s=e,n(0,s)}))},function(e){v[e?"unshift":"push"]((()=>{u=e,n(4,u)}))},()=>p(r),()=>M(r),function(e){v[e?"unshift":"push"]((()=>{r=e,n(3,r)}))},()=>p(l),()=>M(l),e=>f(e),function(e){v[e?"unshift":"push"]((()=>{l=e,n(2,l)}))},function(e){v[e?"unshift":"push"]((()=>{o=e,n(1,o)}))}]}class E extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,W,s,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("navbar-not-logged",E);export{E as default}; diff --git a/Server/public/js/components/pane-aligner.js b/Server/public/js/components/pane-aligner.js index a74dfec..cc13d76 100644 --- a/Server/public/js/components/pane-aligner.js +++ b/Server/public/js/components/pane-aligner.js @@ -1 +1 @@ -import{S as i,i as e,a as t,b as a,s as n,e as r,c as d,n as s,d as o,f as l,g as m,m as p,o as h,j as g}from"./index-6a7bc1e2.js";import{debounce as f}from"../../../../../../../../../js/libraries/miscTools.js";function c(i){let e,t,n,p,h,g,f,c,u,b;return{c(){e=r("div"),t=r("div"),n=r("div"),p=r("div"),p.innerHTML='',h=d(),g=r("div"),g.innerHTML='',f=d(),c=r("div"),c.innerHTML='',u=d(),b=r("div"),b.innerHTML='',this.c=s,o(p,"id","sidebar-left"),o(g,"id","sidebar-left2"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(c,"id","sidebar-right"),o(c,"class","pane sidebar"),o(b,"id","main-pane"),o(t,"class","pane-container"),o(e,"id","root"),o(e,"class","pane-centering")},m(r,d){a(r,e,d),l(e,t),l(t,n),l(n,p),i[5](p),l(n,h),l(n,g),i[6](g),l(t,f),l(t,c),i[7](c),l(t,u),l(t,b),i[8](b),i[9](e)},p:s,i:s,o:s,d(t){t&&m(e),i[5](null),i[6](null),i[7](null),i[8](null),i[9](null)}}}function u(i,e,t){let a,n,r,d,s,o=null!=p("alignerParent")?p("alignerParent").switchView:void 0,l=!1,m=!1,c=!1;function u(){if(null!=a.parentNode){let i=a.parentNode.host.childNodes;if(0==i.length)setTimeout(u,50);else{let e=!1,n=a.parentNode.innerHTML;for(let t of i)"sidebar-left"!=t.slot||l?"sidebar-left2"!=t.slot||m?"sidebar-right"!=t.slot||c||(n=n.replace("#sidebar-right{display:none;","#sidebar-right{"),c=!0,e=!0):(n=n.replace("#sidebar-left2{display:none}",""),m=!0,e=!0):(n=n.replace("#sidebar-left{display:none}",""),l=!0,e=!0);null!=o&&(n=n.replace("1880px",o),e=!0),e&&t(0,a.parentNode.innerHTML=n,a)}}}return window.addEventListener("resize",f(u,100)),h((()=>{u()})),[a,n,r,d,s,function(i){g[i?"unshift":"push"]((()=>{r=i,t(2,r)}))},function(i){g[i?"unshift":"push"]((()=>{d=i,t(3,d)}))},function(i){g[i?"unshift":"push"]((()=>{s=i,t(4,s)}))},function(i){g[i?"unshift":"push"]((()=>{n=i,t(1,n)}))},function(i){g[i?"unshift":"push"]((()=>{a=i,t(0,a)}))}]}class b extends i{constructor(i){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,c,n,{},null),i&&i.target&&a(i.target,this,i.anchor)}}customElements.define("pane-aligner",b);export{b as default}; +import{S as i,i as e,a as t,b as a,s as n,h as r,j as d,n as s,k as o,l,d as m,g as p,o as h,f as g}from"./index-0d9f0c09.js";import{debounce as f}from"../../../../../../../../../js/libraries/miscTools.js";function c(i){let e,t,n,p,h,g,f,c,u,b;return{c(){e=r("div"),t=r("div"),n=r("div"),p=r("div"),p.innerHTML='',h=d(),g=r("div"),g.innerHTML='',f=d(),c=r("div"),c.innerHTML='',u=d(),b=r("div"),b.innerHTML='',this.c=s,o(p,"id","sidebar-left"),o(g,"id","sidebar-left2"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(c,"id","sidebar-right"),o(c,"class","pane sidebar"),o(b,"id","main-pane"),o(t,"class","pane-container"),o(e,"id","root"),o(e,"class","pane-centering")},m(r,d){a(r,e,d),l(e,t),l(t,n),l(n,p),i[5](p),l(n,h),l(n,g),i[6](g),l(t,f),l(t,c),i[7](c),l(t,u),l(t,b),i[8](b),i[9](e)},p:s,i:s,o:s,d(t){t&&m(e),i[5](null),i[6](null),i[7](null),i[8](null),i[9](null)}}}function u(i,e,t){let a,n,r,d,s,o=null!=p("alignerParent")?p("alignerParent").switchView:void 0,l=!1,m=!1,c=!1;function u(){if(null!=a.parentNode){let i=a.parentNode.host.childNodes;if(0==i.length)setTimeout(u,50);else{let e=!1,n=a.parentNode.innerHTML;for(let t of i)"sidebar-left"!=t.slot||l?"sidebar-left2"!=t.slot||m?"sidebar-right"!=t.slot||c||(n=n.replace("#sidebar-right{display:none;","#sidebar-right{"),c=!0,e=!0):(n=n.replace("#sidebar-left2{display:none}",""),m=!0,e=!0):(n=n.replace("#sidebar-left{display:none}",""),l=!0,e=!0);null!=o&&(n=n.replace("1880px",o),e=!0),e&&t(0,a.parentNode.innerHTML=n,a)}}}return window.addEventListener("resize",f(u,100)),h((()=>{u()})),[a,n,r,d,s,function(i){g[i?"unshift":"push"]((()=>{r=i,t(2,r)}))},function(i){g[i?"unshift":"push"]((()=>{d=i,t(3,d)}))},function(i){g[i?"unshift":"push"]((()=>{s=i,t(4,s)}))},function(i){g[i?"unshift":"push"]((()=>{n=i,t(1,n)}))},function(i){g[i?"unshift":"push"]((()=>{a=i,t(0,a)}))}]}class b extends i{constructor(i){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,c,n,{},null),i&&i.target&&a(i.target,this,i.anchor)}}customElements.define("pane-aligner",b);export{b as default}; diff --git a/Server/public/js/components/parties-add-component.js b/Server/public/js/components/parties-add-component.js index ac0f76d..0ea7051 100644 --- a/Server/public/js/components/parties-add-component.js +++ b/Server/public/js/components/parties-add-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as i,s as o,q as a,n as r,g as s,u as l,o as c,j as m,e as p,c as u,d,v as f,w as g,f as h,l as b,r as w}from"./index-6a7bc1e2.js";import{w as y}from"./index-4da4d0ce.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let e,n,o,a,r,l,c,m,y,v,x,k,j,L,S,z,T,C,N,O,H,M,A,$,q,E,J,U,D,I,P,R,G,K,Q;return{c(){e=p("div"),n=p("div"),o=p("h1"),o.textContent="Add a Party",a=u(),r=p("img"),c=u(),m=p("p"),m.textContent="If there are no parties in your country which you can join then do the following:",y=u(),v=p("ol"),v.innerHTML="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",x=u(),k=p("div"),j=p("label"),j.textContent="Location:",L=u(),S=p("div"),z=p("input"),T=u(),C=p("div"),N=u(),O=p("div"),H=p("label"),H.textContent="Contact:",M=u(),A=p("div"),$=p("input"),q=u(),E=p("div"),J=u(),U=p("button"),U.textContent="Submit",D=u(),I=p("p"),P=u(),R=p("map-component"),d(r,"id","parties-img"),f(r.src,l="/img/common/parties.svg")||d(r,"src","/img/common/parties.svg"),d(r,"alt","parties"),d(m,"class","description"),d(j,"for","address-input"),d(z,"id","address-input"),d(z,"type","text"),z.readOnly=!0,d(C,"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(U,"id","submit-button"),d(I,"id","confirmation-msg"),g(R,"id","map"),g(R,"callback",G=t[15]),d(n,"id","text-container"),d(e,"id","container")},m(s,l){i(s,e,l),h(e,n),h(n,o),h(n,a),h(n,r),h(n,c),h(n,m),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[10](z),h(S,T),h(S,C),h(n,N),h(n,O),h(O,H),h(O,M),h(O,A),h(A,$),t[12]($),h(A,q),h(A,E),h(n,J),h(n,U),h(n,D),h(n,I),t[14](I),h(n,P),h(n,R),K||(Q=[b(z,"input",t[11]),b($,"input",t[13]),b(U,"click",t[9])],K=!0)},p(t,e){16&e&&G!==(G=t[15])&&g(R,"callback",G)},d(n){n&&s(e),t[10](null),t[12](null),t[14](null),K=!1,w(Q)}}}function T(t){let e,n=3==t[3]&&z(t);return{c(){n&&n.c(),e=a()},m(t,o){n&&n.m(t,o),i(t,e,o)},p(t,i){3==t[3]?n?n.p(t,i):(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)}}}function C(t){let e,n=t[3],l=T(t);return{c(){l.c(),e=a(),this.c=r},m(t,n){l.m(t,n),i(t,e,n)},p(t,[i]){8&i&&o(n,n=t[3])?(l.d(1),l=T(t),l.c(),l.m(e.parentNode,e)):l.p(t,i)},i:r,o:r,d(t){t&&s(e),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,e,n){let i,o,a=y(0);l(t,a,(t=>n(3,i=t)));let r,s,p=y({});l(t,p,(t=>n(4,o=t)));let u,d,f,g;v("/assets/parties.json",(t=>{r=JSON.parse(t),s={};for(let t of r){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):s[e]=[t]}a.update((t=>t+1))}));let h=0,b=0,w=function(t,e){let n=new L.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:[41,41]});return L.marker([t,e],{icon:n})}(0,0);w.setOpacity(0);let z=x(p,"parties-component",a);function T(t,e,n){let i,o=""+e.Group+"
    ";for(let a of["location","members","contact"]){let r=e[a]+": ";if("contact"==a)o+=r+""+t.contact+"";else if("location"==a){let a,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?s.map((t=>t)).join(", "):s.map((t=>S(e,t))).join(", "),o+=r+a+"
    ",i=[t.latitude,t.longitude]}else o+=r+t[a]+"
    "}return{text:o,coordinates:i}}function C(t,e,i){let o=t([22,0],2);j(r,s,o,e,i,T,"green"),w.addTo(o),o.on("click",(function(t){let e=t.latlng.lat,i=t.latlng.lng;h=e,b=i,function(t,e,n){let i=L.latLng(e,n);t.setLatLng(i)}(w,e,i),w.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${i}&format=jsonv2`,(t=>{let e=(t=JSON.parse(t)).address,i=e.city||e.town||e.village||e.hamlet,o=e.state,a=e.country;null!=o?a+=", "+o:o="",null!=i?a+=", "+i:i="",n(1,d.value=a,d),N(d)})),function(t,e){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${e}&format=jsonv2&accept-language=en`,(t=>{let e=(t=JSON.parse(t)).address,n=e.city||e.town||e.village||e.hamlet,i=e.state,o=e.country;null!=i||(i=""),null!=n||(n=""),g=[o,i,n]}))}(e,i)}))}function O(t){!1!==t?(n(0,u.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",u),n(0,u.style.color="green",u)):(n(0,u.innerHTML="Something went wrong.",u),n(0,u.style.color="red",u))}x(p,"countries",a),c((()=>{}));return[u,d,f,i,o,a,p,z,C,function(){if(null!=g){let t={country:g[0],state:g[1],town:g[2],latitude:h,longitude:b,contact:f.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+z+"/parties-add-post/",t,O)}},function(t){m[t?"unshift":"push"]((()=>{d=t,n(1,d)}))},()=>N(d),function(t){m[t?"unshift":"push"]((()=>{f=t,n(2,f)}))},()=>N(f),function(t){m[t?"unshift":"push"]((()=>{u=t,n(0,u)}))},t=>C(t,o,z)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,C,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("parties-add-component",H);export{H as default}; +import{S as t,i as e,a as n,b as i,s as o,e as a,n as r,d as s,c as l,o as c,f as m,h as p,j as u,k as d,w as f,x as g,l as h,m as b,r as w}from"./index-0d9f0c09.js";import{w as y}from"./index-1c123138.js";import{getData as v,loadLocaleContent as x,sendData as k}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j,translate as S}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t){let e,n,o,a,r,l,c,m,y,v,x,k,j,L,S,z,T,C,N,O,H,M,A,$,E,J,U,q,D,I,P,R,G,K,Q;return{c(){e=p("div"),n=p("div"),o=p("h1"),o.textContent="Add a Party",a=u(),r=p("img"),c=u(),m=p("p"),m.textContent="If there are no parties in your country which you can join then do the following:",y=u(),v=p("ol"),v.innerHTML="
  • Click on the map to show us where you are located;
  • \n
  • Add a way to contact you or leave blank for a pin to point to our discord;
  • \n
  • Press "Submit" to add yourself to our map;
  • \n
  • Verify yourself by having a chat with us at our Discord server to show on the map;
  • ",x=u(),k=p("div"),j=p("label"),j.textContent="Location:",L=u(),S=p("div"),z=p("input"),T=u(),C=p("div"),N=u(),O=p("div"),H=p("label"),H.textContent="Contact:",M=u(),A=p("div"),$=p("input"),E=u(),J=p("div"),U=u(),q=p("button"),q.textContent="Submit",D=u(),I=p("p"),P=u(),R=p("map-component"),d(r,"id","parties-img"),f(r.src,l="/img/common/parties.svg")||d(r,"src","/img/common/parties.svg"),d(r,"alt","parties"),d(m,"class","description"),d(j,"for","address-input"),d(z,"id","address-input"),d(z,"type","text"),z.readOnly=!0,d(C,"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(J,"class","ghost-input"),d(A,"class","input-wrapper"),d(O,"class","input-label-wrapper"),d(q,"id","submit-button"),d(I,"id","confirmation-msg"),g(R,"id","map"),g(R,"callback",G=t[15]),d(n,"id","text-container"),d(e,"id","container")},m(s,l){i(s,e,l),h(e,n),h(n,o),h(n,a),h(n,r),h(n,c),h(n,m),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[10](z),h(S,T),h(S,C),h(n,N),h(n,O),h(O,H),h(O,M),h(O,A),h(A,$),t[12]($),h(A,E),h(A,J),h(n,U),h(n,q),h(n,D),h(n,I),t[14](I),h(n,P),h(n,R),K||(Q=[b(z,"input",t[11]),b($,"input",t[13]),b(q,"click",t[9])],K=!0)},p(t,e){16&e&&G!==(G=t[15])&&g(R,"callback",G)},d(n){n&&s(e),t[10](null),t[12](null),t[14](null),K=!1,w(Q)}}}function T(t){let e,n=3==t[3]&&z(t);return{c(){n&&n.c(),e=a()},m(t,o){n&&n.m(t,o),i(t,e,o)},p(t,i){3==t[3]?n?n.p(t,i):(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)}}}function C(t){let e,n=t[3],l=T(t);return{c(){l.c(),e=a(),this.c=r},m(t,n){l.m(t,n),i(t,e,n)},p(t,[i]){8&i&&o(n,n=t[3])?(l.d(1),l=T(t),l.c(),l.m(e.parentNode,e)):l.p(t,i)},i:r,o:r,d(t){t&&s(e),l.d(t)}}}function N(t){t.nextElementSibling.innerHTML=t.value}function O(t,e,n){let i,o,a=y(0);l(t,a,(t=>n(3,i=t)));let r,s,p=y({});l(t,p,(t=>n(4,o=t)));let u,d,f,g;v("/assets/parties.json",(t=>{r=JSON.parse(t),s={};for(let t of r){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):s[e]=[t]}a.update((t=>t+1))}));let h=0,b=0,w=function(t,e){let n=new L.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:[41,41]});return L.marker([t,e],{icon:n})}(0,0);w.setOpacity(0);let z=x(p,"parties-component",a);function T(t,e,n){let i,o=""+e.Group+"
    ";for(let a of["location","members","contact"]){let r=e[a]+": ";if("contact"==a)o+=r+""+t.contact+"";else if("location"==a){let a,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?s.map((t=>t)).join(", "):s.map((t=>S(e,t))).join(", "),o+=r+a+"
    ",i=[t.latitude,t.longitude]}else o+=r+t[a]+"
    "}return{text:o,coordinates:i}}function C(t,e,i){let o=t([22,0],2);j(r,s,o,e,i,T,"green"),w.addTo(o),o.on("click",(function(t){let e=t.latlng.lat,i=t.latlng.lng;h=e,b=i,function(t,e,n){let i=L.latLng(e,n);t.setLatLng(i)}(w,e,i),w.setOpacity(1),v(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${i}&format=jsonv2`,(t=>{let e=(t=JSON.parse(t)).address,i=e.city||e.town||e.village||e.hamlet,o=e.state,a=e.country;null!=o?a+=", "+o:o="",null!=i?a+=", "+i:i="",n(1,d.value=a,d),N(d)})),function(t,e){v(`https://nominatim.openstreetmap.org/reverse?lat=${t}&lon=${e}&format=jsonv2&accept-language=en`,(t=>{let e=(t=JSON.parse(t)).address,n=e.city||e.town||e.village||e.hamlet,i=e.state,o=e.country;null!=i||(i=""),null!=n||(n=""),g=[o,i,n]}))}(e,i)}))}function O(t){!1!==t?(n(0,u.innerHTML="You have been added to our database! Now go to our Discord to verify yourself.",u),n(0,u.style.color="green",u)):(n(0,u.innerHTML="Something went wrong.",u),n(0,u.style.color="red",u))}x(p,"countries",a),c((()=>{}));return[u,d,f,i,o,a,p,z,C,function(){if(null!=g){let t={country:g[0],state:g[1],town:g[2],latitude:h,longitude:b,contact:f.value};""==t.state&&(t.state=null),""==t.town&&(t.town=null),""==t.contact&&(t.contact=null),k("/"+z+"/parties-add-post/",t,O)}},function(t){m[t?"unshift":"push"]((()=>{d=t,n(1,d)}))},()=>N(d),function(t){m[t?"unshift":"push"]((()=>{f=t,n(2,f)}))},()=>N(f),function(t){m[t?"unshift":"push"]((()=>{u=t,n(0,u)}))},t=>C(t,o,z)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,C,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("parties-add-component",H);export{H as default}; diff --git a/Server/public/js/components/parties-component.js b/Server/public/js/components/parties-component.js index dbc46f3..17e3550 100644 --- a/Server/public/js/components/parties-component.js +++ b/Server/public/js/components/parties-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as o,s as r,q as i,n as a,g as s,u as m,o as c,e as l,t as p,c as g,d,v as h,w as f,f as u,x as b,y as w}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.js";import{loadLocaleContent as y,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartyPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,y,j,v,k,z,O,T,C,E,R,S,_,q=t[1].parties+"",A=t[1].p1+"",F=t[1].subheading1+"",G=t[1]["map-prompt"]+"",H=Object.entries(t[0]),J=[];for(let e=0;en(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=y(l,"parties-component",i);y(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"gold",{enableCountryGrouping:!0})}j("/assets/parties.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("parties-component",_);export{_ as default}; +import{S as t,i as e,a as n,b as o,s as r,e as i,n as a,d as s,c as m,o as c,h as l,t as p,j as g,k as d,w as h,x as f,l as u,y as b,p as w}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as y,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartyPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,y,j,v,k,z,O,T,C,E,R,S,_,A=t[1].parties+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let e=0;en(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=y(l,"parties-component",i);y(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"gold",{enableCountryGrouping:!0})}j("/assets/parties.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("parties-component",_);export{_ as default}; diff --git a/Server/public/js/components/partners-add-component.js b/Server/public/js/components/partners-add-component.js index 5dfb728..3703f0e 100644 --- a/Server/public/js/components/partners-add-component.js +++ b/Server/public/js/components/partners-add-component.js @@ -1 +1 @@ -import{S as t,i as o,a as n,b as e,s as r,q as a,n as i,g as c,u as s,o as m,e as l,t as p,c as u,d as g,v as d,w as f,f as h,x as b,y as j}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t,o,n){const e=t.slice();return e[13]=o[n][0],e[3]=o[n][1],e}function N(t,o,n){const e=t.slice();return e[16]=o[n],e}function O(t){let o,n,r,a,i,s,m,x,y,w,v,k,N,O,T,E,R,S,_,q,A=t[1].groups+"",C=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let o=0;on(2,r=t)));let i,c,l=x({});s(t,l,(t=>n(1,e=t)));let p=y(l,"groups-component",a);y(l,"countries",a);function u(t,o,n){let e,r=""+o.Group+"
    ";for(let a of["location","members","contact"]){let i=o[a]+": ";if("contact"==a)r+=i+""+t.contact+"";else if("location"==a){let a,c=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?c.map((t=>t)).join(", "):c.map((t=>k(o,t))).join(", "),r+=i+a+"
    ",e=[t.latitude,t.longitude]}else r+=i+t[a]+"
    "}return{text:r,coordinates:e}}function g(t,o,n){let e=t([22,0],2);v(i,c,e,o,n,u,"green")}w("/assets/groups.json",(t=>{n(3,i=JSON.parse(t)),n(0,c={});for(let t of i){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in c?c[o].push(t):n(0,c[o]=[t],c)}a.update((t=>t+1))})),m((()=>{}));return[c,e,r,i,a,l,p,g,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>g(t,e,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("partners-component",_);export{_ as default}; +import{S as t,i as o,a as n,b as e,s as r,e as a,n as i,d as c,c as s,o as m,h as l,t as p,j as u,k as g,w as d,x as f,l as h,y as b,p as j}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k,translate as v}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t,o,n){const e=t.slice();return e[13]=o[n][0],e[3]=o[n][1],e}function N(t,o,n){const e=t.slice();return e[16]=o[n],e}function O(t){let o,n,r,a,i,s,m,x,y,w,k,v,N,O,T,E,R,S,_,A,C=t[1].groups+"",G=t[1].p1+"",H=t[1].subheading1+"",J=t[1]["map-prompt"]+"",K=Object.entries(t[0]),L=[];for(let o=0;on(2,r=t)));let i,c,l=x({});s(t,l,(t=>n(1,e=t)));let p=y(l,"groups-component",a);y(l,"countries",a);function u(t,o,n){let e,r=""+o.Group+"
    ";for(let a of["location","members","contact"]){let i=o[a]+": ";if("contact"==a)r+=i+""+t.contact+"";else if("location"==a){let a,c=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?c.map((t=>t)).join(", "):c.map((t=>v(o,t))).join(", "),r+=i+a+"
    ",e=[t.latitude,t.longitude]}else r+=i+t[a]+"
    "}return{text:r,coordinates:e}}function g(t,o,n){let e=t([22,0],2);k(i,c,e,o,n,u,"green")}w("/assets/groups.json",(t=>{n(3,i=JSON.parse(t)),n(0,c={});for(let t of i){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in c?c[o].push(t):n(0,c[o]=[t],c)}a.update((t=>t+1))})),m((()=>{}));return[c,e,r,i,a,l,p,g,function(t){return"en"==p?t:v(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:v(e,t))).join(", ")},t=>g(t,e,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("partners-component",_);export{_ as default}; diff --git a/Server/public/js/components/partners-component.js b/Server/public/js/components/partners-component.js index 90c03e0..e37760c 100644 --- a/Server/public/js/components/partners-component.js +++ b/Server/public/js/components/partners-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as o,s as r,q as i,n as a,g as s,u as m,o as c,e as l,t as p,c as g,d,v as h,w as u,f,x as b,y as w}from"./index-6a7bc1e2.js";import{w as x}from"./index-4da4d0ce.js";import{loadLocaleContent as j,getData as y}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartnersPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,j,y,v,k,z,O,T,C,E,R,S,_,q=t[1].heading+"",A=t[1].p1+"",F=t[1].subheading1+"",G=t[1]["map-prompt"]+"",H=Object.entries(t[0]),J=[];for(let e=0;en(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=j(l,"partners-component",i);j(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"blue",{enableCountryGrouping:!0})}y("/assets/partners.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class q extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_,R,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("partners-component",q);export{q as default}; +import{S as t,i as e,a as n,b as o,s as r,e as i,n as a,d as s,c as m,o as c,h as l,t as p,j as g,k as d,w as h,x as u,l as f,y as b,p as w}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as j,getData as y}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartnersPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,j,y,v,k,z,O,T,C,E,R,S,_,A=t[1].heading+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let e=0;en(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=j(l,"partners-component",i);j(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"blue",{enableCountryGrouping:!0})}y("/assets/partners.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_,R,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("partners-component",A);export{A as default}; diff --git a/Server/public/js/components/profile-communes.js b/Server/public/js/components/profile-communes.js index 17274a1..0e0da59 100644 --- a/Server/public/js/components/profile-communes.js +++ b/Server/public/js/components/profile-communes.js @@ -1 +1 @@ -import{S as t,i as s,a as e,b as o,s as a,e as r,c as n,n as i,z as c,g as m,o as d}from"./index-6a7bc1e2.js";import"../../../../../../../../../js/libraries/authTools.js";function l(t){let s,e,a;return{c(){s=r("h3"),s.textContent="Under development",e=n(),a=r("p"),a.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your commune to be added.',this.c=i,c(a,"position","relative"),c(a,"margin-top","2rem")},m(t,r){o(t,s,r),o(t,e,r),o(t,a,r)},p:i,i:i,o:i,d(t){t&&m(s),t&&m(e),t&&m(a)}}}function h(t){return d((()=>{})),[]}class p extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,l,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-communes",p);export{p as default}; +import{S as t,i as s,a as e,b as o,s as r,h as a,j as n,n as i,z as c,d,o as m}from"./index-0d9f0c09.js";import"../../../../../../../../../js/libraries/authTools.js";function l(t){let s,e,r;return{c(){s=a("h3"),s.textContent="Under development",e=n(),r=a("p"),r.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your commune to be added.',this.c=i,c(r,"position","relative"),c(r,"margin-top","2rem")},m(t,a){o(t,s,a),o(t,e,a),o(t,r,a)},p:i,i:i,o:i,d(t){t&&d(s),t&&d(e),t&&d(r)}}}function h(t){return m((()=>{})),[]}class p extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,l,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-communes",p);export{p as default}; diff --git a/Server/public/js/components/profile-component.js b/Server/public/js/components/profile-component.js index b2ed090..484580f 100644 --- a/Server/public/js/components/profile-component.js +++ b/Server/public/js/components/profile-component.js @@ -1 +1 @@ -import{S as e,i as t,a as o,b as n,s as i,e as s,c as l,n as r,d as m,f as a,l as u,g as p,r as c,u as d,h as g,o as f,q as h,j as b,z as j}from"./index-6a7bc1e2.js";import{w as y}from"./index-4da4d0ce.js";import*as v from"../../../../../../../../../js/libraries/authTools.js";import{svgFromObject as x}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/pane-aligner.js";import"../../../../../../../../../js/components/profile-general.js";import"../../../../../../../../../js/components/profile-groups.js";import"../../../../../../../../../js/components/profile-communes.js";import"../../../../../../../../../js/components/profile-coops.js";import"../../../../../../../../../js/components/profile-parties.js";import"../../../../../../../../../js/components/groups-add-component.js";function w(e){let t,o,i,m,a,u,c,d,g;return{c(){t=s("profile-general"),o=l(),i=s("profile-groups"),m=l(),a=s("profile-communes"),u=l(),c=s("profile-coops"),d=l(),g=s("profile-parties"),j(t,"display","none"),j(i,"display","none"),j(a,"display","none"),j(c,"display","none"),j(g,"display","none")},m(s,l){n(s,t,l),e[25](t),n(s,o,l),n(s,i,l),e[26](i),n(s,m,l),n(s,a,l),e[27](a),n(s,u,l),n(s,c,l),e[28](c),n(s,d,l),n(s,g,l),e[29](g)},p:r,d(n){n&&p(t),e[25](null),n&&p(o),n&&p(i),e[26](null),n&&p(m),n&&p(a),e[27](null),n&&p(u),n&&p(c),e[28](null),n&&p(d),n&&p(g),e[29](null)}}}function T(e){let t,o=1==e[11]&&w(e);return{c(){o&&o.c(),t=h()},m(e,i){o&&o.m(e,i),n(e,t,i)},p(e,n){1==e[11]?o?o.p(e,n):(o=w(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&p(t)}}}function k(e){let t,o,d,g,f,h,b,j,y,x,w,k,L,H,M,q,E,N=e[11],R=T(e);return{c(){t=s("pane-aligner"),o=s("div"),d=s("button"),d.innerHTML=' \n general',g=l(),f=s("button"),f.innerHTML=' \n groups',h=l(),b=s("button"),b.innerHTML=' \n communes',j=l(),y=s("button"),y.innerHTML=' \n cooperatives',x=l(),w=s("button"),w.innerHTML=' \n parties',k=l(),L=s("button"),L.innerHTML=' \n logout',H=l(),M=s("div"),R.c(),this.c=r,m(L,"id","logout-button"),m(o,"id","left-column"),m(o,"class","pane"),m(o,"slot","sidebar-left"),m(M,"id","main-column"),m(M,"slot","main")},m(i,s){n(i,t,s),a(t,o),a(o,d),e[14](d),a(o,g),a(o,f),e[16](f),a(o,h),a(o,b),e[18](b),a(o,j),a(o,y),e[20](y),a(o,x),a(o,w),e[22](w),a(o,k),a(o,L),e[24](o),a(t,H),a(t,M),R.m(M,null),q||(E=[u(d,"click",e[15]),u(f,"click",e[17]),u(b,"click",e[19]),u(y,"click",e[21]),u(w,"click",e[23]),u(L,"click",v.logout)],q=!0)},p(e,t){2048&t[0]&&i(N,N=e[11])?(R.d(1),R=T(e),R.c(),R.m(M,null)):R.p(e,t)},i:r,o:r,d(o){o&&p(t),e[14](null),e[16](null),e[18](null),e[20](null),e[22](null),e[24](null),R.d(o),q=!1,c(E)}}}function L(e){return null!=e&&null!=e}function H(e,t,o){let n,i,s,l,r,m,a,u,p,c,h,j,w,T;v.redirectNotLogged();let k={},H=y(0);d(e,H,(e=>o(11,n=e)));let M=y(0);function q(e,t){for(let e of u)e.style.display="none";for(let e of T)E(e,400,"#636363");e.style.display="initial",E(t,500,"#c52a28")}function E(e,t,o){let n=e.querySelector("object");if(null==n){setTimeout((()=>E(e,t,o)),100)}else{let i=x(n);if(null==i){setTimeout((()=>E(e,t,o)),100)}else e.style.fontWeight=t,i.setAttribute("fill",o)}}function N(){if(0!=Object.keys(k).length&&null!=i){for(let e of T)E(e,400,"#636363");E(T[0],500,"#c52a28")}else setTimeout(N,100)}function R(){if(u=[s,l,r,m,a],T=[p,c,h,j,w],1==n&&u.every((e=>L(e)))&&T.every((e=>L(e))))u=[s,l,r,m,a],T=[p,c,h,j,w],N(),o(1,s.style.display="initial",s);else{setTimeout((()=>R()),100)}}v.getUser(k,H),g("profile-component",{user:k,maps:{},reloadTrigger:function(){M.update((e=>e+1))}}),f((()=>{R()}));return[i,s,l,r,m,a,p,c,h,j,w,n,H,q,function(e){b[e?"unshift":"push"]((()=>{p=e,o(6,p)}))},()=>q(s,p),function(e){b[e?"unshift":"push"]((()=>{c=e,o(7,c)}))},()=>q(l,c),function(e){b[e?"unshift":"push"]((()=>{h=e,o(8,h)}))},()=>q(r,h),function(e){b[e?"unshift":"push"]((()=>{j=e,o(9,j)}))},()=>q(m,j),function(e){b[e?"unshift":"push"]((()=>{w=e,o(10,w)}))},()=>q(a,w),function(e){b[e?"unshift":"push"]((()=>{i=e,o(0,i)}))},function(e){b[e?"unshift":"push"]((()=>{s=e,o(1,s)}))},function(e){b[e?"unshift":"push"]((()=>{l=e,o(2,l)}))},function(e){b[e?"unshift":"push"]((()=>{r=e,o(3,r)}))},function(e){b[e?"unshift":"push"]((()=>{m=e,o(4,m)}))},function(e){b[e?"unshift":"push"]((()=>{a=e,o(5,a)}))}]}class M extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},H,k,i,{},null,[-1,-1]),e&&e.target&&n(e.target,this,e.anchor)}}customElements.define("profile-component",M);export{M as default}; +import{S as e,i as t,a as o,b as n,s as i,h as s,j as l,n as r,k as m,l as a,m as p,d as u,r as c,c as d,q as g,o as f,e as h,f as b,z as j}from"./index-0d9f0c09.js";import{w as y}from"./index-1c123138.js";import*as v from"../../../../../../../../../js/libraries/authTools.js";import{svgFromObject as x}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/pane-aligner.js";import"../../../../../../../../../js/components/profile-general.js";import"../../../../../../../../../js/components/profile-groups.js";import"../../../../../../../../../js/components/profile-communes.js";import"../../../../../../../../../js/components/profile-coops.js";import"../../../../../../../../../js/components/profile-parties.js";import"../../../../../../../../../js/components/groups-add-component.js";function w(e){let t,o,i,m,a,p,c,d,g;return{c(){t=s("profile-general"),o=l(),i=s("profile-groups"),m=l(),a=s("profile-communes"),p=l(),c=s("profile-coops"),d=l(),g=s("profile-parties"),j(t,"display","none"),j(i,"display","none"),j(a,"display","none"),j(c,"display","none"),j(g,"display","none")},m(s,l){n(s,t,l),e[25](t),n(s,o,l),n(s,i,l),e[26](i),n(s,m,l),n(s,a,l),e[27](a),n(s,p,l),n(s,c,l),e[28](c),n(s,d,l),n(s,g,l),e[29](g)},p:r,d(n){n&&u(t),e[25](null),n&&u(o),n&&u(i),e[26](null),n&&u(m),n&&u(a),e[27](null),n&&u(p),n&&u(c),e[28](null),n&&u(d),n&&u(g),e[29](null)}}}function T(e){let t,o=1==e[11]&&w(e);return{c(){o&&o.c(),t=h()},m(e,i){o&&o.m(e,i),n(e,t,i)},p(e,n){1==e[11]?o?o.p(e,n):(o=w(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&u(t)}}}function k(e){let t,o,d,g,f,h,b,j,y,x,w,k,L,H,M,q,E,N=e[11],R=T(e);return{c(){t=s("pane-aligner"),o=s("div"),d=s("button"),d.innerHTML=' \n general',g=l(),f=s("button"),f.innerHTML=' \n groups',h=l(),b=s("button"),b.innerHTML=' \n communes',j=l(),y=s("button"),y.innerHTML=' \n cooperatives',x=l(),w=s("button"),w.innerHTML=' \n parties',k=l(),L=s("button"),L.innerHTML=' \n logout',H=l(),M=s("div"),R.c(),this.c=r,m(L,"id","logout-button"),m(o,"id","left-column"),m(o,"class","pane"),m(o,"slot","sidebar-left"),m(M,"id","main-column"),m(M,"slot","main")},m(i,s){n(i,t,s),a(t,o),a(o,d),e[14](d),a(o,g),a(o,f),e[16](f),a(o,h),a(o,b),e[18](b),a(o,j),a(o,y),e[20](y),a(o,x),a(o,w),e[22](w),a(o,k),a(o,L),e[24](o),a(t,H),a(t,M),R.m(M,null),q||(E=[p(d,"click",e[15]),p(f,"click",e[17]),p(b,"click",e[19]),p(y,"click",e[21]),p(w,"click",e[23]),p(L,"click",v.logout)],q=!0)},p(e,t){2048&t[0]&&i(N,N=e[11])?(R.d(1),R=T(e),R.c(),R.m(M,null)):R.p(e,t)},i:r,o:r,d(o){o&&u(t),e[14](null),e[16](null),e[18](null),e[20](null),e[22](null),e[24](null),R.d(o),q=!1,c(E)}}}function L(e){return null!=e&&null!=e}function H(e,t,o){let n,i,s,l,r,m,a,p,u,c,h,j,w,T;v.redirectNotLogged();let k={},H=y(0);d(e,H,(e=>o(11,n=e)));let M=y(0);function q(e,t){for(let e of p)e.style.display="none";for(let e of T)E(e,400,"#636363");e.style.display="initial",E(t,500,"#c52a28")}function E(e,t,o){let n=e.querySelector("object");if(null==n){setTimeout((()=>E(e,t,o)),100)}else{let i=x(n);if(null==i){setTimeout((()=>E(e,t,o)),100)}else e.style.fontWeight=t,i.setAttribute("fill",o)}}function N(){if(0!=Object.keys(k).length&&null!=i){for(let e of T)E(e,400,"#636363");E(T[0],500,"#c52a28")}else setTimeout(N,100)}function R(){if(p=[s,l,r,m,a],T=[u,c,h,j,w],1==n&&p.every((e=>L(e)))&&T.every((e=>L(e))))p=[s,l,r,m,a],T=[u,c,h,j,w],N(),o(1,s.style.display="initial",s);else{setTimeout((()=>R()),100)}}v.getUser(k,H),g("profile-component",{user:k,maps:{},reloadTrigger:function(){M.update((e=>e+1))}}),f((()=>{R()}));return[i,s,l,r,m,a,u,c,h,j,w,n,H,q,function(e){b[e?"unshift":"push"]((()=>{u=e,o(6,u)}))},()=>q(s,u),function(e){b[e?"unshift":"push"]((()=>{c=e,o(7,c)}))},()=>q(l,c),function(e){b[e?"unshift":"push"]((()=>{h=e,o(8,h)}))},()=>q(r,h),function(e){b[e?"unshift":"push"]((()=>{j=e,o(9,j)}))},()=>q(m,j),function(e){b[e?"unshift":"push"]((()=>{w=e,o(10,w)}))},()=>q(a,w),function(e){b[e?"unshift":"push"]((()=>{i=e,o(0,i)}))},function(e){b[e?"unshift":"push"]((()=>{s=e,o(1,s)}))},function(e){b[e?"unshift":"push"]((()=>{l=e,o(2,l)}))},function(e){b[e?"unshift":"push"]((()=>{r=e,o(3,r)}))},function(e){b[e?"unshift":"push"]((()=>{m=e,o(4,m)}))},function(e){b[e?"unshift":"push"]((()=>{a=e,o(5,a)}))}]}class M extends e{constructor(e){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},H,k,i,{},null,[-1,-1]),e&&e.target&&n(e.target,this,e.anchor)}}customElements.define("profile-component",M);export{M as default}; diff --git a/Server/public/js/components/profile-coops.js b/Server/public/js/components/profile-coops.js index 3769924..87ad84d 100644 --- a/Server/public/js/components/profile-coops.js +++ b/Server/public/js/components/profile-coops.js @@ -1 +1 @@ -import{S as t,i as s,a as e,b as o,s as a,e as r,c as i,n,z as c,g as d,o as l}from"./index-6a7bc1e2.js";import"../../../../../../../../../js/libraries/authTools.js";function p(t){let s,e,a;return{c(){s=r("h3"),s.textContent="Under development",e=i(),a=r("p"),a.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your cooperative to be added.',this.c=n,c(a,"position","relative"),c(a,"margin-top","2rem")},m(t,r){o(t,s,r),o(t,e,r),o(t,a,r)},p:n,i:n,o:n,d(t){t&&d(s),t&&d(e),t&&d(a)}}}function h(t){return l((()=>{})),[]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,p,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-coops",m);export{m as default}; +import{S as t,i as s,a as e,b as o,s as r,h as a,j as i,n,z as c,d,o as l}from"./index-0d9f0c09.js";import"../../../../../../../../../js/libraries/authTools.js";function p(t){let s,e,r;return{c(){s=a("h3"),s.textContent="Under development",e=i(),r=a("p"),r.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your cooperative to be added.',this.c=n,c(r,"position","relative"),c(r,"margin-top","2rem")},m(t,a){o(t,s,a),o(t,e,a),o(t,r,a)},p:n,i:n,o:n,d(t){t&&d(s),t&&d(e),t&&d(r)}}}function h(t){return l((()=>{})),[]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,p,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-coops",m);export{m as default}; diff --git a/Server/public/js/components/profile-general.js b/Server/public/js/components/profile-general.js index a2dbaa7..396e9e6 100644 --- a/Server/public/js/components/profile-general.js +++ b/Server/public/js/components/profile-general.js @@ -1 +1 @@ -import{S as e,i,a as t,b as n,s,e as o,c as a,t as r,n as l,d,z as c,f as p,l as u,g as m,r as h,m as f,o as g,p as v,j as w}from"./index-6a7bc1e2.js";import*as y from"../../../../../../../../../js/libraries/authTools.js";import"../../../../../../../../../js/components/select-component.js";import"../../../../../../../../../js/components/switch-component.js";function b(e){let i,t,s,f,g,w,y,b,x,j,k,T,I,L,H,M,C,D,E,z,P,R,S,U,V,W,G,O,_,q,A,B,F,J,K,N,Q,X,Y,Z,$,ee,ie=e[13].verified+"";return{c(){i=o("section"),t=o("h2"),t.textContent="General",s=a(),f=o("div"),g=o("div"),w=o("span"),w.textContent="Email:",y=a(),b=o("span"),x=a(),j=o("div"),k=o("button"),k.textContent="save",T=a(),I=o("div"),L=o("input"),H=a(),M=o("div"),C=a(),D=o("div"),E=o("div"),z=o("div"),P=o("span"),P.textContent="Password:",R=a(),S=o("span"),U=a(),V=o("div"),W=o("button"),W.innerHTML='change\n ',G=a(),O=o("div"),_=o("button"),_.textContent="save",q=a(),A=o("input"),B=a(),F=o("button"),F.innerHTML='',J=a(),K=o("div"),N=o("div"),Q=o("span"),Q.textContent="Verified:",X=a(),Y=o("span"),Z=r(ie),this.c=l,d(t,"class","title-highlight"),d(b,"id","signup-email-msg"),d(g,"class","title-msg"),d(k,"id","save-email"),d(k,"class","save-button"),d(L,"id","emailInput"),d(L,"class","text-input"),d(L,"type","text"),d(M,"class","ghost-input"),d(I,"class","input-wrapper"),d(j,"id","emailInputDiv"),d(S,"id","signup-password-msg"),d(z,"class","title-msg"),d(W,"id","change-password"),d(V,"id","change-password-div"),d(E,"id","change-password-line"),d(_,"id","save-password"),d(_,"class","save-button"),d(A,"id","passwordInput"),d(A,"class","text-input"),d(A,"type","password"),d(F,"class","eye-icon"),d(O,"id","change-password-input-div"),d(D,"id","change-password-line-wrapper"),c(Y,"color",e[13].verified?"green":"red"),d(N,"id","verifiedDiv"),d(i,"id","general-section")},m(o,a){n(o,i,a),p(i,t),p(i,s),p(i,f),p(f,g),p(g,w),p(g,y),p(g,b),e[18](b),p(f,x),p(f,j),p(j,k),e[19](k),p(j,T),p(j,I),p(I,L),e[20](L),p(I,H),p(I,M),e[23](j),e[24](f),p(i,C),p(i,D),p(D,E),p(E,z),p(z,P),p(z,R),p(z,S),e[25](S),p(E,U),p(E,V),p(V,W),e[26](V),p(D,G),p(D,O),p(O,_),e[27](_),p(O,q),p(O,A),e[28](A),p(O,B),p(O,F),e[29](F),e[31](O),e[32](D),p(i,J),p(i,K),p(K,N),p(N,Q),p(N,X),p(N,Y),p(Y,Z),e[33](i),$||(ee=[u(k,"click",e[15]),u(L,"click",e[21]),u(L,"input",e[22]),u(f,"mouseenter",(function(){v(e[11].focused=!0)&&(e[11].focused=!0).apply(this,arguments)})),u(f,"mouseleave",(function(){v(e[11].focused=!1)&&(e[11].focused=!1).apply(this,arguments)})),u(W,"click",e[16]),u(_,"click",e[17]),u(F,"click",e[30]),u(D,"mouseenter",(function(){v(e[10].focused=!0)&&(e[10].focused=!0).apply(this,arguments)})),u(D,"mouseleave",(function(){v(e[10].focused=!1)&&(e[10].focused=!1).apply(this,arguments)}))],$=!0)},p(i,t){e=i},i:l,o:l,d(t){t&&m(i),e[18](null),e[19](null),e[20](null),e[23](null),e[24](null),e[25](null),e[26](null),e[27](null),e[28](null),e[29](null),e[31](null),e[32](null),e[33](null),$=!1,h(ee)}}}function x(e,i,t){let n,s,o,a,r,l,d,c,p,u,m,h,v,b,x=f("profile-component").user;function j(e){b=n.value,e.style.display="initial",t(9,u.style.display="inline",u),window.innerWidth<1100&&(t(12,v.style.marginTop="1rem",v),t(11,h.style.flexDirection="column",h))}function k(){null!=b&&t(0,n.value=b,n),t(0,n.style.width="100%",n),t(9,u.style.display="none",u),t(11,h.style.flexDirection="row",h),t(12,v.style.marginTop="0rem",v),t(2,o.style.display="none",o),t(9,u.innerHTML="",u)}function T(){t(3,a.style.display="none",a),t(7,c.style.display="initial",c),t(4,r.innerHTML="",r)}function I(){null!=x&&0!=Object.keys(x).length&&null!=s?t(0,n.value=x.email,n):setTimeout(I,10)}g((()=>{I(),document.addEventListener("click",(function(e){m.focused?k():(h.focused||k(),T())}))}));return[n,s,o,a,r,l,d,c,p,u,m,h,v,x,j,function(){let e=n.value;y.checkEmail(e,u)&&(e!=x.email&&y.changeUser("email",e,x),k())},function(){let e=window.innerWidth;t(3,a.style.display=e<1100?"flex":"initial",a),t(7,c.style.display="none",c),d.focus()},function(){let e=d.value;y.checkPassword(e,r)&&(e!=x.password&&y.changeUser("password",e,x),t(4,r.innerHTML="",r),T())},function(e){w[e?"unshift":"push"]((()=>{u=e,t(9,u)}))},function(e){w[e?"unshift":"push"]((()=>{o=e,t(2,o)}))},function(e){w[e?"unshift":"push"]((()=>{n=e,t(0,n)}))},()=>j(o),()=>{var e;(e=n).nextElementSibling.innerHTML=e.value},function(e){w[e?"unshift":"push"]((()=>{v=e,t(12,v)}))},function(e){w[e?"unshift":"push"]((()=>{h=e,t(11,h)}))},function(e){w[e?"unshift":"push"]((()=>{r=e,t(4,r)}))},function(e){w[e?"unshift":"push"]((()=>{c=e,t(7,c)}))},function(e){w[e?"unshift":"push"]((()=>{l=e,t(5,l)}))},function(e){w[e?"unshift":"push"]((()=>{d=e,t(6,d)}))},function(e){w[e?"unshift":"push"]((()=>{p=e,t(8,p)}))},()=>y.changePasswordVisibility(p),function(e){w[e?"unshift":"push"]((()=>{a=e,t(3,a)}))},function(e){w[e?"unshift":"push"]((()=>{m=e,t(10,m)}))},function(e){w[e?"unshift":"push"]((()=>{s=e,t(1,s)}))}]}class j extends e{constructor(e){super(),this.shadowRoot.innerHTML="",i(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},x,b,s,{},null,[-1,-1]),e&&e.target&&n(e.target,this,e.anchor)}}customElements.define("profile-general",j);export{j as default}; +import{S as e,i,a as t,b as n,s,h as o,j as a,t as r,n as l,k as d,z as c,l as p,m as u,d as m,r as h,g as f,o as g,v,f as w}from"./index-0d9f0c09.js";import*as y from"../../../../../../../../../js/libraries/authTools.js";import"../../../../../../../../../js/components/select-component.js";import"../../../../../../../../../js/components/switch-component.js";function b(e){let i,t,s,f,g,w,y,b,x,j,k,T,I,L,H,M,C,D,E,z,P,R,S,U,V,W,G,O,_,q,A,B,F,J,K,N,Q,X,Y,Z,$,ee,ie=e[13].verified+"";return{c(){i=o("section"),t=o("h2"),t.textContent="General",s=a(),f=o("div"),g=o("div"),w=o("span"),w.textContent="Email:",y=a(),b=o("span"),x=a(),j=o("div"),k=o("button"),k.textContent="save",T=a(),I=o("div"),L=o("input"),H=a(),M=o("div"),C=a(),D=o("div"),E=o("div"),z=o("div"),P=o("span"),P.textContent="Password:",R=a(),S=o("span"),U=a(),V=o("div"),W=o("button"),W.innerHTML='change\n ',G=a(),O=o("div"),_=o("button"),_.textContent="save",q=a(),A=o("input"),B=a(),F=o("button"),F.innerHTML='',J=a(),K=o("div"),N=o("div"),Q=o("span"),Q.textContent="Verified:",X=a(),Y=o("span"),Z=r(ie),this.c=l,d(t,"class","title-highlight"),d(b,"id","signup-email-msg"),d(g,"class","title-msg"),d(k,"id","save-email"),d(k,"class","save-button"),d(L,"id","emailInput"),d(L,"class","text-input"),d(L,"type","text"),d(M,"class","ghost-input"),d(I,"class","input-wrapper"),d(j,"id","emailInputDiv"),d(S,"id","signup-password-msg"),d(z,"class","title-msg"),d(W,"id","change-password"),d(V,"id","change-password-div"),d(E,"id","change-password-line"),d(_,"id","save-password"),d(_,"class","save-button"),d(A,"id","passwordInput"),d(A,"class","text-input"),d(A,"type","password"),d(F,"class","eye-icon"),d(O,"id","change-password-input-div"),d(D,"id","change-password-line-wrapper"),c(Y,"color",e[13].verified?"green":"red"),d(N,"id","verifiedDiv"),d(i,"id","general-section")},m(o,a){n(o,i,a),p(i,t),p(i,s),p(i,f),p(f,g),p(g,w),p(g,y),p(g,b),e[18](b),p(f,x),p(f,j),p(j,k),e[19](k),p(j,T),p(j,I),p(I,L),e[20](L),p(I,H),p(I,M),e[23](j),e[24](f),p(i,C),p(i,D),p(D,E),p(E,z),p(z,P),p(z,R),p(z,S),e[25](S),p(E,U),p(E,V),p(V,W),e[26](V),p(D,G),p(D,O),p(O,_),e[27](_),p(O,q),p(O,A),e[28](A),p(O,B),p(O,F),e[29](F),e[31](O),e[32](D),p(i,J),p(i,K),p(K,N),p(N,Q),p(N,X),p(N,Y),p(Y,Z),e[33](i),$||(ee=[u(k,"click",e[15]),u(L,"click",e[21]),u(L,"input",e[22]),u(f,"mouseenter",(function(){v(e[11].focused=!0)&&(e[11].focused=!0).apply(this,arguments)})),u(f,"mouseleave",(function(){v(e[11].focused=!1)&&(e[11].focused=!1).apply(this,arguments)})),u(W,"click",e[16]),u(_,"click",e[17]),u(F,"click",e[30]),u(D,"mouseenter",(function(){v(e[10].focused=!0)&&(e[10].focused=!0).apply(this,arguments)})),u(D,"mouseleave",(function(){v(e[10].focused=!1)&&(e[10].focused=!1).apply(this,arguments)}))],$=!0)},p(i,t){e=i},i:l,o:l,d(t){t&&m(i),e[18](null),e[19](null),e[20](null),e[23](null),e[24](null),e[25](null),e[26](null),e[27](null),e[28](null),e[29](null),e[31](null),e[32](null),e[33](null),$=!1,h(ee)}}}function x(e,i,t){let n,s,o,a,r,l,d,c,p,u,m,h,v,b,x=f("profile-component").user;function j(e){b=n.value,e.style.display="initial",t(9,u.style.display="inline",u),window.innerWidth<1100&&(t(12,v.style.marginTop="1rem",v),t(11,h.style.flexDirection="column",h))}function k(){null!=b&&t(0,n.value=b,n),t(0,n.style.width="100%",n),t(9,u.style.display="none",u),t(11,h.style.flexDirection="row",h),t(12,v.style.marginTop="0rem",v),t(2,o.style.display="none",o),t(9,u.innerHTML="",u)}function T(){t(3,a.style.display="none",a),t(7,c.style.display="initial",c),t(4,r.innerHTML="",r)}function I(){null!=x&&0!=Object.keys(x).length&&null!=s?t(0,n.value=x.email,n):setTimeout(I,10)}g((()=>{I(),document.addEventListener("click",(function(e){m.focused?k():(h.focused||k(),T())}))}));return[n,s,o,a,r,l,d,c,p,u,m,h,v,x,j,function(){let e=n.value;y.checkEmail(e,u)&&(e!=x.email&&y.changeUser("email",e,x),k())},function(){let e=window.innerWidth;t(3,a.style.display=e<1100?"flex":"initial",a),t(7,c.style.display="none",c),d.focus()},function(){let e=d.value;y.checkPassword(e,r)&&(e!=x.password&&y.changeUser("password",e,x),t(4,r.innerHTML="",r),T())},function(e){w[e?"unshift":"push"]((()=>{u=e,t(9,u)}))},function(e){w[e?"unshift":"push"]((()=>{o=e,t(2,o)}))},function(e){w[e?"unshift":"push"]((()=>{n=e,t(0,n)}))},()=>j(o),()=>{var e;(e=n).nextElementSibling.innerHTML=e.value},function(e){w[e?"unshift":"push"]((()=>{v=e,t(12,v)}))},function(e){w[e?"unshift":"push"]((()=>{h=e,t(11,h)}))},function(e){w[e?"unshift":"push"]((()=>{r=e,t(4,r)}))},function(e){w[e?"unshift":"push"]((()=>{c=e,t(7,c)}))},function(e){w[e?"unshift":"push"]((()=>{l=e,t(5,l)}))},function(e){w[e?"unshift":"push"]((()=>{d=e,t(6,d)}))},function(e){w[e?"unshift":"push"]((()=>{p=e,t(8,p)}))},()=>y.changePasswordVisibility(p),function(e){w[e?"unshift":"push"]((()=>{a=e,t(3,a)}))},function(e){w[e?"unshift":"push"]((()=>{m=e,t(10,m)}))},function(e){w[e?"unshift":"push"]((()=>{s=e,t(1,s)}))}]}class j extends e{constructor(e){super(),this.shadowRoot.innerHTML="",i(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},x,b,s,{},null,[-1,-1]),e&&e.target&&n(e.target,this,e.anchor)}}customElements.define("profile-general",j);export{j as default}; diff --git a/Server/public/js/components/profile-groups.js b/Server/public/js/components/profile-groups.js index 2fdd1c7..6d38eb7 100644 --- a/Server/public/js/components/profile-groups.js +++ b/Server/public/js/components/profile-groups.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as i,s,q as o,n as l,g as r,u as a,m as c,o as u,j as p,A as d,e as m,c as f,t as h,d as g,z as v,f as b,B as y,l as x,p as w,x as k,r as j,y as C}from"./index-6a7bc1e2.js";import{w as z}from"./index-4da4d0ce.js";import{getData as q,sendData as E}from"../../../../../../../../../js/libraries/serverTools.js";import{validatePosNumber as L}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/select-component.js";import"../../../../../../../../../js/components/switch-component.js";function T(t,e,n){const i=t.slice();return i[65]=e[n],i[67]=n,i}function G(t){let e,n,o,l,a,c,u,p,C,z,q,E,L,T,G,M,I,N,O,R,S,_,F,J,U,B,K,Q,D,P,V,W,X,Y,Z,$,tt,et,nt,it,st,ot,lt,rt,at,ct,ut,pt,dt,mt,ft,ht,gt=t[1],vt=A(t);return{c(){e=m("div"),n=m("h2"),n.textContent="Groups",o=f(),l=m("div"),a=m("h3"),a.textContent="My group",c=f(),u=m("span"),p=f(),C=m("section"),z=m("div"),q=m("div"),E=m("span"),E.textContent="Location:",L=f(),T=m("div"),G=m("button"),M=h(t[10]),I=f(),N=m("object"),O=f(),R=m("div"),S=m("div"),_=m("span"),_.textContent="Members:",F=f(),J=m("div"),U=m("div"),B=m("button"),B.textContent="save",K=f(),Q=m("input"),D=f(),P=m("button"),V=m("object"),W=f(),X=m("div"),Y=m("div"),Z=m("span"),Z.textContent="Contact:",$=f(),tt=m("div"),et=m("div"),nt=m("button"),nt.textContent="save",it=f(),st=m("input"),ot=f(),lt=m("button"),rt=m("object"),at=f(),ct=m("h3"),ct.textContent="Requests",ut=f(),pt=m("section"),vt.c(),dt=f(),mt=m("groups-add-component"),g(a,"class","group-heading"),g(u,"class","status"),g(N,"type","image/svg+xml"),g(N,"data","/img/profile/icons/pencil.svg"),g(N,"title","pencil-icon"),g(N,"class","pencil"),g(G,"class","change-field-button"),g(T,"class","change-field-div"),g(q,"class","change-field-line"),g(B,"class","save-button"),v(B,"display","none"),g(U,"class","save-button-wrapper"),g(Q,"id","membersInput"),g(Q,"class","text-input"),g(Q,"type","number"),g(V,"type","image/svg+xml"),g(V,"data","/img/profile/icons/pencil.svg"),g(V,"title","pencil-icon"),g(V,"class","pencil"),g(P,"class","text-input-pencil-button"),g(J,"class","change-field-div input-pencil"),g(S,"class","change-field-line"),g(nt,"class","save-button"),v(nt,"display","none"),g(et,"class","save-button-wrapper"),g(st,"id","contactInput"),g(st,"class","text-input"),g(st,"type","text"),g(rt,"type","image/svg+xml"),g(rt,"data","/img/profile/icons/pencil.svg"),g(rt,"title","pencil-icon"),g(rt,"class","pencil"),g(lt,"class","text-input-pencil-button"),g(tt,"class","change-field-div input-pencil"),g(Y,"class","change-field-line"),g(C,"class","entries-section"),g(pt,"class","entries-section"),v(mt,"display","none")},m(s,r){i(s,e,r),b(e,n),b(e,o),b(e,l),b(l,a),b(l,c),b(l,u),t[28](u),b(e,p),b(e,C),b(C,z),b(z,q),b(q,E),b(q,L),b(q,T),b(T,G),b(G,M),b(G,I),b(G,N),t[29](G),b(C,O),b(C,R),b(R,S),b(S,_),b(S,F),b(S,J),b(J,U),b(U,B),t[30](B),b(J,K),b(J,Q),t[31](Q),y(Q,t[12]),b(J,D),b(J,P),b(P,V),t[35](V),t[36](P),t[38](J),b(C,W),b(C,X),b(X,Y),b(Y,Z),b(Y,$),b(Y,tt),b(tt,et),b(et,nt),t[39](nt),b(tt,it),b(tt,st),t[40](st),y(st,t[11]),b(tt,ot),b(tt,lt),b(lt,rt),t[43](rt),t[44](lt),t[45](tt),t[46](C),b(e,at),b(e,ct),b(e,ut),b(e,pt),vt.m(pt,null),t[49](pt),t[50](e),i(s,dt,r),i(s,mt,r),t[51](mt),ft||(ht=[x(G,"click",t[27]),x(B,"click",t[23]),x(Q,"input",t[32]),x(Q,"click",t[33]),x(Q,"input",t[34]),x(P,"click",t[37]),x(nt,"click",t[24]),x(st,"input",t[41]),x(st,"click",t[42]),x(lt,"click",(function(){w(H(t[7]))&&H(t[7]).apply(this,arguments)}))],ft=!0)},p(e,n){t=e,1024&n[0]&&k(M,t[10]),4096&n[0]&&d(Q.value)!==t[12]&&y(Q,t[12]),2048&n[0]&&st.value!==t[11]&&y(st,t[11]),2&n[0]&&s(gt,gt=t[1])?(vt.d(1),vt=A(t),vt.c(),vt.m(pt,null)):vt.p(t,n)},d(n){n&&r(e),t[28](null),t[29](null),t[30](null),t[31](null),t[35](null),t[36](null),t[38](null),t[39](null),t[40](null),t[43](null),t[44](null),t[45](null),t[46](null),vt.d(n),t[49](null),t[50](null),n&&r(dt),n&&r(mt),t[51](null),ft=!1,j(ht)}}}function M(t){let e,n,s,o,l,a,c,u,p,d,y,w,k=t[65].email+"";function C(){return t[47](t[67],t[65])}function z(){return t[48](t[67],t[65])}return{c(){e=m("div"),n=m("div"),s=m("span"),o=h(k),l=f(),a=m("div"),c=m("button"),c.textContent="approve",u=f(),p=m("button"),p.textContent="reject",d=f(),g(c,"class","approve-button"),g(p,"class","approve-button"),v(p,"display","visible"),g(a,"class","request-button-wrapper"),g(n,"class","change-field-line")},m(t,r){i(t,e,r),b(e,n),b(n,s),b(s,o),b(n,l),b(n,a),b(a,c),b(a,u),b(a,p),b(e,d),y||(w=[x(c,"click",C),x(p,"click",z)],y=!0)},p(e,n){t=e},d(t){t&&r(e),y=!1,j(w)}}}function A(t){let e,n=t[20],s=[];for(let e=0;en(55,t)));let m=z(0);a(t,m,(t=>n(19,i=t)));let f,h,g,v,b,y,x,w,k,j,C,T,G,M,A,I,N,S=0,_={contact:null,members:null},F=c("profile-component"),J=F.maps;function U(t){if(null!=t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>t)).join(", ")}return"Create or join group"}function B(){n(5,v.style.display="none",v),n(12,C=_.members)}function K(){n(8,x.style.display="none",x),n(11,j=_.contact)}function Q(t){null!=t&&n(17,I.innerHTML=U(t),I)}function D(){if(i==O&&[v,x,b,w].every((t=>null!=t&&null!=t)))if(document.addEventListener("click",(function(t){let e,n=this.activeElement.shadowRoot;null!=n&&(e=n.activeElement,n=e.shadowRoot,null!=n&&(e=n.activeElement)),e==g||e==v?K():e==y||e==x?B():(B(),K())})),F.updateUserGroup=Q,n(10,k=U(o[0])),0==o.length)n(11,j=""),n(12,C="");else{let e=o[0];n(11,(t=e.contact,j=null==t?"https://discord.gg/Qk8KUk787z":t)),_.contact=j,n(12,C=e.members),_.members=C;let i=e.status;null!=i&&(0==i?(n(18,N.innerHTML="(pending)",N),n(18,N.style.color="#FFC90E",N)):2==i&&(n(18,N.innerHTML="(rejected)",N),n(18,N.style.color="#c52a28",N)),n(13,T.style.display="none",T),n(14,G.style.display="none",G),n(16,A.style.cursor="default",A),n(15,M.style.cursor="default",M),n(4,g.readOnly=!0,g),n(7,y.readOnly=!0,y))}else{setTimeout((()=>D()),100)}var t}function P(t,e){E("/xx/group-approve-request",{user_id:e}),l.splice(t,1),n(1,S+=1)}function V(t,e){E("/xx/group-reject-request",{user_id:e}),l.splice(t,1),n(1,S+=1)}function W(){n(3,h.style.display="block",h),n(2,f.style.display="none",f),null!=J.groupsAdd&&J.groupsAdd.invalidateSize()}q("/xx/get-user-groups",(function(t){o=JSON.parse(t),F.userGroups=o,m.update((t=>t+1))})),q("/xx/get-group-requests",(function(t){let e=JSON.parse(t);l.push(...e),m.update((t=>t+1))})),F.onLoadedGroups=D,F.launchGroupsAdd=W,F.closeGroupsAdd=function(){n(3,h.style.display="none",h),n(2,f.style.display="block",f)},u((()=>{D()}));return[s,S,f,h,g,v,b,y,x,w,k,j,C,T,G,M,A,I,N,i,l,r,m,function(){let t=parseInt(g.value);E("/xx/group-change",{members:t}),_.members=t,n(5,v.style.display="none",v)},function(){let t=y.value;E("/xx/group-change",{contact:t}),_.contact=t,n(8,x.style.display="none",x)},P,V,W,function(t){p[t?"unshift":"push"]((()=>{N=t,n(18,N)}))},function(t){p[t?"unshift":"push"]((()=>{I=t,n(17,I)}))},function(t){p[t?"unshift":"push"]((()=>{v=t,n(5,v)}))},function(t){p[t?"unshift":"push"]((()=>{g=t,n(4,g)}))},function(){C=d(this.value),n(12,C)},()=>R(v,g),t=>L(t,g,1e4),function(t){p[t?"unshift":"push"]((()=>{T=t,n(13,T)}))},function(t){p[t?"unshift":"push"]((()=>{M=t,n(15,M)}))},()=>{H(g)},function(t){p[t?"unshift":"push"]((()=>{b=t,n(6,b)}))},function(t){p[t?"unshift":"push"]((()=>{x=t,n(8,x)}))},function(t){p[t?"unshift":"push"]((()=>{y=t,n(7,y)}))},function(){j=this.value,n(11,j)},()=>R(x,y),function(t){p[t?"unshift":"push"]((()=>{G=t,n(14,G)}))},function(t){p[t?"unshift":"push"]((()=>{A=t,n(16,A)}))},function(t){p[t?"unshift":"push"]((()=>{w=t,n(9,w)}))},function(t){p[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},(t,e)=>P(t,e.user_id),(t,e)=>V(t,e.user_id),function(t){p[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},function(t){p[t?"unshift":"push"]((()=>{f=t,n(2,f)}))},function(t){p[t?"unshift":"push"]((()=>{h=t,n(3,h)}))}]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,N,s,{},null,[-1,-1,-1]),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("profile-groups",_);export{_ as default}; +import{S as t,i as e,a as n,b as i,s,e as o,n as l,d as r,c as a,g as c,o as u,f as p,A as d,h as f,j as m,t as h,k as g,z as v,l as b,B as y,m as x,v as k,y as w,r as j,p as C}from"./index-0d9f0c09.js";import{w as z}from"./index-1c123138.js";import{getData as E,sendData as L}from"../../../../../../../../../js/libraries/serverTools.js";import{validatePosNumber as T}from"../../../../../../../../../js/libraries/miscTools.js";import"../../../../../../../../../js/components/select-component.js";import"../../../../../../../../../js/components/switch-component.js";function q(t,e,n){const i=t.slice();return i[65]=e[n],i[67]=n,i}function G(t){let e,n,o,l,a,c,u,p,C,z,E,L,T,q,G,M,I,N,O,R,S,_,F,J,U,B,K,Q,D,P,V,W,X,Y,Z,$,tt,et,nt,it,st,ot,lt,rt,at,ct,ut,pt,dt,ft,mt,ht,gt=t[1],vt=A(t);return{c(){e=f("div"),n=f("h2"),n.textContent="Groups",o=m(),l=f("div"),a=f("h3"),a.textContent="My group",c=m(),u=f("span"),p=m(),C=f("section"),z=f("div"),E=f("div"),L=f("span"),L.textContent="Location:",T=m(),q=f("div"),G=f("button"),M=h(t[10]),I=m(),N=f("object"),O=m(),R=f("div"),S=f("div"),_=f("span"),_.textContent="Members:",F=m(),J=f("div"),U=f("div"),B=f("button"),B.textContent="save",K=m(),Q=f("input"),D=m(),P=f("button"),V=f("object"),W=m(),X=f("div"),Y=f("div"),Z=f("span"),Z.textContent="Contact:",$=m(),tt=f("div"),et=f("div"),nt=f("button"),nt.textContent="save",it=m(),st=f("input"),ot=m(),lt=f("button"),rt=f("object"),at=m(),ct=f("h3"),ct.textContent="Requests",ut=m(),pt=f("section"),vt.c(),dt=m(),ft=f("groups-add-component"),g(a,"class","group-heading"),g(u,"class","status"),g(N,"type","image/svg+xml"),g(N,"data","/img/profile/icons/pencil.svg"),g(N,"title","pencil-icon"),g(N,"class","pencil"),g(G,"class","change-field-button"),g(q,"class","change-field-div"),g(E,"class","change-field-line"),g(B,"class","save-button"),v(B,"display","none"),g(U,"class","save-button-wrapper"),g(Q,"id","membersInput"),g(Q,"class","text-input"),g(Q,"type","number"),g(V,"type","image/svg+xml"),g(V,"data","/img/profile/icons/pencil.svg"),g(V,"title","pencil-icon"),g(V,"class","pencil"),g(P,"class","text-input-pencil-button"),g(J,"class","change-field-div input-pencil"),g(S,"class","change-field-line"),g(nt,"class","save-button"),v(nt,"display","none"),g(et,"class","save-button-wrapper"),g(st,"id","contactInput"),g(st,"class","text-input"),g(st,"type","text"),g(rt,"type","image/svg+xml"),g(rt,"data","/img/profile/icons/pencil.svg"),g(rt,"title","pencil-icon"),g(rt,"class","pencil"),g(lt,"class","text-input-pencil-button"),g(tt,"class","change-field-div input-pencil"),g(Y,"class","change-field-line"),g(C,"class","entries-section"),g(pt,"class","entries-section"),v(ft,"display","none")},m(s,r){i(s,e,r),b(e,n),b(e,o),b(e,l),b(l,a),b(l,c),b(l,u),t[28](u),b(e,p),b(e,C),b(C,z),b(z,E),b(E,L),b(E,T),b(E,q),b(q,G),b(G,M),b(G,I),b(G,N),t[29](G),b(C,O),b(C,R),b(R,S),b(S,_),b(S,F),b(S,J),b(J,U),b(U,B),t[30](B),b(J,K),b(J,Q),t[31](Q),y(Q,t[12]),b(J,D),b(J,P),b(P,V),t[35](V),t[36](P),t[38](J),b(C,W),b(C,X),b(X,Y),b(Y,Z),b(Y,$),b(Y,tt),b(tt,et),b(et,nt),t[39](nt),b(tt,it),b(tt,st),t[40](st),y(st,t[11]),b(tt,ot),b(tt,lt),b(lt,rt),t[43](rt),t[44](lt),t[45](tt),t[46](C),b(e,at),b(e,ct),b(e,ut),b(e,pt),vt.m(pt,null),t[49](pt),t[50](e),i(s,dt,r),i(s,ft,r),t[51](ft),mt||(ht=[x(G,"click",t[27]),x(B,"click",t[23]),x(Q,"input",t[32]),x(Q,"click",t[33]),x(Q,"input",t[34]),x(P,"click",t[37]),x(nt,"click",t[24]),x(st,"input",t[41]),x(st,"click",t[42]),x(lt,"click",(function(){k(H(t[7]))&&H(t[7]).apply(this,arguments)}))],mt=!0)},p(e,n){t=e,1024&n[0]&&w(M,t[10]),4096&n[0]&&d(Q.value)!==t[12]&&y(Q,t[12]),2048&n[0]&&st.value!==t[11]&&y(st,t[11]),2&n[0]&&s(gt,gt=t[1])?(vt.d(1),vt=A(t),vt.c(),vt.m(pt,null)):vt.p(t,n)},d(n){n&&r(e),t[28](null),t[29](null),t[30](null),t[31](null),t[35](null),t[36](null),t[38](null),t[39](null),t[40](null),t[43](null),t[44](null),t[45](null),t[46](null),vt.d(n),t[49](null),t[50](null),n&&r(dt),n&&r(ft),t[51](null),mt=!1,j(ht)}}}function M(t){let e,n,s,o,l,a,c,u,p,d,y,k,w=t[65].email+"";function C(){return t[47](t[67],t[65])}function z(){return t[48](t[67],t[65])}return{c(){e=f("div"),n=f("div"),s=f("span"),o=h(w),l=m(),a=f("div"),c=f("button"),c.textContent="approve",u=m(),p=f("button"),p.textContent="reject",d=m(),g(c,"class","approve-button"),g(p,"class","approve-button"),v(p,"display","visible"),g(a,"class","request-button-wrapper"),g(n,"class","change-field-line")},m(t,r){i(t,e,r),b(e,n),b(n,s),b(s,o),b(n,l),b(n,a),b(a,c),b(a,u),b(a,p),b(e,d),y||(k=[x(c,"click",C),x(p,"click",z)],y=!0)},p(e,n){t=e},d(t){t&&r(e),y=!1,j(k)}}}function A(t){let e,n=t[20],s=[];for(let e=0;en(55,t)));let f=z(0);a(t,f,(t=>n(19,i=t)));let m,h,g,v,b,y,x,k,w,j,C,q,G,M,A,I,N,S=0,_={contact:null,members:null},F=c("profile-component"),J=F.maps;function U(t){if(null!=t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>t)).join(", ")}return"Create or join group"}function B(){n(5,v.style.display="none",v),n(12,C=_.members)}function K(){n(8,x.style.display="none",x),n(11,j=_.contact)}function Q(t){null!=t&&n(17,I.innerHTML=U(t),I)}function D(){if(i==O&&[v,x,b,k].every((t=>null!=t&&null!=t)))if(document.addEventListener("click",(function(t){let e,n=this.activeElement.shadowRoot;null!=n&&(e=n.activeElement,n=e.shadowRoot,null!=n&&(e=n.activeElement)),e==g||e==v?K():e==y||e==x?B():(B(),K())})),F.updateUserGroup=Q,n(10,w=U(o[0])),0==o.length)n(11,j=""),n(12,C="");else{let e=o[0];n(11,(t=e.contact,j=null==t?"https://discord.gg/Qk8KUk787z":t)),_.contact=j,n(12,C=e.members),_.members=C;let i=e.status;null!=i&&(0==i?(n(18,N.innerHTML="(pending)",N),n(18,N.style.color="#FFC90E",N)):2==i&&(n(18,N.innerHTML="(rejected)",N),n(18,N.style.color="#c52a28",N)),n(13,q.style.display="none",q),n(14,G.style.display="none",G),n(16,A.style.cursor="default",A),n(15,M.style.cursor="default",M),n(4,g.readOnly=!0,g),n(7,y.readOnly=!0,y))}else{setTimeout((()=>D()),100)}var t}function P(t,e){L("/xx/group-approve-request",{user_id:e}),l.splice(t,1),n(1,S+=1)}function V(t,e){L("/xx/group-reject-request",{user_id:e}),l.splice(t,1),n(1,S+=1)}function W(){n(3,h.style.display="block",h),n(2,m.style.display="none",m),null!=J.groupsAdd&&J.groupsAdd.invalidateSize()}E("/xx/get-user-groups",(function(t){o=JSON.parse(t),F.userGroups=o,f.update((t=>t+1))})),E("/xx/get-group-requests",(function(t){let e=JSON.parse(t);l.push(...e),f.update((t=>t+1))})),F.onLoadedGroups=D,F.launchGroupsAdd=W,F.closeGroupsAdd=function(){n(3,h.style.display="none",h),n(2,m.style.display="block",m)},u((()=>{D()}));return[s,S,m,h,g,v,b,y,x,k,w,j,C,q,G,M,A,I,N,i,l,r,f,function(){let t=parseInt(g.value);L("/xx/group-change",{members:t}),_.members=t,n(5,v.style.display="none",v)},function(){let t=y.value;L("/xx/group-change",{contact:t}),_.contact=t,n(8,x.style.display="none",x)},P,V,W,function(t){p[t?"unshift":"push"]((()=>{N=t,n(18,N)}))},function(t){p[t?"unshift":"push"]((()=>{I=t,n(17,I)}))},function(t){p[t?"unshift":"push"]((()=>{v=t,n(5,v)}))},function(t){p[t?"unshift":"push"]((()=>{g=t,n(4,g)}))},function(){C=d(this.value),n(12,C)},()=>R(v,g),t=>T(t,g,1e4),function(t){p[t?"unshift":"push"]((()=>{q=t,n(13,q)}))},function(t){p[t?"unshift":"push"]((()=>{M=t,n(15,M)}))},()=>{H(g)},function(t){p[t?"unshift":"push"]((()=>{b=t,n(6,b)}))},function(t){p[t?"unshift":"push"]((()=>{x=t,n(8,x)}))},function(t){p[t?"unshift":"push"]((()=>{y=t,n(7,y)}))},function(){j=this.value,n(11,j)},()=>R(x,y),function(t){p[t?"unshift":"push"]((()=>{G=t,n(14,G)}))},function(t){p[t?"unshift":"push"]((()=>{A=t,n(16,A)}))},function(t){p[t?"unshift":"push"]((()=>{k=t,n(9,k)}))},function(t){p[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},(t,e)=>P(t,e.user_id),(t,e)=>V(t,e.user_id),function(t){p[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},function(t){p[t?"unshift":"push"]((()=>{m=t,n(2,m)}))},function(t){p[t?"unshift":"push"]((()=>{h=t,n(3,h)}))}]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,N,s,{},null,[-1,-1,-1]),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("profile-groups",_);export{_ as default}; diff --git a/Server/public/js/components/profile-parties.js b/Server/public/js/components/profile-parties.js index 3315127..c9c4724 100644 --- a/Server/public/js/components/profile-parties.js +++ b/Server/public/js/components/profile-parties.js @@ -1 +1 @@ -import{S as t,i as s,a as e,b as o,s as a,e as r,c as i,n,z as c,g as d,o as l}from"./index-6a7bc1e2.js";import"../../../../../../../../../js/libraries/authTools.js";function p(t){let s,e,a;return{c(){s=r("h3"),s.textContent="Under development",e=i(),a=r("p"),a.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your party to be added.',this.c=n,c(a,"position","relative"),c(a,"margin-top","2rem")},m(t,r){o(t,s,r),o(t,e,r),o(t,a,r)},p:n,i:n,o:n,d(t){t&&d(s),t&&d(e),t&&d(a)}}}function h(t){return l((()=>{})),[]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,p,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-parties",m);export{m as default}; +import{S as t,i as s,a as e,b as o,s as r,h as a,j as i,n,z as c,d,o as l}from"./index-0d9f0c09.js";import"../../../../../../../../../js/libraries/authTools.js";function p(t){let s,e,r;return{c(){s=a("h3"),s.textContent="Under development",e=i(),r=a("p"),r.innerHTML='Visit https://discord.gg/Qk8KUk787z and ask for your party to be added.',this.c=n,c(r,"position","relative"),c(r,"margin-top","2rem")},m(t,a){o(t,s,a),o(t,e,a),o(t,r,a)},p:n,i:n,o:n,d(t){t&&d(s),t&&d(e),t&&d(r)}}}function h(t){return l((()=>{})),[]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},h,p,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("profile-parties",m);export{m as default}; diff --git a/Server/public/js/components/reset-password-component.js b/Server/public/js/components/reset-password-component.js index a0980fd..706c65d 100644 --- a/Server/public/js/components/reset-password-component.js +++ b/Server/public/js/components/reset-password-component.js @@ -1 +1 @@ -import{S as t,i as e,a as s,b as a,s as o,e as i,n,d as r,g as c,o as m}from"./index-6a7bc1e2.js";function d(t){let e;return{c(){e=i("div"),e.innerHTML='

    Contact us at our Discord Server. We are going to send a new password to the email that you used for registration.

    ',this.c=n,r(e,"id","container")},m(t,s){a(t,e,s)},p:n,i:n,o:n,d(t){t&&c(e)}}}function u(t){return m((()=>{})),[]}class p extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},u,d,o,{},null),t&&t.target&&a(t.target,this,t.anchor)}}customElements.define("reset-password-component",p);export{p as default}; +import{S as t,i as e,a as s,b as o,s as a,h as i,n,k as r,d as c,o as m}from"./index-0d9f0c09.js";function d(t){let e;return{c(){e=i("div"),e.innerHTML='

    Contact us at our Discord Server. We are going to send a new password to the email that you used for registration.

    ',this.c=n,r(e,"id","container")},m(t,s){o(t,e,s)},p:n,i:n,o:n,d(t){t&&c(e)}}}function u(t){return m((()=>{})),[]}class p extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},u,d,a,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("reset-password-component",p);export{p as default}; diff --git a/Server/public/js/components/select-component.js b/Server/public/js/components/select-component.js index 68bcb54..ce6c821 100644 --- a/Server/public/js/components/select-component.js +++ b/Server/public/js/components/select-component.js @@ -1 +1 @@ -import{S as t,i as e,a as r,b as i,k as o,s as n,e as l,n as s,d as a,g as d,o as u,t as c,c as h,v as p,z as f,f as m,l as v,x as b,y as g,j as w}from"./index-6a7bc1e2.js";import{px2rem as y,getTextWidth as x,getCanvasFont as $}from"../../../../../../../../../js/libraries/miscTools.js";function k(t,e,r){const i=t.slice();return i[26]=e[r],i[27]=e,i[28]=r,i}function z(t){let e,r,o,n,s,a,u=t[26]+"",p=t[28];const f=()=>t[14](e,p),g=()=>t[14](null,p);function w(){return t[15](t[28])}return{c(){e=l("button"),r=l("span"),o=c(u),n=h(),e.value=t[28]},m(t,l){i(t,e,l),m(e,r),m(r,o),m(e,n),f(),s||(a=v(e,"click",w),s=!0)},p(e,r){t=e,4&r&&u!==(u=t[26]+"")&&b(o,u),p!==t[28]&&(g(),p=t[28],f())},d(t){t&&d(e),g(),s=!1,a()}}}function L(t){let e,r,o,n,s,u,w,y,x,$,L,j=(null!=t[0]?t[0]:"")+"",M=t[2],T=[];for(let e=0;ee==t));r(6,n.innerHTML=t,n),r(5,p[i].style.display="none",p),r(11,c=i)}r(8,f+=1)}}function b(t,e){null!=t&&null!=e&&e[t]!=d&&(r(0,d=e[t]),r(8,f+=1))}function g(){"none"==o.style.display?r(4,o.style.display="initial",o):r(4,o.style.display="none",o)}function k(t,e){r(11,c=t),r(0,d=a[t]),null!=e&&null!=e&&e(t)}function z(){r(4,o.style.display="none",o)}function L(t,e){let r;if(null!=t&&null!=e){let i=getComputedStyle(t).getPropertyValue("--width");if(isNaN(i)||""==i){if(null==m)return m=new ResizeObserver((()=>L(t,e))),void m.observe(l);i=getComputedStyle(l).getPropertyValue("width"),r=y(parseFloat(i.slice(0,i.length-2)))}else r=parseFloat(i.slice(0,i.length-2));let o=[];for(let t=0;tr){let t=1.1*n+"rem";e.style.width=t;for(let r=0;r{n=t,r(6,n)}))}function M(t){w[t?"unshift":"push"]((()=>{l=t,r(7,l)}))}function T(t,e){w[t?"unshift":"push"]((()=>{p[e]=t,r(5,p)}))}u((()=>{h.addEventListener("focusout",z)}));const E=t=>k(t,s);function H(t){w[t?"unshift":"push"]((()=>{o=t,r(4,o)}))}function R(t){w[t?"unshift":"push"]((()=>{i=t,r(3,i)}))}return t.$$set=t=>{"callback"in t&&r(1,s=t.callback),"options"in t&&r(2,a=t.options),"value"in t&&r(0,d=t.value),"valueindex"in t&&r(11,c=t.valueindex)},t.$$.update=()=>{5&t.$$.dirty&&v(d,a),2052&t.$$.dirty&&b(c,a),24&t.$$.dirty&&L(i,o)},[d,s,a,i,o,p,n,l,f,g,k,c,j,M,T,E,H,R]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},M,j,n,{callback:1,options:2,value:0,valueindex:11},null),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","options","value","valueindex"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}get options(){return this.$$.ctx[2]}set options(t){this.$$set({options:t}),o()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),o()}get valueindex(){return this.$$.ctx[11]}set valueindex(t){this.$$set({valueindex:t}),o()}}customElements.define("select-component",T);export{T as default}; +import{S as t,i as e,a as r,b as i,u as o,s as n,h as l,n as s,k as a,d,o as u,t as c,j as h,w as p,z as f,l as m,m as v,y as b,p as g,f as w}from"./index-0d9f0c09.js";import{px2rem as y,getTextWidth as x,getCanvasFont as $}from"../../../../../../../../../js/libraries/miscTools.js";function k(t,e,r){const i=t.slice();return i[26]=e[r],i[27]=e,i[28]=r,i}function z(t){let e,r,o,n,s,a,u=t[26]+"",p=t[28];const f=()=>t[14](e,p),g=()=>t[14](null,p);function w(){return t[15](t[28])}return{c(){e=l("button"),r=l("span"),o=c(u),n=h(),e.value=t[28]},m(t,l){i(t,e,l),m(e,r),m(r,o),m(e,n),f(),s||(a=v(e,"click",w),s=!0)},p(e,r){t=e,4&r&&u!==(u=t[26]+"")&&b(o,u),p!==t[28]&&(g(),p=t[28],f())},d(t){t&&d(e),g(),s=!1,a()}}}function L(t){let e,r,o,n,s,u,w,y,x,$,L,j=(null!=t[0]?t[0]:"")+"",M=t[2],T=[];for(let e=0;ee==t));r(6,n.innerHTML=t,n),r(5,p[i].style.display="none",p),r(11,c=i)}r(8,f+=1)}}function b(t,e){null!=t&&null!=e&&e[t]!=d&&(r(0,d=e[t]),r(8,f+=1))}function g(){"none"==o.style.display?r(4,o.style.display="initial",o):r(4,o.style.display="none",o)}function k(t,e){r(11,c=t),r(0,d=a[t]),null!=e&&null!=e&&e(t)}function z(){r(4,o.style.display="none",o)}function L(t,e){let r;if(null!=t&&null!=e){let i=getComputedStyle(t).getPropertyValue("--width");if(isNaN(i)||""==i){if(null==m)return m=new ResizeObserver((()=>L(t,e))),void m.observe(l);i=getComputedStyle(l).getPropertyValue("width"),r=y(parseFloat(i.slice(0,i.length-2)))}else r=parseFloat(i.slice(0,i.length-2));let o=[];for(let t=0;tr){let t=1.1*n+"rem";e.style.width=t;for(let r=0;r{n=t,r(6,n)}))}function M(t){w[t?"unshift":"push"]((()=>{l=t,r(7,l)}))}function T(t,e){w[t?"unshift":"push"]((()=>{p[e]=t,r(5,p)}))}u((()=>{h.addEventListener("focusout",z)}));const E=t=>k(t,s);function H(t){w[t?"unshift":"push"]((()=>{o=t,r(4,o)}))}function R(t){w[t?"unshift":"push"]((()=>{i=t,r(3,i)}))}return t.$$set=t=>{"callback"in t&&r(1,s=t.callback),"options"in t&&r(2,a=t.options),"value"in t&&r(0,d=t.value),"valueindex"in t&&r(11,c=t.valueindex)},t.$$.update=()=>{5&t.$$.dirty&&v(d,a),2052&t.$$.dirty&&b(c,a),24&t.$$.dirty&&L(i,o)},[d,s,a,i,o,p,n,l,f,g,k,c,j,M,T,E,H,R]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},M,j,n,{callback:1,options:2,value:0,valueindex:11},null),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","options","value","valueindex"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}get options(){return this.$$.ctx[2]}set options(t){this.$$set({options:t}),o()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),o()}get valueindex(){return this.$$.ctx[11]}set valueindex(t){this.$$set({valueindex:t}),o()}}customElements.define("select-component",T);export{T as default}; diff --git a/Server/public/js/components/signup-component.js b/Server/public/js/components/signup-component.js index 0cfc776..93db225 100644 --- a/Server/public/js/components/signup-component.js +++ b/Server/public/js/components/signup-component.js @@ -1 +1 @@ -import{S as t,i as e,a as n,b as s,k as i,s as r,e as a,c as o,n as l,d as u,f as p,l as c,g as d,r as m,m as f,o as h,p as g,j as b}from"./index-6a7bc1e2.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function x(t){let e,n,i,r,f,h,b,x,v,y,k,E,I,C,P,L,j,$,T,S,z,H,M,B,R,N,A,G,U,V,W,X,_,q,D,F,J,K,O,Q,Y,Z;return{c(){e=a("div"),n=a("h2"),n.textContent="SIGN UP",i=o(),r=a("label"),r.textContent="Email ",f=a("span"),h=o(),b=a("input"),x=o(),v=a("div"),y=a("label"),y.textContent="Password ",k=a("span"),E=o(),I=a("input"),C=o(),P=a("button"),P.innerHTML='',L=o(),j=a("div"),$=a("input"),T=a("label"),T.textContent="remember me",S=o(),z=a("button"),z.textContent="Sign up",H=o(),M=a("p"),B=o(),R=a("div"),N=a("button"),A=o(),G=a("div"),U=a("h2"),U.textContent="Registration is closed",V=o(),W=a("p"),W.textContent="We are still in the process of opening.",X=o(),_=a("p"),_.textContent="Sign up for updates to know when it becomes available:",q=o(),D=a("div"),F=a("input"),J=o(),K=a("button"),K.textContent="sign up",O=o(),Q=a("button"),Q.textContent="No thanks",this.c=l,u(n,"class","auth-title"),u(r,"class","auth-label"),u(r,"for","emailInput"),u(f,"id","email-msg"),u(b,"id","emailInput"),u(b,"class","authEmailInput"),u(b,"type","email"),u(y,"class","auth-label"),u(y,"for","emailInput"),u(k,"id","password-msg"),u(I,"id","passwordInput"),u(I,"class","authPasswordInput"),u(I,"type","password"),u(P,"class","eye-icon"),u(v,"class","password-field"),u($,"type","checkbox"),u($,"id","remember-me-checkbox"),u(T,"id","remember-me-label"),u(T,"for","passwordInput"),u(j,"id","remember-me"),u(z,"class","auth-button"),u(M,"id","forgot-password"),u(e,"id","signup-group"),u(e,"class","pane auth-pane"),u(N,"id","shadow"),u(F,"id","newsletterEmailInput"),u(F,"type","text"),u(K,"id","newsletterEmailButton"),u(D,"id","newsletter-container"),u(Q,"id","no-button"),u(G,"id","wrapper"),u(G,"class","pane"),u(R,"id","dialog")},m(a,o){s(a,e,o),p(e,n),p(e,i),p(e,r),p(e,f),t[16](f),p(e,h),p(e,b),t[18](b),p(e,x),p(e,v),p(v,y),p(v,k),t[19](k),p(v,E),p(v,I),t[20](I),p(v,C),p(v,P),t[22](P),p(e,L),p(e,j),p(j,$),t[24]($),p(j,T),p(e,S),p(e,z),p(e,H),p(e,M),t[25](e),s(a,B,o),s(a,R,o),p(R,N),p(R,A),p(R,G),p(G,U),p(G,V),p(G,W),p(G,X),p(G,_),p(G,q),p(G,D),p(D,F),t[26](F),p(D,J),p(D,K),t[27](K),p(G,O),p(G,Q),t[28](R),Y||(Z=[c(f,"change",t[17]),c(I,"change",t[21]),c(P,"click",t[23]),c(z,"click",(function(){g(w.signup(t[7],t[4],w.toLandingPage))&&w.signup(t[7],t[4],w.toLandingPage).apply(this,arguments)})),c(N,"click",t[12]),c(F,"click",t[14]),c(K,"click",t[13]),c(Q,"click",t[12])],Y=!0)},p(e,n){t=e},i:l,o:l,d(n){n&&d(e),t[16](null),t[18](null),t[19](null),t[20](null),t[22](null),t[24](null),t[25](null),n&&d(B),n&&d(R),t[26](null),t[27](null),t[28](null),Y=!1,m(Z)}}}function v(t){""!=t.innerHTML&&(t.innerHTML="")}function y(t,e,n){let s,i,r,a,o,l,u,p,c,d,m,g,{focused:x=!1}=e;f("auth"),h((()=>{n(8,c.checked=!0,c),n(4,o={email:i,password:r}),n(7,p={email:l,password:u}),document.addEventListener("keypress",(function(t){"Enter"==t.code&&x&&w.signup(p,o,toLandingPage)}))}));return t.$$set=t=>{"focused"in t&&n(15,x=t.focused)},[s,i,r,a,o,l,u,p,c,d,m,g,function(){null!=d&&n(9,d.style.display="none",d)},function(){let t=g.value;t.includes("@")?(sendText("/get-email",t),n(11,g.value="",g),n(11,g.placeholder="Subscribed!",g),g.style.setProperty("--c","hsl(147, 33%, 60%)")):(n(11,g.value="",g),n(11,g.placeholder="must contain '@'",g),g.style.setProperty("--c","hsl(0, 100%, 60%)"))},function(){n(11,g.placeholder="",g)},x,function(t){b[t?"unshift":"push"]((()=>{l=t,n(5,l)}))},()=>v(l),function(t){b[t?"unshift":"push"]((()=>{i=t,n(1,i)}))},function(t){b[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t){b[t?"unshift":"push"]((()=>{r=t,n(2,r)}))},()=>v(u),function(t){b[t?"unshift":"push"]((()=>{a=t,n(3,a)}))},()=>w.changePasswordVisibility(a),function(t){b[t?"unshift":"push"]((()=>{c=t,n(8,c)}))},function(t){b[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},function(t){b[t?"unshift":"push"]((()=>{g=t,n(11,g)}))},function(t){b[t?"unshift":"push"]((()=>{m=t,n(10,m)}))},function(t){b[t?"unshift":"push"]((()=>{d=t,n(9,d)}))}]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},y,x,r,{focused:15},null,[-1,-1]),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[15]}set focused(t){this.$$set({focused:t}),i()}}customElements.define("signup-component",k);export{k as default}; +import{S as t,i as e,a as n,b as s,u as i,s as r,h as a,j as o,n as l,k as u,l as d,m as p,d as c,r as m,g as f,o as h,v as g,f as b}from"./index-0d9f0c09.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function v(t){let e,n,i,r,f,h,b,v,x,y,k,E,I,C,P,L,j,$,T,S,z,H,M,B,R,N,A,G,U,V,W,X,_,q,D,F,J,K,O,Q,Y,Z;return{c(){e=a("div"),n=a("h2"),n.textContent="SIGN UP",i=o(),r=a("label"),r.textContent="Email ",f=a("span"),h=o(),b=a("input"),v=o(),x=a("div"),y=a("label"),y.textContent="Password ",k=a("span"),E=o(),I=a("input"),C=o(),P=a("button"),P.innerHTML='',L=o(),j=a("div"),$=a("input"),T=a("label"),T.textContent="remember me",S=o(),z=a("button"),z.textContent="Sign up",H=o(),M=a("p"),B=o(),R=a("div"),N=a("button"),A=o(),G=a("div"),U=a("h2"),U.textContent="Registration is closed",V=o(),W=a("p"),W.textContent="We are still in the process of opening.",X=o(),_=a("p"),_.textContent="Sign up for updates to know when it becomes available:",q=o(),D=a("div"),F=a("input"),J=o(),K=a("button"),K.textContent="sign up",O=o(),Q=a("button"),Q.textContent="No thanks",this.c=l,u(n,"class","auth-title"),u(r,"class","auth-label"),u(r,"for","emailInput"),u(f,"id","email-msg"),u(b,"id","emailInput"),u(b,"class","authEmailInput"),u(b,"type","email"),u(y,"class","auth-label"),u(y,"for","emailInput"),u(k,"id","password-msg"),u(I,"id","passwordInput"),u(I,"class","authPasswordInput"),u(I,"type","password"),u(P,"class","eye-icon"),u(x,"class","password-field"),u($,"type","checkbox"),u($,"id","remember-me-checkbox"),u(T,"id","remember-me-label"),u(T,"for","passwordInput"),u(j,"id","remember-me"),u(z,"class","auth-button"),u(M,"id","forgot-password"),u(e,"id","signup-group"),u(e,"class","pane auth-pane"),u(N,"id","shadow"),u(F,"id","newsletterEmailInput"),u(F,"type","text"),u(K,"id","newsletterEmailButton"),u(D,"id","newsletter-container"),u(Q,"id","no-button"),u(G,"id","wrapper"),u(G,"class","pane"),u(R,"id","dialog")},m(a,o){s(a,e,o),d(e,n),d(e,i),d(e,r),d(e,f),t[16](f),d(e,h),d(e,b),t[18](b),d(e,v),d(e,x),d(x,y),d(x,k),t[19](k),d(x,E),d(x,I),t[20](I),d(x,C),d(x,P),t[22](P),d(e,L),d(e,j),d(j,$),t[24]($),d(j,T),d(e,S),d(e,z),d(e,H),d(e,M),t[25](e),s(a,B,o),s(a,R,o),d(R,N),d(R,A),d(R,G),d(G,U),d(G,V),d(G,W),d(G,X),d(G,_),d(G,q),d(G,D),d(D,F),t[26](F),d(D,J),d(D,K),t[27](K),d(G,O),d(G,Q),t[28](R),Y||(Z=[p(f,"change",t[17]),p(I,"change",t[21]),p(P,"click",t[23]),p(z,"click",(function(){g(w.signup(t[7],t[4],w.toLandingPage))&&w.signup(t[7],t[4],w.toLandingPage).apply(this,arguments)})),p(N,"click",t[12]),p(F,"click",t[14]),p(K,"click",t[13]),p(Q,"click",t[12])],Y=!0)},p(e,n){t=e},i:l,o:l,d(n){n&&c(e),t[16](null),t[18](null),t[19](null),t[20](null),t[22](null),t[24](null),t[25](null),n&&c(B),n&&c(R),t[26](null),t[27](null),t[28](null),Y=!1,m(Z)}}}function x(t){""!=t.innerHTML&&(t.innerHTML="")}function y(t,e,n){let s,i,r,a,o,l,u,d,p,c,m,g,{focused:v=!1}=e;f("auth"),h((()=>{n(8,p.checked=!0,p),n(4,o={email:i,password:r}),n(7,d={email:l,password:u}),document.addEventListener("keypress",(function(t){"Enter"==t.code&&v&&w.signup(d,o,toLandingPage)}))}));return t.$$set=t=>{"focused"in t&&n(15,v=t.focused)},[s,i,r,a,o,l,u,d,p,c,m,g,function(){null!=c&&n(9,c.style.display="none",c)},function(){let t=g.value;t.includes("@")?(sendText("/get-email",t),n(11,g.value="",g),n(11,g.placeholder="Subscribed!",g),g.style.setProperty("--c","hsl(147, 33%, 60%)")):(n(11,g.value="",g),n(11,g.placeholder="must contain '@'",g),g.style.setProperty("--c","hsl(0, 100%, 60%)"))},function(){n(11,g.placeholder="",g)},v,function(t){b[t?"unshift":"push"]((()=>{l=t,n(5,l)}))},()=>x(l),function(t){b[t?"unshift":"push"]((()=>{i=t,n(1,i)}))},function(t){b[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t){b[t?"unshift":"push"]((()=>{r=t,n(2,r)}))},()=>x(u),function(t){b[t?"unshift":"push"]((()=>{a=t,n(3,a)}))},()=>w.changePasswordVisibility(a),function(t){b[t?"unshift":"push"]((()=>{p=t,n(8,p)}))},function(t){b[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},function(t){b[t?"unshift":"push"]((()=>{g=t,n(11,g)}))},function(t){b[t?"unshift":"push"]((()=>{m=t,n(10,m)}))},function(t){b[t?"unshift":"push"]((()=>{c=t,n(9,c)}))}]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},y,v,r,{focused:15},null,[-1,-1]),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[15]}set focused(t){this.$$set({focused:t}),i()}}customElements.define("signup-component",k);export{k as default}; diff --git a/Server/public/js/components/switch-component.js b/Server/public/js/components/switch-component.js index 6503a29..f687840 100644 --- a/Server/public/js/components/switch-component.js +++ b/Server/public/js/components/switch-component.js @@ -1 +1 @@ -import{S as t,i as e,a as s,b as c,k as a,s as i,e as r,c as o,n as h,d as n,f as l,l as d,g as p,r as u,o as b}from"./index-6a7bc1e2.js";import"../../../../../../../../../js/libraries/miscTools.js";function k(t){let e,s,a,i,b,k;return{c(){e=r("label"),s=r("input"),a=o(),i=r("span"),this.c=h,n(s,"type","checkbox"),n(i,"class","switch-span"),n(e,"class","switch")},m(r,o){c(r,e,o),l(e,s),s.checked=t[0],l(e,a),l(e,i),b||(k=[d(s,"change",t[4]),d(s,"click",t[1])],b=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:h,o:h,d(t){t&&p(e),b=!1,u(k)}}}function g(t,e,s){let{callback:c=null}=e,{checked:a=!1}=e;const i=()=>{setTimeout((()=>{null!=c?(s(0,a=!a),c()):i()}),100)};return b((()=>{})),t.$$set=t=>{"callback"in t&&s(2,c=t.callback),"checked"in t&&s(0,a=t.checked)},[a,function(){null!=c&&(s(0,a=!a),c())},c,i,function(){a=this.checked,s(0,a)}]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},g,k,i,{callback:2,checked:0,toggle:3},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),a()))}static get observedAttributes(){return["callback","checked","toggle"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),a()}get checked(){return this.$$.ctx[0]}set checked(t){this.$$set({checked:t}),a()}get toggle(){return this.$$.ctx[3]}}customElements.define("switch-component",m);export{m as default}; +import{S as t,i as e,a as s,b as c,u as i,s as a,h as r,j as o,n as h,k as n,l,m as d,d as u,r as p,o as k}from"./index-0d9f0c09.js";import"../../../../../../../../../js/libraries/miscTools.js";function b(t){let e,s,i,a,k,b;return{c(){e=r("label"),s=r("input"),i=o(),a=r("span"),this.c=h,n(s,"type","checkbox"),n(a,"class","switch-span"),n(e,"class","switch")},m(r,o){c(r,e,o),l(e,s),s.checked=t[0],l(e,i),l(e,a),k||(b=[d(s,"change",t[4]),d(s,"click",t[1])],k=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:h,o:h,d(t){t&&u(e),k=!1,p(b)}}}function m(t,e,s){let{callback:c=null}=e,{checked:i=!1}=e;const a=()=>{setTimeout((()=>{null!=c?(s(0,i=!i),c()):a()}),100)};return k((()=>{})),t.$$set=t=>{"callback"in t&&s(2,c=t.callback),"checked"in t&&s(0,i=t.checked)},[i,function(){null!=c&&(s(0,i=!i),c())},c,a,function(){i=this.checked,s(0,i)}]}class g extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},m,b,a,{callback:2,checked:0,toggle:3},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["callback","checked","toggle"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),i()}get checked(){return this.$$.ctx[0]}set checked(t){this.$$set({checked:t}),i()}get toggle(){return this.$$.ctx[3]}}customElements.define("switch-component",g);export{g as default};