diff --git a/plugin-designs/research-dashboard/research-dashboard.vue b/plugin-designs/research-dashboard/research-dashboard.vue index 23e82d2d9..74118077f 100644 --- a/plugin-designs/research-dashboard/research-dashboard.vue +++ b/plugin-designs/research-dashboard/research-dashboard.vue @@ -256,7 +256,10 @@ useShadowStyles(` ONE line, while the charts carry a donut plus a legend that can wrap. So the widths SWAP ROLES: the tree takes the wider column, the charts the narrower. The pair still sums to 560px, so the centre map cell is unchanged. */ - --facet-w:296px; --rail-w:264px; + /* ★ SYMMETRIC SIDEBARS (Driver 2026-09-23: "the charts sidebar can be wider so it is the + same width as the left sidebar, which will put the map in the exact center"). rail + 264 -> 296 = facet width; equal flanks centre the middle column by construction. */ + --facet-w:296px; --rail-w:296px; /* ── ★ ONE EDGE GUTTER FOR THE WHOLE HEADER STACK ──────────────────────────────────── (card BUILD-THE-FOUR-HEADERS-ARE-ONE-CENTRED-STACK: "on the edges there should be padding so that everything lines up perfectly.") @@ -290,7 +293,7 @@ useShadowStyles(` --r-lg:10px; --r-md:6px; --r-pill:999px; } .profile-loader{ width:100%; height:100%; } .rd-shell{ position:relative; display:grid; width:100%; height:100%; min-height:560px; box-sizing:border-box; - grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,264px); + grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,296px); grid-template-rows: var(--rd-topbar-h,38px) auto var(--rd-stats-h,22px) 1fr var(--table-h,34%); grid-template-areas: "topbar topbar topbar" "filters filters filters" "stats stats stats" "facets map rail" "facets table rail"; gap:1px; background:var(--rd-line, #d1d4cd); container-type:inline-size; @@ -313,7 +316,7 @@ useShadowStyles(` /* Facet/rail collapse — override the COLUMN template (not the --*-w vars) so collapse wins over a dragged inline width, exactly like the table row-template above. Map is minmax(0,1fr) and self-resizes via DashboardMapPanel's ResizeObserver → map.resize(). */ - .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,264px); } + .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,296px); } .rd-shell.rd-rail-collapsed{ grid-template-columns:var(--facet-w,296px) minmax(0,1fr) 0; } .rd-shell.rd-facet-collapsed.rd-rail-collapsed{ grid-template-columns:0 minmax(0,1fr) 0; } /* Always-reachable edge carets pinned to the map, toggle each rail (desktop only). */ diff --git a/plugin-designs/research-dashboard/src/composables/useDashboardLayout.js b/plugin-designs/research-dashboard/src/composables/useDashboardLayout.js index 5a399a6d9..bb749d597 100644 --- a/plugin-designs/research-dashboard/src/composables/useDashboardLayout.js +++ b/plugin-designs/research-dashboard/src/composables/useDashboardLayout.js @@ -4,7 +4,7 @@ * A dashboard shell (see plugin-designs/doxa-research-dashboards/research-dashboards.vue) is a CSS * grid whose three flexible tracks are driven by CSS custom properties: * --facet-w (left facet-rail column width) default 296px - * --rail-w (right charts-rail column width) default 264px + * --rail-w (right charts-rail column width) default 296px — equals --facet-w, so the map column sits centred * --table-h (bottom table row height) default 34% (map above it is the 1fr hero) * * This composable OWNS those three vars: it exposes pointer-based drag handlers (one per edge), @@ -101,7 +101,7 @@ import { ref, unref, onMounted, onBeforeUnmount } from 'vue' // promise is unchanged; only the map's share shrinks -- and the map compensates by DEFAULTING // MORE ZOOMED OUT with the world-floor released on the globe (see DashboardMapPanel), so a // shorter map shows MORE world, not less. -const DEFAULTS = { facetW: 296, railW: 264, tableH: '34%', mapH: 260, shellH: 502 } +const DEFAULTS = { facetW: 296, railW: 296, tableH: '34%', mapH: 260, shellH: 502 } const CLAMPS = { facetW: [160, 420], railW: [200, 520], tableH: [12, 70], mapH: [220, 1400], shellH: [400, 2600] } // Mirrors the CSS fallback --rd-table-bar-h (research-dashboard.vue's .rd-table-bar budget calc) — diff --git a/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js b/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js index a1664f541..2e3516446 100644 --- a/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js +++ b/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js @@ -71,7 +71,7 @@ `)}const C={rows:0,clipboard:!1,downloaded:!1,at:0,fields:0,wide:!1};function m(){const _=x(),k=p().length,E=(_.split(`\r `)[0]||"").split(",").length;try{typeof window<"u"&&(window.__rdashLastCsv=_)}catch{}let M=!1,F=!1;try{typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText&&(navigator.clipboard.writeText(_).catch(()=>{}),M=!0)}catch{}try{const J=new Blob([_],{type:"text/csv;charset=utf-8"}),W=URL.createObjectURL(J),re=document.createElement("a");re.href=W,re.download="research-dashboard.csv",re.style.display="none",document.body.appendChild(re),re.click(),F=!0,setTimeout(()=>{try{URL.revokeObjectURL(W),re.remove()}catch{}},200)}catch{}Object.assign(C,{rows:k,clipboard:M,downloaded:F,fields:E,wide:!!l,at:typeof performance<"u"?performance.now():0});try{window.__rdashExportStatus={rows:k,clipboard:M,downloaded:F,fields:E,wide:!!l}}catch{}return{csv:_,rows:k,clipboard:M,downloaded:F,fields:E,wide:!!l}}async function f(){try{await c()}catch{}return m()}function g(){try{return c()}catch{return null}}return{exportCsv:m,exportCsvAsync:f,buildCsv:x,pickRows:p,scopeLabel:b,lastExport:C,prefetchExportFields:g,EXPORT_FIELDS:es}}const y_="#6b7280";function v_(){const e=Qr($o.AFFINITY_BLOCK);return e&&e.propertyKey==="affinityBlock"&&e.palette?e.palette:{}}function x_(e,t){const o=v_();return e&&o[e]?o[e]:y_}function w_(e){return(e==null?void 0:e.properties)||e||{}}function La(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function k_(e){var t;return String(e.affinityBlock||La((t=e._raw)==null?void 0:t.rop1)||"").trim()}function $_(e){var t;return String(e.affinityBlockLabel||((t=e._raw)!=null&&t.rop1&&typeof e._raw.rop1=="object"?e._raw.rop1.label:"")||"").trim()}function E_(e){var t;return String(e.cluster||La((t=e._raw)==null?void 0:t.imb_reg_of_people_2)||"").trim()}function S_(e){var t;return String(e.clusterLabel||((t=e._raw)!=null&&t.imb_reg_of_people_2&&typeof e._raw.imb_reg_of_people_2=="object"?e._raw.imb_reg_of_people_2.label:"")||"").trim()}function A_(e){var t;return String(e.peopleGroup||La((t=e._raw)==null?void 0:t.imb_reg_of_people_25)||"").trim()}function C_(e){var t;return String(e.peopleGroupLabel||((t=e._raw)!=null&&t.imb_reg_of_people_25&&typeof e._raw.imb_reg_of_people_25=="object"?e._raw.imb_reg_of_people_25.label:"")||e.name||"").trim()}function T_(e){var t;return String(e.uniqueId||e.slug||((t=e._raw)==null?void 0:t.slug)||"").trim()}function L_(e){var t;return String(e.name||e.displayName||((t=e._raw)==null?void 0:t.name)||"").trim()}function P_(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function N_(e){return String(e.countryName||e.country||e.countryIsoLabel||e.countryIso||"").trim()}function I_(e){const t=le(()=>{const s=e&&e.value||[],a=new Map;for(const l of s){const i=w_(l),c=k_(i),u=$_(i)||c||"— Unknown —",p=E_(i),b=S_(i)||p||"— Unknown —",v=A_(i),S=C_(i)||v||"— Unknown —",$=T_(i),x=L_(i)||$,C=P_(i),m=N_(i);if(!$)continue;let f=a.get(c||"__unknown__");f||(f={code:c,label:u,count:0,pop:0,memberIds:[],clusters:new Map},a.set(c||"__unknown__",f)),f.count+=1,f.pop+=C,f.memberIds.push($);let g=f.clusters.get(p||"__unknown__");g||(g={code:p,label:b,count:0,pop:0,memberIds:[],peopleGroups:new Map},f.clusters.set(p||"__unknown__",g)),g.count+=1,g.pop+=C,g.memberIds.push($);let _=g.peopleGroups.get(v||"__unknown__");_||(_={code:v,label:S,count:0,pop:0,memberIds:[],instances:[]},g.peopleGroups.set(v||"__unknown__",_)),_.count+=1,_.pop+=C,_.memberIds.push($),_.instances.push({id:$,name:x,country:m,pop:C})}return a}),o=s=>s&&s.length?["in",["get","uniqueId"],["literal",s]]:["==",["get","uniqueId"],"__none__"],n=le(()=>{const s=t.value,a=[];for(const l of s.values()){const i=x_(l.code,l.label),c={id:`bloc:${l.code||l.label}`,label:l.label,color:i,count:l.count,pop:l.pop,filter:o(l.memberIds),children:[]};for(const u of l.clusters.values()){const p={id:`cluster:${l.code}__${u.code||u.label}`,label:`${u.label} (Cluster)`,color:i,count:u.count,pop:u.pop,filter:o(u.memberIds),children:[]};for(const b of u.peopleGroups.values()){const v={id:`pg:${l.code}__${u.code}__${b.code||b.label}`,label:`${b.label} (PG)`,color:i,count:b.count,pop:b.pop,filter:o(b.memberIds),children:[]};b.instances.sort((S,$)=>$.pop-S.pop||S.country.localeCompare($.country));for(const S of b.instances)v.children.push({id:`pgic:${S.id}`,label:`${S.country?`${S.name}, ${S.country}`:S.name} (PGIC)`,color:i,count:1,pop:S.pop,filter:["==",["get","uniqueId"],S.id],children:[]});p.children.push(v)}p.children.sort((b,v)=>v.count-b.count||v.pop-b.pop),c.children.push(p)}c.children.sort((u,p)=>p.count-u.count||p.pop-u.pop),a.push(c)}return a.sort((l,i)=>i.count-l.count||i.pop-l.pop),a});function r(s){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!s){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const a=String(s.id||""),l={kind:null,label:s.label,filterExpr:s.filter};a.startsWith("bloc:")?l.kind="bloc":a.startsWith("cluster:")?l.kind="cluster":a.startsWith("pg:")?l.kind="people-group":a.startsWith("pgic:")&&(l.kind="people-group-in-country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:l}))}return{aggregated:t,affinityTree:n,highlight:r}}function or(e,t,o){const n=le(()=>{const i=t&&o&&t.sources&&t.sources[o];return i&&i.features||[]}),{aggregated:r}=I_(n),s=le(()=>{const i=(e&&e.facetRail||[]).find(c=>c.tree==="affinity");return i&&i.drill||[]}),a=le(()=>{const[i,c,u]=s.value,p=new Map,b=new Map,v=new Map;for(const $ of r.value.values()){$.code&&p.set($.code,$.label);for(const x of $.clusters.values()){x.code&&b.set(x.code,x.label);for(const C of x.peopleGroups.values())C.code&&v.set(C.code,C.label)}}const S={};return i&&(S[i]=p),c&&(S[c]=b),u&&(S[u]=v),S});function l(i,c){const u=a.value[i];return u&&u.get(c)||c}return{normalizedFeatures:n,affinityAgg:r,affinityLabelMaps:a,treeFacetKeys:s,labelFor:l}}class $u{constructor(t={}){this.sourcesConfig=null,this.activeSource=null,this.rawData=[],this.normalizedData=[],this.dataByUniqueId=new Map,this.baseUrl=typeof window<"u"&&window.MAP_APP_BASE_URL||"./",this.locale=t.locale||null,this.cache=new Map,this.cacheEnabled=!0,this.cacheTTL=5*60*1e3}async init(){return this.sourcesConfig=Wt,this.sourcesConfig}getActiveSourceId(){var t;return((t=this.sourcesConfig)==null?void 0:t.activeSource)||"doxa-csv"}getSourceConfig(t){var o,n;return(n=(o=this.sourcesConfig)==null?void 0:o.sources)==null?void 0:n[t]}async setActiveSource(t){const o=this.getSourceConfig(t);if(!o)throw new Error(`Source not found: ${t}`);if(this.activeSource=o,this.cacheEnabled&&this.cache.has(t)){const n=this.cache.get(t);return this.normalizedData=n.normalizedData,this.dataByUniqueId=n.dataByUniqueId,this.normalizedData}return o.type==="csv"?await this.loadCSVData(o):o.type==="api"?await this.loadAPIData(o):o.type==="rest-api"&&await this.loadRestApiData(o),this.cacheEnabled&&this.cache.set(t,{normalizedData:this.normalizedData,dataByUniqueId:this.dataByUniqueId,timestamp:Date.now()}),this.normalizedData}clearCache(t=null){t?this.cache.delete(t):this.cache.clear()}isCached(t){return this.cache.has(t)}async loadActiveSource(){return this.sourcesConfig||await this.init(),this.setActiveSource(this.getActiveSourceId())}parseCSV(t){const o=[],n=[];let r="",s=!1,a=[],l=!0;for(let i=0;i0){if(a.push(r.trim()),r="",l)n.push(...a),l=!1;else if(a.length>1){const p={};n.forEach((b,v)=>{p[b]=a[v]||""}),o.push(p)}a=[]}}else r+=c}if((r||a.length>0)&&(a.push(r.trim()),!l&&a.length>1)){const i={};n.forEach((c,u)=>{i[c]=a[u]||""}),o.push(i)}return{headers:n,data:o}}async loadCSVData(t){try{const n=await(await fetch(this.baseUrl+t.path)).text(),{headers:r,data:s}=this.parseCSV(n);return this.rawData=s,this.validateFieldMappings(t.fieldMappings,r,t.name),this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load CSV data:",o),o}}validateFieldMappings(t,o,n){const r=new Set(o.map(a=>a.trim())),s=[];for(const[a,l]of Object.entries(t||{}))if(Array.isArray(l))for(const i of l)r.has(i)||s.push({systemField:a,sourceField:i,isComposite:!0});else l&&!r.has(l)&&s.push({systemField:a,sourceField:l,isComposite:!1});s.length>0&&console.warn(`[DataSourceManager] ${n}: missing CSV columns:`,s)}async loadAPIData(t){try{const n=await(await fetch(t.url||t.endpoint)).json();return this.rawData=Array.isArray(n)?n:n.posts||n.data||n.peopleGroups||n.results||[],this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load API data:",o),o}}async loadRestApiData(t){var i,c;const o=Ca(),n=((i=t.endpoints)==null?void 0:i.bulk)||"/api/people-groups/list",r=((c=t.defaultFields)==null?void 0:c.join(","))||"",s=[];r&&s.push(`fields=${r}`);const a={...t.queryParams||{}};this.locale&&(a.lang=this.locale);for(const[u,p]of Object.entries(a))s.push(`${u}=${encodeURIComponent(p)}`);const l=`${o}${n}?${s.join("&")}`;try{const u=await fetch(l);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const p=u.headers.get("content-type")||"";if(!p.includes("application/json"))throw new Error(`API returned "${p}" instead of JSON. Server at ${o} may be down or misconfigured.`);const b=await u.json();return this.rawData=Array.isArray(b)?b:b.posts||b.data||b.results||[],this.normalizeData(t),this.normalizedData}catch(u){throw console.error(`[rest-api] Failed to load from ${t.id}:`,u),u}}normalizeData(t){const o=t.fieldMappings||{};this.normalizedData=[],this.dataByUniqueId=new Map;for(const n of this.rawData){const r={};for(const[i,c]of Object.entries(o))if(Array.isArray(c)){const u=c.map(p=>this.getFieldValue(n,p));r[i]=u.join("_")}else r[i]=this.getFieldValue(n,c);if(r.latitude=parseFloat(r.latitude)||0,r.longitude=parseFloat(r.longitude)||0,r.latitude===0&&r.longitude===0)continue;r.populationNum=this.parsePopulation(r.population),r.imageUrl=this.getImageUrl(r,t.imageConfig);const s=r.engagementStatus;s!=null&&(typeof s=="object"&&"value"in s?(r.engagementStatusLabel=s.label||s.value,r.engagementStatus=s.value==="engaged"):r.engagementStatus=s===!0||s===1||s==="1"||s==="true"||typeof s=="number"&&s>0||typeof s=="string"&&parseInt(s,10)>0);const a=r.adoptionStatus;a!=null&&(r.adoptionStatus=a===!0||a===1||a==="1"||a==="true"||typeof a=="object"&&!!(a!=null&&a.value)||typeof a=="number"&&a>0||typeof a=="string"&&parseInt(a,10)>0);const l=["doxaRegion","wagfRegion","wagfBlock","wagfMember","affinityBlock","cluster","peopleGroup","countryIso","religion","religionCode"];for(const i of l){const c=r[i];c!=null&&typeof c=="object"&&"value"in c?(r[i+"Label"]=c.label||c.value,r[i]=c.value):c!=null&&typeof c=="string"&&c!==""&&(r[i+"Label"]||(r[i+"Label"]=c))}r.countryName=r.countryIsoLabel||r.country||r.countryIso||"",r.religionName=r.religionLabel||r.religion||"",r._raw=n,this.normalizedData.push(r),this.dataByUniqueId.set(r.uniqueId,r)}this.rawData=null}getFieldValue(t,o){if(!o)return"";if(t[o]!==void 0)return t[o];const n=o.trim();if(t[n]!==void 0)return t[n];for(const r of Object.keys(t))if(r.trim()===n||r.includes(n)||n.includes(r.trim()))return t[r];return""}parsePopulation(t){if(!t)return 0;const o=String(t).replace(/,/g,"").trim(),n=parseInt(o,10);return isNaN(n)?0:n}getImageUrl(t,o){if(!o)return"";const n=o.placeholderUrl||"",r=t[o.useField];return r&&String(r).trim()&&!String(r).includes("NoImageAvailable")?r:n}getData(){return this.normalizedData}getByUniqueId(t){return this.dataByUniqueId.get(t)}getByCoordinates(t,o,n=1e-4){return this.normalizedData.find(r=>Math.abs(r.latitude-t)o.peopleGroupId===t)}getLanguageFamilies(){const t=new Set;return this.normalizedData.forEach(o=>{o.languageFamily&&t.add(o.languageFamily)}),Array.from(t).sort()}getDataByLanguageFamily(){const t={};return this.normalizedData.forEach(o=>{const n=o.languageFamily||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getDataByRegion(){const t={};return this.normalizedData.forEach(o=>{const n=o.doxaRegion||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getStats(){return{totalRecords:this.normalizedData.length,withPeopleId3:this.normalizedData.filter(t=>t.peopleId3).length,withPhotos:this.normalizedData.filter(t=>t.imageUrl&&!String(t.imageUrl).includes("NoImageAvailable")).length,languageFamilies:this.getLanguageFamilies().length,countries:new Set(this.normalizedData.map(t=>t.country)).size,regions:Object.keys(this.getDataByRegion()).length}}}new $u;const Eu=(e,t)=>Object.fromEntries(Object.entries(e||{}).map(([o,n])=>[o,t(n,o)])),Su=e=>e==null?"—":Number(e).toLocaleString("en-US");function nr(e){const t=Eu(e.facets,r=>r.get),o=Object.fromEntries((e.columns||[]).map(r=>[r.key,r.get])),n=Array.isArray(e.searchKeys)?e.searchKeys:null;return n?n.map(r=>t[r]||o[r]).filter(r=>typeof r=="function"):(e.columns||[]).filter(r=>r.type!=="num"&&typeof r.get=="function").map(r=>r.get)}function rr(e,t){return o=>{var r;const n=(((r=e==null?void 0:e.searchTerm)==null?void 0:r.value)||"").trim().toLowerCase();if(!n)return!0;for(const s of t){const a=s(o);if(a!=null&&String(a).toLowerCase().includes(n))return!0}return!1}}function F_(e,t,o,n,r){return(e||[]).map(s=>{var i,c;let a,l;if(s.kind==="count")a=t.length,s.showDelta&&(l=Math.max(0,o.length-t.length));else if(s.kind==="sum")a=t.reduce((u,p)=>u+(Number(p[s.field])||0),0);else if(s.kind==="pct")a=t.length?Math.round(t.filter(s.test).length/t.length*100)+"%":"—";else if(s.kind==="distinct"){const u=s.via?(c=(i=r==null?void 0:r.facets)==null?void 0:i[s.field])==null?void 0:c[s.via]:n[s.field],p=new Set;t.forEach(b=>{const v=u?u(b):b[s.field];v&&p.add(v)}),a=p.size}return{id:s.id,label:s.label,kind:s.kind,value:a,delta:l}})}function R_(e){const t=ie(null),o=ie(!1),n=ie(!1),r=ie(!1),s=ie("map"),a=[{k:"map",l:"Map"},{k:"facets",l:"Filters"},{k:"table",l:"Table"},{k:"charts",l:"Charts"}];let l=null;const i=ie(!1),c=ie(!1),u=ie(!1);_t(()=>{t.value&&(l=new ResizeObserver(()=>{const x=t.value.clientWidth;o.value=x<760,n.value=x>=760&&x<1180,r.value=x>=760&&x<980}),l.observe(t.value)),e&&e.on("toggleTable",x=>{i.value=!!x}),e&&e.on("toggleFacet",x=>{c.value=!!x}),e&&e.on("toggleRail",x=>{u.value=!!x})}),Bt(()=>l&&l.disconnect());function p(x){const C=x.target.closest("[data-view]");C&&(s.value=C.getAttribute("data-view"))}const b=le(()=>!o.value||s.value==="facets"),v=le(()=>!o.value||s.value==="map"),S=le(()=>!o.value||s.value==="table"),$=le(()=>!o.value||s.value==="charts");return{shell:t,isNarrow:o,slimRail:n,slimFacet:r,mobileView:s,SEG:a,tableCollapsed:i,facetCollapsed:c,railCollapsed:u,setView:p,showFacets:b,showMap:v,showTable:S,showCharts:$}}function M_(e){function t(){try{const o=encodeURIComponent(JSON.stringify(e.filterSet));typeof location<"u"&&history.replaceState(null,"","#f="+o)}catch{}}pt(()=>({...e.filterSet}),t,{deep:!0}),_t(()=>{try{const o=typeof location<"u"&&/[#&]f=([^&]+)/.exec(location.hash);if(o){const n=JSON.parse(decodeURIComponent(o[1]));Object.entries(n).forEach(([r,s])=>e.setFilter(r,s))}}catch{}})}function O_(e){var $;const t=b_();t.configureHierarchy(e);const o=__(e.data),n=Eu(e.facets,x=>x.get),r=rr(t,nr(e)),s=le(()=>{var f;const x=o.rows.value||[],C=Object.keys(t.filterSet),m=!!(((f=t.searchTerm)==null?void 0:f.value)||"").trim();return!C.length&&!m?x:x.filter(g=>C.every(_=>{const k=n[_];return k?k(g)===t.filterSet[_]:!0})&&r(g))}),a=le(()=>F_(e.kpis,s.value,o.rows.value||[],n,e)),l=R_(t);M_(t);const i=o.sourceId||Wt.activeSource,c=(($=Wt.sources)==null?void 0:$[i])||{},u=new $u,p=le(()=>{const x=o.rows.value||[];return x.length?(u.rawData=x.slice(),u.normalizeData(c),u.normalizedData):[]}),b={sources:{[i]:{get features(){return p.value}}}},{labelFor:v}=or(e,b,i),S=Ta({rowStore:o.rowStore,rows:o.rows,selectionSet:t.selectionSet,filterSet:t.filterSet,FACET_ACC:n,dataOpts:e.data,labelFor:v});return po("selectionBus",t),po("dashboardData",o),po("dashboardConfig",e),po("dataStore",b),po("searchSourceId",i),_t(()=>o.load()),{bus:t,data:o,FACET_ACC:n,filteredRows:s,kpis:a,exporter:S,responsive:l}}const D_={facetW:296,railW:264,tableH:"34%",mapH:260,shellH:502},j_={facetW:[160,420],railW:[200,520],tableH:[12,70],mapH:[220,1400],shellH:[400,2600]},Au=32,Cu=120,Et=(e,[t,o])=>Math.min(o,Math.max(t,e)),ts=(e,t)=>{const o=parseFloat(String(e));return Number.isFinite(o)?o:t};function z_(e={}){const{shellRef:t,bus:o=null,isNarrow:n=!1,pageScroll:r=!1,storageKey:s="rd-dashboard-layout"}=e,a={...D_,...e.defaults||{}},l={...j_,...e.clamps||{}},i=ie(a.facetW),c=ie(a.railW),u=ie(a.tableH),p=ie(a.mapH),b=ie(a.shellH),v=ie(!1),S=ie(!1),$=ie(!1),x=()=>!!de(n),C=()=>!!de(r);function m(){const j=t&&t.value;if(!j)return b.value;const T=parseFloat(getComputedStyle(j).getPropertyValue("--rd-shell-h"));if(Number.isFinite(T)&&T>0)return Math.round(T);const H=j.querySelector('[data-region="map"]'),ae=j.querySelector('[data-region="table"]');if(!H||!ae)return b.value;const ye=H.getBoundingClientRect().height+ae.getBoundingClientRect().height;return ye>0?Math.round(ye):b.value}function f(){const j=t&&t.value;j&&(v.value&&(j.style.setProperty("--facet-w",i.value+"px"),j.style.setProperty("--rail-w",c.value+"px"),j.style.setProperty("--table-h",u.value)),S.value&&j.style.setProperty("--rd-map-h",p.value+"px"),$.value&&j.style.setProperty("--rd-shell-h",b.value+"px"))}function g(){const j=t&&t.value;j&&(j.style.removeProperty("--facet-w"),j.style.removeProperty("--rail-w"),j.style.removeProperty("--table-h"),j.style.removeProperty("--rd-map-h"),j.style.removeProperty("--rd-shell-h"))}function _(){try{localStorage.setItem(s,JSON.stringify({facetW:i.value,railW:c.value,tableH:u.value,mapH:p.value,shellH:b.value}))}catch{}}function k(){try{const j=localStorage.getItem(s);if(!j)return!1;const T=JSON.parse(j);return Number.isFinite(T.facetW)&&(i.value=Et(T.facetW,l.facetW)),Number.isFinite(T.railW)&&(c.value=Et(T.railW,l.railW)),T.tableH!=null&&(u.value=Et(ts(T.tableH,ts(a.tableH,34)),l.tableH)+"%"),v.value=!0,Number.isFinite(T.shellH)&&(b.value=Et(T.shellH,l.shellH),$.value=!0),Number.isFinite(T.mapH)&&(p.value=Et(T.mapH,l.mapH),S.value=!0),!0}catch{return!1}}function E(){try{localStorage.removeItem(s)}catch{}i.value=a.facetW,c.value=a.railW,u.value=a.tableH,p.value=a.mapH,b.value=a.shellH,v.value=!1,S.value=!1,$.value=!1,g()}const M=ie(!1);function F(){if(M.value)return;M.value=!0;const j=t&&t.value;if(j&&j.setAttribute("data-rd-resizing","1"),o&&typeof o.emit=="function")try{o.emit("layoutResizing",!0)}catch{}}function J(){if(!M.value)return;M.value=!1;const j=t&&t.value;if(j&&j.removeAttribute("data-rd-resizing"),o&&typeof o.emit=="function")try{o.emit("layoutResizing",!1)}catch{}}function W(j,T){if(x())return;const H=t&&t.value;if(!H)return;T.preventDefault();const ae=H.getBoundingClientRect(),ye=T.clientX,Se=i.value,Ae=c.value,Te=T.currentTarget,ve=j==="table"&&C(),ge=j==="shell"&&C();let he=0,xe=l.mapH[1];if(ve){const O=H.querySelector('[data-region="map"]'),d=O?O.getBoundingClientRect():null;he=d?d.top:T.clientY-p.value,xe=Math.max(l.mapH[0],b.value-(Au+Cu))}const y=T.clientY,A=ge?m():b.value;try{Te&&Te.setPointerCapture&&Te.setPointerCapture(T.pointerId)}catch{}F();let w=0,G=null;function Q(){if(w=0,!G)return;const O=G;if(G=null,j==="facet")i.value=Math.round(Et(Se+(O.clientX-ye),l.facetW)),v.value=!0;else if(j==="rail")c.value=Math.round(Et(Ae-(O.clientX-ye),l.railW)),v.value=!0;else if(ve)p.value=Math.round(Et(O.clientY-he,[l.mapH[0],xe])),S.value=!0;else if(j==="table"){const d=(ae.bottom-O.clientY)/ae.height*100;u.value=Math.round(Et(d,l.tableH))+"%",v.value=!0}else ge&&(b.value=Math.round(Et(A+(O.clientY-y),l.shellH)),$.value=!0);f()}function ne(O){G={clientX:O.clientX,clientY:O.clientY},w||(w=requestAnimationFrame(Q))}function D(O){window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),w&&(cancelAnimationFrame(w),w=0),Q();try{Te&&Te.releasePointerCapture&&Te.releasePointerCapture(O.pointerId)}catch{}_(),J()}window.addEventListener("pointermove",ne),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}const re=j=>W("facet",j),me=j=>W("rail",j),z=j=>W("table",j),oe=j=>W("shell",j),K={facet:16,rail:16,table:24,mapH:24,shellH:24};function q(j,T,H){if(!x()){if(j==="facet")i.value=H?T<0?l.facetW[0]:l.facetW[1]:Math.round(Et(i.value+T*K.facet,l.facetW)),v.value=!0;else if(j==="rail")c.value=H?T<0?l.railW[1]:l.railW[0]:Math.round(Et(c.value-T*K.rail,l.railW)),v.value=!0;else if(j==="table"&&C()){const ae=Math.max(l.mapH[0],b.value-(Au+Cu));p.value=H?T<0?l.mapH[0]:ae:Math.round(Et(p.value+T*K.mapH,[l.mapH[0],ae])),S.value=!0}else if(j==="table"){const ae=H?T<0?l.tableH[0]:l.tableH[1]:Et(ts(u.value,ts(a.tableH,34))-T*K.table/4,l.tableH);u.value=Math.round(ae)+"%",v.value=!0}else j==="shell"&&C()&&(b.value=H?T<0?l.shellH[0]:l.shellH[1]:Math.round(Et(b.value+T*K.shellH,l.shellH)),$.value=!0);f(),_()}}function L(j,T){const H=T.key;let ae=0;if(j==="table"||j==="shell"?H==="ArrowUp"?ae=-1:H==="ArrowDown"&&(ae=1):H==="ArrowLeft"?ae=-1:H==="ArrowRight"&&(ae=1),ae){T.preventDefault(),q(j,ae);return}(H==="Home"||H==="End")&&(T.preventDefault(),q(j,H==="Home"?-1:1,!0))}let U=null;return _t(()=>{k()&&f(),o&&typeof o.on=="function"&&(U=o.on("resetLayout",E))}),Bt(()=>{try{U&&U()}catch{}try{J()}catch{}}),{facetW:i,railW:c,tableH:u,mapH:p,shellH:b,customized:v,resizing:M,startFacetResize:re,startRailResize:me,startTableResize:z,startShellResize:oe,startResize:W,reset:E,applyVars:f,stepResize:q,onResizeKeydown:L}}const U_=".search-box{position:relative;display:flex;align-items:center;margin:0 auto;width:100%;color:var(--dx-muted, #6d766e)}.search-box .search-icon{position:absolute;left:12px;pointer-events:none}.search-box input{width:100%;padding:10px 12px 10px 38px;font-size:.95rem;color:var(--dx-text, #3b463d);background:var(--dx-elevated, #fff);border:1px solid var(--dx-line, #d1d4cd);border-radius:10px;outline:none;box-sizing:border-box}.search-box input:focus{border-color:var(--dx-accent, #92b195);box-shadow:0 0 0 2px var(--dx-accent-weak, rgba(146, 177, 149, .18))}",B_=["value","placeholder","aria-label"],Pa=xn({__name:"SearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Search…"},ariaLabel:{type:String,default:"Search"},maxWidth:{type:String,default:""}},emits:["update:modelValue","search"],setup(e,{emit:t}){const o=e,n=t,r=le(()=>o.maxWidth?{maxWidth:o.maxWidth}:{});function s(a){const l=a.target.value??"";n("update:modelValue",l),n("search",{value:l})}return(a,l)=>(V(),Z("div",{class:"search-box",style:lt(r.value)},[l[0]||(l[0]=P("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[P("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),P("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),P("input",{type:"search",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.ariaLabel,onInput:s},null,40,B_)],4))}},[["styles",[U_]]]),G_=["title","aria-label","disabled"],Na={__name:"MapControlButton",props:{isDark:{type:Boolean,default:!1},title:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){return Nt(` +`&&i++,r||a.length>0){if(a.push(r.trim()),r="",l)n.push(...a),l=!1;else if(a.length>1){const p={};n.forEach((b,v)=>{p[b]=a[v]||""}),o.push(p)}a=[]}}else r+=c}if((r||a.length>0)&&(a.push(r.trim()),!l&&a.length>1)){const i={};n.forEach((c,u)=>{i[c]=a[u]||""}),o.push(i)}return{headers:n,data:o}}async loadCSVData(t){try{const n=await(await fetch(this.baseUrl+t.path)).text(),{headers:r,data:s}=this.parseCSV(n);return this.rawData=s,this.validateFieldMappings(t.fieldMappings,r,t.name),this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load CSV data:",o),o}}validateFieldMappings(t,o,n){const r=new Set(o.map(a=>a.trim())),s=[];for(const[a,l]of Object.entries(t||{}))if(Array.isArray(l))for(const i of l)r.has(i)||s.push({systemField:a,sourceField:i,isComposite:!0});else l&&!r.has(l)&&s.push({systemField:a,sourceField:l,isComposite:!1});s.length>0&&console.warn(`[DataSourceManager] ${n}: missing CSV columns:`,s)}async loadAPIData(t){try{const n=await(await fetch(t.url||t.endpoint)).json();return this.rawData=Array.isArray(n)?n:n.posts||n.data||n.peopleGroups||n.results||[],this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load API data:",o),o}}async loadRestApiData(t){var i,c;const o=Ca(),n=((i=t.endpoints)==null?void 0:i.bulk)||"/api/people-groups/list",r=((c=t.defaultFields)==null?void 0:c.join(","))||"",s=[];r&&s.push(`fields=${r}`);const a={...t.queryParams||{}};this.locale&&(a.lang=this.locale);for(const[u,p]of Object.entries(a))s.push(`${u}=${encodeURIComponent(p)}`);const l=`${o}${n}?${s.join("&")}`;try{const u=await fetch(l);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const p=u.headers.get("content-type")||"";if(!p.includes("application/json"))throw new Error(`API returned "${p}" instead of JSON. Server at ${o} may be down or misconfigured.`);const b=await u.json();return this.rawData=Array.isArray(b)?b:b.posts||b.data||b.results||[],this.normalizeData(t),this.normalizedData}catch(u){throw console.error(`[rest-api] Failed to load from ${t.id}:`,u),u}}normalizeData(t){const o=t.fieldMappings||{};this.normalizedData=[],this.dataByUniqueId=new Map;for(const n of this.rawData){const r={};for(const[i,c]of Object.entries(o))if(Array.isArray(c)){const u=c.map(p=>this.getFieldValue(n,p));r[i]=u.join("_")}else r[i]=this.getFieldValue(n,c);if(r.latitude=parseFloat(r.latitude)||0,r.longitude=parseFloat(r.longitude)||0,r.latitude===0&&r.longitude===0)continue;r.populationNum=this.parsePopulation(r.population),r.imageUrl=this.getImageUrl(r,t.imageConfig);const s=r.engagementStatus;s!=null&&(typeof s=="object"&&"value"in s?(r.engagementStatusLabel=s.label||s.value,r.engagementStatus=s.value==="engaged"):r.engagementStatus=s===!0||s===1||s==="1"||s==="true"||typeof s=="number"&&s>0||typeof s=="string"&&parseInt(s,10)>0);const a=r.adoptionStatus;a!=null&&(r.adoptionStatus=a===!0||a===1||a==="1"||a==="true"||typeof a=="object"&&!!(a!=null&&a.value)||typeof a=="number"&&a>0||typeof a=="string"&&parseInt(a,10)>0);const l=["doxaRegion","wagfRegion","wagfBlock","wagfMember","affinityBlock","cluster","peopleGroup","countryIso","religion","religionCode"];for(const i of l){const c=r[i];c!=null&&typeof c=="object"&&"value"in c?(r[i+"Label"]=c.label||c.value,r[i]=c.value):c!=null&&typeof c=="string"&&c!==""&&(r[i+"Label"]||(r[i+"Label"]=c))}r.countryName=r.countryIsoLabel||r.country||r.countryIso||"",r.religionName=r.religionLabel||r.religion||"",r._raw=n,this.normalizedData.push(r),this.dataByUniqueId.set(r.uniqueId,r)}this.rawData=null}getFieldValue(t,o){if(!o)return"";if(t[o]!==void 0)return t[o];const n=o.trim();if(t[n]!==void 0)return t[n];for(const r of Object.keys(t))if(r.trim()===n||r.includes(n)||n.includes(r.trim()))return t[r];return""}parsePopulation(t){if(!t)return 0;const o=String(t).replace(/,/g,"").trim(),n=parseInt(o,10);return isNaN(n)?0:n}getImageUrl(t,o){if(!o)return"";const n=o.placeholderUrl||"",r=t[o.useField];return r&&String(r).trim()&&!String(r).includes("NoImageAvailable")?r:n}getData(){return this.normalizedData}getByUniqueId(t){return this.dataByUniqueId.get(t)}getByCoordinates(t,o,n=1e-4){return this.normalizedData.find(r=>Math.abs(r.latitude-t)o.peopleGroupId===t)}getLanguageFamilies(){const t=new Set;return this.normalizedData.forEach(o=>{o.languageFamily&&t.add(o.languageFamily)}),Array.from(t).sort()}getDataByLanguageFamily(){const t={};return this.normalizedData.forEach(o=>{const n=o.languageFamily||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getDataByRegion(){const t={};return this.normalizedData.forEach(o=>{const n=o.doxaRegion||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getStats(){return{totalRecords:this.normalizedData.length,withPeopleId3:this.normalizedData.filter(t=>t.peopleId3).length,withPhotos:this.normalizedData.filter(t=>t.imageUrl&&!String(t.imageUrl).includes("NoImageAvailable")).length,languageFamilies:this.getLanguageFamilies().length,countries:new Set(this.normalizedData.map(t=>t.country)).size,regions:Object.keys(this.getDataByRegion()).length}}}new $u;const Eu=(e,t)=>Object.fromEntries(Object.entries(e||{}).map(([o,n])=>[o,t(n,o)])),Su=e=>e==null?"—":Number(e).toLocaleString("en-US");function nr(e){const t=Eu(e.facets,r=>r.get),o=Object.fromEntries((e.columns||[]).map(r=>[r.key,r.get])),n=Array.isArray(e.searchKeys)?e.searchKeys:null;return n?n.map(r=>t[r]||o[r]).filter(r=>typeof r=="function"):(e.columns||[]).filter(r=>r.type!=="num"&&typeof r.get=="function").map(r=>r.get)}function rr(e,t){return o=>{var r;const n=(((r=e==null?void 0:e.searchTerm)==null?void 0:r.value)||"").trim().toLowerCase();if(!n)return!0;for(const s of t){const a=s(o);if(a!=null&&String(a).toLowerCase().includes(n))return!0}return!1}}function F_(e,t,o,n,r){return(e||[]).map(s=>{var i,c;let a,l;if(s.kind==="count")a=t.length,s.showDelta&&(l=Math.max(0,o.length-t.length));else if(s.kind==="sum")a=t.reduce((u,p)=>u+(Number(p[s.field])||0),0);else if(s.kind==="pct")a=t.length?Math.round(t.filter(s.test).length/t.length*100)+"%":"—";else if(s.kind==="distinct"){const u=s.via?(c=(i=r==null?void 0:r.facets)==null?void 0:i[s.field])==null?void 0:c[s.via]:n[s.field],p=new Set;t.forEach(b=>{const v=u?u(b):b[s.field];v&&p.add(v)}),a=p.size}return{id:s.id,label:s.label,kind:s.kind,value:a,delta:l}})}function R_(e){const t=ie(null),o=ie(!1),n=ie(!1),r=ie(!1),s=ie("map"),a=[{k:"map",l:"Map"},{k:"facets",l:"Filters"},{k:"table",l:"Table"},{k:"charts",l:"Charts"}];let l=null;const i=ie(!1),c=ie(!1),u=ie(!1);_t(()=>{t.value&&(l=new ResizeObserver(()=>{const x=t.value.clientWidth;o.value=x<760,n.value=x>=760&&x<1180,r.value=x>=760&&x<980}),l.observe(t.value)),e&&e.on("toggleTable",x=>{i.value=!!x}),e&&e.on("toggleFacet",x=>{c.value=!!x}),e&&e.on("toggleRail",x=>{u.value=!!x})}),Bt(()=>l&&l.disconnect());function p(x){const C=x.target.closest("[data-view]");C&&(s.value=C.getAttribute("data-view"))}const b=le(()=>!o.value||s.value==="facets"),v=le(()=>!o.value||s.value==="map"),S=le(()=>!o.value||s.value==="table"),$=le(()=>!o.value||s.value==="charts");return{shell:t,isNarrow:o,slimRail:n,slimFacet:r,mobileView:s,SEG:a,tableCollapsed:i,facetCollapsed:c,railCollapsed:u,setView:p,showFacets:b,showMap:v,showTable:S,showCharts:$}}function M_(e){function t(){try{const o=encodeURIComponent(JSON.stringify(e.filterSet));typeof location<"u"&&history.replaceState(null,"","#f="+o)}catch{}}pt(()=>({...e.filterSet}),t,{deep:!0}),_t(()=>{try{const o=typeof location<"u"&&/[#&]f=([^&]+)/.exec(location.hash);if(o){const n=JSON.parse(decodeURIComponent(o[1]));Object.entries(n).forEach(([r,s])=>e.setFilter(r,s))}}catch{}})}function O_(e){var $;const t=b_();t.configureHierarchy(e);const o=__(e.data),n=Eu(e.facets,x=>x.get),r=rr(t,nr(e)),s=le(()=>{var f;const x=o.rows.value||[],C=Object.keys(t.filterSet),m=!!(((f=t.searchTerm)==null?void 0:f.value)||"").trim();return!C.length&&!m?x:x.filter(g=>C.every(_=>{const k=n[_];return k?k(g)===t.filterSet[_]:!0})&&r(g))}),a=le(()=>F_(e.kpis,s.value,o.rows.value||[],n,e)),l=R_(t);M_(t);const i=o.sourceId||Wt.activeSource,c=(($=Wt.sources)==null?void 0:$[i])||{},u=new $u,p=le(()=>{const x=o.rows.value||[];return x.length?(u.rawData=x.slice(),u.normalizeData(c),u.normalizedData):[]}),b={sources:{[i]:{get features(){return p.value}}}},{labelFor:v}=or(e,b,i),S=Ta({rowStore:o.rowStore,rows:o.rows,selectionSet:t.selectionSet,filterSet:t.filterSet,FACET_ACC:n,dataOpts:e.data,labelFor:v});return po("selectionBus",t),po("dashboardData",o),po("dashboardConfig",e),po("dataStore",b),po("searchSourceId",i),_t(()=>o.load()),{bus:t,data:o,FACET_ACC:n,filteredRows:s,kpis:a,exporter:S,responsive:l}}const D_={facetW:296,railW:296,tableH:"34%",mapH:260,shellH:502},j_={facetW:[160,420],railW:[200,520],tableH:[12,70],mapH:[220,1400],shellH:[400,2600]},Au=32,Cu=120,Et=(e,[t,o])=>Math.min(o,Math.max(t,e)),ts=(e,t)=>{const o=parseFloat(String(e));return Number.isFinite(o)?o:t};function z_(e={}){const{shellRef:t,bus:o=null,isNarrow:n=!1,pageScroll:r=!1,storageKey:s="rd-dashboard-layout"}=e,a={...D_,...e.defaults||{}},l={...j_,...e.clamps||{}},i=ie(a.facetW),c=ie(a.railW),u=ie(a.tableH),p=ie(a.mapH),b=ie(a.shellH),v=ie(!1),S=ie(!1),$=ie(!1),x=()=>!!de(n),C=()=>!!de(r);function m(){const j=t&&t.value;if(!j)return b.value;const T=parseFloat(getComputedStyle(j).getPropertyValue("--rd-shell-h"));if(Number.isFinite(T)&&T>0)return Math.round(T);const H=j.querySelector('[data-region="map"]'),ae=j.querySelector('[data-region="table"]');if(!H||!ae)return b.value;const ye=H.getBoundingClientRect().height+ae.getBoundingClientRect().height;return ye>0?Math.round(ye):b.value}function f(){const j=t&&t.value;j&&(v.value&&(j.style.setProperty("--facet-w",i.value+"px"),j.style.setProperty("--rail-w",c.value+"px"),j.style.setProperty("--table-h",u.value)),S.value&&j.style.setProperty("--rd-map-h",p.value+"px"),$.value&&j.style.setProperty("--rd-shell-h",b.value+"px"))}function g(){const j=t&&t.value;j&&(j.style.removeProperty("--facet-w"),j.style.removeProperty("--rail-w"),j.style.removeProperty("--table-h"),j.style.removeProperty("--rd-map-h"),j.style.removeProperty("--rd-shell-h"))}function _(){try{localStorage.setItem(s,JSON.stringify({facetW:i.value,railW:c.value,tableH:u.value,mapH:p.value,shellH:b.value}))}catch{}}function k(){try{const j=localStorage.getItem(s);if(!j)return!1;const T=JSON.parse(j);return Number.isFinite(T.facetW)&&(i.value=Et(T.facetW,l.facetW)),Number.isFinite(T.railW)&&(c.value=Et(T.railW,l.railW)),T.tableH!=null&&(u.value=Et(ts(T.tableH,ts(a.tableH,34)),l.tableH)+"%"),v.value=!0,Number.isFinite(T.shellH)&&(b.value=Et(T.shellH,l.shellH),$.value=!0),Number.isFinite(T.mapH)&&(p.value=Et(T.mapH,l.mapH),S.value=!0),!0}catch{return!1}}function E(){try{localStorage.removeItem(s)}catch{}i.value=a.facetW,c.value=a.railW,u.value=a.tableH,p.value=a.mapH,b.value=a.shellH,v.value=!1,S.value=!1,$.value=!1,g()}const M=ie(!1);function F(){if(M.value)return;M.value=!0;const j=t&&t.value;if(j&&j.setAttribute("data-rd-resizing","1"),o&&typeof o.emit=="function")try{o.emit("layoutResizing",!0)}catch{}}function J(){if(!M.value)return;M.value=!1;const j=t&&t.value;if(j&&j.removeAttribute("data-rd-resizing"),o&&typeof o.emit=="function")try{o.emit("layoutResizing",!1)}catch{}}function W(j,T){if(x())return;const H=t&&t.value;if(!H)return;T.preventDefault();const ae=H.getBoundingClientRect(),ye=T.clientX,Se=i.value,Ae=c.value,Te=T.currentTarget,ve=j==="table"&&C(),ge=j==="shell"&&C();let he=0,xe=l.mapH[1];if(ve){const O=H.querySelector('[data-region="map"]'),d=O?O.getBoundingClientRect():null;he=d?d.top:T.clientY-p.value,xe=Math.max(l.mapH[0],b.value-(Au+Cu))}const y=T.clientY,A=ge?m():b.value;try{Te&&Te.setPointerCapture&&Te.setPointerCapture(T.pointerId)}catch{}F();let w=0,G=null;function Q(){if(w=0,!G)return;const O=G;if(G=null,j==="facet")i.value=Math.round(Et(Se+(O.clientX-ye),l.facetW)),v.value=!0;else if(j==="rail")c.value=Math.round(Et(Ae-(O.clientX-ye),l.railW)),v.value=!0;else if(ve)p.value=Math.round(Et(O.clientY-he,[l.mapH[0],xe])),S.value=!0;else if(j==="table"){const d=(ae.bottom-O.clientY)/ae.height*100;u.value=Math.round(Et(d,l.tableH))+"%",v.value=!0}else ge&&(b.value=Math.round(Et(A+(O.clientY-y),l.shellH)),$.value=!0);f()}function ne(O){G={clientX:O.clientX,clientY:O.clientY},w||(w=requestAnimationFrame(Q))}function D(O){window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),w&&(cancelAnimationFrame(w),w=0),Q();try{Te&&Te.releasePointerCapture&&Te.releasePointerCapture(O.pointerId)}catch{}_(),J()}window.addEventListener("pointermove",ne),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}const re=j=>W("facet",j),me=j=>W("rail",j),z=j=>W("table",j),oe=j=>W("shell",j),K={facet:16,rail:16,table:24,mapH:24,shellH:24};function q(j,T,H){if(!x()){if(j==="facet")i.value=H?T<0?l.facetW[0]:l.facetW[1]:Math.round(Et(i.value+T*K.facet,l.facetW)),v.value=!0;else if(j==="rail")c.value=H?T<0?l.railW[1]:l.railW[0]:Math.round(Et(c.value-T*K.rail,l.railW)),v.value=!0;else if(j==="table"&&C()){const ae=Math.max(l.mapH[0],b.value-(Au+Cu));p.value=H?T<0?l.mapH[0]:ae:Math.round(Et(p.value+T*K.mapH,[l.mapH[0],ae])),S.value=!0}else if(j==="table"){const ae=H?T<0?l.tableH[0]:l.tableH[1]:Et(ts(u.value,ts(a.tableH,34))-T*K.table/4,l.tableH);u.value=Math.round(ae)+"%",v.value=!0}else j==="shell"&&C()&&(b.value=H?T<0?l.shellH[0]:l.shellH[1]:Math.round(Et(b.value+T*K.shellH,l.shellH)),$.value=!0);f(),_()}}function L(j,T){const H=T.key;let ae=0;if(j==="table"||j==="shell"?H==="ArrowUp"?ae=-1:H==="ArrowDown"&&(ae=1):H==="ArrowLeft"?ae=-1:H==="ArrowRight"&&(ae=1),ae){T.preventDefault(),q(j,ae);return}(H==="Home"||H==="End")&&(T.preventDefault(),q(j,H==="Home"?-1:1,!0))}let U=null;return _t(()=>{k()&&f(),o&&typeof o.on=="function"&&(U=o.on("resetLayout",E))}),Bt(()=>{try{U&&U()}catch{}try{J()}catch{}}),{facetW:i,railW:c,tableH:u,mapH:p,shellH:b,customized:v,resizing:M,startFacetResize:re,startRailResize:me,startTableResize:z,startShellResize:oe,startResize:W,reset:E,applyVars:f,stepResize:q,onResizeKeydown:L}}const U_=".search-box{position:relative;display:flex;align-items:center;margin:0 auto;width:100%;color:var(--dx-muted, #6d766e)}.search-box .search-icon{position:absolute;left:12px;pointer-events:none}.search-box input{width:100%;padding:10px 12px 10px 38px;font-size:.95rem;color:var(--dx-text, #3b463d);background:var(--dx-elevated, #fff);border:1px solid var(--dx-line, #d1d4cd);border-radius:10px;outline:none;box-sizing:border-box}.search-box input:focus{border-color:var(--dx-accent, #92b195);box-shadow:0 0 0 2px var(--dx-accent-weak, rgba(146, 177, 149, .18))}",B_=["value","placeholder","aria-label"],Pa=xn({__name:"SearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Search…"},ariaLabel:{type:String,default:"Search"},maxWidth:{type:String,default:""}},emits:["update:modelValue","search"],setup(e,{emit:t}){const o=e,n=t,r=le(()=>o.maxWidth?{maxWidth:o.maxWidth}:{});function s(a){const l=a.target.value??"";n("update:modelValue",l),n("search",{value:l})}return(a,l)=>(V(),Z("div",{class:"search-box",style:lt(r.value)},[l[0]||(l[0]=P("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[P("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),P("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),P("input",{type:"search",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.ariaLabel,onInput:s},null,40,B_)],4))}},[["styles",[U_]]]),G_=["title","aria-label","disabled"],Na={__name:"MapControlButton",props:{isDark:{type:Boolean,default:!1},title:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){return Nt(` .mcb{ width:var(--map-btn-size,40px);height:var(--map-btn-size,40px); background:#fff; @@ -702,7 +702,7 @@ --rd-line:var(--dx-line); --rd-bg:var(--dx-surface); --rd-ink:var(--dx-text); --rd-muted:var(--dx-muted); --rd-panel:var(--dx-elevated); --rd-primary:var(--dx-accent); - --facet-w:296px; --rail-w:264px; + --facet-w:296px; --rail-w:296px; --rd-edge:14px; --rd-topbar-h:38px; --rd-stats-h:22px; @@ -710,7 +710,7 @@ --r-lg:10px; --r-md:6px; --r-pill:999px; } .profile-loader{ width:100%; height:100%; } .rd-shell{ position:relative; display:grid; width:100%; height:100%; min-height:560px; box-sizing:border-box; - grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,264px); + grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,296px); grid-template-rows: var(--rd-topbar-h,38px) auto var(--rd-stats-h,22px) 1fr var(--table-h,34%); grid-template-areas: "topbar topbar topbar" "filters filters filters" "stats stats stats" "facets map rail" "facets table rail"; gap:1px; background:var(--rd-line, #d1d4cd); container-type:inline-size; @@ -726,7 +726,7 @@ .rd-rail{ display:flex; flex-direction:column; min-height:0; height:100%; background:var(--rd-bg, #f3f3f1); } .rd-rail > [data-region="charts-rail"]{ flex:1 1 auto; min-height:0; } .rd-shell.rd-table-collapsed{ grid-template-rows:var(--rd-topbar-h,38px) auto var(--rd-stats-h,22px) 1fr var(--table-bar-h,30px); } - .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,264px); } + .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,296px); } .rd-shell.rd-rail-collapsed{ grid-template-columns:var(--facet-w,296px) minmax(0,1fr) 0; } .rd-shell.rd-facet-collapsed.rd-rail-collapsed{ grid-template-columns:0 minmax(0,1fr) 0; } .rd-edge-caret{ position:absolute; top:50%; transform:translateY(-50%); z-index:6; width:16px; diff --git a/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid/default/index.html b/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid/default/index.html index f59bf1f00..d262b43b0 100644 --- a/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid/default/index.html +++ b/public/doxa-maps/dashboard-plus-grid/dashboard-plus-grid/default/index.html @@ -40,7 +40,7 @@ - + - + + window.FORGE.manifest = {"schema":"doxa-maps-manifest@1","generatedFrom":"plugin-designs/*/*.vue","embedBase":".","bundleCount":21,"profileCount":32,"bundles":[{"bundle":"all-people-groups","scriptUrl":"./all-people-groups/all-people-groups.js","output":"doxa-maps/all-people-groups/all-people-groups.js","integrity":"sha384-xK62b4nEd/ei3xDdRNOOCl9YyDRliPUvS8dtna07xFFR1nwPqaCiAHBNuxRtuaIH","elements":["all-people-groups"],"profiles":[{"profile":"all-people-groups","file":"all-people-groups.vue","description":"All 12,379 people groups (peoplegroups.org) in four colors — reached,","element":"all-people-groups","type":"single","isMap":true,"iframeUrl":"./all-people-groups/all-people-groups/index.html","scriptUrl":"./all-people-groups/all-people-groups.js","embed":{"iframe":"\u003ciframe src=\"./all-people-groups/all-people-groups/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./all-people-groups/all-people-groups.js\" integrity=\"sha384-xK62b4nEd/ei3xDdRNOOCl9YyDRliPUvS8dtna07xFFR1nwPqaCiAHBNuxRtuaIH\" crossorigin=\"anonymous\">\u003c/script>\n\u003call-people-groups profile-config='{\"profile\":\"all-people-groups\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/all-people-groups>"},"bundle":"all-people-groups"}]},{"bundle":"big-picture","scriptUrl":"./big-picture/big-picture.js","output":"doxa-maps/big-picture/big-picture.js","integrity":"sha384-LUOvfZc9KcFqZGKjtE2G6gg3guW7LS6DIvZBA0Mqf4qnyzwUh5EG86a5XXJp4Lyl","elements":["bp-big-picture","bp-research-header","people-groups-grid"],"composes":["bp-research-header","people-groups-grid"],"profiles":[{"profile":"big-picture","file":"big-picture.vue","description":"The Cat-4 composite that PAIRS the two real capability elements of the","element":"bp-big-picture","type":"nested-elements-mfe","isMap":false,"iframeUrl":"./big-picture/big-picture/index.html","scriptUrl":"./big-picture/big-picture.js","embed":{"iframe":"\u003ciframe src=\"./big-picture/big-picture/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./big-picture/big-picture.js\" integrity=\"sha384-LUOvfZc9KcFqZGKjtE2G6gg3guW7LS6DIvZBA0Mqf4qnyzwUh5EG86a5XXJp4Lyl\" crossorigin=\"anonymous\">\u003c/script>\n\u003cbp-big-picture profile-config='{\"profile\":\"big-picture\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/bp-big-picture>"},"instances":[{"id":"big-picture","title":"Big Picture — research header ↔ people-groups grid (composite)","apiBaseUrl":"","props":{"profile":"big-picture","provider":"maplibre","instanceId":"bp-big-picture"},"element":"bp-big-picture","iframeUrl":"./big-picture/big-picture/big-picture/index.html","embed":{"iframe":"\u003ciframe src=\"./big-picture/big-picture/big-picture/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"frontier","title":"Big Picture — frontier accent","apiBaseUrl":"","props":{"profile":"big-picture","provider":"maplibre","instanceId":"bp-big-picture-frontier","accent":"#22d3ee","title":"Big Picture — Frontier Focus"},"element":"bp-big-picture","iframeUrl":"./big-picture/big-picture/frontier/index.html","embed":{"iframe":"\u003ciframe src=\"./big-picture/big-picture/frontier/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}],"bundle":"big-picture"}]},{"bundle":"cities-internet","scriptUrl":"./cities-internet/cities-internet.js","output":"doxa-maps/cities-internet/cities-internet.js","integrity":"sha384-fqVHxFNirz7+lNdo6RyMGcSABK6RIBNOw+iEQ/Ea6/c5UP+9dqS+Qt4I26HW5B7q","elements":["cities-internet-map"],"profiles":[{"profile":"connectivity-list","file":"connectivity-list.vue","description":"Countries where DX people groups live, grouped by region, showing measured internet penetration","element":"cities-internet-map","type":"single","isMap":false,"iframeUrl":"./cities-internet/connectivity-list/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/connectivity-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-fqVHxFNirz7+lNdo6RyMGcSABK6RIBNOw+iEQ/Ea6/c5UP+9dqS+Qt4I26HW5B7q\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"connectivity-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/cities-internet-map>"}},{"profile":"connectivity-map","file":"connectivity-map.vue","description":"Every country shaded by measured internet penetration, with its named carriers and dominant","element":"cities-internet-map","type":"single","isMap":true,"iframeUrl":"./cities-internet/connectivity-map/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/connectivity-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-fqVHxFNirz7+lNdo6RyMGcSABK6RIBNOw+iEQ/Ea6/c5UP+9dqS+Qt4I26HW5B7q\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"connectivity-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/cities-internet-map>"}},{"profile":"data-tables","file":"data-tables.vue","description":"Four validated research tables, one tab each, with sortable and filterable columns, CSV and JSON","element":"cities-internet-map","type":"single","isMap":false,"iframeUrl":"./cities-internet/data-tables/index.html","scriptUrl":"./cities-internet/cities-internet.js","embed":{"iframe":"\u003ciframe src=\"./cities-internet/data-tables/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./cities-internet/cities-internet.js\" integrity=\"sha384-fqVHxFNirz7+lNdo6RyMGcSABK6RIBNOw+iEQ/Ea6/c5UP+9dqS+Qt4I26HW5B7q\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccities-internet-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/cities-internet-map>"}}]},{"bundle":"country-posters","scriptUrl":"./country-posters/country-posters.js","output":"doxa-maps/country-posters/country-posters.js","integrity":"sha384-Hz695w/9J1maAa0H9nynW2C6KvE6ltlaaTV9rtkNLDEHnxuI53dXZtiLL7JtVF55","elements":["country-posters-map"],"profiles":[{"profile":"countries-map","file":"countries-map.vue","description":"The researcher's workbench retargeted from people groups to COUNTRIES — region","element":"country-posters-map","type":"single","isMap":true,"iframeUrl":"./country-posters/countries-map/index.html","scriptUrl":"./country-posters/country-posters.js","embed":{"iframe":"\u003ciframe src=\"./country-posters/countries-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./country-posters/country-posters.js\" integrity=\"sha384-Hz695w/9J1maAa0H9nynW2C6KvE6ltlaaTV9rtkNLDEHnxuI53dXZtiLL7JtVF55\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccountry-posters-map profile-config='{\"profile\":\"countries-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/country-posters-map>"}},{"profile":"country-poster-wall","file":"country-poster-wall.vue","description":"One printable card per country, grouped into COLLAPSIBLE regional sections so the","element":"country-posters-map","type":"single","isMap":false,"iframeUrl":"./country-posters/country-poster-wall/index.html","scriptUrl":"./country-posters/country-posters.js","embed":{"iframe":"\u003ciframe src=\"./country-posters/country-poster-wall/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./country-posters/country-posters.js\" integrity=\"sha384-Hz695w/9J1maAa0H9nynW2C6KvE6ltlaaTV9rtkNLDEHnxuI53dXZtiLL7JtVF55\" crossorigin=\"anonymous\">\u003c/script>\n\u003ccountry-posters-map profile-config='{\"profile\":\"country-poster-wall\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/country-posters-map>"}}]},{"bundle":"dashboard-plus-grid","scriptUrl":"./dashboard-plus-grid/dashboard-plus-grid.js","output":"doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js","integrity":"sha384-zBtRlx3cFqHWsuOochNdwrzQCo6GHsY2MbOY9zGhLS9PqBCAr0cbkdQWRFN3/+Cf","elements":["dashboard-plus-grid"],"composes":["research-dashboard","people-groups-grid"],"profiles":[{"profile":"dashboard-plus-grid","file":"dashboard-plus-grid.vue","description":"Both children are IMPORTED DIRECTLY (compiled into this ONE bundle — no runtime bundle","element":"dashboard-plus-grid","type":"nested-elements-mfe","isMap":true,"iframeUrl":"./dashboard-plus-grid/dashboard-plus-grid/index.html","scriptUrl":"./dashboard-plus-grid/dashboard-plus-grid.js","embed":{"iframe":"\u003ciframe src=\"./dashboard-plus-grid/dashboard-plus-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-zBtRlx3cFqHWsuOochNdwrzQCo6GHsY2MbOY9zGhLS9PqBCAr0cbkdQWRFN3/+Cf\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/dashboard-plus-grid>"},"instances":[{"id":"default","title":"default","apiBaseUrl":"","props":{"profile":"dashboard-plus-grid"},"element":"dashboard-plus-grid","iframeUrl":"./dashboard-plus-grid/dashboard-plus-grid/default/index.html","embed":{"iframe":"\u003ciframe src=\"./dashboard-plus-grid/dashboard-plus-grid/default/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"demo-map","scriptUrl":"./demo-map/demo-map.js","output":"doxa-maps/demo-map/demo-map.js","integrity":"sha384-30eVMRgp3BZf/wqP7A2s3/n3G62zmxdAyRX1m7dktVcAXDAva/pAdALScLNtY/2D","elements":["demo-map"],"profiles":[{"profile":"demo-map","file":"demo-map.vue","description":"Simple two-tab demo map. Tab 1 colors pins by religion (shared","element":"demo-map","type":"parameterized","isMap":true,"iframeUrl":"./demo-map/demo-map/index.html","scriptUrl":"./demo-map/demo-map.js","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./demo-map/demo-map.js\" integrity=\"sha384-30eVMRgp3BZf/wqP7A2s3/n3G62zmxdAyRX1m7dktVcAXDAva/pAdALScLNtY/2D\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdemo-map profile-config='{\"profile\":\"demo-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/demo-map>"},"instances":[{"id":"maplibre","title":"Demo map — MapLibre (token-free)","apiBaseUrl":"","props":{"profile":"demo-map","provider":"maplibre","instanceId":"demo-maplibre"},"element":"demo-map","iframeUrl":"./demo-map/demo-map/maplibre/index.html","embed":{"iframe":"\u003ciframe src=\"./demo-map/demo-map/maplibre/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}],"bundle":"demo-map"}]},{"bundle":"doxa-maps-spa","scriptUrl":"./doxa-maps-spa/doxa-maps-spa.js","output":"doxa-maps/doxa-maps-spa/doxa-maps-spa.js","integrity":"sha384-GNqHiINJmPj5jwlIbFd3WQ2FfQy9VwJ6gZEjisE/TmS23X7RjCEz5YL81gKSVD5c","elements":["doxa-maps-spa"],"composes":["bp-big-picture","doxa-research-map","doxa-simple-map","cities-internet-map","gospel-resources-map","my-upg-100-list-map"],"profiles":[{"profile":"doxa-maps-spa","file":"doxa-maps-spa.vue","description":"The DX-maps app itself: one element whose vertical-tab rail nests every other","element":"doxa-maps-spa","type":"nested-mfe-spa","isMap":false,"iframeUrl":"./doxa-maps-spa/doxa-maps-spa/index.html","scriptUrl":"./doxa-maps-spa/doxa-maps-spa.js","embed":{"iframe":"\u003ciframe src=\"./doxa-maps-spa/doxa-maps-spa/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./doxa-maps-spa/doxa-maps-spa.js\" integrity=\"sha384-GNqHiINJmPj5jwlIbFd3WQ2FfQy9VwJ6gZEjisE/TmS23X7RjCEz5YL81gKSVD5c\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-maps-spa profile-config='{\"profile\":\"doxa-maps-spa\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/doxa-maps-spa>"},"instances":[{"id":"app","title":"DX-Maps SPA — Big Picture + every research map (app-shell)","apiBaseUrl":"","props":{"profile":"doxa-maps-spa","provider":"maplibre","instanceId":"doxa-maps-spa-app","title":"DX-Maps"},"element":"doxa-maps-spa","iframeUrl":"./doxa-maps-spa/doxa-maps-spa/app/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-maps-spa/doxa-maps-spa/app/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"doxa-research-map","scriptUrl":"./doxa-research-map/doxa-research-map.js","output":"doxa-maps/doxa-research-map/doxa-research-map.js","integrity":"sha384-RNehzQHiymgsOQl1VH//TZQeAQyx1F3W7tBEjS/o02V9GoAaqFISm8gt6xFn0xse","elements":["doxa-research-map"],"profiles":[{"profile":"research-map","file":"research-map.vue","description":"The researcher's workbench: every piece a missiologist, demographer or","element":"doxa-research-map","type":"monolithic","isMap":true,"iframeUrl":"./doxa-research-map/research-map/index.html","scriptUrl":"./doxa-research-map/doxa-research-map.js","embed":{"iframe":"\u003ciframe src=\"./doxa-research-map/research-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-RNehzQHiymgsOQl1VH//TZQeAQyx1F3W7tBEjS/o02V9GoAaqFISm8gt6xFn0xse\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/doxa-research-map>"}}]},{"bundle":"doxa-simple-map","scriptUrl":"./doxa-simple-map/doxa-simple-map.js","output":"doxa-maps/doxa-simple-map/doxa-simple-map.js","integrity":"sha384-nj5ld5CCWbfFoRiOSAdTKuZqK97b9HnROryFnZI8bDC8/ASzsLeqQdK5dI71lsq+","elements":["doxa-map","doxa-simple-map"],"profiles":[{"profile":"doxa-simple-map","file":"doxa-simple-map.vue","description":"The simple world map, shipped as three presets off ONE prop table —","element":"doxa-map","type":"parameterized","isMap":true,"iframeUrl":"./doxa-simple-map/doxa-simple-map/index.html","scriptUrl":"./doxa-simple-map/doxa-simple-map.js","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./doxa-simple-map/doxa-simple-map.js\" integrity=\"sha384-nj5ld5CCWbfFoRiOSAdTKuZqK97b9HnROryFnZI8bDC8/ASzsLeqQdK5dI71lsq+\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-map profile-config='{\"profile\":\"doxa-simple-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/doxa-map>"},"instances":[{"id":"prayer","title":"Prayer Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-prayer","dataSource":"pray-tools","tabs":[{"id":"prayer","colorStrategy":"prayer","legend":"prayer","popup":"prayer"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/prayer/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/prayer/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"engagement","title":"Engagement Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-engagement","dataSource":"pray-tools","tabs":[{"id":"engagement","colorStrategy":"engagement","legend":"engagement","popup":"engagement"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/engagement/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/engagement/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"adoption","title":"Adoption Map","apiBaseUrl":"https://pray.doxa.life","props":{"profile":"doxa-simple-map","instanceId":"embed-adoption","dataSource":"pray-tools","tabs":[{"id":"adoption","colorStrategy":"adoption","legend":"adoption","popup":"adoption"}]},"element":"doxa-map","iframeUrl":"./doxa-simple-map/doxa-simple-map/adoption/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-simple-map/doxa-simple-map/adoption/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"doxa-vision-card","scriptUrl":"./doxa-vision-card/doxa-vision-card.js","output":"doxa-maps/doxa-vision-card/doxa-vision-card.js","integrity":"sha384-2mza3cltN5LQQIrlENG/IVL6Icd9zzcFve3E8R8VWuCdYOGW9uGKFvxcbu6eFfwn","elements":["doxa-vision-card"],"profiles":[{"profile":"doxa-vision-card","file":"doxa-vision-card.vue","description":"The Capability-1 example: ONE folder -> ONE bundle -> ONE element.","element":"doxa-vision-card","type":"parameterized","isMap":false,"iframeUrl":"./doxa-vision-card/doxa-vision-card/index.html","scriptUrl":"./doxa-vision-card/doxa-vision-card.js","embed":{"iframe":"\u003ciframe src=\"./doxa-vision-card/doxa-vision-card/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./doxa-vision-card/doxa-vision-card.js\" integrity=\"sha384-2mza3cltN5LQQIrlENG/IVL6Icd9zzcFve3E8R8VWuCdYOGW9uGKFvxcbu6eFfwn\" crossorigin=\"anonymous\">\u003c/script>\n\u003cdoxa-vision-card profile-config='{\"profile\":\"doxa-vision-card\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/doxa-vision-card>"},"instances":[{"id":"default","title":"Vision card — reach at a glance","apiBaseUrl":"","props":{"profile":"doxa-vision-card","provider":"maplibre","instanceId":"vision-card-default"},"element":"doxa-vision-card","iframeUrl":"./doxa-vision-card/doxa-vision-card/default/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-vision-card/doxa-vision-card/default/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"frontier","title":"Vision card — frontier accent","apiBaseUrl":"","props":{"profile":"doxa-vision-card","provider":"maplibre","instanceId":"vision-card-frontier","accent":"#22d3ee","title":"The last frontier of the gospel.","tagline":"Frontier people groups — where fewer than one in a thousand follow Jesus.","stats":[{"value":"1,910","label":"Frontier groups","note":"under 0.1% believers"},{"value":"2.1B","label":"People","note":"living in frontier settings"},{"value":"0.1%","label":"Christian","note":"or fewer, in each group"}]},"element":"doxa-vision-card","iframeUrl":"./doxa-vision-card/doxa-vision-card/frontier/index.html","embed":{"iframe":"\u003ciframe src=\"./doxa-vision-card/doxa-vision-card/frontier/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}],"bundle":"doxa-vision-card"}]},{"bundle":"golden-path-check","scriptUrl":"./golden-path-check/golden-path-check.js","output":"doxa-maps/golden-path-check/golden-path-check.js","integrity":"sha384-1V/sT5SkV0U9yTCK9ELIOFfU1ZIJkInIF6nG3UllJ4dxax3RsEAupSGLJEFK6e14","elements":["golden-path-check"],"profiles":[{"profile":"golden-path-check","file":"golden-path-check.vue","description":"A live self-test of the develop-a-plugin-and-see-it-live path: it reads the built","element":"golden-path-check","type":"single","isMap":false,"iframeUrl":"./golden-path-check/golden-path-check/index.html","scriptUrl":"./golden-path-check/golden-path-check.js","embed":{"iframe":"\u003ciframe src=\"./golden-path-check/golden-path-check/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./golden-path-check/golden-path-check.js\" integrity=\"sha384-1V/sT5SkV0U9yTCK9ELIOFfU1ZIJkInIF6nG3UllJ4dxax3RsEAupSGLJEFK6e14\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgolden-path-check profile-config='{\"profile\":\"golden-path-check\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/golden-path-check>"}}]},{"bundle":"gospel-resources","scriptUrl":"./gospel-resources/gospel-resources.js","output":"doxa-maps/gospel-resources/gospel-resources.js","integrity":"sha384-MBKsP+YZGmQ/TOcM1VDm7E0qB5EOP5W+MbUWVtfjiP1J0pIDSUi5SWbj1bgY74+X","elements":["gospel-resources-map"],"profiles":[{"profile":"charts","file":"charts.vue","description":"The gap by LANGUAGE (ISO 639-3) rather than by people group — because one translation serves every","element":"gospel-resources-map","type":"single","isMap":false,"iframeUrl":"./gospel-resources/charts/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/charts/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-MBKsP+YZGmQ/TOcM1VDm7E0qB5EOP5W+MbUWVtfjiP1J0pIDSUi5SWbj1bgY74+X\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/gospel-resources-map>"}},{"profile":"data-tables","file":"data-tables.vue","description":"Two validated tables: what resources exist per people group, and whether that access is keeping","element":"gospel-resources-map","type":"single","isMap":false,"iframeUrl":"./gospel-resources/data-tables/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/data-tables/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-MBKsP+YZGmQ/TOcM1VDm7E0qB5EOP5W+MbUWVtfjiP1J0pIDSUi5SWbj1bgY74+X\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/gospel-resources-map>"}},{"profile":"resources-list","file":"resources-list.vue","description":"Which DX people groups have scripture in their own language, and which have none. The zero-resource","element":"gospel-resources-map","type":"single","isMap":false,"iframeUrl":"./gospel-resources/resources-list/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/resources-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-MBKsP+YZGmQ/TOcM1VDm7E0qB5EOP5W+MbUWVtfjiP1J0pIDSUi5SWbj1bgY74+X\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/gospel-resources-map>"}},{"profile":"resources-map","file":"resources-map.vue","description":"Every country shaded by how much of its unengaged population has NO gospel resource in their own","element":"gospel-resources-map","type":"single","isMap":true,"iframeUrl":"./gospel-resources/resources-map/index.html","scriptUrl":"./gospel-resources/gospel-resources.js","embed":{"iframe":"\u003ciframe src=\"./gospel-resources/resources-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-MBKsP+YZGmQ/TOcM1VDm7E0qB5EOP5W+MbUWVtfjiP1J0pIDSUi5SWbj1bgY74+X\" crossorigin=\"anonymous\">\u003c/script>\n\u003cgospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/gospel-resources-map>"}}]},{"bundle":"my-upg-100-list","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","output":"doxa-maps/my-upg-100-list/my-upg-100-list.js","integrity":"sha384-we1vxOSsKO6L9jEWyO9RgD7mwBuR9HsBiCkk7vYS/zAADO3T7oXkpED2XeOd8tzO","elements":["my-upg-100-list-map"],"composes":["my-upg-100-list/upg-100-list","my-upg-100-list/poster-wall"],"profiles":[{"profile":"poster-wall","file":"poster-wall.vue","description":"A wall of printable poster cards, one per 100-list entry, each with a \"Show on map\" action that","element":"my-upg-100-list-map","type":"single","isMap":true,"iframeUrl":"./my-upg-100-list/poster-wall/index.html","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","embed":{"iframe":"\u003ciframe src=\"./my-upg-100-list/poster-wall/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./my-upg-100-list/my-upg-100-list.js\" integrity=\"sha384-we1vxOSsKO6L9jEWyO9RgD7mwBuR9HsBiCkk7vYS/zAADO3T7oXkpED2XeOd8tzO\" crossorigin=\"anonymous\">\u003c/script>\n\u003cmy-upg-100-list-map profile-config='{\"profile\":\"poster-wall\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/my-upg-100-list-map>"}},{"profile":"upg-100-list","file":"upg-100-list.vue","description":"A personal unreached-people-groups list painted as true boundary polygons —","element":"my-upg-100-list-map","type":"single","isMap":true,"iframeUrl":"./my-upg-100-list/upg-100-list/index.html","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","embed":{"iframe":"\u003ciframe src=\"./my-upg-100-list/upg-100-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./my-upg-100-list/my-upg-100-list.js\" integrity=\"sha384-we1vxOSsKO6L9jEWyO9RgD7mwBuR9HsBiCkk7vYS/zAADO3T7oXkpED2XeOd8tzO\" crossorigin=\"anonymous\">\u003c/script>\n\u003cmy-upg-100-list-map profile-config='{\"profile\":\"upg-100-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/my-upg-100-list-map>"}},{"profile":"upg-100-mfe","file":"upg-100-mfe.vue","description":"The standalone, shareable and embeddable composite of the my-upg-100-list family — it nests the map","element":"my-upg-100-list-map","type":"nested-elements-mfe","isMap":true,"iframeUrl":"./my-upg-100-list/upg-100-mfe/index.html","scriptUrl":"./my-upg-100-list/my-upg-100-list.js","embed":{"iframe":"\u003ciframe src=\"./my-upg-100-list/upg-100-mfe/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./my-upg-100-list/my-upg-100-list.js\" integrity=\"sha384-we1vxOSsKO6L9jEWyO9RgD7mwBuR9HsBiCkk7vYS/zAADO3T7oXkpED2XeOd8tzO\" crossorigin=\"anonymous\">\u003c/script>\n\u003cmy-upg-100-list-map profile-config='{\"profile\":\"upg-100-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/my-upg-100-list-map>"}}]},{"bundle":"people-groups-grid","scriptUrl":"./people-groups-grid/people-groups-grid.js","output":"doxa-maps/people-groups-grid/people-groups-grid.js","integrity":"sha384-SSTG1RUFoIjmfKCE2kvXqr3T0EfIHCys9RQ1NI+DtzhqGtRncZ9IYKEsXhyPV7gN","elements":["people-groups-grid"],"profiles":[{"profile":"people-groups-grid","file":"people-groups-grid.vue","description":"The people-groups grid as an owned custom element: card list, search and four","element":"people-groups-grid","type":"parameterized","isMap":false,"iframeUrl":"./people-groups-grid/people-groups-grid/index.html","scriptUrl":"./people-groups-grid/people-groups-grid.js","embed":{"iframe":"\u003ciframe src=\"./people-groups-grid/people-groups-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./people-groups-grid/people-groups-grid.js\" integrity=\"sha384-SSTG1RUFoIjmfKCE2kvXqr3T0EfIHCys9RQ1NI+DtzhqGtRncZ9IYKEsXhyPV7gN\" crossorigin=\"anonymous\">\u003c/script>\n\u003cpeople-groups-grid profile-config='{\"profile\":\"people-groups-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/people-groups-grid>"},"instances":[{"id":"people-groups-grid","title":"People Groups Grid — standalone (own search + 4 dropdowns)","apiBaseUrl":"","props":{"profile":"people-groups-grid","provider":"maplibre","instanceId":"people-groups-grid","pray-base-url":"https://pray.doxa.life"},"element":"people-groups-grid","iframeUrl":"./people-groups-grid/people-groups-grid/people-groups-grid/index.html","embed":{"iframe":"\u003ciframe src=\"./people-groups-grid/people-groups-grid/people-groups-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}},{"id":"driven","title":"People Groups Grid — externally driven (controls off, props/events)","apiBaseUrl":"","props":{"profile":"people-groups-grid","provider":"maplibre","instanceId":"people-groups-grid-driven","pray-base-url":"https://pray.doxa.life","show-search":"false","show-filters":"false"},"element":"people-groups-grid","iframeUrl":"./people-groups-grid/people-groups-grid/driven/index.html","embed":{"iframe":"\u003ciframe src=\"./people-groups-grid/people-groups-grid/driven/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"plugin-studio","scriptUrl":"./plugin-studio/plugin-studio.js","output":"doxa-maps/plugin-studio/plugin-studio.js","integrity":"sha384-YMc5RAwC0wy15F04IiCfyDsWCDpY4orw4Mt9+3oiO+8zNpzmsXWydqaBA+PTLdpo","elements":["plugin-studio"],"composes":["bp-big-picture","people-groups-grid","doxa-research-map","doxa-simple-map","cities-internet-map","gospel-resources-map","my-upg-100-list-map","doxa-vision-card","all-people-groups","research-dashboard"],"profiles":[{"profile":"plugin-studio","file":"plugin-studio.vue","description":"The developer's viewing surface: a sidebar that is the composability ladder","element":"plugin-studio","type":"nested-mfe-spa","isMap":false,"iframeUrl":"./plugin-studio/plugin-studio/index.html","scriptUrl":"./plugin-studio/plugin-studio.js","embed":{"iframe":"\u003ciframe src=\"./plugin-studio/plugin-studio/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./plugin-studio/plugin-studio.js\" integrity=\"sha384-YMc5RAwC0wy15F04IiCfyDsWCDpY4orw4Mt9+3oiO+8zNpzmsXWydqaBA+PTLdpo\" crossorigin=\"anonymous\">\u003c/script>\n\u003cplugin-studio profile-config='{\"profile\":\"plugin-studio\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/plugin-studio>"},"instances":[{"id":"studio","title":"Plugin Studio — every element by capability 5 -> 1 (developer studio)","apiBaseUrl":"","props":{"profile":"plugin-studio","provider":"maplibre","instanceId":"plugin-studio","title":"Plugin Studio"},"element":"plugin-studio","iframeUrl":"./plugin-studio/plugin-studio/studio/index.html","embed":{"iframe":"\u003ciframe src=\"./plugin-studio/plugin-studio/studio/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"prayer-walk-planner","scriptUrl":"./prayer-walk-planner/prayer-walk-planner.js","output":"doxa-maps/prayer-walk-planner/prayer-walk-planner.js","integrity":"sha384-/lrJX10JhiaXgpDAv0tf4R7ycgOaBRG+8oDasqHnD9MomT8ZGiykoh5+/vCJSJsr","elements":["prayer-walk-planner"],"profiles":[{"profile":"prayer-walk-planner","file":"prayer-walk-planner.vue","description":"A simple polygon-drawing tool for planning prayer-walking routes.","element":"prayer-walk-planner","type":"single","isMap":true,"iframeUrl":"./prayer-walk-planner/prayer-walk-planner/index.html","scriptUrl":"./prayer-walk-planner/prayer-walk-planner.js","embed":{"iframe":"\u003ciframe src=\"./prayer-walk-planner/prayer-walk-planner/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./prayer-walk-planner/prayer-walk-planner.js\" integrity=\"sha384-/lrJX10JhiaXgpDAv0tf4R7ycgOaBRG+8oDasqHnD9MomT8ZGiykoh5+/vCJSJsr\" crossorigin=\"anonymous\">\u003c/script>\n\u003cprayer-walk-planner profile-config='{\"profile\":\"prayer-walk-planner\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/prayer-walk-planner>"}}]},{"bundle":"regions-dashboard","scriptUrl":"./regions-dashboard/regions-dashboard.js","output":"doxa-maps/regions-dashboard/regions-dashboard.js","integrity":"sha384-jSSCXCZ3Z6JEFDmap/W92BrPfKdpjl7pMh/t/MbkN3MxY1cYAjrq3NZsUnvfsxan","elements":["regions-dashboard"],"composes":["regions-dashboard/regions-list","regions-dashboard/region-dashboards"],"profiles":[{"profile":"region-dashboards","file":"region-dashboards.vue","description":"The dashboard half of the Driver's 2-tab Regions element: given a region (or a","element":"regions-dashboard","type":"single","isMap":false,"iframeUrl":"./regions-dashboard/region-dashboards/index.html","scriptUrl":"./regions-dashboard/regions-dashboard.js","embed":{"iframe":"\u003ciframe src=\"./regions-dashboard/region-dashboards/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-jSSCXCZ3Z6JEFDmap/W92BrPfKdpjl7pMh/t/MbkN3MxY1cYAjrq3NZsUnvfsxan\" crossorigin=\"anonymous\">\u003c/script>\n\u003cregions-dashboard profile-config='{\"profile\":\"region-dashboards\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/regions-dashboard>"}},{"profile":"regions-list","file":"regions-list.vue","description":"A refactor of DX-life's /regions index page (app/pages/regions/index.vue) into","element":"regions-dashboard","type":"single","isMap":false,"iframeUrl":"./regions-dashboard/regions-list/index.html","scriptUrl":"./regions-dashboard/regions-dashboard.js","embed":{"iframe":"\u003ciframe src=\"./regions-dashboard/regions-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-jSSCXCZ3Z6JEFDmap/W92BrPfKdpjl7pMh/t/MbkN3MxY1cYAjrq3NZsUnvfsxan\" crossorigin=\"anonymous\">\u003c/script>\n\u003cregions-dashboard profile-config='{\"profile\":\"regions-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/regions-dashboard>"}},{"profile":"regions-mfe","file":"regions-mfe.vue","description":"The composite the Driver asked for: ONE element carrying the SELECT VIEW switcher","element":"regions-dashboard","type":"nested-elements-mfe","isMap":false,"iframeUrl":"./regions-dashboard/regions-mfe/index.html","scriptUrl":"./regions-dashboard/regions-dashboard.js","embed":{"iframe":"\u003ciframe src=\"./regions-dashboard/regions-mfe/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-jSSCXCZ3Z6JEFDmap/W92BrPfKdpjl7pMh/t/MbkN3MxY1cYAjrq3NZsUnvfsxan\" crossorigin=\"anonymous\">\u003c/script>\n\u003cregions-dashboard profile-config='{\"profile\":\"regions-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/regions-dashboard>"}}]},{"bundle":"research-dashboard","scriptUrl":"./research-dashboard/research-dashboard.js","output":"doxa-maps/research-dashboard/research-dashboard.js","integrity":"sha384-y+QrokwdN8T660MHnspQcvfw8igrKkt+EXDljWQRXGK1XuIPq1wcK8Ed7uYV58nX","elements":["research-dashboard-map"],"profiles":[{"profile":"research-dashboard","file":"research-dashboard.vue","description":"Coordinated-Multiple-Views research dashboard for 10/40-window UPGs (live pray.doxa.life): docked facet rail + map-as-hero + linked table/charts, brushing-and-linking over one in-memory store.","element":"research-dashboard-map","type":"monolithic","isMap":true,"iframeUrl":"./research-dashboard/research-dashboard/index.html","scriptUrl":"./research-dashboard/research-dashboard.js","embed":{"iframe":"\u003ciframe src=\"./research-dashboard/research-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-y+QrokwdN8T660MHnspQcvfw8igrKkt+EXDljWQRXGK1XuIPq1wcK8Ed7uYV58nX\" crossorigin=\"anonymous\">\u003c/script>\n\u003cresearch-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/research-dashboard-map>"},"bundle":"research-dashboard"}]},{"bundle":"research-map-plus-grid","scriptUrl":"./research-map-plus-grid/research-map-plus-grid.js","output":"doxa-maps/research-map-plus-grid/research-map-plus-grid.js","integrity":"sha384-RD6XMWZvRaam/1XF9HAsXE+XutNjsboygfmxLMP9JJEnZ0LdIHqR+gYGWE1Y6Gzq","elements":["research-map-plus-grid"],"composes":["doxa-research-map","people-groups-grid"],"profiles":[{"profile":"research-map-plus-grid","file":"research-map-plus-grid.vue","description":"The monolithic 7-tab research map (cap-3) on top, the People Groups grid beneath,","element":"research-map-plus-grid","type":"nested-elements-mfe","isMap":false,"iframeUrl":"./research-map-plus-grid/research-map-plus-grid/index.html","scriptUrl":"./research-map-plus-grid/research-map-plus-grid.js","embed":{"iframe":"\u003ciframe src=\"./research-map-plus-grid/research-map-plus-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./research-map-plus-grid/research-map-plus-grid.js\" integrity=\"sha384-RD6XMWZvRaam/1XF9HAsXE+XutNjsboygfmxLMP9JJEnZ0LdIHqR+gYGWE1Y6Gzq\" crossorigin=\"anonymous\">\u003c/script>\n\u003cresearch-map-plus-grid profile-config='{\"profile\":\"research-map-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/research-map-plus-grid>"},"instances":[{"id":"default","title":"default","apiBaseUrl":"","props":{"profile":"research-map-plus-grid"},"element":"research-map-plus-grid","iframeUrl":"./research-map-plus-grid/research-map-plus-grid/default/index.html","embed":{"iframe":"\u003ciframe src=\"./research-map-plus-grid/research-map-plus-grid/default/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"stack-demo","scriptUrl":"./stack-demo/stack-demo.js","output":"doxa-maps/stack-demo/stack-demo.js","integrity":"sha384-g9iK/zw5CvcyhNWdWHe8n2S/O22tv3PhQhoCe45ArdX5dL2YRBBRl/hFjktel1UU","elements":["stack-demo"],"composes":["research-dashboard-map","people-groups-grid"],"profiles":[{"profile":"stack-demo","file":"stack-demo.vue","description":"Groups TWO independent elements TOP-TO-BOTTOM so you can embed the pair on a page and","element":"stack-demo","type":"nested-elements-mfe","isMap":false,"iframeUrl":"./stack-demo/stack-demo/index.html","scriptUrl":"./stack-demo/stack-demo.js","embed":{"iframe":"\u003ciframe src=\"./stack-demo/stack-demo/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./stack-demo/stack-demo.js\" integrity=\"sha384-g9iK/zw5CvcyhNWdWHe8n2S/O22tv3PhQhoCe45ArdX5dL2YRBBRl/hFjktel1UU\" crossorigin=\"anonymous\">\u003c/script>\n\u003cstack-demo profile-config='{\"profile\":\"stack-demo\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/stack-demo>"},"instances":[{"id":"pair","title":"pair","apiBaseUrl":"","props":{"profile":"stack-demo"},"element":"stack-demo","iframeUrl":"./stack-demo/stack-demo/pair/index.html","embed":{"iframe":"\u003ciframe src=\"./stack-demo/stack-demo/pair/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>"}}]}]},{"bundle":"template-bundle","scriptUrl":"./template-bundle/template-bundle.js","output":"doxa-maps/template-bundle/template-bundle.js","integrity":"sha384-6BLnoGxxah2nBlYZe3+9dY5xquKg1exSyIUNazvQz7/0sJM4ROA4aHjRGjNMQL28","elements":["template-bundle"],"profiles":[{"profile":"template-map-a","file":"template-map-a.vue","description":"Minimal example profile A — a colored placeholder, no Mapbox or data.","element":"template-bundle","type":"single","isMap":false,"iframeUrl":"./template-bundle/template-map-a/index.html","scriptUrl":"./template-bundle/template-bundle.js","embed":{"iframe":"\u003ciframe src=\"./template-bundle/template-map-a/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./template-bundle/template-bundle.js\" integrity=\"sha384-6BLnoGxxah2nBlYZe3+9dY5xquKg1exSyIUNazvQz7/0sJM4ROA4aHjRGjNMQL28\" crossorigin=\"anonymous\">\u003c/script>\n\u003ctemplate-bundle profile-config='{\"profile\":\"template-map-a\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/template-bundle>"},"bundle":"template-bundle"},{"profile":"template-map-b","file":"template-map-b.vue","description":"Minimal example profile B — a second profile in the same bundle.","element":"template-bundle","type":"single","isMap":false,"iframeUrl":"./template-bundle/template-map-b/index.html","scriptUrl":"./template-bundle/template-bundle.js","embed":{"iframe":"\u003ciframe src=\"./template-bundle/template-map-b/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen>\u003c/iframe>","script":"\u003cscript>window.MAP_APP_API_URL=\"https://pray.doxa.life\";\u003c/script>\n\u003cscript src=\"./template-bundle/template-bundle.js\" integrity=\"sha384-6BLnoGxxah2nBlYZe3+9dY5xquKg1exSyIUNazvQz7/0sJM4ROA4aHjRGjNMQL28\" crossorigin=\"anonymous\">\u003c/script>\n\u003ctemplate-bundle profile-config='{\"profile\":\"template-map-b\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'>\u003c/template-bundle>"},"bundle":"template-bundle"}]}]}; \n\n" + "script": "\n\n" }, "instances": [ { @@ -878,7 +878,7 @@ "bundle": "research-dashboard", "scriptUrl": "./research-dashboard/research-dashboard.js", "output": "doxa-maps/research-dashboard/research-dashboard.js", - "integrity": "sha384-j44OuRGe7ZN8HsjwTkFHdthEc/j7dUdSD8DV+Ht6FayakDELokzZZbMdkx+f03Cj", + "integrity": "sha384-y+QrokwdN8T660MHnspQcvfw8igrKkt+EXDljWQRXGK1XuIPq1wcK8Ed7uYV58nX", "elements": [ "research-dashboard-map" ], @@ -894,7 +894,7 @@ "scriptUrl": "./research-dashboard/research-dashboard.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" }, "bundle": "research-dashboard" } diff --git a/public/doxa-maps/research-dashboard/research-dashboard.js b/public/doxa-maps/research-dashboard/research-dashboard.js index 818680d20..2745d9a7a 100644 --- a/public/doxa-maps/research-dashboard/research-dashboard.js +++ b/public/doxa-maps/research-dashboard/research-dashboard.js @@ -73,7 +73,7 @@ `)}const A={rows:0,clipboard:!1,downloaded:!1,at:0,fields:0,wide:!1};function m(){const p=y(),k=g().length,S=(p.split(`\r `)[0]||"").split(",").length;try{typeof window<"u"&&(window.__rdashLastCsv=p)}catch{}let P=!1,T=!1;try{typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText&&(navigator.clipboard.writeText(p).catch(()=>{}),P=!0)}catch{}try{const U=new Blob([p],{type:"text/csv;charset=utf-8"}),G=URL.createObjectURL(U),Q=document.createElement("a");Q.href=G,Q.download="research-dashboard.csv",Q.style.display="none",document.body.appendChild(Q),Q.click(),T=!0,setTimeout(()=>{try{URL.revokeObjectURL(G),Q.remove()}catch{}},200)}catch{}Object.assign(A,{rows:k,clipboard:P,downloaded:T,fields:S,wide:!!i,at:typeof performance<"u"?performance.now():0});try{window.__rdashExportStatus={rows:k,clipboard:P,downloaded:T,fields:S,wide:!!i}}catch{}return{csv:p,rows:k,clipboard:P,downloaded:T,fields:S,wide:!!i}}async function d(){try{await c()}catch{}return m()}function f(){try{return c()}catch{return null}}return{exportCsv:m,exportCsvAsync:d,buildCsv:y,pickRows:g,scopeLabel:b,lastExport:A,prefetchExportFields:f,EXPORT_FIELDS:cs}}const B_="#6b7280";function U_(){const e=ls(En.AFFINITY_BLOCK);return e&&e.propertyKey==="affinityBlock"&&e.palette?e.palette:{}}function G_(e,t){const n=U_();return e&&n[e]?n[e]:B_}function q_(e){return(e==null?void 0:e.properties)||e||{}}function Ua(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function H_(e){var t;return String(e.affinityBlock||Ua((t=e._raw)==null?void 0:t.rop1)||"").trim()}function V_(e){var t;return String(e.affinityBlockLabel||((t=e._raw)!=null&&t.rop1&&typeof e._raw.rop1=="object"?e._raw.rop1.label:"")||"").trim()}function W_(e){var t;return String(e.cluster||Ua((t=e._raw)==null?void 0:t.imb_reg_of_people_2)||"").trim()}function K_(e){var t;return String(e.clusterLabel||((t=e._raw)!=null&&t.imb_reg_of_people_2&&typeof e._raw.imb_reg_of_people_2=="object"?e._raw.imb_reg_of_people_2.label:"")||"").trim()}function Y_(e){var t;return String(e.peopleGroup||Ua((t=e._raw)==null?void 0:t.imb_reg_of_people_25)||"").trim()}function X_(e){var t;return String(e.peopleGroupLabel||((t=e._raw)!=null&&t.imb_reg_of_people_25&&typeof e._raw.imb_reg_of_people_25=="object"?e._raw.imb_reg_of_people_25.label:"")||e.name||"").trim()}function J_(e){var t;return String(e.uniqueId||e.slug||((t=e._raw)==null?void 0:t.slug)||"").trim()}function Z_(e){var t;return String(e.name||e.displayName||((t=e._raw)==null?void 0:t.name)||"").trim()}function Q_(e){var n;const t=Number(e.population??e.populationNum??((n=e._raw)==null?void 0:n.population)??0);return Number.isFinite(t)?t:0}function ey(e){return String(e.countryName||e.country||e.countryIsoLabel||e.countryIso||"").trim()}function ty(e){const t=re(()=>{const s=e&&e.value||[],a=new Map;for(const i of s){const l=q_(i),c=H_(l),u=V_(l)||c||"— Unknown —",g=W_(l),b=K_(l)||g||"— Unknown —",x=Y_(l),$=X_(l)||x||"— Unknown —",w=J_(l),y=Z_(l)||w,A=Q_(l),m=ey(l);if(!w)continue;let d=a.get(c||"__unknown__");d||(d={code:c,label:u,count:0,pop:0,memberIds:[],clusters:new Map},a.set(c||"__unknown__",d)),d.count+=1,d.pop+=A,d.memberIds.push(w);let f=d.clusters.get(g||"__unknown__");f||(f={code:g,label:b,count:0,pop:0,memberIds:[],peopleGroups:new Map},d.clusters.set(g||"__unknown__",f)),f.count+=1,f.pop+=A,f.memberIds.push(w);let p=f.peopleGroups.get(x||"__unknown__");p||(p={code:x,label:$,count:0,pop:0,memberIds:[],instances:[]},f.peopleGroups.set(x||"__unknown__",p)),p.count+=1,p.pop+=A,p.memberIds.push(w),p.instances.push({id:w,name:y,country:m,pop:A})}return a}),n=s=>s&&s.length?["in",["get","uniqueId"],["literal",s]]:["==",["get","uniqueId"],"__none__"],o=re(()=>{const s=t.value,a=[];for(const i of s.values()){const l=G_(i.code,i.label),c={id:`bloc:${i.code||i.label}`,label:i.label,color:l,count:i.count,pop:i.pop,filter:n(i.memberIds),children:[]};for(const u of i.clusters.values()){const g={id:`cluster:${i.code}__${u.code||u.label}`,label:`${u.label} (Cluster)`,color:l,count:u.count,pop:u.pop,filter:n(u.memberIds),children:[]};for(const b of u.peopleGroups.values()){const x={id:`pg:${i.code}__${u.code}__${b.code||b.label}`,label:`${b.label} (PG)`,color:l,count:b.count,pop:b.pop,filter:n(b.memberIds),children:[]};b.instances.sort(($,w)=>w.pop-$.pop||$.country.localeCompare(w.country));for(const $ of b.instances)x.children.push({id:`pgic:${$.id}`,label:`${$.country?`${$.name}, ${$.country}`:$.name} (PGIC)`,color:l,count:1,pop:$.pop,filter:["==",["get","uniqueId"],$.id],children:[]});g.children.push(x)}g.children.sort((b,x)=>x.count-b.count||x.pop-b.pop),c.children.push(g)}c.children.sort((u,g)=>g.count-u.count||g.pop-u.pop),a.push(c)}return a.sort((i,l)=>l.count-i.count||l.pop-i.pop),a});function r(s){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!s){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const a=String(s.id||""),i={kind:null,label:s.label,filterExpr:s.filter};a.startsWith("bloc:")?i.kind="bloc":a.startsWith("cluster:")?i.kind="cluster":a.startsWith("pg:")?i.kind="people-group":a.startsWith("pgic:")&&(i.kind="people-group-in-country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:i}))}return{aggregated:t,affinityTree:o,highlight:r}}function rr(e,t,n){const o=re(()=>{const l=t&&n&&t.sources&&t.sources[n];return l&&l.features||[]}),{aggregated:r}=ty(o),s=re(()=>{const l=(e&&e.facetRail||[]).find(c=>c.tree==="affinity");return l&&l.drill||[]}),a=re(()=>{const[l,c,u]=s.value,g=new Map,b=new Map,x=new Map;for(const w of r.value.values()){w.code&&g.set(w.code,w.label);for(const y of w.clusters.values()){y.code&&b.set(y.code,y.label);for(const A of y.peopleGroups.values())A.code&&x.set(A.code,A.label)}}const $={};return l&&($[l]=g),c&&($[c]=b),u&&($[u]=x),$});function i(l,c){const u=a.value[l];return u&&u.get(c)||c}return{normalizedFeatures:o,affinityAgg:r,affinityLabelMaps:a,treeFacetKeys:s,labelFor:i}}class zu{constructor(t={}){this.sourcesConfig=null,this.activeSource=null,this.rawData=[],this.normalizedData=[],this.dataByUniqueId=new Map,this.baseUrl=typeof window<"u"&&window.MAP_APP_BASE_URL||"./",this.locale=t.locale||null,this.cache=new Map,this.cacheEnabled=!0,this.cacheTTL=5*60*1e3}async init(){return this.sourcesConfig=jt,this.sourcesConfig}getActiveSourceId(){var t;return((t=this.sourcesConfig)==null?void 0:t.activeSource)||"doxa-csv"}getSourceConfig(t){var n,o;return(o=(n=this.sourcesConfig)==null?void 0:n.sources)==null?void 0:o[t]}async setActiveSource(t){const n=this.getSourceConfig(t);if(!n)throw new Error(`Source not found: ${t}`);if(this.activeSource=n,this.cacheEnabled&&this.cache.has(t)){const o=this.cache.get(t);return this.normalizedData=o.normalizedData,this.dataByUniqueId=o.dataByUniqueId,this.normalizedData}return n.type==="csv"?await this.loadCSVData(n):n.type==="api"?await this.loadAPIData(n):n.type==="rest-api"&&await this.loadRestApiData(n),this.cacheEnabled&&this.cache.set(t,{normalizedData:this.normalizedData,dataByUniqueId:this.dataByUniqueId,timestamp:Date.now()}),this.normalizedData}clearCache(t=null){t?this.cache.delete(t):this.cache.clear()}isCached(t){return this.cache.has(t)}async loadActiveSource(){return this.sourcesConfig||await this.init(),this.setActiveSource(this.getActiveSourceId())}parseCSV(t){const n=[],o=[];let r="",s=!1,a=[],i=!0;for(let l=0;l0){if(a.push(r.trim()),r="",i)o.push(...a),i=!1;else if(a.length>1){const g={};o.forEach((b,x)=>{g[b]=a[x]||""}),n.push(g)}a=[]}}else r+=c}if((r||a.length>0)&&(a.push(r.trim()),!i&&a.length>1)){const l={};o.forEach((c,u)=>{l[c]=a[u]||""}),n.push(l)}return{headers:o,data:n}}async loadCSVData(t){try{const o=await(await fetch(this.baseUrl+t.path)).text(),{headers:r,data:s}=this.parseCSV(o);return this.rawData=s,this.validateFieldMappings(t.fieldMappings,r,t.name),this.normalizeData(t),this.normalizedData}catch(n){throw console.error("Failed to load CSV data:",n),n}}validateFieldMappings(t,n,o){const r=new Set(n.map(a=>a.trim())),s=[];for(const[a,i]of Object.entries(t||{}))if(Array.isArray(i))for(const l of i)r.has(l)||s.push({systemField:a,sourceField:l,isComposite:!0});else i&&!r.has(i)&&s.push({systemField:a,sourceField:i,isComposite:!1});s.length>0&&console.warn(`[DataSourceManager] ${o}: missing CSV columns:`,s)}async loadAPIData(t){try{const o=await(await fetch(t.url||t.endpoint)).json();return this.rawData=Array.isArray(o)?o:o.posts||o.data||o.peopleGroups||o.results||[],this.normalizeData(t),this.normalizedData}catch(n){throw console.error("Failed to load API data:",n),n}}async loadRestApiData(t){var l,c;const n=za(),o=((l=t.endpoints)==null?void 0:l.bulk)||"/api/people-groups/list",r=((c=t.defaultFields)==null?void 0:c.join(","))||"",s=[];r&&s.push(`fields=${r}`);const a={...t.queryParams||{}};this.locale&&(a.lang=this.locale);for(const[u,g]of Object.entries(a))s.push(`${u}=${encodeURIComponent(g)}`);const i=`${n}${o}?${s.join("&")}`;try{const u=await fetch(i);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const g=u.headers.get("content-type")||"";if(!g.includes("application/json"))throw new Error(`API returned "${g}" instead of JSON. Server at ${n} may be down or misconfigured.`);const b=await u.json();return this.rawData=Array.isArray(b)?b:b.posts||b.data||b.results||[],this.normalizeData(t),this.normalizedData}catch(u){throw console.error(`[rest-api] Failed to load from ${t.id}:`,u),u}}normalizeData(t){const n=t.fieldMappings||{};this.normalizedData=[],this.dataByUniqueId=new Map;for(const o of this.rawData){const r={};for(const[l,c]of Object.entries(n))if(Array.isArray(c)){const u=c.map(g=>this.getFieldValue(o,g));r[l]=u.join("_")}else r[l]=this.getFieldValue(o,c);if(r.latitude=parseFloat(r.latitude)||0,r.longitude=parseFloat(r.longitude)||0,r.latitude===0&&r.longitude===0)continue;r.populationNum=this.parsePopulation(r.population),r.imageUrl=this.getImageUrl(r,t.imageConfig);const s=r.engagementStatus;s!=null&&(typeof s=="object"&&"value"in s?(r.engagementStatusLabel=s.label||s.value,r.engagementStatus=s.value==="engaged"):r.engagementStatus=s===!0||s===1||s==="1"||s==="true"||typeof s=="number"&&s>0||typeof s=="string"&&parseInt(s,10)>0);const a=r.adoptionStatus;a!=null&&(r.adoptionStatus=a===!0||a===1||a==="1"||a==="true"||typeof a=="object"&&!!(a!=null&&a.value)||typeof a=="number"&&a>0||typeof a=="string"&&parseInt(a,10)>0);const i=["doxaRegion","wagfRegion","wagfBlock","wagfMember","affinityBlock","cluster","peopleGroup","countryIso","religion","religionCode"];for(const l of i){const c=r[l];c!=null&&typeof c=="object"&&"value"in c?(r[l+"Label"]=c.label||c.value,r[l]=c.value):c!=null&&typeof c=="string"&&c!==""&&(r[l+"Label"]||(r[l+"Label"]=c))}r.countryName=r.countryIsoLabel||r.country||r.countryIso||"",r.religionName=r.religionLabel||r.religion||"",r._raw=o,this.normalizedData.push(r),this.dataByUniqueId.set(r.uniqueId,r)}this.rawData=null}getFieldValue(t,n){if(!n)return"";if(t[n]!==void 0)return t[n];const o=n.trim();if(t[o]!==void 0)return t[o];for(const r of Object.keys(t))if(r.trim()===o||r.includes(o)||o.includes(r.trim()))return t[r];return""}parsePopulation(t){if(!t)return 0;const n=String(t).replace(/,/g,"").trim(),o=parseInt(n,10);return isNaN(o)?0:o}getImageUrl(t,n){if(!n)return"";const o=n.placeholderUrl||"",r=t[n.useField];return r&&String(r).trim()&&!String(r).includes("NoImageAvailable")?r:o}getData(){return this.normalizedData}getByUniqueId(t){return this.dataByUniqueId.get(t)}getByCoordinates(t,n,o=1e-4){return this.normalizedData.find(r=>Math.abs(r.latitude-t)n.peopleGroupId===t)}getLanguageFamilies(){const t=new Set;return this.normalizedData.forEach(n=>{n.languageFamily&&t.add(n.languageFamily)}),Array.from(t).sort()}getDataByLanguageFamily(){const t={};return this.normalizedData.forEach(n=>{const o=n.languageFamily||"Unknown";t[o]||(t[o]=[]),t[o].push(n)}),t}getDataByRegion(){const t={};return this.normalizedData.forEach(n=>{const o=n.doxaRegion||"Unknown";t[o]||(t[o]=[]),t[o].push(n)}),t}getStats(){return{totalRecords:this.normalizedData.length,withPeopleId3:this.normalizedData.filter(t=>t.peopleId3).length,withPhotos:this.normalizedData.filter(t=>t.imageUrl&&!String(t.imageUrl).includes("NoImageAvailable")).length,languageFamilies:this.getLanguageFamilies().length,countries:new Set(this.normalizedData.map(t=>t.country)).size,regions:Object.keys(this.getDataByRegion()).length}}}new zu;const Bu=(e,t)=>Object.fromEntries(Object.entries(e||{}).map(([n,o])=>[n,t(o,n)])),Uu=e=>e==null?"—":Number(e).toLocaleString("en-US");function sr(e){const t=Bu(e.facets,r=>r.get),n=Object.fromEntries((e.columns||[]).map(r=>[r.key,r.get])),o=Array.isArray(e.searchKeys)?e.searchKeys:null;return o?o.map(r=>t[r]||n[r]).filter(r=>typeof r=="function"):(e.columns||[]).filter(r=>r.type!=="num"&&typeof r.get=="function").map(r=>r.get)}function ar(e,t){return n=>{var r;const o=(((r=e==null?void 0:e.searchTerm)==null?void 0:r.value)||"").trim().toLowerCase();if(!o)return!0;for(const s of t){const a=s(n);if(a!=null&&String(a).toLowerCase().includes(o))return!0}return!1}}function ny(e,t,n,o,r){return(e||[]).map(s=>{var l,c;let a,i;if(s.kind==="count")a=t.length,s.showDelta&&(i=Math.max(0,n.length-t.length));else if(s.kind==="sum")a=t.reduce((u,g)=>u+(Number(g[s.field])||0),0);else if(s.kind==="pct")a=t.length?Math.round(t.filter(s.test).length/t.length*100)+"%":"—";else if(s.kind==="distinct"){const u=s.via?(c=(l=r==null?void 0:r.facets)==null?void 0:l[s.field])==null?void 0:c[s.via]:o[s.field],g=new Set;t.forEach(b=>{const x=u?u(b):b[s.field];x&&g.add(x)}),a=g.size}return{id:s.id,label:s.label,kind:s.kind,value:a,delta:i}})}function oy(e){const t=le(null),n=le(!1),o=le(!1),r=le(!1),s=le("map"),a=[{k:"map",l:"Map"},{k:"facets",l:"Filters"},{k:"table",l:"Table"},{k:"charts",l:"Charts"}];let i=null;const l=le(!1),c=le(!1),u=le(!1);xt(()=>{t.value&&(i=new ResizeObserver(()=>{const y=t.value.clientWidth;n.value=y<760,o.value=y>=760&&y<1180,r.value=y>=760&&y<980}),i.observe(t.value)),e&&e.on("toggleTable",y=>{l.value=!!y}),e&&e.on("toggleFacet",y=>{c.value=!!y}),e&&e.on("toggleRail",y=>{u.value=!!y})}),Ot(()=>i&&i.disconnect());function g(y){const A=y.target.closest("[data-view]");A&&(s.value=A.getAttribute("data-view"))}const b=re(()=>!n.value||s.value==="facets"),x=re(()=>!n.value||s.value==="map"),$=re(()=>!n.value||s.value==="table"),w=re(()=>!n.value||s.value==="charts");return{shell:t,isNarrow:n,slimRail:o,slimFacet:r,mobileView:s,SEG:a,tableCollapsed:l,facetCollapsed:c,railCollapsed:u,setView:g,showFacets:b,showMap:x,showTable:$,showCharts:w}}function ry(e){function t(){try{const n=encodeURIComponent(JSON.stringify(e.filterSet));typeof location<"u"&&history.replaceState(null,"","#f="+n)}catch{}}mt(()=>({...e.filterSet}),t,{deep:!0}),xt(()=>{try{const n=typeof location<"u"&&/[#&]f=([^&]+)/.exec(location.hash);if(n){const o=JSON.parse(decodeURIComponent(n[1]));Object.entries(o).forEach(([r,s])=>e.setFilter(r,s))}}catch{}})}function sy(e){var w;const t=j_();t.configureHierarchy(e);const n=z_(e.data),o=Bu(e.facets,y=>y.get),r=ar(t,sr(e)),s=re(()=>{var d;const y=n.rows.value||[],A=Object.keys(t.filterSet),m=!!(((d=t.searchTerm)==null?void 0:d.value)||"").trim();return!A.length&&!m?y:y.filter(f=>A.every(p=>{const k=o[p];return k?k(f)===t.filterSet[p]:!0})&&r(f))}),a=re(()=>ny(e.kpis,s.value,n.rows.value||[],o,e)),i=oy(t);ry(t);const l=n.sourceId||jt.activeSource,c=((w=jt.sources)==null?void 0:w[l])||{},u=new zu,g=re(()=>{const y=n.rows.value||[];return y.length?(u.rawData=y.slice(),u.normalizeData(c),u.normalizedData):[]}),b={sources:{[l]:{get features(){return g.value}}}},{labelFor:x}=rr(e,b,l),$=Ba({rowStore:n.rowStore,rows:n.rows,selectionSet:t.selectionSet,filterSet:t.filterSet,FACET_ACC:o,dataOpts:e.data,labelFor:x});return ht("selectionBus",t),ht("dashboardData",n),ht("dashboardConfig",e),ht("dataStore",b),ht("searchSourceId",l),xt(()=>n.load()),{bus:t,data:n,FACET_ACC:o,filteredRows:s,kpis:a,exporter:$,responsive:i}}const ay={facetW:296,railW:264,tableH:"34%",mapH:260,shellH:502},iy={facetW:[160,420],railW:[200,520],tableH:[12,70],mapH:[220,1400],shellH:[400,2600]},Gu=32,qu=120,Et=(e,[t,n])=>Math.min(n,Math.max(t,e)),us=(e,t)=>{const n=parseFloat(String(e));return Number.isFinite(n)?n:t};function ly(e={}){const{shellRef:t,bus:n=null,isNarrow:o=!1,pageScroll:r=!1,storageKey:s="rd-dashboard-layout"}=e,a={...ay,...e.defaults||{}},i={...iy,...e.clamps||{}},l=le(a.facetW),c=le(a.railW),u=le(a.tableH),g=le(a.mapH),b=le(a.shellH),x=le(!1),$=le(!1),w=le(!1),y=()=>!!ce(o),A=()=>!!ce(r);function m(){const D=t&&t.value;if(!D)return b.value;const L=parseFloat(getComputedStyle(D).getPropertyValue("--rd-shell-h"));if(Number.isFinite(L)&&L>0)return Math.round(L);const q=D.querySelector('[data-region="map"]'),oe=D.querySelector('[data-region="table"]');if(!q||!oe)return b.value;const be=q.getBoundingClientRect().height+oe.getBoundingClientRect().height;return be>0?Math.round(be):b.value}function d(){const D=t&&t.value;D&&(x.value&&(D.style.setProperty("--facet-w",l.value+"px"),D.style.setProperty("--rail-w",c.value+"px"),D.style.setProperty("--table-h",u.value)),$.value&&D.style.setProperty("--rd-map-h",g.value+"px"),w.value&&D.style.setProperty("--rd-shell-h",b.value+"px"))}function f(){const D=t&&t.value;D&&(D.style.removeProperty("--facet-w"),D.style.removeProperty("--rail-w"),D.style.removeProperty("--table-h"),D.style.removeProperty("--rd-map-h"),D.style.removeProperty("--rd-shell-h"))}function p(){try{localStorage.setItem(s,JSON.stringify({facetW:l.value,railW:c.value,tableH:u.value,mapH:g.value,shellH:b.value}))}catch{}}function k(){try{const D=localStorage.getItem(s);if(!D)return!1;const L=JSON.parse(D);return Number.isFinite(L.facetW)&&(l.value=Et(L.facetW,i.facetW)),Number.isFinite(L.railW)&&(c.value=Et(L.railW,i.railW)),L.tableH!=null&&(u.value=Et(us(L.tableH,us(a.tableH,34)),i.tableH)+"%"),x.value=!0,Number.isFinite(L.shellH)&&(b.value=Et(L.shellH,i.shellH),w.value=!0),Number.isFinite(L.mapH)&&(g.value=Et(L.mapH,i.mapH),$.value=!0),!0}catch{return!1}}function S(){try{localStorage.removeItem(s)}catch{}l.value=a.facetW,c.value=a.railW,u.value=a.tableH,g.value=a.mapH,b.value=a.shellH,x.value=!1,$.value=!1,w.value=!1,f()}const P=le(!1);function T(){if(P.value)return;P.value=!0;const D=t&&t.value;if(D&&D.setAttribute("data-rd-resizing","1"),n&&typeof n.emit=="function")try{n.emit("layoutResizing",!0)}catch{}}function U(){if(!P.value)return;P.value=!1;const D=t&&t.value;if(D&&D.removeAttribute("data-rd-resizing"),n&&typeof n.emit=="function")try{n.emit("layoutResizing",!1)}catch{}}function G(D,L){if(y())return;const q=t&&t.value;if(!q)return;L.preventDefault();const oe=q.getBoundingClientRect(),be=L.clientX,Ee=l.value,Ae=c.value,Le=L.currentTarget,ve=D==="table"&&A(),ye=D==="shell"&&A();let _e=0,xe=i.mapH[1];if(ve){const te=q.querySelector('[data-region="map"]'),h=te?te.getBoundingClientRect():null;_e=h?h.top:L.clientY-g.value,xe=Math.max(i.mapH[0],b.value-(Gu+qu))}const v=L.clientY,C=ye?m():b.value;try{Le&&Le.setPointerCapture&&Le.setPointerCapture(L.pointerId)}catch{}T();let E=0,z=null;function Y(){if(E=0,!z)return;const te=z;if(z=null,D==="facet")l.value=Math.round(Et(Ee+(te.clientX-be),i.facetW)),x.value=!0;else if(D==="rail")c.value=Math.round(Et(Ae-(te.clientX-be),i.railW)),x.value=!0;else if(ve)g.value=Math.round(Et(te.clientY-_e,[i.mapH[0],xe])),$.value=!0;else if(D==="table"){const h=(oe.bottom-te.clientY)/oe.height*100;u.value=Math.round(Et(h,i.tableH))+"%",x.value=!0}else ye&&(b.value=Math.round(Et(C+(te.clientY-v),i.shellH)),w.value=!0);d()}function Z(te){z={clientX:te.clientX,clientY:te.clientY},E||(E=requestAnimationFrame(Y))}function se(te){window.removeEventListener("pointermove",Z),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",se),E&&(cancelAnimationFrame(E),E=0),Y();try{Le&&Le.releasePointerCapture&&Le.releasePointerCapture(te.pointerId)}catch{}p(),U()}window.addEventListener("pointermove",Z),window.addEventListener("pointerup",se),window.addEventListener("pointercancel",se)}const Q=D=>G("facet",D),pe=D=>G("rail",D),j=D=>G("table",D),J=D=>G("shell",D),H={facet:16,rail:16,table:24,mapH:24,shellH:24};function O(D,L,q){if(!y()){if(D==="facet")l.value=q?L<0?i.facetW[0]:i.facetW[1]:Math.round(Et(l.value+L*H.facet,i.facetW)),x.value=!0;else if(D==="rail")c.value=q?L<0?i.railW[1]:i.railW[0]:Math.round(Et(c.value-L*H.rail,i.railW)),x.value=!0;else if(D==="table"&&A()){const oe=Math.max(i.mapH[0],b.value-(Gu+qu));g.value=q?L<0?i.mapH[0]:oe:Math.round(Et(g.value+L*H.mapH,[i.mapH[0],oe])),$.value=!0}else if(D==="table"){const oe=q?L<0?i.tableH[0]:i.tableH[1]:Et(us(u.value,us(a.tableH,34))-L*H.table/4,i.tableH);u.value=Math.round(oe)+"%",x.value=!0}else D==="shell"&&A()&&(b.value=q?L<0?i.shellH[0]:i.shellH[1]:Math.round(Et(b.value+L*H.shellH,i.shellH)),w.value=!0);d(),p()}}function M(D,L){const q=L.key;let oe=0;if(D==="table"||D==="shell"?q==="ArrowUp"?oe=-1:q==="ArrowDown"&&(oe=1):q==="ArrowLeft"?oe=-1:q==="ArrowRight"&&(oe=1),oe){L.preventDefault(),O(D,oe);return}(q==="Home"||q==="End")&&(L.preventDefault(),O(D,q==="Home"?-1:1,!0))}let B=null;return xt(()=>{k()&&d(),n&&typeof n.on=="function"&&(B=n.on("resetLayout",S))}),Ot(()=>{try{B&&B()}catch{}try{U()}catch{}}),{facetW:l,railW:c,tableH:u,mapH:g,shellH:b,customized:x,resizing:P,startFacetResize:Q,startRailResize:pe,startTableResize:j,startShellResize:J,startResize:G,reset:S,applyVars:d,stepResize:O,onResizeKeydown:M}}const cy=".search-box{position:relative;display:flex;align-items:center;margin:0 auto;width:100%;color:var(--dx-muted, #6d766e)}.search-box .search-icon{position:absolute;left:12px;pointer-events:none}.search-box input{width:100%;padding:10px 12px 10px 38px;font-size:.95rem;color:var(--dx-text, #3b463d);background:var(--dx-elevated, #fff);border:1px solid var(--dx-line, #d1d4cd);border-radius:10px;outline:none;box-sizing:border-box}.search-box input:focus{border-color:var(--dx-accent, #92b195);box-shadow:0 0 0 2px var(--dx-accent-weak, rgba(146, 177, 149, .18))}",uy=["value","placeholder","aria-label"],Hu=rs({__name:"SearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Search…"},ariaLabel:{type:String,default:"Search"},maxWidth:{type:String,default:""}},emits:["update:modelValue","search"],setup(e,{emit:t}){const n=e,o=t,r=re(()=>n.maxWidth?{maxWidth:n.maxWidth}:{});function s(a){const i=a.target.value??"";o("update:modelValue",i),o("search",{value:i})}return(a,i)=>(ee(),ne("div",{class:"search-box",style:ct(r.value)},[i[0]||(i[0]=N("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[N("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),N("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),N("input",{type:"search",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.ariaLabel,onInput:s},null,40,uy)],4))}},[["styles",[cy]]]),dy=Qn&&Qn.tagName.toUpperCase()==="SCRIPT"&&Qn.src||new URL("research-dashboard.js",document.baseURI).href,jn=e=>String(e||"").trim().replace(/\/+$/,"");function Vu(){try{const t=String(dy||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function fy(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return jn(t);if(typeof window<"u"){const n=window.MAP_EMBED_BASE_URL;if(typeof n=="string"&&n.trim())return jn(n)}return jn(Vu()||"")}function py(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const o=jn(t);if(/^https?:\/\//i.test(o)||o.startsWith("/"))return o}const n=jn((e==null?void 0:e.treeBase)||"")||jn(Vu()||"");if(n)try{const o=typeof document<"u"?document.baseURI:void 0;return jn(new URL(n+"/../assets",o).href)}catch{return jn(n.replace(/\/[^/]*$/,"")+"/assets")}return"./assets"}function gy({shareUrl:e,embedPath:t,profileConfig:n}={}){const o=n||null,r=typeof window<"u",s=e||(o==null?void 0:o.shareUrl);if(typeof s=="string"&&s.trim())return s.trim();const a=String(t||(o==null?void 0:o.shareEmbedPath)||"").trim();if(a){if(/^https?:\/\//i.test(a))return a;if(a.startsWith("/"))return r?window.location.origin+a:a;const i=fy(o),l=a.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return r?window.location.origin+window.location.pathname:""}const hy=["title","aria-label","disabled"],Ga={__name:"MapControlButton",props:{isDark:{type:Boolean,default:!1},title:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){return Nt(` +`&&l++,r||a.length>0){if(a.push(r.trim()),r="",i)o.push(...a),i=!1;else if(a.length>1){const g={};o.forEach((b,x)=>{g[b]=a[x]||""}),n.push(g)}a=[]}}else r+=c}if((r||a.length>0)&&(a.push(r.trim()),!i&&a.length>1)){const l={};o.forEach((c,u)=>{l[c]=a[u]||""}),n.push(l)}return{headers:o,data:n}}async loadCSVData(t){try{const o=await(await fetch(this.baseUrl+t.path)).text(),{headers:r,data:s}=this.parseCSV(o);return this.rawData=s,this.validateFieldMappings(t.fieldMappings,r,t.name),this.normalizeData(t),this.normalizedData}catch(n){throw console.error("Failed to load CSV data:",n),n}}validateFieldMappings(t,n,o){const r=new Set(n.map(a=>a.trim())),s=[];for(const[a,i]of Object.entries(t||{}))if(Array.isArray(i))for(const l of i)r.has(l)||s.push({systemField:a,sourceField:l,isComposite:!0});else i&&!r.has(i)&&s.push({systemField:a,sourceField:i,isComposite:!1});s.length>0&&console.warn(`[DataSourceManager] ${o}: missing CSV columns:`,s)}async loadAPIData(t){try{const o=await(await fetch(t.url||t.endpoint)).json();return this.rawData=Array.isArray(o)?o:o.posts||o.data||o.peopleGroups||o.results||[],this.normalizeData(t),this.normalizedData}catch(n){throw console.error("Failed to load API data:",n),n}}async loadRestApiData(t){var l,c;const n=za(),o=((l=t.endpoints)==null?void 0:l.bulk)||"/api/people-groups/list",r=((c=t.defaultFields)==null?void 0:c.join(","))||"",s=[];r&&s.push(`fields=${r}`);const a={...t.queryParams||{}};this.locale&&(a.lang=this.locale);for(const[u,g]of Object.entries(a))s.push(`${u}=${encodeURIComponent(g)}`);const i=`${n}${o}?${s.join("&")}`;try{const u=await fetch(i);if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const g=u.headers.get("content-type")||"";if(!g.includes("application/json"))throw new Error(`API returned "${g}" instead of JSON. Server at ${n} may be down or misconfigured.`);const b=await u.json();return this.rawData=Array.isArray(b)?b:b.posts||b.data||b.results||[],this.normalizeData(t),this.normalizedData}catch(u){throw console.error(`[rest-api] Failed to load from ${t.id}:`,u),u}}normalizeData(t){const n=t.fieldMappings||{};this.normalizedData=[],this.dataByUniqueId=new Map;for(const o of this.rawData){const r={};for(const[l,c]of Object.entries(n))if(Array.isArray(c)){const u=c.map(g=>this.getFieldValue(o,g));r[l]=u.join("_")}else r[l]=this.getFieldValue(o,c);if(r.latitude=parseFloat(r.latitude)||0,r.longitude=parseFloat(r.longitude)||0,r.latitude===0&&r.longitude===0)continue;r.populationNum=this.parsePopulation(r.population),r.imageUrl=this.getImageUrl(r,t.imageConfig);const s=r.engagementStatus;s!=null&&(typeof s=="object"&&"value"in s?(r.engagementStatusLabel=s.label||s.value,r.engagementStatus=s.value==="engaged"):r.engagementStatus=s===!0||s===1||s==="1"||s==="true"||typeof s=="number"&&s>0||typeof s=="string"&&parseInt(s,10)>0);const a=r.adoptionStatus;a!=null&&(r.adoptionStatus=a===!0||a===1||a==="1"||a==="true"||typeof a=="object"&&!!(a!=null&&a.value)||typeof a=="number"&&a>0||typeof a=="string"&&parseInt(a,10)>0);const i=["doxaRegion","wagfRegion","wagfBlock","wagfMember","affinityBlock","cluster","peopleGroup","countryIso","religion","religionCode"];for(const l of i){const c=r[l];c!=null&&typeof c=="object"&&"value"in c?(r[l+"Label"]=c.label||c.value,r[l]=c.value):c!=null&&typeof c=="string"&&c!==""&&(r[l+"Label"]||(r[l+"Label"]=c))}r.countryName=r.countryIsoLabel||r.country||r.countryIso||"",r.religionName=r.religionLabel||r.religion||"",r._raw=o,this.normalizedData.push(r),this.dataByUniqueId.set(r.uniqueId,r)}this.rawData=null}getFieldValue(t,n){if(!n)return"";if(t[n]!==void 0)return t[n];const o=n.trim();if(t[o]!==void 0)return t[o];for(const r of Object.keys(t))if(r.trim()===o||r.includes(o)||o.includes(r.trim()))return t[r];return""}parsePopulation(t){if(!t)return 0;const n=String(t).replace(/,/g,"").trim(),o=parseInt(n,10);return isNaN(o)?0:o}getImageUrl(t,n){if(!n)return"";const o=n.placeholderUrl||"",r=t[n.useField];return r&&String(r).trim()&&!String(r).includes("NoImageAvailable")?r:o}getData(){return this.normalizedData}getByUniqueId(t){return this.dataByUniqueId.get(t)}getByCoordinates(t,n,o=1e-4){return this.normalizedData.find(r=>Math.abs(r.latitude-t)n.peopleGroupId===t)}getLanguageFamilies(){const t=new Set;return this.normalizedData.forEach(n=>{n.languageFamily&&t.add(n.languageFamily)}),Array.from(t).sort()}getDataByLanguageFamily(){const t={};return this.normalizedData.forEach(n=>{const o=n.languageFamily||"Unknown";t[o]||(t[o]=[]),t[o].push(n)}),t}getDataByRegion(){const t={};return this.normalizedData.forEach(n=>{const o=n.doxaRegion||"Unknown";t[o]||(t[o]=[]),t[o].push(n)}),t}getStats(){return{totalRecords:this.normalizedData.length,withPeopleId3:this.normalizedData.filter(t=>t.peopleId3).length,withPhotos:this.normalizedData.filter(t=>t.imageUrl&&!String(t.imageUrl).includes("NoImageAvailable")).length,languageFamilies:this.getLanguageFamilies().length,countries:new Set(this.normalizedData.map(t=>t.country)).size,regions:Object.keys(this.getDataByRegion()).length}}}new zu;const Bu=(e,t)=>Object.fromEntries(Object.entries(e||{}).map(([n,o])=>[n,t(o,n)])),Uu=e=>e==null?"—":Number(e).toLocaleString("en-US");function sr(e){const t=Bu(e.facets,r=>r.get),n=Object.fromEntries((e.columns||[]).map(r=>[r.key,r.get])),o=Array.isArray(e.searchKeys)?e.searchKeys:null;return o?o.map(r=>t[r]||n[r]).filter(r=>typeof r=="function"):(e.columns||[]).filter(r=>r.type!=="num"&&typeof r.get=="function").map(r=>r.get)}function ar(e,t){return n=>{var r;const o=(((r=e==null?void 0:e.searchTerm)==null?void 0:r.value)||"").trim().toLowerCase();if(!o)return!0;for(const s of t){const a=s(n);if(a!=null&&String(a).toLowerCase().includes(o))return!0}return!1}}function ny(e,t,n,o,r){return(e||[]).map(s=>{var l,c;let a,i;if(s.kind==="count")a=t.length,s.showDelta&&(i=Math.max(0,n.length-t.length));else if(s.kind==="sum")a=t.reduce((u,g)=>u+(Number(g[s.field])||0),0);else if(s.kind==="pct")a=t.length?Math.round(t.filter(s.test).length/t.length*100)+"%":"—";else if(s.kind==="distinct"){const u=s.via?(c=(l=r==null?void 0:r.facets)==null?void 0:l[s.field])==null?void 0:c[s.via]:o[s.field],g=new Set;t.forEach(b=>{const x=u?u(b):b[s.field];x&&g.add(x)}),a=g.size}return{id:s.id,label:s.label,kind:s.kind,value:a,delta:i}})}function oy(e){const t=le(null),n=le(!1),o=le(!1),r=le(!1),s=le("map"),a=[{k:"map",l:"Map"},{k:"facets",l:"Filters"},{k:"table",l:"Table"},{k:"charts",l:"Charts"}];let i=null;const l=le(!1),c=le(!1),u=le(!1);xt(()=>{t.value&&(i=new ResizeObserver(()=>{const y=t.value.clientWidth;n.value=y<760,o.value=y>=760&&y<1180,r.value=y>=760&&y<980}),i.observe(t.value)),e&&e.on("toggleTable",y=>{l.value=!!y}),e&&e.on("toggleFacet",y=>{c.value=!!y}),e&&e.on("toggleRail",y=>{u.value=!!y})}),Ot(()=>i&&i.disconnect());function g(y){const A=y.target.closest("[data-view]");A&&(s.value=A.getAttribute("data-view"))}const b=re(()=>!n.value||s.value==="facets"),x=re(()=>!n.value||s.value==="map"),$=re(()=>!n.value||s.value==="table"),w=re(()=>!n.value||s.value==="charts");return{shell:t,isNarrow:n,slimRail:o,slimFacet:r,mobileView:s,SEG:a,tableCollapsed:l,facetCollapsed:c,railCollapsed:u,setView:g,showFacets:b,showMap:x,showTable:$,showCharts:w}}function ry(e){function t(){try{const n=encodeURIComponent(JSON.stringify(e.filterSet));typeof location<"u"&&history.replaceState(null,"","#f="+n)}catch{}}mt(()=>({...e.filterSet}),t,{deep:!0}),xt(()=>{try{const n=typeof location<"u"&&/[#&]f=([^&]+)/.exec(location.hash);if(n){const o=JSON.parse(decodeURIComponent(n[1]));Object.entries(o).forEach(([r,s])=>e.setFilter(r,s))}}catch{}})}function sy(e){var w;const t=j_();t.configureHierarchy(e);const n=z_(e.data),o=Bu(e.facets,y=>y.get),r=ar(t,sr(e)),s=re(()=>{var d;const y=n.rows.value||[],A=Object.keys(t.filterSet),m=!!(((d=t.searchTerm)==null?void 0:d.value)||"").trim();return!A.length&&!m?y:y.filter(f=>A.every(p=>{const k=o[p];return k?k(f)===t.filterSet[p]:!0})&&r(f))}),a=re(()=>ny(e.kpis,s.value,n.rows.value||[],o,e)),i=oy(t);ry(t);const l=n.sourceId||jt.activeSource,c=((w=jt.sources)==null?void 0:w[l])||{},u=new zu,g=re(()=>{const y=n.rows.value||[];return y.length?(u.rawData=y.slice(),u.normalizeData(c),u.normalizedData):[]}),b={sources:{[l]:{get features(){return g.value}}}},{labelFor:x}=rr(e,b,l),$=Ba({rowStore:n.rowStore,rows:n.rows,selectionSet:t.selectionSet,filterSet:t.filterSet,FACET_ACC:o,dataOpts:e.data,labelFor:x});return ht("selectionBus",t),ht("dashboardData",n),ht("dashboardConfig",e),ht("dataStore",b),ht("searchSourceId",l),xt(()=>n.load()),{bus:t,data:n,FACET_ACC:o,filteredRows:s,kpis:a,exporter:$,responsive:i}}const ay={facetW:296,railW:296,tableH:"34%",mapH:260,shellH:502},iy={facetW:[160,420],railW:[200,520],tableH:[12,70],mapH:[220,1400],shellH:[400,2600]},Gu=32,qu=120,Et=(e,[t,n])=>Math.min(n,Math.max(t,e)),us=(e,t)=>{const n=parseFloat(String(e));return Number.isFinite(n)?n:t};function ly(e={}){const{shellRef:t,bus:n=null,isNarrow:o=!1,pageScroll:r=!1,storageKey:s="rd-dashboard-layout"}=e,a={...ay,...e.defaults||{}},i={...iy,...e.clamps||{}},l=le(a.facetW),c=le(a.railW),u=le(a.tableH),g=le(a.mapH),b=le(a.shellH),x=le(!1),$=le(!1),w=le(!1),y=()=>!!ce(o),A=()=>!!ce(r);function m(){const D=t&&t.value;if(!D)return b.value;const L=parseFloat(getComputedStyle(D).getPropertyValue("--rd-shell-h"));if(Number.isFinite(L)&&L>0)return Math.round(L);const q=D.querySelector('[data-region="map"]'),oe=D.querySelector('[data-region="table"]');if(!q||!oe)return b.value;const be=q.getBoundingClientRect().height+oe.getBoundingClientRect().height;return be>0?Math.round(be):b.value}function d(){const D=t&&t.value;D&&(x.value&&(D.style.setProperty("--facet-w",l.value+"px"),D.style.setProperty("--rail-w",c.value+"px"),D.style.setProperty("--table-h",u.value)),$.value&&D.style.setProperty("--rd-map-h",g.value+"px"),w.value&&D.style.setProperty("--rd-shell-h",b.value+"px"))}function f(){const D=t&&t.value;D&&(D.style.removeProperty("--facet-w"),D.style.removeProperty("--rail-w"),D.style.removeProperty("--table-h"),D.style.removeProperty("--rd-map-h"),D.style.removeProperty("--rd-shell-h"))}function p(){try{localStorage.setItem(s,JSON.stringify({facetW:l.value,railW:c.value,tableH:u.value,mapH:g.value,shellH:b.value}))}catch{}}function k(){try{const D=localStorage.getItem(s);if(!D)return!1;const L=JSON.parse(D);return Number.isFinite(L.facetW)&&(l.value=Et(L.facetW,i.facetW)),Number.isFinite(L.railW)&&(c.value=Et(L.railW,i.railW)),L.tableH!=null&&(u.value=Et(us(L.tableH,us(a.tableH,34)),i.tableH)+"%"),x.value=!0,Number.isFinite(L.shellH)&&(b.value=Et(L.shellH,i.shellH),w.value=!0),Number.isFinite(L.mapH)&&(g.value=Et(L.mapH,i.mapH),$.value=!0),!0}catch{return!1}}function S(){try{localStorage.removeItem(s)}catch{}l.value=a.facetW,c.value=a.railW,u.value=a.tableH,g.value=a.mapH,b.value=a.shellH,x.value=!1,$.value=!1,w.value=!1,f()}const P=le(!1);function T(){if(P.value)return;P.value=!0;const D=t&&t.value;if(D&&D.setAttribute("data-rd-resizing","1"),n&&typeof n.emit=="function")try{n.emit("layoutResizing",!0)}catch{}}function U(){if(!P.value)return;P.value=!1;const D=t&&t.value;if(D&&D.removeAttribute("data-rd-resizing"),n&&typeof n.emit=="function")try{n.emit("layoutResizing",!1)}catch{}}function G(D,L){if(y())return;const q=t&&t.value;if(!q)return;L.preventDefault();const oe=q.getBoundingClientRect(),be=L.clientX,Ee=l.value,Ae=c.value,Le=L.currentTarget,ve=D==="table"&&A(),ye=D==="shell"&&A();let _e=0,xe=i.mapH[1];if(ve){const te=q.querySelector('[data-region="map"]'),h=te?te.getBoundingClientRect():null;_e=h?h.top:L.clientY-g.value,xe=Math.max(i.mapH[0],b.value-(Gu+qu))}const v=L.clientY,C=ye?m():b.value;try{Le&&Le.setPointerCapture&&Le.setPointerCapture(L.pointerId)}catch{}T();let E=0,z=null;function Y(){if(E=0,!z)return;const te=z;if(z=null,D==="facet")l.value=Math.round(Et(Ee+(te.clientX-be),i.facetW)),x.value=!0;else if(D==="rail")c.value=Math.round(Et(Ae-(te.clientX-be),i.railW)),x.value=!0;else if(ve)g.value=Math.round(Et(te.clientY-_e,[i.mapH[0],xe])),$.value=!0;else if(D==="table"){const h=(oe.bottom-te.clientY)/oe.height*100;u.value=Math.round(Et(h,i.tableH))+"%",x.value=!0}else ye&&(b.value=Math.round(Et(C+(te.clientY-v),i.shellH)),w.value=!0);d()}function Z(te){z={clientX:te.clientX,clientY:te.clientY},E||(E=requestAnimationFrame(Y))}function se(te){window.removeEventListener("pointermove",Z),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",se),E&&(cancelAnimationFrame(E),E=0),Y();try{Le&&Le.releasePointerCapture&&Le.releasePointerCapture(te.pointerId)}catch{}p(),U()}window.addEventListener("pointermove",Z),window.addEventListener("pointerup",se),window.addEventListener("pointercancel",se)}const Q=D=>G("facet",D),pe=D=>G("rail",D),j=D=>G("table",D),J=D=>G("shell",D),H={facet:16,rail:16,table:24,mapH:24,shellH:24};function O(D,L,q){if(!y()){if(D==="facet")l.value=q?L<0?i.facetW[0]:i.facetW[1]:Math.round(Et(l.value+L*H.facet,i.facetW)),x.value=!0;else if(D==="rail")c.value=q?L<0?i.railW[1]:i.railW[0]:Math.round(Et(c.value-L*H.rail,i.railW)),x.value=!0;else if(D==="table"&&A()){const oe=Math.max(i.mapH[0],b.value-(Gu+qu));g.value=q?L<0?i.mapH[0]:oe:Math.round(Et(g.value+L*H.mapH,[i.mapH[0],oe])),$.value=!0}else if(D==="table"){const oe=q?L<0?i.tableH[0]:i.tableH[1]:Et(us(u.value,us(a.tableH,34))-L*H.table/4,i.tableH);u.value=Math.round(oe)+"%",x.value=!0}else D==="shell"&&A()&&(b.value=q?L<0?i.shellH[0]:i.shellH[1]:Math.round(Et(b.value+L*H.shellH,i.shellH)),w.value=!0);d(),p()}}function M(D,L){const q=L.key;let oe=0;if(D==="table"||D==="shell"?q==="ArrowUp"?oe=-1:q==="ArrowDown"&&(oe=1):q==="ArrowLeft"?oe=-1:q==="ArrowRight"&&(oe=1),oe){L.preventDefault(),O(D,oe);return}(q==="Home"||q==="End")&&(L.preventDefault(),O(D,q==="Home"?-1:1,!0))}let B=null;return xt(()=>{k()&&d(),n&&typeof n.on=="function"&&(B=n.on("resetLayout",S))}),Ot(()=>{try{B&&B()}catch{}try{U()}catch{}}),{facetW:l,railW:c,tableH:u,mapH:g,shellH:b,customized:x,resizing:P,startFacetResize:Q,startRailResize:pe,startTableResize:j,startShellResize:J,startResize:G,reset:S,applyVars:d,stepResize:O,onResizeKeydown:M}}const cy=".search-box{position:relative;display:flex;align-items:center;margin:0 auto;width:100%;color:var(--dx-muted, #6d766e)}.search-box .search-icon{position:absolute;left:12px;pointer-events:none}.search-box input{width:100%;padding:10px 12px 10px 38px;font-size:.95rem;color:var(--dx-text, #3b463d);background:var(--dx-elevated, #fff);border:1px solid var(--dx-line, #d1d4cd);border-radius:10px;outline:none;box-sizing:border-box}.search-box input:focus{border-color:var(--dx-accent, #92b195);box-shadow:0 0 0 2px var(--dx-accent-weak, rgba(146, 177, 149, .18))}",uy=["value","placeholder","aria-label"],Hu=rs({__name:"SearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Search…"},ariaLabel:{type:String,default:"Search"},maxWidth:{type:String,default:""}},emits:["update:modelValue","search"],setup(e,{emit:t}){const n=e,o=t,r=re(()=>n.maxWidth?{maxWidth:n.maxWidth}:{});function s(a){const i=a.target.value??"";o("update:modelValue",i),o("search",{value:i})}return(a,i)=>(ee(),ne("div",{class:"search-box",style:ct(r.value)},[i[0]||(i[0]=N("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[N("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),N("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),N("input",{type:"search",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.ariaLabel,onInput:s},null,40,uy)],4))}},[["styles",[cy]]]),dy=Qn&&Qn.tagName.toUpperCase()==="SCRIPT"&&Qn.src||new URL("research-dashboard.js",document.baseURI).href,jn=e=>String(e||"").trim().replace(/\/+$/,"");function Vu(){try{const t=String(dy||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function fy(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return jn(t);if(typeof window<"u"){const n=window.MAP_EMBED_BASE_URL;if(typeof n=="string"&&n.trim())return jn(n)}return jn(Vu()||"")}function py(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const o=jn(t);if(/^https?:\/\//i.test(o)||o.startsWith("/"))return o}const n=jn((e==null?void 0:e.treeBase)||"")||jn(Vu()||"");if(n)try{const o=typeof document<"u"?document.baseURI:void 0;return jn(new URL(n+"/../assets",o).href)}catch{return jn(n.replace(/\/[^/]*$/,"")+"/assets")}return"./assets"}function gy({shareUrl:e,embedPath:t,profileConfig:n}={}){const o=n||null,r=typeof window<"u",s=e||(o==null?void 0:o.shareUrl);if(typeof s=="string"&&s.trim())return s.trim();const a=String(t||(o==null?void 0:o.shareEmbedPath)||"").trim();if(a){if(/^https?:\/\//i.test(a))return a;if(a.startsWith("/"))return r?window.location.origin+a:a;const i=fy(o),l=a.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return r?window.location.origin+window.location.pathname:""}const hy=["title","aria-label","disabled"],Ga={__name:"MapControlButton",props:{isDark:{type:Boolean,default:!1},title:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){return Nt(` .mcb{ width:var(--map-btn-size,40px);height:var(--map-btn-size,40px); background:#fff; @@ -704,7 +704,7 @@ --rd-line:var(--dx-line); --rd-bg:var(--dx-surface); --rd-ink:var(--dx-text); --rd-muted:var(--dx-muted); --rd-panel:var(--dx-elevated); --rd-primary:var(--dx-accent); - --facet-w:296px; --rail-w:264px; + --facet-w:296px; --rail-w:296px; --rd-edge:14px; --rd-topbar-h:38px; --rd-stats-h:22px; @@ -712,7 +712,7 @@ --r-lg:10px; --r-md:6px; --r-pill:999px; } .profile-loader{ width:100%; height:100%; } .rd-shell{ position:relative; display:grid; width:100%; height:100%; min-height:560px; box-sizing:border-box; - grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,264px); + grid-template-columns: var(--facet-w,296px) minmax(0,1fr) var(--rail-w,296px); grid-template-rows: var(--rd-topbar-h,38px) auto var(--rd-stats-h,22px) 1fr var(--table-h,34%); grid-template-areas: "topbar topbar topbar" "filters filters filters" "stats stats stats" "facets map rail" "facets table rail"; gap:1px; background:var(--rd-line, #d1d4cd); container-type:inline-size; @@ -728,7 +728,7 @@ .rd-rail{ display:flex; flex-direction:column; min-height:0; height:100%; background:var(--rd-bg, #f3f3f1); } .rd-rail > [data-region="charts-rail"]{ flex:1 1 auto; min-height:0; } .rd-shell.rd-table-collapsed{ grid-template-rows:var(--rd-topbar-h,38px) auto var(--rd-stats-h,22px) 1fr var(--table-bar-h,30px); } - .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,264px); } + .rd-shell.rd-facet-collapsed{ grid-template-columns:0 minmax(0,1fr) var(--rail-w,296px); } .rd-shell.rd-rail-collapsed{ grid-template-columns:var(--facet-w,296px) minmax(0,1fr) 0; } .rd-shell.rd-facet-collapsed.rd-rail-collapsed{ grid-template-columns:0 minmax(0,1fr) 0; } .rd-edge-caret{ position:absolute; top:50%; transform:translateY(-50%); z-index:6; width:16px; diff --git a/public/doxa-maps/research-dashboard/research-dashboard/index.html b/public/doxa-maps/research-dashboard/research-dashboard/index.html index 26a3302c3..c516aadaf 100644 --- a/public/doxa-maps/research-dashboard/research-dashboard/index.html +++ b/public/doxa-maps/research-dashboard/research-dashboard/index.html @@ -29,7 +29,7 @@ - +