site-libsoc/Server/public/js/components/communes-component.js

2 lines
5.5 KiB
JavaScript
Raw Normal View History

2023-08-06 01:06:36 +07:00
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;n<K.length;n+=1)L[n]=D(N(t,K,n));return{c(){n=l("div"),o=l("div"),r=l("h1"),m=p(F),s=u(),c=l("img"),x=u(),y=l("p"),w=p(G),v=u(),k=l("h3"),z=p(H),O=u(),T=l("map-component"),E=u(),R=l("p"),S=p(J),A=u();for(let t=0;t<L.length;t+=1)L[t].c();d(c,"id","communes-img"),g(c.src,i="/img/common/communes.svg")||d(c,"src","/img/common/communes.svg"),d(c,"alt","commune"),d(y,"class","description"),f(T,"id","map"),f(T,"callback",C=t[10]),d(R,"id","add-prompt"),d(o,"id","text-container"),d(n,"id","container")},m(t,a){e(t,n,a),h(n,o),h(o,r),h(r,m),h(o,s),h(o,c),h(o,x),h(o,y),h(y,w),h(o,v),h(o,k),h(k,z),h(o,O),h(o,T),h(o,E),h(o,R),h(R,S),h(o,A);for(let t=0;t<L.length;t+=1)L[t].m(o,null)},p(t,n){if(2&n&&F!==(F=t[1].communes+"")&&b(m,F),2&n&&G!==(G=t[1].p1+"")&&b(w,G),2&n&&H!==(H=t[1].subheading1+"")&&b(z,H),2&n&&C!==(C=t[10])&&f(T,"callback",C),2&n&&J!==(J=t[1]["map-prompt"]+"")&&b(S,J),771&n){let e;for(K=Object.entries(t[0]),e=0;e<K.length;e+=1){const r=N(t,K,e);L[e]?L[e].p(r,n):(L[e]=D(r),L[e].c(),L[e].m(o,null))}for(;e<L.length;e+=1)L[e].d(1);L.length=K.length}},d(t){t&&a(n),j(L,t)}}}function C(t){let n,o,r,m,s,c,i,g,f,j,x,y,w,v,k,z,N,O,T,C,D,E,R,S,A,F,G=t[1].location+"",H=t[9](t[15])+"",J=t[1].status+"",K=t[1][t[15].status]+"",L=t[1].members+"",M=t[15].members+"",Q=t[1].contact+"",U=t[15].contact+"";return{c(){n=l("div"),o=l("p"),r=l("b"),m=p(G),s=p(": "),c=p(H),i=u(),g=l("p"),f=l("b"),j=p(J),x=p(": "),y=p(K),w=u(),v=l("p"),k=l("b"),z=p(L),N=p(": "),O=p(M),T=u(),C=l("p"),D=l("b"),E=p(Q),R=p(": "),S=l("a"),A=p(U),d(S,"href",F=t[15].contact),d(S,"target",";_blank;"),d(S,"rel","noreferrer"),d(n,"class","location-info")},m(t,a){e(t,n,a),h(n,o),h(o,r),h(r,m),h(r,s),h(o,c),h(n,i),h(n,g),h(g,f),h(f,j),h(f,x),h(g,y),h(n,w),h(n,v),h(v,k),h(k,z),h(k,N),h(v,O),h(n,T),h(n,C),h(C,D),h(D,E),h(D,R),h(C,S),h(S,A)},p(t,n){2&n&&G!==(G=t[1].location+"")&&b(m,G),1&n&&H!==(H=t[9](t[15])+"")&&b(c,H),2&n&&J!==(J=t[1].status+"")&&b(j,J),3&n&&K!==(K=t[1][t[15].status]+"")&&b(y,K),2&n&&L!==(L=t[1].members+"")&&b(z,L),1&n&&M!==(M=t[15].members+"")&&b(O,M),2&n&&Q!==(Q=t[1].contact+"")&&b(E,Q),1&n&&U!==(U=t[15].contact+"")&&b(A,U),1&n&&F!==(F=t[15].contact)&&d(S,"href",F)},d(t){t&&a(n)}}}function D(t){let n,o,r,m,s,c=t[8](t[12])+"",i=t[3],g=[];for(let n=0;n<i.length;n+=1)g[n]=C(O(t,i,n));return{c(){n=l("h4"),o=p(c),r=u(),m=l("div");for(let t=0;t<g.length;t+=1)g[t].c();s=u(),d(n,"class","country-name"),d(m,"class","country-block")},m(t,a){e(t,n,a),h(n,o),e(t,r,a),e(t,m,a);for(let t=0;t<g.length;t+=1)g[t].m(m,null);h(m,s)},p(t,n){if(1&n&&c!==(c=t[8](t[12])+"")&&b(o,c),515&n){let o;for(i=t[3],o=0;o<i.length;o+=1){const e=O(t,i,o);g[o]?g[o].p(e,n):(g[o]=C(e),g[o].c(),g[o].m(m,s))}for(;o<g.length;o+=1)g[o].d(1);g.length=i.length}},d(t){t&&a(n),t&&a(r),t&&a(m),j(g,t)}}}function E(t){let n,o=3==t[2]&&T(t);return{c(){o&&o.c(),n=m()},m(t,r){o&&o.m(t,r),e(t,n,r)},p(t,e){3==t[2]?o?o.p(t,e):(o=T(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&a(n)}}}function R(t){let n,o=t[2],c=E(t);return{c(){c.c(),n=m(),this.c=s},m(t,o){c.m(t,o),e(t,n,o)},p(t,[e]){4&e&&r(o,o=t[2])?(c.d(1),c=E(t),c.c(),c.m(n.parentNode,n)):c.p(t,e)},i:s,o:s,d(t){t&&a(n),c.d(t)}}}function S(t,n,o){let e,r,m=x(0);c(t,m,(t=>o(2,r=t)));let s,a,l=x({