PageSourceSearch

https://bitwarden.com/build/assets/search-DXq4Ra7Z.js

js bitwarden.com collected 2026-09-24 06:57:23 UTC 3,279 bytes, 5 lines download raw bytes

1import{cj as p,ck as y,r as x,j as n,cl as f,cm as h,e as m,cn as _,co as g,I as b,u as I,cp as L,cq as R,cr as j,cs as v,ct as A}from"./app-C_ju_lDz.js";import{P as E}from"./page-wrapper-7NvB5sDa.js";/* empty css            */import"./language-detection-cx3gmowl.js";const u=["pages","help","blog","resources","events","tips","newsfeed"],q=(o,e,t)=>{const a=u.includes(o)?o:"";e.forEach(s=>{s.isRefined&&s.value!==a?t(s.value):!s.isRefined&&s.value===a&&t(a)})};function T(o){var i;const{items:e,refine:t}=p(o),{query:a}=y(),s=x.useMemo(()=>[{count:e.reduce((r,c)=>r+c.count,0),value:"",label:"all results",isRefined:!e.some(r=>r.isRefined)},...u.map(r=>e.find(c=>c.value===r)||{count:0,value:r,label:r,isRefined:!1})],[e]);return n.jsx("ul",{className:"list-none flex gap-3 justify-center flex-wrap pt-4 sm:pb-4",children:a.length>0&&((i=s==null?void 0:s[0])==null?void 0:i.count)>0&&s.map((r,c)=>{const l=f[r.label];return n.jsx("li",{children:n.jsxs("button",{type:"button",disabled:r.count===0,className:m(`group px-4 py-1 border text-secondary-500 dark:text-secondary-200 dark:hover:text-secondary-700 rounded-t capitalize
2                    sm:border-0 sm:border-b-2
3                    hover:bg-secondary-50
4                    disabled:pointer-events-none`,r.isRefined&&"font-bold text-primaryBlue dark:text-white bg-secondary-100 border-primaryBlue border-2",r.count===0&&"text-secondary-200"),onClick:()=>q(r.value,e,t),children:[l&&n.jsx(h,{className:"leading-4 pr-2",unicode:l}),r.label," ",n.jsxs("small",{className:"text-secondary-300 dark:text-secondary-200 group-hover:text-secondary-300 dark:group-hover:text-secondary-700",children:["(",r.count,")"]})]})},c)})})}function S({indexName:o}){return{router:_({createURL({routeState:e}){var s;const t=new URLSearchParams;return e.query&&t.append("q",e.query),e.type&&t.append("type",e.type),`${((s=t.toString())==null?void 0:s.length)>0?"?":""}${t.toString()}`},parseURL({location:e}){const t=new URLSearchParams(e.search);return{query:t.get("q")||"",type:t.get("type")||""}},writeDelay:10}),stateMapping:{stateToRoute(e){var t,a,s;return{query:e[o].query,type:((s=(a=(t=e[o].refinementList)==null?void 0:t.type)==null?void 0:a.filter(i=>u.includes(i)))==null?void 0:s[0])||""}},routeToState(e){return{[o]:{query:e.query,refinementList:{type:[e.type]}}}}}}}const w={VITE_ALGOLIA_APP_ID:"QVJ2G4VJRY",VITE_ALGOLIA_INDEX_PREFIX:"prod_bitwarden_",VITE_ALGOLIA_SEARCH_KEY:"6cb7131976e5be4792811b735aa35fa3"};function V({headerNav:o,footerNav:e,headerBanners:t,newsletterForm:a}){const{VITE_ALGOLIA_APP_ID:s,VITE_ALGOLIA_SEARCH_KEY:i,VITE_ALGOLIA_INDEX_PREFIX:r}=w,c=g(s,i),l=r+b().toLocaleLowerCase().replace("-","_"),{t:d}=I();return n.jsx(E,{seo:{fields:{title:d("Search")}},footerNav:e,headerNav:o,headerBanners:t,newsletterForm:a,children:n.jsx("div",{className:"max-w-xl px-4 mx-auto pb-32 mt-8 lg:mt-10",style:{minHeight:"50vh"},children:n.jsxs(L,{searchClient:c,indexName:l,routing:S({indexName:l}),children:[n.jsx(R,{distinct:!1}),n.jsx(j,{}),n.jsx("div",{className:"p-4 md:p-0",children:n.jsx(v,{searchClient:c,placeholder:d("Search Site"),indexName:l,detachedMediaQuery:"none",openOnFocus:!0})}),n.jsx(T,{attribute:"type"}),n.jsx(A,{})]})})})}export{V as default};
5//# sourceMappingURL=search-DXq4Ra7Z.js.map

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.