(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[728],{10677:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(95155),s=r(12115);function l(){let[e,t]=(0,s.useState)([]),[r,l]=(0,s.useState)("");return(0,s.useEffect)(()=>{l(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,a.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,a.jsxs)("select",{value:r,onChange:e=>{var t;l(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,a.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},24003:(e,t,r)=>{Promise.resolve().then(r.bind(r,10677)),Promise.resolve().then(r.bind(r,60153))},60153:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(95155),s=r(12115);function l(e){let{articles:t,categories:r}=e,[l,c]=(0,s.useState)(""),n=(0,s.useMemo)(()=>{let e=l.toLowerCase().trim();return r.map(r=>({cat:r,items:t.filter(t=>t.category===r&&function(e,t){if(!t)return!0;let r=[e.title,e.summary,e.category,...e.keywords||[]].join(" ").toLowerCase();return t.split(/\s+/).filter(Boolean).every(e=>r.includes(e))}(t,e))})).filter(e=>e.items.length)},[t,r,l]);return(0,a.jsxs)("div",{className:"help-center",children:[(0,a.jsx)("div",{className:"help-center-search",children:(0,a.jsx)("input",{type:"text",value:l,onChange:e=>c(e.target.value),placeholder:"Search the docs…  (or press ⌘K anywhere)","aria-label":"Search help articles"})}),n.length?n.map(e=>{let{cat:t,items:r}=e;return(0,a.jsxs)("section",{className:"help-center-group",children:[(0,a.jsx)("h2",{className:"help-center-group-title",children:t}),(0,a.jsx)("div",{className:"help-center-grid",children:r.map(e=>(0,a.jsxs)("a",{className:"help-center-card",href:"/help/".concat(e.slug),children:[(0,a.jsx)("b",{children:e.title}),(0,a.jsx)("p",{children:e.summary})]},e.slug))})]},t)}):(0,a.jsxs)("div",{className:"help-center-empty",children:["No articles match “",l,"”."]})]})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=24003)),_N_E=e.O()}]);