site-libsoc/Server/public/js/components/partners-add-component.js

2 lines
5.6 KiB
JavaScript
Raw Normal View History

2023-07-28 21:49:29 +07:00
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,g as l,t as p,h as u,j as g,k as d,l as f,m as h,q as b,u as j}from"./index-8c09578c.js";import{w as x}from"./index-77787e10.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,_,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;o<J.length;o+=1)K[o]=D(z(t,J,o));return{c(){o=l("div"),n=l("div"),r=l("h1"),a=p(A),i=u(),s=l("img"),x=u(),y=l("p"),w=p(C),k=u(),v=l("h3"),N=p(G),O=u(),T=l("map-component"),R=u(),S=l("p"),_=p(H),q=u();for(let t=0;t<K.length;t+=1)K[t].c();g(s,"id","groups-img"),d(s.src,m="/img/common/groups.svg")||g(s,"src","/img/common/groups.svg"),g(s,"alt","groups"),g(y,"class","description"),f(T,"id","map"),f(T,"callback",E=t[10]),g(S,"id","add-prompt"),g(n,"id","text-container"),g(o,"id","container")},m(t,c){e(t,o,c),h(o,n),h(n,r),h(r,a),h(n,i),h(n,s),h(n,x),h(n,y),h(y,w),h(n,k),h(n,v),h(v,N),h(n,O),h(n,T),h(n,R),h(n,S),h(S,_),h(n,q);for(let t=0;t<K.length;t+=1)K[t].m(n,null)},p(t,o){if(2&o&&A!==(A=t[1].groups+"")&&b(a,A),2&o&&C!==(C=t[1].p1+"")&&b(w,C),2&o&&G!==(G=t[1].subheading1+"")&&b(N,G),2&o&&E!==(E=t[10])&&f(T,"callback",E),2&o&&H!==(H=t[1]["map-prompt"]+"")&&b(_,H),771&o){let e;for(J=Object.entries(t[0]),e=0;e<J.length;e+=1){const r=z(t,J,e);K[e]?K[e].p(r,o):(K[e]=D(r),K[e].c(),K[e].m(n,null))}for(;e<K.length;e+=1)K[e].d(1);K.length=J.length}},d(t){t&&c(o),j(K,t)}}}function T(t){let o,n,r,a,i,s,m,d,f,j,x,y,w,k,v,z,N,O,T,D,E=t[1].location+"",R=t[9](t[16])+"",S=t[1].members+"",_=t[16].members+"",q=t[1].contact+"",A=t[16].contact+"";return{c(){o=l("div"),n=l("p"),r=l("b"),a=p(E),i=p(": "),s=p(R),m=u(),d=l("p"),f=l("b"),j=p(S),x=p(": "),y=p(_),w=u(),k=l("p"),v=l("b"),z=p(q),N=p(": "),O=l("a"),T=p(A),g(O,"href",D=t[16].contact),g(O,"target",";_blank;"),g(O,"rel","noreferrer"),g(o,"class","location-info")},m(t,c){e(t,o,c),h(o,n),h(n,r),h(r,a),h(r,i),h(n,s),h(o,m),h(o,d),h(d,f),h(f,j),h(f,x),h(d,y),h(o,w),h(o,k),h(k,v),h(v,z),h(v,N),h(k,O),h(O,T)},p(t,o){2&o&&E!==(E=t[1].location+"")&&b(a,E),1&o&&R!==(R=t[9](t[16])+"")&&b(s,R),2&o&&S!==(S=t[1].members+"")&&b(j,S),1&o&&_!==(_=t[16].members+"")&&b(y,_),2&o&&q!==(q=t[1].contact+"")&&b(z,q),1&o&&A!==(A=t[16].contact+"")&&b(T,A),1&o&&D!==(D=t[16].contact)&&g(O,"href",D)},d(t){t&&c(o)}}}function D(t){let o,n,r,a,i,s=t[8](t[13])+"",m=t[3],d=[];for(let o=0;o<m.length;o+=1)d[o]=T(N(t,m,o));return{c(){o=l("h4"),n=p(s),r=u(),a=l("div");for(let t=0;t<d.length;t+=1)d[t].c();i=u(),g(o,"class","country-name"),g(a,"class","country-block")},m(t,c){e(t,o,c),h(o,n),e(t,r,c),e(t,a,c);for(let t=0;t<d.length;t+=1)d[t].m(a,null);h(a,i)},p(t,o){if(1&o&&s!==(s=t[8](t[13])+"")&&b(n,s),515&o){let n;for(m=t[3],n=0;n<m.length;n+=1){const e=N(t,m,n);d[n]?d[n].p(e,o):(d[n]=T(e),d[n].c(),d[n].m(a,i))}for(;n<d.length;n+=1)d[n].d(1);d.length=m.length}},d(t){t&&c(o),t&&c(r),t&&c(a),j(d,t)}}}function E(t){let o,n=3==t[2]&&O(t);return{c(){n&&n.c(),o=a()},m(t,r){n&&n.m(t,r),e(t,o,r)},p(t,e){3==t[2]?n?n.p(t,e):(n=O(t),n.c(),n.m(o.parentNode,o)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&c(o)}}}function R(t){let o,n=t[2],s=E(t);return{c(){s.c(),o=a(),this.c=i},m(t,n){s.m(t,n),e(t,o,n)},p(t,[e]){4&e&&r(n,n=t[2])?(s.d(1),s=E(t),s.c(),s.m(o.parentNode,o)):s.p(t,e)},i:i,o:i,d(t){t&&c(o),s.d(t)}}}function S(t,o,n){let e,r,a=x(0);s(t,a,(t=>n(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="<b>"+o.Group+"</b><br>";for(let a of["location","members","contact"]){let i=o[a]+": ";if("contact"==a)r+=i+"<a href='"+t.contact+"' target='_blank' rel=noreferrer>"+t.contact+"</a>";else if("location"==a){le