PageSourceSearch

https://www.birminghamal.gov/_next/static/chunks/pages/news-95068b6b6478b371.js

js birminghamal.gov collected 2026-10-02 02:57:52 UTC 11,957 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[134],{402:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/news",function(){return a(390)}])},5643:function(e,t,a){"use strict";a.d(t,{k:function(){return m}});var n=a(2322),i=a(2784),l=a(9097),r=a.n(l),s=a(1286),o=a(5632),c=a(5705),d=a(6925),u=a(4978);let p="https://content.birminghamal.gov/api/alerts/www";function m(e){var t;let{children:a,header:l,footer:m}=e,h=(0,o.useRouter)(),{data:g,error:v}=(0,s.ZP)(p,u.C,{refreshInterval:3e4,revalidateOnFocus:!0,revalidateIfStale:!0,dedupingInterval:0,keepPreviousData:!1,revalidateOnReconnect:!0}),f=null!==(t=null==g?void 0:g.alerts)&&void 0!==t?t:[];v&&console.log("Error fetching alerts:",v),(0,i.useEffect)(()=>{let e=()=>(0,s.JG)(p);return h.events.on("routeChangeComplete",e),()=>{h.events.off("routeChangeComplete",e)}},[h.events]);let x=(0,i.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.n,{}),f.length>0&&f.map(e=>{var t;return(0,n.jsx)("section",{id:"alert-content","aria-label":"Site alert",children:(0,n.jsx)(c.bZ,{id:e.id,severity:e.severity,title:e.title,body:"string"==typeof e.body?e.body:(null===(t=e.body)||void 0===t?void 0:t.processed)||"",icon:"message-exclamation",dismissible:"emergency"!==e.severity})},e.id)}),(0,n.jsx)(r(),{href:"#main-content",className:"absolute overflow-hidden h-[1px] w-[1px] focus:static focus:w-auto focus:h-auto focus:border-2 focus:border-black",onKeyDown:e=>{if("Enter"===e.key||" "===e.key){var t;e.preventDefault(),null===(t=x.current)||void 0===t||t.focus()}},tabIndex:0,children:"Skip to main content"}),(0,n.jsx)(c.h4,{...l}),(0,n.jsxs)("main",{className:"w-full dark:bg-coolGray-10",id:"main-content",tabIndex:-1,ref:x,children:[a?null:(0,n.jsx)(c.Vm,{}),a]}),(0,n.jsx)(c.$_,{...m})]})}},542:function(e,t,a){"use strict";function n(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;void 0===window.mixpanel&&function(e,t){if(!t.__SV){var a,n,i,l;window.mixpanel=t,t._i=[],t.init=function(e,a,n){var r=t;for(void 0!==n?r=t[n]=[]:n="mixpanel",r.people=r.people||[],r.toString=function(e){var t="mixpanel";return"mixpanel"!==n&&(t+="."+n),e||(t+=" (stub)"),t},r.people.toString=function(){return r.toString(1)+".people (stub)"},i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),l=0;l<i.length;l++)!function(e,t){var a=t.split(".");2==a.length&&(e=e[a[0]],t=a[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(r,i[l]);var s="set set_once union unset remove delete".split(" ");r.get_group=function(){for(var e={},t=["get_group"].concat(Array.prototype.slice.call(arguments,0)),a=0;a<s.length;a++)!function(a){e[a]=function(){call2_args=arguments,call2=[a].concat(Array.prototype.slice.call(call2_args,0)),r.push([t,call2])}}(s[a]);return e},t._i.push([e,a,n])},t.__SV=1.2,(a=e.createElement("script")).type="text/javascript",a.async=!0,a.src="undefined"!=typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",(n=e.getElementsByTagName("script")[0]).parentNode.insertBefore(a,n)}}(document,window.mixpanel||[]),mixpanel.init("f6049e293b681dae7303948b362cff82",{track_pageview:!1,persistence:"localStorage"});let r={subsite:"www",page_title:i||t.title,protected_access:l||null};null===i&&(r.page_title=t.title,r.page_type=e,r.department=a,r.categories=n,null!==e&&(r.node_id=t.id,r.last_updated=t.changed)),mixpanel.track_pageview(r)}a.d(t,{c:function(){return n}})},390:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return u},default:function(){return p}});var n=a(2322),i=a(2784),l=a(5705),r=a(3881),s=a(4100),o=a(5643);let c=e=>{let{layout:t,loading:a,articles:i,topArticle:c,totalPages:d,currentPage:u,siteName:p,setCurrentPage:m,onPrev:h,onNext:g,handlePageChange:v,topSection:f,filters:x}=e;return(0,n.jsxs)(o.k,{header:t&&t.header,footer:t&&t.footer,children:[(0,n.jsx)(s.S,{title:"News | ".concat(p),siteName:p,description:"View, filter and browse a listing of ".concat(p," news articles."),norobots:"true"}),c?(0,n.jsx)("div",{className:"bg-coolGray-20 mb-6",children:(0,n.jsx)(l.sO,{preHeading:"News",heading:c.shortTitle?c.shortTitle:c.title,subheading:c.summary,image:c.image?c.image.mediaImage:void 0,button:c.path?{url:c.path,title:"View Article",ariaLabel:"View Article ".concat(c.title)}:void 0,variant:"listing"})}):(0,n.jsx)("div",{className:"container",children:f}),(0,n.jsx)("div",{className:"border-b border-b-neutral-200 dark:border-b-neutral-800",children:(0,n.jsx)("div",{className:"container",children:x})}),(0,n.jsx)("div",{children:a?(0,n.jsx)("div",{className:"container",children:(0,n.jsx)(l.An,{})}):(0,n.jsxs)(n.Fragment,{children:[i&&i.length>0?(0,n.jsx)("div",{className:"mt-0 divide-y divide-solid dark:divide-neutral-800",children:i.map(e=>
1(0,n.jsx)(l.QH,{title:e.shortTitle?e.shortTitle:e.title,description:e.summary,buttonUrl:e.path,buttonText:"Read Article",buttonAriaLabel:"Read Article ".concat(e.title),date:e.publicationTime?(0,r.p6)(e.publicationTime):"",preTitle:e.articleType?e.articleType.name:void 0,imagePath:e.image?e.image.mediaImage.url:void 0,imageAlt:e.image&&e.image.mediaImage.alt?"":"undefined",additionalClasses:"mb-8 md:mb-12 block pt-8 md:pt-12",buttonStyle:"secondary",imageAlignment:"right",department:e.department&&e.department.name,container:!0},e.id))}):(0,n.jsx)("p",{children:"No results were found"}),(0,n.jsx)("div",{children:(0,n.jsx)(l.uE,{onFirst:()=>{m(0),window.scrollTo({top:0,behavior:"smooth"})},onPrevious:h,onNext:g,onLast:()=>{m(d-1),window.scrollTo({top:0,behavior:"smooth"})},totalPages:d,currentPage:u,onPageChange:v,additionalClasses:"justify-center"})})]})})]})};var d=a(542),u=!0;function p(e){let{layout:t,categories:a,departments:r,districts:s}=e,[o,u]=(0,i.useState)([]),[p,m]=(0,i.useState)(null),[h,g]=(0,i.useState)(0),[v,f]=(0,i.useState)(""),[x,_]=(0,i.useState)(""),[b,w]=(0,i.useState)(""),[y,j]=(0,i.useState)(""),[S,k]=(0,i.useState)(""),[N,C]=(0,i.useState)(""),[A,T]=(0,i.useState)(0),[E,D]=(0,i.useState)(0),[I,P]=(0,i.useState)(0),[L,F]=(0,i.useState)(null),[B,O]=(0,i.useState)(!1),[R,V]=(0,i.useState)(""),[M,U]=(0,i.useState)(""),[q,z]=(0,i.useState)(""),[G,W]=(0,i.useState)(""),[X,H]=(0,i.useState)(""),[K,Z]=(0,i.useState)(""),[J,Q]=(0,i.useState)(!1),$=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";O(!0);try{var s;let o=await fetch("/api/search/articles?page=".concat(e,"&search=").concat(t,"&fromDate=").concat(a,"&toDate=").concat(n,"&category=").concat(i,"&department=").concat(l,"&district=").concat(r)),c=await o.json();T(c.graphqlArticlesSearchWww.pageInfo.total),D(c.graphqlArticlesSearchWww.pageInfo.pageSize),u((null==c?void 0:null===(s=c.graphqlArticlesSearchWww)||void 0===s?void 0:s.results)||[])}catch(e){console.error("Failed to fetch articles",e)}finally{O(!1)}},Y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";try{let r=await fetch("/api/search/articles?page=0&search=".concat(e,"&fromDate=").concat(t,"&toDate=").concat(a,"&category=").concat(n,"&department=").concat(i,"&district=").concat(l)),s=await r.json();F(s.graphqlArticlesSearchWww.pageInfo.total)}catch(e){console.error("Failed to fetch initial total results for search term",e)}};(0,i.useEffect)(()=>{(0,d.c)(null,null,null,null,"News")},[]),(0,i.useEffect)(()=>{g(0),Y(v,x,b,y,S,N)},[v,x,b,y,S,N]),(0,i.useEffect)(()=>{$(h,v,x,b,y,S,N)},[h,v,x,b,y,S,N]),(0,i.useEffect)(()=>{null!==L&&E>0&&P(Math.ceil(L/E))},[L,E]),(()=>{if(p)return;let e=o.findIndex(e=>!0===e.sticky);if(-1!==e){let t=o[e];u(o.filter((t,a)=>a!==e)),m(t)}})();let ee=t.name?t.name:"CitizenForward";return(0,n.jsx)(c,{layout:t,loading:B,articles:o,topArticle:p,totalPages:I,currentPage:h,siteName:ee,setCurrentPage:g,onPrev:()=>{g(e=>e-1),window.scrollTo({top:0,behavior:"smooth"})},onNext:()=>{g(e=>e+1),window.scrollTo({top:0,behavior:"smooth"})},handlePageChange:e=>{g(e),window.scrollTo({top:0,behavior:"smooth"})},topSection:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Oo,{links:[{title:"Home",url:"/",internal:!0,__typename:"Link"},{title:"News",url:"#",internal:!0,__typename:"Link"}],numberOfItems:3}),(0,n.jsx)(l.mr,{heading:"News"})]}),filters:function(e,t,a,i){let r,s;let o=()=>{f(R),_(M),w(q),j(G),k(X),C(K),Q(!0)};return r="mb-4 md:mb-0 md:w-1/5",s="md:w-50 self-end",(0,n.jsxs)(l.Zo,{direction:"row",title:"Filter Articles",children:[(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("label",{className:"text-sm dark:text-white",children:"By Keyword"}),(0,n.jsx)("input",{type:"text",value:R,onChange:e=>V(e.target.value),placeholder:"Search by title or summary","aria-label":"Search",onKeyDown:e=>{"Enter"===e.key&&o()}})]}),(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("label",{className:"text-sm dark:text-white",children:"By Date"}),(0,n.jsxs)("div",{className:"grid gap-2 grid-cols-2",children:[(0,n.jsx)("input",{type:"date",value:M,onChange:e=>U(e.target.value),"aria-label":"From"}),(0,n.jsx)("input",{type:"date",value:q,onChange:e=>z(e.target.value),"aria-label":"To"})]})]}),(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("label",{className:"text-sm dark:text-white",children:"By Department"}),(0,n.jsxs)("select",{name:"Departments",id:"DepartmentTerm",onChange:e=>H(e.target.value),value:X,"aria-label":"Department",children:[(0,n.jsx)("option",{value:"",children:"Any"}),t&&t.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("label",{className:"text-sm dark:text-white",children:"By Category"}),(0,n.jsxs)("select",{name:"Category",id:"CategoryTerm",onChange:e=>W(e.target.value),value:G,"aria-label":"Category",children:[(0,n.jsx)("option",{value:"",children:"Any"}),e&&e.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("label",{className:"text-sm dark:text-white",children:"By District"}),(0,n.jsxs)("select",{name:"District",id:"DistrictTerm",onChange:e=>Z(e.target.value),value:K,"aria-label":"District",children:[(0,n.jsx)("option",{value:"",children:"Any"}),a&&a.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,n.jsxs)("div",{className:s,children:[(0,n.jsx)(l.zx,{onClick:o,title:"Ap
1ply",additionalClasses:"mr-3",ariaLabel:"Apply"}),J&&(0,n.jsx)(l.zx,{onClick:()=>{V(""),U(""),z(""),W(""),H(""),f(""),_(""),w(""),j(""),k(""),C(""),Q(!1)},title:"Reset",ariaLabel:"Reset filters"})]})]})}(a,r,s,0)})}}},function(e){e.O(0,[538,436,335,888,774,179],function(){return e(e.s=402)}),_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.