From fe88f90f49f39faf56d5203d44409e0170ef78e5 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Mon, 28 Sep 2026 04:38:24 +0000 Subject: [PATCH] Cities with Internet: people-group dots are dark slate, not red The Driver: red dots on a mostly green map look wrong. A dark slate dot (#1e293b) with the existing white ring reads on every fill the map uses, the green/amber/red/grey country bands and India's pale-to-deep blue states, and it carries no good/bad meaning (red is this map's 'under 25%'). Candidates compared side by side on the world, India and West Africa views before choosing. Rebuilt cities-internet and regenerated the tree (integrity hashes). --- plugin-designs/cities-internet/connectivity-map.vue | 8 +++++--- public/dx-maps/cities-internet/cities-internet.js | 2 +- .../dx-maps/cities-internet/connectivity-list/index.html | 2 +- .../dx-maps/cities-internet/connectivity-map/index.html | 2 +- public/dx-maps/cities-internet/data-tables/index.html | 2 +- public/dx-maps/doxa-maps-spa/manifest.json | 8 ++++---- public/dx-maps/manifest.json | 8 ++++---- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/plugin-designs/cities-internet/connectivity-map.vue b/plugin-designs/cities-internet/connectivity-map.vue index b17df35fb..f1d68b433 100644 --- a/plugin-designs/cities-internet/connectivity-map.vue +++ b/plugin-designs/cities-internet/connectivity-map.vue @@ -87,9 +87,11 @@ const selectedAdm1 = ref(null) // The DOXA list from pray-tools, the same list Prayer Progress draws. It carries the slug the // detail panel fetches by. The shared pin table (tables/people-group-pins.json) has no slug, // so its dots could not open that panel. -// A distinct red with a white ring: the "under 25%" fill is also red (#b42318), and a dot -// without the ring vanishes into it. -const PG_DOT = '#e11d48' +// Dark slate with a white ring (Driver 2026-09-28: the red dots looked wrong on the mostly green +// map). A neutral dark reads on every fill here, the green/amber/red/grey bands AND India's pale-to-deep +// blues, and it carries no "good/bad" meaning the way red does on a map whose red means under 25%. +// The white ring keeps it apart from the deepest blue and from the dark basemap. +const PG_DOT = '#1e293b' const uiStore = inject('uiStore', null) const _lang = (() => { const v = inject('lang', null)?.value; return (v && v !== 'en') ? v : null })() // The reader's language for the ENGINE'S OWN labels (the canvas's "Map" name, "Zoom in", attribution…). diff --git a/public/dx-maps/cities-internet/cities-internet.js b/public/dx-maps/cities-internet/cities-internet.js index a4d525012..319c49f1b 100644 --- a/public/dx-maps/cities-internet/cities-internet.js +++ b/public/dx-maps/cities-internet/cities-internet.js @@ -651,7 +651,7 @@ .legend-dark .legend-item-selected{outline-color:rgba(255,255,255,0.5)!important;} .legend-dark .legend-tree-caret{color:rgba(243,243,241,0.7)!important;} .legend-dark .legend-content::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);} -`,"legend-component");const a=e;Ce("mapStore");const r=Ce("dataStore"),i=Ce("uiStore"),s=nl(a,"legendType"),{items:l,columns:u,title:c,activeFilter:g,setFilter:h,totalCount:y,totalPopulation:_,progress:p,fmtPop:d,fmtCount:v}=Wp(s,td),C=Ce("normalizedPeopleGroups",null),x=W(()=>{var z,V;if((z=C==null?void 0:C.value)!=null&&z.length)return C.value;const oe=[];for(const te in r.sources){const ae=r.sources[te];(V=ae==null?void 0:ae.features)!=null&&V.length&&oe.push(...ae.features)}return oe}),k=Ce("mapId",null),S=W(()=>i.isMobile),L=W(()=>i.legendMode),w=W(()=>i.selectedPeopleGroup),T=W(()=>vs(x.value)),O=W(()=>w.value?ed(T.value,w.value):[]),N=ue(a.initiallyCollapsed);let H=null;const U=W(()=>{var oe;return L.value==="detail"&&w.value?((oe=w.value.properties)==null?void 0:oe.name)||n("legend.header.peopleGroupFallback"):N.value?n("legend.header.collapsed"):c.value});function pe(){N.value=!N.value}qe(L,(oe,z)=>{oe==="detail"&&z!=="detail"&&N.value&&(N.value=!1)});function he(oe){h(oe)}return Wt(()=>{window.innerWidth<768&&(N.value=!0),H=oe=>{var z;k&&((z=oe.detail)!=null&&z.mapId)&&oe.detail.mapId!==k||(N.value=!1)},window.addEventListener("dxm:openDesktopLegend",H)}),Kt(()=>{H&&window.removeEventListener("dxm:openDesktopLegend",H)}),(oe,z)=>S.value?(I(),Xe(q(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):N.value?(I(),D("button",{key:1,class:Ae(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:z[0]||(z[0]=V=>N.value=!1)},[z[2]||(z[2]=b("svg",{class:"legend-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),b("span",tw,B(q(c)),1),z[3]||(z[3]=b("svg",{class:"legend-reopen-caret",width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,ew)):(I(),D("div",{key:2,class:Ae(["legend-container",{"legend-dark":e.isDark}])},[L.value==="detail"?(I(),D("button",{key:0,class:"detail-collapse-btn",onClick:it(pe,["stop"]),"aria-label":q(n)("aria.toggleLegend")},null,8,ow)):ge("",!0),L.value==="detail"?(I(),D("button",{key:1,class:"detail-close-btn",onClick:z[1]||(z[1]=it(V=>q(i).selectPeopleGroup(null),["stop"])),"aria-label":q(n)("aria.backToLegend")},[...z[4]||(z[4]=[b("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,nw)):ge("",!0),b("div",{class:Ae(["legend-content",{"no-padding":q(u).length>0}])},[L.value==="detail"&&w.value?(I(),D(be,{key:0},[Be(Xp,{peopleGroup:w.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),Be(na,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(I(),D(be,{key:1},[],64)):(I(),Xe(Vp,{key:2,title:U.value,items:q(l),columns:q(u),activeFilter:q(g),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:q(y),totalPopulation:q(_),fmtPop:q(d),fmtCount:q(v),progress:q(p),onFilterClick:he},{"title-caret":It(()=>[b("button",{class:"legend-collapse-caret",onClick:it(pe,["stop"]),"aria-label":q(n)("aria.toggleLegend")},[...z[5]||(z[5]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",style:{transform:"rotate(180deg)","transform-origin":"center"}})],-1)])],8,aw)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),L.value!=="detail"?(I(),Xe(na,{key:3,dark:e.isDark},null,8,["dark"])):ge("",!0)],2)],2))}},[["styles",[Qv]],["__scopeId","data-v-2037a3c3"]]),iw={class:"gm-legend"},sw={class:"gm-title"},lw={class:"gm-keys"},cw={key:0,class:"gm-key"},uw={class:"gm-caveat"},pw={key:0,class:"gm-adm1"},dw={class:"gm-adm1-h"},gw=["aria-label"],hw=["aria-pressed"],mw=["aria-pressed"],fw={class:"gm-keys"},bw={class:"gm-caveat"},_w={key:0,class:"gm-caveat"},yw={key:1,class:"gm-err"},$w={key:2,class:"gm-pg-desktop"},vw={key:3,class:"gm-pg-mobile"},ww={key:4,class:"gm-sheet"},kw={class:"gm-sh-head"},xw={class:"gm-sh-name"},Sw={class:"gm-list-h"},Aw={class:"gm-adm1-t"},Cw={class:"gm-note"},Pw={key:5,class:"gm-sheet"},Lw={class:"gm-sh-head"},Nw={class:"gm-sh-name"},Tw={key:0,class:"gm-ai"},Ow=["aria-label"],Ew={class:"gm-stat"},Iw={class:"gm-stat"},Fw={class:"gm-stat"},Mw={class:"gm-stat"},Rw={class:"gm-stat"},Dw={key:1,class:"gm-list"},Bw={class:"gm-list-h"},Gw={key:2,class:"gm-list"},zw={class:"gm-list-h"},Hw={class:"gm-note"},ws="#e11d48",Uw=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=ui(()=>yn(()=>Promise.resolve().then(()=>rd),void 0)),o=Ce("profileConfig",ue(null)),n=W(()=>{var Y;return((Y=o.value)==null?void 0:Y.isDark)===!0}),a=Ce("mapboxToken",null),r=W(()=>{var Y;return((Y=o.value)==null?void 0:Y.tk)||(a==null?void 0:a.value)||typeof window<"u"&&window.MAP_TOKEN||""}),i=W(()=>Ni(o.value)),s=ue(null),l=Mo(null),u=ue([]),c=ue(null),g=ue(!0),h=ue(null),y=Mo(null),_=ue("women"),p=ue(null),d=Ce("uiStore",null),v=(()=>{var X;const Y=(X=Ce("lang",null))==null?void 0:X.value;return Y&&Y!=="en"?Y:null})(),C=()=>{if(v)return v;const Y=o.value;if(Y&&(Y.locale||Y.lang))return String(Y.locale||Y.lang);try{const X=new URLSearchParams(location.search);return X.get("lang")||X.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},x=new tp({locale:v,profileConfig:o}),k=Mo([]),S=ue(0),L=o1({getMap:()=>l.value,getActivePinColor:()=>ws});async function w(){await x.init();const Y=await x.setActiveSource("pray-tools");k.value=$o(Y||[])}function T(){const Y=[];for(const X of k.value){const ce=parseFloat(X.longitude??X.lng),$e=parseFloat(X.latitude??X.lat);if(!isFinite(ce)||!isFinite($e))continue;const _e=X._normalized||{};Y.push({type:"Feature",properties:{uniqueId:X.uniqueId,slug:X.slug||"",name:X.name,language:X.language,languageFamily:X.languageFamily||_e.languageFamily||"",country:X.country,countryIso:X.countryIso,countryIsoLabel:X.countryIsoLabel,countryName:X.countryName,religion:X.religion,religionLabel:X.religionLabel,religionName:X.religionName,population:X.population,status:X.status,description:X.description||"",imageUrl:X.imageUrl||"",peoplePraying:Number(X.peoplePraying??_e.peoplePraying??0)},geometry:{type:"Point",coordinates:[ce,$e]}})}return{type:"FeatureCollection",features:Y}}function O(Y){if(!k.value.length||Y.getSource("language-families"))return;const X=T();if(S.value=X.features.length,Y.addSource("language-families",{type:"geojson",data:X,promoteId:"uniqueId"}),X.features.length){let ce=180,$e=90,_e=-180,Le=-90;for(const P of X.features){const[A,G]=P.geometry.coordinates;A_e&&(_e=A),G<$e&&($e=G),G>Le&&(Le=G)}const $=Math.round(Math.min(Y.getContainer().clientWidth,Y.getContainer().clientHeight)*.06)+8;try{const P=Y.cameraForBounds([[ce,$e],[_e,Le]],{padding:$});if(Y.fitBounds([[ce,$e],[_e,Le]],{padding:$,duration:0}),P&&Y.getZoom()>P.zoom+.05){const A=Y.getBounds(),G=Math.min(360,A.getEast()-A.getWest());let Q=Y.getCenter().lng,ee=-1;for(let ie=-180;ie<180;ie+=5){let re=0;for(const f of X.features){let m=f.geometry.coordinates[0]-ie;m=(m+540)%360-180,Math.abs(m)<=G/2&&re++}re>ee&&(ee=re,Q=ie)}Y.jumpTo({center:[Q,($e+Le)/2]})}}catch{}}Y.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":ws,"circle-radius":["interpolate",["linear"],["zoom"],0,2.6,4,3.6,8,6,12,8.5],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],0,1,6,1.4,12,1.8],"circle-opacity":.95}}),Y.on("click","ci-pg-dots",ce=>{var _e;const $e=(_e=ce.features)==null?void 0:_e[0];!$e||!d||(c.value=null,d.selectPeopleGroup($e))}),Y.on("mouseenter","ci-pg-dots",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-pg-dots",()=>{Y.getCanvas().style.cursor=""}),typeof window<"u"&&(window.__ciState=()=>{var ce,$e;return{groups:k.value.length,dots:S.value,hasLayer:!!Y.getLayer("ci-pg-dots"),rendered:Y.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:(($e=(ce=d==null?void 0:d.selectedPeopleGroup)==null?void 0:ce.properties)==null?void 0:$e.slug)||null}},window.__ciMap=Y)}const N=Jn("connectivity"),H=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],U=Y=>(H.find(X=>X.id===Y)||{}).color||"#9aa2ad",pe=W(()=>{const Y={};for(const X of u.value)Y[X.iso3]=X;return Y});async function he(){const[Y,X]=await Promise.all([fetch(`${i.value}/tables/internet-by-country.json`).then(ce=>ce.json()),fetch(`${i.value}/boundaries/world-adm0-web.geojson`).then(ce=>ce.json())]);return u.value=Y.countries||[],X}function oe(Y,X){const ce=pe.value,_e={type:"FeatureCollection",features:(X.features||[]).map(Le=>{var A;const $=(A=Le.properties)==null?void 0:A.iso3,P=ce[$];return{type:"Feature",properties:{iso3:$,band:(P==null?void 0:P.band)||"none",color:P?U(P.band):"rgba(0,0,0,0)",hasData:!!P},geometry:Le.geometry}})};if(Y.getSource("ci-src")){Y.getSource("ci-src").setData(_e);return}Y.addSource("ci-src",{type:"geojson",data:_e}),Y.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),Y.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),Y.on("click","ci-fill",Le=>{var P,A,G;if(Y.getLayer("ci-pg-dots")&&Y.queryRenderedFeatures(Le.point,{layers:["ci-pg-dots"]}).length)return;const $=(G=(A=(P=Le.features)==null?void 0:P[0])==null?void 0:A.properties)==null?void 0:G.iso3;$&&pe.value[$]&&(d==null||d.selectPeopleGroup(null),p.value=null,c.value=pe.value[$])}),Y.on("mouseenter","ci-fill",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-fill",()=>{Y.getCanvas().style.cursor=""})}const z=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],V=Y=>["case",["==",["typeof",["get",Y]],"number"],["step",["get",Y],...z.flatMap((X,ce)=>ce===0?[X.color]:[X.from,X.color])],"rgba(0,0,0,0)"];async function te(){var $e;const[Y,X]=await Promise.all([fetch(`${i.value}/tables/internet-by-adm1.json`).then(_e=>{if(!_e.ok)throw new Error("internet-by-adm1 "+_e.status);return _e.json()}),fetch(`${i.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(_e=>{if(!_e.ok)throw new Error("gb-IND-ADM1-full "+_e.status);return _e.json()})]),ce={};for(const _e of Y.rows||[]){if(_e.iso3!=="IND"||_e.measure!=="ever_used_internet"||!_e.adm1)continue;const Le=ce[$e=_e.adm1]??(ce[$e]={name:_e.adm1_name||_e.adm1,women:{},men:{}});Le[_e.sex][_e.area]=_e.value}return y.value=$o({meta:Y.meta||{},byArea:ce}),X}function ae(Y,X){const ce=y.value.byArea,$e={type:"FeatureCollection",features:(X.features||[]).map(Le=>{var P,A;const $=ce[(P=Le.properties)==null?void 0:P.shapeName];return{type:"Feature",geometry:Le.geometry,properties:{adm1:(A=Le.properties)==null?void 0:A.shapeName,women:($==null?void 0:$.women.total)??null,men:($==null?void 0:$.men.total)??null}}})},_e=Y.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;Y.addSource("ci-adm1-src",{type:"geojson",data:$e}),Y.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":V(_.value),"fill-opacity":.85}},_e),Y.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},_e),Y.getLayer("ci-fill")&&Y.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),Y.on("click","ci-adm1-fill",Le=>{var A,G,Q;if(Y.getLayer("ci-pg-dots")&&Y.queryRenderedFeatures(Le.point,{layers:["ci-pg-dots"]}).length)return;const $=(Q=(G=(A=Le.features)==null?void 0:A[0])==null?void 0:G.properties)==null?void 0:Q.adm1,P=$&&ce[$];P&&(d==null||d.selectPeopleGroup(null),c.value=null,p.value={key:$,...P})}),Y.on("mouseenter","ci-adm1-fill",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-adm1-fill",()=>{Y.getCanvas().style.cursor=""})}function ne(Y){_.value=Y;const X=l.value;X!=null&&X.getLayer("ci-adm1-fill")&&X.setPaintProperty("ci-adm1-fill","fill-color",V(Y))}const se=W(()=>{var Y,X,ce,$e;return((($e=(ce=(X=(Y=y.value)==null?void 0:Y.meta)==null?void 0:X.boundaries)==null?void 0:ce.IND)==null?void 0:$e.missing)||[]).join(", ")}),le=M$(Ce("profileConfig",null));let xe=!1;Wt(async()=>{try{await J$(le)}catch{}const Y=Ei(le);if(!xe){if(!Y){const X=le==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${X} engine did not load; refusing to substitute another engine.`);const ce=N("messages.engineMissing",{engine:X});h.value=ce&&ce!=="messages.engineMissing"?ce:`The ${X} map engine did not load.`;return}if(!s.value){h.value="map engine not loaded";return}U$(Y);try{const X=w().catch($=>{console.warn("[connectivity-map] people groups:",($==null?void 0:$.message)||$)}),ce=te().catch($=>(console.warn("[connectivity-map] India by state:",($==null?void 0:$.message)||$),null)),$e=await he();if(xe||!s.value)return;const _e=Y$(le);if(_e&&await Z$(s.value,_e),xe||!s.value)return;const Le=new Y.Map({container:s.value,style:z$(n.value?"ink":"paper",le).style||(n.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:r.value,locale:q$(C(),le),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});l.value=$o(Le),e$(Le,{boundaries:!0}),Le.once("load",async()=>{try{K$(Le,C())}catch{}oe(Le,$e),L.initialize(),await X,O(Le);const $=await ce;$&&!xe&&ae(Le,$)})}catch(X){h.value=String(X.message||X)}}}),Kt(()=>{var Y;xe=!0,L.cleanup(),d==null||d.selectPeopleGroup(null);try{(Y=l.value)==null||Y.remove()}catch{}});const ke=Y=>(Number(Y)||0).toLocaleString(),Je=W(()=>!!(d!=null&&d.selectedPeopleGroup));return yt(".gm{position:absolute;inset:0;overflow:hidden}.gm-map{position:absolute;inset:0}.gm-legend{position:absolute;top:8px;inset-inline-start:8px;width:var(--map-legend-width,380px);max-width:calc(100% - 16px);box-sizing:border-box;z-index:4;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.94);color:#0f1419;font:12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.16)}@media(max-width:480px){.gm-legend{width:auto;inset-inline-end:46px}}.is-dark .gm-legend{background:rgba(19,32,25,.95);color:#e5e7eb}.gm-title{font-weight:700;font-size:12.5px;margin-bottom:5px}.gm-keys{display:flex;flex-wrap:wrap;gap:5px 12px}.gm-key{display:flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.gm-sw{width:12px;height:12px;border-radius:3px;flex:none}.gm-caveat{margin-top:5px;font-size:10.5px;opacity:.72;line-height:1.4}.gm-adm1{margin-top:8px;padding-top:7px;border-top:1px solid rgba(0,0,0,.12)}.gm-adm1-h{font-weight:600;font-size:12px;margin-bottom:5px}.gm-seg{display:inline-flex;border:1px solid rgba(0,0,0,.2);border-radius:6px;overflow:hidden;margin-bottom:6px}.gm-seg button{font:inherit;font-size:11px;padding:3px 10px;min-height:24px;border:0;background:transparent;color:inherit;cursor:pointer}.gm-seg button.on{background:#08519c;color:#fff}.gm-adm1-t{width:100%;border-collapse:collapse;font-size:12px;margin:4px 0 6px}.gm-adm1-t th,.gm-adm1-t td{padding:3px 4px;text-align:end}.gm-adm1-t th:first-child{text-align:start}.is-dark .gm-adm1{border-top-color:rgba(255,255,255,.15)}.is-dark .gm-seg{border-color:rgba(255,255,255,.3)}.gm-sheet{position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:62%;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:14px 16px 22px;font:13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 -6px 26px rgba(0,0,0,.28)}@media(min-width:700px){.gm-sheet{inset-inline-start:auto;inset-inline-end:14px;bottom:14px;width:330px;border-radius:12px}}.is-dark .gm-sheet{background:#132019;color:#e5e7eb}.gm-sh-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.gm-sh-name{font-weight:800;font-size:15px}.gm-ai{display:flex;align-items:flex-start;gap:8px;margin:0 0 10px;padding:7px 9px;border-radius:8px;font-size:11px;line-height:1.35;background:rgba(180,120,0,.12);color:#7a4f00;border:1px solid rgba(180,120,0,.25)}.is-dark .gm-ai{background:rgba(255,200,80,.10);color:#f0cf88;border-color:rgba(255,200,80,.22)}.gm-ai-x{margin-left:auto;flex:none;border:0;background:none;cursor:pointer;font-size:15px;line-height:1;color:inherit;opacity:.7;padding:0 2px}.gm-ai-x:hover{opacity:1}.gm-x{margin-left:auto;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit;font:600 12px inherit;padding:6px 12px;border-radius:8px;cursor:pointer;min-height:34px}.gm-stat{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border-bottom:1px solid rgba(0,0,0,.07);font-variant-numeric:tabular-nums}.is-dark .gm-stat{border-bottom-color:rgba(255,255,255,.09)}.gm-stat b{font-weight:700}.gm-list{margin-top:9px}.gm-list-h{font-weight:700;font-size:12px;margin-bottom:3px}.gm-list ul{margin:0;padding-left:17px;font-size:12px;line-height:1.5}.gm-note{margin-top:9px;font-size:11px;line-height:1.5;opacity:.75}.gm-err{position:absolute;top:50%;left:0;right:0;text-align:center;font-size:13px;opacity:.7}.gm-dot{width:10px;height:10px;border-radius:50%;flex:none;box-sizing:border-box;border:1.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}.gm-pg-mobile{display:none}@media(max-width:767px){.gm-pg-mobile{display:block}.gm-pg-desktop{display:none}}","doxa-connectivity-map"),(Y,X)=>(I(),D("div",{class:Ae(["gm",{"is-dark":n.value}])},[b("div",{ref_key:"mapEl",ref:s,class:"gm-map"},null,512),l.value?(I(),Xe(t$,{key:0},{default:It(()=>[Be(n$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(a$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(r$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(l$,{"map-container":s.value,"is-dark":n.value},null,8,["map-container","is-dark"]),Be(E$,{"is-dark":n.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ge("",!0),Ir(b("div",iw,[b("div",sw,B(q(N)("connectivity.title")),1),b("div",lw,[(I(),D(be,null,Ze(H,ce=>b("span",{key:ce.id,class:"gm-key"},[b("i",{class:"gm-sw",style:Ue({background:ce.color})},null,4),Ie(B(q(N)("connectivity.bands."+ce.id)),1)])),64)),k.value.length?(I(),D("span",cw,[b("i",{class:"gm-dot",style:Ue({background:ws})},null,4),Ie(B(q(N)("connectivity.peopleGroup"))+" ("+B(ke(k.value.length))+") ",1)])):ge("",!0)]),b("div",uw,B(q(N)("connectivity.caveat")),1),y.value?(I(),D("div",pw,[b("div",dw,B(q(N)("connectivity.adm1.title")),1),b("div",{class:"gm-seg",role:"group","aria-label":q(N)("connectivity.adm1.title")},[b("button",{type:"button",class:Ae({on:_.value==="women"}),"aria-pressed":_.value==="women",onClick:X[0]||(X[0]=ce=>ne("women"))},B(q(N)("connectivity.adm1.women")),11,hw),b("button",{type:"button",class:Ae({on:_.value==="men"}),"aria-pressed":_.value==="men",onClick:X[1]||(X[1]=ce=>ne("men"))},B(q(N)("connectivity.adm1.men")),11,mw)],8,gw),b("div",fw,[(I(),D(be,null,Ze(z,(ce,$e)=>b("span",{key:ce.from,class:"gm-key"},[b("i",{class:"gm-sw",style:Ue({background:ce.color})},null,4),Ie(B($e+1p.value=null)},B(q(N)("connectivity.sheet.close")),1)]),b("div",Sw,B(q(N)("connectivity.adm1.title")),1),b("table",Aw,[b("thead",null,[b("tr",null,[X[5]||(X[5]=b("th",null,null,-1)),b("th",null,B(q(N)("connectivity.adm1.total")),1),b("th",null,B(q(N)("connectivity.adm1.urban")),1),b("th",null,B(q(N)("connectivity.adm1.rural")),1)])]),b("tbody",null,[(I(),D(be,null,Ze(["women","men"],ce=>b("tr",{key:ce},[b("th",null,B(q(N)("connectivity.adm1."+ce)),1),(I(),D(be,null,Ze(["total","urban","rural"],$e=>b("td",{key:$e},B(p.value[ce][$e]!=null?p.value[ce][$e]+"%":"—"),1)),64))])),64))])]),b("p",Cw,B(q(N)("connectivity.adm1.source")),1)])):ge("",!0),c.value?(I(),D("div",Pw,[b("div",Lw,[b("span",Nw,B(c.value.country),1),b("button",{type:"button",class:"gm-x",onClick:X[3]||(X[3]=ce=>c.value=null)},B(q(N)("connectivity.sheet.close")),1)]),g.value?(I(),D("div",Tw,[b("span",null,B(q(N)("connectivity.sheet.ai")),1),b("button",{type:"button",class:"gm-ai-x",onClick:X[4]||(X[4]=ce=>g.value=!1),"aria-label":q(N)("connectivity.sheet.dismiss")},"×",8,Ow)])):ge("",!0),b("div",Ew,[b("span",null,B(q(N)("connectivity.sheet.internetUsers")),1),b("b",null,B(c.value.internet_pct!=null?c.value.internet_pct+"%":q(N)("connectivity.sheet.unknown")),1)]),b("div",Iw,[b("span",null,B(q(N)("connectivity.sheet.measured")),1),b("b",null,B(c.value.internet_year||"—"),1)]),b("div",Fw,[b("span",null,B(q(N)("connectivity.sheet.mobilePer100")),1),b("b",null,B(c.value.mobile_per_100??"—"),1)]),b("div",Mw,[b("span",null,B(q(N)("connectivity.sheet.peopleGroups")),1),b("b",null,B(ke(c.value.people_groups)),1)]),b("div",Rw,[b("span",null,B(q(N)("connectivity.sheet.topPlatform")),1),b("b",null,[Ie(B(c.value.top_platform||q(N)("connectivity.sheet.unknown")),1),c.value.top_platform_pct?(I(),D(be,{key:0},[Ie(" · "+B(c.value.top_platform_pct)+"%",1)],64)):ge("",!0)])]),c.value.carriers&&c.value.carriers.length?(I(),D("div",Dw,[b("div",Bw,B(q(N)("connectivity.sheet.carriers",{n:c.value.carrier_count})),1),b("ul",null,[(I(!0),D(be,null,Ze(c.value.carriers,(ce,$e)=>(I(),D("li",{key:$e},B(ce),1))),128))])])):ge("",!0),c.value.platforms&&c.value.platforms.length?(I(),D("div",Gw,[b("div",zw,B(q(N)("connectivity.sheet.socialPlatforms")),1),b("ul",null,[(I(!0),D(be,null,Ze(c.value.platforms,(ce,$e)=>(I(),D("li",{key:$e},B(ce.name)+" · "+B(ce.pct)+"%",1))),128))])])):ge("",!0),b("p",Hw,B(q(N)("connectivity.sheet.note")),1)])):ge("",!0)],2))}}},Symbol.toStringTag,{value:"Module"}));function jw(e){const t=(e==null?void 0:e.parentElement)||e;if(!t||!t.ownerDocument)return{x:0,y:0};const o=t.ownerDocument.createElement("div");o.style.cssText="position:fixed;top:0;left:0;width:0;height:0;pointer-events:none;opacity:0",t.appendChild(o);const n=o.getBoundingClientRect();return o.remove(),{x:n.left,y:n.top}}function od(e){const t=ue(null),o=Mo({position:"fixed",inset:"0"}),n=()=>{var c,g;const r=t.value;if(!r)return;const i=jw(r),s=r.ownerDocument||(typeof document<"u"?document:null),l=((c=s==null?void 0:s.documentElement)==null?void 0:c.clientWidth)||0,u=((g=s==null?void 0:s.documentElement)==null?void 0:g.clientHeight)||0;o.value={position:"fixed",top:`${-i.y}px`,left:`${-i.x}px`,right:"auto",bottom:"auto",width:`${l}px`,height:`${u}px`,boxSizing:"border-box"}};qe(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Kt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const Ww={class:"dt-head"},Kw={class:"dt-title"},Vw={class:"dt-count"},qw={key:0,class:"dt-grain"},Yw={class:"dt-actions"},Jw={key:0,class:"dt-err"},Zw={class:"dt-wrap"},Xw={class:"dt-hint"},Qw={key:0,dir:"ltr"},e2=["aria-label"],t2={class:"dt-sheet-head"},o2={class:"dt-dl"},n2=["href"],a2={key:1},r2={key:2},i2={key:2,class:"dt-caveats"},s2={dir:"ltr"},l2={class:"dt-cav-k"},c2={__name:"DataTable",props:{table:{type:Object,required:!0},assetsBase:{type:String,default:"./assets"},isDark:{type:Boolean,default:!1},height:{type:String,default:"560px"},frozen:{type:Number,default:1},pageSize:{type:Number,default:50}},emits:["row-click"],setup(e,{emit:t}){const o=(N,H)=>Xt(N)||H,n=e,a=t,r=ue(!1),i=ue(null),{scrimRef:s,scrimStyle:l}=od(i),u=ue(null),c=Mo(null),g=ue(null),h=ue(!1),y=W(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),_=W(()=>{var N;return((N=n.table)==null?void 0:N.meta)||{}}),p=W(()=>{var N;return(((N=n.table)==null?void 0:N.rows)||[]).length}),d=W(()=>Object.entries(_.value).filter(([N,H])=>typeof H=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(N)).map(([N,H])=>({key:N.replace(/_/g," "),text:H})));let v=null;function C(){return window.Tabulator?Promise.resolve(window.Tabulator):v||(v=new Promise((N,H)=>{const U=document.createElement("script");U.src=`${y.value}/vendor/tabulator/tabulator.min.js`,U.onload=()=>N(window.Tabulator),U.onerror=()=>H(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(U)}),v)}async function x(N){if(!(!N||N.querySelector("style[data-tabulator]")))try{const H=await fetch(`${y.value}/vendor/tabulator/tabulator.min.css`);if(!H.ok)return;const U=document.createElement("style");U.setAttribute("data-tabulator",""),U.textContent=await H.text(),N.appendChild(U)}catch{}}function k(N){var he,oe;if(!u.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const H=((he=n.table)==null?void 0:he.columns)||[],pe=(r.value?H.slice(0,3):H).map((z,V)=>({title:z.title,field:z.field,headerFilter:z.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:z.type==="number"?"number":z.type==="boolean"?"boolean":"string",formatter:z.type==="boolean"?"tickCross":void 0,.../_url$/.test(z.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&V{i.value=V.getData(),a("row-click",V.getData())}),c.value.on("tableBuilt",()=>{h.value=!0})}const S=N=>{var H,U;return((U=(((H=n.table)==null?void 0:H.columns)||[]).find(pe=>pe.field===N))==null?void 0:U.title)||N.replace(/_/g," ")},L=N=>typeof N=="string"&&N.includes(", ")&&N.length>40?N.split(", "):null,w=N=>typeof N=="string"&&/^https?:\/\//.test(N),T=W(()=>i.value?Object.entries(i.value).filter(([,N])=>N!==""&&N!==null&&N!==void 0):[]);function O(N){var H;try{(H=c.value)==null||H.download(N,`${(_.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${N}`)}catch(U){g.value=String(U.message||U)}}return Wt(async()=>{var N,H;try{await x((H=(N=u.value)==null?void 0:N.getRootNode)==null?void 0:H.call(N)),k(await C())}catch(U){g.value=String(U.message||U)}}),Kt(()=>{var N;try{(N=c.value)==null||N.destroy()}catch{}}),qe(()=>n.table,()=>{var N,H;try{(H=c.value)==null||H.replaceData(((N=n.table)==null?void 0:N.rows)||[])}catch{}}),yt(".dt .tabulator{border:1px solid #d1d4cd;background:#fff;font-size:14px}.dt .tabulator .tabulator-header{background:#f3f3f1;border-bottom:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col{background:#f3f3f1;border-right:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background:#e9ebe6}.dt .tabulator .tabulator-col-title{color:#3b463d;font-weight:700}.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d;padding:3px 6px}.dt .tabulator .tabulator-row{background:#fff;color:#3b463d;border-bottom:1px solid #e6e8e3}.dt .tabulator .tabulator-row.tabulator-row-even{background:#faf9f7}.dt .tabulator .tabulator-row:hover{background:#e9ebe6}.dt .tabulator .tabulator-row .tabulator-cell{border-right:1px solid #e6e8e3;color:#3b463d;unicode-bidi:plaintext}.dt:dir(rtl) .tabulator .tabulator-row .tabulator-cell{text-align:right}.dt .tabulator .tabulator-row .tabulator-cell a{color:#4a7a52;font-weight:600}.dt .tabulator .tabulator-footer{background:#f3f3f1;border-top:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator label{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page{border:1px solid #d1d4cd;background:#fff;color:#3b463d;border-radius:5px}.dt .tabulator .tabulator-footer .tabulator-page.active{background:#92b195;border-color:#92b195;color:#fff}.dt .tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:#e9ebe6;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page:disabled{opacity:.45}.dt,.dt *{box-sizing:border-box}.dt{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.dt-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}.dt-title{font-size:15px;font-weight:700;margin:0}.dt-count{font-size:11.5px;opacity:.6;font-variant-numeric:tabular-nums}.dt-grain{font-size:11px;opacity:.55}.dt-actions{margin-left:auto;display:flex;gap:6px}.dt-btn{font:600 11.5px inherit;padding:5px 11px;border-radius:6px;cursor:pointer;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-btn:hover{background:rgba(0,0,0,.05)}.dt-err{padding:10px 12px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.dt-caveats{margin-top:10px;padding:10px 12px;border-radius:8px;background:rgba(0,0,0,.04);font-size:11.5px;line-height:1.6;opacity:.85}.is-dark .dt-caveats{background:rgba(255,255,255,.06)}.dt-cav-k{font-weight:700;text-transform:capitalize}.dt-scrim{position:fixed;inset:0;z-index:1200;background:rgba(8,12,16,.55);display:flex;align-items:flex-end;justify-content:center}@media(min-width:700px){.dt-scrim{align-items:center}}.dt-sheet{width:100%;max-width:560px;max-height:82vh;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:16px 18px 26px;box-shadow:0 -6px 30px rgba(0,0,0,.3)}@media(min-width:700px){.dt-sheet{border-radius:14px}}.is-dark .dt-sheet{background:#132019;color:#e5e7eb}.dt-sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid rgba(0,0,0,.10);font-size:15px}.dt-close{margin-left:auto;font:600 12px inherit;padding:7px 14px;border-radius:8px;cursor:pointer;min-height:36px;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-dl{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:7px 12px;margin:0;font-size:12.5px}.dt-dl dt{font-weight:700;opacity:.72;text-transform:capitalize}.dt-dl dd{margin:0;word-break:break-word}.dt-dl ul{margin:0;padding-left:16px}.dt-dl a{color:#0b7a5b;font-weight:600}.dt-hint{font-size:11px;opacity:.6;margin:6px 0 0}.dt-wrap{width:100%;overflow:hidden;border:1px solid rgba(0,0,0,.10);border-radius:8px}.is-dark .dt-wrap{border-color:rgba(255,255,255,.12)}","doxa-data-table"),(N,H)=>{var U,pe;return I(),D("div",{class:Ae(["dt",{"is-dark":e.isDark}])},[b("div",Ww,[b("h3",Kw,B(_.value.title||"Data"),1),b("span",Vw,B(p.value.toLocaleString())+" rows",1),_.value.grain?(I(),D("span",qw,"· "+B(_.value.grain),1)):ge("",!0),b("span",Yw,[b("button",{type:"button",class:"dt-btn",onClick:H[0]||(H[0]=he=>O("csv"))},B(o("tables.csv","CSV")),1),b("button",{type:"button",class:"dt-btn",onClick:H[1]||(H[1]=he=>O("json"))},B(o("tables.json","JSON")),1)])]),g.value?(I(),D("div",Jw,B(g.value),1)):ge("",!0),b("div",Zw,[b("div",{ref_key:"host",ref:u},null,512)]),b("p",Xw,[Ie(B(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(I(),D(be,{key:1},[Ie(".")],64)):(I(),D("bdi",Qw," — every field, including the lists the table flattens."))]),i.value?(I(),D("div",{key:1,ref_key:"scrimRef",ref:s,style:Ue(q(l)),class:"dt-scrim",onClick:H[3]||(H[3]=it(he=>i.value=null,["self"]))},[b("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[b("div",t2,[b("strong",null,B(i.value[(pe=(((U=e.table)==null?void 0:U.columns)||[])[0])==null?void 0:pe.field]||"Detail"),1),b("button",{type:"button",class:"dt-close",onClick:H[2]||(H[2]=he=>i.value=null)},B(o("buttons.close","Close")),1)]),b("dl",o2,[(I(!0),D(be,null,Ze(T.value,([he,oe])=>(I(),D(be,{key:he},[b("dt",null,B(S(he)),1),b("dd",null,[w(oe)?(I(),D("a",{key:0,href:oe,target:"_blank",rel:"noopener"},B(oe),9,n2)):L(oe)?(I(),D("ul",a2,[(I(!0),D(be,null,Ze(L(oe),(z,V)=>(I(),D("li",{key:V},B(z),1))),128))])):(I(),D("span",r2,B(oe===!0?"yes":oe===!1?"no":oe),1))])],64))),128))])],8,e2)],4)):ge("",!0),d.value.length?(I(),D("div",i2,[(I(!0),D(be,null,Ze(d.value,he=>(I(),D("div",{key:he.key},[b("bdi",s2,[b("span",l2,B(he.key)+":",1),Ie(" "+B(he.text),1)])]))),128))])):ge("",!0)],2)}}},u2={class:"ct-h"},p2={class:"ct-sub"},d2={class:"ct-tabs"},g2=["onClick"],h2={key:0,class:"ct-n"},m2={key:0,class:"ct-err"},f2={key:1,class:"ct-load"},b2=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Ce("profileConfig",ue(null)),o=W(()=>{var _;return((_=t.value)==null?void 0:_.isDark)===!0}),n=W(()=>Ni(t.value)),a=Jn("connectivity"),r=_=>(Number(_)||0).toLocaleString(),i=[{id:"cities",label:"Key Cities",file:"key-cities"},{id:"internet",label:"Connectivity",file:"country-connectivity"},{id:"operators",label:"ISPs & Carriers",file:"network-operators"},{id:"social",label:"Social Platforms",file:"social-platforms"},{id:"messaging",label:"Messaging Apps",file:"messaging-channels"}],s=ue("cities"),l=W(()=>i.find(_=>_.id===s.value)||i[0]),u=ue({}),c=ue(!1),g=ue(null);async function h(_){if(!u.value[_]){c.value=!0,g.value=null;try{const p=await fetch(`${n.value}/tables/${_}.json`);if(!p.ok)throw new Error(`table not found (${p.status})`);u.value={...u.value,[_]:await p.json()}}catch(p){g.value=String(p.message||p)}finally{c.value=!1}}}qe(l,_=>_&&h(_.file),{immediate:!0});const y=W(()=>{var _;return u.value[(_=l.value)==null?void 0:_.file]||null});return yt(".ct{position:absolute;inset:0;overflow-y:auto;padding:18px;background:#f6f7f9;color:#0f1419;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.ct.is-dark{background:#0a1410;color:#e5e7eb}.ct-h{margin:0 0 4px;font-size:18px;font-weight:700}.ct-sub{margin:0 0 14px;font-size:12.5px;opacity:.72;line-height:1.5}.ct-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.ct-tab{font:600 12px inherit;padding:7px 14px;border-radius:999px;cursor:pointer;border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit}.ct-tab.on{background:#10b981;border-color:#10b981;color:#04241a}.ct-load{padding:22px;text-align:center;font-size:12.5px;opacity:.6}.ct-err{padding:11px 13px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.ct-n{font-size:10.5px;opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}","doxa-cities-tables"),(_,p)=>(I(),D("div",{class:Ae(["ct",{"is-dark":o.value}])},[b("h2",u2,B(q(a)("connectivity.tables.title")),1),b("p",p2,B(q(a)("connectivity.tables.intro")),1),b("div",d2,[(I(),D(be,null,Ze(i,d=>b("button",{key:d.id,type:"button",class:Ae(["ct-tab",{on:s.value===d.id}]),onClick:v=>s.value=d.id},[Ie(B(q(a)("connectivity.tables.tabs."+d.id)),1),u.value[d.file]?(I(),D("span",h2,B(r((u.value[d.file].rows||[]).length)),1)):ge("",!0)],10,g2)),64))]),g.value?(I(),D("div",m2,B(g.value),1)):y.value?(I(),Xe(c2,{key:l.value.id,table:y.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(I(),D("div",f2,B(q(a)("connectivity.tables.loading",{name:q(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),_2="pplrInstance";function y2(){return Ce(_2,null)}const $2="",v2=["data-theme"],w2={class:"stl-inner"},k2={class:"stl-tb-caret-slot"},x2=["title","aria-label","aria-expanded"],S2={class:"stl-tb-eyebrow"},A2=["title","aria-label"],C2=["title"],P2={key:2,class:"stl-tb-title"},L2={key:3,class:"stl-export"},N2=["aria-expanded","title","aria-label"],T2={class:"stl-export-label"},O2={class:"stl-export-menu",role:"menu"},E2={class:"stl-export-item-label"},I2={class:"stl-export-item-label"},F2={key:0,class:"stl-tabs-wrap"},M2={class:"stl-tabs"},R2=["onClick"],D2=["title","onClick"],B2={key:0,class:"stl-info-pop"},G2={class:"stl-col-hdr"},z2={class:"stl-hdr-name"},H2=["title"],U2={key:0,class:"stl-sort-arrow"},j2=["title"],W2={key:0,class:"stl-sort-arrow"},K2=["data-stl-node-id","onClick"],V2=["aria-expanded","aria-label","onClick"],q2={key:1,class:"stl-caret-sp"},Y2={key:3,class:"stl-dot-sp"},J2={class:"stl-name"},Z2={key:4,class:"stl-num"},X2={key:5,class:"stl-num"},Q2={class:"stl-x-slot"},ek=["title","aria-label"],tk={key:0,class:"stl-empty stl-loading"},ok={key:1,class:"stl-empty"},nk={key:2,class:"stl-empty"},ak={key:3,class:"stl-overflow"},rk={class:"stl-overflow-hint"},ik=["data-theme","title","aria-label"],sk={class:"stl-reopen-label"},lk=Wo({__name:"SemanticTreeLegend",props:{nodes:{type:Array,default:()=>[]},pinNote:{type:Boolean,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columns:{type:Array,default:()=>["count","pop"]},title:{type:String,default:"Legend"},hideTabs:{type:Boolean,default:!1},columnLabel:{type:String,default:""},open:{type:Boolean,default:null},exportEnabled:{type:Boolean,default:!1},progress:{type:Object,default:null}},emits:["select","update:open","export"],setup(e,{emit:t}){const o=(E,K)=>Xt(E)||K,n=E=>String(E).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,K=>K.toUpperCase()),{t:a,te:r}=Wu("",{fallback:E=>n(E)});function i(E){const K="tabs."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.label)??""}function s(E){const K="legend.tabInfo."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.info)??""}const l=e,u=t,c=y2(),g=Ce("legendProgress",null),h=W(()=>l.progress??q(g)??null),y=W(()=>h.value?a("legend.progress.title"):l.title),_=W(()=>((c==null?void 0:c.theme.value)||"dark")==="dark"),p=Ce("dataStore",null),d=Ce("normalizedPeopleGroups",null),v=E=>!!(E&&hr(E)&&$s(E)),C=W(()=>{var K,fe;if(l.pinNote!==null)return l.pinNote;if((K=d==null?void 0:d.value)!=null&&K.length)return d.value.slice(0,20).some(v);const E=(p==null?void 0:p.sources)||{};for(const ye in E)if((((fe=E[ye])==null?void 0:fe.features)||[]).slice(0,20).some(v))return!0;return!1});function x(E,K){var fe;for(const ye of E||[]){if((ye==null?void 0:ye.id)===K)return ye;const Ne=(fe=ye==null?void 0:ye.children)!=null&&fe.length?x(ye.children,K):null;if(Ne)return Ne}return null}function k(E){const K=x(N.value,E);K&&Z(K)}function S(E,K=0){return E!=null&&E.length?Math.max(...E.map(fe=>S(fe.children??[],K+1))):K}function L(E,K,fe=0){return fe===K?E.slice():E.flatMap(ye=>L(ye.children??[],K,fe+1))}function w(E,K,fe=[]){var ye;for(const Ne of E){if(Ne.id===K)return fe;if((ye=Ne.children)!=null&&ye.length){const Qe=w(Ne.children,K,[...fe,Ne]);if(Qe)return Qe}}return null}function T(E,K=new Set){var fe;if(!((fe=E==null?void 0:E.children)!=null&&fe.length))return K;for(const ye of E.children)K.add(ye.id),T(ye,K);return K}function O(E,K="root"){var ye;if(!Array.isArray(E))return[];const fe=[];for(const Ne of E){if(!Ne||typeof Ne!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",K)}catch{}continue}fe.push((ye=Ne.children)!=null&&ye.length?{...Ne,children:O(Ne.children,Ne.label||Ne.id||K)}:Ne)}return fe}const N=W(()=>O(l.nodes)),H=W(()=>S(N.value)),U=W(()=>{const E=l.tabs??[],K=E.length||H.value+1;return Array.from({length:K},(fe,ye)=>E[ye]??{id:`gen${ye+1}`,label:`Generation ${ye+1}`})}),pe=ue(Math.max(0,l.defaultTab|0)),he=ue(new Set),oe=ue(null),z=ue(l.open!==null?l.open:!0),V=ue(null),te=ue(!1),{scrimRef:ae,scrimStyle:ne}=od(te),se=ue(null),le=ue("desc"),xe=W({get:()=>{var E;return l.hideTabs?0:c&&!((E=c.activeTabTouched)!=null&&E.value)?Math.min(Math.max(0,l.defaultTab|0),Math.max(0,U.value.length-1)):c?c.activeTab.value:pe.value},set:E=>{l.hideTabs||(c?(c.activeTab.value=E,c.activeTabTouched&&(c.activeTabTouched.value=!0)):pe.value=E)}}),ke=W({get:()=>c?c.selection.value:oe.value,set:E=>{c?c.selection.value=E:oe.value=E}}),Je=W(()=>{var E;return((E=ke.value)==null?void 0:E.id)||null}),Y=ue(null);qe(()=>l.open,E=>{E!==null&&(z.value=E)}),qe(()=>N.value,()=>{var Qe,Te;const E=((Qe=ke.value)==null?void 0:Qe.id)||null;if(E){const ht=x(N.value,E);if(ht){ke.value=ht;return}}const K=c?(Te=c.activeTabTouched)==null?void 0:Te.value:!1,fe=K?c==null?void 0:c.activeTab.value:void 0,ye=Math.min(Math.max(0,l.defaultTab|0),Math.max(0,U.value.length-1)),Ne=typeof fe=="number"&&fe>=0?fe:ye;c?(c.activeTab.value=Ne,!K&&c.activeTabTouched&&(c.activeTabTouched.value=!1)):pe.value=Ne,he.value=new Set,ke.value=null,u("select",null)},{deep:!1});let X=null;c&&qe(()=>c.selection.value,E=>{if((E==null?void 0:E.id)===X)return;if(!E){X=null;return}X=E.id;const K=w(N.value,E.id)||[];typeof E.depth=="number"&&(xe.value=Math.min(E.depth,U.value.length-1));const fe=new Set;K.forEach(ye=>fe.add(ye.id)),he.value=fe,u("select",E)});function ce(E,K){const fe=(K.pop??0)-(E.pop??0);return fe!==0?fe:(K.count??0)-(E.count??0)}const $e=W(()=>{if(!se.value)return ce;const E=se.value,K=le.value==="asc"?1:-1;return(fe,ye)=>((fe[E]??0)-(ye[E]??0))*K});function _e(E){se.value===E?le.value==="desc"?le.value="asc":(se.value=null,le.value="desc"):(se.value=E,le.value="desc")}const Le=ue([]),$=ue(!1);let P=-1;function A(E){if(Le.value[E]){$.value=!1;return}$.value=!0,P=E,setTimeout(()=>{if(P!==E)return;const K=[...L(N.value,E)].sort($e.value),fe=[...Le.value];fe[E]=K,Le.value=fe,$.value=!1},0)}qe(xe,E=>A(E),{immediate:!0}),qe(()=>[N.value,se.value,le.value],()=>{Le.value=[],A(xe.value)},{deep:!1});const G=W(()=>Le.value[xe.value]||[]),Q=W(()=>{var K;const E=(K=U.value[xe.value])==null?void 0:K.topLimit;return E?G.value.slice(0,E):G.value}),ee=W(()=>{var K;const E=(K=U.value[xe.value])==null?void 0:K.topLimit;return E?Math.max(0,G.value.length-E):0});function ie(E,K,fe,ye,Ne){var Qe;for(const Te of K)Te&&(E.push({node:Te,relDepth:fe,parent:ye,ancestors:Ne}),he.value.has(Te.id)&&((Qe=Te.children)!=null&&Qe.length)&&ie(E,[...Te.children].sort($e.value),fe+1,Te,[...Ne,Te]))}const re=W(()=>{const E=[];ie(E,Q.value,0,null,[]);for(let K=0;KNe+1&&vt.ancestors[Ne]}if(Ne===fe.relDepth-1){let ht=!1;for(let vt=K+1;vtJe.value!==null),m=W(()=>l.columns.includes("count")),R=W(()=>l.columns.includes("pop")),M=W(()=>ke.value?T(ke.value):new Set),J=W(()=>{var Qe;const E=ke.value;if(!E)return null;const K=w(N.value,E.id);if(!K||!K.length)return null;const fe=K[K.length-1],ye=K.length-1,Ne=((Qe=U.value[ye])==null?void 0:Qe.label)||"Parent";return{node:fe,tabName:Ne,depth:ye}});function Z(E){Je.value===E.id?(X=null,ke.value=null,u("select",null)):(X=E.id,ke.value=E,u("select",E))}function F(E,K){K==null||K.stopPropagation();const fe=new Set(he.value),ye=fe.has(E);if(ye?fe.delete(E):fe.add(E),he.value=fe,ye&&ke.value){const Ne=w(N.value,ke.value.id);Ne&&Ne.some(Qe=>Qe.id===E)&&(X=null,ke.value=null,u("select",null))}}function j(){const E=J.value;E!=null&&E.node&&(!l.hideTabs&&typeof E.depth=="number"&&(xe.value=E.depth),he.value=new Set,Z(E.node))}function me(E){if(xe.value===E){V.value=V.value===E?null:E;return}xe.value=E,he.value=new Set,X=null,ke.value=null,V.value=null,u("select",null)}function Oe(E){E==null||E.stopPropagation(),X=null,ke.value=null,u("select",null)}function ze(E,K){K==null||K.stopPropagation(),V.value=V.value===E?null:E}function pt(E){E==null||E.stopPropagation(),te.value=!te.value}function ot(E){te.value=!1,u("export",E)}qe(Je,E=>{E||(te.value=!1)});function _o(E){let K=E.parentElement;for(;K;){const fe=getComputedStyle(K).overflowY;if((fe==="auto"||fe==="scroll")&&K.scrollHeight>K.clientHeight+1){const ye=E.getBoundingClientRect(),Ne=K.getBoundingClientRect();K.scrollTop+=ye.top-Ne.top-8}K=K.parentElement}}let _n=0;qe(Je,async E=>{if(!E)return;const K=++_n,fe=Y.value;if(!fe)return;await jt();const ye=(Ne=0)=>{if(K!==_n)return;const Qe=fe.querySelector(`[data-stl-node-id="${CSS.escape(String(E))}"]`);Qe&&_o(Qe),Ne<6&&setTimeout(()=>ye(Ne+1),70)};ye(0)});function $t(E){return E?E>=1e6?(E/1e6).toFixed(1)+"M":E>=1e3?Math.round(E/1e3)+"k":E.toLocaleString():"—"}function Ct(E){return E!=null?E.toLocaleString():"—"}function mr(E){var K;return{selected:Je.value===E.node.id,descendant:f.value&&M.value.has(E.node.id),child:E.relDepth>0,leaf:!((K=E.node.children)!=null&&K.length)}}return yt(` +`,"legend-component");const a=e;Ce("mapStore");const r=Ce("dataStore"),i=Ce("uiStore"),s=nl(a,"legendType"),{items:l,columns:u,title:c,activeFilter:g,setFilter:h,totalCount:y,totalPopulation:_,progress:p,fmtPop:d,fmtCount:v}=Wp(s,td),C=Ce("normalizedPeopleGroups",null),x=W(()=>{var z,V;if((z=C==null?void 0:C.value)!=null&&z.length)return C.value;const oe=[];for(const te in r.sources){const ae=r.sources[te];(V=ae==null?void 0:ae.features)!=null&&V.length&&oe.push(...ae.features)}return oe}),k=Ce("mapId",null),S=W(()=>i.isMobile),L=W(()=>i.legendMode),w=W(()=>i.selectedPeopleGroup),T=W(()=>vs(x.value)),O=W(()=>w.value?ed(T.value,w.value):[]),N=ue(a.initiallyCollapsed);let H=null;const U=W(()=>{var oe;return L.value==="detail"&&w.value?((oe=w.value.properties)==null?void 0:oe.name)||n("legend.header.peopleGroupFallback"):N.value?n("legend.header.collapsed"):c.value});function pe(){N.value=!N.value}qe(L,(oe,z)=>{oe==="detail"&&z!=="detail"&&N.value&&(N.value=!1)});function he(oe){h(oe)}return Wt(()=>{window.innerWidth<768&&(N.value=!0),H=oe=>{var z;k&&((z=oe.detail)!=null&&z.mapId)&&oe.detail.mapId!==k||(N.value=!1)},window.addEventListener("dxm:openDesktopLegend",H)}),Kt(()=>{H&&window.removeEventListener("dxm:openDesktopLegend",H)}),(oe,z)=>S.value?(I(),Xe(q(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):N.value?(I(),D("button",{key:1,class:Ae(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:z[0]||(z[0]=V=>N.value=!1)},[z[2]||(z[2]=b("svg",{class:"legend-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),b("span",tw,B(q(c)),1),z[3]||(z[3]=b("svg",{class:"legend-reopen-caret",width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,ew)):(I(),D("div",{key:2,class:Ae(["legend-container",{"legend-dark":e.isDark}])},[L.value==="detail"?(I(),D("button",{key:0,class:"detail-collapse-btn",onClick:it(pe,["stop"]),"aria-label":q(n)("aria.toggleLegend")},null,8,ow)):ge("",!0),L.value==="detail"?(I(),D("button",{key:1,class:"detail-close-btn",onClick:z[1]||(z[1]=it(V=>q(i).selectPeopleGroup(null),["stop"])),"aria-label":q(n)("aria.backToLegend")},[...z[4]||(z[4]=[b("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,nw)):ge("",!0),b("div",{class:Ae(["legend-content",{"no-padding":q(u).length>0}])},[L.value==="detail"&&w.value?(I(),D(be,{key:0},[Be(Xp,{peopleGroup:w.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),Be(na,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(I(),D(be,{key:1},[],64)):(I(),Xe(Vp,{key:2,title:U.value,items:q(l),columns:q(u),activeFilter:q(g),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:q(y),totalPopulation:q(_),fmtPop:q(d),fmtCount:q(v),progress:q(p),onFilterClick:he},{"title-caret":It(()=>[b("button",{class:"legend-collapse-caret",onClick:it(pe,["stop"]),"aria-label":q(n)("aria.toggleLegend")},[...z[5]||(z[5]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",style:{transform:"rotate(180deg)","transform-origin":"center"}})],-1)])],8,aw)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),L.value!=="detail"?(I(),Xe(na,{key:3,dark:e.isDark},null,8,["dark"])):ge("",!0)],2)],2))}},[["styles",[Qv]],["__scopeId","data-v-2037a3c3"]]),iw={class:"gm-legend"},sw={class:"gm-title"},lw={class:"gm-keys"},cw={key:0,class:"gm-key"},uw={class:"gm-caveat"},pw={key:0,class:"gm-adm1"},dw={class:"gm-adm1-h"},gw=["aria-label"],hw=["aria-pressed"],mw=["aria-pressed"],fw={class:"gm-keys"},bw={class:"gm-caveat"},_w={key:0,class:"gm-caveat"},yw={key:1,class:"gm-err"},$w={key:2,class:"gm-pg-desktop"},vw={key:3,class:"gm-pg-mobile"},ww={key:4,class:"gm-sheet"},kw={class:"gm-sh-head"},xw={class:"gm-sh-name"},Sw={class:"gm-list-h"},Aw={class:"gm-adm1-t"},Cw={class:"gm-note"},Pw={key:5,class:"gm-sheet"},Lw={class:"gm-sh-head"},Nw={class:"gm-sh-name"},Tw={key:0,class:"gm-ai"},Ow=["aria-label"],Ew={class:"gm-stat"},Iw={class:"gm-stat"},Fw={class:"gm-stat"},Mw={class:"gm-stat"},Rw={class:"gm-stat"},Dw={key:1,class:"gm-list"},Bw={class:"gm-list-h"},Gw={key:2,class:"gm-list"},zw={class:"gm-list-h"},Hw={class:"gm-note"},ws="#1e293b",Uw=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=ui(()=>yn(()=>Promise.resolve().then(()=>rd),void 0)),o=Ce("profileConfig",ue(null)),n=W(()=>{var Y;return((Y=o.value)==null?void 0:Y.isDark)===!0}),a=Ce("mapboxToken",null),r=W(()=>{var Y;return((Y=o.value)==null?void 0:Y.tk)||(a==null?void 0:a.value)||typeof window<"u"&&window.MAP_TOKEN||""}),i=W(()=>Ni(o.value)),s=ue(null),l=Mo(null),u=ue([]),c=ue(null),g=ue(!0),h=ue(null),y=Mo(null),_=ue("women"),p=ue(null),d=Ce("uiStore",null),v=(()=>{var X;const Y=(X=Ce("lang",null))==null?void 0:X.value;return Y&&Y!=="en"?Y:null})(),C=()=>{if(v)return v;const Y=o.value;if(Y&&(Y.locale||Y.lang))return String(Y.locale||Y.lang);try{const X=new URLSearchParams(location.search);return X.get("lang")||X.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},x=new tp({locale:v,profileConfig:o}),k=Mo([]),S=ue(0),L=o1({getMap:()=>l.value,getActivePinColor:()=>ws});async function w(){await x.init();const Y=await x.setActiveSource("pray-tools");k.value=$o(Y||[])}function T(){const Y=[];for(const X of k.value){const ce=parseFloat(X.longitude??X.lng),$e=parseFloat(X.latitude??X.lat);if(!isFinite(ce)||!isFinite($e))continue;const _e=X._normalized||{};Y.push({type:"Feature",properties:{uniqueId:X.uniqueId,slug:X.slug||"",name:X.name,language:X.language,languageFamily:X.languageFamily||_e.languageFamily||"",country:X.country,countryIso:X.countryIso,countryIsoLabel:X.countryIsoLabel,countryName:X.countryName,religion:X.religion,religionLabel:X.religionLabel,religionName:X.religionName,population:X.population,status:X.status,description:X.description||"",imageUrl:X.imageUrl||"",peoplePraying:Number(X.peoplePraying??_e.peoplePraying??0)},geometry:{type:"Point",coordinates:[ce,$e]}})}return{type:"FeatureCollection",features:Y}}function O(Y){if(!k.value.length||Y.getSource("language-families"))return;const X=T();if(S.value=X.features.length,Y.addSource("language-families",{type:"geojson",data:X,promoteId:"uniqueId"}),X.features.length){let ce=180,$e=90,_e=-180,Le=-90;for(const P of X.features){const[A,G]=P.geometry.coordinates;A_e&&(_e=A),G<$e&&($e=G),G>Le&&(Le=G)}const $=Math.round(Math.min(Y.getContainer().clientWidth,Y.getContainer().clientHeight)*.06)+8;try{const P=Y.cameraForBounds([[ce,$e],[_e,Le]],{padding:$});if(Y.fitBounds([[ce,$e],[_e,Le]],{padding:$,duration:0}),P&&Y.getZoom()>P.zoom+.05){const A=Y.getBounds(),G=Math.min(360,A.getEast()-A.getWest());let Q=Y.getCenter().lng,ee=-1;for(let ie=-180;ie<180;ie+=5){let re=0;for(const f of X.features){let m=f.geometry.coordinates[0]-ie;m=(m+540)%360-180,Math.abs(m)<=G/2&&re++}re>ee&&(ee=re,Q=ie)}Y.jumpTo({center:[Q,($e+Le)/2]})}}catch{}}Y.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":ws,"circle-radius":["interpolate",["linear"],["zoom"],0,2.6,4,3.6,8,6,12,8.5],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],0,1,6,1.4,12,1.8],"circle-opacity":.95}}),Y.on("click","ci-pg-dots",ce=>{var _e;const $e=(_e=ce.features)==null?void 0:_e[0];!$e||!d||(c.value=null,d.selectPeopleGroup($e))}),Y.on("mouseenter","ci-pg-dots",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-pg-dots",()=>{Y.getCanvas().style.cursor=""}),typeof window<"u"&&(window.__ciState=()=>{var ce,$e;return{groups:k.value.length,dots:S.value,hasLayer:!!Y.getLayer("ci-pg-dots"),rendered:Y.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:(($e=(ce=d==null?void 0:d.selectedPeopleGroup)==null?void 0:ce.properties)==null?void 0:$e.slug)||null}},window.__ciMap=Y)}const N=Jn("connectivity"),H=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],U=Y=>(H.find(X=>X.id===Y)||{}).color||"#9aa2ad",pe=W(()=>{const Y={};for(const X of u.value)Y[X.iso3]=X;return Y});async function he(){const[Y,X]=await Promise.all([fetch(`${i.value}/tables/internet-by-country.json`).then(ce=>ce.json()),fetch(`${i.value}/boundaries/world-adm0-web.geojson`).then(ce=>ce.json())]);return u.value=Y.countries||[],X}function oe(Y,X){const ce=pe.value,_e={type:"FeatureCollection",features:(X.features||[]).map(Le=>{var A;const $=(A=Le.properties)==null?void 0:A.iso3,P=ce[$];return{type:"Feature",properties:{iso3:$,band:(P==null?void 0:P.band)||"none",color:P?U(P.band):"rgba(0,0,0,0)",hasData:!!P},geometry:Le.geometry}})};if(Y.getSource("ci-src")){Y.getSource("ci-src").setData(_e);return}Y.addSource("ci-src",{type:"geojson",data:_e}),Y.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),Y.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),Y.on("click","ci-fill",Le=>{var P,A,G;if(Y.getLayer("ci-pg-dots")&&Y.queryRenderedFeatures(Le.point,{layers:["ci-pg-dots"]}).length)return;const $=(G=(A=(P=Le.features)==null?void 0:P[0])==null?void 0:A.properties)==null?void 0:G.iso3;$&&pe.value[$]&&(d==null||d.selectPeopleGroup(null),p.value=null,c.value=pe.value[$])}),Y.on("mouseenter","ci-fill",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-fill",()=>{Y.getCanvas().style.cursor=""})}const z=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],V=Y=>["case",["==",["typeof",["get",Y]],"number"],["step",["get",Y],...z.flatMap((X,ce)=>ce===0?[X.color]:[X.from,X.color])],"rgba(0,0,0,0)"];async function te(){var $e;const[Y,X]=await Promise.all([fetch(`${i.value}/tables/internet-by-adm1.json`).then(_e=>{if(!_e.ok)throw new Error("internet-by-adm1 "+_e.status);return _e.json()}),fetch(`${i.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(_e=>{if(!_e.ok)throw new Error("gb-IND-ADM1-full "+_e.status);return _e.json()})]),ce={};for(const _e of Y.rows||[]){if(_e.iso3!=="IND"||_e.measure!=="ever_used_internet"||!_e.adm1)continue;const Le=ce[$e=_e.adm1]??(ce[$e]={name:_e.adm1_name||_e.adm1,women:{},men:{}});Le[_e.sex][_e.area]=_e.value}return y.value=$o({meta:Y.meta||{},byArea:ce}),X}function ae(Y,X){const ce=y.value.byArea,$e={type:"FeatureCollection",features:(X.features||[]).map(Le=>{var P,A;const $=ce[(P=Le.properties)==null?void 0:P.shapeName];return{type:"Feature",geometry:Le.geometry,properties:{adm1:(A=Le.properties)==null?void 0:A.shapeName,women:($==null?void 0:$.women.total)??null,men:($==null?void 0:$.men.total)??null}}})},_e=Y.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;Y.addSource("ci-adm1-src",{type:"geojson",data:$e}),Y.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":V(_.value),"fill-opacity":.85}},_e),Y.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},_e),Y.getLayer("ci-fill")&&Y.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),Y.on("click","ci-adm1-fill",Le=>{var A,G,Q;if(Y.getLayer("ci-pg-dots")&&Y.queryRenderedFeatures(Le.point,{layers:["ci-pg-dots"]}).length)return;const $=(Q=(G=(A=Le.features)==null?void 0:A[0])==null?void 0:G.properties)==null?void 0:Q.adm1,P=$&&ce[$];P&&(d==null||d.selectPeopleGroup(null),c.value=null,p.value={key:$,...P})}),Y.on("mouseenter","ci-adm1-fill",()=>{Y.getCanvas().style.cursor="pointer"}),Y.on("mouseleave","ci-adm1-fill",()=>{Y.getCanvas().style.cursor=""})}function ne(Y){_.value=Y;const X=l.value;X!=null&&X.getLayer("ci-adm1-fill")&&X.setPaintProperty("ci-adm1-fill","fill-color",V(Y))}const se=W(()=>{var Y,X,ce,$e;return((($e=(ce=(X=(Y=y.value)==null?void 0:Y.meta)==null?void 0:X.boundaries)==null?void 0:ce.IND)==null?void 0:$e.missing)||[]).join(", ")}),le=M$(Ce("profileConfig",null));let xe=!1;Wt(async()=>{try{await J$(le)}catch{}const Y=Ei(le);if(!xe){if(!Y){const X=le==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${X} engine did not load; refusing to substitute another engine.`);const ce=N("messages.engineMissing",{engine:X});h.value=ce&&ce!=="messages.engineMissing"?ce:`The ${X} map engine did not load.`;return}if(!s.value){h.value="map engine not loaded";return}U$(Y);try{const X=w().catch($=>{console.warn("[connectivity-map] people groups:",($==null?void 0:$.message)||$)}),ce=te().catch($=>(console.warn("[connectivity-map] India by state:",($==null?void 0:$.message)||$),null)),$e=await he();if(xe||!s.value)return;const _e=Y$(le);if(_e&&await Z$(s.value,_e),xe||!s.value)return;const Le=new Y.Map({container:s.value,style:z$(n.value?"ink":"paper",le).style||(n.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:r.value,locale:q$(C(),le),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});l.value=$o(Le),e$(Le,{boundaries:!0}),Le.once("load",async()=>{try{K$(Le,C())}catch{}oe(Le,$e),L.initialize(),await X,O(Le);const $=await ce;$&&!xe&&ae(Le,$)})}catch(X){h.value=String(X.message||X)}}}),Kt(()=>{var Y;xe=!0,L.cleanup(),d==null||d.selectPeopleGroup(null);try{(Y=l.value)==null||Y.remove()}catch{}});const ke=Y=>(Number(Y)||0).toLocaleString(),Je=W(()=>!!(d!=null&&d.selectedPeopleGroup));return yt(".gm{position:absolute;inset:0;overflow:hidden}.gm-map{position:absolute;inset:0}.gm-legend{position:absolute;top:8px;inset-inline-start:8px;width:var(--map-legend-width,380px);max-width:calc(100% - 16px);box-sizing:border-box;z-index:4;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.94);color:#0f1419;font:12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.16)}@media(max-width:480px){.gm-legend{width:auto;inset-inline-end:46px}}.is-dark .gm-legend{background:rgba(19,32,25,.95);color:#e5e7eb}.gm-title{font-weight:700;font-size:12.5px;margin-bottom:5px}.gm-keys{display:flex;flex-wrap:wrap;gap:5px 12px}.gm-key{display:flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.gm-sw{width:12px;height:12px;border-radius:3px;flex:none}.gm-caveat{margin-top:5px;font-size:10.5px;opacity:.72;line-height:1.4}.gm-adm1{margin-top:8px;padding-top:7px;border-top:1px solid rgba(0,0,0,.12)}.gm-adm1-h{font-weight:600;font-size:12px;margin-bottom:5px}.gm-seg{display:inline-flex;border:1px solid rgba(0,0,0,.2);border-radius:6px;overflow:hidden;margin-bottom:6px}.gm-seg button{font:inherit;font-size:11px;padding:3px 10px;min-height:24px;border:0;background:transparent;color:inherit;cursor:pointer}.gm-seg button.on{background:#08519c;color:#fff}.gm-adm1-t{width:100%;border-collapse:collapse;font-size:12px;margin:4px 0 6px}.gm-adm1-t th,.gm-adm1-t td{padding:3px 4px;text-align:end}.gm-adm1-t th:first-child{text-align:start}.is-dark .gm-adm1{border-top-color:rgba(255,255,255,.15)}.is-dark .gm-seg{border-color:rgba(255,255,255,.3)}.gm-sheet{position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:62%;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:14px 16px 22px;font:13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 -6px 26px rgba(0,0,0,.28)}@media(min-width:700px){.gm-sheet{inset-inline-start:auto;inset-inline-end:14px;bottom:14px;width:330px;border-radius:12px}}.is-dark .gm-sheet{background:#132019;color:#e5e7eb}.gm-sh-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.gm-sh-name{font-weight:800;font-size:15px}.gm-ai{display:flex;align-items:flex-start;gap:8px;margin:0 0 10px;padding:7px 9px;border-radius:8px;font-size:11px;line-height:1.35;background:rgba(180,120,0,.12);color:#7a4f00;border:1px solid rgba(180,120,0,.25)}.is-dark .gm-ai{background:rgba(255,200,80,.10);color:#f0cf88;border-color:rgba(255,200,80,.22)}.gm-ai-x{margin-left:auto;flex:none;border:0;background:none;cursor:pointer;font-size:15px;line-height:1;color:inherit;opacity:.7;padding:0 2px}.gm-ai-x:hover{opacity:1}.gm-x{margin-left:auto;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit;font:600 12px inherit;padding:6px 12px;border-radius:8px;cursor:pointer;min-height:34px}.gm-stat{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border-bottom:1px solid rgba(0,0,0,.07);font-variant-numeric:tabular-nums}.is-dark .gm-stat{border-bottom-color:rgba(255,255,255,.09)}.gm-stat b{font-weight:700}.gm-list{margin-top:9px}.gm-list-h{font-weight:700;font-size:12px;margin-bottom:3px}.gm-list ul{margin:0;padding-left:17px;font-size:12px;line-height:1.5}.gm-note{margin-top:9px;font-size:11px;line-height:1.5;opacity:.75}.gm-err{position:absolute;top:50%;left:0;right:0;text-align:center;font-size:13px;opacity:.7}.gm-dot{width:10px;height:10px;border-radius:50%;flex:none;box-sizing:border-box;border:1.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}.gm-pg-mobile{display:none}@media(max-width:767px){.gm-pg-mobile{display:block}.gm-pg-desktop{display:none}}","doxa-connectivity-map"),(Y,X)=>(I(),D("div",{class:Ae(["gm",{"is-dark":n.value}])},[b("div",{ref_key:"mapEl",ref:s,class:"gm-map"},null,512),l.value?(I(),Xe(t$,{key:0},{default:It(()=>[Be(n$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(a$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(r$,{map:l.value,"is-dark":n.value},null,8,["map","is-dark"]),Be(l$,{"map-container":s.value,"is-dark":n.value},null,8,["map-container","is-dark"]),Be(E$,{"is-dark":n.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ge("",!0),Ir(b("div",iw,[b("div",sw,B(q(N)("connectivity.title")),1),b("div",lw,[(I(),D(be,null,Ze(H,ce=>b("span",{key:ce.id,class:"gm-key"},[b("i",{class:"gm-sw",style:Ue({background:ce.color})},null,4),Ie(B(q(N)("connectivity.bands."+ce.id)),1)])),64)),k.value.length?(I(),D("span",cw,[b("i",{class:"gm-dot",style:Ue({background:ws})},null,4),Ie(B(q(N)("connectivity.peopleGroup"))+" ("+B(ke(k.value.length))+") ",1)])):ge("",!0)]),b("div",uw,B(q(N)("connectivity.caveat")),1),y.value?(I(),D("div",pw,[b("div",dw,B(q(N)("connectivity.adm1.title")),1),b("div",{class:"gm-seg",role:"group","aria-label":q(N)("connectivity.adm1.title")},[b("button",{type:"button",class:Ae({on:_.value==="women"}),"aria-pressed":_.value==="women",onClick:X[0]||(X[0]=ce=>ne("women"))},B(q(N)("connectivity.adm1.women")),11,hw),b("button",{type:"button",class:Ae({on:_.value==="men"}),"aria-pressed":_.value==="men",onClick:X[1]||(X[1]=ce=>ne("men"))},B(q(N)("connectivity.adm1.men")),11,mw)],8,gw),b("div",fw,[(I(),D(be,null,Ze(z,(ce,$e)=>b("span",{key:ce.from,class:"gm-key"},[b("i",{class:"gm-sw",style:Ue({background:ce.color})},null,4),Ie(B($e+1p.value=null)},B(q(N)("connectivity.sheet.close")),1)]),b("div",Sw,B(q(N)("connectivity.adm1.title")),1),b("table",Aw,[b("thead",null,[b("tr",null,[X[5]||(X[5]=b("th",null,null,-1)),b("th",null,B(q(N)("connectivity.adm1.total")),1),b("th",null,B(q(N)("connectivity.adm1.urban")),1),b("th",null,B(q(N)("connectivity.adm1.rural")),1)])]),b("tbody",null,[(I(),D(be,null,Ze(["women","men"],ce=>b("tr",{key:ce},[b("th",null,B(q(N)("connectivity.adm1."+ce)),1),(I(),D(be,null,Ze(["total","urban","rural"],$e=>b("td",{key:$e},B(p.value[ce][$e]!=null?p.value[ce][$e]+"%":"—"),1)),64))])),64))])]),b("p",Cw,B(q(N)("connectivity.adm1.source")),1)])):ge("",!0),c.value?(I(),D("div",Pw,[b("div",Lw,[b("span",Nw,B(c.value.country),1),b("button",{type:"button",class:"gm-x",onClick:X[3]||(X[3]=ce=>c.value=null)},B(q(N)("connectivity.sheet.close")),1)]),g.value?(I(),D("div",Tw,[b("span",null,B(q(N)("connectivity.sheet.ai")),1),b("button",{type:"button",class:"gm-ai-x",onClick:X[4]||(X[4]=ce=>g.value=!1),"aria-label":q(N)("connectivity.sheet.dismiss")},"×",8,Ow)])):ge("",!0),b("div",Ew,[b("span",null,B(q(N)("connectivity.sheet.internetUsers")),1),b("b",null,B(c.value.internet_pct!=null?c.value.internet_pct+"%":q(N)("connectivity.sheet.unknown")),1)]),b("div",Iw,[b("span",null,B(q(N)("connectivity.sheet.measured")),1),b("b",null,B(c.value.internet_year||"—"),1)]),b("div",Fw,[b("span",null,B(q(N)("connectivity.sheet.mobilePer100")),1),b("b",null,B(c.value.mobile_per_100??"—"),1)]),b("div",Mw,[b("span",null,B(q(N)("connectivity.sheet.peopleGroups")),1),b("b",null,B(ke(c.value.people_groups)),1)]),b("div",Rw,[b("span",null,B(q(N)("connectivity.sheet.topPlatform")),1),b("b",null,[Ie(B(c.value.top_platform||q(N)("connectivity.sheet.unknown")),1),c.value.top_platform_pct?(I(),D(be,{key:0},[Ie(" · "+B(c.value.top_platform_pct)+"%",1)],64)):ge("",!0)])]),c.value.carriers&&c.value.carriers.length?(I(),D("div",Dw,[b("div",Bw,B(q(N)("connectivity.sheet.carriers",{n:c.value.carrier_count})),1),b("ul",null,[(I(!0),D(be,null,Ze(c.value.carriers,(ce,$e)=>(I(),D("li",{key:$e},B(ce),1))),128))])])):ge("",!0),c.value.platforms&&c.value.platforms.length?(I(),D("div",Gw,[b("div",zw,B(q(N)("connectivity.sheet.socialPlatforms")),1),b("ul",null,[(I(!0),D(be,null,Ze(c.value.platforms,(ce,$e)=>(I(),D("li",{key:$e},B(ce.name)+" · "+B(ce.pct)+"%",1))),128))])])):ge("",!0),b("p",Hw,B(q(N)("connectivity.sheet.note")),1)])):ge("",!0)],2))}}},Symbol.toStringTag,{value:"Module"}));function jw(e){const t=(e==null?void 0:e.parentElement)||e;if(!t||!t.ownerDocument)return{x:0,y:0};const o=t.ownerDocument.createElement("div");o.style.cssText="position:fixed;top:0;left:0;width:0;height:0;pointer-events:none;opacity:0",t.appendChild(o);const n=o.getBoundingClientRect();return o.remove(),{x:n.left,y:n.top}}function od(e){const t=ue(null),o=Mo({position:"fixed",inset:"0"}),n=()=>{var c,g;const r=t.value;if(!r)return;const i=jw(r),s=r.ownerDocument||(typeof document<"u"?document:null),l=((c=s==null?void 0:s.documentElement)==null?void 0:c.clientWidth)||0,u=((g=s==null?void 0:s.documentElement)==null?void 0:g.clientHeight)||0;o.value={position:"fixed",top:`${-i.y}px`,left:`${-i.x}px`,right:"auto",bottom:"auto",width:`${l}px`,height:`${u}px`,boxSizing:"border-box"}};qe(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Kt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const Ww={class:"dt-head"},Kw={class:"dt-title"},Vw={class:"dt-count"},qw={key:0,class:"dt-grain"},Yw={class:"dt-actions"},Jw={key:0,class:"dt-err"},Zw={class:"dt-wrap"},Xw={class:"dt-hint"},Qw={key:0,dir:"ltr"},e2=["aria-label"],t2={class:"dt-sheet-head"},o2={class:"dt-dl"},n2=["href"],a2={key:1},r2={key:2},i2={key:2,class:"dt-caveats"},s2={dir:"ltr"},l2={class:"dt-cav-k"},c2={__name:"DataTable",props:{table:{type:Object,required:!0},assetsBase:{type:String,default:"./assets"},isDark:{type:Boolean,default:!1},height:{type:String,default:"560px"},frozen:{type:Number,default:1},pageSize:{type:Number,default:50}},emits:["row-click"],setup(e,{emit:t}){const o=(N,H)=>Xt(N)||H,n=e,a=t,r=ue(!1),i=ue(null),{scrimRef:s,scrimStyle:l}=od(i),u=ue(null),c=Mo(null),g=ue(null),h=ue(!1),y=W(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),_=W(()=>{var N;return((N=n.table)==null?void 0:N.meta)||{}}),p=W(()=>{var N;return(((N=n.table)==null?void 0:N.rows)||[]).length}),d=W(()=>Object.entries(_.value).filter(([N,H])=>typeof H=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(N)).map(([N,H])=>({key:N.replace(/_/g," "),text:H})));let v=null;function C(){return window.Tabulator?Promise.resolve(window.Tabulator):v||(v=new Promise((N,H)=>{const U=document.createElement("script");U.src=`${y.value}/vendor/tabulator/tabulator.min.js`,U.onload=()=>N(window.Tabulator),U.onerror=()=>H(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(U)}),v)}async function x(N){if(!(!N||N.querySelector("style[data-tabulator]")))try{const H=await fetch(`${y.value}/vendor/tabulator/tabulator.min.css`);if(!H.ok)return;const U=document.createElement("style");U.setAttribute("data-tabulator",""),U.textContent=await H.text(),N.appendChild(U)}catch{}}function k(N){var he,oe;if(!u.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const H=((he=n.table)==null?void 0:he.columns)||[],pe=(r.value?H.slice(0,3):H).map((z,V)=>({title:z.title,field:z.field,headerFilter:z.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:z.type==="number"?"number":z.type==="boolean"?"boolean":"string",formatter:z.type==="boolean"?"tickCross":void 0,.../_url$/.test(z.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&V{i.value=V.getData(),a("row-click",V.getData())}),c.value.on("tableBuilt",()=>{h.value=!0})}const S=N=>{var H,U;return((U=(((H=n.table)==null?void 0:H.columns)||[]).find(pe=>pe.field===N))==null?void 0:U.title)||N.replace(/_/g," ")},L=N=>typeof N=="string"&&N.includes(", ")&&N.length>40?N.split(", "):null,w=N=>typeof N=="string"&&/^https?:\/\//.test(N),T=W(()=>i.value?Object.entries(i.value).filter(([,N])=>N!==""&&N!==null&&N!==void 0):[]);function O(N){var H;try{(H=c.value)==null||H.download(N,`${(_.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${N}`)}catch(U){g.value=String(U.message||U)}}return Wt(async()=>{var N,H;try{await x((H=(N=u.value)==null?void 0:N.getRootNode)==null?void 0:H.call(N)),k(await C())}catch(U){g.value=String(U.message||U)}}),Kt(()=>{var N;try{(N=c.value)==null||N.destroy()}catch{}}),qe(()=>n.table,()=>{var N,H;try{(H=c.value)==null||H.replaceData(((N=n.table)==null?void 0:N.rows)||[])}catch{}}),yt(".dt .tabulator{border:1px solid #d1d4cd;background:#fff;font-size:14px}.dt .tabulator .tabulator-header{background:#f3f3f1;border-bottom:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col{background:#f3f3f1;border-right:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background:#e9ebe6}.dt .tabulator .tabulator-col-title{color:#3b463d;font-weight:700}.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d;padding:3px 6px}.dt .tabulator .tabulator-row{background:#fff;color:#3b463d;border-bottom:1px solid #e6e8e3}.dt .tabulator .tabulator-row.tabulator-row-even{background:#faf9f7}.dt .tabulator .tabulator-row:hover{background:#e9ebe6}.dt .tabulator .tabulator-row .tabulator-cell{border-right:1px solid #e6e8e3;color:#3b463d;unicode-bidi:plaintext}.dt:dir(rtl) .tabulator .tabulator-row .tabulator-cell{text-align:right}.dt .tabulator .tabulator-row .tabulator-cell a{color:#4a7a52;font-weight:600}.dt .tabulator .tabulator-footer{background:#f3f3f1;border-top:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator label{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page{border:1px solid #d1d4cd;background:#fff;color:#3b463d;border-radius:5px}.dt .tabulator .tabulator-footer .tabulator-page.active{background:#92b195;border-color:#92b195;color:#fff}.dt .tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:#e9ebe6;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page:disabled{opacity:.45}.dt,.dt *{box-sizing:border-box}.dt{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.dt-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}.dt-title{font-size:15px;font-weight:700;margin:0}.dt-count{font-size:11.5px;opacity:.6;font-variant-numeric:tabular-nums}.dt-grain{font-size:11px;opacity:.55}.dt-actions{margin-left:auto;display:flex;gap:6px}.dt-btn{font:600 11.5px inherit;padding:5px 11px;border-radius:6px;cursor:pointer;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-btn:hover{background:rgba(0,0,0,.05)}.dt-err{padding:10px 12px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.dt-caveats{margin-top:10px;padding:10px 12px;border-radius:8px;background:rgba(0,0,0,.04);font-size:11.5px;line-height:1.6;opacity:.85}.is-dark .dt-caveats{background:rgba(255,255,255,.06)}.dt-cav-k{font-weight:700;text-transform:capitalize}.dt-scrim{position:fixed;inset:0;z-index:1200;background:rgba(8,12,16,.55);display:flex;align-items:flex-end;justify-content:center}@media(min-width:700px){.dt-scrim{align-items:center}}.dt-sheet{width:100%;max-width:560px;max-height:82vh;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:16px 18px 26px;box-shadow:0 -6px 30px rgba(0,0,0,.3)}@media(min-width:700px){.dt-sheet{border-radius:14px}}.is-dark .dt-sheet{background:#132019;color:#e5e7eb}.dt-sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid rgba(0,0,0,.10);font-size:15px}.dt-close{margin-left:auto;font:600 12px inherit;padding:7px 14px;border-radius:8px;cursor:pointer;min-height:36px;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-dl{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:7px 12px;margin:0;font-size:12.5px}.dt-dl dt{font-weight:700;opacity:.72;text-transform:capitalize}.dt-dl dd{margin:0;word-break:break-word}.dt-dl ul{margin:0;padding-left:16px}.dt-dl a{color:#0b7a5b;font-weight:600}.dt-hint{font-size:11px;opacity:.6;margin:6px 0 0}.dt-wrap{width:100%;overflow:hidden;border:1px solid rgba(0,0,0,.10);border-radius:8px}.is-dark .dt-wrap{border-color:rgba(255,255,255,.12)}","doxa-data-table"),(N,H)=>{var U,pe;return I(),D("div",{class:Ae(["dt",{"is-dark":e.isDark}])},[b("div",Ww,[b("h3",Kw,B(_.value.title||"Data"),1),b("span",Vw,B(p.value.toLocaleString())+" rows",1),_.value.grain?(I(),D("span",qw,"· "+B(_.value.grain),1)):ge("",!0),b("span",Yw,[b("button",{type:"button",class:"dt-btn",onClick:H[0]||(H[0]=he=>O("csv"))},B(o("tables.csv","CSV")),1),b("button",{type:"button",class:"dt-btn",onClick:H[1]||(H[1]=he=>O("json"))},B(o("tables.json","JSON")),1)])]),g.value?(I(),D("div",Jw,B(g.value),1)):ge("",!0),b("div",Zw,[b("div",{ref_key:"host",ref:u},null,512)]),b("p",Xw,[Ie(B(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(I(),D(be,{key:1},[Ie(".")],64)):(I(),D("bdi",Qw," — every field, including the lists the table flattens."))]),i.value?(I(),D("div",{key:1,ref_key:"scrimRef",ref:s,style:Ue(q(l)),class:"dt-scrim",onClick:H[3]||(H[3]=it(he=>i.value=null,["self"]))},[b("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[b("div",t2,[b("strong",null,B(i.value[(pe=(((U=e.table)==null?void 0:U.columns)||[])[0])==null?void 0:pe.field]||"Detail"),1),b("button",{type:"button",class:"dt-close",onClick:H[2]||(H[2]=he=>i.value=null)},B(o("buttons.close","Close")),1)]),b("dl",o2,[(I(!0),D(be,null,Ze(T.value,([he,oe])=>(I(),D(be,{key:he},[b("dt",null,B(S(he)),1),b("dd",null,[w(oe)?(I(),D("a",{key:0,href:oe,target:"_blank",rel:"noopener"},B(oe),9,n2)):L(oe)?(I(),D("ul",a2,[(I(!0),D(be,null,Ze(L(oe),(z,V)=>(I(),D("li",{key:V},B(z),1))),128))])):(I(),D("span",r2,B(oe===!0?"yes":oe===!1?"no":oe),1))])],64))),128))])],8,e2)],4)):ge("",!0),d.value.length?(I(),D("div",i2,[(I(!0),D(be,null,Ze(d.value,he=>(I(),D("div",{key:he.key},[b("bdi",s2,[b("span",l2,B(he.key)+":",1),Ie(" "+B(he.text),1)])]))),128))])):ge("",!0)],2)}}},u2={class:"ct-h"},p2={class:"ct-sub"},d2={class:"ct-tabs"},g2=["onClick"],h2={key:0,class:"ct-n"},m2={key:0,class:"ct-err"},f2={key:1,class:"ct-load"},b2=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Ce("profileConfig",ue(null)),o=W(()=>{var _;return((_=t.value)==null?void 0:_.isDark)===!0}),n=W(()=>Ni(t.value)),a=Jn("connectivity"),r=_=>(Number(_)||0).toLocaleString(),i=[{id:"cities",label:"Key Cities",file:"key-cities"},{id:"internet",label:"Connectivity",file:"country-connectivity"},{id:"operators",label:"ISPs & Carriers",file:"network-operators"},{id:"social",label:"Social Platforms",file:"social-platforms"},{id:"messaging",label:"Messaging Apps",file:"messaging-channels"}],s=ue("cities"),l=W(()=>i.find(_=>_.id===s.value)||i[0]),u=ue({}),c=ue(!1),g=ue(null);async function h(_){if(!u.value[_]){c.value=!0,g.value=null;try{const p=await fetch(`${n.value}/tables/${_}.json`);if(!p.ok)throw new Error(`table not found (${p.status})`);u.value={...u.value,[_]:await p.json()}}catch(p){g.value=String(p.message||p)}finally{c.value=!1}}}qe(l,_=>_&&h(_.file),{immediate:!0});const y=W(()=>{var _;return u.value[(_=l.value)==null?void 0:_.file]||null});return yt(".ct{position:absolute;inset:0;overflow-y:auto;padding:18px;background:#f6f7f9;color:#0f1419;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.ct.is-dark{background:#0a1410;color:#e5e7eb}.ct-h{margin:0 0 4px;font-size:18px;font-weight:700}.ct-sub{margin:0 0 14px;font-size:12.5px;opacity:.72;line-height:1.5}.ct-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.ct-tab{font:600 12px inherit;padding:7px 14px;border-radius:999px;cursor:pointer;border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit}.ct-tab.on{background:#10b981;border-color:#10b981;color:#04241a}.ct-load{padding:22px;text-align:center;font-size:12.5px;opacity:.6}.ct-err{padding:11px 13px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.ct-n{font-size:10.5px;opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}","doxa-cities-tables"),(_,p)=>(I(),D("div",{class:Ae(["ct",{"is-dark":o.value}])},[b("h2",u2,B(q(a)("connectivity.tables.title")),1),b("p",p2,B(q(a)("connectivity.tables.intro")),1),b("div",d2,[(I(),D(be,null,Ze(i,d=>b("button",{key:d.id,type:"button",class:Ae(["ct-tab",{on:s.value===d.id}]),onClick:v=>s.value=d.id},[Ie(B(q(a)("connectivity.tables.tabs."+d.id)),1),u.value[d.file]?(I(),D("span",h2,B(r((u.value[d.file].rows||[]).length)),1)):ge("",!0)],10,g2)),64))]),g.value?(I(),D("div",m2,B(g.value),1)):y.value?(I(),Xe(c2,{key:l.value.id,table:y.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(I(),D("div",f2,B(q(a)("connectivity.tables.loading",{name:q(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),_2="pplrInstance";function y2(){return Ce(_2,null)}const $2="",v2=["data-theme"],w2={class:"stl-inner"},k2={class:"stl-tb-caret-slot"},x2=["title","aria-label","aria-expanded"],S2={class:"stl-tb-eyebrow"},A2=["title","aria-label"],C2=["title"],P2={key:2,class:"stl-tb-title"},L2={key:3,class:"stl-export"},N2=["aria-expanded","title","aria-label"],T2={class:"stl-export-label"},O2={class:"stl-export-menu",role:"menu"},E2={class:"stl-export-item-label"},I2={class:"stl-export-item-label"},F2={key:0,class:"stl-tabs-wrap"},M2={class:"stl-tabs"},R2=["onClick"],D2=["title","onClick"],B2={key:0,class:"stl-info-pop"},G2={class:"stl-col-hdr"},z2={class:"stl-hdr-name"},H2=["title"],U2={key:0,class:"stl-sort-arrow"},j2=["title"],W2={key:0,class:"stl-sort-arrow"},K2=["data-stl-node-id","onClick"],V2=["aria-expanded","aria-label","onClick"],q2={key:1,class:"stl-caret-sp"},Y2={key:3,class:"stl-dot-sp"},J2={class:"stl-name"},Z2={key:4,class:"stl-num"},X2={key:5,class:"stl-num"},Q2={class:"stl-x-slot"},ek=["title","aria-label"],tk={key:0,class:"stl-empty stl-loading"},ok={key:1,class:"stl-empty"},nk={key:2,class:"stl-empty"},ak={key:3,class:"stl-overflow"},rk={class:"stl-overflow-hint"},ik=["data-theme","title","aria-label"],sk={class:"stl-reopen-label"},lk=Wo({__name:"SemanticTreeLegend",props:{nodes:{type:Array,default:()=>[]},pinNote:{type:Boolean,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columns:{type:Array,default:()=>["count","pop"]},title:{type:String,default:"Legend"},hideTabs:{type:Boolean,default:!1},columnLabel:{type:String,default:""},open:{type:Boolean,default:null},exportEnabled:{type:Boolean,default:!1},progress:{type:Object,default:null}},emits:["select","update:open","export"],setup(e,{emit:t}){const o=(E,K)=>Xt(E)||K,n=E=>String(E).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,K=>K.toUpperCase()),{t:a,te:r}=Wu("",{fallback:E=>n(E)});function i(E){const K="tabs."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.label)??""}function s(E){const K="legend.tabInfo."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.info)??""}const l=e,u=t,c=y2(),g=Ce("legendProgress",null),h=W(()=>l.progress??q(g)??null),y=W(()=>h.value?a("legend.progress.title"):l.title),_=W(()=>((c==null?void 0:c.theme.value)||"dark")==="dark"),p=Ce("dataStore",null),d=Ce("normalizedPeopleGroups",null),v=E=>!!(E&&hr(E)&&$s(E)),C=W(()=>{var K,fe;if(l.pinNote!==null)return l.pinNote;if((K=d==null?void 0:d.value)!=null&&K.length)return d.value.slice(0,20).some(v);const E=(p==null?void 0:p.sources)||{};for(const ye in E)if((((fe=E[ye])==null?void 0:fe.features)||[]).slice(0,20).some(v))return!0;return!1});function x(E,K){var fe;for(const ye of E||[]){if((ye==null?void 0:ye.id)===K)return ye;const Ne=(fe=ye==null?void 0:ye.children)!=null&&fe.length?x(ye.children,K):null;if(Ne)return Ne}return null}function k(E){const K=x(N.value,E);K&&Z(K)}function S(E,K=0){return E!=null&&E.length?Math.max(...E.map(fe=>S(fe.children??[],K+1))):K}function L(E,K,fe=0){return fe===K?E.slice():E.flatMap(ye=>L(ye.children??[],K,fe+1))}function w(E,K,fe=[]){var ye;for(const Ne of E){if(Ne.id===K)return fe;if((ye=Ne.children)!=null&&ye.length){const Qe=w(Ne.children,K,[...fe,Ne]);if(Qe)return Qe}}return null}function T(E,K=new Set){var fe;if(!((fe=E==null?void 0:E.children)!=null&&fe.length))return K;for(const ye of E.children)K.add(ye.id),T(ye,K);return K}function O(E,K="root"){var ye;if(!Array.isArray(E))return[];const fe=[];for(const Ne of E){if(!Ne||typeof Ne!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",K)}catch{}continue}fe.push((ye=Ne.children)!=null&&ye.length?{...Ne,children:O(Ne.children,Ne.label||Ne.id||K)}:Ne)}return fe}const N=W(()=>O(l.nodes)),H=W(()=>S(N.value)),U=W(()=>{const E=l.tabs??[],K=E.length||H.value+1;return Array.from({length:K},(fe,ye)=>E[ye]??{id:`gen${ye+1}`,label:`Generation ${ye+1}`})}),pe=ue(Math.max(0,l.defaultTab|0)),he=ue(new Set),oe=ue(null),z=ue(l.open!==null?l.open:!0),V=ue(null),te=ue(!1),{scrimRef:ae,scrimStyle:ne}=od(te),se=ue(null),le=ue("desc"),xe=W({get:()=>{var E;return l.hideTabs?0:c&&!((E=c.activeTabTouched)!=null&&E.value)?Math.min(Math.max(0,l.defaultTab|0),Math.max(0,U.value.length-1)):c?c.activeTab.value:pe.value},set:E=>{l.hideTabs||(c?(c.activeTab.value=E,c.activeTabTouched&&(c.activeTabTouched.value=!0)):pe.value=E)}}),ke=W({get:()=>c?c.selection.value:oe.value,set:E=>{c?c.selection.value=E:oe.value=E}}),Je=W(()=>{var E;return((E=ke.value)==null?void 0:E.id)||null}),Y=ue(null);qe(()=>l.open,E=>{E!==null&&(z.value=E)}),qe(()=>N.value,()=>{var Qe,Te;const E=((Qe=ke.value)==null?void 0:Qe.id)||null;if(E){const ht=x(N.value,E);if(ht){ke.value=ht;return}}const K=c?(Te=c.activeTabTouched)==null?void 0:Te.value:!1,fe=K?c==null?void 0:c.activeTab.value:void 0,ye=Math.min(Math.max(0,l.defaultTab|0),Math.max(0,U.value.length-1)),Ne=typeof fe=="number"&&fe>=0?fe:ye;c?(c.activeTab.value=Ne,!K&&c.activeTabTouched&&(c.activeTabTouched.value=!1)):pe.value=Ne,he.value=new Set,ke.value=null,u("select",null)},{deep:!1});let X=null;c&&qe(()=>c.selection.value,E=>{if((E==null?void 0:E.id)===X)return;if(!E){X=null;return}X=E.id;const K=w(N.value,E.id)||[];typeof E.depth=="number"&&(xe.value=Math.min(E.depth,U.value.length-1));const fe=new Set;K.forEach(ye=>fe.add(ye.id)),he.value=fe,u("select",E)});function ce(E,K){const fe=(K.pop??0)-(E.pop??0);return fe!==0?fe:(K.count??0)-(E.count??0)}const $e=W(()=>{if(!se.value)return ce;const E=se.value,K=le.value==="asc"?1:-1;return(fe,ye)=>((fe[E]??0)-(ye[E]??0))*K});function _e(E){se.value===E?le.value==="desc"?le.value="asc":(se.value=null,le.value="desc"):(se.value=E,le.value="desc")}const Le=ue([]),$=ue(!1);let P=-1;function A(E){if(Le.value[E]){$.value=!1;return}$.value=!0,P=E,setTimeout(()=>{if(P!==E)return;const K=[...L(N.value,E)].sort($e.value),fe=[...Le.value];fe[E]=K,Le.value=fe,$.value=!1},0)}qe(xe,E=>A(E),{immediate:!0}),qe(()=>[N.value,se.value,le.value],()=>{Le.value=[],A(xe.value)},{deep:!1});const G=W(()=>Le.value[xe.value]||[]),Q=W(()=>{var K;const E=(K=U.value[xe.value])==null?void 0:K.topLimit;return E?G.value.slice(0,E):G.value}),ee=W(()=>{var K;const E=(K=U.value[xe.value])==null?void 0:K.topLimit;return E?Math.max(0,G.value.length-E):0});function ie(E,K,fe,ye,Ne){var Qe;for(const Te of K)Te&&(E.push({node:Te,relDepth:fe,parent:ye,ancestors:Ne}),he.value.has(Te.id)&&((Qe=Te.children)!=null&&Qe.length)&&ie(E,[...Te.children].sort($e.value),fe+1,Te,[...Ne,Te]))}const re=W(()=>{const E=[];ie(E,Q.value,0,null,[]);for(let K=0;KNe+1&&vt.ancestors[Ne]}if(Ne===fe.relDepth-1){let ht=!1;for(let vt=K+1;vtJe.value!==null),m=W(()=>l.columns.includes("count")),R=W(()=>l.columns.includes("pop")),M=W(()=>ke.value?T(ke.value):new Set),J=W(()=>{var Qe;const E=ke.value;if(!E)return null;const K=w(N.value,E.id);if(!K||!K.length)return null;const fe=K[K.length-1],ye=K.length-1,Ne=((Qe=U.value[ye])==null?void 0:Qe.label)||"Parent";return{node:fe,tabName:Ne,depth:ye}});function Z(E){Je.value===E.id?(X=null,ke.value=null,u("select",null)):(X=E.id,ke.value=E,u("select",E))}function F(E,K){K==null||K.stopPropagation();const fe=new Set(he.value),ye=fe.has(E);if(ye?fe.delete(E):fe.add(E),he.value=fe,ye&&ke.value){const Ne=w(N.value,ke.value.id);Ne&&Ne.some(Qe=>Qe.id===E)&&(X=null,ke.value=null,u("select",null))}}function j(){const E=J.value;E!=null&&E.node&&(!l.hideTabs&&typeof E.depth=="number"&&(xe.value=E.depth),he.value=new Set,Z(E.node))}function me(E){if(xe.value===E){V.value=V.value===E?null:E;return}xe.value=E,he.value=new Set,X=null,ke.value=null,V.value=null,u("select",null)}function Oe(E){E==null||E.stopPropagation(),X=null,ke.value=null,u("select",null)}function ze(E,K){K==null||K.stopPropagation(),V.value=V.value===E?null:E}function pt(E){E==null||E.stopPropagation(),te.value=!te.value}function ot(E){te.value=!1,u("export",E)}qe(Je,E=>{E||(te.value=!1)});function _o(E){let K=E.parentElement;for(;K;){const fe=getComputedStyle(K).overflowY;if((fe==="auto"||fe==="scroll")&&K.scrollHeight>K.clientHeight+1){const ye=E.getBoundingClientRect(),Ne=K.getBoundingClientRect();K.scrollTop+=ye.top-Ne.top-8}K=K.parentElement}}let _n=0;qe(Je,async E=>{if(!E)return;const K=++_n,fe=Y.value;if(!fe)return;await jt();const ye=(Ne=0)=>{if(K!==_n)return;const Qe=fe.querySelector(`[data-stl-node-id="${CSS.escape(String(E))}"]`);Qe&&_o(Qe),Ne<6&&setTimeout(()=>ye(Ne+1),70)};ye(0)});function $t(E){return E?E>=1e6?(E/1e6).toFixed(1)+"M":E>=1e3?Math.round(E/1e3)+"k":E.toLocaleString():"—"}function Ct(E){return E!=null?E.toLocaleString():"—"}function mr(E){var K;return{selected:Je.value===E.node.id,descendant:f.value&&M.value.has(E.node.id),child:E.relDepth>0,leaf:!((K=E.node.children)!=null&&K.length)}}return yt(` .stl-inner { --stl-pad-x: 10px; --stl-gap: 6px; diff --git a/public/dx-maps/cities-internet/connectivity-list/index.html b/public/dx-maps/cities-internet/connectivity-list/index.html index 07d5ddcdc..44d75c574 100644 --- a/public/dx-maps/cities-internet/connectivity-list/index.html +++ b/public/dx-maps/cities-internet/connectivity-list/index.html @@ -32,7 +32,7 @@ - + - + - + \n\n" + "script": "\n\n" } }, { @@ -143,7 +143,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -158,7 +158,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } } ] diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index cca69f442..d8b6ebdd4 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -109,7 +109,7 @@ "bundle": "cities-internet", "scriptUrl": "./cities-internet/cities-internet.js", "output": "dx-maps/cities-internet/cities-internet.js", - "integrity": "sha384-5yhC1dv0s9h/trwuKH7RQcJ7j8SpSUU7SpYw3CNRM/ghkStwkIzWlD4KaXbO7DBh", + "integrity": "sha384-FCnwSanUZNxBJm81cWEDxrRDjge2DyUxSVdy/ffnvYmstEHLhwN8vIykm4B8XszA", "elements": [ "cities-internet-map" ], @@ -127,7 +127,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -143,7 +143,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -158,7 +158,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } } ]