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

2 lines
5.9 KiB
JavaScript

import{g as t,S as e,i as o,a as n,b as i,s as a,e as r,n as s,d as c,c as m,o as l,f as p,t as g,h,j as d,k as f,l as b,m as u,p as w,q as x}from"./index-3cab5f92.js";import{w as v}from"./index-eafa799e.js";import{coops as k,addMarkersCoops as j}from"../../../../../../js/coops.js";import{loadLocaleContent as y}from"../../../../../../js/libraries/serverTools.js";import"../../../../../../js/components/map-component.js";const{customElements:z}=t;function D(t,e,o){const n=t.slice();return n[6]=e[o],n}function E(t){let e,o,n,a,r,s,m,l,v,j,y,z,E,R,T,_,q,A,C,H,L,M,N,S=t[0].heading+"",B=t[0].p1+"",F=t[0].p2+"",G=t[0].subheading1+"",I=t[0].subheading2+"",J=k,K=[];for(let e=0;e<J.length;e+=1)K[e]=O(D(t,J,e));return{c(){e=p("div"),o=p("div"),n=p("h1"),a=g(S),r=h(),s=p("img"),l=h(),v=p("p"),j=g(B),y=h(),z=p("p"),E=g(F),R=h(),T=p("h3"),_=g(G),q=h(),A=p("map-component"),H=h(),L=p("h4"),M=g(I),N=h();for(let t=0;t<K.length;t+=1)K[t].c();d(s,"id","coops-img"),f(s.src,m="/img/common/coops.svg")||d(s,"src","/img/common/coops.svg"),d(s,"alt","coops"),b(A,"id","map"),b(A,"callback",C=t[5]),d(o,"id","text-container"),d(e,"id","container")},m(t,c){i(t,e,c),u(e,o),u(o,n),u(n,a),u(o,r),u(o,s),u(o,l),u(o,v),u(v,j),u(o,y),u(o,z),u(z,E),u(o,R),u(o,T),u(T,_),u(o,q),u(o,A),u(o,H),u(o,L),u(L,M),u(o,N);for(let t=0;t<K.length;t+=1)K[t].m(o,null)},p(t,e){if(1&e&&S!==(S=t[0].heading+"")&&w(a,S),1&e&&B!==(B=t[0].p1+"")&&w(j,B),1&e&&F!==(F=t[0].p2+"")&&w(E,F),1&e&&G!==(G=t[0].subheading1+"")&&w(_,G),1&e&&C!==(C=t[5])&&b(A,"callback",C),1&e&&I!==(I=t[0].subheading2+"")&&w(M,I),1&e){let n;for(J=k,n=0;n<J.length;n+=1){const i=D(t,J,n);K[n]?K[n].p(i,e):(K[n]=O(i),K[n].c(),K[n].m(o,null))}for(;n<K.length;n+=1)K[n].d(1);K.length=J.length}},d(t){t&&c(e),x(K,t)}}}function O(t){let e,o,n,a,r,s,m,l,f,b,x,v,k,j,y,z,D,E,O,R,T,_,q,A,C,H,L,M,N,S,B,F,G,I,J,K,P,Q,U,V,W,X,Y,Z,$,tt,et,ot,nt,it,at,rt,st,ct,mt,lt,pt,gt,ht,dt,ft=t[0].name+"",bt=t[6].name+"",ut=t[0].location+"",wt=t[0][t[6].location[0]]+"",xt=t[0].market+"",vt=t[0][t[6].market]+"",kt=t[0].workers+"",jt=t[6].workers+"",yt=t[0].status+"",zt=t[0][t[6].status]+"",Dt=t[0].website+"",Et=t[6].website+"",Ot=t[0].contact+"",Rt=t[0][t[6].contact[1]]+"",Tt=t[0].description+"",_t=t[0][t[6].description]+"";return{c(){e=p("div"),o=p("div"),n=p("div"),a=p("p"),r=p("b"),s=g(ft),m=g(": "),l=g(bt),f=h(),b=p("p"),x=p("b"),v=g(ut),k=g(": "),j=g(wt),y=h(),z=p("p"),D=p("b"),E=g(xt),O=g(": "),R=g(vt),T=h(),_=p("p"),q=p("b"),A=g(kt),C=g(": "),H=g(jt),L=h(),M=p("p"),N=p("b"),S=g(yt),B=g(": "),F=g(zt),G=h(),I=p("p"),J=p("b"),K=g(Dt),P=g(": "),Q=p("a"),U=g(Et),V=h(),W=p("p"),X=p("b"),Y=g(Ot),Z=g(": "),$=p("a"),tt=g(Rt),et=h(),ot=p("picture"),nt=p("source"),it=h(),at=p("source"),rt=h(),st=p("img"),ct=h(),mt=p("p"),lt=p("b"),pt=g(Tt),gt=g(": "),ht=g(_t),dt=h(),d(Q,"href","https://www."+t[6].website),d(Q,"target","_blank"),d(Q,"rel","noreferrer"),d($,"href",t[6].contact[0]),d($,"target",";_blank;"),d($,"rel","noreferrer"),d(nt,"srcset","/img/coops/"+t[6].logo+".webp"),d(at,"srcset","/img/coops/"+t[6].logo+".png"),d(st,"class","coop-logo"),d(st,"alt","logo"),d(o,"class","img-general-info"),d(e,"class","location-info")},m(t,c){i(t,e,c),u(e,o),u(o,n),u(n,a),u(a,r),u(r,s),u(r,m),u(a,l),u(n,f),u(n,b),u(b,x),u(x,v),u(x,k),u(b,j),u(n,y),u(n,z),u(z,D),u(D,E),u(D,O),u(z,R),u(n,T),u(n,_),u(_,q),u(q,A),u(q,C),u(_,H),u(n,L),u(n,M),u(M,N),u(N,S),u(N,B),u(M,F),u(n,G),u(n,I),u(I,J),u(J,K),u(J,P),u(I,Q),u(Q,U),u(n,V),u(n,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,at),u(ot,rt),u(ot,st),u(e,ct),u(e,mt),u(mt,lt),u(lt,pt),u(lt,gt),u(mt,ht),u(e,dt)},p(t,e){1&e&&ft!==(ft=t[0].name+"")&&w(s,ft),1&e&&ut!==(ut=t[0].location+"")&&w(v,ut),1&e&&wt!==(wt=t[0][t[6].location[0]]+"")&&w(j,wt),1&e&&xt!==(xt=t[0].market+"")&&w(E,xt),1&e&&vt!==(vt=t[0][t[6].market]+"")&&w(R,vt),1&e&&kt!==(kt=t[0].workers+"")&&w(A,kt),1&e&&yt!==(yt=t[0].status+"")&&w(S,yt),1&e&&zt!==(zt=t[0][t[6].status]+"")&&w(F,zt),1&e&&Dt!==(Dt=t[0].website+"")&&w(K,Dt),1&e&&Ot!==(Ot=t[0].contact+"")&&w(Y,Ot),1&e&&Rt!==(Rt=t[0][t[6].contact[1]]+"")&&w(tt,Rt),1&e&&Tt!==(Tt=t[0].description+"")&&w(pt,Tt),1&e&&_t!==(_t=t[0][t[6].description]+"")&&w(ht,_t)},d(t){t&&c(e)}}}function R(t){let e,o=0!=Object.keys(t[0]).length,n=o&&E(t);return{c(){n&&n.c(),e=r(),this.c=s},m(t,o){n&&n.m(t,o),i(t,e,o)},p(t,[i]){1&i&&(o=0!=Object.keys(t[0]).length),o?n?n.p(t,i):(n=E(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:s,o:s,d(t){n&&n.d(t),t&&c(e)}}}function T(t,e,o){let n,i,a=v({});m(t,a,(t=>o(0,n=t)));let r=y(a,"cooperatives-component",i);function s(t,e){let o=t([51.505,-.09],3);j(o,e)}l((()=>{}));return[n,i,a,r,s,t=>s(t,n)]}class _ extends e{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#coops-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.img-general-info{display:flex;align-content:center;width:100%;justify-content:space-between;gap:3rem;align-items:center}.img-general-info>:first-child{flex:none}.coop-logo{position:relative;right:0;max-height:6rem;max-width:100%}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}@media only screen and (max-width: 600px){.img-general-info{display:flex;flex-direction:column-reverse;align-content:left;width:100%;gap:1rem;align-items:left;margin-bottom:0rem}.img-general-info>:nth-child(2){width:max-content}.img-general-info>:nth-child(1){width:100%}}</style>",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},T,R,a,{},null),t&&t.target&&i(t.target,this,t.anchor)}}z.define("cooperatives-component",_);export{_ as default};