PageSourceSearch

https://www.lodestartech.com/97.791520b328b9c934090a.js

js lodestartech.com collected 2026-10-09 22:41:46 UTC 5,006 bytes, 37 lines download raw bytes

1/*! @version pwa-studio: 2.12, @magento/venia-ui: ~11.6.0, @magento/upward-security-headers: ~1.0.14, @magento/pwa-theme-venia: ~2.4.0, @magento/pwa-buildpack: ~11.5.4, @magento/peregrine: ~14.5.1, @magento/pagebuilder: ~9.3.3, @magento/eslint-config: ~1.5.0, @magento/babel-preset-peregrine: ~1.3.3, @apollo/client: ~3.13.8 */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[97],{SAkj:function(e,t,a){"use strict"
3a.r(t),a.d(t,"default",function(){return O}),a.d(t,"FilterSidebarShimmer",function(){return m.a})
4var n=a("q1tI"),r=a.n(n),l=a("kriW"),s=a("17x9"),c=a("j/pM"),i=a("y1Xp"),o=a("6QXU"),u=a("t1DO"),f=a("th2e"),p=a("bGkD"),b=a("Ty5D")
5const d=e=>{const{filters:t,filterCountToOpen:a,setFilterOptions:s}=e,d=Object(c.a)({filters:t}),{filterApi:O,filterItems:m,filterNames:g,filterFrontendInput:h,filterState:j,handleApply:y,handleReset:w}=d,k=Object(n.useRef)(),S=Object(i.a)(p.a,e.classes),M=Object(b.h)(),C=Array.from(m,e=>{let[t]=e
6if("price"==t){const e=new URLSearchParams(M.search),t=new Set(e.keys())
7for(const a of t)if("price[filter]"==a){const t=e.get("price[filter]"),a={title:t.split(",")[0],value:t.split(",")[1]},n=new Set
8n.add(a),j.set("price",new Set(n))}}}),E=Object(n.useCallback)(function(){const e=k.current
9if(e&&"function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect().top,a=window.scrollY+t-150
10window.scrollTo(0,a)}y(...arguments)},[y,k])
11Object(n.useEffect)(()=>{j&&s(j)},[j,s])
12const N=Object(n.useMemo)(()=>Array.from(m,(e,t)=>{let[n,l]=e
13const s=j.get(n),c=g.get(n),i=h.get(n)
14return r.a.createElement(f.a,{key:n,filterApi:O,filterState:s,filterFrontendInput:i,group:n,items:l,name:c,onApply:E,initialOpen:t<a})}),[O,m,g,h,j,a,E]),v=j.size?r.a.createElement("div",{className:S.action},r.a.createElement(o.a,{type:"button",onClick:w},r.a.createElement(l.a,{id:"filterModal.action",defaultMessage:"Clear all"}))):null
15return r.a.createElement("aside",{className:S.root,ref:k,"aria-busy":"false"},r.a.createElement("div",{className:S.body},r.a.createElement("div",{className:S.header},r.a.createElement("h2",{className:S.headerTitle},r.a.createElement(l.a,{id:"filterModal.headerTitle",defaultMessage:"Filters"}))),C,r.a.createElement(u.a,{filterApi:O,filterNames:g,filterState:j,onRemove:E}),v,r.a.createElement("ul",{className:S.blocks},N)))}
16d.defaultProps={filterCountToOpen:3},d.propTypes={classes:Object(s.shape)({action:s.string,blocks:s.string,body:s.string,header:s.string,headerTitle:s.string,root:s.string,root_open:s.string}),filters:Object(s.arrayOf)(Object(s.shape)({attribute_code:s.string,items:s.array})),filterCountToOpen:s.number}
17var O=d,m=a("LlM3")},"j/pM":function(e,t,a){"use strict"
18a.d(t,"a",function(){return f})
19var n=a("q1tI"),r=a("+TN3"),l=a("Ty5D"),s=a("OlZo"),c=a("y1Xp"),i=a("Mhql"),o=a("+wQL"),u=a("qykw")
20const f=e=>{const{filters:t}=e,a=Object(c.a)(u.a,e.operations),{getFilterInputsQuery:f}=a,[p,b]=Object(n.useState)(!1),[{drawer:d},{toggleDrawer:O,closeDrawer:m}]=Object(s.b)(),[g,h]=Object(i.a)(),j=Object(n.useRef)(null),y="filter"===d,w=Object(l.g)(),{pathname:k,search:S}=Object(l.h)(),{data:M}=Object(r.f)(f),C=Object(n.useMemo)(()=>t.map(e=>{let{attribute_code:t}=e
21return t}),[t]),E=Object(n.useMemo)(()=>{const e=new Set
22return"/search.html"!==k&&(e.add("category_id"),e.add("category_uid")),e},[k]),N=Object(n.useMemo)(()=>{const e=new Set,t=M?M.__type.inputFields:[]
23for(const{name:a}of t){const t=C.includes(a),n=!E.has(a)
24t&&n&&e.add(a)}return e},[E,C,M]),v=e=>{const t=JSON.stringify(e)
25return e.length<=2&&(t.includes(JSON.stringify({__typename:"AggregationOption",label:"0",value:"0"}))||t.includes(JSON.stringify({__typename:"AggregationOption",label:"1",value:"1"})))},[A,_,T,I]=Object(n.useMemo)(()=>{const e=new Map,a=new Set,n=new Map,r=new Map,l=Object(o.f)([...t])
26for(const t of l){const{options:l,label:s,attribute_code:c}=t
27if(N.has(c)){const t=[]
28if(e.set(c,s),a.add("".concat(c,"[filter]")),v(l))n.set(c,"boolean"),t.push({title:"No",value:"0",label:s+":No"}),t.push({title:"Yes",value:"1",label:s+":Yes"})
29else{n.set(c,null)
30for(const{label:e,value:a}of l)t.push({title:Object(o.g)(e),value:a})}r.set(c,t)}}return[e,a,r,n]},[t,N])
31Object(n.useEffect)(()=>
31{if(p){const e=Object(o.d)(S,_,g)
32w.push({pathname:k,search:e}),b(!1)}},[_,g,w,p,k,S])
33const F=Object(n.useCallback)(()=>{O("filter")},[O]),R=Object(n.useCallback)(()=>{m()},[m]),D=Object(n.useCallback)(()=>{b(!0),R()},[R]),J=Object(n.useCallback)(()=>{w.replace({search:"page=1"})},[w]),q=Object(n.useCallback)(e=>{if(y)switch(e.keyCode){case 27:R()}},[y,R])
34return Object(n.useEffect)(()=>{const e=null===j.current&&"filter"===d,t="filter"===j.current&&null===d
35if(e||t){const e=Object(o.e)(S,_,T)
36h.setItems(e)}t&&R(),j.current=d},[d,h,T,_,S,R]),Object(n.useEffect)(()=>{const e=Object(o.e)(S,_,T)
37h.setItems(e)},[h,T,_,S]),{filterApi:h,filterItems:T,filterKeys:_,filterNames:A,filterFrontendInput:I,filterState:g,handleApply:D,handleClose:R,handleKeyDownActions:q,handleOpen:F,handleReset:J,isApplying:p,isOpen:y}}}}])

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.