PageSourceSearch

https://hopematch.org/_next/static/chunks/4301-d2e48471f3c073ce.js

js hopematch.org collected 2026-10-05 19:38:12 UTC 17,749 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4301],{85161:function(e,t,a){a.d(t,{Gn:function(){return d},ZO:function(){return u},gN:function(){return h},sg:function(){return p},vN:function(){return c},wP:function(){return m}});var n=a(57437),l=a(2265),s=a(99376),r=a(96362),o=a(45187),i=a(35932);let d="w-full rounded-md border border-hm-mist bg-white px-3 py-2 text-sm text-hm-ink focus:border-hm-sky focus:outline-none focus:ring-2 focus:ring-hm-sky/20",u=d,c="block text-xs font-semibold text-hm-slate mb-1";function h(e){let{label:t,children:a}=e;return(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:c,children:t}),a]})}function m(e,t){let a=(0,s.useRouter)(),[n,r]=(0,l.useState)(t),[o,i]=(0,l.useState)(!1),[d,u]=(0,l.useState)(null),[c,h]=(0,l.useState)(null),[m,p]=(0,l.useState)(null),f=(0,l.useCallback)(()=>{i(!0),h(null)},[]),x=(0,l.useCallback)(async t=>{var a,l,s;let r=await fetch("/api/admin/site/chrome/".concat(e,"/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t,rev:n})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(null!==(l=null!==(a=o.message)&&void 0!==a?a:o.error)&&void 0!==l?l:"Could not save.");return null!==(s=o.rev)&&void 0!==s?s:n},[e,n]),g=(0,l.useCallback)(async e=>{u("save"),p(null),h(null);try{let t=await x(e);r(t),i(!1),h("Draft saved.")}catch(e){p(e instanceof Error?e.message:"Network error while saving.")}finally{u(null)}},[x]),v=(0,l.useCallback)(async t=>{u("publish"),p(null);try{if(o){let e=await x(t);r(e),i(!1)}let l=await fetch("/api/admin/site/chrome/".concat(e,"/publish/"),{method:"POST"});if(!l.ok){var n;let e=await l.json().catch(()=>({}));throw Error(null!==(n=e.message)&&void 0!==n?n:"Publish failed.")}h("Published — your changes are live."),a.refresh()}finally{u(null)}},[o,x,e,a]);return{rev:n,dirty:o,busy:d,msg:c,err:m,markDirty:f,save:g,publish:v}}function p(e){let{title:t,subtitle:a,hasPublished:s,state:i,onSave:d,onPublish:u}=e,[c,h]=(0,l.useState)(!1),{dirty:m,busy:p,msg:f,err:x,rev:g}=i;return(0,n.jsxs)("div",{className:"sticky top-0 z-10 flex flex-wrap items-center justify-between gap-3 border-b border-hm-mist bg-white px-5 py-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate font-display text-lg font-bold text-hm-ink",children:t}),(0,n.jsxs)("p",{className:"truncate text-xs text-hm-slate",children:[a," \xb7 rev ",g," ",s?(0,n.jsx)("span",{className:"text-hm-green",children:"● published"}):(0,n.jsx)("span",{className:"text-hm-gold-dark",children:"○ showing original (not yet published)"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[f&&(0,n.jsx)("span",{className:"text-xs font-medium text-hm-green",children:f}),x&&(0,n.jsx)("span",{className:"text-xs font-medium text-hm-rose",children:x}),m&&(0,n.jsx)("span",{className:"text-xs font-medium text-hm-gold-dark",children:"Unsaved changes"}),(0,n.jsxs)("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-hm-mist px-3 py-1.5 text-sm font-semibold text-hm-charcoal hover:bg-hm-cloud",children:[(0,n.jsx)(r.Z,{className:"h-3.5 w-3.5","aria-hidden":"true"})," View live"]}),(0,n.jsx)("button",{type:"button",onClick:d,disabled:null!==p||!m,className:"rounded-md border border-hm-sky px-4 py-1.5 text-sm font-semibold text-hm-sky hover:bg-hm-sky hover:text-white disabled:cursor-not-allowed disabled:opacity-50",children:"save"===p?"Saving…":"Save draft"}),(0,n.jsx)("button",{type:"button",onClick:()=>h(!0),disabled:null!==p,className:"rounded-md bg-hm-rose px-4 py-1.5 text-sm font-semibold text-white hover:bg-hm-rose-dark disabled:opacity-50",children:"Publish"})]}),(0,n.jsxs)(o.QH,{open:c,onClose:()=>h(!1),title:"Publish these changes?",confirmLabel:"Publish now",busyLabel:"Publishing…",tone:"primary",onConfirm:u,children:["This makes your current draft the live version of the site’s ",t.toLowerCase(),". A restore point is saved automatically."]})]})}Object.keys(i.g5)},74301:function(e,t,a){a.d(t,{cQ:function(){return x},dJ:function(){return v},n8:function(){return p},uC:function(){return f}});var n=a(57437),l=a(2265),s=a(48736),r=a(28921),o=a(96362),i=a(73247),d=a(30401),u=a(35932),c=a(44379),h=a(85161);let m=Object.keys(u.g5);function p(e){var t;return"page"===e.kind?null===(t=c.Qy.find(t=>
1t.path===e.path))||void 0===t?void 0:t.title:"flow"===e.kind?u.g5[e.flow].label:void 0}function f(e){return"page"===e.kind&&!c.Qy.some(t=>t.path===e.path)}function x(e){let{href:t,external:a,onChange:l}=e;return(0,n.jsx)(v,{value:function(e,t){let a=Object.keys(u.g5).find(t=>u.g5[t].href===e);if(a)return{kind:"flow",flow:a};let n=/^(https?:|mailto:|tel:)/i.test(e);return t||n?{kind:"external",url:e,newTab:null==t||t}:{kind:"page",path:e||"/"}}(t,a),onChange:e=>l((0,u.yV)(e))})}let g=[{kind:"page",label:"Page",Icon:s.Z},{kind:"flow",label:"Action",Icon:r.Z},{kind:"external",label:"External",Icon:o.Z}];function v(e){var t;let{value:a,onChange:l}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("div",{role:"tablist","aria-label":"Link type",className:"flex rounded-lg border border-hm-mist bg-hm-snow p-0.5",children:g.map(e=>{let{kind:t,label:s,Icon:r}=e;return(0,n.jsxs)("button",{type:"button",role:"tab","aria-selected":a.kind===t,onClick:()=>{var e,n;t!==a.kind&&("page"===t?l({kind:"page",path:null!==(n=null===(e=c.Qy[0])||void 0===e?void 0:e.path)&&void 0!==n?n:"/"}):"flow"===t?l({kind:"flow",flow:"donate"}):l({kind:"external",url:"https://",newTab:!0}))},className:"flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-semibold transition ".concat(a.kind===t?"bg-white text-hm-sky shadow-sm":"text-hm-slate hover:text-hm-charcoal"),children:[(0,n.jsx)(r,{className:"h-3.5 w-3.5"})," ",s]},t)})}),"page"===a.kind&&(0,n.jsx)(b,{value:a.path,onChange:e=>l({kind:"page",path:e})}),"flow"===a.kind&&(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:h.vN,children:"Which action"}),(0,n.jsx)("select",{className:h.Gn,value:a.flow,onChange:e=>l({kind:"flow",flow:e.target.value}),children:m.map(e=>(0,n.jsx)("option",{value:e,children:u.g5[e].label},e))})]}),"external"===a.kind&&(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:h.vN,children:"External web address"}),(0,n.jsx)("input",{className:h.Gn,value:a.url,placeholder:"https://example.com",onChange:e=>l({kind:"external",url:e.target.value,newTab:a.newTab})})]}),(0,n.jsxs)("label",{className:"flex items-center gap-2 text-xs font-medium text-hm-charcoal",children:[(0,n.jsx)("input",{type:"checkbox",checked:null===(t=a.newTab)||void 0===t||t,onChange:e=>l({kind:"external",url:a.url,newTab:e.target.checked}),className:"h-4 w-4 rounded border-hm-mist text-hm-sky focus:ring-hm-sky/30"}),"Open in a new tab"]})]})]})}function b(e){var t;let{value:a,onChange:s}=e,[r,o]=(0,l.useState)(!1),[u,m]=(0,l.useState)(""),p=(0,l.useRef)(null),f=c.Qy.find(e=>e.path===a),x=(0,l.useMemo)(()=>{let e=u.trim().toLowerCase(),t=c.Qy.filter(t=>!e||t.title.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)),a=new Map;for(let e of t){var n;let t=null!==(n=a.get(e.group))&&void 0!==n?n:[];t.push(e),a.set(e.group,t)}return Array.from(a.entries())},[u]);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("span",{className:h.vN,children:"Points to page"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(i.Z,{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-hm-slate"}),(0,n.jsx)("input",{className:"".concat(h.Gn," pl-8"),value:r?u:null!==(t=null==f?void 0:f.title)&&void 0!==t?t:a,placeholder:"Search pages…",role:"combobox","aria-expanded":r,onFocus:()=>{p.current&&clearTimeout(p.current),m(""),o(!0)},onChange:e=>m(e.target.value),onBlur:()=>{p.current=setTimeout(()=>o(!1),150)}})]}),!f&&!r&&(0,n.jsxs)("p",{className:"mt-1 text-[0.7rem] font-semibold text-hm-rose",children:["⚠ Unknown page (",a,") — pick a page or use External."]}),r&&(0,n.jsxs)("ul",{className:"absolute z-20 mt-1 max-h-72 w-full overflow-y-auto rounded-lg border border-hm-mist bg-white py-1 shadow-card",children:[0===x.length&&(0,n.jsx)("li",{className:"px-3 py-2 text-xs text-hm-slate",children:"No matching pages."}),x.map(e=>{let[t,l]=e;return(0,n.jsxs)("li",{children:[(0,n.jsx)("p",{className:"px-3 pb-0.5 pt-2 text-[0.65rem] font-bold uppercase tracking-wide text-hm-slate",children:t}),l.map(e=>(0,n.jsxs)("button",{type:"button",onMouseDown:t=>{t.preventDefault(),s(e.path),o(!1)},className:"flex w-full items-center justify-between gap-2 px-3 py-1.5 text-left text-sm text-hm-ink hover:bg-hm-cloud",children:[(0,n.jsxs)("span",{className:"truncate",children:[e.title,e.note?(0,n.jsxs)("span",{className:"ml-1 text-[0.7rem] text-hm-gold-dark",children:["\xb7 ",e.note]}):null]}),e.path===a?(0,n.jsx)(d.Z,{className:"h-4 w-4 shrink-0 text-hm-sky"}):(0,n.jsx)("span",{className:"shrink-0 text-[0.7rem] text-hm-slate",children:e.path})]},e.path))]},t)})]})]})}},45187:function(e,t,a){a.d(t,{QH:function(){return i},Vq:function(){return o}});var n=a(57437),l=a(2265),s=a(54887);let r='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not
1([tabindex="-1"])';function o(e){let{open:t,onClose:a,title:o,children:i,footer:d,locked:u=!1,size:c="max-w-md"}=e,h=(0,l.useRef)(null),m=(0,l.useId)(),[p,f]=(0,l.useState)(!1);(0,l.useEffect)(()=>f(!0),[]),(0,l.useEffect)(()=>{if(!t)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),(0,l.useEffect)(()=>{if(!t)return;let e=document.activeElement,a=h.current;if(a){var n;let e=null!==(n=a.querySelector("[data-autofocus]"))&&void 0!==n?n:a.querySelector(r);(null!=e?e:a).focus()}return()=>{var t;return null==e?void 0:null===(t=e.focus)||void 0===t?void 0:t.call(e)}},[t]);let x=(0,l.useCallback)(e=>{if("Escape"!==e.key||u||(e.stopPropagation(),a()),"Tab"===e.key&&h.current){let t=Array.from(h.current.querySelectorAll(r)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let a=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===a?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),a.focus())}},[u,a]);return p&&t?(0,s.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[70] flex items-end justify-center p-4 sm:items-center",onKeyDown:x,children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-hm-ink/40 backdrop-blur-[2px] motion-safe:animate-[hm-fade-in_150ms_ease-out]",onClick:u?void 0:a,"aria-hidden":"true"}),(0,n.jsxs)("div",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":m,tabIndex:-1,className:"relative w-full ".concat(c," rounded-2xl border border-hm-mist bg-white shadow-float outline-none motion-safe:animate-[hm-pop-in_180ms_ease-out]"),children:[(0,n.jsx)("div",{className:"px-6 pt-5",children:(0,n.jsx)("h2",{id:m,className:"font-display text-lg font-bold text-hm-ink",children:o})}),(0,n.jsx)("div",{className:"px-6 py-4 text-sm leading-relaxed text-hm-charcoal",children:i}),d&&(0,n.jsx)("div",{className:"flex flex-col-reverse gap-2 rounded-b-2xl border-t border-hm-cloud bg-hm-snow px-6 py-4 sm:flex-row sm:justify-end",children:d})]})]}),document.body):null}function i(e){let{open:t,onClose:a,title:s,children:r,confirmLabel:i,busyLabel:d="Working…",cancelLabel:u="Cancel",tone:c="primary",onConfirm:h,confirmDisabled:m=!1}=e,[p,f]=(0,l.useState)(!1),[x,g]=(0,l.useState)(null);async function v(){f(!0),g(null);try{await h(),a()}catch(e){g(e instanceof Error?e.message:"Something went wrong. Please try again.")}finally{f(!1)}}return(0,l.useEffect)(()=>{t&&(f(!1),g(null))},[t]),(0,n.jsxs)(o,{open:t,onClose:a,title:s,locked:p,footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:a,disabled:p,className:"inline-flex items-center justify-center rounded-md border border-hm-mist bg-white px-5 py-2.5 text-sm font-semibold text-hm-charcoal transition-colors hover:bg-hm-cloud focus:outline-none focus-visible:ring-2 focus-visible:ring-hm-sky focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",children:u}),(0,n.jsxs)("button",{type:"button","data-autofocus":!0,onClick:v,disabled:p||m,className:"inline-flex items-center justify-center gap-2 rounded-md px-5 py-2.5 text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-hm-sky focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 ".concat("danger"===c?"bg-hm-rose text-white hover:bg-hm-rose-dark":"bg-hm-sky text-white hover:bg-hm-sky-dark"),children:[p&&(0,n.jsx)("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-white/40 border-t-white","aria-hidden":"true"}),p?d:i]})]}),children:[r,x&&(0,n.jsx)("p",{role:"alert",className:"mt-3 rounded-md bg-hm-rose/5 px-3 py-2 text-xs font-medium text-hm-rose",children:x})]})}},44379:function(e,t,a){a.d(t,{Qy:function(){return n}});let n=[{path:"/",title:"Home",group:"Main",note:"has live campaign data",servedFromBuilder:!0},{path:"/who-we-are/",title:"Who We Are",group:"Main",servedFromBuilder:!0},{path:"/what-we-do/",title:"What We Do",group:"Programs",servedFromBuilder:!0},{path:"/what-we-do/back-to-school-bash/",title:"Back to School Bash",group:"Programs",servedFromBuilder:!0},{path:"/what-we-do/christmas/",title:"Christmas",group:"Programs",servedFromBuilder:!0},{path:"/what-we-do/pop-up-shop/",title:"Pop-Up Shop",group:"Programs",servedFromBuilder:!0},{path:"/what-we-do/project-celebrate/",title:"Project Celebrate",group:"Programs",servedFromBuilder:!0},{path:"/what-we-do/identity-groups/",title:"Identity Groups",group:"Programs",servedFromBuilder:!0},{path:"/campaigns/",title:"Campaigns",group:"Programs",note:"shows your live campaign cards",servedFromBuilder:!0},{path:"/get-involved/",title:"Get Involved",group:"Get Involved",servedFromBuilder:!0},{path:"/get-involved/volunteer/",title:"Volunteer",group:"Get Involved",note:"has the volunteer sign-up form",servedFromBuilder:!0},{path:"/get-involved/partner/",title:"Partner",group:"Get Involved",servedFromBuilder:!0},{path:"/get-involved/donate/",title:"Donate — Ways to Give",group:"Get Involved",note:"the page that explains giving",servedFromBuilder:!0},{path:"/donate/",title:"Donate form",group:"Get Involved",note:"the actual giving form",servedFromBuilder:!1,codedReason:"This is the page with the live giving form on it, so it always shows its coded version. To change wording about giving, edit “Donate — Ways to Give”."},{path:"/nominate/",title:"Nominate a Family",group:"Get Involved",note:"has the nomination form",servedFromBuilder:!0},{path:"/testimonials/",title:"Testimonials",group:"About",servedFromBuilder:!0},{path:"/media/",title:"Media",group:"About",servedFromBuilder:!0},{path:"/contact-us/",title:"Contact Us",group:"About",note:"has a contact form",servedFromBuilder:!1,codedReason:"This page is built around the contact form, so it still shows its original co
1ded version. Changes saved here will not appear on the site yet."},{path:"/privacy-policy/",title:"Privacy Policy",group:"Legal",servedFromBuilder:!1,codedReason:"The privacy policy is a legal document, so it always shows the coded version. Ask a developer to change this text."}];[...n.map(e=>e.path),...[{path:"/families/",title:"Sponsor a family",reason:"Shows the families available to sponsor right now — always live."},{path:"/families/assessment/",title:"Family assessment",reason:"A private form for families we already serve."},{path:"/what-we-do/identity-groups/sign-up/",title:"Identity Groups sign-up",reason:"Built around its sign-up form."},{path:"/terms-and-conditions/",title:"Terms & Conditions",reason:"Legal text — ask a developer to change it."},{path:"/support-staff/",title:"Support staff",reason:"A small coded page for the staff who help at events."},{path:"/sms/preferences/",title:"Text message preferences",reason:"Required by the phone carriers; kept out of search results."},{path:"/email/preferences/",title:"Email preferences",reason:"Where people choose which emails they get."}].map(e=>e.path)]},35932:function(e,t,a){function n(e){if(!e)return"/";let t=e.split("?")[0].split("#")[0];return t.startsWith("/")||(t="/"+t),t.length>1&&!t.endsWith("/")&&(t+="/"),t}function l(e,t){var a,l,s,r,o;let i=n(t),d=null===(a=e.assignments)||void 0===a?void 0:a.find(e=>n(e.path)===i),u=null!==(l=null==d?void 0:d.templateId)&&void 0!==l?l:e.defaultTemplateId;return null!==(o=null!==(r=null!==(s=e.templates.find(e=>e.id===u))&&void 0!==s?s:e.templates.find(t=>t.id===e.defaultTemplateId))&&void 0!==r?r:e.templates[0])&&void 0!==o?o:null}a.d(t,{g5:function(){return s},rb:function(){return l},yV:function(){return r}});let s={donate:{label:"Donate",href:"/donate/",external:!1},nominate:{label:"Nominate a family",href:"https://adoption.hopematch.org/nominate",external:!0},volunteer:{label:"Volunteer",href:"/get-involved/volunteer/",external:!1},identityGroupsSignUp:{label:"Identity Groups sign-up",href:"/what-we-do/identity-groups/sign-up",external:!1},sponsorBasket:{label:"Sponsor a Hope Basket",href:"/donate/?designation=event&eventId=evt-hope-baskets-demo",external:!1},amazonWishList:{label:"Amazon Wish List",href:"https://www.amazon.com/hz/wishlist/ls/3RDRWHCLLKCSI?ref_=wl_share",external:!0}};function r(e){switch(e.kind){case"page":return{href:e.path,external:!1};case"flow":return{href:s[e.flow].href,external:s[e.flow].external};case"external":var t;return{href:e.url,external:null===(t=e.newTab)||void 0===t||t}}}}}]);

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.