PageSourceSearch

https://shop.thegreenchapter.com/static/js/6430.49240783.chunk.js

js thegreenchapter.com collected 2026-10-10 01:15:27 UTC 17,511 bytes, 2 lines download raw bytes

1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6430],{43323:(e,t,o)=>{e.exports=o(12922).wrapCssModule(e.id,o(15118))},6430:(e,t,o)=>{"use strict";o.d(t,{j:()=>M});var r=o(12922),c=o(43323),d=o.n(c),n=o(25498),l=o(70358),u=o(72413),a=o(6706),i=o(18913),s=o(81412),g=o(2272),p=o(6046),h=o(48598),m=o(15166),S=o(21010);const _=e=>{let{inputId:t,product:o,value:r,updateQuantity:c,uomId:u,updateUom:a,hideControlsOnBlur:s,hideQuantityTextBox:g}=e;const{id:p,uoms:_,isOrderable:P}=o,x=(0,h.g4)(),v=(0,m.useCultureName)(),f=(0,l.useSelector)((e=>e.settings.product.allowUOMSelection)),b=(0,n.useMemo)((()=>{var e;return(0,h.Hj)(null==(e=o.uoms)?void 0:e.find((e=>e.id===u)))}),[null==o?void 0:o.id,u]);(0,n.useEffect)((()=>{c({value:b.initial,isValid:!0})}),[b]);const w=x&&!(!u||null==_||!_.length)&&(P||f),y=(0,m.getNumberDecimalsSeparator)(v),[C]=(0,i.KR)([w&&!g&&'Aria_QuantityReset']).texts;return(0,S.jsxs)("div",{className:d().quantityBox,children:[!g&&P&&(0,S.jsx)("div",{className:d().quantity,children:(0,S.jsx)(h.Kc,{id:t,quantity:b,value:r,onChange:c,separator:y,hideControlsOnBlur:s})}),w&&(0,S.jsx)("div",{className:d().uomSelector,children:(0,S.jsx)(h.hu,{className:d().uom,productId:p,allowUOMSelection:f,uomId:u,uoms:_,onUomChange:a,ariaChangeStatus:C})})]})},P=(0,r.withStyles)(d())((0,n.memo)(_));var x=o(76809),v=o(34814),f=o(47721);const b=(0,r.withStyles)(d())((e=>{var t,o;let{id:r,texts:c,product:u,onProductAdd:m,productAddDisabled:_,allowAddUnorderableProduct:b,productClickTrackingSource:w,searchInputId:y,hideQuantityTextBox:C,canAddProduct:I,showId:j,showSalesAgreementIndicator:k}=e;const A=(0,l.useDispatch)(),{id:B,customerSpecificId:N,title:D,url:T,hasVariants:q,variantComponentGroups:L,uom:O}=u,F=`${r}_productSelectorQuantity`,{addBtn:E,addBtnAriaLabel:$,configureBtnAriaLabel:M,productCannotBeOrderedMessage:R,cannotAddProductMessage:U,configurableProductCannotBeAddedMessage:Q}=c,G=null==O?void 0:O.id,[V,H]=(0,n.useState)(),[K,W]=(0,n.useState)(G),[z,J]=(0,n.useState)(null),X=(0,n.useMemo)((()=>L.every((e=>e.components.length>0))),[L]);(0,n.useEffect)((()=>{W(G),q||J(null)}),[B]);const Z=b||u.isOrderable,Y=D||B,ee=`${Y} ${q?(0,s.Ay)(z,L):''}`,te=(0,S.jsx)("div",{className:d().msg,children:R}),oe=(0,S.jsx)(x.O,{className:"placeholder"});return(0,S.jsx)(g.qM.Provider,{value:{product:u,trackingSource:w},children:(0,S.jsxs)("form",{onSubmit:e=>{var t;if(e.preventDefault(),e.stopPropagation(),!V.isValid)return void(null==(t=document.getElementById(F))||t.focus());m({productId:B,variantId:z,uomId:K,quantity:V.value},u);const o=document.getElementById(y);null==o||o.focus(),null==o||o.select()},className:`${d().product} ${Z?'':d().cannotOrder}`,children:[(0,S.jsxs)("div",{className:d().productInfo,children:[(0,S.jsx)(g.XB,{children:e=>(0,S.jsx)("a",{onClickCapture:e,href:T,target:"_blank",rel:"noopener noreferrer",children:Y})}),j&&(0,S.jsx)("span",{className:d().id,children:(0,f.i)(B,N)}),k&&(0,S.jsx)("div",{className:d().panelSAgrIndicator,children:(0,S.jsx)(h.Tn,{productId:B,uomId:K??null,productHasVariants:q??!1,variantId:z})})]}),X?(0,S.jsxs)(S.Fragment,{children:[null!=(t=u.productConfiguratorInfo)&&t.isProductConfigurable?Q&&(0,S.jsx)("div",{className:d().msg,children:Q}):(0,S.jsxs)(S.Fragment,{children:[q&&L.length&&(0,S.jsx)(p.i,{productId:B,variantComponentGroups:L,updateVariantId:J,className:d().variantDropdowns,selectorClassName:d().variantSelector}),(0,S.jsx)(P,{inputId:F,product:u,value:V&&V.value,updateQuantity:H,uomId:K,updateUom:e=>{W(e),A((0,a.di)(B,!!b,e))},hideControlsOnBlur:!0,hideQuantityTextBox:C})]}),Z?(0,S.jsx)("div",{className:d().actions,children:null!=(o=u.productConfiguratorInfo)&&o.isProductConfigurable?(0,S.jsx)(h.vO,{textKey:"ConfigureProduct",className:d().btnConfigure,ariaLabel:(0,i.g_)(M,[ee]),product:u,placeholder:oe}):!I||I({productId:B,variantId:z,uomId:K})?(0,S.jsx)(v.$n,{size:"sm",theme:"action",className:d().btnAdd,"aria-label":(0,i.g_)($,[ee]),type:"submit","aria-disabled":_,children:E}):U&&(0,S.jsx)("div",{className:d().msgCannotAdd,children:U})}):te]}):te]})})}));var w=o(61855),y=o.n(w),C=o(24169),I=o(72704),j=o(23266),k=o(44650);const A=e=>{let{productId:t,tagName:o="div",className:r}=e;const{canViewIndicator:c,agreements:d}=(0,j.Ip)(t),{text:n,loaded:l}=(0,j.x1)(c);return null!=d&&d.length&&l?(0,S.jsx)(k.P,{theme:"neutral",tagName:o,className:r,children:n}):null},B=(0,n.memo)(A),N=(0,r.withStyles)(d())((e=>{let{suggestion:t,showSalesAgreementIndicator:o}=e;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:d().suggestItem,children:t.highlightedText}),o&&(0,S.jsx)(B,{productId:t.id})]})})),D=e=>{let{containerProps:t,children:o}=e;return(0,S.jsx)("div",{...t,children:o})};var T=o(3392);const q=(0,r.withStyles)(d())((e=>{let{texts:t,id:o,productLoadingState:r,suggestions:c,selectedProduct:l,onProductSearch:a,onProductSelect:s,onProductClear:g,disabled:p,showSalesAgreementIndicator:h}=e;
1const[m,_]=r,{searchBoxPlaceholder:P,productNotFoundText:x}=t,[v,f]=(0,n.useState)(''),[b,w]=(0,n.useState)(!1),j=(0,n.useRef)({}).current,[k,A]=(0,n.useState)(!0),B=(0,n.useMemo)((()=>(j.suggestionsAreLoading=!1,function(e,t){const o=(0,C.T)(e.trim()),r=new RegExp(`(${o})`,'gi');return t.map((e=>({...e,highlightedText:(0,I.U)(L(e),r,d().highlight)})))}(v,c))),[c]),q=(0,n.useMemo)((()=>y()((e=>a(e)),250)),[a]),O=e=>{j.isDirty=!1,A(!1),_(!0),s(e)};(0,u.vu)((()=>{f(''),w(!1)})),(0,u.ZS)((()=>{l&&s(l.id)})),(0,n.useEffect)((()=>{f(l?L(l):'')}),[l]),(0,n.useEffect)((()=>{j.waitingForResult&&!j.suggestionsAreLoading&&(j.waitingForResult=!1,0!==c.length&&O(c[0].id),w(0===c.length&&0!==v.length),0===c.length&&_(!1))}),[c,j.suggestionsAreLoading]);const F=(e,t)=>{let{suggestion:o}=t;e.preventDefault(),w(!1),f(L(o)),O(o.id)},E={id:o,placeholder:P,value:v,onChange:(e,t)=>{let{newValue:o}=t;f(o),m&&_(!1),j.waitingForResult=!1,j.isDirty=!0},onBlur:()=>{!v&&b&&w(!1)},onKeyDown:e=>{if('Tab'===e.key&&j.highlightedSuggestion)return F(e,{suggestion:j.highlightedSuggestion}),void e.preventDefault()},disabled:p};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),e.stopPropagation(),j.isDirty&&(!v.length||v.trim().length)){if(g(),!v.length)return w(!1),void A(!1);if(j.suggestionsAreLoading)return _(!0),void(j.waitingForResult=!0);j.waitingForResult=!1,0!==c.length?O(c[0].id):_(!1),w(0===c.length)}},className:d().search,children:[(0,S.jsx)("label",{htmlFor:o,className:"visually-hidden",children:(0,S.jsx)(i.gJ,{textKey:"Search"})}),(0,S.jsx)(I.G,{suggestions:k?B:[],onFetchRequested:e=>{let{value:t,reason:o}=e;'input-changed'===o&&t.trim().length>0&&(A(!0),j.suggestionsAreLoading=!0,q(t))},onClearRequested:()=>A(!1),onSelected:F,onHighlighted:e=>{let{suggestion:t}=e;j.highlightedSuggestion=t},getItemValue:e=>e.productGroup?e.productGroup.id:e.id,renderItem:e=>(0,S.jsx)(N,{suggestion:e,showSalesAgreementIndicator:h}),renderItemsContainer:D,inputProps:E,theme:d(),id:o}),(0,S.jsx)("span",{className:d().icon,children:(0,S.jsx)(T.WI,{})})]}),b&&!m&&(0,S.jsx)("div",{className:"msg-block",children:x})]})}));function L(e){return e.productGroup?`${e.productGroup.id} - ${e.productGroup.title||''}`:`${(0,f.i)(e.id,e.customerSpecificId)} - ${e.title||''}`}var O=o(43026);const F=e=>{let{text:t}=e;return(0,S.jsxs)("div",{className:d().loader,children:[(0,S.jsx)("div",{className:d().spinner,children:(0,S.jsx)(O.default,{noLabel:!0})}),t]})},E=(0,r.withStyles)(d())((0,n.memo)(F)),$=e=>{let{id:t,texts:o,onProductAdd:r,productAddDisabled:c,allowAddUnorderableProduct:i,productClickTrackingSource:s,disabled:g,canAddProduct:p,hideQuantityTextBox:h,className:m="",showProductId:_,showSalesAgreementIndicator:P}=e;const x=(0,l.useDispatch)(),{suggestions:v,selectedProduct:f}=(0,l.useSelector)((e=>({suggestions:e.productSelector.suggestions,selectedProduct:e.productSelector.selectedProduct})),l.shallowEqual),w=(0,n.useState)(!1),[y,C]=w,I=`${t}_productSelectorSearch`,j=(0,n.useCallback)((e=>x((0,a.zh)(e,void 0))),[]),k=(0,n.useCallback)((e=>x((0,a.di)(e,!!i))),[]),A=(0,n.useCallback)((()=>x((0,a.jh)())),[]);return(0,n.useEffect)((()=>{C(!1)}),[f]),(0,u.vu)((()=>{f&&A()})),(0,n.useEffect)((()=>()=>{f&&A()}),[]),(0,S.jsxs)("div",{className:`${d().box} ${m||''}`,role:"search","aria-label":o.ariaLabel,children:[(0,S.jsx)(q,{texts:o,id:I,productLoadingState:w,suggestions:v,selectedProduct:f,onProductSearch:j,onProductSelect:k,onProductClear:A,disabled:g,showSalesAgreementIndicator:P}),y?(0,S.jsx)(E,{text:o.loadingText}):f?(0,S.jsx)(b,{id:t,texts:o,product:f,onProductAdd:r,productAddDisabled:c,allowAddUnorderableProduct:i,productClickTrackingSource:s,searchInputId:I,hideQuantityTextBox:h,canAddProduct:p,showId:_,showSalesAgreementIndicator:P}):null]})},M=(0,r.withStyles)(d())((0,n.memo)($))},15118:(e,t,o)=>{var r=o(68723),c=o(95756)(r);c.push([e.id,".ProductSelector_box{margin:30px 0}.ProductSelector_box,.ProductSelector_search{display:inline-block;width:100%}.ProductSelector_search{margin-bottom:30px;position:relative}.ProductSelector_search .ProductSelector_icon{align-items:center;bottom:0;display:flex;height:100%;pointer-events:none;position:absolute;right:0;text-align:center;top:0;-webkit-user-select:none;user-select:none;width:2.6em}.ProductSelector_search .ProductSelector_icon img,.ProductSelector_search .ProductSelector_icon svg{color:var(--theme-input_Focus_BorderColor,#1f7bc9);margin:auto;max-height:100%;max-width:.45em}.ProductSelector_search .ProductSelector_container{height:3em}.ProductSelector_search .ProductSelector_container ::placeholder{color:var(--theme-input_Placeholder_Color,#b2b2b2);font-style:italic}.ProductSelector_search .ProductSelector_container-open{border-bottom:none}.ProductSelector_search .ProductSelector_input{-webkit-appearance:none;-moz-appearance:none;appearance:none;
1background-color:var(--theme-input_BackgroundColor,#fff);border:none;border-color:var(--theme-input_BorderColor,#77777f);border-radius:var(--theme-input_BorderRadius,3px);border-style:var(--theme-input_BorderStyle,solid);border-width:var(--theme-input_BorderWidth,1px);color:var(--theme-input_Color,#333);display:block;height:100%;padding:calc(var(--theme-input_BorderBottomWidth, 1px) - var(--theme-input_BorderTopWidth, 0px)) 2.6em calc(var(--theme-input_BorderTopWidth, 0px) - var(--theme-input_BorderBottomWidth, 1px)) 1.1em;width:100%}@media(pointer:coarse){html.mouse-click .ProductSelector_search .ProductSelector_input:focus{outline:0!important}}.ProductSelector_search .ProductSelector_input:focus{background-color:var(--theme-input_Focus_BackgroundColor,#fff);border-color:var(--theme-input_Focus_BorderColor,#1f7bc9)}.ProductSelector_search .ProductSelector_suggestions-container{background-color:var(--theme-popup_BackgroundColor,#fff);left:0;overflow-y:auto;position:absolute;right:0;top:100%;z-index:1}.ProductSelector_search .ProductSelector_suggestions-container-open{border:1px solid var(--theme-popup_BorderColor,#e6e6e6)}.ProductSelector_search .ProductSelector_suggestions-list{list-style:none;margin:0;padding:0}.ProductSelector_search .ProductSelector_suggestion{background-color:var(--theme-popup_BackgroundColor,#fff);cursor:pointer;padding:.5em .8em;transition:background-color .15s;width:100%}.ProductSelector_search .ProductSelector_suggestion-highlighted{background-color:var(--theme-linkBlock_Hover_BackgroundColor,#f7f7f7)}.ProductSelector_search .ProductSelector_suggest-item{color:var(--theme-lighterText_Color,#999)}.ProductSelector_search .ProductSelector_highlight{color:var(--theme-regularTitle_Color,#333)}.ProductSelector_product{border-bottom:1px dashed var(--theme-borderColor,#e6e6e6);border-top:1px dashed var(--theme-borderColor,#e6e6e6);padding:.8em 0;position:relative}.ProductSelector_product .ProductSelector_product-info{margin:0 0 10px}.ProductSelector_product .ProductSelector_product-info a{color:var(--theme-darkestText_Color,#000);font-weight:700}html.pointer-mouse .ProductSelector_product .ProductSelector_product-info a:hover{color:var(--theme-darkestText_Color,#000)}@supports(not (-webkit-hyphens:none)) and (not (-moz-appearance:none)) and (list-style-type:\"*\"){@media(pointer:coarse){html:not(.pointer-mouse) .ProductSelector_product .ProductSelector_product-info a:active{color:var(--theme-darkestText_Color,#000)}}}.ProductSelector_product .ProductSelector_product-info .ProductSelector_id{display:block}.ProductSelector_product .ProductSelector_actions,.ProductSelector_product .ProductSelector_quantity-box,.ProductSelector_product .ProductSelector_variant-dropdowns{margin:10px 0;max-width:100%}.ProductSelector_product .ProductSelector_product-info+.ProductSelector_quantity-box,.ProductSelector_product .ProductSelector_product-info+.ProductSelector_variant-dropdowns{margin-left:auto}.ProductSelector_product .ProductSelector_actions{margin-left:auto}.ProductSelector_product .ProductSelector_btn-add{width:100%}.ProductSelector_product .ProductSelector_variant-selector{display:block;margin-bottom:.8em;margin-top:.25em}.ProductSelector_product .ProductSelector_variant-selector:last-child{margin-bottom:0}.ProductSelector_product .ProductSelector_quantity,.ProductSelector_product .ProductSelector_uom-selector{display:inline-block;margin-bottom:.4em;margin-top:.4em;vertical-align:top}.ProductSelector_product .ProductSelector_uom-selector{margin-left:.8em;max-width:calc(100% - 9.9em)}.ProductSelector_product .ProductSelector_uom-selector:only-child{margin-left:0;max-width:100%}.ProductSelector_uom{max-width:100%}.ProductSelector_loader{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:1em;width:100%}.ProductSelector_loader .ProductSelector_spinner{margin-bottom:.5em}.ProductSelector_panel-s-agr-indicator{padding:.3em 0}@media (min-width:env(--theme-breakpoints_Medium,960)px),print{.ProductSelector_search{max-width:688px}.ProductSelector_product{display:flex;flex-wrap:wrap;padding:.8em}.ProductSelector_product .ProductSelector_msg,.ProductSelector_product .ProductSelector_product-info{margin-top:10px;padding-top:.35em}.ProductSelector_product .ProductSelector_product-info{max-width:25%}.ProductSelector_product .ProductSelector_actions,.ProductSelector_product .ProductSelector_quantity-box,.ProductSelector_product .ProductSelector_variant-dropdowns{padding:0 10px}.ProductSelector_product .ProductSelector_variant-dropdowns{align-content:flex-start;display:flex;flex-wrap:wrap;max-width:25%}.ProductSelector_product .ProductSelector_variant-selector{flex-grow:0;flex-shrink:0;margin:.4em .8em .4em 0}.ProductSelector_product .ProductSelector_variant-selector:last-child{margin-bottom:.4em;margin-right:0}.ProductSelector_product .ProductSelector_quantity-box{flex-shrink:0;max-width:50%;text-align:right}.ProductSelector_product .ProductSelector_quantity-box .ProductSelector_uom-selector{text-align:left}.ProductSelector_product .ProductSelector_actions{max-width:20%}.ProductSelector_product .ProductSelector_btn-add{width:auto}.ProductSelector_product .ProductSelector_msg{margin-left:auto;max-width:50%}.ProductSelector_product.ProductSelector_cannot-order .ProductSelector_product-info{max-width:50%}.ProductSelector_uom{max-width:calc(100% + 1.5px);width:calc(100% + 1.5px)}}.ProductSelector_btn-configure,.ProductSelector_msg-cannot-add{/*!*/}",""]),c.locals={box:"ProductSelector_box",search:"ProductSelector_search",icon:"ProductSelector_icon",container:"ProductSelector_container","container-open":"ProductSelector_container-open",containerOpen:"ProductSelector_container-open",input:"ProductSelector_input","suggestions-container":"ProductSelector_suggestions-container",suggestionsContainer:"ProductSelector_suggestions-container","suggestions-container-open":"ProductSelector_suggestions-container-open",suggestionsContainerOpen:"ProductSelector_suggestions-container-open","suggestions-list":"ProductSelector_suggestions-list",suggestionsList:"ProductSelector_suggestions-list",suggestion:"ProductSelector_suggestion","suggestion-highlighted":"ProductSelector_suggestion-highlighted",suggestionHighlighted:"ProductSelector_suggestion-highlighted","suggest-item":"ProductSelector_suggest-item",suggestItem:"ProductSelector_suggest-item",highlight:"ProductSelector_highlight",product:"ProductSelector_product","product-info":"ProductSelector_product-info",productInfo:"ProductSelector_product-info",i
1d:"ProductSelector_id",actions:"ProductSelector_actions","quantity-box":"ProductSelector_quantity-box",quantityBox:"ProductSelector_quantity-box","variant-dropdowns":"ProductSelector_variant-dropdowns",variantDropdowns:"ProductSelector_variant-dropdowns","btn-add":"ProductSelector_btn-add",btnAdd:"ProductSelector_btn-add","variant-selector":"ProductSelector_variant-selector",variantSelector:"ProductSelector_variant-selector",quantity:"ProductSelector_quantity","uom-selector":"ProductSelector_uom-selector",uomSelector:"ProductSelector_uom-selector",uom:"ProductSelector_uom",loader:"ProductSelector_loader",spinner:"ProductSelector_spinner","panel-s-agr-indicator":"ProductSelector_panel-s-agr-indicator",panelSAgrIndicator:"ProductSelector_panel-s-agr-indicator",msg:"ProductSelector_msg","cannot-order":"ProductSelector_cannot-order",cannotOrder:"ProductSelector_cannot-order","btn-configure":"ProductSelector_btn-configure",btnConfigure:"ProductSelector_btn-configure","msg-cannot-add":"ProductSelector_msg-cannot-add",msgCannotAdd:"ProductSelector_msg-cannot-add"},e.exports=c}}]);
2//# sourceMappingURL=6430.49240783.chunk.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.