1import{f as N,u as k}from"./utils-Cw_CyOto.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as l,L as C}from"./chunk-JZWAC4HX-CWXBk4Fr.js";import{M as j}from"./membership-features-9qmRLbOI.js";import{X as F}from"./dialog-CKQmONq-.js";import{u as L}from"./useCiviqOfficials-CYMAllK0.js";import{a as M,c as O}from"./useUserLocation-DMJ0ctEY.js";import{p as S}from"./officialsIndex.client-BLEB-FD6.js";const T=2979,W=N(T,"Federal")??"/feed/2979/federal",A={pages:"Add pages for the places and topics you care about, and set up your front page your way.",issues:"Follow issues from announcement to outcome, with every story along the way.",officials:"Follow stories, topics and officials, and hear when they move.",cards:"Arrange your front page around the places and subjects you follow.",details:"See every key point, the numbers, claims, people and impact behind each story.",timeline:"Follow issues from announcement to outcome, with every story along the way.",follow:"Follow stories, topics and officials, and hear when they move.",comments:"Join the conversation with other members.",wtm:"See what each story means for you, based on where you live.",general:"Add pages, track issues and officials, and see what every vote means for you."},I=l.createContext({open:()=>{}});function V(){return l.useContext(I)}const P={issues:{head:"Issue tracking is still being built",body:"Tracking walks one ordinance across every meeting that touches it, from proposal to vote. It is a separate thing from following a place or a topic, which works today. The data model behind the walk does not exist yet, so the module above is a preview of the shape rather than a live tracker."},cards:{head:"More card types are coming",body:"You can already choose what fills each row of your front page â places, topics and categories. Alert cards, officials cards and topic-pulse cards are drawn in the strip below but are not built yet."},officials:{head:"Official watchlists are still being built",body:"Following a named official through their votes needs a per-official record we do not assemble yet. Your representatives are listed today under My Representatives."},details:{head:"You already have this",body:"Key details are open to you â key points, the numbers, claims, people and impact. If a tab is empty, that article had nothing under it rather than something withheld."},timeline:{head:"You already have this",body:"Issue timelines are open to you. If one is not showing, the story has not been linked to an issue yet."},follow:{head:"You already have this",body:"Following stories, topics and officials is included. Everything you follow is on your front page and under Following."},comments:{head:"You already have this",body:"Comments are open to you."},wtm:{head:"You already have this",body:"What this means for me is included, and it appears on the articles it has something to say about."},pages:{head:"That page canât be added yet",body:"Added pages are yours to arrange, but some types still need a page behind them â local officials in particular. If your bar is full, remove one with Edit pages first."},general:{head:"This part is still being built",body:"It is drawn here so it can be reviewed before it is built. Nothing above it is waiting on it."}};function X({children:s}){const[o,a]=l.useState(null),{isPremium:t}=k(),i=o!==null,n=l.useCallback(c=>a(c?"general":null),[]),h=l.useCallback((c="general")=>a(c),[]),f=l.useMemo(()=>({open:h}),[h]),d=P[o??"general"];return l.useEffect(()=>{if(!i)return;const c=m=>{m.key==="Escape"&&n(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[i]),e.jsxs(I.Provider,{value:f,children:[s,i&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"cpf-gate-overlay",onClick:()=>n(!1),"aria-hidden":!0}),e.jsxs("div",{className:"cpf-gate-popup",role:"dialog","aria-modal":"true","aria-label":t?d.head:"Membership feature",children:[e.jsx("button",{type:"button",className:"cpf-gate-popup-close",onClick:()=>n(!1),"aria-label":"Close",children:e.jsx(F,{className:"size-5"})}),t?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:d.head}),e.jsx("p",{children:d.body}),e.jsx("button",{type:"button",className:"cpf-gate-cta",onClick:()=>n(!1),children:"Got it"})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"This is a Citizen Pro feature"}),e.jsx("p",{children:A[o??"general"]}),e.jsxs(C,{className:"cpf-gate-cta",to:"/memberships",onClick:()=>n(!1),children:["Start today â $",j,"/mo"]}),e.jsx("button",{type:"button",className:"cpf-gate-decline",onClick:()=>n(!1),children:"Not now"})]})]})]})]})}function J({icon:s,headline:o,body:a}){return e.jsxs("div",{className:"cpf-gate",children:[e.jsx("div",{className:"cpf-gate-icon",children:s}),e.jsx("h5",{children:o}),a&&e.jsx("div",{className:"cpf-gate-body",children:a}),e.jsx(C,{className:"cpf-gate-cta",to:"/memberships",children:"Start today"}),e.jsxs("div",{className:"cpf-gate-fine",children:["Included with membership · $",j,"/mo"]})]})}
1const ee=e.jsxs("svg",{viewBox:"0 0 46 46","aria-hidden":!0,children:[e.jsx("circle",{cx:"23",cy:"23",r:"22"}),e.jsx("path",{d:"M16 12v22M16 12h12l-4 5 4 5H16"})]}),te=e.jsxs("svg",{viewBox:"0 0 46 46","aria-hidden":!0,children:[e.jsx("circle",{cx:"23",cy:"23",r:"22"}),e.jsx("circle",{cx:"23",cy:"18",r:"5"}),e.jsx("path",{d:"M14 33c0-5 4-9 9-9s9 4 9 9"})]}),U="3db0ca70-e3a5-48d6-a1a1-035e895a870c",R="1779212901147_l5uu06ql8",Y={home_widget:"home",welcome_page:"welcome",rail:"rail"};function G(s,o,a="home_widget"){const t=new URL(`https://civiq.chat/${U}`);t.searchParams.set("requestId",R),t.searchParams.set("utm_source","citizenportal");const i=Y[a];return t.searchParams.set("utm_medium",i),t.searchParams.set("utm_campaign","message-your-senator"),t.searchParams.set("utm_content",`${i}-card-${o.toLowerCase()}`),t.searchParams.set("utm_term",s),t.toString()}function q(s){return s.startsWith("federal-")?s.slice(8):s}function ae(s="home_widget",o){var w,v;const a=(o==null?void 0:o.stateCodeOverride)??null,t=M({enabled:!a}),i=((w=t.data)==null?void 0:w.zipcode)??null,n=O(i,{enabled:!a&&!!i}),h=((v=n.data)==null?void 0:v.stateCode)||null,f=!a&&(t.isLoading||!!i&&n.isLoading),{officials:d,flowType:c,isLoading:m,userStateCode:y}=L({isStateArticle:!1,stateCodeOverride:a??h}),[p,_]=l.useState(null);l.useEffect(()=>{let r=!1;return S().then(u=>{r||_(u)}),()=>{r=!0}},[]);const g=m||p===null||f;if(g||c!=="federal"||d.length===0||!p)return{loading:g,senators:[],stateCode:y??null};const b=[];for(const r of d){const u=q(r.key),x=p.find(E=>E.bioguideId===u);x&&b.push({bioguideId:u,name:r.name,title:r.title,partyAbbr:r.partyAbbr,stateCode:r.stateCode,photoUrl:r.photoUrl,slug:x.slug,civiqUrl:G(u,r.stateCode,s)})}return{loading:!1,senators:b,stateCode:y??null}}export{T as F,X as G,ee as I,W as N,J as O,ae as a,te as b,V 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.