PageSourceSearch

https://www.worldboston.org/assets/cms-BGvASFlh.js

js worldboston.org collected 2026-10-03 22:54:34 UTC 2,797 bytes, 1 lines download raw bytes

1import{z as y,d as m,r as u}from"./index-9wHtJ2OB.js";const p={outline:"2px solid #2563eb",outlineOffset:"3px",borderRadius:"2px",transition:"outline-color 0.15s ease"};function f(o){if(typeof document>"u"||(document.querySelectorAll("[data-cms-active='true']").forEach(t=>{t.style.outline="",t.style.outlineOffset="",t.style.borderRadius="",t.style.transition="",t.removeAttribute("data-cms-active")}),!o))return;const e=document.querySelector(`[data-cms-slot="${CSS.escape(o)}"]`);e&&(Object.assign(e.style,p),e.setAttribute("data-cms-active","true"),e.scrollIntoView({block:"center",behavior:"smooth"}))}function v(){const[o,e]=u.useState(null);return u.useEffect(()=>{if(typeof window>"u"||!new URLSearchParams(window.location.search).has("cms_preview"))return;e({});const a=s=>{s.data&&(s.data.type==="cms-preview-update"?e(s.data.overrides??{}):s.data.type==="cms-preview-active"&&f(s.data.slot??null))};return window.addEventListener("message",a),window.parent?.postMessage({type:"cms-preview-ready"},"*"),()=>window.removeEventListener("message",a)},[]),o}const b=[{key:"home",label:"Home"},{key:"about",label:"About"},{key:"get-involved",label:"Get Involved"},{key:"education",label:"Education Diplomacy"},{key:"engagement",label:"Engagement"},{key:"events",label:"Events"},{key:"focus-areas",label:"Focus Areas"},{key:"diplomacy",label:"Diplomacy"},{key:"sports",label:"Sports Diplomacy"},{key:"biotech",label:"Tech Diplomacy"},{key:"clean-energy",label:"Energy Diplomacy"},{key:"arts-culture",label:"Cultural Diplomacy"},{key:"commercial",label:"Commercial Diplomacy"},{key:"maritime",label:"Maritime Diplomacy"},{key:"security",label:"Security Diplomacy"},{key:"subnational",label:"Subnational Diplomacy"}];function w(o){const e=y({queryKey:["page-content",o],queryFn:async()=>{const{data:r,error:n}=await m.from("page_content").select("id, page_key, slot_key, value, image_url").eq("page_key",o);if(n)throw n;return r},staleTime:6e4}),t=new Map;for(const r of e.data??[])t.set(r.slot_key,r);const a=v();function s(r,n){if(a&&Object.prototype.hasOwnProperty.call(a,r)){const c=(a[r]?.value??"").trim();return c.length>0?c:n}const i=t.get(r);if(!i)return n;const l=(i.value??"").trim();return l.length>0?l:n}function d(r,n=null){if(a&&Object.prototype.hasOwnProperty.call(a,r)){const c=(a[r]?.image_url??"").trim();return c.length>0?c:n}const i=t.get(r);if(!i)return n;const l=(i.image_url??"").trim();return l.length>0?l:n}return{text:s,image:d,isLoading:e.isLoading,raw:e.data??[]}}function h(){return y({queryKey:["site-settings"],queryFn:async()=>{const{data:o,error:e}=await m.from("site_settings").select("key, value");if(e)throw e;const t={};for(const a of o??[])a.value&&typeof a.value=="object"&&Object.assign(t,a.value);return t},staleTime:6e4})}export{b as P,h as a,w as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.