PageSourceSearch

https://schedule-f.vercel.app/_next/static/chunks/app/page/%5Bpage%5D/size/%5Bsize%5D/page-e37e6a08f1cb4613.js

js schedule-f.vercel.app collected 2026-10-03 07:40:17 UTC 70,094 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[314],{6102:(e,t,r)=>{"use strict";r.d(t,{default:()=>ey});var a=r(95155),s=r(12115),l=r(23843);function n(e,t){return e?"select"===t.filter||"multi-label"===t.filter?"object"==typeof e&&"values"in e?e:"string"==typeof e?{values:[e]}:Array.isArray(e)?{values:e}:{values:[]}:"text"===t.filter?Array.isArray(e)?{values:e}:"string"==typeof e?{values:[e]}:"object"==typeof e&&"values"in e?e:{values:[]}:"date"===t.filter?"object"==typeof e&&"mode"in e?e:{mode:"range",startDate:"",endDate:""}:e:null}var i=r(47650);function o(e){let{isOpen:t,onClose:r,title:l,children:n,footer:o,id:c="modal"}=e,d=(0,s.useRef)(null),u=(0,s.useRef)(null);return((0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&r()},a=e=>{if("Tab"===e.key&&d.current){let t=d.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;let r=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())}};return t&&(u.current=document.activeElement,document.addEventListener("keydown",e),document.addEventListener("keydown",a),document.body.style.overflow="hidden",setTimeout(()=>{if(d.current){let e=d.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e?e.focus():d.current.focus()}},0)),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keydown",a),document.body.style.overflow="",u.current&&!t&&u.current.focus()}},[t,r]),t)?(0,i.createPortal)((0,a.jsx)("div",{className:"modal-backdrop",onClick:e=>{d.current&&!d.current.contains(e.target)&&r()},role:"presentation",children:(0,a.jsx)("div",{className:"modal-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"".concat(c,"-title"),children:(0,a.jsxs)("div",{ref:d,className:"modal-content",tabIndex:-1,children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{className:"modal-title",id:"".concat(c,"-title"),children:l}),(0,a.jsx)("button",{className:"btn-close",onClick:r,"aria-label":"Close",children:(0,a.jsx)("span",{"aria-hidden":"true",children:"\xd7"})})]}),(0,a.jsx)("div",{className:"modal-body",children:n}),o&&(0,a.jsx)("div",{className:"modal-footer",children:o})]})})}),document.body):null}function c(e){let{variant:t="primary",size:r="md",onClick:s,disabled:l=!1,type:n="button",children:i,className:o="",title:c,style:d,ariaLabel:u}=e,m="inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed ".concat((()=>{switch(t){case"primary":default:return"bg-slate-700 hover:bg-slate-800 text-white border border-slate-700";case"secondary":return"bg-white hover:bg-slate-50 text-slate-700 border border-slate-300";case"outline":return"bg-transparent hover:bg-slate-100 text-slate-700 border border-slate-300";case"danger":return"bg-rose-600 hover:bg-rose-700 text-white border border-rose-600";case"success":return"bg-emerald-600 hover:bg-emerald-700 text-white border border-emerald-600"}})()," ").concat((()=>{switch(r){case"sm":return"px-3 py-1.5 text-sm";case"md":default:return"px-4 py-2 text-base";case"lg":return"px-6 py-3 text-lg"}})()," ").concat(o);return(0,a.jsx)("button",{type:n,className:m,onClick:s,disabled:l,"aria-disabled":l,title:c,style:d,"aria-label":u,children:i})}let d=[{value:"exact",label:"Exact Date"},{value:"range",label:"Date Range"},{value:"before",label:"Before Date"},{value:"after",label:"After Date"}],u={exact:"Filter for comments on this exact date",range:"Filter for comments between these dates (inclusive)",before:"Filter for comments before this date (exclusive)",after:"Filter for comments after this date (exclusive)"};function m(e){let{value:t,onChange:r}=e,[l,n]=(0,s.useState)((null==t?void 0:t.mode)||"range"),[i,o]=(0,s.useState)((null==t?void 0:t.startDate)||""),[c,m]=(0,s.useState)((null==t?void 0:t.endDate)||"");return(0,s.useEffect)(()=>{t&&(n(t.mode||"range"),o(t.startDate||""),m(t.endDate||""))},[t]),(0,s.useEffect)(()=>{let e={mode:l,startDate:"exact"===l||"after"===l||"range"===l?i:void 0,endDate:"exact"===l?i:"before"===l||"range"===l?c:void 0};e.startDate||e.endDate?r(e):r(null)},[l,i,c,r]),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Filter Mode"}),(0,a.jsx)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:l,onCh
1ange:e=>n(e.target.value),children:d.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(()=>{switch(l){case"exact":return(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Date"}),(0,a.jsx)("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:i,onChange:e=>o(e.target.value)})]});case"range":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Date"}),(0,a.jsx)("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:i,onChange:e=>o(e.target.value)})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"End Date"}),(0,a.jsx)("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:c,onChange:e=>m(e.target.value),min:i})]})]});case"before":return(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Before Date"}),(0,a.jsx)("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:c,onChange:e=>m(e.target.value)})]});case"after":return(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"After Date"}),(0,a.jsx)("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:i,onChange:e=>o(e.target.value)})]})}})(),(0,a.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:u[l]})]})}function x(e){let{value:t,onChange:r,field:l}=e,[n,i]=(0,s.useState)(""),o=(0,s.useMemo)(()=>"stance"===l.key?["For","Against","Neutral/Unclear"]:l.badges&&Object.keys(l.badges).length?Object.keys(l.badges):"themes"===l.key?["Due process/employee rights","Merit-based system concerns","Politicization concerns","Scientific integrity","Institutional knowledge loss"]:[],[l]),d=(0,s.useMemo)(()=>t?Array.isArray(t)?t:"object"==typeof t&&"values"in t&&Array.isArray(t.values)?t.values:[]:[],[t]),u=(0,s.useMemo)(()=>n?o.filter(e=>e.toLowerCase().includes(n.toLowerCase())):o,[o,n]),m=e=>{r({values:d.includes(e)?d.filter(t=>t!==e):[...d,e]})};return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("input",{type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Search options...",value:n,onChange:e=>i(e.target.value),autoFocus:!0})}),(0,a.jsx)("div",{className:"max-h-[300px] overflow-y-auto border border-gray-200 rounded p-2",children:0===u.length?(0,a.jsx)("div",{className:"text-center py-4 text-gray-500",children:"No matching options"}):(0,a.jsx)("div",{className:"py-2",children:u.map(e=>(0,a.jsxs)("label",{className:"flex items-center mb-2 cursor-pointer text-sm py-1 px-2 rounded hover:bg-gray-50",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:d.includes(e),onChange:()=>m(e)}),e]},e))})}),(0,a.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,a.jsx)(c,{variant:"outline",size:"sm",onClick:()=>{r({values:u})},children:"Select All Visible"}),(0,a.jsx)(c,{variant:"outline",size:"sm",onClick:()=>{r({values:[]})},children:"Deselect All"})]})]})}function h(e){let{value:t,onChange:r}=e,[l,n]=(0,s.useState)((null==t?void 0:t.values)||[]),[i,o]=(0,s.useState)("");(0,s.useEffect)(()=>{r(l.length>0?{values:l}:null)},[l,r]);let d=()=>{let e=i.trim();e&&!l.includes(e)&&(n([...l,e]),o(""))},u=e=>{n(l.filter(t=>t!==e))};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("input",{type:"text",className:"flex-1 px-3 py-2 border border-gray-300 rounded-l text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Type and press Enter",value:i,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d())},autoFocus:!0}),(0,a.jsx)(c,{onClick:d,className:"rounded-l-none",children:"Add"})]}),(0,a.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Press Enter or click Add after typing"})]}),(0,a.jsx)("div",{children:0===l.length?(0,a.jsx)("div",{className:"italic text-gray-400",children:"No filters added yet"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.map((e,t)=>(0,a.jsxs)("div",{className:"bg-gray-200 px-3 py-1 rounded-full inline-flex items-center text-sm",children:[e,(0,a.jsx)("button",{className:"ml-2 text-gray-500 hover:text-gray-700 font-bold",onClick:()=>u(e),"aria-label":"Remove ".concat(e),children:"\xd7"})]},t))})})]})}let f=[{value:"includes",label:"Must Include Any",description:"Find comments that include any of the selected themes"},{value:"at_least",label:"Must Include At Least",description:"Find comments that include at least all of the selected themes"},{value:"exact",label:"Exact Match",description:"Find comments that match exactly these themes (no more, no less)"}];function b(e){let{value:t,onChange:r,field:l}
1=e,[n,i]=(0,s.useState)((null==t?void 0:t.mode)||"includes"),o=e=>{i(e),t&&r({...t,mode:e})};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700 mb-2",children:"Filter Mode:"}),(0,a.jsx)("div",{className:"space-y-2",children:f.map(e=>(0,a.jsxs)("label",{className:"flex items-start cursor-pointer",children:[(0,a.jsx)("input",{type:"radio",className:"mt-1 mr-2",checked:n===e.value,onChange:()=>o(e.value)}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:e.label}),(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.description})]})]},e.value))})]}),(0,a.jsx)(x,{value:t,onChange:e=>{e&&"object"==typeof e&&"values"in e?r({...e,mode:n}):null===e&&r(null)},field:l})]})}function g(e){let{field:t,value:r,onChange:l}=e,[n,i]=(0,s.useState)(r);(0,s.useEffect)(()=>{i(r)},[r]);let o=e=>{i(e),l(e)};return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"".concat(t.key,"-select"),className:"block text-sm font-medium text-gray-700 mb-2",children:["Select ",t.title," Range"]}),(0,a.jsxs)("select",{id:"".concat(t.key,"-select"),value:n||"",onChange:e=>o(e.target.value||null),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,a.jsx)("option",{value:"",children:"All Ranges"}),["1","2-10","11-50","50+"].map(e=>(0,a.jsx)("option",{value:e,children:e},e))]})]}),n&&(0,a.jsx)("div",{className:"bg-blue-50 p-3 rounded-md",children:(0,a.jsxs)("p",{className:"text-sm text-blue-700",children:["Filtering by: ",(0,a.jsx)("strong",{children:n})]})})]})}function p(e){let{field:t,currentValue:r,onApply:l,onClose:i,isOpen:d}
1=e,[u,f]=function(e,t){let[r,a]=(0,s.useState)(()=>n(e,t));return(0,s.useEffect)(()=>{a(n(e,t))},[e,t]),[r,a]}(r,t),p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c,{variant:"secondary",onClick:i,children:"Cancel"}),(0,a.jsx)(c,{onClick:()=>{let e=u;"select"===t.filter||"multi-label"===t.filter?u&&"object"==typeof u&&"values"in u&&(e="themes"===t.key&&u.mode?u:0===u.values.length?null:u.values):"text"===t.filter&&u&&"object"==typeof u&&"values"in u&&(e=u.values.length>0?u.values:null),l(e)},children:"Apply"})]});return(0,a.jsx)(o,{isOpen:d,onClose:i,title:"Filter by ".concat(t.title),footer:p,children:(()=>{switch(t.filter){case"date":return(0,a.jsx)(m,{value:u,onChange:f,field:t});case"select":return(0,a.jsx)(x,{value:u,onChange:f,field:t});case"multi-label":if("themes"===t.key)return(0,a.jsx)(b,{value:u,onChange:f,field:t});return(0,a.jsx)(x,{value:u,onChange:f,field:t});case"text":return(0,a.jsx)(h,{value:u,onChange:f,field:t});case"count":return(0,a.jsx)(g,{value:u,onChange:f,field:t});default:return(0,a.jsxs)("p",{children:["Unsupported filter type: ",t.filter]})}})()})}var y=r(35695),v=r(34477);let j=(0,v.createServerReference)("70a46951120a319a2c4001b4ce3dd4e097b7a9aab9",v.callServer,void 0,v.findSourceMapURL,"getStanceTimeSeries"),N=(0,v.createServerReference)("40bf71b1e23d87e0f7de660ab802d1e1da02e1a07b",v.callServer,void 0,v.findSourceMapURL,"parseUrlToQueryOptions"),w=(0,v.createServerReference)("405adb22bf1ca02c2c7c7243afce21280b0ce0daaa",v.callServer,void 0,v.findSourceMapURL,"getPaginatedComments"),k=(0,v.createServerReference)("40303aa088d902bc90fea9a2cc8e3eb2c7a61c0c77",v.callServer,void 0,v.findSourceMapURL,"getCommentStatistics"),C=(0,v.createServerReference)("404c0411dd5c0bea50c366dc250c462893f839f69e",v.callServer,void 0,v.findSourceMapURL,"getDedupedCommentStatistics"),S=(0,s.createContext)(void 0);function D(e){let{children:t,initialPage:r=1,initialPageSize:l=10}=e,n=(0,y.useRouter)(),i=(0,y.useSearchParams)(),o=(0,y.usePathname)(),c=(0,s.useRef)(0),d=(0,s.useRef)(0),u=i.get("sort"),m=i.get("sortDirection"),x=i.get("search")||"",[h,f]=(0,s.useState)([]),[b,g]=(0,s.useState)(0),[p,v]=(0,s.useState)({total:0,for:0,against:0,neutral:0}),[D,P]=(0,s.useState)({total:0,for:0,against:0,neutral:0}),[A,E]=(0,s.useState)(null),[L,_]=(0,s.useState)(!0),[R,M]=(0,s.useState)(null),[F,O]=(0,s.useState)(x),[U,T]=(0,s.useState)(x),[I,z]=(0,s.useState)((()=>{let e={};for(let[t,r]of Array.from(i.entries()))if(t.startsWith("filter_")){let a=t.replace("filter_","");try{e[a]=JSON.parse(r)}catch(t){e[a]=r}}return e})()),[B,W]=(0,s.useState)(u&&m?{column:u,direction:m}:void 0);(0,s.useEffect)(()=>{let e=setTimeout(()=>{T(F)},500);return()=>clearTimeout(e)},[F]);let V=async()=>{let e=++d.current;try{let t={filters:I,search:U||void 0,searchFields:void 0},[r,a,s,l]=await Promise.all([j(t,"postedDate",!0),j(t,"receivedDate",!0),j(t,"postedDate",!1),j(t,"receivedDate",!1)]);if(e!==d.current)return;let n={posted_date:r.success?r.data:[],received_date:a.success?a.data:[],posted_date_no_duplicates:s.success?s.data:[],received_date_no_duplicates:l.success?l.data:[],error:r.error||a.error||s.error||l.error||void 0};E(n)}catch(t){e===d.current&&(console.error("Error fetching stance time series:",t),E({posted_date:[],received_date:[],posted_date_no_duplicates:[],received_date_no_duplicates:[],error:"Failed to fetch time series data"}))}},H=async()=>{let e=++c.current;_(!0);try{let t={};i.forEach((e,r)=>{t[r]=e});let a=await N(t);a.page=r,a.pageSize=l;let[s,n,o]=await Promise.all([w(a),k(a),C(a)]);if(e!==c.current)return;s.success&&s.data?(f(s.data),g(s.total||0),M(null)):(M(s.error||"Failed to fetch comments"),console.error("Error fetching comments:",s.error)),n.success&&n.stats?v(n.stats):console.error("Error fetching stats:",n.error),o.success&&o.stats?P(o.stats):console.error("Error fetching deduped 
1stats:",o.error)}catch(t){e===c.current&&(console.error("Exception in fetchData:",t),M("An unexpected error occurred"))}finally{e===c.current&&_(!1)}};(0,s.useEffect)(()=>{V()},[]),(0,s.useEffect)(()=>{V()},[I,U]);let J=async()=>{await H()},Q=(0,s.useRef)(U),$=(0,s.useRef)(I);(0,s.useEffect)(()=>{let e,t=Q.current!==U,a=JSON.stringify($.current)!==JSON.stringify(I),s=(t||a)&&1!==r,i=new URLSearchParams;B&&(i.set("sort",B.column),i.set("sortDirection",B.direction)),U&&i.set("search",U),Object.entries(I).forEach(e=>{let[t,r]=e;if(null!=r&&!(Array.isArray(r)&&0===r.length)&&""!==r){let e="object"==typeof r?JSON.stringify(r):String(r);i.set("filter_".concat(t),e)}});let c=i.toString();if(s){let t="/page/1/size/".concat(l);e=c?"".concat(t,"?").concat(c):t}else e=c?"".concat(o,"?").concat(c):o;n.replace(e,{scroll:!1}),Q.current=U,$.current=I},[U,B,I,n,o,r,l]),(0,s.useEffect)(()=>{H()},[i,r,l]);let q=Math.ceil(b/l),G=e=>{let t=new URLSearchParams(i.toString()).toString(),r="/page/".concat(e,"/size/").concat(l),a=t?"".concat(r,"?").concat(t):r;n.push(a,{scroll:!1})},K=r<q,X=r>1;return(0,a.jsx)(S.Provider,{value:{data:h,totalItems:b,stats:p,dedupedStats:D,stanceTimeSeriesData:A,loading:L,error:R,filters:I,setFilters:z,searchQuery:F,setSearchQuery:O,sorting:B,setSorting:W,handleSort:e=>{W(t=>(null==t?void 0:t.column)===e?{column:e,direction:"asc"===t.direction?"desc":"asc"}:{column:e,direction:"asc"}),1!==r&&G(1)},pageSize:l,setPageSize:e=>{let t=new URLSearchParams(i.toString()).toString(),r="/page/1/size/".concat(e),a=t?"".concat(r,"?").concat(t):r;n.push(a,{scroll:!1})},currentPage:r,setCurrentPage:e=>{G(e)},totalPages:q,goToPage:G,nextPage:()=>{K&&G(r+1)},previousPage:()=>{X&&G(r-1)},canNextPage:K,canPreviousPage:X,refreshData:J,exportCSV:()=>{if(0===h.length)return;let e=new Set;h.forEach(t=>{Object.keys(t).forEach(r=>{let a=t[r];("object"!=typeof a||null===a)&&e.add(r)})});let t=Array.from(e);if(0===t.length)return;let r=t.map(e=>'"'.concat(e,'"')).join(",")+"\n";h.forEach(e=>{let a=t.map(t=>{let r=e[t];return null==r?"":"string"==typeof r?'"'.concat(r.replace(/"/g,'""'),'"'):String(r)});r+=a.join(",")+"\n"});let a=new Blob([r],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(a),l=document.createElement("a");l.href=s,l.download="export.csv",l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)}},children:t})}function P(){let e=(0,s.useContext)(S);if(void 0===e)throw Error("useServerDataContext must be used within a ServerDataContextProvider");return e}var A=r(17703);function E(e){let{value:t,onChange:r,placeholder:s="Search...",className:l="",lightTheme:n=!1,id:i="search-input",ariaLabel:o="Search"}=e;return(0,a.jsxs)("div",{className:"relative ".concat(l),children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ".concat(n?"text-slate-400":"text-white"),children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,a.jsx)("input",{id:i,type:"search",className:"".concat("placeholder-opacity-70 border rounded py-2 pl-10 pr-4 focus:outline-none focus:ring-2"," ").concat(n?"bg-white text-slate-700 placeholder-slate-500 border-slate-300 focus:ring-slate-400 focus:ring-opacity-50 focus:border-slate-400":"bg-white bg-opacity-20 text-white placeholder-white border-transparent focus:ring-white focus:ring-opacity-40 focus:border-transparent"),placeholder:s,value:t,onChange:r,"aria-label":o,role:"searchbox"})]})}var L=r(31335);function _(){let{filters:e,setFilters:t,searchQuery:r,setSearchQuery:n}=P(),[i,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(null),u=(r,a)=>{let s={...e};L.J.useFilter(r,a),!a||Array.isArray(a)&&0===a.length||a&&"object"==typeof a&&"values"in a&&Array.isArray(a.values)&&0===a.values.length?delete s[r]:s[r]=a,t(s)},m=e=>{d(e),o(!0)},x=()=>{o(!1),d(null)},h=Object.keys(e).length>0,f=()=>h?Object.entries(e).map(e=>{let[t,r]=e,s=l.L.fields.find(e=>e.key===t);if(!s)return null;if(r&&"object"==typeof r&&"values"in r&&Array.isArray(r.values)){let e="(Any Match)";return"at_least"===r.mode?e="(Must Include All)":"exact"===r.mode&&(e="(Exact Match)"),r.values.map((l,n)=>(0,a.jsxs)("div",{className:"bg-slate-100 text-slate-700 rounded-full px-3 py-1.5 mr-2 mb-2 text-sm inline-flex items-center shadow-sm hover:bg-slate-200 transition-colors border border-slate-200",children:[(0,a.jsxs)("span",{className:"mr-1 font-medium",children:[s.title," ",0===n?e:"",":"]}),(0,a.jsx)("span",{children:l}),(0,a.jsx)("button",{className:"ml-2 inline-flex items-center justify-center w-5 h-5 bg-slate-700 bg-opacity-10 rounded-full text-xs hover:bg-opacity-20 transition-colors",onClick:()=>{let e=r.values.filter(e=>e!==l);0===e.length?u(t,null):u(t,{values:e,mode:r.mode})},"aria-label":"Remove filter",children:"\xd7"})]},"".concat(t,"-").concat(n)))}if(Array.isArray(r))return r.map((e,l)=>(0,a.jsxs)("div",{className:"bg-slate-100 text-slate-700 rounded-full px-3 py-1.5 mr-2 mb-2 text-sm inline-flex items-center shadow-sm hover:bg-slate-200 transition-colors border border-slate-200",children:[(0,a.jsxs)("span",{className:"mr-1 font-medium",children:[s.title,":"]}
1),(0,a.jsx)("span",{children:e}),(0,a.jsx)("button",{className:"ml-2 inline-flex items-center justify-center w-5 h-5 bg-slate-700 bg-opacity-10 rounded-full text-xs hover:bg-opacity-20 transition-colors",onClick:()=>u(t,r.filter(t=>t!==e)),"aria-label":"Remove filter",children:"\xd7"})]},"".concat(t,"-").concat(l)));if("object"!=typeof r||null===r||!("startDate"in r)&&!("endDate"in r))return(0,a.jsxs)("div",{className:"bg-slate-100 text-slate-700 rounded-full px-3 py-1.5 mr-2 mb-2 text-sm inline-flex items-center shadow-sm hover:bg-slate-200 transition-colors border border-slate-200",children:[(0,a.jsxs)("span",{className:"mr-1 font-medium",children:[s.title,":"]}),(0,a.jsx)("span",{children:String(r)}),(0,a.jsx)("button",{className:"ml-2 inline-flex items-center justify-center w-5 h-5 bg-slate-700 bg-opacity-10 rounded-full text-xs hover:bg-opacity-20 transition-colors",onClick:()=>u(t,null),"aria-label":"Remove filter",children:"\xd7"})]},t);{let e="",l=e=>{let[t,r,a]=e.split("-").map(Number);return new Date(t,r-1,a).toLocaleDateString()};return"exact"===r.mode&&r.startDate?e=l(r.startDate):"range"===r.mode&&r.startDate&&r.endDate?e="".concat(l(r.startDate)," - ").concat(l(r.endDate)):"before"===r.mode&&r.endDate?e="Before ".concat(l(r.endDate)):"after"===r.mode&&r.startDate?e="After ".concat(l(r.startDate)):r.startDate&&r.endDate?e="".concat(l(r.startDate)," - ").concat(l(r.endDate)):r.startDate?e="From ".concat(l(r.startDate)):r.endDate&&(e="Until ".concat(l(r.endDate))),(0,a.jsxs)("div",{className:"bg-slate-100 text-slate-700 rounded-full px-3 py-1.5 mr-2 mb-2 text-sm inline-flex items-center shadow-sm hover:bg-slate-200 transition-colors border border-slate-200",children:[(0,a.jsxs)("span",{className:"mr-1 font-medium",children:[s.title,":"]}),(0,a.jsx)("span",{children:e}),(0,a.jsx)("button",{className:"ml-2 inline-flex items-center justify-center w-5 h-5 bg-slate-700 bg-opacity-10 rounded-full text-xs hover:bg-opacity-20 transition-colors",onClick:()=>u(t,null),"aria-label":"Remove filter",children:"\xd7"})]},t)}}):(0,a.jsxs)("div",{className:"text-center py-4 bg-slate-50 rounded-lg border border-slate-200",children:[(0,a.jsx)("div",{className:"text-slate-700 font-medium mb-1",children:"No filters applied"}),(0,a.jsx)("div",{className:"text-slate-600 text-sm",children:"Use the filter buttons below to refine your data view"})]});return(0,a.jsxs)(A.A,{collapsible:!0,initiallyCollapsed:!1,children:[(0,a.jsx)(A.A.Header,{className:"bg-gradient-to-r from-slate-50 to-slate-100 border-b border-slate-200",children:(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:h?"\uD83D\uDD0D":"⚙️"}),h?"Active Filters":"Filters"]}),h&&(0,a.jsx)("button",{className:"bg-white hover:bg-slate-50 text-slate-700 text-sm px-3 py-1 rounded transition-colors border border-slate-200",onClick:()=>{t({})},children:"Clear All"})]})}),(0,a.jsxs)(A.A.Body,{className:"p-4",children:[(0,a.jsx)("div",{className:"flex flex-wrap mb-4 ".concat(h?"":"hidden"),children:f()}),!h&&f(),(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-gray-200",children:[(0,a.jsx)("h6",{className:"font-medium text-gray-700 mb-2",children:"Filter Options"}),(()=>{let t=l.L.fields.filter(e=>e.filter);return(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-4",children:t.map(t=>(0,a.jsx)("button",{className:"px-3 py-2 rounded-md text-sm font-medium transition-colors \n              ".concat(e[t.key]?"bg-slate-700 text-white hover:bg-slate-800 border border-slate-700":"bg-white text-slate-700 hover:bg-slate-50 border border-slate-300"),onClick:()=>m(t),children:t.title},t.key))})})()]}),(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-gray-200",children:[(0,a.jsx)("h6",{className:"font-medium text-gray-700 mb-2",children:"Search"}),(0,a.jsx)(E,{value:r,onChange:e=>{let t=e.target.value;n(t),t&&setTimeout(()=>{t===r&&L.J.searchComments(t,0)},1e3)},placeholder:"Search comments...",lightTheme:!0}),r&&(0,a.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Searching for: ",(0,a.jsx)("span",{className:"font-medium",children:r}),(0,a.jsx)("button",{className:"ml-2 text-slate-600 hover:text-slate-800",onClick:()=>n(""),children:"Clear"})]})]})]}),c&&(0,a.jsx)(p,{field:c,currentValue:e[c.key]||null,onClose:x,onApply:e=>{u(c.key,e),x()},isOpen:i})]})}let R={comment:"w-1/2 max-w-3xl",keyQuote:"w-1/6",rationale:"w-1/6",themes:"w-1/8",title:"w-1/8",stance:"w-24",category:"w-32",postedDate:"w-28",receivedDate:"w-28",link:"w-20"};function M(e){let{value:t,comment:r,onAction:s}=e;return(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("button",{onClick:e=>{e.stopPropagation(),null==s||s("click",r)},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline text-left cursor-pointer flex items-center",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),(0,a.jsx)("span",{className:"underline",children:String(t)||"Untitled Comment"})]})})}var F=r(52814);function O(e){let t,{value:r,field:s,searchQuery:l}=e;s.badges&&(t=s.badges[r]);let n=(0,F.k)(t||"");return(0,a.jsx)(F.default,{type:n,label:r,highlight:l,filterType:s.key})}function U(e){let{value:t}=e;return(0,a.jsx)("span",{className:t?"text-green-600 font-semibold":"text-red-600 font-semibold",children:t?"Yes":"No"})}function T(e){let{value:t}=e;if(!t)return(0,a.jsx)("span",{className:"text-gray-400 italic",children:"—"});let r="";try{let e=new Date(t);r=isNaN(e.getTime())?"Invalid Date":e.toLocaleDateString()}catch(e){r="Invalid Date",console.error(e)}return(0,a.jsx)("span",{children:r})}function I(e){let{value:t}=e;return(0,a.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 hover:underline",children:[t," "]})}function z(e){let{value:t,field:r,searchQuery:s}
1=e,l=t.split(",").map(e=>e.trim()).filter(Boolean);return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map((e,t)=>(0,a.jsx)(F.default,{type:"primary",label:e,highlight:s,filterType:r.key},"".concat(r.key,"-").concat(e,"-").concat(t)))})}function B(e){let{text:t,searchTerm:r="",highlightType:s,charLimit:l,smartTruncation:n=!0,isSmallViewport:i=!1}=e;return t&&""!==t?i&&r&&""!==r.trim()?(0,a.jsx)("span",{title:t,className:"cursor-help",children:function(e,t,r){let s;if(!t||!e)return e;let l=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=RegExp("(".concat(l,")"),"gi"),i=[];for(;null!==(s=n.exec(e));)i.push({index:s.index,length:s[0].length,text:s[0]}),s.index===n.lastIndex&&n.lastIndex++;if(0===i.length)return"".concat(e.substring(0,100),"...");let o=[];for(let s=0;s<Math.min(i.length,2);s++){let l=i[s],n=Math.max(0,l.index-40),c=Math.min(e.length,l.index+l.length+40),d=e.substring(n,c);n>0&&(d="..."+d),c<e.length&&(d+="..."),o.push((0,a.jsx)("span",{children:W(d,t,r)},"match-".concat(s))),s<Math.min(i.length,2)-1&&o.push((0,a.jsx)("span",{className:"text-gray-500 mx-2 font-bold",children:"•••"},"sep-".concat(s)))}return(0,a.jsx)(a.Fragment,{children:o})}(t,r,s)}):r&&""!==r||l&&!(t.length<=l)?(!r||""===r)&&l&&t.length>l?(0,a.jsxs)("span",{title:t,className:"cursor-help",children:[t.substring(0,l),"..."]}):r&&(!l||t.length<=l)?(0,a.jsx)(a.Fragment,{children:W(t,r,s)}):r&&l&&t.length>l?n?(0,a.jsx)("span",{title:t,className:"cursor-help",children:function(e,t,r,s){if(e.length<=t)return W(e,r,s);if(!r)return"".concat(e.substring(0,t),"...");let l=function(e,t){if(!t||!e)return -1;let r=RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi").exec(e);return r?r.index:-1}(e,r);if(-1===l||l<t)return W("".concat(e.substring(0,t),"..."),r,s);let n=Math.floor(t/2),i=Math.max(0,l-n/2),o=Math.min(e.length,i+n),c=e.substring(0,Math.floor(t/3)),d=e.substring(i,o);return(0,a.jsxs)(a.Fragment,{children:[W(c,r,s),(0,a.jsx)("span",{className:"text-gray-500 mx-1 font-bold",children:"..."}),W(d,r,s),o<e.length?"...":""]})}(t,l,r,s)}):(0,a.jsx)("span",{title:t,className:"cursor-help",children:W("".concat(t.substring(0,l),"..."),r,s)}):(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)("span",{className:"text-gray-400 italic",children:"—"})}function W(e,t,r){if(!t||!e)return e;let s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=RegExp("(".concat(s,")"),"gi"),n=e.split(l);if(n.length<=1)return e;let i=function(e){if(!e)return"bg-yellow-200 text-gray-900";switch(e){case"title":return"bg-blue-200 text-blue-900";case"comment":return"bg-green-200 text-green-900";case"themes":return"bg-purple-200 text-purple-900";case"keyQuote":return"bg-orange-200 text-orange-900";case"rationale":return"bg-pink-200 text-pink-900";case"stance":return"bg-indigo-200 text-indigo-900";default:return"bg-yellow-200 text-gray-900"}}(r);return(0,a.jsx)(a.Fragment,{children:n.map((e,t)=>l.test(e)?(0,a.jsx)("span",{className:"".concat(i," font-medium px-1 rounded"),children:e},t):(0,a.jsx)("span",{children:e},t))})}function V(e){let{value:t,field:r,searchQuery:l}=e,[n,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=()=>{i(window.innerWidth<1280)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,a.jsx)(B,{text:t,searchTerm:l,highlightType:r.key,charLimit:(()=>{if(r.charLimit)return n?Math.floor(r.charLimit/2):r.charLimit})(),smartTruncation:"comment"===r.key,isSmallViewport:n})}function H(e){var t;let{field:r,value:s}=e,l=1===(t=null!=s?s:1)?"1":t>=2&&t<=10?"2-10":t>=11&&t<=50?"11-50":"50+",n="bg-gray-100";return r.badges&&l in r.badges&&(n=r.badges[l]||"bg-gray-100"),(0,a.jsx)(F.default,{className:n,label:l,type:"default"})}function J(e){let{children:t}=e;return(0,a.jsx)(A.A,{collapsible:!1,className:"bg-white rounded-lg shadow-md border border-gray-200",children:(0,a.jsx)("div",{className:"flex flex-col h-full min-h-0",children:t})})}function Q(e){let{value:t,onChange:r,placeholder:s="Search comments..."}=e;return(0,a.jsx)(E,{value:t,onChange:e=>r(e.target.value),placeholder:s,lightTheme:!0})}function $(e){let{visibleColumns:t,onToggle:r,isOpen:s,onToggleMenu:n}=e;return(0,a.jsxs)("div",{className:"relative inline-block column-visibility-menu",children:[(0,a.jsxs)("button",{className:"flex items-center px-3 py-2 text-sm font-medium bg-white text-slate-700 rounded hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-opacity-50 border border-slate-300 transition-colors",onClick:n,children:[(0,a.jsx)("span",{className:"mr-1 opacity-70",children:"\uD83D\uDC41️"}),"Columns"]}),s&&(0,a.jsx)("div",{className:"absolute right-0 z-50 mt-1 w-56 bg-white rounded-md shadow-lg border border-gray-200",children:(0,a.jsx)("div",{className:"py-1 max-h-64 overflow-y-auto",children:l.L.fields.map(e=>(0,a.jsxs)("div",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center",onClick:()=>r(e.key),children:[(0,a.jsx)("input",{type:"checkbox",id:"col-".concat(e.key),className:"mr-2 h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",checked:t[e.key],onChange:()=>{},onClick:e=>e.stopPropagation()}),(0,a.jsx)("label",{htmlFor:"col-".concat(e.key),className:"text-sm text-gray-700 cursor-pointer flex-1",children:e.title})]},e.key))})})]})}function q(e){let{onClick:t,disabled:r}=e;return(0,a.jsxs)("button",{className:"flex items-center px-3 py-2 text-sm font-medium bg-white text-slate-700 rounded hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-opacity-50 border border-slate-300 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",onClick:t,disabled:r,children:[(0,a.jsx)("span",{className:"mr-1 opacity-70",children:"\uD83D\uDCE5"}),"Export CSV"]})}function G(e){let{title:t,searchValue:r,onSearchChange:s,onExport:l,columnVisibility:n}=e;return(0,a.jsx)("div",{className:"bg-gradient-to-r from-slate-50 to-slate-100 border-b border-slate-200 p-4",children:(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCCB"}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(Q,{value:r,onChange:s}),(0,a.jsx)(q,{onClick:l}),(0,a.jsx)($,{visibleColumns:n.visibleColumns,onToggle:n.toggleColumn,isOpen:n.showMenu,onToggleMenu:()=>n.setShowMenu(!n.showMenu)})]})]})})}function K(e){let{data:t,columns:r,sorting:l,onSort:n,onRowClick:i,loading:o}
1=e,[c,d]=(0,s.useState)("desktop");(0,s.useEffect)(()=>{let e=()=>{window.innerWidth<768?d("mobile"):window.innerWidth<1024?d("tablet"):d("desktop")};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let u=()=>{switch(c){case"mobile":return{visibleColumns:3,columnWidth:"200px",tableMinWidth:"600px"};case"tablet":return{visibleColumns:5,columnWidth:"180px",tableMinWidth:"900px"};default:return{visibleColumns:7,columnWidth:"160px",tableMinWidth:"1360px"}}},m=e=>"desktop"===c&&"comment"===e.key?"400px":u().columnWidth,x=u();return(0,a.jsxs)("div",{className:"flex-1 overflow-auto relative",style:{maxHeight:"60vh",minHeight:"400px"},children:[o&&(0,a.jsx)(X,{}),(0,a.jsxs)("table",{className:"divide-y divide-gray-200",style:{minWidth:x.tableMinWidth},children:[(0,a.jsx)(Y,{columns:r,sorting:l,onSort:n,getColumnWidth:m}),(0,a.jsx)(Z,{data:t,columns:r,onRowClick:i,tableConfig:x,getColumnWidth:m})]})]})}function X(){return(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-white bg-opacity-70 z-10",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"})})}function Y(e){let{columns:t,sorting:r,onSort:s,getColumnWidth:l}=e;return(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsx)("tr",{children:t.map(e=>(0,a.jsx)("th",{className:"px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider ".concat(e.sortable?"cursor-pointer hover:bg-blue-50":""," ").concat((null==r?void 0:r.column)===e.key?"text-blue-700 bg-blue-50":"text-gray-700"),style:{width:l(e)},onClick:e.sortable?()=>s(e.key):void 0,children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{children:e.title}),e.sortable&&(null==r?void 0:r.column)===e.key&&(0,a.jsx)(ee,{direction:r.direction})]})},e.key))})})}function Z(e){let{data:t,columns:r,onRowClick:s,getColumnWidth:l}=e;return 0===t.length?(0,a.jsx)("tbody",{children:(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:r.length,className:"px-6 py-10 text-center text-gray-500 bg-gray-50",children:(0,a.jsx)(et,{})})})}):(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:t.map(e=>(0,a.jsx)("tr",{className:"cursor-pointer hover:bg-blue-50",onClick:()=>s(e),children:r.map(t=>(0,a.jsx)("td",{className:"px-4 py-3 text-sm break-words",style:{width:l(t)},children:(0,a.jsx)("div",{className:"max-w-full",children:t.render(e)})},"".concat(e.id,"-").concat(t.key)))},e.id))})}function ee(e){let{direction:t}=e;return(0,a.jsx)("svg",{className:"h-4 w-4 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:"asc"===t?(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"}):(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}function et(){return(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsx)("p",{className:"mt-2 text-sm font-medium",children:"No matching records found"}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Try changing your search criteria"})]})}function er(e){let{currentPage:t,totalPages:r,pageSize:s,totalItems:l,visibleItems:n,canPreviousPage:i,canNextPage:o,setPageSize:c,goToPage:d,previousPage:u,nextPage:m,position:x="bottom",pageSizeOptions:h=[10,25,50,100],id:f="table-pagination",instanceId:b}=e,g="".concat(f,"-").concat(x,"-").concat(b),p="".concat(g,"-page-size");return(0,a.jsxs)("nav",{"aria-label":"Table pagination",className:"top"===x?"flex flex-col sm:flex-row justify-between items-center px-6 py-3 bg-gray-50 border-b border-gray-200":"flex flex-col sm:flex-row justify-between items-center px-6 py-3 bg-gray-50 border-t border-gray-200",children:[(0,a.jsx)("div",{className:"flex items-center text-sm text-gray-500 mb-3 sm:mb-0",children:(0,a.jsxs)("span",{children:["Showing ",(0,a.jsx)("span",{className:"font-medium mx-1 text-gray-700",children:n>0?(t-1)*s+1:0}),"to ",(0,a.jsx)("span",{className:"font-medium mx-1 text-gray-700",children:Math.min(t*s,l)}),"of ",(0,a.jsx)("span",{className:"font-medium mx-1 text-gray-700",children:l})," entries",(0,a.jsxs)("span",{className:"ml-2 text-gray-600",children:["(Page ",t," of ",r,")"]})]})}),(0,a.jsx)("div",{className:"flex items-center space-x-2",children:(0,a.jsxs)("div",{className:"flex sm:items-center",children:[(0,a.jsxs)("div",{className:"mr-4 flex items-center",children:[(0,a.jsx)("label",{htmlFor:p,className:"sr-only",children:"Items per page"}),(0,a.jsx)("select",{id:p,value:s,onChange:e=>c(Number(e.target.value)),className:"rounded-md border-gray-300 py-1 pl-2 pr-8 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500",children:h.map(e=>(0,a.jsxs)("option",{value:e,children:[e," rows"]},e))})]}),(0,a.jsxs)("div",{className:"flex",role:"navigation","aria-label":"Pagination",children:[(0,a.jsx)("button",{onClick:()=>d(1),disabled:!i,className:"px-4 py-2 text-sm rounded-l-md border border-gray-300 ".concat(i?"text-gray-700 hover:bg-gray-100":"text-gray-400 cursor-not-allowed bg-gray-50"),"aria-label":"Go to first page","aria-disabled":!i,children:"\xab"}),(0,a.jsx)("button",{onClick:u,disabled:!i,className:"px-4 py-2 text-sm border-t border-b border-gray-300 ".concat(i?"text-gray-700 hover:bg-gray-100":"text-gray-400 cursor-not-allowed bg-gray-50"),"aria-label":"Go to previous page","aria-disabled":!i,children:"‹"}),(()=>{let e=[];
1if(r<=5)for(let t=1;t<=r;t++)e.push(t);else{e.push(1);let a=Math.floor(2.5),s=5-a-1;t>a+1&&e.push("...");let l=Math.max(2,t-a),n=Math.min(r-1,t+s);t-a<2&&(n=Math.min(r-1,4)),t+s>r-1&&(l=Math.max(2,r-5+1));for(let t=l;t<=n;t++)e.push(t);n<r-1&&e.push("..."),n<r&&e.push(r)}return e})().map((e,r)=>"number"==typeof e?(0,a.jsx)("button",{onClick:()=>d(e),className:"min-w-[36px] h-[36px] px-3 py-1 text-sm border-t border-b border-gray-300 \n                    ".concat(t===e?"bg-blue-100 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-100"),"aria-label":"Page ".concat(e),"aria-current":t===e?"page":void 0,children:e},r):(0,a.jsx)("span",{className:"min-w-[36px] h-[36px] px-2 py-1 text-sm border-t border-b border-gray-300 text-gray-500 flex items-center justify-center","aria-hidden":"true",children:e},r)),(0,a.jsx)("button",{onClick:m,disabled:!o,className:"px-4 py-2 text-sm border-t border-b border-gray-300 ".concat(o?"text-gray-700 hover:bg-gray-100":"text-gray-400 cursor-not-allowed bg-gray-50"),"aria-label":"Go to next page","aria-disabled":!o,children:"›"}),(0,a.jsx)("button",{onClick:()=>d(r),disabled:!o,className:"px-4 py-2 text-sm rounded-r-md border border-gray-300 ".concat(o?"text-gray-700 hover:bg-gray-100":"text-gray-400 cursor-not-allowed bg-gray-50"),"aria-label":"Go to last page","aria-disabled":!o,children:"\xbb"})]})]})})]})}function ea(e){let{currentPage:t,totalPages:r,pageSize:s,setPageSize:l,totalItems:n,visibleItems:i,canPreviousPage:o,canNextPage:c,goToPage:d,previousPage:u,nextPage:m,position:x="bottom",instanceId:h}=e;return(0,a.jsx)(er,{currentPage:t,totalPages:r,pageSize:s,setPageSize:l,totalItems:n,visibleItems:i,canPreviousPage:o,canNextPage:c,goToPage:d,previousPage:u,nextPage:m,position:x,instanceId:h})}function es(e){let{position:t,visibleItems:r,...s}=e;if("top"===t&&0===r&&e.totalItems>0);else if("top"===t&&0===e.totalItems)return null;return(0,a.jsx)("div",{className:"".concat("top"===t?"border-b":"border-t"," border-gray-200"),children:(0,a.jsx)(ea,{...s,instanceId:"".concat(e.instanceId,"-").concat(t),visibleItems:r})})}function el(){let e=P(),t=function(e){let[t,r]=(0,s.useState)(()=>{let t={};return e.forEach(e=>{t[e.key]=!1!==e.visible}),t}),[a,l]=(0,s.useState)(!1),n=(0,s.useCallback)(e=>{r(t=>({...t,[e]:!t[e]}))},[]),i=(0,s.useMemo)(()=>e.filter(e=>t[e.key]),[e,t]);return(0,s.useEffect)(()=>{if(!a)return;let e=e=>{let t=e.target;t.closest&&!t.closest(".column-visibility-menu")&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),{visibleColumns:t,visibleFields:i,toggleColumn:n,showMenu:a,setShowMenu:l}}(l.L.fields),{handleRowClick:r}=function(){let e=(0,y.useRouter)(),t=(0,y.usePathname)(),r=(0,y.useSearchParams)();return{handleRowClick:(0,s.useCallback)(a=>{let s=new URLSearchParams(r.toString()),l="".concat(t,"?").concat(s.toString());e.push("/comment/".concat(a.id,"?returnUrl=").concat(encodeURIComponent(l)))},[e,t,r])}}(),n=function(e){let{fields:t,searchQuery:r,onRowClick:l}=e;return(0,s.useMemo)(()=>t.map(e=>{let t={key:e.key,className:R[e.key]||"",sortable:!0};return{key:e.key,title:e.title,sortable:!1!==t.sortable,className:t.className,render:t=>{e.key;var s={field:e,value:t[e.key],comment:t,searchQuery:r,onAction:(t,r)=>{"click"===t&&"title"===e.key&&l(r)}};let{field:n,value:i}=s;return"title"===n.key?(0,a.jsx)(M,{...s,value:i}):"count"!==n.format&&(null==i||""===i)?(0,a.jsx)("span",{className:"text-gray-400 italic",children:"—"}):"boolean"==typeof i?(0,a.jsx)(U,{...s,value:i}):"multi-label"===n.format&&"string"==typeof i?(0,a.jsx)(z,{...s,value:i}):"date"===n.format?(0,a.jsx)(T,{...s,value:i}):"link"===n.format&&"string"==typeof i?(0,a.jsx)(I,{...s,value:i}):"count"===n.format?(0,a.jsx)(H,{...s,value:i}):n.badges&&"string"==typeof i&&n.badges[i]?(0,a.jsx)(O,{...s,value:i}):"string"==typeof i?(0,a.jsx)(V,{...s,value:i}):(0,a.jsx)("span",{children:"object"==typeof i?JSON.stringify(i):String(i)})}}}),[t,r,l])}({fields:t.visibleFields,searchQuery:e.searchQuery,onRowClick:r}),i={currentPage:e.currentPage,totalPages:e.totalPages,pageSize:e.pageSize,setPageSize:e.setPageSize,totalItems:e.totalItems,visibleItems:e.data.length,canPreviousPage:e.canPreviousPage,canNextPage:e.canNextPage,goToPage:e.goToPage,previousPage:e.previousPage,nextPage:e.nextPage,loading:e.loading};return(0,a.jsxs)(J,{children:[(0,a.jsx)(G,{title:"Comment Data",searchValue:e.searchQuery,onSearchChange:e.setSearchQuery,onExport:()=>{L.J.exportData("csv",e.data.length),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"export.csv";if(0===e.length)return;let r=new Set;
1e.forEach(e=>{Object.keys(e).forEach(t=>{let a=e[t];("object"!=typeof a||null===a)&&r.add(t)})});let a=Array.from(r);if(0===a.length)return;let s=a.map(e=>'"'.concat(e,'"')).join(",")+"\n";e.forEach(e=>{let t=a.map(t=>{let r=e[t];return null==r?"":"string"==typeof r?'"'.concat(r.replace(/"/g,'""'),'"'):String(r)});s+=t.join(",")+"\n"});let l=new Blob([s],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(l),i=document.createElement("a");i.href=n,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}(e.data,"comments-".concat(new Date().toISOString().split("T")[0],".csv"))},columnVisibility:t}),(0,a.jsx)(es,{...i,position:"top",instanceId:"sct-pagination-top"}),(0,a.jsx)(K,{data:e.data,columns:n,sorting:e.sorting,onSort:e.handleSort,onRowClick:r,loading:e.loading}),(0,a.jsx)(es,{...i,position:"bottom",instanceId:"sct-pagination-bottom"})]})}function en(e){let{variant:t="text",width:r,height:s,className:l="",animation:n="pulse"}=e,i={};return r&&(i.width="number"==typeof r?"".concat(r,"px"):r),s&&(i.height="number"==typeof s?"".concat(s,"px"):s),(0,a.jsx)("div",{className:"bg-gray-200 ".concat((()=>{switch(t){case"text":return"h-4 rounded";case"circular":return"rounded-full";case"rectangular":return"rounded-none";case"rounded":return"rounded-lg";default:return"rounded"}})()," ").concat((()=>{switch(n){case"pulse":default:return"animate-pulse";case"wave":return"animate-shimmer";case"none":return""}})()," ").concat(l),style:i,role:"status","aria-label":"Loading...",children:(0,a.jsx)("span",{className:"sr-only",children:"Loading..."})})}function ei(e){switch(e){case"for":return{bg:"bg-emerald-50",text:"text-emerald-700",border:"border-emerald-200"};case"against":return{bg:"bg-rose-50",text:"text-rose-700",border:"border-rose-200"};default:return{bg:"bg-slate-50",text:"text-slate-700",border:"border-slate-200"}}}function eo(){let{stats:e,loading:t}=P(),[r,l]=(0,s.useState)(e),[n,i]=(0,s.useState)(!0);(0,s.useEffect)(()=>{!t&&(l(e),n&&i(!1))},[e,t,n]);let o=[{key:"total",label:"Total Comments",value:r.total},{key:"for",label:"For",value:r.for,match:"For"},{key:"against",label:"Against",value:r.against,match:"Against"},{key:"neutral",label:"Neutral/Unclear",value:r.neutral,match:"Neutral/Unclear"}],c=()=>(0,a.jsxs)("div",{className:"p-4 rounded-lg border shadow-sm bg-gray-100",children:[(0,a.jsx)(en,{variant:"text",width:"75%",className:"mb-2"}),(0,a.jsx)(en,{variant:"text",width:"50%",height:32,className:"mb-1"}),(0,a.jsx)(en,{variant:"text",width:"25%",className:"mt-2"})]});return t?(0,a.jsxs)(A.A,{className:"overflow-hidden shadow-sm",collapsible:!0,initiallyCollapsed:!1,children:[(0,a.jsx)(A.A.Header,{className:"px-6 py-4 bg-gradient-to-r from-white to-slate-50 border-b border-slate-200",children:(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCCA"}),"Statistics Overview"]})}),(0,a.jsx)(A.A.Body,{className:"p-6",children:(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,a.jsx)(c,{},t))})})]}):(0,a.jsxs)(A.A,{className:"overflow-hidden shadow-sm",collapsible:!0,initiallyCollapsed:!1,children:[(0,a.jsx)(A.A.Header,{className:"px-6 py-4 bg-gradient-to-r from-white to-slate-50 border-b border-slate-200",children:(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCCA"}),"Statistics Overview"]})}),(0,a.jsx)(A.A.Body,{className:"p-6",children:(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:o.map(e=>{let t=ei(e.key);return(0,a.jsxs)("div",{className:"p-4 rounded-lg border shadow-sm ".concat(t.bg," ").concat(t.border),children:[(0,a.jsx)("p",{className:"text-sm uppercase font-semibold mb-1 ".concat(t.text," ").concat("neutral"===e.key?"break-words text-xs":""),children:"neutral"===e.key?(0,a.jsxs)(a.Fragment,{children:["NEUTRAL/",(0,a.jsx)("wbr",{}),"UNCLEAR"]}):e.label}),(0,a.jsx)("h3",{className:"text-3xl font-bold mb-1 ".concat(t.text),children:"number"==typeof e.value?e.value.toLocaleStr
1ing():"0"}),e.match&&(0,a.jsx)("div",{className:"mt-2 flex items-center",children:(0,a.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium ".concat(t.bg," ").concat(t.text," border ").concat(t.border," ").concat("neutral"===e.key?"break-words":""),children:"neutral"===e.key?(0,a.jsxs)(a.Fragment,{children:["Neutral/",(0,a.jsx)("wbr",{}),"Unclear"]}):e.match})})]},e.key)})})})]})}function ec(){let{dedupedStats:e,loading:t}=P(),[r,l]=(0,s.useState)(e),[n,i]=(0,s.useState)(!0);(0,s.useEffect)(()=>{!t&&(l(e),n&&i(!1))},[e,t,n]);let o=[{key:"total",label:"Unique Comments",value:r.total},{key:"for",label:"For",value:r.for,match:"For"},{key:"against",label:"Against",value:r.against,match:"Against"},{key:"neutral",label:"Neutral/Unclear",value:r.neutral,match:"Neutral/Unclear"}],c=()=>(0,a.jsxs)("div",{className:"p-4 rounded-lg border shadow-sm bg-gray-100",children:[(0,a.jsx)(en,{variant:"text",width:"75%",className:"mb-2"}),(0,a.jsx)(en,{variant:"text",width:"50%",height:32,className:"mb-1"}),(0,a.jsx)(en,{variant:"text",width:"25%",className:"mt-2"})]});return t?(0,a.jsxs)(A.A,{className:"overflow-hidden shadow-sm",collapsible:!0,initiallyCollapsed:!1,children:[(0,a.jsx)(A.A.Header,{className:"px-6 py-4 bg-gradient-to-r from-slate-50 to-blue-50 border-b border-slate-200",children:(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCCA"}),"Unique Statistics (Duplicates Removed)"]})}),(0,a.jsx)(A.A.Body,{className:"p-6",children:(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,a.jsx)(c,{},t))})})]}):(0,a.jsxs)(A.A,{className:"overflow-hidden shadow-sm",collapsible:!0,initiallyCollapsed:!1,children:[(0,a.jsx)(A.A.Header,{className:"px-6 py-4 bg-gradient-to-r from-slate-50 to-blue-50 border-b border-slate-200",children:(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCCA"}),"Unique Statistics (Duplicates Removed)"]})}),(0,a.jsx)(A.A.Body,{className:"p-6",children:(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:o.map(e=>{let t=ei(e.key);return(0,a.jsxs)("div",{className:"p-4 rounded-lg border shadow-sm ".concat(t.bg," ").concat(t.border),children:[(0,a.jsx)("p",{className:"text-sm uppercase font-semibold mb-1 ".concat(t.text," ").concat("neutral"===e.key?"break-words text-xs":""),children:"neutral"===e.key?(0,a.jsxs)(a.Fragment,{children:["NEUTRAL/",(0,a.jsx)("wbr",{}),"UNCLEAR"]}):e.label}),(0,a.jsx)("h3",{className:"text-3xl font-bold mb-1 ".concat(t.text),children:"number"==typeof e.value?e.value.toLocaleString():"0"}),e.match&&(0,a.jsx)("div",{className:"mt-2 flex items-center",children:(0,a.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium ".concat(t.bg," ").concat(t.text," border ").concat(t.border," ").concat("neutral"===e.key?"break-words":""),children:"neutral"===e.key?(0,a.jsxs)(a.Fragment,{children:["Neutral/",(0,a.jsx)("wbr",{}),"Unclear"]}):e.match})})]},e.key)})})})]})}var ed=r(36645),eu=r.n(ed);let em=()=>(0,a.jsx)(A.A,{className:"h-96",collapsible:!1,children:(0,a.jsx)(A.A.Body,{className:"flex items-center justify-center h-full",children:(0,a.jsx)(en,{variant:"rounded",width:400,height:256})})}),ex=eu()(()=>Promise.all([r.e(785),r.e(367)]).then(r.bind(r,60367)),{loadableGenerated:{webpack:()=>[60367]},ssr:!1,loading:()=>(0,a.jsx)(em,{})});function eh(){let{stanceTimeSeriesData:e,loading:t}=P(),[r,l]=(0,s.useState)("posted_date"),[n,i]=(0,s.useState)(!0),o=(0,s.useMemo)(()=>e?n?"posted_date"===r?e.posted_date:e.received_date:"posted_date"===r?e.posted_date_no_duplicates:e.received_date_no_duplicates:[],[e,r,n]);return t&&!e?(0,a.jsx)(em,{}):(null==e?void 0:e.error)?(0,a.jsxs)(A.A,{className:"border-red-200",collapsible:!1,children:[(0,a.jsx)(A.A.Header,{className:"bg-gradient-to-r from-red-500 to-red-600 flex justify-between items-center",children:(0,a.jsxs)("h5",{className:"text-lg font-bold text-white flex items-center",children:[(0,a.jsx)("span",{className:"mr-2",children:"⚠️"}),"Chart Error"]})}),(0,a.jsx)(A.A.Body,{className:"text-center py-8",children:(0,a.jsxs)("p",{className:"text-red-500",children:["Error loading chart data: ",e.error]})})]}):e?(0,a.jsxs)(A.A,{collapsible:!0,initiallyCollapsed:!1,className:"shadow-sm",children:[(0,a.jsx)(A.A.Header,{className:"bg-gradient-to-r from-slate-50 to-blue-50 border-b border-slate-200",children:(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsxs)("h5",{className:"text-lg font-semibold text-slate-800 flex items-center",children:[(0,a.jsx)("span",{className:"mr-2 opacity-60",children:"\uD83D\uDCC8"}),"Comments Over Time"]}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row items-end md:items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 text-slate-700 text-sm cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:n,onChange:e=>i(e.target.checked),className:"w-4 h-4 rounded border-slate-300 text-slate-600 focus:ring-slate-500 focus:ring-opacity-50","aria-label":"Include duplicate comments in the chart"}),(0,a.jsx)("span",{className:"select-none",children:"Include Duplicates"})]}),(0,a.jsxs)("select",{value:r,onChange:e=>l(e.target.value),className:"bg-white text-slate-700 text-sm px-3 py-1 rounded-md focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-opacity-50 border border-slate-200","aria-label":"Select the appropriate date that you would like to see for the chart",children:[(0,a.jsx)("option",{value:"posted_date",className:"text-gray-700",children:"By Posted Date"}),(0,a.jsx)("option",{value:"received_date",className:"text-gray-700",children:"By Received Date"})]})]})]})}),(0,a.jsxs)(A.A.Body,{className:"p-4",children:[(0,a.jsx)(ex,{data:o}),!n&&(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-2 text-center",children:"Showing unique comments only (duplicates excluded)"})]})]}):(0,a.jsx)(em,{})}var ef=r(6874),eb=r.n(ef);
1function eg(){let[e,t]=(0,s.useState)(!1),[r,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{localStorage.getItem("hasVisitedClusters")&&l(!0)},[]),(0,a.jsx)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg p-6 mb-4 border border-blue-200 shadow-sm hover:shadow-md transition-all duration-300",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"\uD83C\uDFAF Explore Comment Clusters"}),(0,a.jsx)("p",{className:"text-gray-700 mb-3",children:"Discover patterns in public comments with our interactive visualization. See how comments group together by themes and viewpoints."}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600",children:[(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsxs)("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,a.jsx)("circle",{cx:"10",cy:"10",r:"8",fill:"currentColor",opacity:"0.3"}),(0,a.jsx)("circle",{cx:"10",cy:"10",r:"3",fill:"currentColor"})]}),"Interactive scatter plot"]}),(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsxs)("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,a.jsx)("rect",{x:"2",y:"4",width:"16",height:"3",rx:"1",fill:"currentColor"}),(0,a.jsx)("rect",{x:"2",y:"9",width:"16",height:"3",rx:"1",fill:"currentColor",opacity:"0.7"}),(0,a.jsx)("rect",{x:"2",y:"14",width:"16",height:"3",rx:"1",fill:"currentColor",opacity:"0.4"})]}),"Grouped by themes"]}),!r&&(0,a.jsx)("span",{className:"bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs font-medium animate-pulse",children:"New!"})]})]}),(0,a.jsx)("div",{className:"ml-6",children:(0,a.jsxs)(eb(),{href:"/clusters",onClick:()=>{localStorage.setItem("hasVisitedClusters","true"),l(!0)},onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),className:"inline-flex items-center px-6 py-3 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition-all duration-200 shadow-sm hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,a.jsx)("span",{children:"View Clusters"}),(0,a.jsx)("svg",{className:"w-5 h-5 ml-2 transition-transform duration-200 ".concat(e?"translate-x-1":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})})]})})}function ep(){return(0,a.jsxs)("div",{className:"container-fluid py-4",children:[(0,a.jsxs)("div",{className:"row mb-4",children:[(0,a.jsxs)("div",{className:"col-md-6",children:[(0,a.jsx)(eo,{}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(ec,{})})]}),(0,a.jsx)("div",{className:"col-md-6",children:(0,a.jsx)(_,{})})]}),(0,a.jsx)("div",{className:"row mb-4",children:(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(eg,{})})}),(0,a.jsx)("div",{className:"row mb-4",children:(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(eh,{})})}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(A.A,{collapsible:!0,initiallyCollapsed:!1,children:(0,a.jsx)(A.A.Body,{className:"table-responsive",children:(0,a.jsx)(el,{})})})})})]})}function ey(){let{initialPage:e,initialPageSize:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.jsx)(D,{initialPage:e,initialPageSize:t,children:(0,a.jsx)(ep,{})})}},10255:(e,t,r)=>{"use strict";function a(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}}),r(95155),r(47650),r(85744),r(20589)},11500:(e,t,r)=>{"use strict";r.d(t,{u4:()=>n});function a(){return"undefined"!=typeof window}function s(){return(a()?window.vam:function(){return"production"}())||"production"}function l(){return"production"===s()}function n(e,t,r){var n,i;if(!a()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(l())console.warn(e);else throw Error(e);return}if(!t){null==(n=window.va)||n.call(window,"event",{name:e,options:r});return}try{let a=function(e,t){if(!e)return;let r=e,a=[];for(let[s,l]of Object.entries(e))"object"==typeof l&&null!==l&&(t.strip?r=function(e,{[e]:t,...r}){return r}(s,r):a.push(s));if(a.length>0&&!t.strip)throw Error(`The following properties are not valid: ${a.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return r}(t,{strip:l()});null==(i=window.va)||i.call(window,"event",{name:e,data:a,options:r})}catch(e){e instanceof Error&&"development"===s()&&console.error(e)}}},17703:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(95155),s=r(12115);let l=(0,s.createContext)(void 0);function n(e){let{children:t,className:r="",role:n,ariaLabel:i,collapsible:o,initiallyCollapsed:c=!1,onToggleCollapse:d}
1=e,[u,m]=(0,s.useState)(c);return(0,a.jsx)(l.Provider,{value:{collapsible:o,isCollapsed:!!o&&u,toggleCollapse:()=>{if(o){let e=!u;m(e),d&&d(e)}}},children:(0,a.jsx)("section",{className:"card shadow-sm mb-6 border border-slate-200 ".concat(r),role:n,"aria-label":i,children:t})})}n.Header=function(e){let{children:t,className:r="",id:n}=e,i=(0,s.useContext)(l);if(!i)return(0,a.jsx)("header",{className:"card-header ".concat(r),id:n,children:t});let{collapsible:o,isCollapsed:c,toggleCollapse:d}=i;return(0,a.jsxs)("header",{className:"card-header ".concat(r," flex justify-between items-center"),id:n,children:[(0,a.jsx)("div",{className:"flex-grow",children:t}),o&&(0,a.jsx)("button",{onClick:d,className:"ml-2 p-1.5 text-slate-600 hover:text-slate-800 hover:bg-slate-100 rounded-full transition-colors duration-150 ease-in-out focus:outline-none focus:ring-2 focus:ring-slate-300 focus:ring-opacity-75","aria-label":c?"Expand card":"Collapse card",title:c?"Expand card":"Collapse card","aria-expanded":!c,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5 transform transition-transform duration-200 ease-in-out ".concat(c?"-rotate-90":""),children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})},n.Body=function(e){let{children:t,className:r="",noPadding:n=!1}=e,i=(0,s.useContext)(l);if(!i||!i.collapsible)return(0,a.jsx)("div",{className:"card-body ".concat(n?"p-0":""," ").concat(r),children:t});let{isCollapsed:o}=i;return o?null:(0,a.jsx)("div",{className:"card-body ".concat(n?"p-0":""," ").concat(r),children:t})},n.Footer=function(e){let{children:t,className:r=""}=e;return(0,a.jsx)("footer",{className:"card-footer ".concat(r),children:t})};let i=n},17828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,r(64054).createAsyncLocalStorage)()},23843:(e,t,r)=>{"use strict";r.d(t,{L:()=>a});let a={title:'Public Comments on "Schedule F" Regulation',description:"Comments about the proposed Schedule Policy/Career Regulation - Improving Performance, Accountability and Responsiveness in the Civil Service",subtitle:"See my git repo",datasetName:"Comments",keyField:"id",theme:{colorScheme:"slate",buttonStyle:"flat",cardStyle:"minimal"},fields:[{key:"title",title:"Title",filter:"text",visible:!0},{key:"stance",title:"Stance",filter:"select",visible:!0,badges:{For:"bg-success",Against:"bg-danger","Neutral/Unclear":"bg-info"}},{key:"key_quote",title:"Key Quote",filter:"text",visible:!0,charLimit:150},{key:"themes",title:"Themes",filter:"multi-label",format:"multi-label",visible:!0},{key:"rationale",title:"Rationale",filter:"text",visible:!0,charLimit:200},{key:"comment",title:"Comment",filter:"text",visible:!0,charLimit:400},{key:"category",title:"Category",filter:"select",visible:!0,badges:{Agency:"bg-success",Citizen:"bg-info",Union:"bg-warning","Professional Organization":"bg-danger"}},{key:"comment_count",title:"Duplicates",filter:"count",format:"count",visible:!0,badges:{1:"bg-gray-100","2-10":"bg-blue-100","11-50":"bg-purple-100","50+":"bg-red-100"}},{key:"link",title:"Source Link",filter:"text",format:"link",visible:!1},{key:"id",title:"Comment ID",visible:!1,filter:"text"},{key:"has_attachments",title:"Has Attachments",filter:"select",visible:!1,badges:{true:"bg-success",false:"bg-danger"}},{key:"posted_date",title:"Posted Date",filter:"date",visible:!0,format:"date"},{key:"received_date",title:"Received Date",filter:"date",visible:!0,format:"date"},{key:"organization",title:"Organization",filter:"text",visible:!0},{key:"attachment_titles",title:"Attachment Titles",filter:"text",visible:!1}],stats:[{key:"total",label:"Total Comments",type:"count"},{key:"stance",label:"For",type:"count",match:"For"},{key:"stance",label:"Against",type:"count",match:"Against"},{key:"stance",label:"Neutral/Unclear",type:"count",match:"Neutral/Unclear"}]}},31335:(e,t,r)=>{"use strict";r.d(t,{J:()=>s});var a=r(11500);let s={viewCommentList:(e,t)=>
1{(0,a.u4)("View Comment List",{page:e,pageSize:t})},viewClusterPage:e=>{(0,a.u4)("View Cluster",{clusterId:e})},viewCommentDetail:(e,t)=>{(0,a.u4)("View Comment Detail",{commentId:e,stance:t||"unknown"})},useFilter:(e,t)=>{(0,a.u4)("Use Filter",{filterType:e,value:String(t)})},searchComments:(e,t)=>{(0,a.u4)("Search Comments",{query:e.substring(0,50),resultCount:t})},exportData:(e,t)=>{(0,a.u4)("Export Data",{format:e,rowCount:t})},selectCluster:(e,t)=>{(0,a.u4)("Select Cluster",{clusterId:e,method:t})},pinClusterComment:(e,t)=>{(0,a.u4)("Pin Cluster Comment",{clusterId:e,commentId:t})},toggleColumn:(e,t)=>{(0,a.u4)("Toggle Column",{columnName:e,visible:t})},changePage:(e,t,r)=>{(0,a.u4)("Change Page",{from:e,to:t,method:r})}}},34477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return a.callServer},createServerReference:function(){return l},findSourceMapURL:function(){return s.findSourceMapURL}});let a=r(53806),s=r(31818),l=r(34979).createServerReference},35695:(e,t,r)=>{"use strict";var a=r(18999);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},36645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let a=r(88229)._(r(67357));function s(e,t){var r;let s={};"function"==typeof e&&(s.loader=e);let l={...s,...t};return(0,a.default)({...l,modules:null==(r=l.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52814:(e,t,r)=>{"use strict";r.d(t,{default:()=>l,k:()=>s});var a=r(95155);function s(e){return e?e.includes("success")?"success":e.includes("danger")?"danger":e.includes("warning")?"warning":e.includes("primary")?"primary":"default":"default"}function l(e){let{type:t="default",label:r,className:s="",highlight:l="",filterType:n,id:i}=e,o=e=>{if(!e)return"bg-yellow-200 text-gray-900";switch(e){case"title":return"bg-blue-200 text-blue-900";case"comment":return"bg-green-200 text-green-900";case"themes":return"bg-purple-200 text-purple-900";case"keyQuote":return"bg-orange-200 text-orange-900";case"rationale":return"bg-pink-200 text-pink-900";case"stance":return"bg-indigo-200 text-indigo-900";default:return"bg-yellow-200 text-gray-900"}};return(0,a.jsx)("span",{className:"inline-block px-2 py-1 text-xs font-medium rounded-full ".concat((e=>{switch(e){case"success":return"bg-emerald-100 text-emerald-700";case"danger":return"bg-rose-100 text-rose-700";case"warning":return"bg-amber-100 text-amber-700";default:return"bg-slate-100 text-slate-700"}})(t)," ").concat(s),role:"status","aria-label":"".concat((e=>{switch(e){case"success":return"Success status";case"danger":return"Error status";case"warning":return"Warning status";case"primary":return"Information";default:return"Status"}})(t),": ").concat(r),id:i,children:l?((e,t)=>{if(!t||!e)return e;let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=RegExp("(".concat(r,")"),"gi"),l=e.split(s);if(l.length<=1)return e;let i=o(n);return(0,a.jsx)(a.Fragment,{children:l.map((e,t)=>s.test(e)?(0,a.jsx)("span",{className:"".concat(i," font-medium px-1 rounded"),"data-highlighted":"true",children:e},t):e)})})(r,l):r})}r(12115)},62146:(e,t,r)=>{"use strict";function a(e){let{reason:t,children:r}=e;return r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),r(45262)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return n},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return i}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,
1configurable:!0});class a{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let s="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return s?new s:new a}function n(e){return s?s.bind(e):a.bind(e)}function i(){return s?s.snapshot():function(e,...t){return e(...t)}}},67357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=r(95155),s=r(12115),l=r(62146);function n(e){return{default:e&&"default"in e?e.default:e}}r(10255);let i={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},o=function(e){let t={...i,...e},r=(0,s.lazy)(()=>t.loader().then(n)),o=t.loading;function c(e){let n=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?s.Suspense:s.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...i?{fallback:n}:{},children:d})}return c.displayName="LoadableComponent",c}},85744:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=r(17828)},91143:(e,t,r)=>{Promise.resolve().then(r.bind(r,6102))}},e=>{var t=t=>e(e.s=t);e.O(0,[874,441,684,358],()=>t(91143)),_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.