PageSourceSearch

https://www.birminghamal.gov/_next/static/chunks/pages/events/calendar-beb8bd78deaceddc.js

js birminghamal.gov collected 2026-10-02 02:57:45 UTC 9,377 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[682],{9827:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/events/calendar",function(){return a(972)}])},37:function(e,t,a){"use strict";a.d(t,{Y:function(){return m}});var n=a(2322),r=a(2784),l=a(9097),i=a.n(l),s=a(1286),c=a(5632),o=a(5705),d=a(6925),u=a(4978);let p="https://content.birminghamal.gov/api/alerts/www";function m(e){var t;let{midSection:a,children:l,header:m,footer:h,topSection:f,extraPrefaceWrapperClasses:v,extraChildWrapperClasses:g}=e,y=(0,c.useRouter)(),{data:_,error:x}=(0,s.ZP)(p,u.C,{refreshInterval:3e4,revalidateOnFocus:!0,revalidateIfStale:!0,dedupingInterval:0,keepPreviousData:!1,revalidateOnReconnect:!0}),b=null!==(t=null==_?void 0:_.alerts)&&void 0!==t?t:[];x&&console.log("Error fetching alerts:",x),(0,r.useEffect)(()=>{let e=()=>(0,s.JG)(p);return y.events.on("routeChangeComplete",e),()=>{y.events.off("routeChangeComplete",e)}},[y.events]);let j=(0,r.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.n,{}),b.length>0&&b.map(e=>{var t;return(0,n.jsx)("section",{id:"alert-content","aria-label":"Site alert",children:(0,n.jsx)(o.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)(i(),{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=j.current)||void 0===t||t.focus()}},tabIndex:0,children:"Skip to main content"}),(0,n.jsx)(o.h4,{...m}),(0,n.jsx)("main",{className:"pb-s dark:bg-coolGray-10 dark:text-white",id:"main-content",tabIndex:-1,ref:j,children:(0,n.jsxs)("div",{className:"container",children:[f&&(0,n.jsx)("div",{className:"w-full",children:f}),a&&(0,n.jsx)("div",{className:v,children:a}),(0,n.jsxs)("div",{className:g,children:[l?null:(0,n.jsx)(o.Vm,{}),l]})]})}),(0,n.jsx)(o.$_,{...h})]})}},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,r=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,r,l;window.mixpanel=t,t._i=[],t.init=function(e,a,n){var i=t;for(void 0!==n?i=t[n]=[]:n="mixpanel",i.people=i.people||[],i.toString=function(e){var t="mixpanel";return"mixpanel"!==n&&(t+="."+n),e||(t+=" (stub)"),t},i.people.toString=function(){return i.toString(1)+".people (stub)"},r="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<r.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)))}}(i,r[l]);var s="set set_once union unset remove delete".split(" ");i.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)),i.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 i={subsite:"www",page_title:r||t.title,protected_access:l||null};null===r&&(i.page_title=t.title,i.page_type=e,i.department=a,i.categories=n,null!==e&&(i.node_id=t.id,i.last_updated=t.changed)),mixpanel.track_pageview(i)}a.d(t,{c:function(){return n}})},972:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return v},default:function(){return g}});var n=a(2322),r=a(2784),l=a(5632),i=a(210),s=a(2359),c=a(854),o=a(6094),d=a(7617),u=a(5705),p=a(31),m=a(37),h=a(4100),f=a(542),v=!0;function g(e){let{layout:t,categories:a,departments:v,districts:g}=e,[y,_]=(0,r.useState)(""),[x,b]=(0,r.useState)(new Date),j=(0,l.useRouter)(),[S,w]=(0,r.useState)(""),[k,C]=(0,r.useState)(""),[N,E]=(0,r.useState)(""),[D,A]=(0,r.useState)(""),[R,L]=(0,r.useState)(""),[M,I]=(0,r.useState)(""),[T,q]=(0,r.useState)([]),[P,W]=(0,r.useState)(!0),U=j.query,B=e=>Array.isArray(e)?e[0]:e||"",[O,F]=(0,r.useState)(U.search||""),[V,z]=(0,r.useState)(U.category||""),[X,G]=(0,r.useState)(U.department||""),[K,Y]=(0,r.useState)(U.district||""),[Z,H]=(0,r.useState)(!1);(0,r.useEffect)(()=>
1{if(j.isReady){let e=j.query,t=e=>Array.isArray(e)?e[0]:e||"";F(t(e.search)),z(t(e.category)),G(t(e.department)),Y(t(e.district))}},[j.isReady,j.query]),(0,r.useEffect)(()=>{(0,f.c)(null,null,null,null,"Event Calendar")},[]),(0,r.useEffect)(()=>{_(new Date().toISOString().split("T")[0])},[]);let J=(0,r.useMemo)(()=>(0,i.N)(x),[x]),$=(0,r.useMemo)(()=>(0,s.V)(x),[x]),Q=(0,r.useCallback)(async()=>{W(!0);let e=k||(0,c.WU)(J,"yyyy-MM-dd"),t=N||(0,c.WU)($,"yyyy-MM-dd");try{let a=new URLSearchParams({fromDate:e,toDate:t,search:S||"",department:R||"",category:D||"",district:M||""}),n=await fetch("/api/search/events-calendar?".concat(a.toString())),r=await n.json();r&&r.graphqlEventsCalendarSearchWww?q(r.graphqlEventsCalendarSearchWww.results||[]):console.error("Unexpected data structure:",r)}catch(e){console.error("Failed to fetch events",e)}finally{W(!1)}},[k,J,N,$,S,R,D,M]);(0,r.useEffect)(()=>{Q()},[Q]);let ee=t.name?t.name:"CitizenForward";return(0,r.useEffect)(()=>{if(j.isReady){let e=j.query;(e.search||e.category||e.department||e.eventType)&&(w(B(e.search)),A(B(e.category)),L(B(e.department)),I(B(e.district)),H(!0))}},[j.isReady,j.query]),(0,n.jsx)(p.W,{children:(0,n.jsxs)(m.Y,{header:t.header,footer:t.footer,topSection:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u.KI,{heading:"Calendar",date:y,padding:!0,page:"month",breadcrumbs:[{title:"Home",url:"/",internal:!0,__typename:"Link"},{title:"Events",url:"/events",internal:!0,__typename:"Link"},{title:"Calendar",url:"#",internal:!0,__typename:"Link"}]})}),midSection:function(e,t,a){let r=()=>{w(B(O)),A(B(V)),L(B(X)),I(B(K)),H(!0),j.push({pathname:"/events/calendar",query:{search:B(O),category:B(V),department:B(X),district:B(K)}})};return(0,n.jsxs)(u.S6,{title:"Filters",children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("label",{className:"font-medium",children:"Search"}),(0,n.jsx)("input",{type:"text",value:O,onChange:e=>F(e.target.value),placeholder:"Search by title or summary","aria-label":"Search",onKeyDown:e=>{"Enter"===e.key&&r()}})]}),(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("label",{className:"font-medium",children:"By Category"}),(0,n.jsxs)("select",{name:"Category",id:"CategoryTerm",onChange:e=>z(e.target.value),value:V,"aria-label":"Select 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:"mb-4",children:[(0,n.jsx)("label",{className:"font-medium",children:"By Department"}),(0,n.jsxs)("select",{name:"Departments",id:"DepartmentTerm",onChange:e=>G(e.target.value),value:X,"aria-label":"Select 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:"mb-4",children:[(0,n.jsx)("label",{className:"font-medium",children:"By District"}),(0,n.jsxs)("select",{name:"District",id:"DistrictTerm",onChange:e=>Y(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:"flex",children:[(0,n.jsx)(u.zx,{onClick:r,title:"Apply",ariaLabel:"Apply",additionalClasses:"mt-1"}),Z&&(0,n.jsx)(u.zx,{onClick:()=>{F(""),z(""),G(""),w(""),C(""),E(""),A(""),L(""),H(!1),j.push({pathname:"/events/calendar",query:{}})},title:"Reset",ariaLabel:"Reset filters",buttonStyle:"secondary",additionalClasses:"mt-1 ml-2"})]})]})}(a,v,g),extraPrefaceWrapperClasses:"w-full mb-s",extraChildWrapperClasses:"w-full",children:[(0,n.jsx)(h.S,{title:"Events Calendar | ".concat(ee),siteName:ee,description:"View a calendar of ".concat(ee," events that you can filter to find what you need."),norobots:"true"}),(0,n.jsx)("div",{children:P?(0,n.jsx)(u.WE,{}):(0,n.jsx)(u.f,{events:T,currentDate:x,onPreviousMonth:()=>{b((0,o.W)(x,1))},onNextMonth:()=>{b((0,d.z)(x,1))}})})]})})}}},function(e){e.O(0,[538,436,335,888,774,179],function(){return e(e.s=9827)}),_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.