From dece2df47ea3434bcefc1e5d88ff1d47558bf585 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Mon, 28 Sep 2026 14:21:45 +0000 Subject: [PATCH] Rebuild upg-neighbor, and regenerate the tree --- public/dx-maps/doxa-maps-spa/manifest.json | 4 ++-- public/dx-maps/manifest.json | 4 ++-- public/dx-maps/upg-neighbor/upg-neighbor.js | 2 +- .../upg-neighbor/upg-neighbor/bloom-cockpit/index.html | 2 +- .../dx-maps/upg-neighbor/upg-neighbor/flower-mesh/index.html | 2 +- public/dx-maps/upg-neighbor/upg-neighbor/index.html | 2 +- .../dx-maps/upg-neighbor/upg-neighbor/lang-cluster/index.html | 2 +- public/dx-maps/upg-neighbor/upg-neighbor/send-map/index.html | 2 +- .../upg-neighbor/upg-neighbor/upg-neighbors/index.html | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index 416fc97c8..b4f1d00fd 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -1267,7 +1267,7 @@ "bundle": "upg-neighbor", "scriptUrl": "./upg-neighbor/upg-neighbor.js", "output": "dx-maps/upg-neighbor/upg-neighbor.js", - "integrity": "sha384-TIMBQte/fVoZ9jNThFiya1UIBdFabKXGgeqUDD+5+TJ7hYfh3esutX8bkQ83cKb6", + "integrity": "sha384-bs0W1WBUrp73VxVgLf4SLB+T0AvVob2LwXHTMZKBzAkURPIziOzqKSgTe59365Qp", "elements": [ "upg-neighbor" ], @@ -1286,7 +1286,7 @@ "scriptUrl": "./upg-neighbor/upg-neighbor.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index 416fc97c8..b4f1d00fd 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -1267,7 +1267,7 @@ "bundle": "upg-neighbor", "scriptUrl": "./upg-neighbor/upg-neighbor.js", "output": "dx-maps/upg-neighbor/upg-neighbor.js", - "integrity": "sha384-TIMBQte/fVoZ9jNThFiya1UIBdFabKXGgeqUDD+5+TJ7hYfh3esutX8bkQ83cKb6", + "integrity": "sha384-bs0W1WBUrp73VxVgLf4SLB+T0AvVob2LwXHTMZKBzAkURPIziOzqKSgTe59365Qp", "elements": [ "upg-neighbor" ], @@ -1286,7 +1286,7 @@ "scriptUrl": "./upg-neighbor/upg-neighbor.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/upg-neighbor/upg-neighbor.js b/public/dx-maps/upg-neighbor/upg-neighbor.js index f35f21628..b1d98f58c 100644 --- a/public/dx-maps/upg-neighbor/upg-neighbor.js +++ b/public/dx-maps/upg-neighbor/upg-neighbor.js @@ -79,7 +79,7 @@ @media (prefers-reduced-motion: reduce) { .pin-hint, .pin-hint-pill, .pin-hint-dot::after { animation: none !important; } } -`,"pin-hint"),(k,R)=>u.value?Uo((te(),se("div",{key:0,ref_key:"hintEl",ref:C,class:Je(["pin-hint",{dark:r.value}]),role:"status"},[H("span",Mh,[R[0]||(R[0]=H("span",{class:"pin-hint-dot","aria-hidden":"true"},null,-1)),Ie(" "+V(l.value)+" ",1),H("button",{class:"pin-hint-x",type:"button","aria-label":t("aria.dismissHint","Dismiss hint"),onClick:Z},"×",8,Dh)])],2)),[[Id,p.value&&b.value]]):et("",!0)}};let Gh=0;const Hh=ci("ui",{state:()=>({_storeInstanceId:++Gh,theme:"light",colorScheme:"default",reducedMotion:!1,highContrast:!1,activeTab:"doxa-regions",sidebarCollapsed:!1,mobileMenuOpen:!1,legendState:"collapsed",_customLegendHeight:null,searchMode:!1,hamburgerMenuOpen:!1,legendMode:"prayer",prayerFilter:null,engagementFilter:null,adoptionFilter:null,religionFilter:null,selectedPeopleGroup:null,breakpoint:"desktop",windowSize:{width:window.innerWidth,height:window.innerHeight},toasts:[],nextToastId:1,toastDuration:5e3,openModals:[],modalData:new Map,isGlobalLoading:!1,globalLoadingMessage:"Loading...",loadingStates:new Map,interactionHistory:[],maxHistoryLength:20,keyboardShortcutsEnabled:!0,screenReaderAnnouncement:"",focusTrapActive:!1,debugMode:!1,showPerformanceOverlay:!1}),getters:{isDarkTheme:e=>!1,isMobile:e=>e.breakpoint==="mobile",isTablet:e=>e.breakpoint==="tablet",isDesktop:e=>e.breakpoint==="desktop"||e.breakpoint==="wide",legendHeight:e=>e._customLegendHeight?e._customLegendHeight:e.legendState==="collapsed"?"48px":e.legendState==="open"?"30%":e.legendState==="fullyOpen"?"calc(100% - 80px)":"48px",caretRotation:e=>e.legendState==="collapsed"?0:90,showPullTab:e=>e.legendState==="open"||e.legendState==="fullyOpen",getToastsByType:e=>t=>e.toasts.filter(n=>n.type===t),hasOpenModal:e=>e.openModals.length>0,topModal:e=>e.openModals.length===0?null:e.openModals[e.openModals.length-1],isModalOpen:e=>t=>e.openModals.includes(t),isAnyLoading:e=>e.isGlobalLoading||e.loadingStates.size>0,isLoading:e=>t=>e.loadingStates.get(t)||!1},actions:{setTheme(e){if(!["light","dark","auto"].includes(e))return;e="light",this.theme=e;const n=this.isDarkTheme;document.documentElement.setAttribute("data-theme",n?"dark":"light");try{localStorage.setItem("theme",e)}catch{}},toggleTheme(){const e=this.theme==="light"?"dark":"light";this.setTheme(e)},setColorScheme(e){this.colorScheme=e,document.documentElement.setAttribute("data-color-scheme",e)},toggleReducedMotion(){this.reducedMotion=!this.reducedMotion,document.documentElement.setAttribute("data-reduced-motion",this.reducedMotion)},toggleHighContrast(){this.highContrast=!this.highContrast,document.documentElement.setAttribute("data-high-contrast",this.highContrast)},setActiveTab(e){this.activeTab=e,this.addToHistory({type:"tab-change",tabId:e,timestamp:Date.now()})},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},openMobileMenu(){this.mobileMenuOpen=!0},closeMobileMenu(){this.mobileMenuOpen=!1},setLegendMode(e){["prayer","detail"].includes(e)&&(this.legendMode=e)},setPrayerFilter(e){[null,"noPrayer","hasPrayer","fullPrayer"].includes(e)&&(this.prayerFilter=e)},setEngagementFilter(e){[null,"notEngaged","hasEngagement"].includes(e)&&(this.engagementFilter=e)},setAdoptionFilter(e){[null,"notAdopted","hasAdoption"].includes(e)&&(this.adoptionFilter=e)},setReligionFilter(e){[null,"C","M","H","B","E","J","S","N","O","U"].includes(e)&&(this.religionFilter=e)},selectPeopleGroup(e){this.selectedPeopleGroup=e,e?(this._legendStateBeforeDetail=this.legendState,this.legendState="open",this._customLegendHeight=null,this.setLegendMode("detail")):(this.legendState=this._legendStateBeforeDetail||"open",this._customLegendHeight=null,this.setLegendMode("prayer"))},setLegendState(e){["collapsed","open","fullyOpen"].includes(e)&&(this.legendState=e)},toggleSearchMode(){this.searchMode=!this.searchMode},setSearchMode(e){this.searchMode=e},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},updateBreakpoint(e){let t;e<768?t="mobile":e<1024?t="tablet":e<1920?t="desktop":t="wide",t!==this.breakpoint&&(this.breakpoint=t)},updateWindowSize(e,t){this.windowSize.width=e,this.windowSize.height=t,this.updateBreakpoint(e)},showToast(e){const{message:t,type:n="info",duration:o=this.toastDuration,action:a=null,persistent:i=!1}=e,s={id:this.nextToastId++,message:t,type:n,duration:o,action:a,persistent:i,createdAt:Date.now()};return this.toasts.push(s),!i&&o>0&&setTimeout(()=>{this.removeToast(s.id)},o),s.id},showSuccess(e,t={}){return this.showToast({message:e,type:"success",...t})},showError(e,t={}){return this.showToast({message:e,type:"error",duration:7e3,...t})},showWarning(e,t={}){return this.showToast({message:e,type:"warning",...t})},showInfo(e,t={}){return this.showToast({message:e,type:"info",...t})},removeToast(e){const t=this.toasts.findIndex(n=>n.id===e);t!==-1&&this.toasts.splice(t,1)},clearAllToasts(){this.toasts=[]},openModal(e,t={}){this.openModals.includes(e)||(this.openModals.push(e),this.modalData.set(e,t),this.focusTrapActive=!0)},closeModal(e=null){if(e){const t=this.openModals.indexOf(e);t!==-1&&(this.openModals.splice(t,1),this.modalData.delete(e))}else{const t=this.openModals.pop();t&&this.modalData.delete(t)}this.openModals.length===0&&(this.focusTrapActive=!1)},closeAllModals(){this.openModals=[],this.modalData.clear(),this.focusTrapActive=!1},getModalData(e){return this.modalData.get(e)},showGlobalLoading(e="Loading..."){this.isGlobalLoading=!0,this.globalLoadingMessage=e},hideGlobalLoading(){this.isGlobalLoading=!1},setLoading(e,t=!0){t?this.loadingStates.set(e,!0):this.loadingStates.delete(e)},addToHistory(e){this.interactionHistory.push(e),this.interactionHistory.length>this.maxHistoryLength&&this.interactionHistory.shift()},clearHistory(){this.interactionHistory=[]},announce(e,t="polite"){this.screenReaderAnnouncement=e,setTimeout(()=>{this.screenReaderAnnouncement===e&&(this.screenReaderAnnouncement="")},1e3)},toggleKeyboardShortcuts(){this.keyboardShortcutsEnabled=!this.keyboardShortcutsEnabled},toggleDebugMode(){this.debugMode=!this.debugMode},togglePerformanceOverlay(){this.showPerformanceOverlay=!this.showPerformanceOverlay},toggleLegend(){this.legendState==="fullyOpen"?this.legendState="open":this.legendState==="open"?this.legendState="collapsed":this.legendState="open",this._customLegendHeight=null},openLegend(){this.legendState="open",this._customLegendHeight=null},fullyOpenLegend(){this.legendState="fullyOpen",this._customLegendHeight=null},collapseLegend(){this.legendState="collapsed",this._customLegendHeight=null},setLegendHeight(e){this._customLegendHeight=e},handleLegendItemClick(){this.legendState==="fullyOpen"&&(this.legendState="open")},enableSearchMode(){this.searchMode=!0},disableSearchMode(){this.searchMode=!1},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},openHamburgerMenu(){this.hamburgerMenuOpen=!0},closeHamburgerMenu(){this.hamburgerMenuOpen=!1},init(){let e=null;try{e=localStorage.getItem("theme")}catch{}e&&this.setTheme(e),new ResizeObserver(n=>{for(const o of n)this.updateWindowSize(o.contentRect.width,o.contentRect.height)}).observe(document.documentElement),window.matchMedia&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{this.theme==="auto"&&document.documentElement.setAttribute("data-theme",n.matches?"dark":"light")}),window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",n=>{this.reducedMotion=n.matches,document.documentElement.setAttribute("data-reduced-motion",n.matches)}))}}}),Uh=ci("map",{state:()=>({maps:{},activeMapId:null,selectedRegion:null,selectedFamily:null,selectedAffinityBlock:null,selectedLanguage:null,selectedDialect:null,activeLegendTab:"family",selectedResource:null,selectedPeopleGroup:null,selectedPinIds:[],globalFilters:{},searchQuery:"",autoFly:{isActive:!1,speed:1,interval:5e3,currentIndex:0,items:[],timerId:null},guidedTour:{isActive:!1,currentStep:0,steps:[]},showClusters:!1,clusterMode:"region",clusteringMode:"off",clusterPinOpacity:.6,clusterFilterProperty:null,clusterFilterValue:null,flySpeed:"normal",fullscreenMapId:null,preferences:{theme:"light",defaultMapStyle:"streets",enableAnimations:!0,autoSavePreferences:!0}}),getters:{getMapById:e=>t=>e.maps[t],activeMap:e=>e.activeMapId?e.maps[e.activeMapId]:null,hasMap:e=>t=>t in e.maps,allMapIds:e=>Object.keys(e.maps),hasSelection:e=>!!(e.selectedRegion||e.selectedFamily||e.selectedAffinityBlock||e.selectedPeopleGroup),isAutoFlying:e=>e.autoFly.isActive,isGuidedTourActive:e=>e.guidedTour.isActive,isMapFullscreen:e=>t=>e.fullscreenMapId===t},actions:{registerMap(e,t,n={}){let o=1.5;n.zoom!==void 0?o=n.zoom:t&&typeof t.getZoom=="function"&&(o=t.getZoom());let a=[0,0];if(n.center)a=n.center;else if(t&&typeof t.getCenter=="function"){const i=t.getCenter();i&&(a=[i.lng,i.lat])}this.maps[e]={instance:t,config:n,isReady:!1,zoom:o,center:a,registeredAt:Date.now()},this.activeMapId||(this.activeMapId=e)},setMapReady(e){const t=this.maps[e];t&&(t.isReady=!0)},updateMapState(e,t){const n=this.maps[e];n&&Object.assign(n,t)},unregisterMap(e){if(delete this.maps[e],this.activeMapId===e){const t=this.allMapIds;this.activeMapId=t.length>0?t[0]:null}},setActiveMap(e){e in this.maps&&(this.activeMapId=e)},selectRegion(e){this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedRegion=e},selectFamily(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedFamily=e},setActiveLegendTab(e){this.activeLegendTab=e},selectLanguage(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedFamily=null,this.selectedDialect=null,this.selectedLanguage=e},selectDialect(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedDialect=e},selectAffinityBlock(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedPeopleGroup=null,this.selectedAffinityBlock=e},selectPeopleGroup(e){this.selectedPeopleGroup=e},selectResource(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedResource===e?this.selectedResource=null:this.selectedResource=e},clearSelections(){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedAffinityBlock=null,this.selectedResource=null,this.selectedPeopleGroup=null,this.selectedPinIds=[],this.showClusters=!1,this.clusterMode="region"},setSelectedPinIds(e){this.selectedPinIds=e||[]},setFilter(e,t){this.globalFilters[e]=t},removeFilter(e){delete this.globalFilters[e]},clearFilters(){this.globalFilters={},this.searchQuery=""},setSearchQuery(e){this.searchQuery=e},startAutoFly(e,t=1){this.stopAutoFly(),this.autoFly.isActive=!0,this.autoFly.speed=t,this.autoFly.items=e,this.autoFly.currentIndex=0},stopAutoFly(){this.autoFly.timerId&&(clearInterval(this.autoFly.timerId),this.autoFly.timerId=null),this.autoFly.isActive=!1,this.autoFly.currentIndex=0},setAutoFlySpeed(e){this.autoFly.speed=Math.max(.5,Math.min(2,e))},nextAutoFlyItem(){if(!this.autoFly.isActive||this.autoFly.items.length===0)return;this.autoFly.currentIndex=(this.autoFly.currentIndex+1)%this.autoFly.items.length;const e=this.autoFly.items[this.autoFly.currentIndex];e.type==="region"?this.selectRegion(e):e.type==="family"&&this.selectFamily(e)},toggleClusters(e){typeof e=="boolean"?this.showClusters=e:this.showClusters=!this.showClusters},setClusterMode(e){["region","language-family","affinity-block","mst","resource"].includes(e)&&(this.clusterMode=e)},setClusteringMode(e){["off","mapbox","mst","network"].includes(e)&&(this.clusteringMode=e,this.showClusters=e!=="off")},setClusterFilter(e,t){this.clusterFilterProperty=e||null,this.clusterFilterValue=t||null},clearClusterFilter(){this.clusterFilterProperty=null,this.clusterFilterValue=null},setFlySpeed(e){["slow","normal","fast"].includes(e)&&(this.flySpeed=e)},setSelectedFamily(e){this.selectFamily(e)},clearSelectedFamily(){this.selectFamily(null)},setSelectedRegion(e){this.selectRegion(e)},clearSelectedRegion(){this.selectRegion(null)},clearSelectedResource(){this.selectResource(null)},clearSelectedLanguage(){this.selectLanguage(null)},clearSelectedDialect(){this.selectDialect(null)},toggleFullscreen(e){this.fullscreenMapId===e?this.fullscreenMapId=null:this.fullscreenMapId=e},loadPreferences(){try{const e=localStorage.getItem("mapUserPreferences");if(e){const t=JSON.parse(e);this.preferences={...this.preferences,...t}}}catch(e){console.error("[mapStore] Failed to load preferences:",e)}},savePreferences(){try{localStorage.setItem("mapUserPreferences",JSON.stringify(this.preferences))}catch(e){console.error("[mapStore] Failed to save preferences:",e)}},setPreference(e,t){this.preferences[e]=t,this.preferences.autoSavePreferences&&this.savePreferences()}}}),Bh=ci("data",{state:()=>({sources:{},loadingStates:{}}),actions:{async load(e,t){if(!this.sources[e]){this.loadingStates[e]={isLoading:!0,error:null};try{const n=await t();this.sources[e]=qn({features:n,timestamp:Date.now()}),this.loadingStates[e]={isLoading:!1,error:null}}catch(n){console.error(`[dataStore] Failed to load source "${e}":`,n),this.loadingStates[e]={isLoading:!1,error:n}}}},clearSource(e){delete this.sources[e],delete this.loadingStates[e]},cacheSourceData(e,t){this.sources[e]=qn({features:t.normalizedData||[],timestamp:t.timestamp||Date.now()})},hasSourceData(e){return!!this.sources[e]},getSourceData(e){return this.sources[e]?{normalizedData:this.sources[e].features}:null}},getters:{getData:e=>t=>{var n;return((n=e.sources[t])==null?void 0:n.features)??null},isLoading:e=>t=>{var n;return((n=e.loadingStates[t])==null?void 0:n.isLoading)??!1},getError:e=>t=>{var n;return((n=e.loadingStates[t])==null?void 0:n.error)??null}}}),Vh={activeSource:"pray-tools"},Wh=".profile-loader[data-v-d33339b0]{border-radius:var(--map-radius-corners, var(--map-radius, 0px));width:100%;height:100%;min-height:var(--profile-min-h, 100dvh);position:relative}.profile-error[data-v-d33339b0]{padding:1rem;background:#fff3cd;border:1px solid #ffc107;border-radius:4px;font-family:monospace;font-size:13px}",jh=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},qh=["dir"],Kh={key:0,class:"profile-error"},Yh={key:1,class:"profile-error"},Jh=jh({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){var x;const n=e,o=Ge("profileConfig",null),a=de(()=>{var F;if(!n.profileConfig)return null;let w;try{w=JSON.parse(n.profileConfig)}catch{return console.error("[ProfileLoader] Invalid profile-config JSON:",n.profileConfig),null}if(w&&w.assetsBase===void 0){const A=(F=o==null?void 0:o.value)==null?void 0:F.assetsBase;typeof A=="string"&&A&&(w.assetsBase=A)}return w}),i=de(()=>{var w;return((w=a.value)==null?void 0:w.profile)||null}),s=bp(),r=de(()=>{var F;const w=(F=a.value)==null?void 0:F.tk;return typeof w=="string"&&w?w:s.value||""});ot(()=>{var w;return(w=a.value)==null?void 0:w.tk},w=>{typeof w=="string"&&w&&pi(w)},{immediate:!0}),ot(()=>{var w;return(w=a.value)==null?void 0:w.tokenUrl},w=>{var F;w&&!((F=a.value)!=null&&F.tk)&&!s.value&&$p(w)},{immediate:!0});const l=de(()=>{var w;return((w=a.value)==null?void 0:w.dataSource)||Vh.activeSource}),u=de(()=>{var w;return((w=a.value)==null?void 0:w.colorSet)||"default"}),p=de(()=>!1),m=de(()=>{var w;return((w=a.value)==null?void 0:w.pinHint)!==!1}),b=de(()=>{var F,A;const w=(((F=a.value)==null?void 0:F.locale)||((A=a.value)==null?void 0:A.lang)||Ql()||"").split("-")[0].toLowerCase();return _a.includes(w)?w:""}),y=Ge("appI18n",null);Lu(()=>{b.value&&(y&&(y.global.locale.value=b.value),nc(b.value))});const E=de(()=>{var w,F;return b.value||((F=(w=y==null?void 0:y.global)==null?void 0:w.locale)==null?void 0:F.value)||"en"}),S=de(()=>Xl.has(E.value)?"rtl":"ltr"),N=de(()=>{var w;return((w=a.value)==null?void 0:w.instanceId)||"doxa-map-"+Math.random().toString(36).slice(2,9)}),M=Ge("profileModules",null);if(!M)throw new Error('[ProfileLoader] No profileModules provided. Bundle entry must `app.provide("profileModules", import.meta.glob("./*.vue"))`');const C=de(()=>{if(!i.value)return null;const w=`./${i.value}.vue`;return M[w]?Ih(M[w]):(console.error(`[ProfileLoader] Profile not found: "${i.value}". Available:`,Object.keys(M)),null)});$t("mapboxToken",r),$t("dataSource",l),$t("colorSet",u),$t("profileConfig",a),$t("instanceId",N),$t("lang",E);const v=Hh(),$=Uh(),P=Bh();try{const w=typeof localStorage<"u"?localStorage.getItem("theme"):null;w&&((x=v.setTheme)==null||x.call(v,w))}catch{}return $t("uiStore",v),$t("mapStore",$),$t("dataStore",P),(w,F)=>(te(),se("div",{class:"profile-loader",dir:S.value},[a.value?C.value?(te(),kn(Rs(C.value),{key:2})):(te(),se("div",Yh,[H("p",null,[F[1]||(F[1]=Ie("⚠️ Profile ",-1)),H("strong",null,'"'+V(i.value)+'"',1),F[2]||(F[2]=Ie(" not found.",-1))])])):(te(),se("div",Kh,[...F[0]||(F[0]=[H("p",null,[Ie("⚠️ "),H("strong",null,"doxa-map"),Ie(": missing or invalid "),H("code",null,"profile-config"),Ie(" prop.")],-1),H("p",null,[Ie("Example: "),H("code",null,`profile-config='{"profile":"example-map","tk":"pk.eyJ..."}'`)],-1)])])),C.value&&p.value?(te(),kn(Rs(Me(null)),{key:3})):et("",!0),C.value&&m.value?(te(),kn(zh,{key:4})):et("",!0)],8,qh))}},[["styles",[Wh]],["__scopeId","data-v-d33339b0"]]),Zh=Object.assign({"./upg-neighbor.vue":()=>kc(()=>Promise.resolve().then(()=>Om),void 0)}),Xh=Zd(Jh,{configureApp(e){e.use(dp());const t=Th();e.use(t),e.provide("appI18n",t),e.provide("profileModules",Zh)}});typeof customElements<"u"&&!customElements.get("upg-neighbor")&&customElements.define("upg-neighbor",Xh);const Qh="rgba(120, 128, 134, 0.28)",ac="36px",ic=()=>{};function ef(e,t={}){const{enabled:n=!0}=t;if(!n||!e)return ic;const o=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!o.length)return ic;const a=C=>C.classList.contains("map-scroll-edge--left");for(const C of o)C.style.background=`linear-gradient(${a(C)?"to right":"to left"}, ${Qh} ${ac}, transparent ${ac})`,C.style.opacity="0",C.style.transition="opacity 0.16s ease",C.style.userSelect="none",C.style.webkitUserSelect="none";const i=C=>{C.style.opacity="1"},s=C=>{C.style.opacity="0"},r=()=>o.find(C=>!a(C))||null,l=new Set;let u=!1,p=null;const m=()=>{for(const C of o)l.has(C)||s(C)},b=()=>{const C=r();C&&(i(C),p&&clearTimeout(p),p=setTimeout(m,250))},y=()=>b(),E=C=>{if(!(C.touches&&C.touches.length===1))return;const v=C.target;v&&v.classList&&v.classList.contains("map-scroll-edge")||b()},S=()=>{p&&clearTimeout(p),m()};e.addEventListener("wheel",y,{passive:!0}),e.addEventListener("touchmove",E,{passive:!0}),e.addEventListener("touchend",S,{passive:!0}),e.addEventListener("touchcancel",S,{passive:!0});const N=()=>{u||b()};typeof window<"u"&&window.addEventListener("scroll",N,{passive:!0});const M=[];for(const C of o){const v=()=>{l.add(C),i(C)},$=()=>{l.delete(C),s(C)},P=()=>{u=!0,i(C)},x=()=>{u=!1,s(C)};C.addEventListener("mouseenter",v),C.addEventListener("mouseleave",$),C.addEventListener("touchstart",P,{passive:!0}),C.addEventListener("touchend",x,{passive:!0}),M.push(()=>{C.removeEventListener("mouseenter",v),C.removeEventListener("mouseleave",$),C.removeEventListener("touchstart",P),C.removeEventListener("touchend",x)})}return function(){p&&(clearTimeout(p),p=null),e.removeEventListener("wheel",y),e.removeEventListener("touchmove",E),e.removeEventListener("touchend",S),e.removeEventListener("touchcancel",S),typeof window<"u"&&window.removeEventListener("scroll",N);for(const v of M)v();for(const v of o)s(v)}}const tf=Object.fromEntries([{id:"midnight-glow",label:"Midnight Glow",mood:"the prayer-map dark — pins glow like embers",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"night",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["doxa-simple-map","my-upg-100-list"]},{id:"daylight",label:"Daylight",mood:"the same Standard world, lights on",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"day",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","gospel-resources"]},{id:"dawn",label:"Dawn",mood:"soft warm horizon — hopeful, quiet",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dawn",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["doxa-simple-map"]},{id:"dusk",label:"Dusk",mood:"blue hour — calm contrast for bright pins",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dusk",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["my-upg-100-list"]},{id:"paper",label:"Paper",mood:"near-white minimal — data reads like print",mapbox:"mapbox://styles/mapbox/light-v11",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["research-dashboard","cities-internet"]},{id:"ink",label:"Ink",mood:"near-black minimal — maximum pin contrast",mapbox:"mapbox://styles/mapbox/dark-v11",maplibre:"https://tiles.openfreemap.org/styles/dark",bestFor:["my-upg-100-list","cities-internet"]},{id:"streetlife",label:"Street Life",mood:"full street detail — city-scale work",mapbox:"mapbox://styles/mapbox/streets-v12",maplibre:"https://tiles.openfreemap.org/styles/bright",bestFor:["cities-internet","key-cities"]},{id:"terrain",label:"Terrain",mood:"relief + parks — where people actually live",mapbox:"mapbox://styles/mapbox/outdoors-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","country-posters"]},{id:"satellite",label:"Satellite",mood:"imagery — the real ground",mapbox:"mapbox://styles/mapbox/satellite-v9",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["country-posters"]},{id:"hybrid",label:"Hybrid",mood:"imagery + labels — orientation without losing ground truth",mapbox:"mapbox://styles/mapbox/satellite-streets-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["key-cities"]},{id:"wayfinder-day",label:"Wayfinder Day",mood:"high-legibility navigation palette",mapbox:"mapbox://styles/mapbox/navigation-day-v1",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["gospel-resources"]},{id:"wayfinder-night",label:"Wayfinder Night",mood:"dark navigation — dashboards at night",mapbox:"mapbox://styles/mapbox/navigation-night-v1",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["research-dashboard"]},{id:"galaxy",label:"Galaxy",mood:"the day side of Earth floating in space — normal land, blue oceans, black void behind the sphere",mapbox:"mapbox://styles/mapbox/standard",maplibre:"https://tiles.versatiles.org/assets/styles/colorful/style.json",bestFor:["research-dashboard","my-upg-100-list"]}].map(e=>[e.id,e]));function nf(e,t="mapbox"){if(typeof e!="string"||!e)return{style:void 0,lightPreset:void 0,paint:void 0};const n=tf[e];return n?t==="maplibre"?{style:n.maplibre,lightPreset:void 0,paint:n.paint}:{style:n.mapbox,lightPreset:n.lightPreset,paint:n.paint}:/^(mapbox:\/\/|https?:\/\/)/.test(e)?{style:e,lightPreset:void 0,paint:void 0}:{style:void 0,lightPreset:void 0,paint:void 0}}function of(e,t){if(!e||!Array.isArray(t))return[];const n=[];for(const o of t)if(!(!o||!o.layer||!o.prop))try{if(!e.getLayer(o.layer))continue;e.setPaintProperty(o.layer,o.prop,o.value),n.push(o.layer+"."+o.prop)}catch{}return n}const af=["mapbox","maplibre"],sf="auto";function sc(e){return e&&typeof e=="object"&&"value"in e&&!("provider"in e)&&!("profile"in e)?e.value:e}function rc(e){const t=n=>typeof n=="string"&&!!n.trim()&&!/^YOUR_/.test(n.trim());return t(e==null?void 0:e.tk)||/^https?:\/\//i.test(String((e==null?void 0:e.tokenUrl)||""))?!0:typeof window>"u"?!1:t(window.MAP_TOKEN)||t(window.__doxaMapToken)||!!window.__doxaMapTokenPending}function rf(e,{token:t}={}){const n=sc(e);return lc(n)||(rc(n)||rc({tk:t})?"mapbox":"maplibre")}function lc(e){const t=sc(e),n=t==null?void 0:t.provider,o=typeof location<"u"?new URLSearchParams(location.search).get("provider"):void 0,a=typeof window<"u"?window.MAP_PROVIDER:void 0,i=String(n||o||a||sf).toLowerCase().trim();return af.includes(i)?i:""}function cc(e,t){if(!e||!t||typeof e.setProjection!="function")return!1;const n=typeof window<"u"?window.maplibregl:null,o=!!(n&&n.Map&&e instanceof n.Map);try{return e.setProjection(o?{type:t}:t),!0}catch{return!1}}const bo={mapboxGlJs:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js",integrity:"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ"},mapboxGlCss:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css",integrity:"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV"},maplibreGlJs:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js",integrity:"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp"},maplibreGlCss:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css",integrity:"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK"},mapboxGeocoderJs:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js",integrity:"sha384-Lx9WK8XhZk57czwxt6B6nyaDHB5Ayrcrsu4Fw4bCp/Ot/QLOsUZ0xYqLOpOOSXZw"},mapboxGeocoderCss:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css",integrity:"sha384-1KNhwJNCQTr0DCi/5/OnQcFytgycxTahxNZaqKbAtqmY8bUhu26qxXqvDGXXwplS"},maplibreGeocoderJs:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.min.js",integrity:"sha384-RGV5vfoJd7alk8HE+71IyVfu19ciH1FKA15+AuXs6OeBM2npXrmTPFqG23yMiHXi"},maplibreGeocoderCss:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.css",integrity:"sha384-UkDpPApjTpHJHpcJiSNAmbobh30W0/dmt0DoKm4V8CWYRYvQ/Jhd/ijFz0tFdVnH"},d3:{url:"https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js",integrity:"sha384-CjloA8y00+1SDAUkjs099PVfnY2KmDC2BZnws9kh8D/lX1s46w6EPhpXdqMfjK6i"}};function Ri(e,t){const n=Object.values(bo).find(o=>o.url===t);return n&&(e.integrity=n.integrity,e.crossOrigin="anonymous"),e}const uc={mapbox:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js",maplibre:"https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js"};function lf(e){return!!e&&typeof window<"u"&&e===window.maplibregl}function cf(e){if(typeof window>"u")return!1;const t=e?[e]:[window.maplibregl,window.mapboxgl].filter(Boolean);let n=!1;for(const o of t)if(!(!o||!o.setRTLTextPlugin))try{if(lf(o)){if(o.getRTLTextPluginStatus&&o.getRTLTextPluginStatus()!=="unavailable")continue;const a=o.setRTLTextPlugin(uc.maplibre,!0);a&&a.catch&&a.catch(()=>{})}else o.setRTLTextPlugin(uc.mapbox,null,!0);n=!0}catch{}return n}const uf=/\[\s*"get"\s*,\s*"name(?::latin|:nonlatin|:en|_en|_int)?"\s*\]|\{name(?::latin|:nonlatin|:en|_en|_int)?\}/,dc=new WeakMap;function df(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function pc(e,t){if(!e||!t)return 0;const n=String(t).split("-")[0].toLowerCase();try{if(!df(e))return typeof e.setLanguage=="function"&&e.setLanguage(n),0;const o=e.getStyle&&e.getStyle();if(!o||!Array.isArray(o.layers))return 0;let a=dc.get(e);a||(a=new Map,dc.set(e,a));let i=0;for(const s of o.layers){if(s.type!=="symbol"||!s.layout||s.layout["text-field"]==null)continue;const r=s.layout["text-field"],l=JSON.stringify(r);if(l.startsWith('["coalesce",["get","name:')){if(!a.has(s.id))continue}else{if(!uf.test(l))continue;a.set(s.id,r)}const u=["coalesce",["get","name:"+n],["get","name_"+n],["get","name:latin"],["get","name_en"],["get","name"]];e.setLayoutProperty(s.id,"text-field",u),i++}return i}catch{return 0}}const Mn={mapbox:{global:"mapboxgl",js:bo.mapboxGlJs.url,css:bo.mapboxGlCss.url},maplibre:{global:"maplibregl",js:bo.maplibreGlJs.url,css:bo.maplibreGlCss.url}},pf={"Map.Title":"map","Marker.Title":"marker","Popup.Close":"closePopup","NavigationControl.ZoomIn":"zoomIn","NavigationControl.ZoomOut":"zoomOut","NavigationControl.ResetBearing":"resetBearing","AttributionControl.ToggleAttribution":"toggleAttribution","AttributionControl.MapFeedback":"mapFeedback","FullscreenControl.Enter":"enterFullscreen","FullscreenControl.Exit":"exitFullscreen","GeolocateControl.FindMyLocation":"findMyLocation","GeolocateControl.LocationNotAvailable":"locationNotAvailable","GlobeControl.Enable":"enableGlobe","GlobeControl.Disable":"disableGlobe","CooperativeGesturesHandler.WindowsHelpText":"ctrlScroll","CooperativeGesturesHandler.MacHelpText":"cmdScroll","CooperativeGesturesHandler.MobileHelpText":"twoFingers","ScrollZoomBlocker.CtrlMessage":"ctrlScroll","ScrollZoomBlocker.CmdMessage":"cmdScroll","TouchPanBlocker.Message":"twoFingers"};function gc(e,t){const n={};for(const[a,i]of Object.entries(pf)){const s=va(`mapui.${i}`,e);s&&(n[a]=s)}const o=va(t==="maplibre"?"mapui.maplibreLogo":"mapui.mapboxHomepage",e);return o&&(n["LogoControl.Title"]=o),n}function hc(e){if(typeof window>"u")return;const t=window,n=()=>{try{const o=e.getContainer().querySelector(".mapboxgl-ctrl-logo, .maplibregl-ctrl-logo");o&&(o.style.display="none")}catch{}};if(t.__doxaLogoOwner&&t.__doxaLogoOwner!==e){e.once("load",n),n();return}t.__doxaLogoOwner=e,e.once("remove",()=>{t.__doxaLogoOwner===e&&(t.__doxaLogoOwner=null)})}const gf=Mn.mapbox.css,hf="https://tiles.openfreemap.org/styles/liberty",ff="https://tiles.openfreemap.org/styles/fiord";function Ii(e){var n;const t=((n=Mn[e])==null?void 0:n.global)||Mn.mapbox.global;return typeof window<"u"?window[t]:void 0}async function fc(e){const t=Mn[e]||Mn.mapbox;if(Ii(e)||typeof document>"u")return;if(!document.querySelector(`link[href="${t.css}"]`)){const o=document.createElement("link");o.rel="stylesheet",o.href=t.css,Ri(o,t.css),document.head.appendChild(o)}const n=document.querySelector(`script[src="${t.js}"]`);if(n){if(Ii(e))return;await new Promise(o=>{n.addEventListener("load",o,{once:!0}),n.addEventListener("error",o,{once:!0})});return}await new Promise((o,a)=>{const i=document.createElement("script");i.src=t.js,Ri(i,t.js),i.async=!1,i.addEventListener("load",o,{once:!0}),i.addEventListener("error",()=>a(new Error(`[useMapInstance] Failed to load ${e} engine script`)),{once:!0}),document.head.appendChild(i)})}async function mf(e,t){if(!e)return;const n=e.getRootNode();if(!(n instanceof ShadowRoot))return;const o=s=>new Promise(r=>setTimeout(r,s)),a=n.querySelector(`link[href="${t}"]`);if(a){if(a.sheet)return;await Promise.race([new Promise(s=>{a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0})}),o(2e3)]);return}const i=document.createElement("link");i.rel="stylesheet",i.href=t,Ri(i,t),await Promise.race([new Promise(s=>{i.addEventListener("load",s,{once:!0}),i.addEventListener("error",s,{once:!0}),n.prepend(i)}),o(2e3)])}function bf(e,t){return typeof e=="string"&&/^https?:\/\//.test(e)?e:t==="night"||t==="dusk"?ff:hf}const $f=85.0511,Fi=-2,_f=0,vf=-60;function mc(e){return(1-Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2))/Math.PI)/2}function yf(e,t,n,o){if(!e||e<=0||!t||t<=0)return _f;const a=Math.log2(e/512),i=mc(o)-mc($f),s=Math.log2(t/(512*i)),r=Math.max(a,s);return Math.max(Fi,Math.min(r,(n??18)-1))}function bc({containerRef:e,accessToken:t,style:n,config:o=void 0,provider:a=void 0,center:i=[20,10],zoom:s=2,bounds:r=void 0,fitBoundsOptions:l=void 0,minZoom:u=void 0,skipWorldFloor:p=!1,maxZoom:m=18,pitch:b=0,bearing:y=0,renderWorldCopies:E=!0,showEdgeBorders:S=!0,southCutoff:N=vf,maxBounds:M=void 0}){const C=Mo(null),v=fe(!1);let $=null,P=null,x=null,w=null;try{w=Ge("profileConfig",null)}catch{}const F=!a&&!lc(w);a=a||rf(w,{token:t});let A=a==="maplibre";typeof document<"u"&&fc(a).catch(()=>{});let Y=null;try{Y=Ge("lang",null)}catch{}const pe=()=>{const Se=Y&&typeof Y=="object"&&"value"in Y?Y.value:Y;if(typeof Se=="string"&&Se)return Se;const z=w&&typeof w=="object"&&"value"in w?w.value:w;if(z&&(z.locale||z.lang))return String(z.locale||z.lang);try{const j=new URLSearchParams(location.search);return j.get("lang")||j.get("locale")||document.documentElement.lang||"en"}catch{return"en"}};async function Z(){var He;if(F&&!A&&!t&&typeof window<"u"&&window.__doxaMapTokenPending){if(await window.__doxaMapTokenPending,!e.value)return;typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN||(a="maplibre",A=!0)}const Se=nf(n,a),z=Se.style||n;if(!e.value){console.error("containerRef.value is null — call initializeMap() inside onMounted()");return}const j=()=>!e.value;if(await fc(a),j())return;const k=Ii(a);if(!k){console.error(`[useMapInstance] ${A?"maplibregl":"mapboxgl"} is not available. Add the ${A?"MapLibre":"Mapbox"} GL JS script to your page.`);return}if(cf(k),!A){if(!t&&typeof window<"u"&&window.__doxaMapTokenPending&&(await window.__doxaMapTokenPending,j()))return;if(!t&&typeof window<"u"&&typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN&&(t=window.MAP_TOKEN),!t){typeof window<"u"&&!window.__doxaNoTokenWarned&&(window.__doxaNoTokenWarned=!0,console.warn('No Mapbox access token provided. Pass "tk" in profile-config JSON or set window.MAP_TOKEN.'));return}if(!t.startsWith("pk.")){console.error('Mapbox token looks invalid (expected "pk." prefix). Got:',t.slice(0,10)+"...");return}}if(await mf(e.value,A?Mn.maplibre.css:gf),j()||(await new Promise(ce=>requestAnimationFrame(ce)),j()))return;const R=e.value,J=R.clientWidth,oe=R.clientHeight;if(J===0||oe===0){console.error(`[useMapInstance] Container has ZERO dimensions (${J}×${oe}). Map will be invisible. Check that parent elements have CSS sizing.`);let ce=R.parentElement,re=0;for(;ce&&re<5;)ce=ce.parentElement,re++}const Q=t;A||(k.accessToken=Q);const le=()=>typeof window<"u"&&window.innerWidth>=1024,_e=(ce,re)=>{if(p)return typeof u=="number"?u:Fi;if(!le())return Fi;const ze=yf(ce,re,m,N);return typeof u=="number"?Math.max(u,ze):ze},ve=_e(R.clientWidth,R.clientHeight),Fe=Se.lightPreset||(()=>{var ce;try{const re=typeof o=="function"?o():o;return(ce=re==null?void 0:re.basemap)==null?void 0:ce.lightPreset}catch{return}})();if(A){C.value=new k.Map({container:e.value,style:bf(z,Fe),locale:gc(pe(),"maplibre"),center:i,zoom:s,minZoom:ve,maxZoom:m,pitch:b,bearing:y,dragRotate:!1,renderWorldCopies:E,...r?{bounds:r,...l?{fitBoundsOptions:l}:{}}:{},...M?{maxBounds:M}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),hc(C.value);try{e.value.__doxaMap=C.value}catch{}}else{const ce=typeof o=="function"?o():o;C.value=new k.Map({accessToken:Q,container:e.value,style:z,locale:gc(pe(),"mapbox"),...ce?{config:ce}:{},center:i,zoom:s,minZoom:ve,maxZoom:m,pitch:b,bearing:y,dragRotate:!1,touchPitch:!1,renderWorldCopies:E,...r?{bounds:r,...l?{fitBoundsOptions:l}:{}}:{},...M?{maxBounds:M}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),hc(C.value);try{e.value.__doxaMap=C.value}catch{}}try{let ce=!1;C.value.on("error",re=>{var f,h;const ze=((f=re==null?void 0:re.error)==null?void 0:f.status)??(re==null?void 0:re.status),c=String(((h=re==null?void 0:re.error)==null?void 0:h.url)||(re==null?void 0:re.sourceId)||"");ze!==401&&ze!==403||ce||(ce=!0,console.error(`[doxa-maps] Mapbox returned ${ze} for a TILE request while the style loaded fine. That is a URL RESTRICTION on the access token, not a bad token and not a bug in this map. Add this page's origin (${typeof location<"u"?location.origin:"this origin"}) to the token's URL restrictions in the Mapbox account. The map will keep its data layer and stay blank underneath until then.`+(c?` First failing request: ${c.slice(0,120)}`:"")))})}catch{}try{C.value.touchZoomRotate.disableRotation()}catch{}x=ef(((He=e.value)==null?void 0:He.parentElement)||null,{enabled:S});let Ae=ve,Pe=null;$=()=>{const ce=C.value;if(!ce)return;const re=_e(R.clientWidth,R.clientHeight);re!==Ae&&(Ae=re,ce.setMinZoom(re)),ce.getZoom(){Pe=null;const ze=C.value;if(!ze)return;const c=_e(R.clientWidth,R.clientHeight);if(ze.getZoom(){Pe&&(clearTimeout(Pe),Pe=null)},C.value.on("resize",$),typeof window<"u"&&(window.addEventListener("resize",$),window.addEventListener("orientationchange",$)),C.value.on("style.load",()=>{if(C.value&&pc(C.value,pe()),Se.paint&&C.value){const ce=of(C.value,Se.paint);console.info("[useMapInstance] style paint applied ("+a+"):",ce.join(", ")||"NONE MATCHED")}requestAnimationFrame(()=>{var ce;(ce=C.value)==null||ce.resize(),C.value&&C.value.setMinZoom(_e(R.clientWidth,R.clientHeight)),v.value=!0})})}function ge(){if(C.value){if($&&(C.value.off("resize",$),typeof window<"u"&&(window.removeEventListener("resize",$),window.removeEventListener("orientationchange",$)),$=null),P){try{P()}catch{}P=null}x&&(x(),x=null),C.value.remove(),C.value=null,v.value=!1}}if(Y&&typeof Y=="object"&&"value"in Y)try{ot(Y,()=>{C.value&&v.value&&pc(C.value,pe())})}catch{}return{map:C,isMapReady:v,initializeMap:Z,destroy:ge}}function $c(e,t){e&&(typeof e.isStyleLoaded=="function"&&e.isStyleLoaded()?t():e.once("style.load",t))}function _c(){return Ai("neighbor")}const Sf=Ca&&Ca.tagName.toUpperCase()==="SCRIPT"&&Ca.src||new URL("upg-neighbor.js",document.baseURI).href,$o=e=>String(e||"").trim().replace(/\/+$/,"");function wf(){try{const t=String(Sf||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Cf(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const o=$o(t);if(/^https?:\/\//i.test(o)||o.startsWith("/"))return o}const n=$o((e==null?void 0:e.treeBase)||"")||$o(wf()||"");if(n)try{const o=typeof document<"u"?document.baseURI:void 0;return $o(new URL(n+"/assets",o).href)}catch{return $o(n+"/assets")}return"./assets"}const qt={1:"#0f7a3d",2:"#34a853",3:"#9aa7b4"},Dn="#e11d48",wa="#f59e0b",st="#002e6e";let _o=null;function vc(e){if(_o)return _o;const t=(e==null?void 0:e.value)||e||{},n=t.nearDataUrl||`${Cf(t)}/tables/near-neighbors.json`;return _o=fetch(n).then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.json()}).then(Pf).catch(o=>{throw _o=null,o}),_o}function Pf(e){const{cols:t,dict:n,rows:o,links:a,bridges:i,meta:s}=e,r=o.map((b,y)=>{const E={i:y};return t.forEach((S,N)=>{E[S]=n[S]?n[S][b[N]]:b[N]}),E.reached=!!E.reached,E}),l=b=>(a[b.i]||[]).map(([y,E,S,N])=>({g:r[y],e:E,km:S,same:!!N})),u=b=>{const y=a[b.i];return y&&y.length?Math.min(...y.map(E=>E[1])):0},p=r.filter(b=>!b.reached);for(const b of p)b.p=u(b);const m=i.map(b=>{var S,N;const y=b.reached.map(M=>r[M]),E=b.unreached.map(M=>r[M]);return{lang:b.lang,langName:((S=y[0])==null?void 0:S.langName)||((N=E[0])==null?void 0:N.langName)||b.lang,believers:b.believers,unreachedPop:b.unreachedPop,res:{bible:!!b.res[0],film:!!b.res[1],audio:!!b.res[2],radio:!!b.res[3]},reached:y,unreached:E,reachedCountries:[...new Set(y.map(M=>M.country))].sort(),unreachedCountries:[...new Set(E.map(M=>M.country))].sort()}});return{meta:s,groups:r,unreached:p,neighborsOf:l,bridges:m}}const an=e=>String(e||"").normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase();function xt(e){return e=Number(e)||0,e>=1e9?(e/1e9).toFixed(1)+"B":e>=1e6?(e/1e6).toFixed(e>=1e7?0:1)+"M":e>=1e3?(e/1e3).toFixed(e>=1e4?0:1)+"K":String(Math.round(e))}function Oi(e,t,n){const o=r=>{const l=String(r??"");return/[",\n]/.test(l)?'"'+l.replace(/"/g,'""')+'"':l},a=[t,...n].map(r=>r.map(o).join(",")).join(` +`,"pin-hint"),(k,R)=>u.value?Uo((te(),se("div",{key:0,ref_key:"hintEl",ref:C,class:Je(["pin-hint",{dark:r.value}]),role:"status"},[H("span",Mh,[R[0]||(R[0]=H("span",{class:"pin-hint-dot","aria-hidden":"true"},null,-1)),Ie(" "+V(l.value)+" ",1),H("button",{class:"pin-hint-x",type:"button","aria-label":t("aria.dismissHint","Dismiss hint"),onClick:Z},"×",8,Dh)])],2)),[[Id,p.value&&b.value]]):et("",!0)}};let Gh=0;const Hh=ci("ui",{state:()=>({_storeInstanceId:++Gh,theme:"light",colorScheme:"default",reducedMotion:!1,highContrast:!1,activeTab:"doxa-regions",sidebarCollapsed:!1,mobileMenuOpen:!1,legendState:"collapsed",_customLegendHeight:null,searchMode:!1,hamburgerMenuOpen:!1,legendMode:"prayer",prayerFilter:null,engagementFilter:null,adoptionFilter:null,religionFilter:null,selectedPeopleGroup:null,breakpoint:"desktop",windowSize:{width:window.innerWidth,height:window.innerHeight},toasts:[],nextToastId:1,toastDuration:5e3,openModals:[],modalData:new Map,isGlobalLoading:!1,globalLoadingMessage:"Loading...",loadingStates:new Map,interactionHistory:[],maxHistoryLength:20,keyboardShortcutsEnabled:!0,screenReaderAnnouncement:"",focusTrapActive:!1,debugMode:!1,showPerformanceOverlay:!1}),getters:{isDarkTheme:e=>!1,isMobile:e=>e.breakpoint==="mobile",isTablet:e=>e.breakpoint==="tablet",isDesktop:e=>e.breakpoint==="desktop"||e.breakpoint==="wide",legendHeight:e=>e._customLegendHeight?e._customLegendHeight:e.legendState==="collapsed"?"48px":e.legendState==="open"?"30%":e.legendState==="fullyOpen"?"calc(100% - 80px)":"48px",caretRotation:e=>e.legendState==="collapsed"?0:90,showPullTab:e=>e.legendState==="open"||e.legendState==="fullyOpen",getToastsByType:e=>t=>e.toasts.filter(n=>n.type===t),hasOpenModal:e=>e.openModals.length>0,topModal:e=>e.openModals.length===0?null:e.openModals[e.openModals.length-1],isModalOpen:e=>t=>e.openModals.includes(t),isAnyLoading:e=>e.isGlobalLoading||e.loadingStates.size>0,isLoading:e=>t=>e.loadingStates.get(t)||!1},actions:{setTheme(e){if(!["light","dark","auto"].includes(e))return;e="light",this.theme=e;const n=this.isDarkTheme;document.documentElement.setAttribute("data-theme",n?"dark":"light");try{localStorage.setItem("theme",e)}catch{}},toggleTheme(){const e=this.theme==="light"?"dark":"light";this.setTheme(e)},setColorScheme(e){this.colorScheme=e,document.documentElement.setAttribute("data-color-scheme",e)},toggleReducedMotion(){this.reducedMotion=!this.reducedMotion,document.documentElement.setAttribute("data-reduced-motion",this.reducedMotion)},toggleHighContrast(){this.highContrast=!this.highContrast,document.documentElement.setAttribute("data-high-contrast",this.highContrast)},setActiveTab(e){this.activeTab=e,this.addToHistory({type:"tab-change",tabId:e,timestamp:Date.now()})},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},openMobileMenu(){this.mobileMenuOpen=!0},closeMobileMenu(){this.mobileMenuOpen=!1},setLegendMode(e){["prayer","detail"].includes(e)&&(this.legendMode=e)},setPrayerFilter(e){[null,"noPrayer","hasPrayer","fullPrayer"].includes(e)&&(this.prayerFilter=e)},setEngagementFilter(e){[null,"notEngaged","hasEngagement"].includes(e)&&(this.engagementFilter=e)},setAdoptionFilter(e){[null,"notAdopted","hasAdoption"].includes(e)&&(this.adoptionFilter=e)},setReligionFilter(e){[null,"C","M","H","B","E","J","S","N","O","U"].includes(e)&&(this.religionFilter=e)},selectPeopleGroup(e){this.selectedPeopleGroup=e,e?(this._legendStateBeforeDetail=this.legendState,this.legendState="open",this._customLegendHeight=null,this.setLegendMode("detail")):(this.legendState=this._legendStateBeforeDetail||"open",this._customLegendHeight=null,this.setLegendMode("prayer"))},setLegendState(e){["collapsed","open","fullyOpen"].includes(e)&&(this.legendState=e)},toggleSearchMode(){this.searchMode=!this.searchMode},setSearchMode(e){this.searchMode=e},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},updateBreakpoint(e){let t;e<768?t="mobile":e<1024?t="tablet":e<1920?t="desktop":t="wide",t!==this.breakpoint&&(this.breakpoint=t)},updateWindowSize(e,t){this.windowSize.width=e,this.windowSize.height=t,this.updateBreakpoint(e)},showToast(e){const{message:t,type:n="info",duration:o=this.toastDuration,action:a=null,persistent:i=!1}=e,s={id:this.nextToastId++,message:t,type:n,duration:o,action:a,persistent:i,createdAt:Date.now()};return this.toasts.push(s),!i&&o>0&&setTimeout(()=>{this.removeToast(s.id)},o),s.id},showSuccess(e,t={}){return this.showToast({message:e,type:"success",...t})},showError(e,t={}){return this.showToast({message:e,type:"error",duration:7e3,...t})},showWarning(e,t={}){return this.showToast({message:e,type:"warning",...t})},showInfo(e,t={}){return this.showToast({message:e,type:"info",...t})},removeToast(e){const t=this.toasts.findIndex(n=>n.id===e);t!==-1&&this.toasts.splice(t,1)},clearAllToasts(){this.toasts=[]},openModal(e,t={}){this.openModals.includes(e)||(this.openModals.push(e),this.modalData.set(e,t),this.focusTrapActive=!0)},closeModal(e=null){if(e){const t=this.openModals.indexOf(e);t!==-1&&(this.openModals.splice(t,1),this.modalData.delete(e))}else{const t=this.openModals.pop();t&&this.modalData.delete(t)}this.openModals.length===0&&(this.focusTrapActive=!1)},closeAllModals(){this.openModals=[],this.modalData.clear(),this.focusTrapActive=!1},getModalData(e){return this.modalData.get(e)},showGlobalLoading(e="Loading..."){this.isGlobalLoading=!0,this.globalLoadingMessage=e},hideGlobalLoading(){this.isGlobalLoading=!1},setLoading(e,t=!0){t?this.loadingStates.set(e,!0):this.loadingStates.delete(e)},addToHistory(e){this.interactionHistory.push(e),this.interactionHistory.length>this.maxHistoryLength&&this.interactionHistory.shift()},clearHistory(){this.interactionHistory=[]},announce(e,t="polite"){this.screenReaderAnnouncement=e,setTimeout(()=>{this.screenReaderAnnouncement===e&&(this.screenReaderAnnouncement="")},1e3)},toggleKeyboardShortcuts(){this.keyboardShortcutsEnabled=!this.keyboardShortcutsEnabled},toggleDebugMode(){this.debugMode=!this.debugMode},togglePerformanceOverlay(){this.showPerformanceOverlay=!this.showPerformanceOverlay},toggleLegend(){this.legendState==="fullyOpen"?this.legendState="open":this.legendState==="open"?this.legendState="collapsed":this.legendState="open",this._customLegendHeight=null},openLegend(){this.legendState="open",this._customLegendHeight=null},fullyOpenLegend(){this.legendState="fullyOpen",this._customLegendHeight=null},collapseLegend(){this.legendState="collapsed",this._customLegendHeight=null},setLegendHeight(e){this._customLegendHeight=e},handleLegendItemClick(){this.legendState==="fullyOpen"&&(this.legendState="open")},enableSearchMode(){this.searchMode=!0},disableSearchMode(){this.searchMode=!1},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},openHamburgerMenu(){this.hamburgerMenuOpen=!0},closeHamburgerMenu(){this.hamburgerMenuOpen=!1},init(){let e=null;try{e=localStorage.getItem("theme")}catch{}e&&this.setTheme(e),new ResizeObserver(n=>{for(const o of n)this.updateWindowSize(o.contentRect.width,o.contentRect.height)}).observe(document.documentElement),window.matchMedia&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{this.theme==="auto"&&document.documentElement.setAttribute("data-theme",n.matches?"dark":"light")}),window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",n=>{this.reducedMotion=n.matches,document.documentElement.setAttribute("data-reduced-motion",n.matches)}))}}}),Uh=ci("map",{state:()=>({maps:{},activeMapId:null,selectedRegion:null,selectedFamily:null,selectedAffinityBlock:null,selectedLanguage:null,selectedDialect:null,activeLegendTab:"family",selectedResource:null,selectedPeopleGroup:null,selectedPinIds:[],globalFilters:{},searchQuery:"",autoFly:{isActive:!1,speed:1,interval:5e3,currentIndex:0,items:[],timerId:null},guidedTour:{isActive:!1,currentStep:0,steps:[]},showClusters:!1,clusterMode:"region",clusteringMode:"off",clusterPinOpacity:.6,clusterFilterProperty:null,clusterFilterValue:null,flySpeed:"normal",fullscreenMapId:null,preferences:{theme:"light",defaultMapStyle:"streets",enableAnimations:!0,autoSavePreferences:!0}}),getters:{getMapById:e=>t=>e.maps[t],activeMap:e=>e.activeMapId?e.maps[e.activeMapId]:null,hasMap:e=>t=>t in e.maps,allMapIds:e=>Object.keys(e.maps),hasSelection:e=>!!(e.selectedRegion||e.selectedFamily||e.selectedAffinityBlock||e.selectedPeopleGroup),isAutoFlying:e=>e.autoFly.isActive,isGuidedTourActive:e=>e.guidedTour.isActive,isMapFullscreen:e=>t=>e.fullscreenMapId===t},actions:{registerMap(e,t,n={}){let o=1.5;n.zoom!==void 0?o=n.zoom:t&&typeof t.getZoom=="function"&&(o=t.getZoom());let a=[0,0];if(n.center)a=n.center;else if(t&&typeof t.getCenter=="function"){const i=t.getCenter();i&&(a=[i.lng,i.lat])}this.maps[e]={instance:t,config:n,isReady:!1,zoom:o,center:a,registeredAt:Date.now()},this.activeMapId||(this.activeMapId=e)},setMapReady(e){const t=this.maps[e];t&&(t.isReady=!0)},updateMapState(e,t){const n=this.maps[e];n&&Object.assign(n,t)},unregisterMap(e){if(delete this.maps[e],this.activeMapId===e){const t=this.allMapIds;this.activeMapId=t.length>0?t[0]:null}},setActiveMap(e){e in this.maps&&(this.activeMapId=e)},selectRegion(e){this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedRegion=e},selectFamily(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedFamily=e},setActiveLegendTab(e){this.activeLegendTab=e},selectLanguage(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedFamily=null,this.selectedDialect=null,this.selectedLanguage=e},selectDialect(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedDialect=e},selectAffinityBlock(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedPeopleGroup=null,this.selectedAffinityBlock=e},selectPeopleGroup(e){this.selectedPeopleGroup=e},selectResource(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedResource===e?this.selectedResource=null:this.selectedResource=e},clearSelections(){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedAffinityBlock=null,this.selectedResource=null,this.selectedPeopleGroup=null,this.selectedPinIds=[],this.showClusters=!1,this.clusterMode="region"},setSelectedPinIds(e){this.selectedPinIds=e||[]},setFilter(e,t){this.globalFilters[e]=t},removeFilter(e){delete this.globalFilters[e]},clearFilters(){this.globalFilters={},this.searchQuery=""},setSearchQuery(e){this.searchQuery=e},startAutoFly(e,t=1){this.stopAutoFly(),this.autoFly.isActive=!0,this.autoFly.speed=t,this.autoFly.items=e,this.autoFly.currentIndex=0},stopAutoFly(){this.autoFly.timerId&&(clearInterval(this.autoFly.timerId),this.autoFly.timerId=null),this.autoFly.isActive=!1,this.autoFly.currentIndex=0},setAutoFlySpeed(e){this.autoFly.speed=Math.max(.5,Math.min(2,e))},nextAutoFlyItem(){if(!this.autoFly.isActive||this.autoFly.items.length===0)return;this.autoFly.currentIndex=(this.autoFly.currentIndex+1)%this.autoFly.items.length;const e=this.autoFly.items[this.autoFly.currentIndex];e.type==="region"?this.selectRegion(e):e.type==="family"&&this.selectFamily(e)},toggleClusters(e){typeof e=="boolean"?this.showClusters=e:this.showClusters=!this.showClusters},setClusterMode(e){["region","language-family","affinity-block","mst","resource"].includes(e)&&(this.clusterMode=e)},setClusteringMode(e){["off","mapbox","mst","network"].includes(e)&&(this.clusteringMode=e,this.showClusters=e!=="off")},setClusterFilter(e,t){this.clusterFilterProperty=e||null,this.clusterFilterValue=t||null},clearClusterFilter(){this.clusterFilterProperty=null,this.clusterFilterValue=null},setFlySpeed(e){["slow","normal","fast"].includes(e)&&(this.flySpeed=e)},setSelectedFamily(e){this.selectFamily(e)},clearSelectedFamily(){this.selectFamily(null)},setSelectedRegion(e){this.selectRegion(e)},clearSelectedRegion(){this.selectRegion(null)},clearSelectedResource(){this.selectResource(null)},clearSelectedLanguage(){this.selectLanguage(null)},clearSelectedDialect(){this.selectDialect(null)},toggleFullscreen(e){this.fullscreenMapId===e?this.fullscreenMapId=null:this.fullscreenMapId=e},loadPreferences(){try{const e=localStorage.getItem("mapUserPreferences");if(e){const t=JSON.parse(e);this.preferences={...this.preferences,...t}}}catch(e){console.error("[mapStore] Failed to load preferences:",e)}},savePreferences(){try{localStorage.setItem("mapUserPreferences",JSON.stringify(this.preferences))}catch(e){console.error("[mapStore] Failed to save preferences:",e)}},setPreference(e,t){this.preferences[e]=t,this.preferences.autoSavePreferences&&this.savePreferences()}}}),Bh=ci("data",{state:()=>({sources:{},loadingStates:{}}),actions:{async load(e,t){if(!this.sources[e]){this.loadingStates[e]={isLoading:!0,error:null};try{const n=await t();this.sources[e]=qn({features:n,timestamp:Date.now()}),this.loadingStates[e]={isLoading:!1,error:null}}catch(n){console.error(`[dataStore] Failed to load source "${e}":`,n),this.loadingStates[e]={isLoading:!1,error:n}}}},clearSource(e){delete this.sources[e],delete this.loadingStates[e]},cacheSourceData(e,t){this.sources[e]=qn({features:t.normalizedData||[],timestamp:t.timestamp||Date.now()})},hasSourceData(e){return!!this.sources[e]},getSourceData(e){return this.sources[e]?{normalizedData:this.sources[e].features}:null}},getters:{getData:e=>t=>{var n;return((n=e.sources[t])==null?void 0:n.features)??null},isLoading:e=>t=>{var n;return((n=e.loadingStates[t])==null?void 0:n.isLoading)??!1},getError:e=>t=>{var n;return((n=e.loadingStates[t])==null?void 0:n.error)??null}}}),Vh={activeSource:"pray-tools"},Wh=".profile-loader[data-v-d33339b0]{border-radius:var(--map-radius-corners, var(--map-radius, 0px));width:100%;height:100%;min-height:var(--profile-min-h, 100dvh);position:relative}.profile-error[data-v-d33339b0]{padding:1rem;background:#fff3cd;border:1px solid #ffc107;border-radius:4px;font-family:monospace;font-size:13px}",jh=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},qh=["dir"],Kh={key:0,class:"profile-error"},Yh={key:1,class:"profile-error"},Jh=jh({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){var x;const n=e,o=Ge("profileConfig",null),a=de(()=>{var F;if(!n.profileConfig)return null;let w;try{w=JSON.parse(n.profileConfig)}catch{return console.error("[ProfileLoader] Invalid profile-config JSON:",n.profileConfig),null}if(w&&w.assetsBase===void 0){const A=(F=o==null?void 0:o.value)==null?void 0:F.assetsBase;typeof A=="string"&&A&&(w.assetsBase=A)}return w}),i=de(()=>{var w;return((w=a.value)==null?void 0:w.profile)||null}),s=bp(),r=de(()=>{var F;const w=(F=a.value)==null?void 0:F.tk;return typeof w=="string"&&w?w:s.value||""});ot(()=>{var w;return(w=a.value)==null?void 0:w.tk},w=>{typeof w=="string"&&w&&pi(w)},{immediate:!0}),ot(()=>{var w;return(w=a.value)==null?void 0:w.tokenUrl},w=>{var F;w&&!((F=a.value)!=null&&F.tk)&&!s.value&&$p(w)},{immediate:!0});const l=de(()=>{var w;return((w=a.value)==null?void 0:w.dataSource)||Vh.activeSource}),u=de(()=>{var w;return((w=a.value)==null?void 0:w.colorSet)||"default"}),p=de(()=>!1),m=de(()=>{var w;return((w=a.value)==null?void 0:w.pinHint)!==!1}),b=de(()=>{var F,A;const w=(((F=a.value)==null?void 0:F.locale)||((A=a.value)==null?void 0:A.lang)||Ql()||"").split("-")[0].toLowerCase();return _a.includes(w)?w:""}),y=Ge("appI18n",null);Lu(()=>{b.value&&(y&&(y.global.locale.value=b.value),nc(b.value))});const E=de(()=>{var w,F;return b.value||((F=(w=y==null?void 0:y.global)==null?void 0:w.locale)==null?void 0:F.value)||"en"}),S=de(()=>Xl.has(E.value)?"rtl":"ltr"),N=de(()=>{var w;return((w=a.value)==null?void 0:w.instanceId)||"doxa-map-"+Math.random().toString(36).slice(2,9)}),M=Ge("profileModules",null);if(!M)throw new Error('[ProfileLoader] No profileModules provided. Bundle entry must `app.provide("profileModules", import.meta.glob("./*.vue"))`');const C=de(()=>{if(!i.value)return null;const w=`./${i.value}.vue`;return M[w]?Ih(M[w]):(console.error(`[ProfileLoader] Profile not found: "${i.value}". Available:`,Object.keys(M)),null)});$t("mapboxToken",r),$t("dataSource",l),$t("colorSet",u),$t("profileConfig",a),$t("instanceId",N),$t("lang",E);const v=Hh(),$=Uh(),P=Bh();try{const w=typeof localStorage<"u"?localStorage.getItem("theme"):null;w&&((x=v.setTheme)==null||x.call(v,w))}catch{}return $t("uiStore",v),$t("mapStore",$),$t("dataStore",P),(w,F)=>(te(),se("div",{class:"profile-loader",dir:S.value},[a.value?C.value?(te(),kn(Rs(C.value),{key:2})):(te(),se("div",Yh,[H("p",null,[F[1]||(F[1]=Ie("⚠️ Profile ",-1)),H("strong",null,'"'+V(i.value)+'"',1),F[2]||(F[2]=Ie(" not found.",-1))])])):(te(),se("div",Kh,[...F[0]||(F[0]=[H("p",null,[Ie("⚠️ "),H("strong",null,"doxa-map"),Ie(": missing or invalid "),H("code",null,"profile-config"),Ie(" prop.")],-1),H("p",null,[Ie("Example: "),H("code",null,`profile-config='{"profile":"example-map","tk":"pk.eyJ..."}'`)],-1)])])),C.value&&p.value?(te(),kn(Rs(Me(null)),{key:3})):et("",!0),C.value&&m.value?(te(),kn(zh,{key:4})):et("",!0)],8,qh))}},[["styles",[Wh]],["__scopeId","data-v-d33339b0"]]),Zh=Object.assign({"./upg-neighbor.vue":()=>kc(()=>Promise.resolve().then(()=>Om),void 0)}),Xh=Zd(Jh,{configureApp(e){e.use(dp());const t=Th();e.use(t),e.provide("appI18n",t),e.provide("profileModules",Zh)}});typeof customElements<"u"&&!customElements.get("upg-neighbor")&&customElements.define("upg-neighbor",Xh);const Qh="rgba(120, 128, 134, 0.28)",ac="36px",ic=()=>{};function ef(e,t={}){const{enabled:n=!0}=t;if(!n||!e)return ic;const o=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!o.length)return ic;const a=C=>C.classList.contains("map-scroll-edge--left");for(const C of o)C.style.background=`linear-gradient(${a(C)?"to right":"to left"}, ${Qh} ${ac}, transparent ${ac})`,C.style.opacity="0",C.style.transition="opacity 0.16s ease",C.style.userSelect="none",C.style.webkitUserSelect="none";const i=C=>{C.style.opacity="1"},s=C=>{C.style.opacity="0"},r=()=>o.find(C=>!a(C))||null,l=new Set;let u=!1,p=null;const m=()=>{for(const C of o)l.has(C)||s(C)},b=()=>{const C=r();C&&(i(C),p&&clearTimeout(p),p=setTimeout(m,250))},y=()=>b(),E=C=>{if(!(C.touches&&C.touches.length===1))return;const v=C.target;v&&v.classList&&v.classList.contains("map-scroll-edge")||b()},S=()=>{p&&clearTimeout(p),m()};e.addEventListener("wheel",y,{passive:!0}),e.addEventListener("touchmove",E,{passive:!0}),e.addEventListener("touchend",S,{passive:!0}),e.addEventListener("touchcancel",S,{passive:!0});const N=()=>{u||b()};typeof window<"u"&&window.addEventListener("scroll",N,{passive:!0});const M=[];for(const C of o){const v=()=>{l.add(C),i(C)},$=()=>{l.delete(C),s(C)},P=()=>{u=!0,i(C)},x=()=>{u=!1,s(C)};C.addEventListener("mouseenter",v),C.addEventListener("mouseleave",$),C.addEventListener("touchstart",P,{passive:!0}),C.addEventListener("touchend",x,{passive:!0}),M.push(()=>{C.removeEventListener("mouseenter",v),C.removeEventListener("mouseleave",$),C.removeEventListener("touchstart",P),C.removeEventListener("touchend",x)})}return function(){p&&(clearTimeout(p),p=null),e.removeEventListener("wheel",y),e.removeEventListener("touchmove",E),e.removeEventListener("touchend",S),e.removeEventListener("touchcancel",S),typeof window<"u"&&window.removeEventListener("scroll",N);for(const v of M)v();for(const v of o)s(v)}}const tf=Object.fromEntries([{id:"midnight-glow",label:"Midnight Glow",mood:"the prayer-map dark — pins glow like embers",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"night",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["doxa-simple-map","my-upg-100-list"]},{id:"daylight",label:"Daylight",mood:"the same Standard world, lights on",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"day",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","gospel-resources"]},{id:"dawn",label:"Dawn",mood:"soft warm horizon — hopeful, quiet",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dawn",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["doxa-simple-map"]},{id:"dusk",label:"Dusk",mood:"blue hour — calm contrast for bright pins",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dusk",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["my-upg-100-list"]},{id:"paper",label:"Paper",mood:"near-white minimal — data reads like print",mapbox:"mapbox://styles/mapbox/light-v11",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["research-dashboard","cities-internet"]},{id:"ink",label:"Ink",mood:"near-black minimal — maximum pin contrast",mapbox:"mapbox://styles/mapbox/dark-v11",maplibre:"https://tiles.openfreemap.org/styles/dark",bestFor:["my-upg-100-list","cities-internet"]},{id:"streetlife",label:"Street Life",mood:"full street detail — city-scale work",mapbox:"mapbox://styles/mapbox/streets-v12",maplibre:"https://tiles.openfreemap.org/styles/bright",bestFor:["cities-internet","key-cities"]},{id:"terrain",label:"Terrain",mood:"relief + parks — where people actually live",mapbox:"mapbox://styles/mapbox/outdoors-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","country-posters"]},{id:"satellite",label:"Satellite",mood:"imagery — the real ground",mapbox:"mapbox://styles/mapbox/satellite-v9",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["country-posters"]},{id:"hybrid",label:"Hybrid",mood:"imagery + labels — orientation without losing ground truth",mapbox:"mapbox://styles/mapbox/satellite-streets-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["key-cities"]},{id:"wayfinder-day",label:"Wayfinder Day",mood:"high-legibility navigation palette",mapbox:"mapbox://styles/mapbox/navigation-day-v1",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["gospel-resources"]},{id:"wayfinder-night",label:"Wayfinder Night",mood:"dark navigation — dashboards at night",mapbox:"mapbox://styles/mapbox/navigation-night-v1",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["research-dashboard"]},{id:"galaxy",label:"Galaxy",mood:"the day side of Earth floating in space — normal land, blue oceans, black void behind the sphere",mapbox:"mapbox://styles/mapbox/standard",maplibre:"https://tiles.versatiles.org/assets/styles/colorful/style.json",bestFor:["research-dashboard","my-upg-100-list"]}].map(e=>[e.id,e]));function nf(e,t="mapbox"){if(typeof e!="string"||!e)return{style:void 0,lightPreset:void 0,paint:void 0};const n=tf[e];return n?t==="maplibre"?{style:n.maplibre,lightPreset:void 0,paint:n.paint}:{style:n.mapbox,lightPreset:n.lightPreset,paint:n.paint}:/^(mapbox:\/\/|https?:\/\/)/.test(e)?{style:e,lightPreset:void 0,paint:void 0}:{style:void 0,lightPreset:void 0,paint:void 0}}function of(e,t){if(!e||!Array.isArray(t))return[];const n=[];for(const o of t)if(!(!o||!o.layer||!o.prop))try{if(!e.getLayer(o.layer))continue;e.setPaintProperty(o.layer,o.prop,o.value),n.push(o.layer+"."+o.prop)}catch{}return n}const af=["mapbox","maplibre"],sf="auto";function sc(e){return e&&typeof e=="object"&&"value"in e&&!("provider"in e)&&!("profile"in e)?e.value:e}function rc(e){const t=n=>typeof n=="string"&&!!n.trim()&&!/^YOUR_/.test(n.trim());return t(e==null?void 0:e.tk)||/^https?:\/\//i.test(String((e==null?void 0:e.tokenUrl)||""))?!0:typeof window>"u"?!1:t(window.MAP_TOKEN)||t(window.__doxaMapToken)||!!window.__doxaMapTokenPending}function rf(e,{token:t}={}){const n=sc(e);return lc(n)||(rc(n)||rc({tk:t})?"mapbox":"maplibre")}function lc(e){const t=sc(e),n=t==null?void 0:t.provider,o=typeof location<"u"?new URLSearchParams(location.search).get("provider"):void 0,a=typeof window<"u"?window.MAP_PROVIDER:void 0,i=String(n||o||a||sf).toLowerCase().trim();return af.includes(i)?i:""}function cc(e,t){if(!e||!t||typeof e.setProjection!="function")return!1;const n=typeof window<"u"?window.maplibregl:null,o=!!(n&&n.Map&&e instanceof n.Map);try{return e.setProjection(o?{type:t}:t),!0}catch{return!1}}const bo={mapboxGlJs:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js",integrity:"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ"},mapboxGlCss:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css",integrity:"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV"},maplibreGlJs:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js",integrity:"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp"},maplibreGlCss:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css",integrity:"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK"},mapboxGeocoderJs:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js",integrity:"sha384-Lx9WK8XhZk57czwxt6B6nyaDHB5Ayrcrsu4Fw4bCp/Ot/QLOsUZ0xYqLOpOOSXZw"},mapboxGeocoderCss:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css",integrity:"sha384-1KNhwJNCQTr0DCi/5/OnQcFytgycxTahxNZaqKbAtqmY8bUhu26qxXqvDGXXwplS"},maplibreGeocoderJs:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.min.js",integrity:"sha384-RGV5vfoJd7alk8HE+71IyVfu19ciH1FKA15+AuXs6OeBM2npXrmTPFqG23yMiHXi"},maplibreGeocoderCss:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.css",integrity:"sha384-UkDpPApjTpHJHpcJiSNAmbobh30W0/dmt0DoKm4V8CWYRYvQ/Jhd/ijFz0tFdVnH"},d3:{url:"https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js",integrity:"sha384-CjloA8y00+1SDAUkjs099PVfnY2KmDC2BZnws9kh8D/lX1s46w6EPhpXdqMfjK6i"}};function Ri(e,t){const n=Object.values(bo).find(o=>o.url===t);return n&&(e.integrity=n.integrity,e.crossOrigin="anonymous"),e}const uc={mapbox:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js",maplibre:"https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js"};function lf(e){return!!e&&typeof window<"u"&&e===window.maplibregl}function cf(e){if(typeof window>"u")return!1;const t=e?[e]:[window.maplibregl,window.mapboxgl].filter(Boolean);let n=!1;for(const o of t)if(!(!o||!o.setRTLTextPlugin))try{if(lf(o)){if(o.getRTLTextPluginStatus&&o.getRTLTextPluginStatus()!=="unavailable")continue;const a=o.setRTLTextPlugin(uc.maplibre,!0);a&&a.catch&&a.catch(()=>{})}else o.setRTLTextPlugin(uc.mapbox,null,!0);n=!0}catch{}return n}const uf=/\[\s*"get"\s*,\s*"name(?::latin|:nonlatin|:en|_en|_int)?"\s*\]|\{name(?::latin|:nonlatin|:en|_en|_int)?\}/,dc=new WeakMap;function df(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function pc(e,t){if(!e||!t)return 0;const n=String(t).split("-")[0].toLowerCase();try{if(!df(e))return typeof e.setLanguage=="function"&&e.setLanguage(n),0;const o=e.getStyle&&e.getStyle();if(!o||!Array.isArray(o.layers))return 0;let a=dc.get(e);a||(a=new Map,dc.set(e,a));let i=0;for(const s of o.layers){if(s.type!=="symbol"||!s.layout||s.layout["text-field"]==null)continue;const r=s.layout["text-field"],l=JSON.stringify(r);if(l.startsWith('["coalesce",["get","name:')){if(!a.has(s.id))continue}else{if(!uf.test(l))continue;a.set(s.id,r)}const u=["coalesce",["get","name:"+n],["get","name_"+n],["get","name:latin"],["get","name_en"],["get","name"]];e.setLayoutProperty(s.id,"text-field",u),i++}return i}catch{return 0}}const Mn={mapbox:{global:"mapboxgl",js:bo.mapboxGlJs.url,css:bo.mapboxGlCss.url},maplibre:{global:"maplibregl",js:bo.maplibreGlJs.url,css:bo.maplibreGlCss.url}},pf={"Map.Title":"map","Marker.Title":"marker","Popup.Close":"closePopup","NavigationControl.ZoomIn":"zoomIn","NavigationControl.ZoomOut":"zoomOut","NavigationControl.ResetBearing":"resetBearing","AttributionControl.ToggleAttribution":"toggleAttribution","AttributionControl.MapFeedback":"mapFeedback","FullscreenControl.Enter":"enterFullscreen","FullscreenControl.Exit":"exitFullscreen","GeolocateControl.FindMyLocation":"findMyLocation","GeolocateControl.LocationNotAvailable":"locationNotAvailable","GlobeControl.Enable":"enableGlobe","GlobeControl.Disable":"disableGlobe","CooperativeGesturesHandler.WindowsHelpText":"ctrlScroll","CooperativeGesturesHandler.MacHelpText":"cmdScroll","CooperativeGesturesHandler.MobileHelpText":"twoFingers","ScrollZoomBlocker.CtrlMessage":"ctrlScroll","ScrollZoomBlocker.CmdMessage":"cmdScroll","TouchPanBlocker.Message":"twoFingers"};function gc(e,t){const n={};for(const[a,i]of Object.entries(pf)){const s=va(`mapui.${i}`,e);s&&(n[a]=s)}const o=va(t==="maplibre"?"mapui.maplibreLogo":"mapui.mapboxHomepage",e);return o&&(n["LogoControl.Title"]=o),n}function hc(e){if(typeof window>"u")return;const t=window,n=()=>{try{const o=e.getContainer().querySelector(".mapboxgl-ctrl-logo, .maplibregl-ctrl-logo");o&&(o.style.display="none")}catch{}};if(t.__doxaLogoOwner&&t.__doxaLogoOwner!==e){e.once("load",n),n();return}t.__doxaLogoOwner=e,e.once("remove",()=>{t.__doxaLogoOwner===e&&(t.__doxaLogoOwner=null)})}const gf=Mn.mapbox.css,hf="https://tiles.openfreemap.org/styles/liberty",ff="https://tiles.openfreemap.org/styles/fiord";function Ii(e){var n;const t=((n=Mn[e])==null?void 0:n.global)||Mn.mapbox.global;return typeof window<"u"?window[t]:void 0}async function fc(e){const t=Mn[e]||Mn.mapbox;if(Ii(e)||typeof document>"u")return;if(!document.querySelector(`link[href="${t.css}"]`)){const o=document.createElement("link");o.rel="stylesheet",o.href=t.css,Ri(o,t.css),document.head.appendChild(o)}const n=document.querySelector(`script[src="${t.js}"]`);if(n){if(Ii(e))return;await new Promise(o=>{n.addEventListener("load",o,{once:!0}),n.addEventListener("error",o,{once:!0})});return}await new Promise((o,a)=>{const i=document.createElement("script");i.src=t.js,Ri(i,t.js),i.async=!1,i.addEventListener("load",o,{once:!0}),i.addEventListener("error",()=>a(new Error(`[useMapInstance] Failed to load ${e} engine script`)),{once:!0}),document.head.appendChild(i)})}async function mf(e,t){if(!e)return;const n=e.getRootNode();if(!(n instanceof ShadowRoot))return;const o=s=>new Promise(r=>setTimeout(r,s)),a=n.querySelector(`link[href="${t}"]`);if(a){if(a.sheet)return;await Promise.race([new Promise(s=>{a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0})}),o(2e3)]);return}const i=document.createElement("link");i.rel="stylesheet",i.href=t,Ri(i,t),await Promise.race([new Promise(s=>{i.addEventListener("load",s,{once:!0}),i.addEventListener("error",s,{once:!0}),n.prepend(i)}),o(2e3)])}function bf(e,t){return typeof e=="string"&&/^https?:\/\//.test(e)?e:t==="night"||t==="dusk"?ff:hf}const $f=85.0511,Fi=-2,_f=0,vf=-60;function mc(e){return(1-Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2))/Math.PI)/2}function yf(e,t,n,o){if(!e||e<=0||!t||t<=0)return _f;const a=Math.log2(e/512),i=mc(o)-mc($f),s=Math.log2(t/(512*i)),r=Math.max(a,s);return Math.max(Fi,Math.min(r,(n??18)-1))}function bc({containerRef:e,accessToken:t,style:n,config:o=void 0,provider:a=void 0,center:i=[20,10],zoom:s=2,bounds:r=void 0,fitBoundsOptions:l=void 0,minZoom:u=void 0,skipWorldFloor:p=!1,maxZoom:m=18,pitch:b=0,bearing:y=0,renderWorldCopies:E=!0,showEdgeBorders:S=!0,southCutoff:N=vf,maxBounds:M=void 0}){const C=Mo(null),v=fe(!1);let $=null,P=null,x=null,w=null;try{w=Ge("profileConfig",null)}catch{}const F=!a&&!lc(w);a=a||rf(w,{token:t});let A=a==="maplibre";typeof document<"u"&&fc(a).catch(()=>{});let Y=null;try{Y=Ge("lang",null)}catch{}const pe=()=>{const Se=Y&&typeof Y=="object"&&"value"in Y?Y.value:Y;if(typeof Se=="string"&&Se)return Se;const z=w&&typeof w=="object"&&"value"in w?w.value:w;if(z&&(z.locale||z.lang))return String(z.locale||z.lang);try{const j=new URLSearchParams(location.search);return j.get("lang")||j.get("locale")||document.documentElement.lang||"en"}catch{return"en"}};async function Z(){var He;if(F&&!A&&!t&&typeof window<"u"&&window.__doxaMapTokenPending){if(await window.__doxaMapTokenPending,!e.value)return;typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN||(a="maplibre",A=!0)}const Se=nf(n,a),z=Se.style||n;if(!e.value){console.error("containerRef.value is null — call initializeMap() inside onMounted()");return}const j=()=>!e.value;if(await fc(a),j())return;const k=Ii(a);if(!k){console.error(`[useMapInstance] ${A?"maplibregl":"mapboxgl"} is not available. Add the ${A?"MapLibre":"Mapbox"} GL JS script to your page.`);return}if(cf(k),!A){if(!t&&typeof window<"u"&&window.__doxaMapTokenPending&&(await window.__doxaMapTokenPending,j()))return;if(!t&&typeof window<"u"&&typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN&&(t=window.MAP_TOKEN),!t){typeof window<"u"&&!window.__doxaNoTokenWarned&&(window.__doxaNoTokenWarned=!0,console.warn('No Mapbox access token provided. Pass "tk" in profile-config JSON or set window.MAP_TOKEN.'));return}if(!t.startsWith("pk.")){console.error('Mapbox token looks invalid (expected "pk." prefix). Got:',t.slice(0,10)+"...");return}}if(await mf(e.value,A?Mn.maplibre.css:gf),j()||(await new Promise(ce=>requestAnimationFrame(ce)),j()))return;const R=e.value,J=R.clientWidth,oe=R.clientHeight;if(J===0||oe===0){console.error(`[useMapInstance] Container has ZERO dimensions (${J}×${oe}). Map will be invisible. Check that parent elements have CSS sizing.`);let ce=R.parentElement,re=0;for(;ce&&re<5;)ce=ce.parentElement,re++}const Q=t;A||(k.accessToken=Q);const le=()=>typeof window<"u"&&window.innerWidth>=1024,_e=(ce,re)=>{if(p)return typeof u=="number"?u:Fi;if(!le())return Fi;const ze=yf(ce,re,m,N);return typeof u=="number"?Math.max(u,ze):ze},ve=_e(R.clientWidth,R.clientHeight),Fe=Se.lightPreset||(()=>{var ce;try{const re=typeof o=="function"?o():o;return(ce=re==null?void 0:re.basemap)==null?void 0:ce.lightPreset}catch{return}})();if(A){C.value=new k.Map({container:e.value,style:bf(z,Fe),locale:gc(pe(),"maplibre"),center:i,zoom:s,minZoom:ve,maxZoom:m,pitch:b,bearing:y,dragRotate:!1,renderWorldCopies:E,...r?{bounds:r,...l?{fitBoundsOptions:l}:{}}:{},...M?{maxBounds:M}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),hc(C.value);try{e.value.__doxaMap=C.value}catch{}}else{const ce=typeof o=="function"?o():o;C.value=new k.Map({accessToken:Q,container:e.value,style:z,locale:gc(pe(),"mapbox"),...ce?{config:ce}:{},center:i,zoom:s,minZoom:ve,maxZoom:m,pitch:b,bearing:y,dragRotate:!1,touchPitch:!1,renderWorldCopies:E,...r?{bounds:r,...l?{fitBoundsOptions:l}:{}}:{},...M?{maxBounds:M}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),hc(C.value);try{e.value.__doxaMap=C.value}catch{}}try{let ce=!1;C.value.on("error",re=>{var f,h;const ze=((f=re==null?void 0:re.error)==null?void 0:f.status)??(re==null?void 0:re.status),c=String(((h=re==null?void 0:re.error)==null?void 0:h.url)||(re==null?void 0:re.sourceId)||"");ze!==401&&ze!==403||ce||(ce=!0,console.error(`[doxa-maps] Mapbox returned ${ze} for a TILE request while the style loaded fine. That is a URL RESTRICTION on the access token, not a bad token and not a bug in this map. Add this page's origin (${typeof location<"u"?location.origin:"this origin"}) to the token's URL restrictions in the Mapbox account. The map will keep its data layer and stay blank underneath until then.`+(c?` First failing request: ${c.slice(0,120)}`:"")))})}catch{}try{C.value.touchZoomRotate.disableRotation()}catch{}x=ef(((He=e.value)==null?void 0:He.parentElement)||null,{enabled:S});let Ae=ve,Pe=null;$=()=>{const ce=C.value;if(!ce)return;const re=_e(R.clientWidth,R.clientHeight);re!==Ae&&(Ae=re,ce.setMinZoom(re)),ce.getZoom(){Pe=null;const ze=C.value;if(!ze)return;const c=_e(R.clientWidth,R.clientHeight);if(ze.getZoom(){Pe&&(clearTimeout(Pe),Pe=null)},C.value.on("resize",$),typeof window<"u"&&(window.addEventListener("resize",$),window.addEventListener("orientationchange",$)),C.value.on("style.load",()=>{if(C.value&&pc(C.value,pe()),Se.paint&&C.value){const ce=of(C.value,Se.paint);console.info("[useMapInstance] style paint applied ("+a+"):",ce.join(", ")||"NONE MATCHED")}requestAnimationFrame(()=>{var ce;(ce=C.value)==null||ce.resize(),C.value&&C.value.setMinZoom(_e(R.clientWidth,R.clientHeight)),v.value=!0})})}function ge(){if(C.value){if($&&(C.value.off("resize",$),typeof window<"u"&&(window.removeEventListener("resize",$),window.removeEventListener("orientationchange",$)),$=null),P){try{P()}catch{}P=null}x&&(x(),x=null),C.value.remove(),C.value=null,v.value=!1}}if(Y&&typeof Y=="object"&&"value"in Y)try{ot(Y,()=>{C.value&&v.value&&pc(C.value,pe())})}catch{}return{map:C,isMapReady:v,initializeMap:Z,destroy:ge}}function $c(e,t){e&&(typeof e.isStyleLoaded=="function"&&e.isStyleLoaded()?t():e.once("style.load",t))}function _c(){return Ai("neighbor")}const Sf=Ca&&Ca.tagName.toUpperCase()==="SCRIPT"&&Ca.src||new URL("upg-neighbor.js",document.baseURI).href,$o=e=>String(e||"").trim().replace(/\/+$/,"");function wf(){try{const t=String(Sf||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Cf(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const o=$o(t);if(/^https?:\/\//i.test(o)||o.startsWith("/"))return o}const n=$o((e==null?void 0:e.treeBase)||"")||$o(wf()||"");if(n)try{const o=typeof document<"u"?document.baseURI:void 0;return $o(new URL(n+"/assets",o).href)}catch{return $o(n+"/assets")}return"./assets"}const qt={1:"#0f7a3d",2:"#34a853",3:"#9aa7b4"},Dn="#e11d48",wa="#f59e0b",st="#002e6e";let _o=null;function vc(e){if(_o)return _o;const t=(e==null?void 0:e.value)||e||{},n=t.nearDataUrl||`${Cf(t)}/tables/near-neighbors.json`;return _o=fetch(n).then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.json()}).then(Pf).catch(o=>{throw _o=null,o}),_o}function Pf(e){const{cols:t,dict:n,rows:o,links:a,bridges:i,meta:s}=e,r=o.map((b,y)=>{const E={i:y};return t.forEach((S,N)=>{E[S]=n[S]?n[S][b[N]]:b[N]}),E.reached=!!E.reached,E}),l=b=>(a[b.i]||[]).map(([y,E,S,N])=>({g:r[y],e:E,km:S,same:!!N})),u=b=>{const y=a[b.i];return y&&y.length?Math.min(...y.map(E=>E[1])):0},p=r.filter(b=>!b.reached);for(const b of p)b.p=u(b),b.ringNeighbor=b.ringNb>=0?r[b.ringNb]:null;const m=i.map(b=>{var S,N;const y=b.reached.map(M=>r[M]),E=b.unreached.map(M=>r[M]);return{lang:b.lang,langName:((S=y[0])==null?void 0:S.langName)||((N=E[0])==null?void 0:N.langName)||b.lang,believers:b.believers,unreachedPop:b.unreachedPop,res:{bible:!!b.res[0],film:!!b.res[1],audio:!!b.res[2],radio:!!b.res[3]},reached:y,unreached:E,reachedCountries:[...new Set(y.map(M=>M.country))].sort(),unreachedCountries:[...new Set(E.map(M=>M.country))].sort()}});return{meta:s,groups:r,unreached:p,neighborsOf:l,bridges:m}}const an=e=>String(e||"").normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase();function xt(e){return e=Number(e)||0,e>=1e9?(e/1e9).toFixed(1)+"B":e>=1e6?(e/1e6).toFixed(e>=1e7?0:1)+"M":e>=1e3?(e/1e3).toFixed(e>=1e4?0:1)+"K":String(Math.round(e))}function Oi(e,t,n){const o=r=>{const l=String(r??"");return/[",\n]/.test(l)?'"'+l.replace(/"/g,'""')+'"':l},a=[t,...n].map(r=>r.map(o).join(",")).join(` `)+` `,i=URL.createObjectURL(new Blob(["\uFEFF"+a],{type:"text/csv;charset=utf-8"})),s=document.createElement("a");s.href=i,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}const Lf={class:"mb-root"},Tf={key:0,class:"mb-maperr",role:"status"},kf=["aria-label"],Ef={class:"mb-panel"},Nf={class:"mb-head"},xf=["placeholder","aria-label"],Af=["aria-label"],Rf=["title","onClick"],If={class:"mb-body"},Ff={key:0,class:"mb-note",role:"alert"},Of={key:1,class:"mb-note"},Mf={key:0,class:"mb-note",style:{"padding-bottom":"6px"}},Df=["onClick"],zf={class:"mb-row-main"},Gf={class:"mb-row-name"},Hf={class:"mb-row-sub",style:{display:"block"}},Uf={key:1,class:"mb-note"},Bf={key:1,class:"mb-body"},Vf={class:"mb-brief"},Wf={class:"mb-title"},jf={class:"mb-sub"},qf={style:{"margin-top":"4px"}},Kf=["aria-label"],Yf={class:"mb-actions"},Jf=["data-nb","onClick","onKeydown"],Zf={key:0,class:"mb-same"},Xf={class:"muted"},Qf={key:0,class:"mb-note"},em={class:"mb-note",style:{padding:"12px 0 0"}},yc="nb-u",Mi="nb-n",Sc="nb-l",wc="nb-s",tm={__name:"mobilize",setup(e){const t=_c(),n={1:"neighbor.e.short1",2:"neighbor.e.short2",3:"neighbor.e.short3"},o={1:"neighbor.e.title1",2:"neighbor.e.title2",3:"neighbor.e.title3"},a={1:"neighbor.e.long1",2:"neighbor.e.long2",3:"neighbor.e.long3"},i={0:"neighbor.p.title0",1:"neighbor.p.title1",2:"neighbor.p.title2",3:"neighbor.p.title3"},s={0:"neighbor.p.long0",1:"neighbor.p.long1",2:"neighbor.p.long2",3:"neighbor.p.long3"},r=Ge("profileConfig",fe({})),l=Ge("mapboxToken",fe("")),u=Ge("nbState"),p=de(()=>(r==null?void 0:r.value)||{}),m=fe(null),b=fe(null),y=fe(""),E=fe(""),S=fe(""),N=fe(0),{map:M,initializeMap:C,destroy:v}=bc({containerRef:m,accessToken:(l==null?void 0:l.value)||p.value.tk||"",style:p.value.style??"mapbox://styles/mapbox/light-v11",center:p.value.center??[45,20],zoom:p.value.zoom??1.6,minZoom:1,maxZoom:11}),$=de(()=>{var c;return((c=b.value)==null?void 0:c.groups.find(f=>f.pgid===u.pgid&&!f.reached))||null}),P=de(()=>$.value?b.value.neighborsOf($.value):[]),x=de(()=>[1,2,3].map(c=>({e:c,list:P.value.filter(f=>f.e===c)})).filter(c=>c.list.length)),w=de(()=>P.value.reduce((c,f)=>c+f.g.believers,0));function F(c){c&&!c.reached&&(u.pgid=c.pgid,S.value="")}const A=fe(null),Y=fe(null);function pe(c,f){Y.value=f?{x:c.point.x,y:c.point.y,text:f}:null}ot(()=>u.pgid,()=>{A.value=null});function Z(c,f=!0){var O,I,B,U,d;A.value=c.g.pgid,ge();const h=M.value;if(f&&h)try{h.stop(),h.easeTo({center:[c.g.lng,c.g.lat],zoom:Math.max(h.getZoom(),5),padding:ze(),duration:700})}catch{}const _=(U=(B=(I=(O=m.value)==null?void 0:O.getRootNode)==null?void 0:I.call(O))==null?void 0:B.querySelector)==null?void 0:U.call(B,`[data-nb="${c.g.pgid}"]`);(d=_==null?void 0:_.scrollIntoView)==null||d.call(_,{block:"nearest",behavior:"smooth"})}function ge(){var f;const c=M.value;(f=c==null?void 0:c.getLayer)!=null&&f.call(c,"nb-a")&&c.setFilter("nb-a",["==",["get","id"],A.value||""])}function Se(){u.pgid=null}const z=de(()=>b.value?b.value.unreached.filter(c=>!N.value||c.p===N.value):[]),j=de(()=>{const c=an(S.value.trim());return[...c?z.value.filter(h=>an(h.name).includes(c)||an(h.country).includes(c)||an(h.langName).includes(c)):z.value].sort((h,_)=>_.pop-h.pop).slice(0,40)}),k=de(()=>{var f;const c={1:0,2:0,3:0};for(const h of((f=b.value)==null?void 0:f.unreached)||[])c[h.p]!=null&&c[h.p]++;return c});function R(){const c=$.value;if(!c)return;const f=["unreached_group","unreached_country","unreached_language","unreached_population","p_level","e_level","same_people","neighbor_group","neighbor_country","campaign_language","campaign_language_code","est_believers","distance_km","lat","lng","bible","jesus_film","audio","radio","pgid"],h=P.value.map(_=>[c.name,c.country,c.langName,c.pop,"P-"+c.p,"E-"+_.e,_.same?"yes":"",_.g.name,_.g.country,_.g.langName,_.g.lang,_.g.believers,_.km,_.g.lat,_.g.lng,_.g.bible?"yes":"no",_.g.film?"yes":"no",_.g.audio?"yes":"no",_.g.radio?"yes":"no",_.g.pgid]);Oi(`near-neighbors-${c.pgid}.csv`,f,h)}function J(){$.value&&(u.lang=$.value.lang,u.view="campaigns")}const oe=de(()=>{var c;return!!$.value&&!!((c=b.value)!=null&&c.bridges.some(f=>f.lang===$.value.lang))}),Q=c=>({type:"FeatureCollection",features:c}),le=(c,f)=>({type:"Feature",geometry:{type:"Point",coordinates:[c.lng,c.lat]},properties:f});function _e(){return Q(z.value.map(c=>le(c,{id:c.pgid,pop:c.pop})))}function ve(){const c=$.value;if(!c)return{n:Q([]),l:Q([]),s:Q([])};const f=[],h=[];for(const _ of P.value)f.push(le(_.g,{id:_.g.pgid,e:_.e,name:_.g.name,color:qt[_.e]})),h.push({type:"Feature",geometry:{type:"LineString",coordinates:[[_.g.lng,_.g.lat],[c.lng,c.lat]]},properties:{e:_.e,color:qt[_.e]}});return{n:Q(f),l:Q(h),s:Q([le(c,{name:c.name})])}}function Fe(c,f,h){const _=c.getSource(f);_?_.setData(h):c.addSource(f,{type:"geojson",data:h})}function Ae(c){Fe(c,yc,_e());const f=ve();Fe(c,Sc,f.l),Fe(c,Mi,f.n),Fe(c,wc,f.s),c.getLayer("nb-u")||c.addLayer({id:"nb-u",type:"circle",source:yc,paint:{"circle-color":Dn,"circle-radius":["interpolate",["linear"],["ln",["max",["get","pop"],1]],6,1.6,12,3.2,16,6.5,19,10],"circle-opacity":.55,"circle-stroke-width":.4,"circle-stroke-color":"#fff"}}),c.getLayer("nb-l")||c.addLayer({id:"nb-l",type:"line",source:Sc,layout:{"line-cap":"round"},paint:{"line-color":["get","color"],"line-width":["match",["get","e"],1,2.2,2,1.6,1.1],"line-opacity":.75}}),c.getLayer("nb-n")||c.addLayer({id:"nb-n",type:"circle",source:Mi,paint:{"circle-color":["get","color"],"circle-radius":["match",["get","e"],1,7,2,6,5],"circle-stroke-width":1.5,"circle-stroke-color":"#fff"}}),c.getLayer("nb-a")||c.addLayer({id:"nb-a",type:"circle",source:Mi,filter:["==",["get","id"],""],paint:{"circle-color":"rgba(0,0,0,0)","circle-radius":11,"circle-stroke-width":3,"circle-stroke-color":wa}}),c.getLayer("nb-s")||c.addLayer({id:"nb-s",type:"circle",source:wc,paint:{"circle-color":Dn,"circle-radius":10,"circle-stroke-width":3,"circle-stroke-color":wa}}),Pe(c),ge()}function Pe(c){c.getLayer("nb-u")&&c.setPaintProperty("nb-u","circle-opacity",$.value?.18:.55)}let He=!1;function ce(){var f;const c=M.value;if(c){if(!((f=c.isStyleLoaded)!=null&&f.call(c))){He||(He=!0,c.once("idle",()=>{He=!1,ce()}));return}Ae(c)}}function re(){const c=M.value,f=$.value;if(!c||!f)return;const h=[[f.lng,f.lat],...P.value.map(I=>[I.g.lng,I.g.lat])],_=h.map(I=>I[0]),O=h.map(I=>I[1]);try{c.stop(),h.length<2?c.easeTo({center:[f.lng,f.lat],zoom:4,duration:800}):c.fitBounds([[Math.min(..._),Math.min(...O)],[Math.max(..._),Math.max(...O)]],{padding:ze(),maxZoom:6,duration:900})}catch{}}function ze(){const c=m.value,f=(c==null?void 0:c.clientWidth)||0,h=(c==null?void 0:c.clientHeight)||0;return f>760?{top:60,bottom:60,left:400,right:60}:{top:40,bottom:Math.round(h*.55)+20,left:30,right:30}}return ot(()=>[u.pgid,N.value,b.value],()=>{ce(),re()}),Tn(async()=>{vc(r).then(f=>{b.value=f,ce(),re()}).catch(f=>{y.value=t("neighbor.mob.loadError",{message:String(f.message||f)})}),await C();const c=M.value;if(!c){E.value=t("messages.mapUnavailable");return}$c(c,()=>{cc(c,"mercator"),ce(),re(),c.on("click","nb-u",_=>{var B,U,d,g;const O=(d=(U=(B=_.features)==null?void 0:B[0])==null?void 0:U.properties)==null?void 0:d.id,I=(g=b.value)==null?void 0:g.unreached.find(T=>T.pgid===O);I&&F(I)}),c.on("click","nb-n",_=>{var B,U,d;const O=(d=(U=(B=_.features)==null?void 0:B[0])==null?void 0:U.properties)==null?void 0:d.id,I=P.value.find(g=>g.g.pgid===O);I&&Z(I,!1)});const f=_=>{var O;return(O=b.value)==null?void 0:O.groups.find(I=>I.pgid===_)},h=_=>_&&`${_.name} · ${_.country} · ${_.langName}`;for(const _ of["nb-u","nb-n"])c.on("mouseenter",_,()=>{c.getCanvas().style.cursor="pointer"}),c.on("mousemove",_,O=>{var I,B,U;return pe(O,h(f((U=(B=(I=O.features)==null?void 0:I[0])==null?void 0:B.properties)==null?void 0:U.id)))}),c.on("mouseleave",_,()=>{c.getCanvas().style.cursor="",Y.value=null})}),c.on("style.load",ce)}),Qn(()=>v()),Sa(` .mb-root { position:absolute; inset:0; display:flex; background:#f6f7f9; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:#1f2937; } diff --git a/public/dx-maps/upg-neighbor/upg-neighbor/bloom-cockpit/index.html b/public/dx-maps/upg-neighbor/upg-neighbor/bloom-cockpit/index.html index 9dc2f9c45..2fb24cc6d 100644 --- a/public/dx-maps/upg-neighbor/upg-neighbor/bloom-cockpit/index.html +++ b/public/dx-maps/upg-neighbor/upg-neighbor/bloom-cockpit/index.html @@ -36,7 +36,7 @@ - + - + - + - + - + - +