diff --git a/public/dx-maps/doxa-maps-spa/doxa-maps-spa.js b/public/dx-maps/doxa-maps-spa/doxa-maps-spa.js index 1e4dc6a36..b8b7d9c15 100644 --- a/public/dx-maps/doxa-maps-spa/doxa-maps-spa.js +++ b/public/dx-maps/doxa-maps-spa/doxa-maps-spa.js @@ -285,4 +285,4 @@ .mi-pointer, .mi .mi-pointer.mi-ctl{ animation:none; } .mi-chev{ transition:none; } } -`,"map-info"),(x,Y)=>(C(),I("div",{ref_key:"rootEl",ref:Be,class:"mi",dir:$()?"rtl":"ltr",lang:n()},[Da(O("button",{ref_key:"btnEl",ref:V,type:"button",class:Ze(["mi-btn",e.placement==="top-left"?"mi-at-left":"mi-at-right"]),"aria-label":ye(s)("mapInfo.open"),title:ye(s)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":String(H.value),onClick:xe},[...Y[1]||(Y[1]=[O("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[O("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),O("path",{d:"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),O("circle",{cx:"12",cy:"17",r:"1.3",fill:"currentColor"})],-1)])],10,gh),[[Ya,v()]]),U.value&&!H.value&&v()?(C(),I("div",{key:0,class:Ze(["mi-pointer",e.placement==="top-left"?"mi-at-left":"mi-at-right"]),"aria-hidden":"true"},[O("span",null,G(ye(s)("mapInfo.pointer")),1),(C(),I("svg",mh,[e.placement==="top-left"?(C(),I("path",fh)):(C(),I("path",hh))]))],2)):se("",!0),U.value&&!H.value&&!v()&&m.value?(C(),I("div",{key:1,class:Ze(["mi-pointer mi-ctl",["mi-ctl-"+m.value.side,{"mi-ctl-strip":m.value.strip}]]),style:Pa(w()),"aria-hidden":"true"},[O("span",{dir:$()?"rtl":"ltr"},G(ye(s)("mapInfo.pointer")),9,bh),(C(),I("svg",$h,[m.value.side==="left"?(C(),I("path",_h)):(C(),I("path",vh))]))],6)):se("",!0),H.value?(C(),I("div",{key:2,class:"mi-scrim",onClick:zo(nt,["self"]),onKeydown:N},[O("div",{ref_key:"dialogEl",ref:k,class:"mi-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"mi-title-"+e.storageKey},[O("div",wh,[O("h2",{id:"mi-title-"+e.storageKey,class:"mi-title"},G(ye(s)("mapInfo.title")),9,kh),O("button",{ref_key:"closeEl",ref:fe,type:"button",class:"mi-close","aria-label":ye(s)("mapInfo.close"),onClick:nt},"ร—",8,xh)]),O("div",Sh,[e.leadKey||e.lead?(C(),I("section",{key:0,class:"mi-bluf","aria-labelledby":"mi-bluf-"+e.storageKey},[O("h3",{id:"mi-bluf-"+e.storageKey,class:"mi-bluf-h"},G(ye(s)("mapInfo.shortDescription")),9,Th),O("p",Ph,G(r(e.leadKey,e.lead)),1)],8,Lh)):se("",!0),(e.takeawayKey||e.takeaway)&&!c()?(C(),I("p",Eh,[O("b",null,G(ye(s)("mapInfo.takeaway")),1),Gt(" "+G(r(e.takeawayKey,e.takeaway)),1)])):se("",!0),c()?(C(),I("details",{key:"st-"+o.value,class:"mi-strategy"},[O("summary",Oh,[O("span",null,G(ye(s)("mapInfo.tabStrategy")),1),Y[2]||(Y[2]=O("span",{class:"mi-chev","aria-hidden":"true"},"โ–พ",-1))]),O("p",Mh,G(l()),1),p().length?(C(),I("ul",Ah,[(C(!0),I(ne,null,Ke(p(),(B,Q)=>(C(),I("li",{key:Q},G(B),1))),128))])):se("",!0)])):se("",!0),(C(!0),I(ne,null,Ke(e.examples,(B,Q)=>Da((C(),I("section",{key:Q,class:"mi-ex"},[O("h3",null,G(de(B)),1),B.kind==="image"?(C(),I(ne,{key:0},[O("img",{class:"mi-img mi-poster",src:X(B.src),alt:B.alt||de(B),decoding:"async",onError:le=>ee[Q]=!0},null,40,Ch),B.full?(C(),I("div",Ih,[O("a",{class:"mi-full",href:X(B.full),target:"_blank",rel:"noopener"},G(ye(s)("mapInfo.openFull")),9,Nh)])):se("",!0)],64)):B.kind==="pages"&&(B.pages||[]).length?(C(),I(ne,{key:1},[ke[Q]?(C(),I(ne,{key:1},[O("div",qh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapsePages")),9,Wh)]),O("div",jh,[(C(!0),I(ne,null,Ke(B.pages,(le,Se)=>(C(),I("button",{key:Se,type:"button",class:"mi-hit mi-open mi-page","aria-label":ye(s)("mapInfo.collapsePages"),onClick:Ut=>b(Q)},[O("img",{class:"mi-img",src:X(le),alt:de(B)+" "+f(Se+1),loading:"lazy",decoding:"async",onError:S},null,40,Hh)],8,Uh))),128))]),O("div",Vh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapsePages")),9,Bh)])],64)):(C(),I(ne,{key:0},[O("button",{type:"button",class:Ze(["mi-hit mi-page",{"mi-stack":B.pages.length>1}]),"aria-label":ye(s)("mapInfo.expandPages",{n:f(B.pages.length)}),"aria-expanded":"false",onClick:le=>b(Q)},[O("img",{class:"mi-img",src:X(B.pages[0]),alt:de(B),decoding:"async",onError:le=>ee[Q]=!0},null,40,Dh)],10,Fh),B.pages.length>1?(C(),I("div",Rh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"false",onClick:le=>b(Q)},G(ye(s)("mapInfo.expandPages",{n:f(B.pages.length)})),9,zh)])):se("",!0)],64))],64)):B.kind==="deck"&&(B.cards||[]).length?(C(),I(ne,{key:2},[ke[Q]?(C(),I(ne,{key:1},[O("div",Jh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapseDeck")),9,Zh)]),O("div",Qh,[(C(!0),I(ne,null,Ke(B.cards,(le,Se)=>(C(),I("img",{key:Se,class:"mi-img",src:X(le),alt:de(B)+" "+f(Se+1),loading:"lazy",decoding:"async",onError:S},null,40,eb))),128))]),O("div",tb,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapseDeck")),9,ab)])],64)):(C(),I(ne,{key:0},[O("button",{type:"button",class:"mi-hit mi-deck","aria-label":ye(s)("mapInfo.expandDeck",{n:f(B.cards.length)}),"aria-expanded":"false",onClick:le=>b(Q)},[(C(!0),I(ne,null,Ke(je(B),(le,Se)=>(C(),I("img",{key:Se,class:"mi-card",src:X(le),alt:"",decoding:"async",onError:Ut=>Se===0?ee[Q]=!0:S(Ut),style:Pa({insetInlineStart:Se*36+"px",transform:"rotate("+(Se-2)*4+"deg)",zIndex:10-Se})},null,44,Kh))),128))],8,Gh),O("div",Xh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"false",onClick:le=>b(Q)},G(ye(s)("mapInfo.expandDeck",{n:f(B.cards.length)})),9,Yh)])],64))],64)):B.kind==="table"&&(B.columns||[]).length?(C(),I(ne,{key:3},[O("div",ob,[O("table",nb,[O("thead",null,[O("tr",null,[(C(!0),I(ne,null,Ke(B.columns,(le,Se)=>(C(),I("th",{key:Se,scope:"col"},G(Ne(le)),1))),128))])]),O("tbody",null,[(C(!0),I(ne,null,Ke(B.rows||[],(le,Se)=>(C(),I("tr",{key:Se},[(C(!0),I(ne,null,Ke(le,(Ut,Ub)=>(C(),I("td",{key:Ub},G(typeof Ut=="number"?f(Ut):Ut),1))),128))]))),128))])])]),B.total&&B.total>(B.rows||[]).length?(C(),I("p",sb,G(ye(s)("mapInfo.moreRows",{n:f(B.total-(B.rows||[]).length)})),1)):se("",!0)],64)):se("",!0)])),[[Ya,!ee[Q]]])),128)),e.noteKey||e.note?(C(),I("p",rb,G(r(e.noteKey,e.note)),1)):se("",!0)]),a()?se("",!0):(C(),I("div",ib,[O("label",null,[O("input",{type:"checkbox",checked:y.value,onChange:Y[0]||(Y[0]=B=>F(B.target.checked))},null,40,lb),O("span",null,G(ye(s)("mapInfo.pointerOff")),1)])]))],8,yh)],32)):se("",!0)],8,dh))}},pb=":host{display:block;position:relative;height:var(--doxa-maps-spa-height, 85vh);min-height:480px}:host{font-size:16px;line-height:normal;font-weight:400;font-style:normal;font-variant:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-align:start;text-indent:0;text-shadow:none;white-space:normal;-webkit-hyphens:manual;hyphens:manual;visibility:visible;cursor:auto}:host([hidden]){display:none}.dms-pane{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;--profile-min-h: 0}.mi.dms-info-raise .mi-btn{z-index:60}.dms-slot{position:relative;min-height:100%}.dms-hint{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;text-align:center;color:#6d766e;font-size:13px;padding:20px}.dms-hint.err{color:#f87171}.dms-hint small{color:var(--dx-muted, #6d766e)}.dms-help-close:focus-visible{outline:2px solid #3f8f5a;outline-offset:2px}.dms-help-scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;align-items:center;justify-content:center;background:#00000059;padding:16px}.dms-help{max-width:420px;width:100%;color:#3b463d;background:#fff;border-radius:12px;padding:18px 20px 14px;box-shadow:0 12px 32px #0003;font-size:14px;line-height:1.5}.dms-help-title{margin:0 0 8px;font-size:16px}.dms-help-what,.dms-help-how{margin:0 0 10px}.dms-help-close{float:right;font:inherit;padding:6px 14px;border-radius:8px;border:1px solid #d1d4cd;background:#f3f3f1;cursor:pointer}.dms-notice{position:fixed;left:50%;bottom:24px;transform:translate(-50%);z-index:40;max-width:320px;text-align:center;font-size:13px;line-height:1.4;color:#3b463d;background:#fff;border:1px solid #d1d4cd;border-radius:10px;padding:10px 16px;box-shadow:0 8px 24px #0000001f}.dms-mobile-notice{position:sticky;top:0;z-index:30;display:flex;align-items:flex-start;gap:8px;padding:10px 12px;font-size:13px;line-height:1.4;color:#3b463d;background:#fff8e6;border-bottom:1px solid #f0d58c}.dms-mobile-notice span{flex:1}.dms-mobile-notice-x{flex:none;min-width:32px;min-height:32px;border:0;border-radius:6px;background:transparent;color:inherit;font-size:18px;line-height:1;cursor:pointer}.dms-mobile-notice-x:focus-visible{outline:2px solid #3b463d;outline-offset:1px}.dms-logo{display:inline-flex;align-items:center}.dms-logo svg{display:block}.dms-locale{position:relative;padding:8px 12px 0;display:flex;justify-content:flex-end}.dms-locale-btn{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:12px;padding:5px 10px;border:1px solid #d1d4cd;border-radius:8px;background:#d1d4cd;color:#3b463d;cursor:pointer}.dms-locale-btn:hover{background:#d1d4cd}.dms-flag{font-size:14px;line-height:1}.dms-locale-name{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dms-dots{color:#6d766e;margin-left:2px}.dms-locale-menu{position:absolute;top:100%;right:12px;margin-top:4px;z-index:30;min-width:180px;list-style:none;padding:6px;border:1px solid #d1d4cd;border-radius:10px;background:#fff;box-shadow:0 12px 32px #00000080;max-height:320px;overflow:auto}.dms-locale-opt{display:flex;align-items:center;gap:8px;width:100%;text-align:left;font:inherit;font-size:13px;padding:7px 9px;border:0;border-radius:7px;background:none;color:#3b463d;cursor:pointer}.dms-locale-opt:hover,.dms-locale-opt.active{background:#d1d4cd;color:#3b463d}.dms-locale-opt.active .dms-locale-name{color:#92b195}.dms-locale-en{margin-left:auto;font-size:11px;color:#6d766e}";function El(){try{const e=new URLSearchParams(location.search),t=(e.get("lang")||e.get("locale")||"").split("-")[0].toLowerCase();if(cs.includes(t))return t}catch{}try{const e=(document.documentElement.lang||"").split("-")[0].toLowerCase();if(cs.includes(e))return e}catch{}return""}const us=[{key:"dashboards",label:"Dashboards",i18n:"sec.dashboards",icon:"chart",tabs:[{id:"dashboard-plus-grid",icon:"chart"},{id:"research-map-plus-grid",icon:"map"},{id:"regions-dashboard",icon:"map"}]},{key:"prayer-mobilization",label:"Prayer Mobilization",i18n:"sec.prayer",icon:"heart",tabs:[{id:"prayer-map",icon:"embed"},{id:"upg-100",icon:"list"},{id:"country-posters",icon:"poster"},{id:"poster-design",icon:"grid"}]},{key:"gospel-research",label:"Gospel Research",i18n:"sec.gospel",icon:"search",tabs:[{id:"cities-internet",icon:"wifi"},{id:"gospel-resources",icon:"book"}]},{key:"experimental",label:"Experimental",i18n:"sec.experimental",icon:"flask",folder:!0,open:!1,tabs:[]}];function ub(e){const t={},a=e&&Array.isArray(e.bundles)?e.bundles:[];for(const o of a)for(const n of Array.isArray(o&&o.profiles)?o.profiles:[])n&&(n.mobile==="desktop-only"||n.mobile==="larger-screens")&&(t[o.bundle+"/"+n.profile]=n.mobile);return t}const db=new Set(["doxa-maps-spa","plugin-studio","template-bundle","people-groups-grid","research-dashboard","big-picture","demo-map","golden-path-check","doxa-research-map","stack-demo","posterverse"]),Ol={"prayer-walk-planner":1,"gospel-internet":2,"upg-neighbor":3,"key-cities":4,"all-people-groups":5,"doxa-vision-card":7},ds=[{id:"dashboard-plus-grid",label:"Big Picture",sub:"dashboard + people-groups grid, stacked",emoji:"๐ŸŒ",bundle:"dashboard-plus-grid",profile:"dashboard-plus-grid"},{id:"research-map",label:"Research Map",sub:"prayer ยท engagement ยท regions",emoji:"๐Ÿ—บ๏ธ",bundle:"doxa-research-map",profile:"research-map"},{id:"research-map-plus-grid",label:"Simple Research",sub:"research map + people-groups grid",emoji:"๐Ÿ—บ๏ธ",bundle:"research-map-plus-grid",profile:"research-map-plus-grid"},{id:"prayer-map",label:"Prayer Progress",sub:"simple world prayer map",emoji:"๐Ÿ™",bundle:"doxa-simple-map",profile:"doxa-simple-map",instance:"prayer"},{id:"cities-internet",label:"Cities with Internet",sub:"connectivity of key cities",emoji:"๐Ÿ“ก",bundle:"cities-internet",profile:"connectivity-map"},{id:"gospel-resources",label:"Gospel Resources",sub:"resources by place",emoji:"๐Ÿ“–",bundle:"gospel-resources",profile:"resources-map"},{id:"regions-dashboard",label:"Regions",sub:"regions and their countries",emoji:"๐ŸŒ",bundle:"regions-dashboard",profile:"regions-mfe"},{id:"upg-100",label:"UPG 100 List Posters",sub:"my unreached list + posters",emoji:"๐Ÿ“‹",bundle:"my-upg-100-list",profile:"upg-100-mfe"},{id:"country-posters",label:"Country Posters",sub:"a poster for every country",emoji:"๐Ÿ—บ๏ธ",bundle:"country-posters",profile:"country-posters-mfe"},{id:"poster-design",label:"Poster Design",sub:"every poster style and size",emoji:"๐ŸŽจ",bundle:"poster-design",profile:"poster-design-mfe"}];mb(us);const Zo=new Set(["doxa-research-map","doxa-simple-map","cities-internet-map","gospel-resources-map","my-upg-100-list-map","doxa-map","doxa-maps-spa","dashboard-plus-grid","research-dashboard-map","demo-map","all-people-groups","country-posters-map","key-cities-map","research-map-plus-grid","gospel-internet-board"]),Qo=new Set(["dashboard-plus-grid","research-map-plus-grid"]);function gb(){const e=Object.fromEntries(ds.map(a=>[a.id,a])),t=new Set;for(const a of us)if(a.key!=="experimental")for(const o of a.tabs||[]){const n=e[o.id];n&&n.bundle&&t.add(n.bundle)}return t}function Ml(e,t){const a=[];for(const o of e)!o||t.has(o.key)||(t.add(o.key),a.push(o));return a}function mb(e){const t=new Map,a=[];for(const o of e)if(o.key!=="experimental")for(const n of o.tabs||[]){if(!n||!n.id)continue;const s=t.get(n.id);if(s===void 0){t.set(n.id,o.key);continue}(s!==o.key||a.indexOf(n.id)===-1)&&a.push(n.id+" ("+s+" + "+o.key+")")}return a.length&&typeof console<"u"&&console.error("[doxa-maps-spa] duplicate tab key(s) across NAV_MODEL sections: "+a.join(", ")+" โ€” VerticalTabsLayout keys its tab-ref map and `active` highlight by id, so a row declared in two sections paints twice and stalls keyboard nav. See the duplicate-key trap in SPEC-the-six-map-product-and-its-tab-order.md."),a}function fb(e){return String(e).split(/[-_]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function hb(e){const t=gb(),a=e&&Array.isArray(e.bundles)?e.bundles:[],o=[];for(const n of a){const s=n&&n.bundle;if(!s||t.has(s)||db.has(s)||n.stage==="production")continue;const r=Array.isArray(n.profiles)?n.profiles:[];if(!r.length||r.every(c=>c.widget||Array.isArray(c.targets)&&!c.targets.includes("web")))continue;const i=r.find(c=>c.isMap)||r.find(c=>c.profile===s)||r[0],l=i.element||Array.isArray(n.elements)&&n.elements[0]||s,p=n.scriptUrl||i.scriptUrl||"";p&&o.push({id:s,label:i.title||fb(s),sub:(i.description||"").trim().replace(/[,;]\s*$/,"")||"experimental bundle",emoji:"๐Ÿงช",tag:l,bundle:s,profile:i.profile||s,scriptUrl:p,heavy:Zo.has(l)||Zo.has(s),scroll:Qo.has(l)||Qo.has(s),discovered:!0})}return o.sort((n,s)=>{const r=Ol[n.id]||999,i=Ol[s.id]||999;return r!==i?r-i:n.label.localeCompare(s.label)}),o}function bb(e,t){const a=e&&Array.isArray(e.bundles)?e.bundles:[],o=Object.fromEntries(a.map(s=>[s.bundle,s])),n={};for(const s of t){const r=o[s.bundle];if(!r)continue;const i=Array.isArray(r.profiles)?r.profiles:[],l=i.find(L=>L.profile===s.profile)||i[0],p=l&&l.element||Array.isArray(r.elements)&&r.elements[0]||s.bundle,c=r.scriptUrl||l&&l.scriptUrl||"";if(!c)continue;const f=l&&Array.isArray(l.instances)?l.instances:[],$=!!(s.instance&&f.some(L=>(L&&(L.id||L.instance))===s.instance));n[s.id]={tag:p,scriptUrl:c,profile:l&&l.profile||s.profile,instance:$?s.instance:"",heavy:Zo.has(p)||Zo.has(s.bundle),scroll:Qo.has(p)||Qo.has(s.bundle)}}return n}const $b=ha({name:"DoxaMapsSpa",inheritAttrs:!1,components:{VerticalTabsLayout:Vf,BackToTopButton:ni,MapInfo:cb,ShellLanguageMenu:rh},props:{treeBase:{type:String,default:""},profileConfig:{type:[String,Object],default:""},heading:{type:String,default:"Deep Research"},tokenUrl:{type:String,default:""},tk:{type:String,default:""},language:{type:String,default:""},apiBaseUrl:{type:String,default:""},provider:{type:String,default:""},tab:{type:String,default:""},homeHref:{type:String,default:""},homeLabel:{type:String,default:""}},emits:["tab-change"],setup(){return{injectedBase:fa("dmsTreeBase","")}},data(){return{paneEls:{},activeIndex:0,showHeader:!1,narrow:!1,_mql:null,_onMedia:null,disabledNotice:"",_noticeTimer:null,helpOpen:!1,mobileNoticeDismissed:{},mobileFlags:null,manifestError:"",manifestBase:"",runtime:{},locale:Bf(),hostLang:El(),sessionPick:"",localeOpen:!1,switcherLangs:yl,tabs:ds.map(e=>({...e,tag:"",scriptUrl:"",heavy:!1,scroll:!1,resolved:!1,mounted:!1,state:"idle",error:""}))}},computed:{largerScreenText(){return Wt("messages.largerScreenNotice",this.uiLocale)||"This experimental map is built for larger screens. It opens here, but parts of it may not fit or work well on a phone."},activePaneEl(){return this.paneEls[this.activeIndex]||null},activeHelp(){const e=this.tabs[this.activeIndex];return e&&e.discovered?Sl(e.id,this.uiLocale):null},cfg(){let e=this.profileConfig;if(typeof e=="string")try{e=e?JSON.parse(e):{}}catch{e={}}return e&&typeof e=="object"?e:{}},base(){const e=(this.treeBase||this.cfg.treeBase||this.injectedBase||"").trim();return e?e.replace(/\/+$/,"")+"/":""},assetsBase(){const e=String(this.cfg.assetsBase||"").trim();return/^https?:\/\//i.test(e)||e.startsWith("/")?e.replace(/\/+$/,""):this.manifestBase?this.manifestBase.replace(/\/+$/,"")+"/assets":""},showInfo(){const e=this.cfg.info;return!(e===!1||e==="false"||e==="off")},headingText(){return String(this.cfg.heading||this.heading||"").trim()||"Deep Research"},showExperimental(){const e=this.cfg.experimental;return!(e===!1||e==="false"||e==="hidden"||e==="off")},navGroups(){const e=Object.fromEntries(this.tabs.map(a=>[a.id,a])),t=new Set;return us.map(a=>{let o=Ml((a.tabs||[]).filter(n=>e[n.id]).map(n=>{const s=e[n.id],r=this.isDesktopOnly(s.id),i=r||this.mobileFlagOf(s.id)==="desktop-only";return{key:s.id,label:this.tabLabel(s),sub:this.tabSub(s),icon:n.icon,badge:i?this.tr("desktopOnly"):n.badge,disabled:r}}),t);return a.key==="experimental"&&!this.showExperimental?{key:a.key,rows:[]}:(a.key==="experimental"&&(o=o.concat(Ml(this.tabs.filter(n=>n.discovered).map(n=>({key:n.id,label:this.tabLabel(n),sub:this.tabSub(n),icon:"flask",badge:this.narrow&&this.mobileFlagOf(n.id)==="larger-screens"?this.tr("mobileNotBuilt"):this.tr("lab")})),t))),{key:a.key,label:a.i18n?this.tr(a.i18n):a.label,icon:a.icon,folder:!!a.folder,open:a.open,rows:o})}).filter(a=>a.rows.length)},showLocaleSwitcher(){return this.showHeader},activeLang(){return ls(this.locale)||{code:this.locale,flag:"๐ŸŒ",nativeName:this.locale}},propLocale(){return(this.language||this.cfg.language||this.cfg.locale||this.cfg.lang||"").trim()},effectiveLocale(){const e=this.showLocaleSwitcher?this.locale:"";return(this.sessionPick||this.propLocale||e||this.hostLang||"en").split("-")[0].toLowerCase()},uiLocale(){return cs.includes(this.effectiveLocale)?this.effectiveLocale:"en"},uiDir(){return this.uiLocale==="ar"?"rtl":"ltr"},layoutLabels(){const e={};for(const t of["toggleList","openViews","expandList","collapseList","collapse","home"])e[t]=this.tr(t);return e},effectiveProvider(){const e=String(this.provider||this.cfg.provider||"").trim().toLowerCase();return e==="maplibre"||e==="mapbox"?e:""},activeKey(){const e=this.tabs[this.activeIndex];return e?e.id:""}},mounted(){this.watchWidth(),this.watchHostLang(),this.select(this.initialIndex()),this.loadManifest(),this._onHostedHelp=e=>this.onHostedHelp(e),this.$el.addEventListener("doxa:help",this._onHostedHelp)},beforeUnmount(){this._langObs&&(this._langObs.disconnect(),this._langObs=null),this._onHostedHelp&&(this.$el.removeEventListener("doxa:help",this._onHostedHelp),this._onHostedHelp=null),!(!this._mql||!this._onMedia)&&(this._mql.removeEventListener?this._mql.removeEventListener("change",this._onMedia):this._mql.removeListener&&this._mql.removeListener(this._onMedia),this._mql=null,this._onMedia=null)},watch:{activeIndex(){this.helpOpen=!1},propLocale(){this.sessionPick=""},effectiveLocale(){const e=(o,n)=>{try{const s=this._slots&&this._slots[o];s&&(s.innerHTML="")}catch{}n.mounted=!1,n.state="idle",n.error=""};this.tabs.forEach((o,n)=>{o.mounted&&n!==this.activeIndex&&e(n,o)});const t=this.activeIndex,a=this.tabs[t];!a||!a.mounted||(e(t,a),this.mountElement(t))},tab(e){e&&this.onSelect(e)}},methods:{openHelp(){this.helpOpen=!0,this.$nextTick(()=>this.$refs.helpClose&&this.$refs.helpClose.focus())},closeHelp(){this.helpOpen=!1;const e=this._helpReturn;this._helpReturn=null,this.$nextTick(()=>e&&e.focus&&e.focus())},infoProps(e){const{pos:t,...a}=this.infoFor(e)||{};return a},infoPos(e){const t=(this.infoFor(e)||{}).pos||{},{narrow:a,...o}=t;return this.narrow&&a?{...o,...a}:o},infoStyle(e){const t=this.infoPos(e),a={};return t.top&&(a["--map-info-top"]=t.top),t.side&&(a["--map-info-side"]=t.side),a},infoFor(e){const t=this.showInfo&&e&&ph[e.id];return t&&(!t.leadKey||Wt(t.leadKey,"en"))?t:null},tabHasHelp(e){return!!(e&&e.discovered&&Sl(e.id,this.uiLocale))},onHostedHelp(e){if(!this.activeHelp)return;e.stopPropagation();const t=e.composedPath?e.composedPath():[];this._helpReturn=t.find(a=>a&&a.tagName==="BUTTON")||null,this.openHelp()},setSlot(e,t){t&&(this._slots=Object.assign(this._slots||{},{[e]:t}))},tr(e,t){return Yo(this.uiLocale,e,t)},t(e,t){return Yo(this.uiLocale,e,t)},tabLabel(e){return!e.discovered||ih("tab."+e.id)?Yo(this.uiLocale,"tab."+e.id):e.label},tabSub(e){return e.discovered?this.uiLocale==="en"?e.sub:this.tr("experimentalSub"):Yo(this.uiLocale,"sub."+e.id)},watchHostLang(){typeof MutationObserver>"u"||typeof document>"u"||(this._langObs=new MutationObserver(()=>{this.hostLang=El()}),this._langObs.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))},watchWidth(){typeof window>"u"||!window.matchMedia||(this._mql=window.matchMedia("(max-width: 760px)"),this.narrow=this._mql.matches,this._onMedia=e=>{const t=this.narrow;this.narrow=!!e.matches,t!==this.narrow&&this.isDesktopOnly(this.activeKey)&&this.select(this.firstVisibleIndex())},this._mql.addEventListener?this._mql.addEventListener("change",this._onMedia):this._mql.addListener&&this._mql.addListener(this._onMedia))},mobileFlagOf(e){const t=this.tabs.find(a=>a.id===e);return t&&this.mobileFlags&&this.mobileFlags[t.bundle+"/"+t.profile]||null},isDesktopOnly(e){return this.narrow&&this.mobileFlagOf(e)==="desktop-only"},showsMobileNotice(e){return this.narrow&&this.mobileFlagOf(e)==="larger-screens"&&!this.mobileNoticeDismissed[e]},dismissMobileNotice(e){this.mobileNoticeDismissed={...this.mobileNoticeDismissed,[e]:!0}},firstVisibleIndex(){let e=-1;for(const t of this.navGroups)for(const a of t.rows){const o=this.tabs.findIndex(n=>n.id===a.key);if(!(o<0)&&(e<0&&(e=o),!a.disabled))return o}return e>=0?e:0},loadManifest(){const e=this.resolve("manifest.json"),t=p=>{try{return new URL(p,location.href).href.replace(/[^/]*$/,"")}catch{return""}},a={url:e,root:t(e)},o={url:this.resolve("doxa-maps-spa/manifest.json"),root:a.root};let n=!1;try{n=new URL(e,location.href).origin!==location.origin}catch{}const s=n?[o,a]:[a,o],r="/public/dx-maps/manifest.json";s.some(p=>p.url===r)||s.push({url:r,root:t(r)});const i=[],l=p=>{if(p>=s.length){this.manifestError="manifest.json not found (tried "+i.join(", ")+")",console.error("[doxa-maps-spa] "+this.manifestError+" โ€” every tab except Big Picture is composed from it, so their panes cannot mount.");return}const{url:c,root:f}=s[p];return i.push(c),fetch(c,{credentials:"same-origin"}).then($=>{if(!$||!$.ok)throw new Error(c+" โ†’ HTTP "+($?$.status:"?"));return $.json()}).then($=>{if(!$)throw new Error(c+" โ†’ empty");this.manifestError="",this.manifestBase=f||"",this.applyManifest($)}).catch(()=>l(p+1))};try{l(0)}catch{}},applyManifest(e){this.runtime=e&&e.runtime&&typeof e.runtime=="object"?e.runtime:{},this.mobileFlags=ub(e),this.applyPageGlobals();const t=bb(e,ds),a=this.activeKey,o=[];for(const l of this.tabs){if(l.discovered){o.push(l);continue}const p=t[l.id];p&&(Object.assign(l,p,{resolved:!0}),o.push(l))}const n=new Set(o.map(l=>l.id));if(this.showExperimental)for(const l of hb(e))n.has(l.id)||o.push({...l,resolved:!0,mounted:!1,state:"idle",error:""});this.tabs=o;const s=this.requestedTab(),r=s?this.tabs.findIndex(l=>l.id===s):-1,i=this.tabs.findIndex(l=>l.id===a);r>=0&&!this.isDesktopOnly(s)&&!this._honouredTab?this.select(r):this.select(i>=0&&!this.isDesktopOnly(a)?i:this.firstVisibleIndex()),this._honouredTab=!0},requestedTab(){let e="";try{e=new URLSearchParams(location.search).get("tab")||""}catch{}return String(this.tab||this.cfg.tab||e||"").trim()},initialIndex(){const e=this.requestedTab(),t=e?this.tabs.findIndex(a=>a.id===e):-1;return t>=0&&(this._honouredTab=!0),t>=0&&!this.isDesktopOnly(e)?t:this.firstVisibleIndex()},setLocale(e){this.locale=e,this.localeOpen=!1,Gf(e)},pickLocale(e){this.setLocale(e),this.sessionPick=e},onSelect(e){if(this.isDesktopOnly(e)){const a=this.tabs.find(o=>o.id===e);this.disabledNotice=(Wt("messages.desktopOnlyNotice",this.uiLocale)||"{label} only supports desktop โ€” open this page on a desktop to use it.").replace("{label}",a?this.tabLabel(a):e),clearTimeout(this._noticeTimer),this._noticeTimer=setTimeout(()=>{this.disabledNotice=""},4e3);return}const t=this.tabs.findIndex(a=>a.id===e);t!==-1&&this.select(t)},resolve(e){const t=String(e);if(/^(https?:)?\/\//.test(t)||t.startsWith("/"))return t;const a=t.replace(/^\.\//,"");return this.manifestBase?this.manifestBase.replace(/\/+$/,"")+"/"+a:this.base?this.base.replace(/\/+$/,"")+"/"+a:"../"+a},select(e){const t=this.activeIndex;if(this.activeIndex=e,t!==e&&t>=0){const o=this.tabs[t];o&&o.heavy&&o.mounted&&this.releaseTab(t,o)}const a=this.tabs[e];a&&((t!==e||!this._announced)&&(this._announced=!0,this.$emit("tab-change",{id:a.id,label:a.label})),a.scriptUrl&&(this.narrow&&this.mobileFlags===null||this.isDesktopOnly(a.id)||a.mounted||this.$nextTick(()=>{this.activeIndex===e&&this.mountElement(e)})))},releaseTab(e,t){try{const a=this._slots&&this._slots[e];a&&(a.innerHTML="")}catch{}this._slots&&delete this._slots[e],t.mounted=!1,t.state="idle",t.error=""},childConfig(e){const t={profile:e.profile||e.id,instanceId:e.instance||"dms-"+e.id};this.effectiveLocale&&(t.locale=this.effectiveLocale);const a=this.tk||this.cfg.tk||this.runtime.token;return a&&(t.tk=a),(this.tokenUrl||this.cfg.tokenUrl)&&(t.tokenUrl=this.tokenUrl||this.cfg.tokenUrl),this.effectiveProvider&&(t.provider=this.effectiveProvider),this.base&&(t.treeBase=this.base),this.assetsBase&&(t.assetsBase=this.assetsBase),t.urlSync=!1,t.mapTitle=this.tabLabel(e),t},applyPageGlobals(){if(typeof window>"u")return;const e=(this.apiBaseUrl||this.cfg.apiBaseUrl||this.runtime.apiBaseUrl||"").trim();e&&!window.MAP_APP_API_URL&&(window.MAP_APP_API_URL=e.replace(/\/+$/,""));const t=this.tk||this.cfg.tk||this.runtime.token;t&&!window.MAP_TOKEN&&(window.MAP_TOKEN=t),this.effectiveProvider&&!window.MAP_PROVIDER&&(window.MAP_PROVIDER=this.effectiveProvider)},mountElement(e){const t=this.tabs[e];t.mounted=!0,t.state="loading";const a=this.resolve(t.scriptUrl);vl(a).then(()=>zm(t.tag)).then(()=>{try{if(t.heavy&&this.activeIndex!==e){t.mounted=!1,t.state="idle";return}const o=this._slots&&this._slots[e];if(!o){t.state="error",t.error="no slot";return}o.innerHTML="";const n=document.createElement(t.tag);n.setAttribute("profile-config",JSON.stringify(this.childConfig(t))),this.base&&n.setAttribute("tree-base",this.base.replace(/\/+$/,"")),n.style.cssText=t.scroll?"display:block;position:static;width:100%;height:auto;":"display:block;position:absolute;inset:0;width:100%;height:100%;min-height:0;",o.appendChild(n),t.state="ready"}catch(o){t.state="error",t.error="mount failed: "+(o&&o.message||String(o))}}).catch(o=>{t.state="error",t.error=o&&o.message||String(o)})}}}),_b={class:"dms-locale"},vb=["aria-expanded"],yb={class:"dms-flag"},wb={class:"dms-locale-name"},kb={key:0,class:"dms-locale-menu",role:"listbox"},xb=["aria-selected"],Sb=["onClick"],Lb={class:"dms-flag"},Tb={class:"dms-locale-name"},Pb={class:"dms-locale-en"},Eb=["hidden","data-doxa-help"],Ob={key:0,class:"dms-mobile-notice",role:"status"},Mb=["aria-label","onClick"],Ab={key:2,class:"dms-hint"},Cb={key:3,class:"dms-hint err"},Ib={key:4,class:"dms-hint err"},Nb={key:0,class:"dms-notice",role:"status"},Fb={id:"dms-help-title",class:"dms-help-title"},Db={class:"dms-help-what"},Rb={class:"dms-help-how"};function zb(e,t,a,o,n,s){const r=za("ShellLanguageMenu"),i=za("MapInfo"),l=za("BackToTopButton"),p=za("VerticalTabsLayout");return C(),va(p,{dir:e.uiDir,lang:e.uiLocale,labels:e.layoutLabels,"home-href":e.homeHref||e.cfg.homeHref||"","home-label":e.homeLabel||e.cfg.homeLabel||"",title:e.headingText,"nav-label":e.t("navLabel"),header:e.showHeader,groups:e.navGroups,active:e.activeKey,"onUpdate:active":e.onSelect},Wc({brand:aa(()=>[t[5]||(t[5]=O("span",{class:"dms-logo","aria-hidden":"true"},[O("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#92b195","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[O("circle",{cx:"12",cy:"12",r:"9"}),O("polygon",{points:"12 6 14 12 12 18 10 12",fill:"#92b195",stroke:"none"}),O("polygon",{points:"6 12 12 10 18 12 12 14",fill:"#92b195",opacity:"0.55",stroke:"none"})])],-1))]),meta:aa(()=>[Gt(G(e.t("meta",{n:e.tabs.length})),1)]),"phone-end":aa(()=>[Ce(r,{current:e.uiLocale,onSwitch:e.pickLocale},null,8,["current","onSwitch"])]),"rail-end":aa(({collapsed:c})=>[Ce(r,{current:e.uiLocale,collapsed:c,onSwitch:e.pickLocale},null,8,["current","collapsed","onSwitch"])]),default:aa(()=>[(C(!0),I(ne,null,Ke(e.tabs,(c,f)=>Da((C(),I("section",{key:c.id,class:"dms-pane",ref_for:!0,ref:$=>{$?e.paneEls[f]=$:delete e.paneEls[f]},hidden:f!==e.activeIndex,"data-doxa-help":e.tabHasHelp(c)?"":null,"data-doxa-gallery":""},[!c.heavy||f===e.activeIndex?(C(),I(ne,{key:0},[e.showsMobileNotice(c.id)?(C(),I("div",Ob,[O("span",null,G(e.largerScreenText),1),O("button",{type:"button",class:"dms-mobile-notice-x","aria-label":e.tr("dismiss"),onClick:$=>e.dismissMobileNotice(c.id)},"ร—",8,Mb)])):se("",!0),O("div",{class:"dms-slot",ref_for:!0,ref:$=>e.setSlot(f,$)},null,512),e.infoFor(c)?(C(),va(i,Nr({key:"info-"+c.id},{ref_for:!0},e.infoProps(c),{style:e.infoStyle(c),placement:e.infoPos(c).placement||"top-right",class:{"dms-info-raise":e.infoPos(c).raise},"assets-base":e.assetsBase,locale:e.effectiveLocale}),null,16,["style","placement","class","assets-base","locale"])):se("",!0),c.state==="loading"?(C(),I("div",Ab,G(e.tr("loading",{label:e.tabLabel(c)})),1)):c.state==="error"?(C(),I("div",Cb,[Gt(G(e.tr("loadFailed",{label:e.tabLabel(c)})),1),t[7]||(t[7]=O("br",null,null,-1)),O("small",null,G(c.error),1)])):c.state==="idle"&&!c.scriptUrl&&e.manifestError?(C(),I("div",Ib,[Gt(G(e.tr("loadFailed",{label:e.tabLabel(c)})),1),t[8]||(t[8]=O("br",null,null,-1)),O("small",null,G(e.manifestError),1),t[9]||(t[9]=O("br",null,null,-1)),O("small",null,G(e.tr("manifestHint")),1)])):se("",!0)],64)):se("",!0)],8,Eb)),[[Ya,f===e.activeIndex]])),128)),e.disabledNotice?(C(),I("div",Nb,G(e.disabledNotice),1)):se("",!0),e.helpOpen&&e.activeHelp?(C(),I("div",{key:1,class:"dms-help-scrim",onClick:t[3]||(t[3]=zo((...c)=>e.closeHelp&&e.closeHelp(...c),["self"])),onKeydown:t[4]||(t[4]=ei(zo((...c)=>e.closeHelp&&e.closeHelp(...c),["stop","prevent"]),["esc"]))},[O("div",{class:"dms-help",role:"dialog","aria-modal":"true","aria-labelledby":"dms-help-title",onKeydown:t[2]||(t[2]=ei(zo(c=>e.$refs.helpClose&&e.$refs.helpClose.focus(),["prevent"]),["tab"]))},[O("h2",Fb,G(e.tabLabel(e.tabs[e.activeIndex])),1),O("p",Db,[O("strong",null,G(e.activeHelp.what),1)]),O("p",Rb,G(e.activeHelp.how),1),O("button",{ref:"helpClose",type:"button",class:"dms-help-close",onClick:t[1]||(t[1]=(...c)=>e.closeHelp&&e.closeHelp(...c))},G(e.tr("close")),513)],32)],32)):se("",!0),Ce(l,{target:e.activePaneEl,labels:{backToTop:e.tr("backToTop")}},null,8,["target","labels"])]),_:2},[e.showLocaleSwitcher?{name:"toolbar",fn:aa(()=>[O("div",_b,[O("button",{type:"button",class:"dms-locale-btn","aria-expanded":String(e.localeOpen),"aria-label":"Change language",onClick:t[0]||(t[0]=c=>e.localeOpen=!e.localeOpen)},[O("span",yb,G(e.activeLang.flag),1),O("span",wb,G(e.activeLang.nativeName),1),t[6]||(t[6]=O("span",{class:"dms-dots","aria-hidden":"true"},"โ‹ฎ",-1))],8,vb),e.localeOpen?(C(),I("ul",kb,[(C(!0),I(ne,null,Ke(e.switcherLangs,c=>(C(),I("li",{key:c.code,role:"option","aria-selected":String(c.code===e.locale)},[O("button",{type:"button",class:Ze(["dms-locale-opt",{active:c.code===e.locale}]),onClick:f=>e.setLocale(c.code)},[O("span",Lb,G(c.flag),1),O("span",Tb,G(c.nativeName),1),O("span",Pb,G(c.name),1)],10,Sb)],8,xb))),128))])):se("",!0)])]),key:"0"}:void 0]),1032,["dir","lang","labels","home-href","home-label","title","nav-label","header","groups","active","onUpdate:active"])}const qb=qo($b,[["render",zb],["styles",[pb]]]),Wb=qm(),jb=Xp(qb,{configureApp(e){e.provide("dmsTreeBase",Wb)}});typeof customElements<"u"&&!customElements.get("doxa-maps-spa")&&customElements.define("doxa-maps-spa",jb)})(); +`,"map-info"),(x,Y)=>(C(),I("div",{ref_key:"rootEl",ref:Be,class:"mi",dir:$()?"rtl":"ltr",lang:n()},[Da(O("button",{ref_key:"btnEl",ref:V,type:"button",class:Ze(["mi-btn",e.placement==="top-left"?"mi-at-left":"mi-at-right"]),"aria-label":ye(s)("mapInfo.open"),title:ye(s)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":String(H.value),onClick:xe},[...Y[1]||(Y[1]=[O("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[O("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),O("path",{d:"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),O("circle",{cx:"12",cy:"17",r:"1.3",fill:"currentColor"})],-1)])],10,gh),[[Ya,v()]]),U.value&&!H.value&&v()?(C(),I("div",{key:0,class:Ze(["mi-pointer",e.placement==="top-left"?"mi-at-left":"mi-at-right"]),"aria-hidden":"true"},[O("span",null,G(ye(s)("mapInfo.pointer")),1),(C(),I("svg",mh,[e.placement==="top-left"?(C(),I("path",fh)):(C(),I("path",hh))]))],2)):se("",!0),U.value&&!H.value&&!v()&&m.value?(C(),I("div",{key:1,class:Ze(["mi-pointer mi-ctl",["mi-ctl-"+m.value.side,{"mi-ctl-strip":m.value.strip}]]),style:Pa(w()),"aria-hidden":"true"},[O("span",{dir:$()?"rtl":"ltr"},G(ye(s)("mapInfo.pointer")),9,bh),(C(),I("svg",$h,[m.value.side==="left"?(C(),I("path",_h)):(C(),I("path",vh))]))],6)):se("",!0),H.value?(C(),I("div",{key:2,class:"mi-scrim",onClick:zo(nt,["self"]),onKeydown:N},[O("div",{ref_key:"dialogEl",ref:k,class:"mi-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"mi-title-"+e.storageKey},[O("div",wh,[O("h2",{id:"mi-title-"+e.storageKey,class:"mi-title"},G(ye(s)("mapInfo.title")),9,kh),O("button",{ref_key:"closeEl",ref:fe,type:"button",class:"mi-close","aria-label":ye(s)("mapInfo.close"),onClick:nt},"ร—",8,xh)]),O("div",Sh,[e.leadKey||e.lead?(C(),I("section",{key:0,class:"mi-bluf","aria-labelledby":"mi-bluf-"+e.storageKey},[O("h3",{id:"mi-bluf-"+e.storageKey,class:"mi-bluf-h"},G(ye(s)("mapInfo.shortDescription")),9,Th),O("p",Ph,G(r(e.leadKey,e.lead)),1)],8,Lh)):se("",!0),(e.takeawayKey||e.takeaway)&&!c()?(C(),I("p",Eh,[O("b",null,G(ye(s)("mapInfo.takeaway")),1),Gt(" "+G(r(e.takeawayKey,e.takeaway)),1)])):se("",!0),c()?(C(),I("details",{key:"st-"+o.value,class:"mi-strategy"},[O("summary",Oh,[O("span",null,G(ye(s)("mapInfo.tabStrategy")),1),Y[2]||(Y[2]=O("span",{class:"mi-chev","aria-hidden":"true"},"โ–พ",-1))]),O("p",Mh,G(l()),1),p().length?(C(),I("ul",Ah,[(C(!0),I(ne,null,Ke(p(),(B,Q)=>(C(),I("li",{key:Q},G(B),1))),128))])):se("",!0)])):se("",!0),(C(!0),I(ne,null,Ke(e.examples,(B,Q)=>Da((C(),I("section",{key:Q,class:"mi-ex"},[O("h3",null,G(de(B)),1),B.kind==="image"?(C(),I(ne,{key:0},[O("img",{class:"mi-img mi-poster",src:X(B.src),alt:B.alt||de(B),decoding:"async",onError:le=>ee[Q]=!0},null,40,Ch),B.full?(C(),I("div",Ih,[O("a",{class:"mi-full",href:X(B.full),target:"_blank",rel:"noopener"},G(ye(s)("mapInfo.openFull")),9,Nh)])):se("",!0)],64)):B.kind==="pages"&&(B.pages||[]).length?(C(),I(ne,{key:1},[ke[Q]?(C(),I(ne,{key:1},[O("div",qh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapsePages")),9,Wh)]),O("div",jh,[(C(!0),I(ne,null,Ke(B.pages,(le,Se)=>(C(),I("button",{key:Se,type:"button",class:"mi-hit mi-open mi-page","aria-label":ye(s)("mapInfo.collapsePages"),onClick:Ut=>b(Q)},[O("img",{class:"mi-img",src:X(le),alt:de(B)+" "+f(Se+1),loading:"lazy",decoding:"async",onError:S},null,40,Hh)],8,Uh))),128))]),O("div",Vh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapsePages")),9,Bh)])],64)):(C(),I(ne,{key:0},[O("button",{type:"button",class:Ze(["mi-hit mi-page",{"mi-stack":B.pages.length>1}]),"aria-label":ye(s)("mapInfo.expandPages",{n:f(B.pages.length)}),"aria-expanded":"false",onClick:le=>b(Q)},[O("img",{class:"mi-img",src:X(B.pages[0]),alt:de(B),decoding:"async",onError:le=>ee[Q]=!0},null,40,Dh)],10,Fh),B.pages.length>1?(C(),I("div",Rh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"false",onClick:le=>b(Q)},G(ye(s)("mapInfo.expandPages",{n:f(B.pages.length)})),9,zh)])):se("",!0)],64))],64)):B.kind==="deck"&&(B.cards||[]).length?(C(),I(ne,{key:2},[ke[Q]?(C(),I(ne,{key:1},[O("div",Jh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapseDeck")),9,Zh)]),O("div",Qh,[(C(!0),I(ne,null,Ke(B.cards,(le,Se)=>(C(),I("img",{key:Se,class:"mi-img",src:X(le),alt:de(B)+" "+f(Se+1),loading:"lazy",decoding:"async",onError:S},null,40,eb))),128))]),O("div",tb,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"true",onClick:le=>b(Q)},G(ye(s)("mapInfo.collapseDeck")),9,ab)])],64)):(C(),I(ne,{key:0},[O("button",{type:"button",class:"mi-hit mi-deck","aria-label":ye(s)("mapInfo.expandDeck",{n:f(B.cards.length)}),"aria-expanded":"false",onClick:le=>b(Q)},[(C(!0),I(ne,null,Ke(je(B),(le,Se)=>(C(),I("img",{key:Se,class:"mi-card",src:X(le),alt:"",decoding:"async",onError:Ut=>Se===0?ee[Q]=!0:S(Ut),style:Pa({insetInlineStart:Se*36+"px",transform:"rotate("+(Se-2)*4+"deg)",zIndex:10-Se})},null,44,Kh))),128))],8,Gh),O("div",Xh,[O("button",{type:"button",class:"mi-toggle","aria-expanded":"false",onClick:le=>b(Q)},G(ye(s)("mapInfo.expandDeck",{n:f(B.cards.length)})),9,Yh)])],64))],64)):B.kind==="table"&&(B.columns||[]).length?(C(),I(ne,{key:3},[O("div",ob,[O("table",nb,[O("thead",null,[O("tr",null,[(C(!0),I(ne,null,Ke(B.columns,(le,Se)=>(C(),I("th",{key:Se,scope:"col"},G(Ne(le)),1))),128))])]),O("tbody",null,[(C(!0),I(ne,null,Ke(B.rows||[],(le,Se)=>(C(),I("tr",{key:Se},[(C(!0),I(ne,null,Ke(le,(Ut,Ub)=>(C(),I("td",{key:Ub},G(typeof Ut=="number"?f(Ut):Ut),1))),128))]))),128))])])]),B.total&&B.total>(B.rows||[]).length?(C(),I("p",sb,G(ye(s)("mapInfo.moreRows",{n:f(B.total-(B.rows||[]).length)})),1)):se("",!0)],64)):se("",!0)])),[[Ya,!ee[Q]]])),128)),e.noteKey||e.note?(C(),I("p",rb,G(r(e.noteKey,e.note)),1)):se("",!0)]),a()?se("",!0):(C(),I("div",ib,[O("label",null,[O("input",{type:"checkbox",checked:y.value,onChange:Y[0]||(Y[0]=B=>F(B.target.checked))},null,40,lb),O("span",null,G(ye(s)("mapInfo.pointerOff")),1)])]))],8,yh)],32)):se("",!0)],8,dh))}},pb=":host{display:block;position:relative;height:var(--doxa-maps-spa-height, 85vh);min-height:480px}:host{font-size:16px;line-height:normal;font-weight:400;font-style:normal;font-variant:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-align:start;text-indent:0;text-shadow:none;white-space:normal;-webkit-hyphens:manual;hyphens:manual;visibility:visible;cursor:auto}:host([hidden]){display:none}.dms-pane{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;--profile-min-h: 0}.mi.dms-info-raise .mi-btn{z-index:60}.dms-slot{position:relative;min-height:100%}.dms-hint{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;text-align:center;color:#6d766e;font-size:13px;padding:20px}.dms-hint.err{color:#f87171}.dms-hint small{color:var(--dx-muted, #6d766e)}.dms-help-close:focus-visible{outline:2px solid #3f8f5a;outline-offset:2px}.dms-help-scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;align-items:center;justify-content:center;background:#00000059;padding:16px}.dms-help{max-width:420px;width:100%;color:#3b463d;background:#fff;border-radius:12px;padding:18px 20px 14px;box-shadow:0 12px 32px #0003;font-size:14px;line-height:1.5}.dms-help-title{margin:0 0 8px;font-size:16px}.dms-help-what,.dms-help-how{margin:0 0 10px}.dms-help-close{float:right;font:inherit;padding:6px 14px;border-radius:8px;border:1px solid #d1d4cd;background:#f3f3f1;cursor:pointer}.dms-notice{position:fixed;left:50%;bottom:24px;transform:translate(-50%);z-index:40;max-width:320px;text-align:center;font-size:13px;line-height:1.4;color:#3b463d;background:#fff;border:1px solid #d1d4cd;border-radius:10px;padding:10px 16px;box-shadow:0 8px 24px #0000001f}.dms-mobile-notice{position:sticky;top:0;z-index:30;display:flex;align-items:flex-start;gap:8px;padding:10px 12px;font-size:13px;line-height:1.4;color:#3b463d;background:#fff8e6;border-bottom:1px solid #f0d58c}.dms-mobile-notice span{flex:1}.dms-mobile-notice-x{flex:none;min-width:32px;min-height:32px;border:0;border-radius:6px;background:transparent;color:inherit;font-size:18px;line-height:1;cursor:pointer}.dms-mobile-notice-x:focus-visible{outline:2px solid #3b463d;outline-offset:1px}.dms-logo{display:inline-flex;align-items:center}.dms-logo svg{display:block}.dms-locale{position:relative;padding:8px 12px 0;display:flex;justify-content:flex-end}.dms-locale-btn{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:12px;padding:5px 10px;border:1px solid #d1d4cd;border-radius:8px;background:#d1d4cd;color:#3b463d;cursor:pointer}.dms-locale-btn:hover{background:#d1d4cd}.dms-flag{font-size:14px;line-height:1}.dms-locale-name{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dms-dots{color:#6d766e;margin-left:2px}.dms-locale-menu{position:absolute;top:100%;right:12px;margin-top:4px;z-index:30;min-width:180px;list-style:none;padding:6px;border:1px solid #d1d4cd;border-radius:10px;background:#fff;box-shadow:0 12px 32px #00000080;max-height:320px;overflow:auto}.dms-locale-opt{display:flex;align-items:center;gap:8px;width:100%;text-align:left;font:inherit;font-size:13px;padding:7px 9px;border:0;border-radius:7px;background:none;color:#3b463d;cursor:pointer}.dms-locale-opt:hover,.dms-locale-opt.active{background:#d1d4cd;color:#3b463d}.dms-locale-opt.active .dms-locale-name{color:#92b195}.dms-locale-en{margin-left:auto;font-size:11px;color:#6d766e}";function El(){try{const e=new URLSearchParams(location.search),t=(e.get("lang")||e.get("locale")||"").split("-")[0].toLowerCase();if(cs.includes(t))return t}catch{}try{const e=(document.documentElement.lang||"").split("-")[0].toLowerCase();if(cs.includes(e))return e}catch{}return""}const us=[{key:"dashboards",label:"Dashboards",i18n:"sec.dashboards",icon:"chart",tabs:[{id:"dashboard-plus-grid",icon:"chart"},{id:"research-map-plus-grid",icon:"map"},{id:"regions-dashboard",icon:"map"}]},{key:"prayer-mobilization",label:"Prayer Mobilization",i18n:"sec.prayer",icon:"heart",tabs:[{id:"prayer-map",icon:"embed"},{id:"upg-100",icon:"list"},{id:"country-posters",icon:"poster"},{id:"poster-design",icon:"grid"}]},{key:"gospel-research",label:"Gospel Research",i18n:"sec.gospel",icon:"search",tabs:[{id:"cities-internet",icon:"wifi"},{id:"gospel-resources",icon:"book"}]},{key:"experimental",label:"Experimental",i18n:"sec.experimental",icon:"flask",folder:!0,open:!1,tabs:[]}];function ub(e){const t={},a=e&&Array.isArray(e.bundles)?e.bundles:[];for(const o of a)for(const n of Array.isArray(o&&o.profiles)?o.profiles:[])n&&(n.mobile==="desktop-only"||n.mobile==="larger-screens")&&(t[o.bundle+"/"+n.profile]=n.mobile);return t}const db=new Set(["doxa-maps-spa","plugin-studio","template-bundle","people-groups-grid","research-dashboard","big-picture","demo-map","golden-path-check","doxa-research-map","stack-demo","posterverse","bible-posters"]),Ol={"prayer-walk-planner":1,"gospel-internet":2,"upg-neighbor":3,"key-cities":4,"all-people-groups":5,"doxa-vision-card":7},ds=[{id:"dashboard-plus-grid",label:"Big Picture",sub:"dashboard + people-groups grid, stacked",emoji:"๐ŸŒ",bundle:"dashboard-plus-grid",profile:"dashboard-plus-grid"},{id:"research-map",label:"Research Map",sub:"prayer ยท engagement ยท regions",emoji:"๐Ÿ—บ๏ธ",bundle:"doxa-research-map",profile:"research-map"},{id:"research-map-plus-grid",label:"Simple Research",sub:"research map + people-groups grid",emoji:"๐Ÿ—บ๏ธ",bundle:"research-map-plus-grid",profile:"research-map-plus-grid"},{id:"prayer-map",label:"Prayer Progress",sub:"simple world prayer map",emoji:"๐Ÿ™",bundle:"doxa-simple-map",profile:"doxa-simple-map",instance:"prayer"},{id:"cities-internet",label:"Cities with Internet",sub:"connectivity of key cities",emoji:"๐Ÿ“ก",bundle:"cities-internet",profile:"connectivity-map"},{id:"gospel-resources",label:"Gospel Resources",sub:"resources by place",emoji:"๐Ÿ“–",bundle:"gospel-resources",profile:"resources-map"},{id:"regions-dashboard",label:"Regions",sub:"regions and their countries",emoji:"๐ŸŒ",bundle:"regions-dashboard",profile:"regions-mfe"},{id:"upg-100",label:"UPG 100 List Posters",sub:"my unreached list + posters",emoji:"๐Ÿ“‹",bundle:"my-upg-100-list",profile:"upg-100-mfe"},{id:"country-posters",label:"Country Posters",sub:"a poster for every country",emoji:"๐Ÿ—บ๏ธ",bundle:"country-posters",profile:"country-posters-mfe"},{id:"poster-design",label:"Poster Design",sub:"every poster style and size",emoji:"๐ŸŽจ",bundle:"poster-design",profile:"poster-design-mfe"}];mb(us);const Zo=new Set(["doxa-research-map","doxa-simple-map","cities-internet-map","gospel-resources-map","my-upg-100-list-map","doxa-map","doxa-maps-spa","dashboard-plus-grid","research-dashboard-map","demo-map","all-people-groups","country-posters-map","key-cities-map","research-map-plus-grid","gospel-internet-board"]),Qo=new Set(["dashboard-plus-grid","research-map-plus-grid"]);function gb(){const e=Object.fromEntries(ds.map(a=>[a.id,a])),t=new Set;for(const a of us)if(a.key!=="experimental")for(const o of a.tabs||[]){const n=e[o.id];n&&n.bundle&&t.add(n.bundle)}return t}function Ml(e,t){const a=[];for(const o of e)!o||t.has(o.key)||(t.add(o.key),a.push(o));return a}function mb(e){const t=new Map,a=[];for(const o of e)if(o.key!=="experimental")for(const n of o.tabs||[]){if(!n||!n.id)continue;const s=t.get(n.id);if(s===void 0){t.set(n.id,o.key);continue}(s!==o.key||a.indexOf(n.id)===-1)&&a.push(n.id+" ("+s+" + "+o.key+")")}return a.length&&typeof console<"u"&&console.error("[doxa-maps-spa] duplicate tab key(s) across NAV_MODEL sections: "+a.join(", ")+" โ€” VerticalTabsLayout keys its tab-ref map and `active` highlight by id, so a row declared in two sections paints twice and stalls keyboard nav. See the duplicate-key trap in SPEC-the-six-map-product-and-its-tab-order.md."),a}function fb(e){return String(e).split(/[-_]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function hb(e){const t=gb(),a=e&&Array.isArray(e.bundles)?e.bundles:[],o=[];for(const n of a){const s=n&&n.bundle;if(!s||t.has(s)||db.has(s)||n.stage==="production")continue;const r=Array.isArray(n.profiles)?n.profiles:[];if(!r.length||r.every(c=>c.widget||Array.isArray(c.targets)&&!c.targets.includes("web")))continue;const i=r.find(c=>c.isMap)||r.find(c=>c.profile===s)||r[0],l=i.element||Array.isArray(n.elements)&&n.elements[0]||s,p=n.scriptUrl||i.scriptUrl||"";p&&o.push({id:s,label:i.title||fb(s),sub:(i.description||"").trim().replace(/[,;]\s*$/,"")||"experimental bundle",emoji:"๐Ÿงช",tag:l,bundle:s,profile:i.profile||s,scriptUrl:p,heavy:Zo.has(l)||Zo.has(s),scroll:Qo.has(l)||Qo.has(s),discovered:!0})}return o.sort((n,s)=>{const r=Ol[n.id]||999,i=Ol[s.id]||999;return r!==i?r-i:n.label.localeCompare(s.label)}),o}function bb(e,t){const a=e&&Array.isArray(e.bundles)?e.bundles:[],o=Object.fromEntries(a.map(s=>[s.bundle,s])),n={};for(const s of t){const r=o[s.bundle];if(!r)continue;const i=Array.isArray(r.profiles)?r.profiles:[],l=i.find(L=>L.profile===s.profile)||i[0],p=l&&l.element||Array.isArray(r.elements)&&r.elements[0]||s.bundle,c=r.scriptUrl||l&&l.scriptUrl||"";if(!c)continue;const f=l&&Array.isArray(l.instances)?l.instances:[],$=!!(s.instance&&f.some(L=>(L&&(L.id||L.instance))===s.instance));n[s.id]={tag:p,scriptUrl:c,profile:l&&l.profile||s.profile,instance:$?s.instance:"",heavy:Zo.has(p)||Zo.has(s.bundle),scroll:Qo.has(p)||Qo.has(s.bundle)}}return n}const $b=ha({name:"DoxaMapsSpa",inheritAttrs:!1,components:{VerticalTabsLayout:Vf,BackToTopButton:ni,MapInfo:cb,ShellLanguageMenu:rh},props:{treeBase:{type:String,default:""},profileConfig:{type:[String,Object],default:""},heading:{type:String,default:"Deep Research"},tokenUrl:{type:String,default:""},tk:{type:String,default:""},language:{type:String,default:""},apiBaseUrl:{type:String,default:""},provider:{type:String,default:""},tab:{type:String,default:""},homeHref:{type:String,default:""},homeLabel:{type:String,default:""}},emits:["tab-change"],setup(){return{injectedBase:fa("dmsTreeBase","")}},data(){return{paneEls:{},activeIndex:0,showHeader:!1,narrow:!1,_mql:null,_onMedia:null,disabledNotice:"",_noticeTimer:null,helpOpen:!1,mobileNoticeDismissed:{},mobileFlags:null,manifestError:"",manifestBase:"",runtime:{},locale:Bf(),hostLang:El(),sessionPick:"",localeOpen:!1,switcherLangs:yl,tabs:ds.map(e=>({...e,tag:"",scriptUrl:"",heavy:!1,scroll:!1,resolved:!1,mounted:!1,state:"idle",error:""}))}},computed:{largerScreenText(){return Wt("messages.largerScreenNotice",this.uiLocale)||"This experimental map is built for larger screens. It opens here, but parts of it may not fit or work well on a phone."},activePaneEl(){return this.paneEls[this.activeIndex]||null},activeHelp(){const e=this.tabs[this.activeIndex];return e&&e.discovered?Sl(e.id,this.uiLocale):null},cfg(){let e=this.profileConfig;if(typeof e=="string")try{e=e?JSON.parse(e):{}}catch{e={}}return e&&typeof e=="object"?e:{}},base(){const e=(this.treeBase||this.cfg.treeBase||this.injectedBase||"").trim();return e?e.replace(/\/+$/,"")+"/":""},assetsBase(){const e=String(this.cfg.assetsBase||"").trim();return/^https?:\/\//i.test(e)||e.startsWith("/")?e.replace(/\/+$/,""):this.manifestBase?this.manifestBase.replace(/\/+$/,"")+"/assets":""},showInfo(){const e=this.cfg.info;return!(e===!1||e==="false"||e==="off")},headingText(){return String(this.cfg.heading||this.heading||"").trim()||"Deep Research"},showExperimental(){const e=this.cfg.experimental;return!(e===!1||e==="false"||e==="hidden"||e==="off")},navGroups(){const e=Object.fromEntries(this.tabs.map(a=>[a.id,a])),t=new Set;return us.map(a=>{let o=Ml((a.tabs||[]).filter(n=>e[n.id]).map(n=>{const s=e[n.id],r=this.isDesktopOnly(s.id),i=r||this.mobileFlagOf(s.id)==="desktop-only";return{key:s.id,label:this.tabLabel(s),sub:this.tabSub(s),icon:n.icon,badge:i?this.tr("desktopOnly"):n.badge,disabled:r}}),t);return a.key==="experimental"&&!this.showExperimental?{key:a.key,rows:[]}:(a.key==="experimental"&&(o=o.concat(Ml(this.tabs.filter(n=>n.discovered).map(n=>({key:n.id,label:this.tabLabel(n),sub:this.tabSub(n),icon:"flask",badge:this.narrow&&this.mobileFlagOf(n.id)==="larger-screens"?this.tr("mobileNotBuilt"):this.tr("lab")})),t))),{key:a.key,label:a.i18n?this.tr(a.i18n):a.label,icon:a.icon,folder:!!a.folder,open:a.open,rows:o})}).filter(a=>a.rows.length)},showLocaleSwitcher(){return this.showHeader},activeLang(){return ls(this.locale)||{code:this.locale,flag:"๐ŸŒ",nativeName:this.locale}},propLocale(){return(this.language||this.cfg.language||this.cfg.locale||this.cfg.lang||"").trim()},effectiveLocale(){const e=this.showLocaleSwitcher?this.locale:"";return(this.sessionPick||this.propLocale||e||this.hostLang||"en").split("-")[0].toLowerCase()},uiLocale(){return cs.includes(this.effectiveLocale)?this.effectiveLocale:"en"},uiDir(){return this.uiLocale==="ar"?"rtl":"ltr"},layoutLabels(){const e={};for(const t of["toggleList","openViews","expandList","collapseList","collapse","home"])e[t]=this.tr(t);return e},effectiveProvider(){const e=String(this.provider||this.cfg.provider||"").trim().toLowerCase();return e==="maplibre"||e==="mapbox"?e:""},activeKey(){const e=this.tabs[this.activeIndex];return e?e.id:""}},mounted(){this.watchWidth(),this.watchHostLang(),this.select(this.initialIndex()),this.loadManifest(),this._onHostedHelp=e=>this.onHostedHelp(e),this.$el.addEventListener("doxa:help",this._onHostedHelp)},beforeUnmount(){this._langObs&&(this._langObs.disconnect(),this._langObs=null),this._onHostedHelp&&(this.$el.removeEventListener("doxa:help",this._onHostedHelp),this._onHostedHelp=null),!(!this._mql||!this._onMedia)&&(this._mql.removeEventListener?this._mql.removeEventListener("change",this._onMedia):this._mql.removeListener&&this._mql.removeListener(this._onMedia),this._mql=null,this._onMedia=null)},watch:{activeIndex(){this.helpOpen=!1},propLocale(){this.sessionPick=""},effectiveLocale(){const e=(o,n)=>{try{const s=this._slots&&this._slots[o];s&&(s.innerHTML="")}catch{}n.mounted=!1,n.state="idle",n.error=""};this.tabs.forEach((o,n)=>{o.mounted&&n!==this.activeIndex&&e(n,o)});const t=this.activeIndex,a=this.tabs[t];!a||!a.mounted||(e(t,a),this.mountElement(t))},tab(e){e&&this.onSelect(e)}},methods:{openHelp(){this.helpOpen=!0,this.$nextTick(()=>this.$refs.helpClose&&this.$refs.helpClose.focus())},closeHelp(){this.helpOpen=!1;const e=this._helpReturn;this._helpReturn=null,this.$nextTick(()=>e&&e.focus&&e.focus())},infoProps(e){const{pos:t,...a}=this.infoFor(e)||{};return a},infoPos(e){const t=(this.infoFor(e)||{}).pos||{},{narrow:a,...o}=t;return this.narrow&&a?{...o,...a}:o},infoStyle(e){const t=this.infoPos(e),a={};return t.top&&(a["--map-info-top"]=t.top),t.side&&(a["--map-info-side"]=t.side),a},infoFor(e){const t=this.showInfo&&e&&ph[e.id];return t&&(!t.leadKey||Wt(t.leadKey,"en"))?t:null},tabHasHelp(e){return!!(e&&e.discovered&&Sl(e.id,this.uiLocale))},onHostedHelp(e){if(!this.activeHelp)return;e.stopPropagation();const t=e.composedPath?e.composedPath():[];this._helpReturn=t.find(a=>a&&a.tagName==="BUTTON")||null,this.openHelp()},setSlot(e,t){t&&(this._slots=Object.assign(this._slots||{},{[e]:t}))},tr(e,t){return Yo(this.uiLocale,e,t)},t(e,t){return Yo(this.uiLocale,e,t)},tabLabel(e){return!e.discovered||ih("tab."+e.id)?Yo(this.uiLocale,"tab."+e.id):e.label},tabSub(e){return e.discovered?this.uiLocale==="en"?e.sub:this.tr("experimentalSub"):Yo(this.uiLocale,"sub."+e.id)},watchHostLang(){typeof MutationObserver>"u"||typeof document>"u"||(this._langObs=new MutationObserver(()=>{this.hostLang=El()}),this._langObs.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))},watchWidth(){typeof window>"u"||!window.matchMedia||(this._mql=window.matchMedia("(max-width: 760px)"),this.narrow=this._mql.matches,this._onMedia=e=>{const t=this.narrow;this.narrow=!!e.matches,t!==this.narrow&&this.isDesktopOnly(this.activeKey)&&this.select(this.firstVisibleIndex())},this._mql.addEventListener?this._mql.addEventListener("change",this._onMedia):this._mql.addListener&&this._mql.addListener(this._onMedia))},mobileFlagOf(e){const t=this.tabs.find(a=>a.id===e);return t&&this.mobileFlags&&this.mobileFlags[t.bundle+"/"+t.profile]||null},isDesktopOnly(e){return this.narrow&&this.mobileFlagOf(e)==="desktop-only"},showsMobileNotice(e){return this.narrow&&this.mobileFlagOf(e)==="larger-screens"&&!this.mobileNoticeDismissed[e]},dismissMobileNotice(e){this.mobileNoticeDismissed={...this.mobileNoticeDismissed,[e]:!0}},firstVisibleIndex(){let e=-1;for(const t of this.navGroups)for(const a of t.rows){const o=this.tabs.findIndex(n=>n.id===a.key);if(!(o<0)&&(e<0&&(e=o),!a.disabled))return o}return e>=0?e:0},loadManifest(){const e=this.resolve("manifest.json"),t=p=>{try{return new URL(p,location.href).href.replace(/[^/]*$/,"")}catch{return""}},a={url:e,root:t(e)},o={url:this.resolve("doxa-maps-spa/manifest.json"),root:a.root};let n=!1;try{n=new URL(e,location.href).origin!==location.origin}catch{}const s=n?[o,a]:[a,o],r="/public/dx-maps/manifest.json";s.some(p=>p.url===r)||s.push({url:r,root:t(r)});const i=[],l=p=>{if(p>=s.length){this.manifestError="manifest.json not found (tried "+i.join(", ")+")",console.error("[doxa-maps-spa] "+this.manifestError+" โ€” every tab except Big Picture is composed from it, so their panes cannot mount.");return}const{url:c,root:f}=s[p];return i.push(c),fetch(c,{credentials:"same-origin"}).then($=>{if(!$||!$.ok)throw new Error(c+" โ†’ HTTP "+($?$.status:"?"));return $.json()}).then($=>{if(!$)throw new Error(c+" โ†’ empty");this.manifestError="",this.manifestBase=f||"",this.applyManifest($)}).catch(()=>l(p+1))};try{l(0)}catch{}},applyManifest(e){this.runtime=e&&e.runtime&&typeof e.runtime=="object"?e.runtime:{},this.mobileFlags=ub(e),this.applyPageGlobals();const t=bb(e,ds),a=this.activeKey,o=[];for(const l of this.tabs){if(l.discovered){o.push(l);continue}const p=t[l.id];p&&(Object.assign(l,p,{resolved:!0}),o.push(l))}const n=new Set(o.map(l=>l.id));if(this.showExperimental)for(const l of hb(e))n.has(l.id)||o.push({...l,resolved:!0,mounted:!1,state:"idle",error:""});this.tabs=o;const s=this.requestedTab(),r=s?this.tabs.findIndex(l=>l.id===s):-1,i=this.tabs.findIndex(l=>l.id===a);r>=0&&!this.isDesktopOnly(s)&&!this._honouredTab?this.select(r):this.select(i>=0&&!this.isDesktopOnly(a)?i:this.firstVisibleIndex()),this._honouredTab=!0},requestedTab(){let e="";try{e=new URLSearchParams(location.search).get("tab")||""}catch{}return String(this.tab||this.cfg.tab||e||"").trim()},initialIndex(){const e=this.requestedTab(),t=e?this.tabs.findIndex(a=>a.id===e):-1;return t>=0&&(this._honouredTab=!0),t>=0&&!this.isDesktopOnly(e)?t:this.firstVisibleIndex()},setLocale(e){this.locale=e,this.localeOpen=!1,Gf(e)},pickLocale(e){this.setLocale(e),this.sessionPick=e},onSelect(e){if(this.isDesktopOnly(e)){const a=this.tabs.find(o=>o.id===e);this.disabledNotice=(Wt("messages.desktopOnlyNotice",this.uiLocale)||"{label} only supports desktop โ€” open this page on a desktop to use it.").replace("{label}",a?this.tabLabel(a):e),clearTimeout(this._noticeTimer),this._noticeTimer=setTimeout(()=>{this.disabledNotice=""},4e3);return}const t=this.tabs.findIndex(a=>a.id===e);t!==-1&&this.select(t)},resolve(e){const t=String(e);if(/^(https?:)?\/\//.test(t)||t.startsWith("/"))return t;const a=t.replace(/^\.\//,"");return this.manifestBase?this.manifestBase.replace(/\/+$/,"")+"/"+a:this.base?this.base.replace(/\/+$/,"")+"/"+a:"../"+a},select(e){const t=this.activeIndex;if(this.activeIndex=e,t!==e&&t>=0){const o=this.tabs[t];o&&o.heavy&&o.mounted&&this.releaseTab(t,o)}const a=this.tabs[e];a&&((t!==e||!this._announced)&&(this._announced=!0,this.$emit("tab-change",{id:a.id,label:a.label})),a.scriptUrl&&(this.narrow&&this.mobileFlags===null||this.isDesktopOnly(a.id)||a.mounted||this.$nextTick(()=>{this.activeIndex===e&&this.mountElement(e)})))},releaseTab(e,t){try{const a=this._slots&&this._slots[e];a&&(a.innerHTML="")}catch{}this._slots&&delete this._slots[e],t.mounted=!1,t.state="idle",t.error=""},childConfig(e){const t={profile:e.profile||e.id,instanceId:e.instance||"dms-"+e.id};this.effectiveLocale&&(t.locale=this.effectiveLocale);const a=this.tk||this.cfg.tk||this.runtime.token;return a&&(t.tk=a),(this.tokenUrl||this.cfg.tokenUrl)&&(t.tokenUrl=this.tokenUrl||this.cfg.tokenUrl),this.effectiveProvider&&(t.provider=this.effectiveProvider),this.base&&(t.treeBase=this.base),this.assetsBase&&(t.assetsBase=this.assetsBase),t.urlSync=!1,t.mapTitle=this.tabLabel(e),t},applyPageGlobals(){if(typeof window>"u")return;const e=(this.apiBaseUrl||this.cfg.apiBaseUrl||this.runtime.apiBaseUrl||"").trim();e&&!window.MAP_APP_API_URL&&(window.MAP_APP_API_URL=e.replace(/\/+$/,""));const t=this.tk||this.cfg.tk||this.runtime.token;t&&!window.MAP_TOKEN&&(window.MAP_TOKEN=t),this.effectiveProvider&&!window.MAP_PROVIDER&&(window.MAP_PROVIDER=this.effectiveProvider)},mountElement(e){const t=this.tabs[e];t.mounted=!0,t.state="loading";const a=this.resolve(t.scriptUrl);vl(a).then(()=>zm(t.tag)).then(()=>{try{if(t.heavy&&this.activeIndex!==e){t.mounted=!1,t.state="idle";return}const o=this._slots&&this._slots[e];if(!o){t.state="error",t.error="no slot";return}o.innerHTML="";const n=document.createElement(t.tag);n.setAttribute("profile-config",JSON.stringify(this.childConfig(t))),this.base&&n.setAttribute("tree-base",this.base.replace(/\/+$/,"")),n.style.cssText=t.scroll?"display:block;position:static;width:100%;height:auto;":"display:block;position:absolute;inset:0;width:100%;height:100%;min-height:0;",o.appendChild(n),t.state="ready"}catch(o){t.state="error",t.error="mount failed: "+(o&&o.message||String(o))}}).catch(o=>{t.state="error",t.error=o&&o.message||String(o)})}}}),_b={class:"dms-locale"},vb=["aria-expanded"],yb={class:"dms-flag"},wb={class:"dms-locale-name"},kb={key:0,class:"dms-locale-menu",role:"listbox"},xb=["aria-selected"],Sb=["onClick"],Lb={class:"dms-flag"},Tb={class:"dms-locale-name"},Pb={class:"dms-locale-en"},Eb=["hidden","data-doxa-help"],Ob={key:0,class:"dms-mobile-notice",role:"status"},Mb=["aria-label","onClick"],Ab={key:2,class:"dms-hint"},Cb={key:3,class:"dms-hint err"},Ib={key:4,class:"dms-hint err"},Nb={key:0,class:"dms-notice",role:"status"},Fb={id:"dms-help-title",class:"dms-help-title"},Db={class:"dms-help-what"},Rb={class:"dms-help-how"};function zb(e,t,a,o,n,s){const r=za("ShellLanguageMenu"),i=za("MapInfo"),l=za("BackToTopButton"),p=za("VerticalTabsLayout");return C(),va(p,{dir:e.uiDir,lang:e.uiLocale,labels:e.layoutLabels,"home-href":e.homeHref||e.cfg.homeHref||"","home-label":e.homeLabel||e.cfg.homeLabel||"",title:e.headingText,"nav-label":e.t("navLabel"),header:e.showHeader,groups:e.navGroups,active:e.activeKey,"onUpdate:active":e.onSelect},Wc({brand:aa(()=>[t[5]||(t[5]=O("span",{class:"dms-logo","aria-hidden":"true"},[O("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#92b195","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[O("circle",{cx:"12",cy:"12",r:"9"}),O("polygon",{points:"12 6 14 12 12 18 10 12",fill:"#92b195",stroke:"none"}),O("polygon",{points:"6 12 12 10 18 12 12 14",fill:"#92b195",opacity:"0.55",stroke:"none"})])],-1))]),meta:aa(()=>[Gt(G(e.t("meta",{n:e.tabs.length})),1)]),"phone-end":aa(()=>[Ce(r,{current:e.uiLocale,onSwitch:e.pickLocale},null,8,["current","onSwitch"])]),"rail-end":aa(({collapsed:c})=>[Ce(r,{current:e.uiLocale,collapsed:c,onSwitch:e.pickLocale},null,8,["current","collapsed","onSwitch"])]),default:aa(()=>[(C(!0),I(ne,null,Ke(e.tabs,(c,f)=>Da((C(),I("section",{key:c.id,class:"dms-pane",ref_for:!0,ref:$=>{$?e.paneEls[f]=$:delete e.paneEls[f]},hidden:f!==e.activeIndex,"data-doxa-help":e.tabHasHelp(c)?"":null,"data-doxa-gallery":""},[!c.heavy||f===e.activeIndex?(C(),I(ne,{key:0},[e.showsMobileNotice(c.id)?(C(),I("div",Ob,[O("span",null,G(e.largerScreenText),1),O("button",{type:"button",class:"dms-mobile-notice-x","aria-label":e.tr("dismiss"),onClick:$=>e.dismissMobileNotice(c.id)},"ร—",8,Mb)])):se("",!0),O("div",{class:"dms-slot",ref_for:!0,ref:$=>e.setSlot(f,$)},null,512),e.infoFor(c)?(C(),va(i,Nr({key:"info-"+c.id},{ref_for:!0},e.infoProps(c),{style:e.infoStyle(c),placement:e.infoPos(c).placement||"top-right",class:{"dms-info-raise":e.infoPos(c).raise},"assets-base":e.assetsBase,locale:e.effectiveLocale}),null,16,["style","placement","class","assets-base","locale"])):se("",!0),c.state==="loading"?(C(),I("div",Ab,G(e.tr("loading",{label:e.tabLabel(c)})),1)):c.state==="error"?(C(),I("div",Cb,[Gt(G(e.tr("loadFailed",{label:e.tabLabel(c)})),1),t[7]||(t[7]=O("br",null,null,-1)),O("small",null,G(c.error),1)])):c.state==="idle"&&!c.scriptUrl&&e.manifestError?(C(),I("div",Ib,[Gt(G(e.tr("loadFailed",{label:e.tabLabel(c)})),1),t[8]||(t[8]=O("br",null,null,-1)),O("small",null,G(e.manifestError),1),t[9]||(t[9]=O("br",null,null,-1)),O("small",null,G(e.tr("manifestHint")),1)])):se("",!0)],64)):se("",!0)],8,Eb)),[[Ya,f===e.activeIndex]])),128)),e.disabledNotice?(C(),I("div",Nb,G(e.disabledNotice),1)):se("",!0),e.helpOpen&&e.activeHelp?(C(),I("div",{key:1,class:"dms-help-scrim",onClick:t[3]||(t[3]=zo((...c)=>e.closeHelp&&e.closeHelp(...c),["self"])),onKeydown:t[4]||(t[4]=ei(zo((...c)=>e.closeHelp&&e.closeHelp(...c),["stop","prevent"]),["esc"]))},[O("div",{class:"dms-help",role:"dialog","aria-modal":"true","aria-labelledby":"dms-help-title",onKeydown:t[2]||(t[2]=ei(zo(c=>e.$refs.helpClose&&e.$refs.helpClose.focus(),["prevent"]),["tab"]))},[O("h2",Fb,G(e.tabLabel(e.tabs[e.activeIndex])),1),O("p",Db,[O("strong",null,G(e.activeHelp.what),1)]),O("p",Rb,G(e.activeHelp.how),1),O("button",{ref:"helpClose",type:"button",class:"dms-help-close",onClick:t[1]||(t[1]=(...c)=>e.closeHelp&&e.closeHelp(...c))},G(e.tr("close")),513)],32)],32)):se("",!0),Ce(l,{target:e.activePaneEl,labels:{backToTop:e.tr("backToTop")}},null,8,["target","labels"])]),_:2},[e.showLocaleSwitcher?{name:"toolbar",fn:aa(()=>[O("div",_b,[O("button",{type:"button",class:"dms-locale-btn","aria-expanded":String(e.localeOpen),"aria-label":"Change language",onClick:t[0]||(t[0]=c=>e.localeOpen=!e.localeOpen)},[O("span",yb,G(e.activeLang.flag),1),O("span",wb,G(e.activeLang.nativeName),1),t[6]||(t[6]=O("span",{class:"dms-dots","aria-hidden":"true"},"โ‹ฎ",-1))],8,vb),e.localeOpen?(C(),I("ul",kb,[(C(!0),I(ne,null,Ke(e.switcherLangs,c=>(C(),I("li",{key:c.code,role:"option","aria-selected":String(c.code===e.locale)},[O("button",{type:"button",class:Ze(["dms-locale-opt",{active:c.code===e.locale}]),onClick:f=>e.setLocale(c.code)},[O("span",Lb,G(c.flag),1),O("span",Tb,G(c.nativeName),1),O("span",Pb,G(c.name),1)],10,Sb)],8,xb))),128))])):se("",!0)])]),key:"0"}:void 0]),1032,["dir","lang","labels","home-href","home-label","title","nav-label","header","groups","active","onUpdate:active"])}const qb=qo($b,[["render",zb],["styles",[pb]]]),Wb=qm(),jb=Xp(qb,{configureApp(e){e.provide("dmsTreeBase",Wb)}});typeof customElements<"u"&&!customElements.get("doxa-maps-spa")&&customElements.define("doxa-maps-spa",jb)})(); diff --git a/public/dx-maps/doxa-maps-spa/doxa-maps-spa/app/index.html b/public/dx-maps/doxa-maps-spa/doxa-maps-spa/app/index.html index 591a5b1b1..5d00df077 100644 --- a/public/dx-maps/doxa-maps-spa/doxa-maps-spa/app/index.html +++ b/public/dx-maps/doxa-maps-spa/doxa-maps-spa/app/index.html @@ -67,7 +67,7 @@ - + - + \n\n\n" + }, + "bundle": "bible-posters" + } + ] + }, { "bundle": "big-picture", "scriptUrl": "./big-picture/big-picture.js", @@ -361,7 +393,7 @@ "bundle": "doxa-maps-spa", "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js", - "integrity": "sha384-jJHY8JXkPZd8UQz7gDBNE4n+LX+DsK5MgcafqLChgSL5e1AUz+YaItO8LOX19VzO", + "integrity": "sha384-jvHzikM2VJQXpIlJwQVbEXFg/JOw67aiJsBaRBMkHKc4w080G41TsDc6Gt3y3GiH", "elements": [ "doxa-maps-spa" ], @@ -391,7 +423,7 @@ "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { @@ -1134,7 +1166,7 @@ "bundle": "posterverse", "scriptUrl": "./posterverse/posterverse.js", "output": "dx-maps/posterverse/posterverse.js", - "integrity": "sha384-+1IEWkJujDRDE7t/piXT6lq6T0QdhCYfT4pv4OURz6EKxDK8p8YcSZNZOv5uRi0W", + "integrity": "sha384-SHwg48KTIMJixoVevPoDmKMsuJ1tAKE2fa4WBS1bOmGeUawyWBt4n029N8itST7q", "elements": [ "posterverse-app" ], @@ -1142,7 +1174,8 @@ "my-upg-100-list/upg-100-mfe", "country-posters/country-posters-mfe", "poster-design/poster-design-mfe", - "wall-of-people-groups/wall-of-people-groups" + "wall-of-people-groups/wall-of-people-groups", + "bible-posters/bible-posters" ], "stage": "experimental", "profiles": [ @@ -1159,7 +1192,7 @@ "scriptUrl": "./posterverse/posterverse.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index 950e8a71c..52434fff0 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -2,8 +2,8 @@ "schema": "doxa-maps-manifest@1", "generatedFrom": "plugin-designs/*/*.vue", "embedBase": ".", - "bundleCount": 27, - "profileCount": 41, + "bundleCount": 28, + "profileCount": 42, "runtime": { "apiBaseUrl": "https://pray.doxa.life" }, @@ -37,6 +37,38 @@ } ] }, + { + "bundle": "bible-posters", + "scriptUrl": "./bible-posters/bible-posters.js", + "output": "dx-maps/bible-posters/bible-posters.js", + "integrity": "sha384-x0qrqnzFOHxhCWZN4YYpnME08TLUQdfMI8oR5cAnQDtOVKu133/27BXcHCr0Ev7Q", + "elements": [ + "bible-posters" + ], + "stage": "experimental", + "profiles": [ + { + "profile": "bible-posters", + "stage": "experimental", + "label": "Bible Posters", + "targets": [ + "web" + ], + "file": "bible-posters.vue", + "description": "A whole book of the Bible on one poster, in justified columns under a bold title, from a public-domain text.", + "element": "bible-posters", + "type": "single", + "isMap": false, + "iframeUrl": "./bible-posters/bible-posters/index.html", + "scriptUrl": "./bible-posters/bible-posters.js", + "embed": { + "iframe": "", + "script": "\n\n\n" + }, + "bundle": "bible-posters" + } + ] + }, { "bundle": "big-picture", "scriptUrl": "./big-picture/big-picture.js", @@ -361,7 +393,7 @@ "bundle": "doxa-maps-spa", "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js", - "integrity": "sha384-jJHY8JXkPZd8UQz7gDBNE4n+LX+DsK5MgcafqLChgSL5e1AUz+YaItO8LOX19VzO", + "integrity": "sha384-jvHzikM2VJQXpIlJwQVbEXFg/JOw67aiJsBaRBMkHKc4w080G41TsDc6Gt3y3GiH", "elements": [ "doxa-maps-spa" ], @@ -391,7 +423,7 @@ "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { @@ -1134,7 +1166,7 @@ "bundle": "posterverse", "scriptUrl": "./posterverse/posterverse.js", "output": "dx-maps/posterverse/posterverse.js", - "integrity": "sha384-+1IEWkJujDRDE7t/piXT6lq6T0QdhCYfT4pv4OURz6EKxDK8p8YcSZNZOv5uRi0W", + "integrity": "sha384-SHwg48KTIMJixoVevPoDmKMsuJ1tAKE2fa4WBS1bOmGeUawyWBt4n029N8itST7q", "elements": [ "posterverse-app" ], @@ -1142,7 +1174,8 @@ "my-upg-100-list/upg-100-mfe", "country-posters/country-posters-mfe", "poster-design/poster-design-mfe", - "wall-of-people-groups/wall-of-people-groups" + "wall-of-people-groups/wall-of-people-groups", + "bible-posters/bible-posters" ], "stage": "experimental", "profiles": [ @@ -1159,7 +1192,7 @@ "scriptUrl": "./posterverse/posterverse.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ {