1"use strict";(self.webpackChunkHost_shell_app=self.webpackChunkHost_shell_app||[]).push([[1811],{16052:function(e,t,a){a.d(t,{s:function(){return r}});var n=a(71200),l=a(80737),r=function(e){var t=e.children,a=e.useSharedApiKey,r=e.domain,i=e.authClientId,o=e.redirectUrl;return!a&&r&&i?n.createElement(l.Y,{domain:r,clientId:i,redirectUrl:o},t):n.createElement(n.Fragment,null,t)}},91811:function(e,t,a){a.d(t,{ProductSelector:function(){return am},gv:function(){return ag}});var n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,C,_,v,S,y,E,k,P,N,A,M=a(56976),L=a(35776),R=a(7973),x=a(11941),I=a(76214),T=a(93939),V=a(65270),F=a(62508),w=a(14652),B=a(14043),D=a(44498),H=a(65959),U=a(71200),O=a(91250),K=a(40713),W=a(69896),j=a(92558),Q=a(3206),G=a(28764),z=a(72416),J=a(68240),X=a(81024),q=a(70152),Y=a(48077),Z=function(e){var t=e.id,a=e.title,n=(0,F._)(e,["id","title"]);return U.createElement(Y.h,(0,T._)({id:void 0===t?"refresh":t,title:void 0===a?"Refresh":a,path:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"},n))},$=a(3850),ee=a(72105),et=function(e){var t=e.id,a=e.title,n=(0,F._)(e,["id","title"]);return U.createElement(Y.h,(0,T._)({id:void 0===t?"check":t,title:void 0===a?"Check":a,path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},n))},ea=a(1699);(n=b||(b={})).ClimateSource="DCS",n.PowerSolutions="DPS",n.Semikron="SDW";var en=a(6348),el=a(88359),er=a(23322),ei=a(75919),eo=a(79463),es=a(27456),ec=a(24628),eu=a(16052),ed=a(21640),em=a(80555),ef=a(6069),ep=a(32307),eg=a(24262),eb=a(18845),eh=a(12749),eC=a(1889),e_=a(14408),ev=a(69129),eS=a(73726),ey=a(89054),eE=a(22898),ek=a(55711),eP=a(70851),eN=a(26380),eA=function(e){return e.label},eM=function(e){var t=e.className,a=e.labelClassName,n=e.id,l=e.isDisabled,r=e.idPrefix,i=e.placeholder,o=e.options,s=e.onChange,c=e.onClick,u=e.testIdPrefix,d=e.getOptionLabel,m=void 0===d?eA:d,f=(0,U.useCallback)(function(e){return null==s?void 0:s(e)},[s]),p=(0,U.useCallback)(function(e){return null==c?void 0:c(e)},[c]);return o.length>0?U.createElement("div",{className:(0,eP.default)(eN.A.mosaic,t)},i&&U.createElement("h5",{className:(0,eP.default)(eN.A.mb2)},i),U.createElement("fieldset",{id:n,className:(0,eP.default)(eN.A.radioGroup),"data-testid":(0,z.A)("filter-radio-buttons-field",u)},o.map(function(e){var t=e.value,i=e.isRefined,o=r?"".concat(r,"-").concat(n,"-").concat(t):"".concat(n,"-").concat(t);return U.createElement("div",{key:t,className:(0,eP.default)(eN.A.radio)},U.createElement("input",{type:"radio",id:o,value:t,checked:i,disabled:l,onChange:function(){f(e)},onClick:function(){p(e)},"data-testid":(0,z.A)("radio-button-input",u)}),U.createElement("label",{htmlFor:o,className:(0,eP.default)(a,eN.A.breakWord)},m(e)))}))):null},eL=a(21512),eR=a(64848),ex=a(75957),eI=a(85538),eT=a(65635),eV=a(18181),eF=a(45785),ew=a(38368),eB=a(11951),eD=a(87311),eH=a(68179),eU=a(17939),eO=a(40584),eK=a(21498),eW=a(3062),ej=a(58215),eQ=a(83125),eG={fields:{title:{defaultValue:""},steps_to_configure_label:{defaultValue:"Steps to configure"},step_value_placeholder:{defaultValue:"Select value"},your_result_label:{defaultValue:"Your result"},model_code_label:{defaultValue:"Model code"},show_matching_results_button_label:{defaultValue:"Show matching results"},copied_message_header:{defaultValue:"Copied"},copied_message_content:{defaultValue:"Model code successfully copied!"},matching_result_section_section_label:{defaultValue:"Matching material(s) found"},select_button_label:{defaultValue:"Select"},limit_information_box_content:{defaultValue:"There are more matching materials found. Keep configuring the model code to view more accurate results."},reset_configuration_button_label:{defaultValue:"Reset configuration"},review_result_button_label:{defaultValue:"Review result"},summary_category_cell_label:{defaultValue:"Category"},summary_selection_cell_label:{defaultValue:"Selection"},summary_label:{defaultValue:"Summary"},product_details_button_label:{defaultValue:"Product details"},first_stepper_label:{defaultValue:"Select Product Type"},second_stepper_label:{defaultValue:"Configure"},third_stepper_label:{defaultValue:"Review"},search_for_attribute_placeholder_label:{defaultValue:"Search for attribute"},no_attributes_found_label:{defaultValue:"No attributes found"}
1,expand_all_toggle_label:{defaultValue:"Expand all"},copy_model_code_label:{defaultValue:"Copy model code"},show_user_selection_toggle_label:{defaultValue:"Show only my selection"},hide_matching_results_label:{defaultValue:"Hide matching results"},back_to_configuration_label:{defaultValue:"Back to configuration"},decode_search_title:{defaultValue:"Reuse model code"},decode_search_placeholder:{defaultValue:"Enter a model code to decode"},decode_button_label:{defaultValue:"Decode"},decode_non_existing_material_error_message:{defaultValue:"This model code does not belong to an existing material, please use the selector below to find a valid product"},decode_non_compatible_material_error_message:{defaultValue:"The model code does not belong to the selector category, please enter a different model code or use the selector below to find a valid product"},revise_selection_button_label:{defaultValue:"Revise selection"}}},ez=a(65972),eJ=a(63393),eX=a(46904),eq=a(99101);(l=h||(h={})).Dev="dev",l.E2e="e2e",l.Prod="prod",l.Uat="uat",(C||(C={})).Idle="idle",(0,K.M)("72px");var eY="view",eZ=[{from:ed.W,to:ed.R}],e$=[{from:ed.R,to:ed.W}],e0=function(e){return e.split(".")[1]},e1=[es.Rr.ReadUserCustomerIds],e2=function(e){var t=e.useSharedApiKey,a=e.algoliaApiBaseUrl,n=e.searchAppName,l=e.businessSegment,r=e.productsIndexName,i=e.urlFilterKeyPrefix,o=e.urlTabKeyName,s=e.heroFilters,c=e.routingPush,u=e.isUserLoggedIn,d=e.auth0BaseUrl,m=e.children,f=e.locale,p=e.sharedApiKeyPurposeType,g=e.consumerAnalyticsTag,b=(0,U.useMemo)(function(){return!!c},[c]),h=(0,U.useMemo)(function(){return s.reduce(function(e,t){var a=t.order,n=t.name;return e[t.key]={order:a,name:n},e},{})},[s]),C=(0,U.useMemo)(function(){var e,t,a,n,l,s,u;return b?(t=(e={productsIndexName:r,urlFilterKeyPrefix:i,urlTabKeyName:o,heroFiltersByKeyMap:h,routingPush:c}).productsIndexName,a=e.urlFilterKeyPrefix,n=e.urlTabKeyName,l=e.heroFiltersByKeyMap,s=e.routingPush,u={createURL:(0,ep.Y)({usePrevQuery:!0,notAlgoliaParamKeys:[null!=n?n:eg.Fg,eY],urlOverrides:[eg.U4.HeroFilters],placeOverridesInFront:!0,replaceUrlDelimiters:e$})},s&&(u=(0,V._)((0,T._)({},u),{push:function(e){s(e)}})),{router:(0,eF.A)(u),stateMapping:{stateToRoute:function(e){return function(e,t,a){var n,l=a.heroFiltersByKeyMap,r=a.urlFilterKeyPrefix;if(!(null===(n=t[e])||void 0===n?void 0:n.menu))return{};var i={};return Object.entries(t[e].menu).forEach(function(e){var t=(0,w._)(e,2),a=t[0],n=t[1];a in l&&(i["".concat(r,".").concat(l[a].order)]=n)}),i}(t,e,{heroFiltersByKeyMap:l,urlFilterKeyPrefix:a})},routeToState:function(e){var n=(0,em._)(e,eZ);return(0,ef.w)([t],n,{dynamicHandler:function(e){var t=e.key,n=e.value;return function(e,t,a,n){var l=n.heroFiltersByKeyMap,r=n.urlFilterKeyPrefix;if(r&&e.startsWith(r)){var i=e0(e),o=Object.keys(l).find(function(e){return l[e].order===Number(i)});o&&a&&(t.menu=(0,V._)((0,T._)({},t.menu),(0,x._)({},o,a)))}else t[e]=a}(t,e.routeToState,n,{heroFiltersByKeyMap:l,urlFilterKeyPrefix:a})}})}}}):void 0},[r,i,o,c,h,b]),_=(0,ec.n)({apiAudience:es.T9.SecuredKeysApi,apiScope:e1,auth0BaseUrl:d}).getAccessToken,v=U.createElement(eb.L,{indexName:r,routing:C,isAuthenticated:u,locale:f,consumerTag:g},m);return t?U.createElement(eh.r,{algoliaApiBaseUrl:a,algoliaAppName:n,businessSegment:l,searchApiKeyPurposeType:p},v):U.createElement(eC.l,null,U.createElement(eh.r,{algoliaApiBaseUrl:a,algoliaAppName:n,businessSegment:l,isUserLoggedIn:u,getAccessToken:_},v))};(r=_||(_={})).Xxs="xxs",r.Xs="xs",r.Sm="sm",r.Md="md",r.Lg="lg",r.Xl="xl",(i=v||(v={})).ExpandAllStateChanged="ps-expand-all-changed",i.ModelCodeCopied="mc-copied",i.ModelCodeSelected="mc-selected",i.ModelCodeValuesChange="mc-values-change",i.NonCompatibleMaterialError="mc-non-compatible-material-error",i.NonExistingMaterialError="mc-non-existing-material-error",i.PopState="popstate",i.ResetConfiguration="mc-reset-configuration",i.ResultsLimit="mc-results-limit",i.UserSelectionToggleChanged="ps-user-selection-toggle-changed",i.UserSelectionToggleDisabled="ps-user-selection-toggle-disabled",i.ValuesDeselection="mc-values-deselection";var e5=(0,U.createContext)(void 0),e4=function(e){var t=e.children,a=e.config;return U.createElement(e5.Provider,{value:a},t)},e8=function(){var e=(0,U.useContext)(e5);if(!e)throw Error("useConfig must be used within a ConfigProvider");return e};(o=S||(S={})).AttributeSearch="attribute_search",o.Collapse="collapse",o.CopyModelCode="copy_model_code",o.DecodeModelCode="decode_model_code",o.Expand="expand",o.Filter="filter",o.RemoveFilter="remove_filter",o.ResetConfiguration="reset_configuration",o.ReviewResult="review_result",o.ReviseSelection="revise_selection",o.ShowMatchingResults="show_matching_results",o.ShowUserSelection="show_user_selection",o.StepperClick="stepper_click",o.TabNavigation="tab_navigation";var e6="product category page",e9="product selector",e7=function(e){(0,I._)(a,e);var t=(0,D._)(a);function a(){return(0,L._)(this,a),t.apply(this,arguments)}return a}(y=W.K);e7.createSelectorGtmObject=function(e){var t=e.itemCategories,a=e.event,n=e.pageType,l=void 0===n?e6:n,r=e.tabName,i=void 0===r?e9:r;return(0,T._)({event:a,page_type:l,tab_name:i},(0,j.k)(t))},e7.trackToggleChange=function(e){var t=e.toggleState,a=e.itemCategories,n=e.pageType,l=e.tabName,r=e7.createSelectorGtmObject({event:t?S.Expand:S.Collapse,itemCategories:a,pageType:n,tabName:l});
1Reflect.get(y,"push",e7).call(e7,r)},e7.trackSearchFilterChange=function(e){var t=e.isDeselection,a=e.filterCategory,n=e.filterOptions,l=e.itemCategories,r=e.pageType,i=e.tabName,o=e7.createSelectorGtmObject({event:t?S.RemoveFilter:S.Filter,filterCategory:a,filterOptions:n,itemCategories:l,pageType:r,tabName:i});a&&(o.filter_category=a),n&&(o.filter_options=n),Reflect.get(y,"push",e7).call(e7,o)},e7.trackAttributeSearchChange=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e7.createSelectorGtmObject({event:S.AttributeSearch,itemCategories:t,pageType:a,tabName:n});Reflect.get(y,"push",e7).call(e7,l)},e7.trackReviewResult=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e.modelCode,r=(0,V._)((0,T._)({},e7.createSelectorGtmObject({event:S.ReviewResult,itemCategories:t,pageType:a,tabName:n})),{model_code:l});Reflect.get(y,"push",e7).call(e7,r)},e7.trackProgressStepChange=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e.step,r=(0,V._)((0,T._)({},e7.createSelectorGtmObject({event:S.StepperClick,itemCategories:t,pageType:a,tabName:n})),{step:l});Reflect.get(y,"push",e7).call(e7,r)},e7.trackShowUserSelectionToggleChange=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e7.createSelectorGtmObject({event:S.ShowUserSelection,itemCategories:t,pageType:a,tabName:n});Reflect.get(y,"push",e7).call(e7,l)},e7.trackDecodeModelCode=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e.modelCode,r=(0,V._)((0,T._)({},e7.createSelectorGtmObject({event:S.DecodeModelCode,itemCategories:t,pageType:a,tabName:n})),{model_code:l});Reflect.get(y,"push",e7).call(e7,r)},e7.trackShowMatchingResults=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e.numberOfResults,r=(0,V._)((0,T._)({},e7.createSelectorGtmObject({event:S.ShowMatchingResults,itemCategories:t,pageType:a,tabName:n})),{number_of_results:l});Reflect.get(y,"push",e7).call(e7,r)},e7.trackResetConfiguration=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e7.createSelectorGtmObject({event:S.ResetConfiguration,itemCategories:t,pageType:a,tabName:n});Reflect.get(y,"push",e7).call(e7,l)},e7.trackReviseSelection=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e7.createSelectorGtmObject({event:S.ReviseSelection,itemCategories:t,pageType:a,tabName:n});Reflect.get(y,"push",e7).call(e7,l)},e7.trackCopyModelCode=function(e){var t=e.itemCategories,a=e.pageType,n=e.tabName,l=e.modelCode,r=(0,V._)((0,T._)({},e7.createSelectorGtmObject({event:S.CopyModelCode,itemCategories:t,pageType:a,tabName:n})),{model_code:l});Reflect.get(y,"push",e7).call(e7,r)},(s=E||(E={})).Configure="configure",s.ProductType="product-type",s.Summary="summary";var e3=(k={},(0,x._)(k,E.ProductType,0),(0,x._)(k,E.Configure,1),(0,x._)(k,E.Summary,2),k),te=function(){function e(){(0,L._)(this,e)}return(0,R._)(e,null,[{key:"dispatchModelCodeSelectedEvent",value:function(e,t){var a=new CustomEvent(v.ModelCodeSelected,{detail:{modelCode:e,partNumber:t}});document.dispatchEvent(a)}},{key:"dispatchModelCodeCopiedEvent",value:function(){var e=new Event(v.ModelCodeCopied);document.dispatchEvent(e)}},{key:"dispatchResultsLimitationEvent",value:function(){var e=new Event(v.ResultsLimit);document.dispatchEvent(e)}},{key:"dispatchResetConfigurationEvent",value:function(){var e=new Event(v.ResetConfiguration);document.dispatchEvent(e)}},{key:"dispatchModelCodeValuesChangeEvent",value:function(e){var t=new CustomEvent(v.ModelCodeValuesChange,{detail:{stepElement:e}});document.dispatchEvent(t)}},{key:"dispatchExpandAllStateChangeEvent",value:function(e){var t=new CustomEvent(v.ExpandAllStateChanged,{detail:{isChecked:e}});document.dispatchEvent(t)}},{key:"dispatchUserSelectionToggleChangeEvent",value:function(e){var t=new CustomEvent(v.UserSelectionToggleChanged,{detail:{isChecked:e}});document.dispatchEvent(t)}},{key:"dispatchUserSelectionToggleDisabledEvent",value:function(){var e=new Event(v.UserSelectionToggleDisabled);document.dispatchEvent(e)}},{key:"dispatchNonExistingMaterialErrorEvent",value:function(){var e=new Event(v.NonExistingMaterialError);document.dispatchEvent(e)}},{key:"dispatchNonCompatibleMaterialErrorEvent",value:function(){var e=new Event(v.NonCompatibleMaterialError);document.dispatchEvent(e)}}]),e}(),tt="mosaic__ToUQTg",ta="textSemibold__vCvIi1",tn="textBold__MwzWnE",tl="btnPrimary__fRp5eE",tr="btnSecondary__EuABwU",ti="textBtn__o6HufT",to="textBtnPrimary__hlmz3e",ts="hidden__Nb7UWE",tc="fullWidth__dgXlzy",tu="flex__o8W0Uv",td="flexWrap__Jj6jtf",tm="flexColumn__YImnAM",tf="alignCenter__SM
1R2n2",tp="flexBetween__Bfnt1T",tg="row__T2lxBl",tb="col8__r0EWeS",th="colMd8__QUO5u0",tC="colorObjectStrongest__aBYMbV",t_="p5__Kby5N5",tv="pr0__o8RcqY",tS="mb3__-XmGqZ",ty="mb4__5ifkM6",tE="mb5__k--pNC",tk="mb8__IZh-gh",tP=function(e){return e.split(e_.uM)},tN=function(e){var t=(0,w._)(tP(e),2),a=t[0],n=t[1];return a&&n?U.createElement(U.Fragment,null,"(",U.createElement("span",{className:tn},a),") ",U.createElement("span",null,n)):e},tA=function(e){var t=(0,w._)(tP(e),2),a=t[0],n=t[1];return a&&n?"(<span class=".concat(tn,">").concat(a,"</span>) ").concat(n):e},tM=/^[^-]+(?:-[\w*]+)*$/,tL=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,C,_=e.heroFilters,S=e.buttonLabel,y=e.inputPlaceholder,E=e.inputLabel,k=e.testIdPrefix,P=(a=(t=(0,w._)((0,U.useState)(""),2))[0],n=t[1],l=(0,U.useContext)(ev.M).algoliaService,i=(r=(0,ew.V)()).refine,o=r.clear,s=(0,eB.J)().indexUiState,c=(0,eD.u)().items,u=e8(),d=(0,U.useCallback)(function(){return n("")},[]),m=(0,U.useMemo)(function(){var e=(0,B._)(_);return e.sort(function(e,t){return(0,Q.C)(e.order,t.order)}),e},[_]),f=(0,U.useCallback)(function(e){return tP(e)[0].toLowerCase()},[]),p=(0,U.useCallback)(function(e,t){return e.find(function(e){return f(e)===t})},[f]),g=(0,U.useCallback)((0,M._)(function(){var e,t,n,r,o,f,g,b,h,C,_,v,S,y,E,k;return(0,H.__generator)(this,function(P){switch(P.label){case 0:if(!a)return[2];if(t=a.toLowerCase(),n=u.productsIndexName,r=u.tabId,o=u.pageType,e7.trackDecodeModelCode({modelCode:a,itemCategories:null!==(f=null===(e=c[0])||void 0===e?void 0:e.categoryArray)&&void 0!==f?f:[],pageType:o,tabName:r}),!tM.test(t))return[2,te.dispatchNonExistingMaterialErrorEvent()];P.label=1;case 1:return P.trys.push([1,4,,5]),g=new eS.N(l,n),b=s.configure,C=(h=(0,w._)(m,2))[0],_=h[1],[4,g.queryIndex({queryType:null==b?void 0:b.queryType,restrictSearchableAttributes:null==b?void 0:b.restrictSearchableAttributes,filters:null==b?void 0:b.filters,facets:[null==C?void 0:C.key,null==_?void 0:_.key]})];case 2:if(!(v=P.sent().facets)||(S=t.split("-")[0],y=t.split("-")[1],E=Object.keys(v[null==C?void 0:C.key]),k=Object.keys(v[null==_?void 0:_.key]),!p(E,S)||!p(k,y)&&y))return[2,te.dispatchNonCompatibleMaterialErrorEvent()];return[4,g.queryIndex({query:a,queryType:null==b?void 0:b.queryType,restrictSearchableAttributes:null==b?void 0:b.restrictSearchableAttributes,filters:null==b?void 0:b.filters})];case 3:if(0===P.sent().nbHits)return[2,te.dispatchNonExistingMaterialErrorEvent()];return te.dispatchResetConfigurationEvent(),i(a),d(),[3,5];case 4:return P.sent(),te.dispatchNonExistingMaterialErrorEvent(),[3,5];case 5:return[2]}})}),[a,u,l,s,m,c,p,i,d]),b=(0,U.useCallback)(function(e){e.preventDefault(),g()},[g]),h=(0,U.useCallback)(function(e){return n(e.target.value)},[]),C=(0,U.useCallback)(function(){return o()},[o]),(0,G.F)(v.ResetConfiguration,C),{searchQuery:a,handleSearchQueryClear:d,handleModelCodeDecode:g,handleSearchQuerySubmit:b,handleSearchQueryChange:h}),N=P.searchQuery,A=P.handleModelCodeDecode,L=P.handleSearchQueryChange,R=P.handleSearchQueryClear,x=P.handleSearchQuerySubmit,I=(0,U.useMemo)(function(){return{onReset:R,onSubmit:x,className:"form__JZxJ9l","data-testid":(0,z.A)("form",k)}},[k,R,x]);return U.createElement(U.Fragment,null,U.createElement(eH.Z,{restrictSearchableAttributes:["modelCode"],typoTolerance:!1,queryType:"prefixNone"}),U.createElement("label",{htmlFor:"decode-model-code-input",className:(0,eP.default)(tS,ta,"inputLabel__P94s6g")},E),U.createElement("div",{className:(0,eP.default)(tu,td,"formContainer__NY6-PU")},U.createElement(ey.n,{id:"decode-model-code-input",onChange:L,placeholder:y,formProps:I,useClearIcon:!0,value:N,testIdPrefix:k}),U.createElement("button",{className:(0,eP.default)(tl),onClick:A,"data-testid":(0,z.A)("submit-button",k)},S)))};(c=P||(P={})).COPY="isCopyAlertVisible",c.LIMITATION="isLimitationAlertVisible",c.NON_COMPATIBLE_MATERIAL="isNonCompatibleMaterialAlertVisible",c.NON_EXISTING_MATERIAL="isNonExistingMaterialAlertVisible",(u=N||(N={})).CLOSE="CLOSE",u.OPEN="OPEN";var tR="alertClose",tx=function(e,t){var a=t.alert;switch(t.type){case N.OPEN:return(0,V._)((0,T._)({},e),(0,x._)({},a,!0));case N.CLOSE:return(0,V._)((0,T._)({},e),(0,x._)({},a,!1));default:return e}},tI=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,C=e.copiedMessageContent,_=e.copiedMessageHeader,S=e.limitInformationBoxContent,y=e.nonCompatibleMaterialErrorContent,E=e.nonExistingMaterialErrorContent,k=e.isSummaryProgressStep,A=e.testIdPrefix,M=(t=(0,U.useRef)(null),a=(0,U.useRef)(null),n=(0,U.useRef)(null),l=(0,U.useRef)(null),r=(0,U.useRef)(!1),i=(0,U.useMemo)(function(){return{isCopyAlertVisible:!1,isLimitationAlertVisible:!1,isNonCompatibleMaterialAlertVisible:!1,isNonExistingMaterialAlertVisible:!1}},[]),c=(s=(o=(0,w._)((0,U.useReducer)(tx,i),2))[0]).isCopyAlertVisible,u=s.isLimitationAlertVisible,d=s.isNonCompatibleMaterialAlertVisible,m=s.isNonExistingMaterialAlertVisible,f=o[1],p=(0,U.useCallback)(function(e){return f({type:N.OPEN,alert:e})},[]),g=(0,U.useCallback)(function(e){return f({type:N.CLOSE,alert:e})},[]),b=(0,U.useCallback)(function(){r.current||(p(P.LIMITATION),r.current=!0)},[p]),h=(0,U.useCallback)(function(){r.current=!1},[]),(0,G.F)(v.ModelCodeCopied,function(){return p(P.COPY)}),(0,G.F)(v.ResultsLimit,b),(0,G.F)(v.NonExistingMaterialError,function(){return p(P.NON_EXISTING_MATERIAL)}),(0,G.F)(v.NonCompatibleMaterialError,function(){return p(P.NON_COMPATIBLE_MATERIAL)}),(0,G.F)(v.ResetConfiguration,h),(0,U.useEffect)(function(){var e=t.current,r=a.current,i=n.current,o=l.current;return null==e||e.addEventListener(tR,function(){return g(P.COPY)}),null==r||r.addEventListener(tR,function(){return g(P.LIMITATION)}),null==i||i.addEventListener(tR,function(){return g(P.NON_EXISTING_MATERIAL)}),null==o||o.addEventListener(tR,function(){return g(P.NON_COMPATIBLE_MATERIAL)}),function(){null==e||e.removeEventListener(tR,function(){return g(P.COPY)}),null==r||r.removeEventListener(tR,function(){return g(P.LIMITATION)}),null==i||i.removeEventListener(tR,function(){return g(P.NON_EXISTING_MATERIAL)}),null==o||o.removeEventListener(tR,function(){return g(P.NON_COMPATIBLE_MATERIAL)})}},[g]),(0,U.useEffect)(function(){k&&(g(P.COPY),g(P.LIMITATION),g(P.NON_EXISTING_MATERIAL),g(P.NON_COMPATIBLE_MATERIAL))},[g,k]),{isCopyAlertVisible:c,isLimitationAlertVisible:u,isNonExistingMaterialAlertVisible:m,isNonCompatibleMaterialAlertVisible:d,copiedAlertRef:t,resultsLimitationAlertRef:a,nonCompatibleMaterialAlertRef:l,nonExistingMaterialAlertRef:n}),L=M.isCopyAlertVisible,R=M.isLimitationAlertVisible,x=M.isNonCompatibleMaterialAlertVisible,I=M.isNonExistingMaterialAlertVisible,T=M.copiedAlertRef,V=M.resultsLimitationAlertRef,F=M.nonCompatibleMaterialAlertRef,B=M.nonExistingMaterialAlertRef;return U.createElement("div",{className:(0,eP.default)("alertsStickySection__1xjwkV"),"data-testid":(0,z.A)("alerts-section",A)},U.createElement("div",{className:(0,eP.default)("alertsSections__L4Dl-d")},U.createElement(O.DfAlert,{type:"success",isVisible:L,heading:_,description:C,ref:T,autoClose:!0,isWithCloseButton:!0,isWithShadow:!0}
1),U.createElement(O.DfAlert,{isVisible:R,description:S,ref:V,autoClose:!0,isWithCloseButton:!0,isWithShadow:!0}),U.createElement(O.DfAlert,{type:"error",isVisible:I,description:E,ref:B,autoClose:!0,isWithCloseButton:!0,isWithShadow:!0}),U.createElement(O.DfAlert,{type:"error",isVisible:x,description:y,ref:F,autoClose:!0,isWithCloseButton:!0,isWithShadow:!0})))},tT=function(e){var t=e.onSelect,a=(0,eD.u)().items,n=(0,eB.J)().setIndexUiState,l=(0,w._)((0,U.useState)(!1),2),r=l[0],i=l[1],o=(0,U.useMemo)(function(){return a.slice(0,14)},[a]),s=(0,U.useCallback)(function(e){var t={};return e&&Object.entries(e).forEach(function(e){var a=(0,w._)(e,2),n=a[0],l=a[1];t["".concat(e_.db).concat(n)]=l[0]}),t},[]),c=(0,U.useCallback)(function(e){return e?Object.values(e).map(function(e){var t,a;return null===(a=e[0])||void 0===a?void 0:null===(t=a.split("|"))||void 0===t?void 0:t[0]}).sort(function(e,t){return e.localeCompare(t)}).join("-"):""},[]),u=(0,U.useCallback)(function(e,a){n(function(e){return(0,V._)((0,T._)({},e),{menu:s(a)})}),t(c(a),e)},[n,c,t,s]),d=(0,U.useCallback)(function(){setTimeout(function(){i(!0)},500)},[]);return(0,G.F)(v.ModelCodeValuesChange,d),(0,J.E)(function(){a.length>14&&te.dispatchResultsLimitationEvent()}),(0,U.useEffect)(function(){r&&(a.length>14&&te.dispatchResultsLimitationEvent(),i(!1))},[a.length,r]),{handleSelect:u,visibleModelCodes:o}},tV=function(e){var t=(0,eK.G)(),a=t.onClick,n=t.getState;return{getComparisonButtonProps:(0,U.useCallback)(function(t){var l,r=t.id,i=t.slug,o=t.modelCode,s=t.headline,c=t.images,u=t.categoryArray,d=t.oldLehPartNumber,m=t.brand,f=t.subBrand,p=t.description,g={tabName:e,id:r,slug:i,modelCode:o,headline:s,mainImgSrc:null==c?void 0:null===(l=c[0])||void 0===l?void 0:l.url,categoryArray:u,oldLehPartNumber:d,brand:m,subBrand:f,description:p};return{buttonState:n(r),onClick:function(){return a(g)},productId:r,a11yPrefix:"ps"}},[n,a,e])}},tF=function(e){var t=e.label,a=e.onClick,n=e.modelCode,l=e.testIdPrefix;return U.createElement("button",{className:(0,eP.default)(tr,"button__saAL9s"),onClick:a,"data-testid":(0,z.A)("select-btn",l),"aria-label":"Select ".concat(n)},U.createElement("span",{className:(0,eP.default)("buttonText__sis72r")},t))},tw=function(e){var t=e.modelCode,a=e.partNumber,n=e.comparisonButtonProps,l=e.selectButtonLabel,r=e.isMobile,i=e.onSelectButtonClick,o=e.testIdPrefix;return U.createElement("div",{className:(0,eP.default)((0,x._)({},"mobileModelCode__igqov9",void 0!==r&&r))},U.createElement("h5",{"data-testid":(0,z.A)("part-number",o)},a),U.createElement("div",{className:(0,eP.default)(tu,tf,tp)},U.createElement("div",{"data-testid":(0,z.A)("model-code",o)},t),U.createElement("div",{className:(0,eP.default)(tu,tf,"ml3__vcAw9-","buttonsSection__N9Y7yE")},U.createElement(eW.P,(0,V._)((0,T._)({},n),{testIdPrefix:o})),U.createElement(tF,{label:l,onClick:i,modelCode:t,testIdPrefix:o}))))},tB=function(e){var t=e.className,a=e.title,n=e.selectButtonLabel,l=e.onSelect,r=e.testIdPrefix,i=e8(),o=i.tabId,s=void 0===o?e9:o,c=i.pageType,u=void 0===c?e6:c,d=tT({onSelect:l}),m=d.visibleModelCodes,f=d.handleSelect,p=(0,U.useMemo)(function(){return a.toUpperCase()},[a]),g=tV(s).getComparisonButtonProps,b=(0,U.useCallback)(function(e){var t=e.id,a=e.categoryArray,n=e.modelCode,l=e.heroFilters;return function(){e7.trackReviewResult({itemCategories:a,tabName:s,modelCode:n,pageType:u}),f(t,l)}},[f,s,u]);return U.createElement("div",{className:(0,eP.default)(tu,tm,"mt6__cuWE1I",t_,"matchingResultsSection__GDhRSt",t),"data-testid":(0,z.A)("matching-results-section",r)},U.createElement("h5",{className:(0,eP.default)(ty),"data-testid":(0,z.A)("title",r)},p),U.createElement("div",{className:(0,eP.default)("modelCodesWrapper__zuIk8O")},U.createElement("div",{className:(0,eP.default)(tu,tm,"mr3__0MSUzB","modelCodes__u5qrlm"),"data-testid":(0,z.A)("model-codes",r)},m.map(function(e){var t=e.modelCode,a=e.id,l=g(e);return U.createElement(tw,{key:t||a,modelCode:t,partNumber:a,selectButtonLabel:n,onSelectButtonClick:b(e),comparisonButtonProps:l,testIdPrefix:r})}))))},tD=function(e,t,a){return(0,X.V)("/products/p/".concat(e),t,a)},tH=function(e,t){return t?e.find(function(e){return e.id===t}):null==e?void 0:e[0]},tU=function(e){var t,a,n,l,r,i,o=e.isSummaryProgressStep,s=e.onSummaryStepViewClick,c=(0,w._)((0,U.useState)([]),2),u=c[0],d=c[1],m=(0,eB.J)(),f=m.results,p=m.status,g=(0,eU.d)().items,b=(0,eD.u)(),h=b.items,_=b.results,S=(void 0===_?{}:_).nbHits,y=void 0===S?0:S,E=e8(),k=E.tabId,P=E.pageType,N=(a=(t=(0,w._)((0,U.useState)(null),2))[0],n=t[1],l=(0,U.useRef)(!1),r=(0,U.useRef)(null),i=(0,U.useCallback)(function(e){var t=e.detail;r.current=t.partNumber,n(t.modelCode)},[]),(0,U.useEffect)(function(){if(a){var e=(0,B._)(u).filter(function(e){return!!e}).sort(function(e,t){return e?t?e.localeCompare(t):-1:1}).join("-");e===a&&(l.current=!0),e!==a&&l.current&&(n(null),l.current=!1)}},[u,a]),(0,G.F)(v.ModelCodeSelected,i),{selectedModelCode:a,selectedPartNumber:r.current}),A=N.selectedModelCode,M=N.selectedPartNumber,L=(0,U.useMemo)(function(){return g.reduce(function(e,t){return e[t.attribute]=t.refinements,e},{})},[g]),R=(0,U.useCallback)(function(){e7.trackResetConfiguration({tabName:k,pageType:P,itemCategories:h[0].categoryArray}
1),te.dispatchResetConfigurationEvent()},[P,h,k]),x=(0,U.useCallback)(function(){var e=u.map(function(e){return null!=e?e:"*"}).join("-");navigator.clipboard.writeText(e),e7.trackCopyModelCode({tabName:k,pageType:P,itemCategories:h[0].categoryArray,modelCode:e}),te.dispatchModelCodeCopiedEvent()},[u,h,P,k]),I=(0,U.useMemo)(function(){return 1===y},[y]),T=(0,U.useMemo)(function(){return(!!A||I)&&!o},[A,I,o]),V=(0,U.useMemo)(function(){return!A&&!I&&!o},[A,I,o]),F=(0,U.useMemo)(function(){return o},[o]),D=(0,U.useCallback)(function(){s(),e7.trackReviewResult({tabName:k,pageType:P,itemCategories:h[0].categoryArray,modelCode:h[0].modelCode})},[s,h,P,k]);return(0,U.useEffect)(function(){if(p===C.Idle){var e=[];f.hierarchicalFacets.forEach(function(t){var a=t.name;if(L[a]){var n=L[a][0].value,l=null==n?void 0:n.split("|")[0];e.push(l)}else e.push(null)}),d(e)}},[f,p,L]),{modelCodeParts:u,isReviewResultsBtnVisible:T,isMatchingResultsBtnVisible:V,isProductDetailsBtnVisible:F,handleResetConfiguration:R,onContentCopyClick:x,handleReviewResultsClick:D,selectedPartNumber:M}},tO=function(e){var t=e.modelCodeParts,a=e.modelCodeLabel,n=e.copyModelCodeLabel,l=e.onContentCopyClick,r=e.testIdPrefix,i=e.contentCopyIconSize;return U.createElement(U.Fragment,null,a&&U.createElement("div",{className:(0,eP.default)("mb1__1aJYay","modelCodeLabel__Z3GnKf"),"data-testid":(0,z.A)("model-code-label",r)},a),U.createElement("div",{className:(0,eP.default)(tu,tS,"modelCodeContainer__UMQ2-s")},U.createElement("div",null,t.map(function(e,a){return U.createElement(U.Fragment,{key:"".concat(e,"-").concat(a)},e?U.createElement("span",{className:(0,eP.default)(tC,ta,"modelCode__06Wtwx"),"data-testid":(0,z.A)("model-code",r)},e):U.createElement("div",{className:"modelCodeUnderline__5JA2Sh","data-testid":(0,z.A)("model-code-underline",r)}),t.length-1>a&&U.createElement("span",{className:tC},"-"))})),l&&U.createElement("button",{className:(0,eP.default)("btnTransparent__c7NEMm","copyButton__9b-OEB"),onClick:l,"data-testid":(0,z.A)("model-code-copy",r)},U.createElement(q.c,{size:void 0===i?.6:i,title:n}))))},tK="button__8aW0sy",tW="resetBtn__47KH9l",tj=function(e){var t=e.dictionary,a=t.yourResultLabel,n=t.modelCodeLabel,l=t.showMatchingResultsButtonLabel,r=t.resetConfigurationButtonLabel,i=t.reviewResultButtonLabel,o=t.productDetailsButtonLabel,s=t.copyModelCodeLabel,c=t.reviseSelectionButtonLabel,u=e.isSummaryProgressStep,d=e.defaultAppLocale,m=e.locale,f=e.getProductLink,p=e.onShowResults,g=e.onReviseSelectionClick,b=e.onSummaryStepViewClick,h=e.onProductDetailsClick,C=e.testIdPrefix,_=tU({isSummaryProgressStep:u,onSummaryStepViewClick:b}),v=_.modelCodeParts,S=_.selectedPartNumber,y=_.isMatchingResultsBtnVisible,E=_.isReviewResultsBtnVisible,k=_.isProductDetailsBtnVisible,P=_.handleResetConfiguration,N=_.onContentCopyClick,A=_.handleReviewResultsClick,M=(0,eB.J)().results,L=(0,U.useMemo)(function(){var e=tH(M.hits,S);if(e){var t=e.id,a=e.categoryArray,n=e.isDiscontinued,l=e.slug;return f?f({id:t,slug:l,categoryArray:a,isDiscontinued:n}):tD(l,m,d)}},[M.hits,S,f,m,d]),R=(0,U.useCallback)(function(e){e.preventDefault(),h(e,L)},[h,L]);return U.createElement("div",{className:(0,eP.default)(t_,"container__Fz0BXs")},U.createElement("h5",{className:(0,eP.default)(tC,ty),"data-testid":(0,z.A)("title",C)},a.toUpperCase()),U.createElement(tO,{modelCodeLabel:n,modelCodeParts:v,copyModelCodeLabel:s,onContentCopyClick:N,testIdPrefix:C}),U.createElement("div",{className:ty},k&&L&&U.createElement("a",{href:L,className:(0,eP.default)(tl,"productDetailsButton__rBHyuO"),onClick:R,"data-testid":(0,z.A)("product-details",C)},o),E&&U.createElement("button",{className:tl,onClick:A,"data-testid":(0,z.A)("review-results",C)},i),y&&U.createElement("button",{className:tl,onClick:p,"data-testid":(0,z.A)("show-matching-results",C)},l," (",M.nbHits,")")),U.createElement("div",null,u?U.createElement("button",{className:(0,eP.default)(ti,to,tW),onClick:g,"data-testid":(0,z.A)("revise-selection",C)},c):U.createElement("button",{className:(0,eP.default)(ti,to,tW),onClick:P,"data-testid":(0,z.A)("reset-configuration",C)},U.createElement(Z,null),U.createElement("span",null,r))))},tQ=function(e){var t,a,n,l,r,i,o,s,c,u=e.dictionary,d=u.matchingResultSectionSectionLabel,m=u.selectButtonLabel,f
1=e.dictionary,p=e.stickyHeaderContentHeight,g=e.isSummaryProgressStep,b=e.defaultAppLocale,h=e.locale,C=e.isMatchingResultsSectionVisible,_=e.onSummaryStepViewClick,v=e.onProductDetailsClick,S=e.getProductLink,y=e.onModelCodeSelect,E=e.onShowResults,k=e.onReviseSelectionClick,P=e.testIdPrefix,N=(a=(t=(0,w._)((0,U.useState)(),2))[0],n=t[1],r=(l=(0,w._)((0,U.useState)(!1),2))[0],i=l[1],o=(0,U.useMemo)(function(){return{rootMargin:"-".concat(p+4+1,"px 0px 0px 0px"),threshold:1}},[p]),s=(0,U.useCallback)(function(e){e&&n(e)},[]),c=(0,U.useCallback)(function(e){var t=(0,w._)(e,1)[0];t&&i(!t.isIntersecting)},[]),(0,U.useEffect)(function(){var e=new IntersectionObserver(c,o);if(a)return e.observe(a),function(){e.unobserve(a)}},[o,a,c]),{isSticky:r,getResultsSectionRef:s}),A=N.getResultsSectionRef,M=N.isSticky,L=(0,U.useMemo)(function(){return{maxHeight:"calc(100vh - ".concat(p,"px - 8px)"),top:M?p+4:0}},[M,p]);return U.createElement("section",{className:(0,eP.default)(tu,tm,"resultsSection__1tGjKt"),style:L,ref:A},U.createElement(tj,{defaultAppLocale:b,locale:h,dictionary:f,isSummaryProgressStep:g,onShowResults:E,onReviseSelectionClick:k,onSummaryStepViewClick:_,onProductDetailsClick:v,getProductLink:S,testIdPrefix:P}),C&&!g&&U.createElement(tB,{title:d,selectButtonLabel:m,onSelect:y,testIdPrefix:P}))},tG=function(e){var t=e.title,a=e.selectButtonLabel,n=e.backButtonLabel,l=e.onSelect,r=e.onResultsSectionClose,i=e.className,o=e.testIdPrefix,s=e8(),c=s.tabId,u=void 0===c?e9:c,d=s.pageType,m=void 0===d?e6:d,f=tT({onSelect:l}),p=f.visibleModelCodes,g=f.handleSelect,b=tV(u).getComparisonButtonProps,h=(0,U.useMemo)(function(){return t.toUpperCase()},[t]),C=(0,U.useCallback)(function(e){var t=e.id,a=e.categoryArray,n=e.modelCode,l=e.heroFilters;return function(){e7.trackReviewResult({itemCategories:a,tabName:u,modelCode:n,pageType:m}),g(t,l)}},[g,u,m]);return U.createElement("div",{className:(0,eP.default)("mt12__WsHoph",i),"data-testid":(0,z.A)("matching-results-section",o)},U.createElement("h5",{className:(0,eP.default)(tk),"data-testid":(0,z.A)("title",o)},h),U.createElement("div",{"data-testid":(0,z.A)("model-codes",o)},p.map(function(e){var t=e.modelCode,n=e.id,l=b(e);return U.createElement(tw,{key:t,modelCode:t,partNumber:n,selectButtonLabel:a,onSelectButtonClick:C(e),comparisonButtonProps:l,testIdPrefix:o,isMobile:!0})})),p.length>5&&U.createElement("button",{className:(0,eP.default)(tl,"mt8__bqBJNV",tc),onClick:r,"data-testid":(0,z.A)("back-to-configurator",o)},n))},tz=function(e){var t=e.dictionary,a=t.yourResultLabel,n=t.showMatchingResultsButtonLabel,l=t.resetConfigurationButtonLabel,r=t.reviewResultButtonLabel,i=t.productDetailsButtonLabel,o=t.copyModelCodeLabel,s=t.hideMatchingResultsLabel,c=t.reviseSelectionButtonLabel,u=e.isSummaryProgressStep,d=e.defaultAppLocale,m=e.locale,f=e.isMatchingResultsSectionVisible,p=e.onSummaryStepViewClick,g=e.onShowResults,b=e.onReviseSelectionClick,h=e.onProductDetailsClick,C=e.onResultsSectionClose,_=e.getProductLink,v=e.testIdPrefix,S=(0,w._)((0,U.useState)(0),2),y=S[0],E=S[1],k=tU({isSummaryProgressStep:u,onSummaryStepViewClick:p}),P=k.modelCodeParts,N=k.selectedPartNumber,A=k.isMatchingResultsBtnVisible,M=k.isReviewResultsBtnVisible,L=k.isProductDetailsBtnVisible,R=k.handleResetConfiguration,x=k.onContentCopyClick,I=k.handleReviewResultsClick,T=(0,eB.J)().results,V=(0,U.useRef)(null),F=(0,U.useMemo)(function(){var e=tH(T.hits,N);if(e){var t=e.id,a=e.categoryArray,n=e.slug,l=e.isDiscontinued;return _?_({id:t,slug:n,categoryArray:a,isDiscontinued:l}):tD(n,m,d)}},[T.hits,N,_,m,d]),B=(0,U.useCallback)(function(e){h(e,F)},[h,F]),D=(0,U.useCallback)(function(e){var t=e.boundingClientRect.left;t>0&&0===y?E(t):t>0&&y>0?E(t+y):t<0&&E(0)},[y]),H=(0,U.useCallback)(function(){var e=V.current;if(e){var t=new IntersectionObserver(function(e){D((0,w._)(e,1)[0])});return t.observe(e),function(){t.unobserve(e)}}},[D]),O=(0,U.useMemo)(function(){return{marginLeft:"-".concat(y,"px"),width:"calc(100% + ".concat(2*y,"px)"),paddingLeft:y,paddingRight:y}},[y]);return(0,U.useEffect)(function(){return H(),window.addEventListener("resize",H),function(){window.removeEventListener("resize",H)}},[H]),U.createElement("div",null,U.createElement("h5",{className:(0,eP.default)(tC,ta,"mb2__izocCc","title__CxU8QN"),"data-testid":(0,z.A)("title",v)},a),U.createElement("div",{className:(0,eP.default)("bgColorNeutralWeak__XEfAQZ","pt5__ogP2KA","pb5__zXc1wx",tk),style:O,ref:V,"data-testid":(0,z.A)("model-code-container",v)},U.createElement("div",{className:ty},U.createElement(tO,{modelCodeParts:P,contentCopyIconSize:1,onContentCopyClick:x,copyModelCodeLabel:o,testIdPrefix:v})),U.createElement("div",{className:(0,eP.default)(tu,"buttonContainer__gb4WeU")}
1,!L&&U.createElement("button",{className:(0,eP.default)(tr,tK),onClick:R,"data-testid":(0,z.A)("reset-configuration",v)},l),A&&!f&&U.createElement("button",{className:(0,eP.default)(tl,tK),onClick:g,"data-testid":(0,z.A)("show-matching-results",v)},n," (",T.nbHits,")"),A&&f&&U.createElement("button",{className:(0,eP.default)(tl,tK),onClick:C,"data-testid":(0,z.A)("hide-matching-results",v)},s),M&&U.createElement("button",{className:(0,eP.default)(tl,tK),onClick:I,"data-testid":(0,z.A)("review-results",v)},r),L&&F&&U.createElement("a",{href:F,onClick:B,className:(0,eP.default)(tl,"link__9kFyjZ"),"data-testid":(0,z.A)("product-details",v)},i),u&&U.createElement("button",{className:(0,eP.default)(tr,tK),onClick:b,"data-testid":(0,z.A)("revise-selection",v)},c))))},tJ=function(e){var t=e.dictionary,a=t.matchingResultSectionSectionLabel,n=t.selectButtonLabel,l=t.backToConfigurationLabel,r=e.dictionary,i=e.defaultAppLocale,o=e.locale,s=e.isSummaryProgressStep,c=e.isMatchingResultsSectionVisible,u=e.onSummaryStepViewClick,d=e.onProductDetailsClick,m=e.getProductLink,f=e.onModelCodeSelect,p=e.onShowResults,g=e.onReviseSelectionClick,b=e.onResultsSectionClose,h=e.testIdPrefix;return U.createElement("section",null,U.createElement(tz,{dictionary:r,locale:o,defaultAppLocale:i,isSummaryProgressStep:s,isMatchingResultsSectionVisible:c,onSummaryStepViewClick:u,getProductLink:m,onShowResults:p,onReviseSelectionClick:g,onProductDetailsClick:d,onResultsSectionClose:b,testIdPrefix:h}),c&&!s&&U.createElement(tG,{title:a,selectButtonLabel:n,backButtonLabel:l,onSelect:f,onResultsSectionClose:b,testIdPrefix:h}))},tX="ps-is-expanded",tq=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f=e.expandAllToggleLabel,p=(0,F._)(e,["expandAllToggleLabel"]),g=(t=(0,U.useRef)(null),a=(0,eD.u)().items,l=(n=e8()).tabId,r=n.pageType,o=(i=(0,w._)((0,U.useState)(!1),2))[0],s=i[1],c=(0,U.useCallback)(function(e){var a;null===(a=t.current)||void 0===a||a.setItem(tX,e)},[]),u=(0,U.useCallback)(function(){var e=t.current;return e?e.getItem(tX):null},[]),d=(0,U.useCallback)(function(e){e7.trackToggleChange({toggleState:e,itemCategories:a[0].categoryArray,pageType:r,tabName:l})},[a,r,l]),m=(0,U.useCallback)(function(){s(function(e){var t=!e;return c(t),d(t),setTimeout(function(){te.dispatchExpandAllStateChangeEvent(t)},0),t})},[c,d]),(0,J.E)(function(){t.current=new $.n(localStorage);var e=u();e&&(s(e),te.dispatchExpandAllStateChangeEvent(e))}),{isExpanded:o,onIsExpandedToggleChange:m}),b=g.isExpanded,h=g.onIsExpandedToggleChange;return U.createElement(ee.T,(0,T._)({id:"ps-expand-all-button",checked:b,onChange:h,labelClassName:tn},p),f)},tY=function(e){var t=e.label,a=(0,F._)(e,["label"]),n=(0,eD.u)().items,l=e8(),r=l.tabId,i=l.pageType,o=(0,w._)((0,U.useState)(!1),2),s=o[0],c=o[1],u=(0,w._)((0,U.useState)(!1),2),d=u[0],m=u[1],f=(0,U.useCallback)(function(){c(function(e){var t=!e;return setTimeout(function(){te.dispatchUserSelectionToggleChangeEvent(t)},0),!e}),e7.trackShowUserSelectionToggleChange({itemCategories:n[0].categoryArray,tabName:r,pageType:i})},[n,i,r]),p=(0,U.useCallback)(function(){m(!0)},[]);return(0,G.F)(v.UserSelectionToggleDisabled,p),U.createElement(ee.T,(0,T._)({id:"ps-show-user-selection-button",labelClassName:tn,checked:s,onChange:f,disabled:d},a),t)},tZ="headerSection__8-z8q4",t$=function(e){var t=e.summaryLabel,a=e.isSummaryProgressStep,n=e.isMobileScreen,l=e.stepsToConfigureLabel,r=e.searchForAttributePlaceholderLabel,i=e.searchQuery,o=e.updateSearchQuery,s=e.expandAllToggleLabel,c=e.showUserSelectionToggleLabel,u=e.testIdPrefix,d=(0,U.useCallback)(function(e){return"product-selector-".concat(e)},[]),m=(0,U.useCallback)(function(e){o(e.target.value)},[o]),f=(0,U.useCallback)(function(){o()},[o]),p=(0,U.useCallback)(function(e){return e.preventDefault()},[]),g=(0,U.useMemo)(function(){return{onReset:f,onSubmit:p}},[f,p]),b=(0,U.useMemo)(function(){return{iconId:d("search")}},[d]),h=(0,U.useMemo)(function(){return{iconId:d("clean")}},[d]);return a?U.createElement("div",{className:(0,eP.default)(tu,tp,td,tZ)},U.createElement("h4",{className:tn,"data-testid":(0,z.A)("summary-title",u)},t),U.createElement(tY,{label:c,testIdPrefix:u})):U.createElement(U.Fragment,null,n&&U.createElement("fieldset",{className:(0,eP.default)("formField__xzpITf",tk,tc)},U.createElement(ey.n,{onChange:m,value:i,formProps:g,testIdPrefix:u,searchButtonProps:b,clearSearchButtonProps:h,placeholder:r,useSearchIcon:!0,useClearIcon:!0,isSearchHiddenWhenClearVisible:!0})),U.createElement("div",{className:(0,eP.default)(tZ,tu,tp,td)},U.createElement("h5",{className:ta,"data-testid":(0,z.A)("title",u)},l),U.createElement("div",{className:(0,eP.default)(tu,td,"headerControls__QtKTsu")},!n&&U.createElement(ey.n,{onChange:m,value:i,formProps:g,testIdPrefix:u,searchButtonProps:b,clearSearchButtonProps:h,placeholder:r,useSearchIcon:!0,useClearIcon:!0,isSearchHiddenWhenClearVisible:!0}),U.createElement(tq,{expandAllToggleLabel:s,testIdPrefix:u}))))},t0=function(){function e(){(0,L._)(this,e)}return(0,R._)(e,null,[{key:"dispatchDeselectionEvent",value:function(e){var t=new CustomEvent(v.ValuesDeselection,{detail:e});document.dispatchEvent(t)}},{key:"dispatchStartDeselectionEvent",value:function(){this.dispatchDeselectionEvent({isDeselection:!0}
1)}},{key:"dispatchFinishDeselectionEvent",value:function(){this.dispatchDeselectionEvent({isDeselection:!1})}}]),e}(),t1={circle:"circle__x8lQkV",preSelectedCompletedCircle:"preSelectedCompletedCircle__yX-S-o",completedCircle:"completedCircle__KvJ3Kq",preSelectedHeader:"preSelectedHeader__drMKRz",header:"header__7I0G44",step:"step__BgUUao",preSelectedValue:"preSelectedValue__K5LUWo",selectedValue:"selectedValue__yiFJiX"},t2=function(e){var t,a,n=e.selectedValue,l=e.title,r=e.step,i=e.isPreSelectedStepCompleted,o=e.testIdPrefix,s=(0,U.useMemo)(function(){return!!n},[n]),c=(0,U.useMemo)(function(){return s&&!i},[i,s]);return U.createElement("div",{slot:"header",className:(0,eP.default)("px3__FBKH9O",tu,tf,td)},U.createElement("span",{className:t1.step,"data-testid":(0,z.A)("step",o)},r),U.createElement("div",{className:(0,eP.default)(tu,"flexCenter__tXyYwX",tf,t1.circle,(t={},(0,x._)(t,t1.preSelectedCompletedCircle,s),(0,x._)(t,t1.completedCircle,c),t))},s&&U.createElement(et,{id:"check-icon-".concat(r),"data-testid":(0,z.A)("step-checked-icon",o),color:"white",size:.7})),U.createElement("span",{className:(0,eP.default)((a={},(0,x._)(a,t1.preSelectedHeader,s),(0,x._)(a,t1.colorObjectStrongest,c),a)),"data-testid":(0,z.A)("title",o)},l),s&&U.createElement("span",{className:(0,eP.default)(t1.preSelectedValue,(0,x._)({},t1.selectedValue,c)),"data-testid":(0,z.A)("selected-value",o)},n?tN(n):null))},t5=function(e){var t=e.id,a=e.className,n=e.options,l=e.onHeroFilterValueChange,r=e.placeholder,i=e.testIdPrefix,o=(0,U.useCallback)(function(e){return!!e.isRefined},[]),s=(0,U.useCallback)(function(e){l(e.detail.value)},[l]),c=(0,U.useCallback)(function(e){return tA(e.label)},[]);return U.createElement(eE.O,{id:t,placeholder:r,options:n,filterType:ek.k.Single,isOptionSelected:o,onChange:s,getOptionLabel:c,className:(0,eP.default)(tv,tv,"dropdownFilter__8EWQBV",a),testIdPrefix:i})},t4=function(e){var t=e.id,a=e.className,n=e.isDisabled,l=e.options,r=e.onHeroFilterValueChange,i=e.testIdPrefix,o=(0,U.useCallback)(function(e){r(e)},[r]),s=(0,U.useCallback)(function(e){return tN(e.label)},[]);return U.createElement(eM,{id:t,className:a,idPrefix:"ps",options:l,isDisabled:n,onClick:o,getOptionLabel:s,testIdPrefix:i})},t8=function(e){var t=e.options,a=e.id,n=e.isDisabled,l=e.onHeroFilterValueChange,r=e.stepValuePlaceholder,i=e.testIdPrefix,o=(0,U.useMemo)(function(){return t.length<=5},[t]);return U.createElement("div",{className:(0,eP.default)("stepContent__FHZpeN"),"data-testid":(0,z.A)("step-content",i)},o?U.createElement(t4,{id:a,className:tE,isDisabled:n,options:t,onHeroFilterValueChange:l,testIdPrefix:i}):U.createElement(t5,{id:a,className:"mb6__JXZQzU",options:t,onHeroFilterValueChange:l,placeholder:r,testIdPrefix:i}))},t6=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,_,S,y,E,k,P,N,A,M,L,R=e.id,I=e.isExpanded,F=e.isPreSelectedStep,B=e.onHeroFilterValuePreSelect,D=e.onExpandableStateChange,H=e.onHeroFilterValueDeselect,O=e.stepValuePlaceholder,K=e.stepRef,W=e.title,j=e.testIdPrefix,Q=(a=(t={id:R,title:W,onHeroFilterValueDeselect:H,onHeroFilterValuePreSelect:B,stepRef:K,onExpandableStateChange:D}).id,n=t.title,l=t.onExpandableStateChange,r=t.onHeroFilterValueDeselect,i=t.onHeroFilterValuePreSelect,o=t.stepRef,c=(s=e8()).tabId,u=s.pageType,m=(d=(0,w._)((0,U.useState)(!1),2))[0],f=d[1],p=(0,U.useRef)(!1),g=(0,U.useRef)(null),b=(0,U.useRef)(!1),_=(h=(0,eO.b)({attribute:a,limit:eL.DC,sortBy:["".concat(eR.K.Name,":").concat(eR.h.Ascending)]})).items,S=h.refine,y=(0,eD.u)().items,E=(0,eB.J)().status,k=(0,U.useCallback)(function(e){S(e),l(!0)},[S,l]),P=(0,U.useCallback)(function(e,t){e7.trackSearchFilterChange({isDeselection:!1,filterCategory:e,filterOptions:t,itemCategories:y[0].categoryArray,pageType:u,tabName:c})},[y,u,c]),N=(0,U.useCallback)(function(e,t){e7.trackSearchFilterChange({isDeselection:!0,filterCategory:e,filterOptions:t,itemCategories:y[0].categoryArray,pageType:u,tabName:c})},[y,u,c]),A=(0,U.useCallback)(function(e){e&&!e.isRefined?(g.current?(b.current=!0,P(n,e.value),r(a)):(P(n,e.value),k(e.value)),g.current=e.value):(N(n,null==e?void 0:e.value),r(a),g.current=null),te.dispatchModelCodeValuesChangeEvent(o.current)},[a,o,n,k,r,N,P]),M=(0,U.useCallback)(function(e){var t=e.detail;t.isDeselection||(p.current=!1,b.current&&g.current&&(k(g.current),b.current=!1)),f(t.isDeselection)},[k]),(0,G.F)(v.ValuesDeselection,M),L=(0,U.useCallback)(function(){g.current=null},[]),(0,G.F)(v.ResetConfiguration,L),(0,U.useEffect)(function(){if(E===C.Idle){if(1===_.length){var e=_[0],t=e.value;e.isRefined||S(t),g.current||(p.current=!0,i(function(e){return(0,V._)((0,T._)({},e),(0,x._)({},a,!0))}))}else if(_.length>1){var n=_.some(function(e){return e.isRefined});b.current||n||(g.current=null),i(function(e){return e[a]&&delete e[a],e})}}},[_,E,S,m,a,i]),{options:_,onHeroFilterValueChange:A,isPreselectedStepRef:p}),z=Q.options,J=Q.onHeroFilterValueChange,X=Q.isPreselectedStepRef;return I?U.createElement(t8,{id:R,options:z,stepValuePlaceholder:O,onHeroFilterValueChange:J,isDisabled:X.current||F,testIdPrefix:j}):null},t9=function(e){var t=e.id,a=e.title,n=e.step,l=e.isExpanded,r=e.isPreSelectedStep,i=e.isVisible,o=e.onExpandableStateChange,s=e.onHeroFilterValuePreSelect,c=e.onHeroFilterValueDeselect,u=e.stepValuePlaceholder,d=e.testIdPrefix,m=(0,U.useRef)(null),f=(0,eU.d)({includedAttributes:[t]}).items,p=(0,U.useMemo)(function(){var e,t,a,n;return null!==(n=null==f?void 0:null===(a=f[0])||void 0===a?void 0:null===(t=a.refinements)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.value)&&void 0!==n?n:null},[f]),g=(0,U.useCallback)(function(){return o(!1)},[o]);return U.createElement("div",{className:(0,eP.default)((0,x._)({},ts,!i)),ref:m},U.createElement(O.DfAccordion,{variant:"with-divider",isExpanded:l,className:(0,eP.default)((0,x._)({},"accordionCompleted__kkm3b0",r)),headerClassName:"stepHeader__SU3ZpZ",id:"accordion-".concat(n),onHeaderClick:g,"data-testid":(0,z.A)("accordion",d)},U.createElement(t2,{title:a,step:n,selectedValue:p,isPreSelectedStepCompleted:r,testIdPrefix:d}),U.createElement("div",{slot:"content",className:"mt2__zx1aOh"},U.createElement(t6,{id:t,title:a,isExpanded:l,onExpandableStateChange:o,onHeroFilterValuePreSelect:s,onHeroFilterValueDeselect:c,stepValuePlaceholder:u,isPreSelectedStep:r,stepRef:m,testIdPrefix:d}))))},t7=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,_,S,y,E,k,P,N,A,M,L,R,x,I=e.heroFilters,F=e.checkStepPreSelection,D=e.onHeroFilterValueDeselect,H=e.onHeroFilterValuePreSelect,O=e.stepValuePlaceholder,K=e.isRoutingEnabled,W=e.urlFilterKeyPrefix,j=e.visibleStepsIdsMap,Q=e.noAttributesFoundLabel,J=e.isSummaryProgressStep,X=e.testIdPrefix,q=(a=(t=(0,w._)((0,U.useState)({}),2))[0],n=t[1],r=(l=(0,w._)((0,U.useState)(null),2))[0],i=l[1],o=(0,U.useRef)(!1),s=(0,U.useRef)(!1),u=(c=(0,eB.J)()).results,d=c.status,m=(0,eU.d)().items,f=(0,U.useMemo)(function(){return d===C.Idle},[d]),p=(0,U.useMemo)(function(){return u.hierarchicalFacets.length>0},[u.hierarchicalFacets.length]),g=(0,U.useCallback)(function(){o.current=!1,n({}),i(null)},[]),b=(0,U.useCallback)(function(){var e=u.hierarchicalFacets.reduce(function(e,t){return e[t.name]=!0,e},{});o.current=!0,n(e),i(null)},[u.hierarchicalFacets]),h=(0,U.useCallback)(function(e){e.detail.isChecked?p?b():s.current=!0:g()},[p,g,b]),_=(0,U.useCallback)(function(e,t,a){o.current||(a?i({key:e,index:t}):n(function(t){var a=(0,T._)({},t);return t[e]?delete a[e]:a[e]=!0,a}
1))},[]),S=(0,U.useCallback)(function(e){for(var t={},a=u.hierarchicalFacets,n=new Set(m.map(function(e){return e.attribute})),l=e;a.length>l;){var r=a[l],i=n.has(r.name);if(r.data&&r.data.length>1&&!i){t[r.name]=!0;break}l++}if(l+1>a.length&&a.length>m.length)for(l=0;e-1>l;){var o=a[l],s=n.has(o.name);if(o.data&&o.data.length>1&&!s){t[o.name]=!0;break}l++}return t},[u,m]),(0,G.F)(v.ExpandAllStateChanged,h),(0,U.useEffect)(function(){f&&r&&(n(S(r.index)),i(null))},[f,r,S]),(0,U.useEffect)(function(){p&&s.current&&(b(),s.current=!1)},[b,p]),{expandedStepsIdsMap:a,handleExpandableStepStateChange:_}),Y=q.expandedStepsIdsMap,Z=q.handleExpandableStepStateChange;E=(y={heroFilters:I,urlFilterKeyPrefix:W,isRoutingEnabled:K,isSummaryProgressStep:J}).heroFilters,k=y.isRoutingEnabled,P=y.isSummaryProgressStep,A=void 0===(N=y.urlFilterKeyPrefix)?"ps":N,M=(0,eB.J)().setIndexUiState,L=(0,U.useMemo)(function(){return E.reduce(function(e,t){var a=t.order,n=t.key;return e[a]=n,e},{})},[E]),R=(0,U.useCallback)(function(e){return(0,B._)(e.entries()).reduce(function(e,t){var a=(0,w._)(t,2),n=a[0],l=a[1];return n.startsWith(A)&&(e[L[e0(n)]]=(0,ex.N)(l,eZ)),e},{})},[L,A]),x=(0,U.useCallback)(function(){var e=R(new URLSearchParams(globalThis.location.search));t0.dispatchStartDeselectionEvent(),M(function(t){return(0,V._)((0,T._)({},t),{menu:e})})},[globalThis.location.search,M,R]),(0,U.useEffect)(function(){k&&!P&&x()},[k,P,x]);var $=(0,U.useCallback)(function(e,t){return function(a){Z(e,t,a)}},[Z]),ee=(0,U.useMemo)(function(){return(0,ea.R)(j)},[j]);return U.createElement(U.Fragment,null,I.map(function(e,t){var a,n=e.name,l=e.order,r=e.key,i=Y[r],o=F(r),s=null!==(a=j[r])&&void 0!==a&&a;return U.createElement(t9,{key:r,title:null!=n?n:"",step:l,id:r,isExpanded:i,isPreSelectedStep:o,isVisible:s,onExpandableStateChange:$(r,t),onHeroFilterValuePreSelect:H,onHeroFilterValueDeselect:D,stepValuePlaceholder:O,testIdPrefix:X})}),ee&&U.createElement("h5",{className:(0,eP.default)("textCenter__NJZlXO","my3__4v1E8o"),"data-testid":(0,z.A)("no-attributes-message",X)},Q))},t3=function(e,t){return null===e.order&&null===t.order?0:null===e.order?1:null===t.order?-1:e.order-t.order};(d=A||(A={})).Category="category",d.Selection="selection";var ae=function(e){var t,a,n,l,r,i,o,s,c=e.heroFiltersByKeyMap,u=e.categoryCellLabel,d=e.selectionCellLabel,m=e.preSelectedHeroFiltersIdsMap,f=e.testIdPrefix,p=(a=(t={heroFilters:(0,eU.d)().items,preSelectedHeroFiltersIdsMap:m}).heroFilters,n=t.preSelectedHeroFiltersIdsMap,r=(l=(0,w._)((0,U.useState)([]),2))[0],i=l[1],o=(0,U.useCallback)(function(){return a.filter(function(e){return!n[e.refinements[0].attribute]})},[a,n]),s=(0,U.useCallback)(function(e){e.detail.isChecked?i(o()):i(a)},[o,a]),(0,G.F)(v.UserSelectionToggleChanged,s),(0,U.useEffect)(function(){i(a)},[a]),(0,U.useEffect)(function(){Object.keys(n).length===Object.keys(a).length&&te.dispatchUserSelectionToggleDisabledEvent()},[a,n]),{visibleHeroFilters:r}).visibleHeroFilters,g=(0,U.useMemo)(function(){return p.map(function(e){var t,a=e.refinements[0],n=a.attribute,l=a.value;return{category:c[n].name,selection:tA(l),order:null!==(t=c[n].order)&&void 0!==t?t:null}}).sort(t3)},[p,c]),b=(0,U.useMemo)(function(){return[{id:A.Category,Header:u,accessor:A.Category,getCellProps:function(){return{className:"breakWord__JJAl-k",style:{fontWeight:"700"}}}},{id:A.Selection,Header:d,accessor:A.Selection,getCellProps:function(){return{style:{display:"table-cell"}}}}]},[u,d]);return U.createElement(O.DfTable,{tableAriaLabel:"Summary table",tableId:"summary","data-testid":(0,z.A)("summary-table",f),data:g,columns:b,isSortable:!1})},at=function(e){var t,a,n,l,r,i,o,s,c,u,d=e.heroFilters,m=e.visibleStepsIdsMap,f=e.cfhId,p=e.stepValuePlaceholder,g=e.noAttributesFoundLabel,h=e.summaryCategoryCellLabel,C=e.summarySelectionCellLabel,_=e.isRoutingEnabled,S=e.isSummaryProgressStep,y=e.urlFilterKeyPrefix,E=e.testIdPrefix,k=e8().businessSegment,P=(a=(t=(0,w._)((0,U.useState)({}),2))[0],n=t[1],l=(0,eB.J)().setIndexUiState,r=(0,U.useMemo)(function(){return Object.keys(a)},[a]),i=(0,U.useCallback)(function(e,t){if(t){var a=(0,T._)({},t);return e.forEach(function(e){a[e]&&delete a[e]}),a}},[]),o=(0,U.useCallback)(function(e){t0.dispatchStartDeselectionEvent();var t=(0,B._)(r).concat([e]);l(function(e){return(0,V._)((0,T._)({},e),{menu:i(t,e.menu)})}),n({})},[r,l,i]),s=(0,U.useCallback)(function(){t0.dispatchStartDeselectionEvent(),l(function(e){return(0,V._)((0,T._)({},e),{menu:{}})}),n({})},[l]),c=(0,U.useCallback)(function(e){var t;return null!==(t=a[e])&&void 0!==t&&t},[a]),u=(0,U.useCallback)(function(e){e.detail.isDeselection&&setTimeout(function(){t0.dispatchFinishDeselectionEvent()},300)},[]),(0,G.F)(v.ValuesDeselection,u),(0,G.F)(v.ResetConfiguration,s),{onHeroFilterValuePreSelect:n,onHeroFilterValueDeselect:o,preSelectedHeroFiltersIdsMap:a,checkStepPreSelection:c}),N=P.checkStepPreSelection,A=P.onHeroFilterValueDeselect,M=P.onHeroFilterValuePreSelect,L=P.preSelectedHeroFiltersIdsMap,R=(0,U.useMemo)(function(){return d.reduce(function(e,t){var a=t.order,n=t.name;return e[t.key]={order:a,name:n},e},{})},[d]),I=(0,U.useMemo)(function(){return(0,eI.z)(f,k===b.ClimateSource)},[f,k]);return U.createElement(U.Fragment,null,U.createElement(eH.Z,{filters:I}),S&&U.createElement(ae,{categoryCellLabel:h,selectionCellLabel:C,heroFiltersByKeyMap:R,preSelectedHeroFiltersIdsMap:L,testIdPrefix:E}),U.createElement("div",{"data-testid":(0,z.A)("stepper-container",E),className:(0,eP.default)((0,x._)({},ts,S))},U.createElement(t7,{heroFilters:d,stepValuePlaceholder:p,urlFilterKeyPrefix:y,isRoutingEnabled:_,visibleStepsIdsMap:m,noAttributesFoundLabel:g,checkStepPreSelection:N,onHeroFilterValueDeselect:A,onHeroFilterValuePreSelect:M,isSummaryProgressStep:S,testIdPrefix:E})))},aa={stepperHeaderSection:"stepperHeaderSection__jdV1b-",stepperHeaderSectionMd:"stepperHeaderSectionMd__HmleG9",resultsSection:"resultsSection__DYZVLq",decodeModelCodeSectionMd:"decodeModelCodeSectionMd__ljUJwt",progressSteps:"progressSteps__Xw8DSL","#":"#__YkyUQz",noWrap:"noWrap__0171dS"},an=function(e){var t,a,n,l,r,i,o,s,c,u,d,m,f,p,g,b,h,C,S,y,k,P,N,A,M,L,R,I,T,V,F,D,H,K,W,j,Q,J,X,q,Y,Z,$,ee,et,ea,er,ei,eo,es,ec,eu,ed,em,ef,ep,eg=e.heroFilters,eb=e.cfhId,eh=e.stickyHeaderContentHeight,eC=e.testIdPrefix,e_=e.dictionary,ev=e_.stepsToConfigureLabel,eS=e_.stepValuePlaceholder,ey=e_.noAttributesFoundLabel,eE=e_.searchForAttributePlaceholderL
1abel,ek=e_.summaryLabel,eN=e_.expandAllToggleLabel,eA=e_.firstStepperLabel,eM=e_.secondStepperLabel,eL=e_.thirdStepperLabel,eR=e_.showUserSelectionToggleLabel,ex=e_.summaryCategoryCellLabel,eI=e_.summarySelectionCellLabel,eT=e_.copiedMessageHeader,eV=e_.copiedMessageContent,eF=e_.limitInformationBoxContent,ew=e_.decodeSearchTitle,eB=e_.decodeSearchPlaceholder,eH=e_.decodeButtonLabel,eU=e_.decodeNonCompatibleMaterialErrorMessage,eO=e_.decodeNonExistingMaterialErrorMessage,eK=e.dictionary,eW=e.defaultAppLocale,ej=e.locale,eQ=e.routingPush,eG=e.getProductLink,ez=e.urlFilterKeyPrefix,eJ=(0,U.useRef)(null),eX=(0,w._)((0,en.Q)({screenBreakpoints:[_.Sm,_.Md]}),2),eq=eX[0],eZ=eX[1],e$=(a=(t={heroFilters:eg,urlFilterKeyPrefix:ez,routingPush:eQ}).heroFilters,n=t.routingPush,r=void 0===(l=t.urlFilterKeyPrefix)?"ps":l,i=(0,eD.u)().items,s=(o=e8()).tabId,c=o.pageType,d=(u=(0,w._)((0,U.useState)(E.Configure),2))[0],m=u[1],f=(0,U.useCallback)(function(){if(n){var e=el.k.getUrl();e&&(e.searchParams.set(eY,E.Summary),n(e.href))}},[n]),p=(0,U.useCallback)(function(){if(n){var e=el.k.getUrl();e&&(e.searchParams.delete(eY),n(e.href))}},[n]),g=(0,U.useCallback)(function(e){m(E.Summary),e?setTimeout(function(){f()},500):f()},[f]),b=(0,U.useCallback)(function(){m(E.Configure),e7.trackReviseSelection({pageType:c,tabName:s,itemCategories:i[0].categoryArray}),p()},[p,c,s,i]),h=(0,U.useCallback)(function(){var e,t,n=el.k.getSearchParamValueByKey(eY),l=(0,B._)((null!==(t=null===(e=el.k.getUrl())||void 0===e?void 0:e.searchParams)&&void 0!==t?t:[]).entries()).reduce(function(e,t){var a=(0,w._)(t,1)[0];return"string"==typeof a&&a.startsWith(r)&&e++,e},0);n===E.Summary&&l===a.length?m(E.Summary):m(E.Configure)},[r,a,m]),C=(0,U.useCallback)(function(e){d===E.Summary&&e7.trackProgressStepChange({pageType:c,tabName:s,itemCategories:i[0].categoryArray,step:e})},[i,c,s,d]),S=(0,U.useCallback)(function(e){var t=e3[E.Configure];e.detail===t&&(m(E.Configure),C(E.Configure)),p()},[p,C]),y=(0,U.useMemo)(function(){return e3[d]},[d]),k=(0,U.useMemo)(function(){return d!==E.Configure},[d]),P=(0,U.useMemo)(function(){return d===E.Summary},[d]),(0,U.useEffect)(function(){d===E.ProductType&&m(E.Configure)},[d,m]),(0,U.useEffect)(function(){if(n)return h(),globalThis.addEventListener(v.PopState,h),function(){globalThis.removeEventListener(v.PopState,h)}},[h,n]),{activeStep:y,progressStepView:d,isSummaryProgressStep:P,onActiveStepCh
1ange:S,onSummaryStepView:g,onReviseSelectionClick:b,isProgressStepClickable:k}),e0=e$.activeStep,e1=e$.isSummaryProgressStep,e2=e$.onSummaryStepView,e5=e$.onActiveStepChange,e4=e$.onReviseSelectionClick,e6=e$.isProgressStepClickable,e9=(A=(N=(0,w._)((0,U.useState)(!1),2))[0],M=N[1],R=(L=(0,eD.u)()).items,I=L.results,V=(T=e8()).tabId,F=T.pageType,D=(0,U.useCallback)(function(){var e;e7.trackShowMatchingResults({pageType:F,tabName:V,itemCategories:R[0].categoryArray,numberOfResults:null!==(e=null==I?void 0:I.nbHits)&&void 0!==e?e:0}),M(!0)},[F,V,R,I]),H=(0,U.useCallback)(function(e,t){te.dispatchModelCodeSelectedEvent(e,t),e2(!0),M(!1)},[e2]),K=(0,U.useCallback)(function(){M(!1)},[]),W=(0,U.useCallback)(function(){M(!1)},[]),(0,G.F)(v.ResetConfiguration,K),{isMatchingResultsSectionVisible:A,handleShowResults:D,handleModelCodeSelect:H,handleResultsSectionClose:W}),tt=e9.isMatchingResultsSectionVisible,ta=e9.handleModelCodeSelect,tn=e9.handleShowResults,tl=e9.handleResultsSectionClose,tr=(j=(0,U.useRef)(!1),Q=(0,eD.u)().items,X=(J=e8()).tabId,q=J.pageType,Z=(Y=(0,w._)((0,U.useState)(""),2))[0],$=Y[1],et=(ee=(0,w._)((0,U.useState)(!0),2))[0],ea=ee[1],er=(0,U.useMemo)(function(){return eg.reduce(function(e,t){return e[t.key]=!0,e},{})},[eg]),ei=(0,U.useCallback)(function(e){return eg.reduce(function(t,a){var n=a.label,l=a.key;return decodeURIComponent(n).toLowerCase().includes(e)&&(t[l]=!0),t},{})},[eg]),eo=(0,U.useCallback)(function(e){if(!e)return j.current=!1,void $("");j.current=!0,$(e)},[]),es=(0,U.useCallback)(function(){$(""),j.current=!1},[]),ec=(0,U.useCallback)(function(e){var t=e.detail;j.current&&(es(),setTimeout(function(){t.stepElement.scrollIntoView({behavior:"smooth",block:"center"})},500))},[es]),eu=(0,U.useCallback)(function(){es()},[es]),ed=(0,U.useMemo)(function(){return Z?ei(Z.toLowerCase()):er},[ei,Z,er]),(0,G.F)(v.ModelCodeValuesChange,ec),(0,G.F)(v.ResetConfiguration,eu),em=(0,U.useCallback)(function(){e7.trackAttributeSearchChange({itemCategories:Q[0].categoryArray,pageType:q,tabName:X})},[Q,q,X]),(0,U.useEffect)(function(){et&&Z&&(em(),ea(!1))},[Z,et,em]),{handleSearchQueryChange:eo,searchQuery:Z,visibleStepsIdsMap:ed}),ti=tr.searchQuery,to=tr.handleSearchQueryChange,tc=tr.visibleStepsIdsMap,tu=(0,U.useCallback)(function(e){globalThis.location.href=e.target.href},[]),td=(0,U.useMemo)(function(){return[eA,eM,eL]},[eA,eM,eL]),tm=(0,U.useMemo)(function(){return eq&&!e1&&tt},[eq,e1,tt]),tf=(0,U.useMemo)(function(){return!!eQ},[eQ]);return(0,U.useEffect)(function(){var e;e1&&(null===(e=eJ.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"}))},[e1]),U.createElement(U.Fragment,null,U.createElement("section",{className:aa.progressSteps,ref:eJ},U.createElement(O.DfProgressSteps,{steps:td,activeStep:e0,onActiveStepCh
1ange:e5,inlineCharLimit:25,clickSteps:e6})),U.createElement("section",{className:(0,eP.default)(tg)},U.createElement("div",{className:(0,eP.default)(tb,th,"mb18__ng-o5v",aa.stepperHeaderSection,(ef={},(0,x._)(ef,aa.decodeModelCodeSectionMd,eZ),(0,x._)(ef,ts,e1),ef))},U.createElement(tL,{heroFilters:eg,buttonLabel:eH,inputLabel:ew,inputPlaceholder:eB}))),eq&&U.createElement(tJ,{defaultAppLocale:eW,locale:ej,dictionary:eK,isSummaryProgressStep:e1,isMatchingResultsSectionVisible:tm,getProductLink:eG,onSummaryStepViewClick:e2,onProductDetailsClick:tu,onModelCodeSelect:ta,onShowResults:tn,onReviseSelectionClick:e4,onResultsSectionClose:tl}),eZ&&!eq&&U.createElement("div",{className:tE},U.createElement(tQ,{defaultAppLocale:eW,locale:ej,dictionary:eK,stickyHeaderContentHeight:eh,isSummaryProgressStep:e1,isMatchingResultsSectionVisible:tt,getProductLink:eG,onSummaryStepViewClick:e2,onProductDetailsClick:tu,onShowResults:tn,onReviseSelectionClick:e4,onModelCodeSelect:ta})),U.createElement("section",{className:(0,eP.default)(tg,tS)},U.createElement("div",{className:(0,eP.default)(tb,th,aa.stepperHeaderSection,(ep={},(0,x._)(ep,aa.stepperHeaderSectionMd,eZ),(0,x._)(ep,ts,tm),ep)),"data-testid":(0,z.A)("stepper-header-section",eC)},U.createElement(t$,{searchQuery:ti,updateSearchQuery:to,searchForAttributePlaceholderLabel:eE,stepsToConfigureLabel:ev,summaryLabel:ek,isSummaryProgressStep:e1,expandAllToggleLabel:eN,showUserSelectionToggleLabel:eR,isMobileScreen:eq,testIdPrefix:eC}))),U.createElement("div",{className:(0,eP.default)(tg,aa.noWrap)},U.createElement("div",{className:(0,eP.default)(tb,th,aa.stepperSection,(0,x._)({},ts,tm))},U.createElement(at,{heroFilters:eg,visibleStepsIdsMap:tc,cfhId:eb,stepValuePlaceholder:eS,noAttributesFoundLabel:ey,summaryCategoryCellLabel:ex,summarySelectionCellLabel:eI,isRoutingEnabled:tf,isSummaryProgressStep:e1,urlFilterKeyPrefix:ez,testIdPrefix:eC})),!eZ&&U.createElement("div",{className:(0,eP.default)("col4__4dCZXv",aa.resultsSection)},U.createElement(tQ,{defaultAppLocale:eW,locale:ej,dictionary:eK,stickyHeaderContentHeight:eh,isSummaryProgressStep:e1,isMatchingResultsSectionVisible:tt,getProductLink:eG,onSummaryStepViewClick:e2,onProductDetailsClick:tu,onShowResults:tn,onReviseSelectionClick:e4,onModelCodeSelect:ta}))),U.createElement(tI,{copiedMessageHeader:eT,copiedMessageContent:eV,limitInformationBoxContent:eF,nonCompatibleMaterialErrorContent:eU,nonExistingMaterialErrorContent:eO,isSummaryProgressStep:e1,testIdPrefix:eC}))},al=function(e){var t=e.children;return U.createElement(U.Fragment,null,t)},ar=function(e){return({dev:{apiKey:"broken-key"},uat:{apiKey:"broken-key"},e2e:{apiKey:"broken-key"},prod:{apiKey:"broken-key"}})[e]},ai=(m=(0,M._)(function(e,t){var a;return(0,H.__generator)(this,function(n){switch(n.label){case 0:if(!(null==(a=ar(e))?void 0:a.apiKey))throw Error("Incorrect `Env` value or configurations were provided");return[4,ej.I.getInstance({core:{authorizationKey:a.apiKey}},(0,eQ.g)(e,t))];case 1:return[2,n.sent()]}})}),function(e,t){return m.apply(this,arguments)}),ao=["searchAppName","productsIndexName","algoliaApiBaseUrl","contentstackApiKey","contentstackDeliveryToken","contentstackBranch","contentstackEnv","auth0IssuerBaseUrl"],as=(f=(0,M._)(function(e,t){var a,n,l,r;return(0,H.__generator)(this,function(i){switch(i.label){case 0:return[4,ai(e,t)];case 1:return[4,i.sent().requestRemoteConfig("ProductSelector-827422-FE")];case 2:if(a=i.sent(),l=(n=(0,er.p)((0,B._)(ao),a)).isValid,r=n.invalidKeys,!l)throw Error("Invalid app config provided: ".concat(r.join(", ")));return[2,a]}})}),function(e,t){return f.apply(this,arguments)}),ac=function(e,t){var a;return e[t]||(null===(a=eG.fields[t])||void 0===a?void 0:a.defaultValue)},au=function(e){return{stepsToConfigureLabel:ac(e,"steps_to_configure_label"),stepValuePlaceholder:ac(e,"step_value_placeholder"),yourResultLabel:ac(e,"your_result_label"),modelCodeLabel:ac(e,"model_code_label"),showMatchingResultsButtonLabel:ac(e,"show_matching_results_button_label"),resetConfigurationButtonLabel:ac(e,"reset_configuration_button_label"),copiedMessageHeader:ac(e,"copied_message_header"),copiedMessageContent:ac(e,"copied_message_content"),limitInformationBoxContent:ac(e,"limit_information_box_content"),matchingResultSectionSectionLabel:ac(e,"matching_result_section_section_label"),noAttributesFoundLabel:ac(e,"no_attributes_found_label"),searchForAttributePlaceholderL
1abel:ac(e,"search_for_attribute_placeholder_label"),selectButtonLabel:ac(e,"select_button_label"),reviewResultButtonLabel:ac(e,"review_result_button_label"),summaryCategoryCellLabel:ac(e,"summary_category_cell_label"),summarySelectionCellLabel:ac(e,"summary_selection_cell_label"),productDetailsButtonLabel:ac(e,"product_details_button_label"),summaryLabel:ac(e,"summary_label"),expandAllToggleLabel:ac(e,"expand_all_toggle_label"),firstStepperLabel:ac(e,"first_stepper_label"),secondStepperLabel:ac(e,"second_stepper_label"),thirdStepperLabel:ac(e,"third_stepper_label"),copyModelCodeLabel:ac(e,"copy_model_code_label"),showUserSelectionToggleLabel:ac(e,"show_user_selection_toggle_label"),backToConfigurationLabel:ac(e,"back_to_configuration_label"),hideMatchingResultsLabel:ac(e,"hide_matching_results_label"),decodeSearchTitle:ac(e,"decode_search_title"),decodeSearchPlaceholder:ac(e,"decode_search_placeholder"),decodeButtonLabel:ac(e,"decode_button_label"),decodeNonExistingMaterialErrorMessage:ac(e,"decode_non_existing_material_error_message"),decodeNonCompatibleMaterialErrorMessage:ac(e,"decode_non_compatible_material_error_message"),reviseSelectionButtonLabel:ac(e,"revise_selection_button_label")}},ad=au({}),am=function(e){var t=e.env,a=void 0===t?"uat":t,n=e.locale,l=void 0===n?ei.P4:n,r=e.useSharedApiKey,i=void 0===r||r,o=e.urlFilterKeyPrefix,s=void 0===o?"ps":o,c=e.stickyHeaderContentHeight,u=e.dictionary,d=e.cfhId,m=e.appConfig,f=e.businessSegment,p=e.urlTabKeyName,g=e.routingPush,b=e.defaultAppLocale,h=e.getProductLink,C=e.authClientId,_=e.redirectUrl,v=e.isUserLoggedIn,S=e.auth0BaseUrl,y=e.gtmServiceConfig,E=e.testIdPrefix,k=e.localizationConfig,P=e.consumerAnalyticsTag,N=e.sharedApiKeyPurposeType,A=void 0===N?eT.fB:N,M=(0,F._)(e,["env","locale","useSharedApiKey","urlFilterKeyPrefix","stickyHeaderContentHeight","dictionary","cfhId","appConfig","businessSegment","urlTabKeyName","routingPush","defaultAppLocale","getProductLink","authClientId","redirectUrl","isUserLoggedIn","auth0BaseUrl","gtmServiceConfig","testIdPrefix","localizationConfig","consumerAnalyticsTag","sharedApiKeyPurposeType"]);if(!m&&!a)throw Error("No `env` config value was provided");var L=(0,w._)((0,U.useState)(!1),2),R=L[0],x=L[1],I=(0,w._)((0,U.useState)(!1),2),B=I[0],D=I[1],H=(0,w._)((0,U.useState)(m),2),K=H[0],W=H[1],j=(0,w._)((0,U.useState)(u),2),Q=j[0],G=j[1],X=(0,eV.z)({baseUrl:null==K?void 0:K.algoliaApiBaseUrl,cfhId:d}),q=X.heroFilters,Y=X.isLoading,Z=(null!=k?k:{}).cmsLocale,$=void 0===Z?l:Z,ee=(0,U.useMemo)(function(){return"prod"===a||"e2e"===a},[a]);(0,J.E)(function(){y&&e7.setConfig(y)});var et=(0,U.useMemo)(function(){return!!(!m&&a&&ar(a))},[m,a]);return(0,U.useEffect)(function(){et&&(x(!0),as(a,f).then(function(e){W(e),D(!1)}).catch(function(e){ee||console.error("Get config error:",e),D(!0)}).finally(function(){x(!1)}))},[]),(0,U.useEffect)(function(){!Q&&K&&(x(!0),new ez.X({api_key:K.contentstackApiKey,delivery_token:K.contentstackDeliveryToken,branch:K.contentstackBranch,environment:K.contentstackEnv}).getSingletonContent({uuid:eX._.mf_product_selector_dictionary,languageCode:$,findQuery:(0,eJ.nR)([eq.f])}).then(function(e){G(au(e))}).catch(function(e){ee||console.error("Get cms data:",e),G(ad)}).finally(function(){D(!1),x(!1)}))},[K]),U.createElement(al,null,B?U.createElement("section",{className:tt},U.createElement(eo.r,{testIdPrefix:E})):U.createElement(U.Fragment,null,R||!K||!Q||Y?U.createElement(O.DfLoader,{"data-testid":(0,z.A)("loader",E)}):U.createElement("section",{className:tt,"data-testid":(0,z.A)("product-selector-section",E)},U.createElement(eu.s,{useSharedApiKey:i,domain:K.auth0IssuerBaseUrl,authClientId:C,redirectUrl:_},U.createElement(e2,{algoliaApiBaseUrl:K.algoliaApiBaseUrl,searchAppName:K.searchAppName,businessSegment:f,productsIndexName:K.productsIndexName,urlFilterKeyPrefix:s,urlTabKeyName:p,heroFilters:q,routingPush:g,useSharedApiKey:i,isUserLoggedIn:v,auth0BaseUrl:S,locale:l,sharedApiKeyPurposeType:A,consumerAnalyticsTag:P},U.createElement(e4,{config:(0,V._)((0,T._)({},K,M),{consumerAnalyticsTag:P,businessSegment:f})},U.createElement(an,{cfhId:d,locale:l,dictionary:Q,heroFilters:q,stickyHeaderContentHeight:void 0===c?0:c,urlFilterKeyPrefix:s,defaultAppLocale:b,routingPush:g,getProductLink:h,testIdPrefix:E})))))))},af=(p=(0,M._)(function(e,t){var a;return(0,H.__generator)(this,function(n){switch(n.label){case 0:return[4,ai(e,t)];case 1:return[4,n.sent().requestRemoteConfig("ProductSelectorVisibility-827422-FE")];case 2:if(!(a=n.sent())||(0,ea.R)(a))throw Error("Invalid mf visibility config provided");return[2,a]}})}),function(e,t){return p.apply(this,arguments)}),ap={isVisible:!1},ag=(g=(0,M._)(function(e){var t,a,n,l,r,i,o,s,c;return(0,H.__generator)(this,function(u){switch(u.label){case 0:if(!(null==e?void 0:e.cfhId))return[2,ap];return a=e.cfhId,n=e.configParams,l=e.segment,[4,Promise.all([af(r=null!==(t=null==n?void 0:n.env)&&void 0!==t?t:h.Uat,l),as(r,l)])];case 1:return o=(i=w._.apply(void 0,[u.sent(),2]))[0],s=i[1],[2,(c=o[a])?{isVisible:c,appConfig:s}:ap]}})}),function(e){return g.apply(this,arguments)})}}]);
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.