PageSourceSearch

https://www.byblack.us/assets/searches_products-CiZiCNQN.js

js byblack.us collected 2026-10-01 15:26:03 UTC 7,307 bytes, 43 lines download raw bytes

1import{d as y,i as f,u as k,j as e}from"./vendor-react-uJJ-sCZi.js";import{b as w,g as S,t as j,e as m,P as x}from"./painted-dots-D9gMCW4K.js";import{S as l}from"./resend-verification-BkoTyEdW.js";import{i as v,g as _,H as u}from"./input-group-CHV9rPUN.js";import{S as B,F as E}from"./app-Din040zV.js";import{C as P}from"./app-FOSqYJfO.js";import{P as C}from"./app-tWJAkY20.js";import{g as b}from"./vendor-sanity-c4zigSsd.js";import{S as $,u as F}from"./app-r86gpiIk.js";import{s as n,S as N}from"./search-bar-BkLUSFtF.js";import"./vendor-forms-cc_8dO4Q.js";import"./vendor-state-f0PB_cmY.js";import"./vendor-maps-DP291Pe7.js";import"./vendor-logrocket-oGyAbWQ1.js";import"./embla-carousel-react.esm-f9TiJd47.js";import"./with-selector-CJE6QR6s.js";const O=(a,s=!1)=>async r=>{try{const o=new URL(r.request.url);if(o.search&&!s)throw new Error("Query parameters are present.");const c=o.pathname.replace(/^\//,"").replace(/\/$/,"")||"index",i=await fetch(`/prerender/${c}.json`);if(!i.ok)throw new Error("Failed to retrieve static data.");return i.json()}catch(o){return o instanceof Error&&o.message&&console.debug(`${o.message} Falling back to true data loader.`),a(r)}},p=["O0kWu2HBHZgOGqEaY2T8MN","60229953-9546-4cf3-b9b0-4ad787645c9b","1c1384ee-6d64-4546-8509-4c451f1c92e7","efc30a51-72e2-47f8-a99f-aabf323b1819"],g=b`
2  _id,
3  _type,
4  "slug": slug.current,
5  description,
6  name,
7  photo,
8  status,
9  terms,
10  brand -> {
11    _id,
12    _type,
13    city,
14    isCertified,
15    location,
16    name,
17    state,
18    status,
19    owners[] {
20      bio,
21      firstName,
22      lastName,
23      ownerPhoto,
24    },
25  },
26`,R=b`
27*[_type == "product-page" && _id in $ids] {
28  _id,
29  _updatedAt,
30  "slug": slug.current,
31  title,
32  isPreviewOnly,
33  products[0..2] -> {
34    ${g}
35  },
36  "sections": select(
37    count(products) < 3 => sections[0..2] {
38      "product": products[0] -> {
39        ${g}
40      }
41    }
42  )
43}`,T=["sanity/product-page",...p];async function I({queryKey:a}){const[s,...r]=a;return(await $.fetch(R,{ids:r})).map(i=>({...i,products:[...i.products,...(i.sections??[]).map(({product:t})=>t)].filter(v).slice(0,3).map(t=>({productId:t._id,slug:t.slug,brandName:t.brand?.name??"",inactiveStatus:_(t.status,t.brand?.status),description:t.description,imageLoadStrategy:"lazy",imageSrc:t.photo?F(t.photo).auto("format").width(300).url():"",name:t.name,tags:(t.terms??[]).slice(0,3).map(j)}))})).sort((i,t)=>p.indexOf(i._id)-p.indexOf(t._id))}const te=O(async function({context:s,request:r}){const c=w(r).get("term");return c?y(`results?term=${c}`,301):S(s).ensureQueryData({queryKey:T,queryFn:I})}),se={search:{HeroContentsComponent:N,theme:B.ORANGE}},A=[{name:"Tech & Innovation",href:"results?term=electronics",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/tech-and-innovation.jpg"},{name:"Home & Decor",href:"results?term=home+decor",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/home-and-living.jpg"},{name:"Bath & Body",href:"results?term=hygiene",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/grooming.jpg"},{name:"Children",href:"results?term=children",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/kids-and-baby.jpg"},{name:"Clothing & Apparel",href:"results?term=apparel",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/luxury-and-high-end.jpg"},{name:"Beauty & Makeup",href:"results?term=beauty",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/beauty-and-makeup.jpg"},{name:"Wellness & Self-Care",href:"results?term=wellness",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/wellness-and-self-care.jpg"},{name:"Cookware",href:"results?term=cookware",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/foodie-favorites.jpg"},{name:"Stationery",href:"results?term=stationery",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/entrepreneur.jpg"}
43,{name:"Accessories",href:"results?term=accessories",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/everyday-luxe.jpg"},{name:"Sustainable Choices",href:"results?term=eco",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/sustainable.jpg"}],d=2;function ae(){const{ids:a}=f(),s=k(),r=s.slice(0,d),o=s.slice(d);return e.jsxs(e.Fragment,{children:[e.jsx(D,{}),e.jsx(P,{id:"popular",general:{name:"Find Everything Black-owned",description:"From shampoo to baby clothes — ByBlack's got you covered.",href:"results",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/emerging.jpg"},featured:{name:"Juneteenth",description:"Protect Your Health & Wellness",imageSrc:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/thumbnails/juneteenth.jpeg",href:"guides/health-and-wellness"},title:"Discover our most popular products",tiles:A}),e.jsx(l,{className:m(n.banner,n.membership),children:e.jsx(u,{align:"center",heading:"How Search Works",description:"ByBlack is making it easier than ever to discover and support Black-owned brands with our new dedicated product experience. Whether you're looking for your favorite businesses or discovering new products, we've got you covered. No matter the movement, we're here to help you buy Black — always. Are you a Black business owner looking to showcase your products?",ctas:[{primary:!0,text:"List Your Products",to:"https://app.glueup.com/membership/21030/apply?byblack=true",target:"_blank",rel:"noopener"}]})}),e.jsx(h,{previews:r}),e.jsxs(l,{className:m(n.banner,n.referral),children:[e.jsx(x,{className:n.stroke,id:a.__paintBrushStrokeSvgId}),e.jsx(u,{className:n.statement,align:"center",heading:"Are we missing your favorite Black-owned bussiness?",description:"ByBlack opens doors for Black-owned businesses like yours — help us give them the key.",ctas:[{primary:!0,text:"Make a Referral",to:"/refer-the-next",viewTransition:!0}]})]}),e.jsx(h,{previews:o})]})}function h({previews:a}){return a?.length?a.map((s,r)=>e.jsx(l,{omitTopPadding:r>0,children:e.jsx(E,{Card:C,className:n.preview,featured:s.products,link:!s.isPreviewOnly&&`./guides/${s.slug}`,title:s.title})},s.slug)):null}function D(){const a="Browse our product guides & discover products from some of our favorite Black-owned brands.";return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"ByBlack - Buy Black-Owned Products"}),e.jsx("meta",{name:"description",content:a}),e.jsx("link",{rel:"canonical",content:"/search/products"}),e.jsx("meta",{property:"og:image",content:"https://storage.googleapis.com/byblack-609b5.appspot.com/public/assets/og-images/products_ogimage.png"}),e.jsx("meta",{property:"og:image:width",content:"1200"}),e.jsx("meta",{property:"og:image:height",content:"630"}),e.jsx("meta",{name:"og:title",content:"Purchase with purpose - Buy Black with ByBlack."}),e.jsx("meta",{name:"og:description",content:a}),e.jsx("meta",{property:"og:locale",content:"en_US"}),e.jsx("meta",{property:"og:type",content:"website"})]})}export{ae as default,se as handle,te as loader};

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.