PageSourceSearch

https://saxoline.cl/_next/static/chunks/9608-2c8318050984773c.js

js saxoline.cl collected 2026-10-06 07:55:43 UTC 22,817 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9608],{291:(e,r,t)=>{"use strict";t.r(r),t.d(r,{Tooltip:()=>a,TooltipContent:()=>u,TooltipProvider:()=>o,TooltipTrigger:()=>d});var l=t(70862),s=t(18526),n=t(71311),i=t(99049);let o=n.Kq,a=n.bL,d=n.l9,u=s.forwardRef((e,r)=>{let{className:t,sideOffset:s=4,...o}=e;return(0,l.jsx)(n.UC,{ref:r,sideOffset:s,className:(0,i.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...o})});u.displayName=n.UC.displayName},4098:(e,r,t)=>{"use strict";t.d(r,{CartButtonTrigger:()=>o});var l=t(70862),s=t(67916),n=t(88050),i=t(18526);let o=e=>{let{className:r,quantity:t}=e,o=i.useContext(s.cartContext);if(!o)throw Error("CartContext is not defined");return(0,l.jsxs)("button",{type:"button",onClick:()=>{o.setOpenCart(e=>!e)},className:r,children:[(0,l.jsx)(n.A,{className:"size-5",strokeWidth:1}),"number"==typeof t?(0,l.jsx)("span",{className:"bg-primary absolute right-0 top-0 -mr-2 -mt-2 h-4 w-4 rounded-sm text-[11px] font-medium text-white",children:t}):null]})}},4339:(e,r,t)=>{"use strict";t.r(r),t.d(r,{AnnouncementSlider:()=>i,default:()=>o});var l=t(70862),s=t(48756),n=t(87582);let i=e=>{let{slides:r}=e;return(0,l.jsx)(s.Carousel,{plugins:[(0,n.A)({delay:1e4})],className:"flex h-full justify-center items-center",children:(0,l.jsx)(s.CarouselContent,{className:"ml-0 h-full w-full",children:null==r?void 0:r.map((e,r)=>{var t,n;return(0,l.jsx)(s.CarouselItem,{className:"builder-text prose pl-0",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=(n=null==(t=e.textItem)?void 0:t.toString())?n:""}})},"_".concat(r))})})})},o=i},10392:(e,r,t)=>{"use strict";t.d(r,{CollectionsList:()=>m,CollectionsTabsProviders:()=>u,WrapContent:()=>c});
1var l=t(70862),s=t(99049),n=t(18526),i=t(65594),o=t(94972);let a=n.createContext(null),d=n.createContext(null),u=e=>{let{children:r}=e,{setOption:t,option:s}=(()=>{let[e,r]=n.useState(0);return{setOption:r,option:e}})(),{active:i,setActive:o}=(()=>{let[e,r]=n.useState(!1);return{setActive:r,active:e}})();return(0,l.jsx)(d.Provider,{value:{setActive:o,active:i},children:(0,l.jsx)(a.Provider,{value:{setOption:t,option:s},children:r})})},c=e=>{var r,t,u;let{children:c,menuBannerTwo:m,id:h}=e,p=n.useContext(a),v=n.useContext(d);if(!p)throw Error("CollectionsTabsContext is not defined");if(!v)throw Error("CollectionsTabsDefaultContext is not defined");return(0,l.jsx)(l.Fragment,{children:v.active?(0,l.jsx)("div",{className:(0,s.cn)("hidden",p.option===h&&"container block"),children:c}):(0,l.jsx)("div",{className:(0,s.cn)("hidden",p.option===h&&"container block"),children:(0,l.jsxs)("div",{className:"to-background relative z-10 flex  h-[436px] flex-row items-center gap-5 bg-gradient-to-r from-[#f7f7f7] px-14 py-6 ",children:[(null==m?void 0:m.showTypeAsset)==="Banner"&&(null==m?void 0:m.asset)?(0,l.jsx)("img",{alt:null!=(r=null==m?void 0:m.altTextBanner)?r:"",src:(0,o.Q)(null==m?void 0:m.asset,800),className:"absolute inset-0 left-0 top-0 z-0 size-full bg-cover bg-center object-cover"}):null,(0,l.jsxs)("div",{className:"z-20 w-1/2",children:[(0,l.jsxs)("div",{className:"pb-8",children:[(0,l.jsx)("h4",{className:(0,s.cn)("typ-extra-large-medium text-secondary line-clamp-1",(null==m?void 0:m.showTypeAsset)==="Banner"&&"text-secondary-foreground"),children:null==m?void 0:m.subTitle}),(0,l.jsx)("h3",{className:(0,s.cn)("typ-h3 text-primary line-clamp-2",(null==m?void 0:m.showTypeAsset)==="Banner"&&"text-primary-foreground"),children:null==m?void 0:m.title}),(0,l.jsx)("p",{className:(0,s.cn)("typ-p text-muted line-clamp-3",(null==m?void 0:m.showTypeAsset)==="Banner"&&"text-muted-foreground "),children:null==m?void 0:m.description})]}),(0,l.jsx)(i.Button,{variant:(null==m?void 0:m.showTypeAsset)==="Product"?"secondary":"outline",size:"lg",asChild:!0,children:(0,l.jsx)("a",{href:null!=(t=null==m?void 0:m.buttonUrl)?t:"",children:null==m?void 0:m.buttonText})})]}),(0,l.jsx)("div",{className:"grid w-1/2 place-items-center",children:(null==m?void 0:m.showTypeAsset)==="Product"?(0,l.jsx)("img",{alt:null!=(u=null==m?void 0:m.altTextProduct)?u:"",className:"h-[356px] w-[311px] ",src:(0,o.Q)(null==m?void 0:m.product,640)}):null})]})})})},m=e=>{let{label:r,id:t}=e,i=n.useContext(a),o=n.useContext(d);if(!i)throw Error("CollectionsTabsContext is not defined");if(!o)throw Error("CollectionsTabsDefaultContext is not defined");return(0,l.jsx)("li",{className:(0,s.cn)("cursor-pointer px-4 py-2",t===i.option&&o.active?" border-brand-primary border-l-4":"hover:border-brand-primary hover:border-l-4"),onClick:()=>{i.setOption(t),o.setActive(!0)},children:(0,l.jsx)("span",{className:"typ-medium text-primary capitalize ",children:r})},r)}},17513:(e,r,t)=>{"use strict";t.d(r,{HeaderMobileClient:()=>v,IntersectionObserver:()=>x,MobileMenu:()=>f,SheetWrap:()=>b});var l=t(70862),s=t(99049),n=t(39998),i=t(89263),o=t(45396),a=t(3333),d=t(18526),u=t(47718),c=t(65594),m=t(8139),h=t(94972);let p=d.createContext(null),v=e=>{let{children:r,inactiveColor:t}=e,{outView:n,setOutView:i,setOpenMenu:o,openMenu:a}=(()=>{let[e,r]=d.useState(!1),[t,l]=d.useState(!1);return{openMenu:e,setOpenMenu:r,outView:t,setOutView:l}})();return(0,l.jsx)(p.Provider,{value:{openMenu:a,setOpenMenu:o,outView:n,setOutView:i},children:(0,l.jsx)("div",{"data-show-menu":a,"data-out-view":n,className:(0,s.cn)("group/root header-color","light"===t?"header-color-light":"header-color-dark",(a||n)&&"active"),children:r})})},x=e=>{let{children:r,className:t}=e,s=d.useContext(p);if(!s)throw Error("HeaderContext is not defined");return(0,l.jsx)(u.pL,{onChange:e=>s.setOutView(!e),children:e=>{let{ref:s}=e;return(0,l.jsx)("div",{ref:s,className:t,children:r})}})},b=e=>{let{children:r}=e,t=d.useContext(p);if(!t)throw Error("HeaderContext is not defined");return(0,l.jsxs)(m.Sheet,{onOpenChange:e=>t.setOpenMenu(e),children:[(0,l.jsx)(m.SheetTrigger,{asChild:!0,children:(0,l.jsx)("button",{className:"py-4 pr-3",type:"button",onClick:()=>t.setOpenMenu(!0),children:(0,l.jsx)(n.A,{})})}),r]})},f=e=>{var r,t;let{subMenu:n,menu:u,backButtonText:m,className:p,image:v,children:x,banner:b,buttonsNames:f}
1=e,[g,j]=d.useState(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("li",{className:(0,s.cn)("text-primary pb-4",p),children:!n||n.length<=0?(0,l.jsx)("a",{className:(0,s.cn)("flex w-full items-center justify-between"),href:(null==u?void 0:u.url)||"",children:null==u?void 0:u.label}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("button",{type:"button",className:(0,s.cn)("flex w-full items-center justify-between gap-3 text-left"),onClick:()=>j(!0),children:[v?(0,l.jsx)("img",{src:v,className:"size-5",alt:null==u?void 0:u.label}):null,null==u?void 0:u.label,n.length>0&&(0,l.jsx)(i.A,{className:""})]}),(0,l.jsxs)("div",{className:(0,s.cn)("bg-background absolute inset-0 -translate-x-full px-8 py-6 transition-transform duration-300",g&&"translate-x-0"),children:[(0,l.jsx)("div",{className:"mb-5",children:(0,l.jsxs)("button",{onClick:()=>j(!1),className:"typ-medium-medium flex items-center gap-2 text-left",type:"button",children:[(0,l.jsx)(o.A,{size:18}),m]})}),(0,l.jsxs)("ul",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"border-border flex items-center gap-5 border-b border-t pb-3 pt-3",children:[(0,l.jsx)("h2",{className:"typ-h4 w-full flex-1",children:null==u?void 0:u.label}),(0,l.jsx)(c.Button,{variant:"secondary",asChild:!0,children:(0,l.jsxs)("a",{href:null!=(r=null==u?void 0:u.url)?r:"#",children:[null==f?void 0:f.textButtonSeeAll,(0,l.jsx)(a.A,{className:"size-5"})]})})]}),null==n?void 0:n.map(e=>{var r;return(0,l.jsxs)("ul",{className:"border-border flex flex-col gap-3 border-b pb-3",children:[(0,l.jsx)("li",{className:"typ-large-medium text-secondary uppercase",children:e.subCategoryTitle}),null==(r=e.subCategory)?void 0:r.map(e=>{var r;return(0,l.jsx)(d.Fragment,{children:(0,l.jsx)("li",{className:"text-muted typ-medium px-2 hover:underline",children:(0,l.jsx)("a",{href:null!=(r=e.url)?r:"#",children:e.label})})},e.label)})]})}),(null==b?void 0:b.showBanner)?(0,l.jsxs)("li",{className:"relative mb-5 w-full overflow-hidden rounded-xl ",children:[(0,l.jsx)("img",{className:"absolute left-0 top-0  h-[262px] w-[319px] object-cover",src:(0,h.Q)(null==b?void 0:b.background,640),alt:null==b?void 0:b.title}),(0,l.jsx)("div",{className:"absolute size-full bg-black opacity-30"}),(0,l.jsxs)("div",{className:"relative flex flex-col gap-6 p-5 ",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("h3",{className:"typ-h3 text-primary-foreground line-clamp-3",children:null==b?void 0:b.title}),(0,l.jsx)("p",{className:"typ-p text-muted-foreground line-clamp-3",children:null==b?void 0:b.description})]}),(null==b?void 0:b.showButton)?(0,l.jsx)("a",{href:null!=(t=null==b?void 0:b.buttonUrl)?t:"#",children:(0,l.jsx)(c.Button,{variant:"outline",children:null==b?void 0:b.buttonText})}):null]})]}):null]})]})]})}),x]})}},19608:(e,r,t)=>{Promise.resolve().then(t.bind(t,4339)),Promise.resolve().then(t.bind(t,4098)),Promise.resolve().then(t.bind(t,10392)),Promise.resolve().then(t.bind(t,83835)),Promise.resolve().then(t.bind(t,17513)),Promise.resolve().then(t.bind(t,92947)),Promise.resolve().then(t.bind(t,65594)),Promise.resolve().then(t.bind(t,8139)),Promise.resolve().then(t.bind(t,291)),Promise.resolve().then(t.bind(t,75041)),Promise.resolve().then(t.bind(t,31287)),Promise.resolve().then(t.bind(t,79471)),Promise.resolve().then(t.bind(t,34365)),Promise.resolve().then(t.bind(t,88362)),Promise.resolve().then(t.bind(t,14487)),Promise.resolve().then(t.bind(t,67047)),Promise.resolve().then(t.bind(t,74327)),Promise.resolve().then(t.bind(t,11564)),Promise.resolve().then(t.bind(t,98354)),Promise.resolve().then(t.bind(t,53665)),Promise.resolve().then(t.bind(t,6359)),Promise.resolve().then(t.bind(t,48805)),Promise.resolve().then(t.bind(t,69847)),Promise.resolve().then(t.bind(t,18272)),Promise.resolve().then(t.bind(t,52294)),Promise.resolve().then(t.bind(t,83193)),Promise.resolve().then(t.t.bind(t,64816,23)),Promise.resolve().then(t.t.bind(t,67437,23)),Promise.resolve().then(t.bind(t,43740)),Promise.resolve().then(t.bind(t,5819)),Promise.resolve().then(t.bind(t,68956)),Promise.resolve().then(t.bind(t,93474)),Promise.resolve().then(t.bind(t,92641)),Promise.resolve().then(t.bind(t,27576)),Promise.resolve().then(t.bind(t,12739)),Promise.resolve().then(t.bind(t,60626)),Promise.resolve().then(t.bind(t,25393)),Promise.resolve().then(t.bind(t,15723)),Promise.resolve().then(t.bind(t,73508)),Promise.resolve().then(t.bind(t,66)),Promise.resolve().then(t.bind(t,94355
1)),Promise.resolve().then(t.bind(t,42685)),Promise.resolve().then(t.bind(t,76205)),Promise.resolve().then(t.bind(t,6960)),Promise.resolve().then(t.bind(t,98842)),Promise.resolve().then(t.bind(t,7189)),Promise.resolve().then(t.bind(t,81138)),Promise.resolve().then(t.bind(t,31574)),Promise.resolve().then(t.bind(t,90237)),Promise.resolve().then(t.bind(t,88516)),Promise.resolve().then(t.bind(t,76063)),Promise.resolve().then(t.bind(t,93331)),Promise.resolve().then(t.bind(t,80845)),Promise.resolve().then(t.bind(t,92346)),Promise.resolve().then(t.bind(t,23316)),Promise.resolve().then(t.bind(t,13328)),Promise.resolve().then(t.bind(t,91929)),Promise.resolve().then(t.bind(t,70758)),Promise.resolve().then(t.bind(t,99865)),Promise.resolve().then(t.bind(t,34577)),Promise.resolve().then(t.bind(t,53024)),Promise.resolve().then(t.bind(t,58414)),Promise.resolve().then(t.bind(t,32975)),Promise.resolve().then(t.bind(t,75689)),Promise.resolve().then(t.bind(t,46936)),Promise.resolve().then(t.bind(t,78259)),Promise.resolve().then(t.bind(t,3931)),Promise.resolve().then(t.bind(t,76221)),Promise.resolve().then(t.bind(t,62396))},43859:(e,r,t)=>{"use strict";t.d(r,{B:()=>n,HeaderProvider:()=>i});var l=t(70862),s=t(18526);let n=s.createContext(null),i=e=>{let{children:r}=e,{setShowCountry:t,showCountry:i}=(()=>{let[e,r]=s.useState(void 0);return{showCountry:e,setShowCountry:r}})();return(0,l.jsx)(n.Provider,{value:{showCountry:i,setShowCountry:t},children:r})}},67916:(e,r,t)=>{"use strict";t.r(r),t.d(r,{CartProvider:()=>i,cartContext:()=>n});var l=t(70862),s=t(18526);let n=s.createContext(null),i=e=>{let{children:r}=e,{openCart:t,setOpenCart:i}=(()=>{let[e,r]=s.useState(!1);return{openCart:e,setOpenCart:r}})();return(0,l.jsx)(n.Provider,{value:{openCart:t,setOpenCart:i},children:r})}},83835:(e,r,t)=>{"use strict";t.d(r,{HeaderDesktopClient:()=>d,IntersectionObserver:()=>c,Overlay:()=>u});var l=t(70862),s=t(43859),n=t(99049),i=t(18526),o=t(47718);let a=i.createContext(null),d=e=>{let{children:r,inactiveColor:t}=e,{outView:o,setOutView:d}=(()=>{let[e,r]=i.useState(!1);return{outView:e,setOutView:r}})();if(!i.useContext(s.B))throw Error("HeaderContext is not defined");return(0,l.jsx)(a.Provider,{value:{outView:o,setOutView:d},children:(0,l.jsx)("div",{"data-out-view":o,className:(0,n.cn)("group/root header-color","light"===t?"header-color-light":"header-color-dark",o&&"active"),children:r})})},u=()=>{let e=i.useContext(s.B);if(!e)throw Error("HeaderContext is not defined");return(0,l.jsx)("div",{role:"button",tabIndex:0,onClick:()=>e.setShowCountry(e=>!e),className:(0,n.cn)("bg-primary/50 fixed inset-0 z-10 hidden group-data-[show-country='true']/root:block")})},c=e=>{let{children:r,className:t}=e,s=i.useContext(a);if(!s)throw Error("HeaderContext is not defined");return(0,l.jsx)(o.pL,{onChange:e=>s.setOutView(!e),children:e=>{let{ref:s}=e;return(0,l.jsx)("div",{ref:s,className:t,children:r})}})}},92947:(e,r,t)=>{"use strict";t.d(r,{default:()=>w});var l=t(70862),s=t(65594),n=t(8139),i=t(99049),o=t(84123),a=t(18526),d=t(96422),u=t(90807);let c=(e,r)=>{switch(r.type){case"setInput":return{...e,input:r.payload,currentQuery:r.payload};case"setCurrentQuery":return{...e,currentQuery:r.payload};case"setTerms":return{...e,terms:r.payload};default:return e}};var m=t(17543),h=t(80109),p=t(3333),v=t(64816),x=t.n(v),b=t(4e3),f=t(1796),g=t(88389),j=t(85107);let y=e=>{var r;let t=e.title,s=e.handle,n=e.image,o=e.price,a=e.brand,d=e.tags,u=null==d||null==(r=d.builderTags)?void 0:r.filter(e=>{var r;return null==(r=d.tags)?void 0:r.find(r=>r===e.id)}).toSorted((e,r)=>{var t,l;return(null!=(t=e.order)?t:0)-(null!=(l=r.order)?l:0)}).slice(0,3),c=Number(null==o?void 0:o.minPrice),m=Number(null==o?void 0:o.maxPrice),h=(0,f.GE)({minPrice:c,availableForSale:!0,maxPrice:m,isBadge:!0}),p=null==u?void 0:u.map((e,r)=>(0,l.jsx)(j.E,{variant:e.variant,className:(0,i.cn)("rounded-sm opacity-0 group-hover:opacity-100",e.imageUrl&&"rounded-full",(null==u?void 0:u.length)===1&&!h&&"opacity-100",(null==u?void 0:u.length)>1&&0===r&&!h&&"opacity-100"),children:e.imageUrl?(0,l.jsx)("img",{className:"size-4",src:e.imageUrl,alt:e.label}):e.label},e.id));return(0,l.jsxs)("div",{className:"group relative flex flex-col gap-3 p-5",children:[(0,l.jsx)(x(),{href:"/products/".concat(s),className:"absolute inset-0 z-10"}),(0,l.jsxs)("div",{className:"absolute left-3 top-2 flex w-[60%] flex-wrap justify-start gap-2",children:[(0,l.jsx)(g.A,{maxPrice:null==o?void 0:o.maxPrice,minPrice:null==o?void 0:o.minPrice}),p]}),e.withCompareButton&&(0,l.jsx)("div",{className:"absolute right-3 top-2 flex justify-end xl:hidden xl:group-hover:flex",children:(0,l.jsx)(b.CompareButton,{buttonText:e.compareButtonText,handle:s,title:t,image:n,price:null==o?void 0:o.maxPrice,capacity:"",weight:"",maxPrice:null==o?void 0:o.maxPrice,minPrice:null==o?void 0:o.minPrice,activateBackgroun
1d:e.activateBackground})}),(0,l.jsx)("img",{className:"aspect-[21/25] object-cover ",alt:t,src:n}),(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("p",{className:"text-muted typ-brand-name line-clamp-1 min-h-[1lh] text-center",children:a}),(0,l.jsx)("p",{className:"text-primary typ-medium-medium line-clamp-2 min-h-[2lh] text-center",children:t})]}),(0,l.jsx)("div",{className:"text-primary flex items-center justify-center gap-1",children:(0,l.jsx)(f.BC,{maxPrice:Number(null==o?void 0:o.maxPrice),minPrice:Number(null==o?void 0:o.minPrice)})})]})},P=e=>{let{show:r}=e;return(0,l.jsx)("div",{className:(0,i.cn)("justify-center size-full items-center gap-1",r?"hidden":"flex"),children:(0,l.jsx)("div",{className:"size-10 rounded-full border-2 border-gray-300 border-t-gray-700 animate-spin"})})};var N=t(64023),C=t(73973);let w=e=>{var r,t,v,b,f,g,j,w;let{children:T,builderTags:k,labels:S,compareOptions:B}=e,[z,A]=a.useState(!1),{data:E,searchState:I,isLoadingAutocomplete:_,isLoadingSuggestions:O,isValidating:Q,suggestions:H,setInput:L}=(e=>{var r,t;let{search:l,setQueryTerm:s,setInput:n}=(()=>{let[e,r]=a.useReducer(c,{input:"",currentQuery:"",terms:[]});return{search:e,setInput:e=>{""===e&&r({type:"setTerms",payload:[]}),r({type:"setInput",payload:e})},setQueryTerm:t=>{r({type:"setCurrentQuery",payload:t}),r({type:"setTerms",payload:e.terms.map(e=>e.text===t?{...e,active:!0}:{...e,active:!1})})},setTerms:e=>r({type:"setTerms",payload:e})}})(),[i]=(0,o.o)(l.currentQuery,{wait:2e3}),m=""===l.currentQuery?"":i,h=function(e,r,t){let{data:l,...s}=(0,d.Ay)([r,e],()=>(0,u.p5)({type:r,query:e}),t);return{data:l,...s}}(m,"search",void 0),p=function(e,r){let{data:t,...l}=(0,d.Ay)([e],()=>(0,u.E0)({query:e}),void 0);return{data:t,...l}}(m),v=null==(t=p.data)||null==(r=t.data)?void 0:r.map(e=>({...e,phrase:e.phrase.replace(/^-\s*/,"")}));return{...h,suggestions:v,isLoadingAutocomplete:h.isLoading,isValidatingAutocomplete:h.isValidating,isLoadingSuggestions:p.isLoading,isValidatingSuggestions:p.isValidating,data:h.data,searchState:l,setQueryTerm:s,setInput:n}})(),U=(0,C.useRouter)(),M=(null==E?void 0:E.status)==="Success"?E.data.items:[],R=(I.currentQuery||I.input||"").trim(),V=a.useMemo(()=>(0,N.vH)({query:R,response:E,source:"search-popup"}),[R,E]),q=a.useDeferredValue((null!=(f=null==E||null==(t=E.data)||null==(r=t.navigation)?void 0:r.totalItems)?f:0)<=0&&!Q&&""!==I.currentQuery),W=null==S?void 0:S.drawerSeeAllText.replace("_number_",null!=(g=null==E||null==(b=E.data)||null==(v=b.navigation)?void 0:v.totalItems.toString())?g:""),D=a.useCallback((e,r)=>{var t;let l=null!=(t=e.SearchSessionId)?t:e.searchSessionId;return"string"==typeof l&&l.length>0?l:"search-popup:".concat(r)},[]),F=a.useCallback(e=>{let r=e.trim();if(!r)return;let t=r===R?V:(0,N.vH)({query:r,response:E,source:"search-popup"});t&&(0,N.Cm)({eventType:"search",payload:t})},[E,V,R]);return(0,l.jsxs)(n.Sheet,{open:z,onOpenChange:A,children:[(0,l.jsx)(n.SheetTrigger,{children:T}),(0,l.jsxs)(n.SheetContent,{className:"h-screen w-full md:max-w-full xl:w-8/12 ",children:[V&&(0,l.jsx)(N.ap,{eventType:"search",payload:V,dedupeKey:D(V,R),enabled:z&&R.length>0,delayMs:1e4}),(0,l.jsx)(s.Button,{className:"absolute right-3 top-2",variant:"outline",size:"icon-sm",onClick:()=>A(!1),children:(0,l.jsx)(m.A,{className:"text-primary size-5",strokeWidth:1})}),(0,l.jsxs)("div",{className:"mt-5 flex size-full flex-col gap-3",children:[(0,l.jsxs)("form",{className:"relative mx-auto flex w-full max-w-screen-xl shrink-0 items-center justify-between",onSubmit:e=>{e.preventDefault(),A(!1),I.input&&(F(I.input),U.push("/search?q=".concat(encodeURIComponent(I.input))))},children:[(0,l.jsx)(h.A,{className:"absolute left-5 size-3",strokeWidth:1}),(0,l.jsx)("input",{value:I.input,onChange:e=>{L(e.target.value.replace(RegExp("[^\\p{L}0-9\\s.,|;+_\\/-]","gu"),""))},type:"text",className:"border-border placeholder:text-secondary focus-visible:ring-primary typ-small bg-input flex w-full rounded-md border py-2 pl-10 text-sm shadow-sm transition-all file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",placeholder:null==S?void 0:S.inputPlaceHolder}),(0,l.jsx)("button",{type:"submit",hidden:!0}),(0,l.jsx)(s.Button,{type:"button",variant:"outline",className:"bg-basic-secondary text-primary absolute right-5 size-5 rounded-full p-0 hover:scale-100",onClick:()=>L(""),children:(0,l.jsx)(m.A,{className:"size-3"})})]}),""!==I.input&&(0,l.jsxs)("div",{className:"flex flex-grow flex-col overflow-auto xl:flex-row xl:gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 xl:w-3/4",children:[(0,l.jsx)("p",{className:"typ-extra-large-medium border-border border-b pb-3",children:null!=(j=null==S?void 0:S.drawerTopResultsText)?j:"Productos Sugeridos"}),(0,l.jsx)("div",{className:(0,i.cn)("typ-large-medium mx-auto hidden w-full max-w-screen-xl",q?"block":""),children:(0,l.jsxs)("span",{children:[null==S?void 0:S.drawerEmptyResultsText,' "',null==I?void 0:I.input,'"']})}),_?(0,l.jsx)(P,{show:q}):(0,l.jsx)("div",{className:"grid grid-cols-2 overflow-auto md:grid-cols-3",children:null==M?void 0:M.slice(0,6).map(e=>{var r,t,s,n,i,o,a;let d=null==(r=e.itemProperties)?void 0:r.item_card,u=d.price&&null!=(o=null==(t=Object.values(d.price)[0])?void 0:t.toString())?o:"",c=d.original_price&&null!=(a=null==(s=Object.values(d.original_price)[0])?void 0:s.toString())?a:"",m=d.url?null==(n=d.url.split("/products/")[1])?void 0:n.split("?")[0]:"";
1return(0,l.jsx)(y,{activateBackground:null==B?void 0:B.activateBackground,tags:{builderTags:k,tags:null==d||null==(i=d.product_attributes)?void 0:i.shopify_tag},handle:m,brand:null==d?void 0:d.brand,image:null==d?void 0:d.image_url,title:null==d?void 0:d.name,price:{minPrice:u,maxPrice:c},withCompareButton:null==B?void 0:B.activateInProductCard,compareButtonText:null==B?void 0:B.textInProductCard},null==d?void 0:d.id)})})]}),(0,l.jsxs)("div",{className:"border-border hidden w-1/4 border-l pl-4 xl:block",children:[(0,l.jsx)("p",{className:"typ-large-medium border-border mb-6 border-b py-3",children:null!=(w=null==S?void 0:S.drawerSearchSuggestionsText)?w:"Sugerencias de busqueda"}),O?(0,l.jsx)(P,{show:q}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:null==H?void 0:H.map(e=>(0,l.jsx)(x(),{onClick:()=>F(e.phrase),href:"/search?q=".concat(e.phrase),className:(0,i.cn)("text-muted typ-medium",e.phrase===I.input&&"border-brand-secondary text-primary border-l-2 pl-1"),children:e.phrase},null==e?void 0:e.phrase))})]})]}),""!==I.input&&(0,l.jsx)(s.Button,{variant:"secondary",children:(0,l.jsxs)(x(),{onClick:()=>{A(!1),F(I.input)},href:"/search?q=".concat(encodeURIComponent(I.input)),className:"flex h-14 w-full items-center justify-center gap-2",children:[null==W?void 0:W.toLocaleUpperCase(),' "',I.input,'"',(0,l.jsx)(p.A,{className:"border-brand-primary size-5",strokeWidth:1})]})})]})]})]})}}}]);

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.