PageSourceSearch

https://portal.gov.gy/_next/static/chunks/app/life-moments/page-bf9884f0a04e6fd1.js

js portal.gov.gy collected 2026-10-04 13:11:53 UTC 15,581 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[737],{824:(e,t,s)=>{Promise.resolve().then(s.bind(s,1733))},1733:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s(5155),a=s(8500),n=s.n(a),i=s(4426),l=s(2115),c=s(4530),o=s(531),d=s(455),m=s(1659);function u(e,t,s=`${t}s`){return`${e} ${1===e?t:s}`}function x(e){let{svc:t,ben:s}=function(e){let t=0,s=0;for(let r of e)"b"===r.k?s++:t++;return{svc:t,ben:s}}(e),r=[];return t&&r.push(u(t,"service")),s&&r.push(u(s,"benefit")),r.length?r:[u(0,"service")]}function h(e,t){return!t||e.aud.includes(t)}function g({s:e}){return"b"===e.k?(0,r.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-emerald-700",children:"Benefit"}):(0,r.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-accent-strong",children:e.c||"Service"})}function p({s:e}){return(0,r.jsxs)(n(),{href:"b"===e.k?`/benefits/${e.s}`:`/services/${e.s}`,className:"group flex items-start gap-3 py-4 transition-colors duration-150 hover:text-accent-strong",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"text-base font-medium leading-snug text-dark group-hover:text-accent-strong",children:e.t}),(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-dark/70",children:[e.a&&(0,r.jsx)("span",{className:"text-xs",children:e.a}),e.a&&(0,r.jsx)("span",{className:"text-xs text-border",children:"\xb7"}),(0,r.jsx)(g,{s:e}),e.o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-xs text-border",children:"\xb7"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-xs font-medium text-accent-strong",children:["Online",(0,r.jsx)(m.wl$,{className:"size-3","aria-hidden":!0})]})]})]})]}),(0,r.jsx)(m.ngD,{className:"mt-0.5 size-4 shrink-0 text-light transition-transform duration-150 group-hover:translate-x-0.5 group-hover:text-accent","aria-hidden":!0})]})}function f({step:e}){let t=["groups","tags","results"],s=t.indexOf(e);return(0,r.jsx)("div",{className:"mb-8 flex items-center gap-2",role:"progressbar","aria-valuenow":s+1,"aria-valuemin":1,"aria-valuemax":3,"aria-label":"Progress",children:t.map((e,t)=>(0,r.jsx)("span",{className:`h-0.5 flex-1 rounded-full transition-colors duration-300 ${t<=s?"bg-accent":"bg-border/80"}`},t))})}function b({Icon:e,title:t,meta:s,color:a}){return(0,r.jsxs)("header",{className:"mb-8 flex gap-3 sm:gap-4",children:[(0,r.jsx)(o.u,{Icon:e,color:a,size:"header"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h2",{className:"font-secondary text-2xl font-semibold tracking-tight text-dark sm:text-[1.65rem]",children:t}),(0,r.jsx)("p",{className:"mt-1 text-sm text-dark/70",children:s})]})]})}let j=[{href:"/services",label:"Services"},{href:"/benefits",label:"Benefits"},{href:"/agencies",label:"Agencies"},{href:"/sector",label:"Sectors"}];function v({MOMENTS:e,GROUPS:t}){let s=(0,l.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),a=(0,l.useMemo)(()=>new Map(t.map(e=>[e.id,e])),[t]);function o(e){return a.get(e)?.color}function g(e){return s.get(e)?.color}let N=(0,l.useMemo)(()=>{let t=new Set;for(let s of e)for(let e of s.services)for(let s of e.aud)t.add(s);return[...t].sort((e,t)=>e.localeCompare(t))},[e]),[w,k]=(0,l.useState)(null),[O,C]=(0,l.useState)(null),[$,P]=(0,l.useState)(null),[S,M]=(0,l.useState)(""),E=(0,l.useMemo)(()=>t.find(e=>e.id===O)??null,[t,O]),z=(0,l.useMemo)(()=>$?s.get($)??null:null,[s,$]),I=(0,l.useMemo)(()=>z?z.services.filter(e=>h(e,w)):[],[z,w]),_=(0,l.useMemo)(()=>{let e=S.trim().toLowerCase();return e?I.filter(t=>t.t.toLowerCase().includes(e)||t.a.toLowerCase().includes(e)):I},[I,S]),D=(0,l.useMemo)(()=>(function(e){let t=new Map;for(let s of e){let e=s.a||"Other government bodies";t.has(e)||t.set(e,[]),t.get(e).push(s)}return[...t.entries()].map(([e,t])=>({agency:e,items:t})).sort((e,t)=>t.items.length-e.items.length||e.agency.localeCompare(t.agency))})(_),[_]),F=(0,l.useMemo)(()=>new Set(I.map(e=>e.a)).size,[I]);function L(){window.scrollTo({top:0})}function T(){P(null),M(""),L()}(0,l.useEffect)(()=>{let e=new URLSearchParams(window.location.search),r=e.get("tag"),a=e.get("group");if(r&&s.has(r)){let e;(e=t.find(e=>e.tags.includes(r)))&&C(e.id),s.has(r)&&P(r),M(""),window.scrollTo({top:0,behavior:"smooth"})}else a&&t.some(e=>e.id===a)&&C(a)},[]);let A=E?z?"results":"tags":"groups";function R(t){return(0,c.X)(t,e,w)}let B=t.filter(function(e){return!!e.tags.length&&(!w||e.tags.some(e=>(s.get(e)?.services??[]).some(e=>h(e,w))))}),U=(E?.tags??[]).filter(function(e){return!w||(s.get(e)?.services??[]).some(e=>h(e,w))}).map(e=>s.get(e)).filter(e=>!!e);return(0,r.jsx)("main",{className:"min-h-[50vh] bg-body pb-28",children:(0,r.jsxs)("div",{className:"container max-w-5xl px-4 pt-2 sm:px-6 sm:pt-3 lg:max-w-7xl lg:px-8 lg:pt-4",children:[E&&(0,r.jsxs)("nav",{className:"mb-8 flex flex-wrap items-center gap-1 text-sm text-dark/70","aria-label":"Breadcrumb",children:[(0,r.jsx)("button",{type:"button",onClick:function(){C(null),P(null),M(""),L()},className:"font-medium text-accent hover:text-accent-strong",children:"All areas"}),(0,r.jsx)(m.ngD,{className:"size-3.5","aria-hidden":!0}),(0,r.jsx)("button",{type:"button",onClick:T,className:z?"font-medium text-accent hover:text-accent-strong":"text-dark",children:E.label}),z&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.ngD,{className:"size-3.5","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-dark",children:z.label})]})]}),"groups"===A&&(0,r.jsxs)("div",{className:"mb-12 flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between sm:gap-8",children:[(0,r.jsxs)("header",{className:"min-w-0 max-w-[55ch]",children:[(0,r.jsx)("p",{className:"gp-eyebrow",children:"Life moments"}),(0,r.jsx)("h1",{className:"mt-2 font-secondary text-[1.75rem] font-semibold leading-tight tracking-tight text-dark sm:text-4xl",children:"What's happening in your life?"}),(0,r.jsx)("p",{className:"mt-3 text-copy text-dark/70",children:"Choose an area, then a topic. We'll show government services and benefits that match."})]}),N.length>0&&(0,r.jsxs)("div",{className:"flex shrink-0 flex-col items-start sm:items-end",role:"group","aria-label":"Filter by audience",children:[(0,r.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-dark/70",children:"Filter by audience"}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-2 sm:justify-end",children:N.map(e=>{let t=w===e;return(0,r.jsx)("button",{type:"button",onClick:()=>k(t?null:e),"aria-pressed":t,className:`rounded-md px-3 py-1.5 text-sm transition-colors duration-150 ${t?"bg-dark text-white":"bg-white text-dark/75 ring-1 ring-border/60 hover:ring-accent/40"}`,children:e},e)})})]})]}),"groups"!==A&&(0,r.jsx)(f,{step:A}),"tags"===A&&E&&(0,r.jsx)(b,{Icon:E.Icon,title:E.question,meta:`${R(E)}${w?` \xb7 ${w}`:""}`,color:o(E.id)}),"results"===A&&z&&(0,r.jsx)(b,{Icon:z.Icon,title:z.question,meta:`${x(I).join(" \xb7 ")} \xb7 ${u(F,"agency","agencies")}${w?` \xb7 ${w}`:""}`,color:g(z.id)}),"groups"===A&&(0,r.jsxs)("section",{"aria-labelledby":"life-areas-heading",children:[(0,r.jsx)("h2",{id:"life-areas-heading",className:"sr-only",children:"Life areas"}),(0,r.jsx)("div",{className:"grid grid-cols-1 items-stretch gap-5 sm:grid-cols-3 sm:gap-5 lg:gap-6",children:B.map((e,t)=>(0,r.jsx)("div",{className:"gp-fade-in-stagger h-full min-h-0 animate-[fadeIn_0.4s_ease-out_both]",style:{animationDelay:`${45*Math.min(t,11)}ms`},children:(0,r.jsx)(d.y,{Icon:e.Icon,label:e.label,blurb:e.blurb,meta:R(e),color:o(e.id),variant:"compact",onClick:()=>{C(e.id),L()}})},e.id))}),(0,r.jsx)("nav",{className:"mt-12 flex flex-wrap gap-x-6 gap-y-2 text-sm","aria-label":"Full catalogue",children:j.map(({href:e,label:t})=>(0,r.jsx)(n(),{href:e,className:"text-dark/70 underline-offset-4 hover:text-accent-strong hover:underline",children:t},e))})]}),"tags"===A&&E&&(0,r.jsx)("section",{children:U.length>0?(0,r.jsx)("div",{className:"grid grid-cols-1 items-stretch gap-5 sm:grid-cols-3 sm:gap-5 lg:gap-6",children:U.map((e,t)=>(0,r.jsx)("div",{className:"gp-fade-in-stagger h-full min-h-0 animate-[fadeIn_0.4s_ease-out_both]",style:{animationDelay:`${45*Math.min(t,11)}ms`},children:(0,r.jsx)(d.y,{Icon:e.Icon,label:e.label,blurb:e.blurb,meta:x(e.services.filter(e=>h(e,w))).join(" \xb7 "),color:g(e.id)??o(E.id),variant:"compact",onClick:()=>{P(e.id),L()}})},e.id))}):(0,r.jsx)(y,{message:w?`Nothing here applies to ${w} right now.`:"Nothing published in this area yet.",onClear:w?()=>k(null):void 0})}),"results"===A&&z&&(0,r.jsxs)("section",{children:[(0,r.jsxs)("label",{className:"mb-6 flex items-center gap-2 border-b border-border/60 pb-2",children:[(0,r.jsx)(m.JJh,{className:"size-4 text-light","aria-hidden":!0}),(0,r.jsx)("span",{className:"sr-only",children:"Filter results"}),(0,r.jsx)("input",{value:S,onChange:e=>M(e.target.value),placeholder:"Filter by name or agency",className:"w-full bg-transparent text-sm text-dark outline-none placeholder:text-light"}),S&&(0,r.jsx)("button",{type:"button",onClick:()=>M(""),className:"text-xs font-medium text-accent",children:"Clear"})]}),D.length>0?(0,r.jsx)("div",{className:"space-y-8",children:D.map(e=>(0,r.jsxs)("section",{children:[(0,r.jsx)("h3",{className:"mb-1 text-xs font-semibold uppercase tracking-wider text-dark/70",children:e.agency}),(0,r.jsx)("div",{className:"divide-y divide-border/35 rounded-lg bg-white/70 px-3 ring-1 ring-border/35",children:e.items.map(e=>(0,r.jsx)(p,{s:e},e.s+e.t))})]},e.agency))}):(0,r.jsx)(y,{message:S?`No results for “${S}”.`:w?`Nothing here applies to ${w} right now.`:"Nothing published in this topic yet.",onClear:w&&!S?()=>k(null):void 0}),(0,r.jsxs)("div",{className:"mt-14 flex flex-col gap-3 border-t border-border/50 pt-8 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("p",{className:"text-copy text-dark/70",children:"Need a wider search?"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(i.$,{variant:"outline",size:"md",onClick:T,children:"Topics"}),(0,r.jsx)(n(),{className:(0,i.V)("primary","md"),href:"/services",children:"All services"})]})]})]})]})})}function y({message:e,onClear:t}){return(0,r.jsxs)("div",{className:"py-16 text-center",children:[(0,r.jsx)("p",{className:"text-copy text-dark/70",children:e}),t&&(0,r.jsx)("button",{type:"button",onClick:t,className:"mt-3 text-sm font-medium text-accent hover:underline",children:"Clear filter"})]})}var N=s(1842);function w(){return(0,r.jsx)("main",{className:"bg-body pb-28",children:(0,r.jsxs)("div",{className:"container max-w-5xl px-4 pt-2 sm:px-6 sm:pt-3 lg:max-w-7xl lg:px-8",children:[(0,r.jsxs)("div",{className:"mb-12 animate-pulse space-y-3",children:[(0,r.jsx)("div",{className:"h-3 w-20 rounded bg-border/50"}),(0,r.jsx)("div",{className:"h-8 w-4/5 max-w-md rounded bg-border/40"}),(0,r.jsx)("div",{className:"h-4 w-full max-w-lg rounded bg-border/30"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-3 sm:gap-5 lg:gap-6",children:Array.from({length:6}).map((e,t)=>(0,r.jsx)("div",{className:"min-h-[11rem] animate-pulse rounded-2xl bg-white ring-1 ring-border/40 sm:min-h-[12.5rem] lg:min-h-[14.5rem]"},t))})]})})}function k(){return(0,r.jsx)("main",{className:"bg-body pb-28",children:(0,r.jsxs)("div",{className:"container max-w-5xl px-4 pt-3 sm:px-6",children:[(0,r.jsx)("p",{className:"gp-eyebrow",children:"Life moments"}),(0,r.jsx)("h1",{className:"mt-2 font-secondary text-3xl font-semibold tracking-tight text-dark",children:"What's happening in your life?"}),(0,r.jsxs)("div",{className:"mt-12 py-12 text-center",children:[(0,r.jsx)("p",{className:"text-copy text-dark/70",children:"Couldn't load life areas. Try again in a moment."}),(0,r.jsxs)("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[(0,r.jsx)(i.$,{variant:"primary",size:"md",onClick:()=>window.location.reload(),children:"Retry"}),(0,r.jsx)(n(),{className:(0,i.V)("outline","md"),href:"/services",children:"All services"})]})]})]})})}function O(){let e=(0,N.b)();return e.loading?(0,r.jsx)(w,{}):e.error||0===e.GROUPS.length?(0,r.jsx)(k,{}):(0,r.jsx)(v,{MOMENTS:e.MOMENTS,GROUPS:e.GROUPS})}},3220:(e,t,s)=>{"use strict";s.d(t,{k5:()=>d});var r=s(2115),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=r.createContext&&r.createContext(a),i=["attr","size","title"];function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(null,arguments)}function c(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}function o(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(s),!0).forEach(function(t){var r,a,n;r=e,a=t,n=s[t],(a=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(a))in r?Object.defineProperty(r,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[a]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):c(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function d(e){return t=>r.createElement(m,l({attr:o({},e.attr)},t),function e(t){return t&&t.map((t,s)=>r.createElement(t.tag,o({key:s},t.attr),e(t.child)))}(e.child))}function m(e){var t=t=>{var s,{attr:a,size:n,title:c}=e,d=function(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],-1===t.indexOf(s)&&({}).propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}(e,i),m=n||t.size||"1em";return t.className&&(s=t.className),e.className&&(s=(s?s+" ":"")+e.className),r.createElement("svg",l({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,d,{className:s,style:o(o({color:e.color||t.color},t.style),e.style),height:m,width:m,xmlns:"http://www.w3.org/2000/svg"}),c&&r.createElement("title",null,c),e.children)};return void 0!==n?r.createElement(n.Consumer,null,e=>t(e)):t(a)}},4426:(e,t,s)=>{"use strict";s.d(t,{$:()=>l,V:()=>i});var r=s(5155);let a={primary:"bg-accent text-white hover:bg-accent-strong",outline:"border border-accent text-accent hover:bg-accent-tint",ghost:"text-[color:var(--gp-body-strong)] hover:bg-[color:var(--gp-surface-sunken)] hover:text-ink"},n={sm:"h-9 px-4 text-xs",md:"h-11 px-6 text-sm",lg:"h-[3.25rem] px-8 text-base"};function i(e="primary",t="md",s=!1){return["inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full font-semibold","transition-colors duration-150 ease-standard","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/45","disabled:cursor-not-allowed disabled:opacity-50",a[e],n[t],s?"gp-moving-border":""].filter(Boolean).join(" ")}function l({variant:e="primary",size:t="md",animated:s=!1,className:a,type:n="button",...c}){return(0,r.jsx)("button",{type:n,className:`${i(e,t,s)}${a?` ${a}`:""}`,...c})}}},e=>{e.O(0,[5760,8500,3463,8441,3794,7358],()=>e(e.s=824)),_N_E=e.O()}]);

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.