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

2 lines
6.8 KiB
JavaScript
Raw Normal View History

2023-07-19 01:02:08 +07:00
import{S as t,i as e,a as o,b as n,s as i,e as r,n as a,d as s,c,o as m,f as l,t as p,g,h as d,j as h,k as f,l as u,m as b,p as w}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{addMarkersCoops as v,coopsByCountry as j}from"../../../../../../../../../js/coops.js";import{loadLocaleContent as k}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function y(t,e,o){const n=t.slice();return n[8]=e[o][0],n[9]=e[o][1],n}function z(t,e,o){const n=t.slice();return n[12]=e[o],n}function D(t){let e,o,i,r,a,c,m,x,v,k,z,D,E,O,R,T,_,A,C,H,L=t[1].cooperatives+"",M=t[1].p1+"",S=t[1].subheading1+"",q=t[1]["map-prompt"]+"",B=Object.entries(j),F=[];for(let e=0;e<B.length;e+=1)F[e]=N(y(t,B,e));return{c(){e=l("div"),o=l("div"),i=l("h1"),r=p(L),a=g(),c=l("img"),x=g(),v=l("p"),k=p(M),z=g(),D=l("h3"),E=p(S),O=g(),R=l("map-component"),_=g(),A=l("p"),C=p(q),H=g();for(let t=0;t<F.length;t+=1)F[t].c();d(c,"id","coops-img"),h(c.src,m="/img/common/coops.svg")||d(c,"src","/img/common/coops.svg"),d(c,"alt","coops"),d(v,"class","description"),f(R,"id","map"),f(R,"callback",T=t[6]),d(A,"id","add-prompt"),d(o,"id","text-container"),d(e,"id","container")},m(t,s){n(t,e,s),u(e,o),u(o,i),u(i,r),u(o,a),u(o,c),u(o,x),u(o,v),u(v,k),u(o,z),u(o,D),u(D,E),u(o,O),u(o,R),u(o,_),u(o,A),u(A,C),u(o,H);for(let t=0;t<F.length;t+=1)F[t].m(o,null)},p(t,e){if(2&e&&L!==(L=t[1].cooperatives+"")&&b(r,L),2&e&&M!==(M=t[1].p1+"")&&b(k,M),2&e&&S!==(S=t[1].subheading1+"")&&b(E,S),2&e&&T!==(T=t[6])&&f(R,"callback",T),2&e&&q!==(q=t[1]["map-prompt"]+"")&&b(C,q),2&e){let n;for(B=Object.entries(j),n=0;n<B.length;n+=1){const i=y(t,B,n);F[n]?F[n].p(i,e):(F[n]=N(i),F[n].c(),F[n].m(o,null))}for(;n<F.length;n+=1)F[n].d(1);F.length=B.length}},d(t){t&&s(e),w(F,t)}}}function E(t){let e,o,i,r,a,c,m,h,f,w,x,v,j,k,y,z,D,E,N,O,R,T,_,A,C,H,L,M,S,q,B,F,G,I,J,K,P,Q,U,V,W,X,Y,Z,$,tt,et,ot,nt,it,rt,at,st,ct,mt,lt,pt,gt,dt,ht=t[1].name+"",ft=t[12].name+"",ut=t[1].location+"",bt=t[12].location[0].map(t[7]).join(", ")+"",wt=t[1].market+"",xt=t[1][t[12].market]+"",vt=t[1].workers+"",jt=t[12].workers+"",kt=t[1].status+"",yt=t[1][t[12].status]+"",zt=t[1].website+"",Dt=t[12].website[1]+"",Et=t[1].contact+"",Nt=t[1][t[12].contact[1]]+"",Ot=t[1].description+"",Rt=t[1][t[12].description]+"";return{c(){e=l("div"),o=l("div"),i=l("div"),r=l("p"),a=l("b"),c=p(ht),m=p(": "),h=p(ft),f=g(),w=l("p"),x=l("b"),v=p(ut),j=p(": "),k=p(bt),y=g(),z=l("p"),D=l("b"),E=p(wt),N=p(": "),O=p(xt),R=g(),T=l("p"),_=l("b"),A=p(vt),C=p(": "),H=p(jt),L=g(),M=l("p"),S=l("b"),q=p(kt),B=p(": "),F=p(yt),G=g(),I=l("p"),J=l("b"),K=p(zt),P=p(": "),Q=l("a"),U=p(Dt),V=g(),W=l("p"),X=l("b"),Y=p(Et),Z=p(": "),$=l("a"),tt=p(Nt),et=g(),ot=l("picture"),nt=l("source"),it=g(),rt=l("source"),at=g(),st=l("img"),ct=g(),mt=l("p"),lt=l("b"),pt=p(Ot),gt=p(": "),dt=p(Rt),d(Q,"href",t[12].website[0]),d(Q,"target","_blank"),d(Q,"rel","noreferrer"),d($,"href",t[12].contact[0]),d($,"target",";_blank;"),d($,"rel","noreferrer"),d(nt,"srcset","/img/coops/"+t[12].logo+".webp"),d(rt,"srcset","/img/coops/"+t[12].logo+".png"),d(st,"class","coop-logo"),d(st,"alt","logo"),d(o,"class","img-general-info"),d(e,"class","location-info")},m(t,s){n(t,e,s),u(e,o),u(o,i),u(i,r),u(r,a),u(a,c),u(a,m),u(r,h),u(i,f),u(i,w),u(w,x),u(x,v),u(x,j),u(w,k),u(i,y),u(i,z),u(z,D),u(D,E),u(D,N),u(z,O),u(i,R),u(i,T),u(T,_),u(_,A),u(_,C),u(T,H),u(i,L),u(i,M),u(M,S),u(S,q),u(S,B),u(M,F),u(i,G),u(i,I),u(I,J),u(J,K),u(J,P),u(I,Q),u(Q,U),u(i,V),u(i,W),u(W,X),u(X,Y),u(X,Z),u(W,$),u($,tt),u(o,et),u(o,ot),u(ot,nt),u(ot,it),u(ot,rt),u(ot,at),u(ot,st),u(e,ct),u(e,mt),u(mt,lt),u(lt,pt),u(lt,gt),u(mt,dt)},p(t,e){2&e&&ht!==(ht=t[1].name+"")&&b(c,ht),2&e&&ut!==(ut=t[1].location+"")&&b(v,ut),2&e&&bt!==(bt=t[12].location[0].map(t[7]).join(", ")+"")&&b(k,bt),2&e&&wt!==(wt=t[1].market+"")&&b(E,wt),2&e&&xt!==(xt=t[1][t[12].market]+"")&&b(O,xt),2&e&&vt!==(vt=t[1].workers+"")&&b(A,vt),2&e&&kt!==(kt=t[1].status+"")&&b(q,kt),2&e&&yt!==(yt=t[1][t[12].status]+"")&&b(F,yt),2&e&&zt!==(zt=t[1].website+"")&&b(K,zt),2&e&&Et!==(Et